Commit graph

782 commits

Author SHA1 Message Date
Roger Crew
dfca93989a update README.md re testing
now that we have l8tf vaguely working, we need to mention 'make test' etc...
2026-06-16 04:25:44 -07:00
Roger Crew
c9f0ba8cf0 __EXTENSIONS__ for solaris 2026-07-24 23:48:10 -07:00
Roger Crew
897c9dbb0d explicitly disable post-C99 features
autoconf as of 2.73 assumes C23 by default
and we are not quite ready for that yet.
2026-07-20 00:31:05 -07:00
Roger Crew
f1321870b1 add FLOAT_MANT_DIG
C99 says the various *_MANT_DIGs should be there
and this makes unit test construction easier.
2026-05-12 20:42:25 -07:00
Roger Crew
bff6bf3be0 make parse_number(PN_NONNEG|...) behave more as advertised
this flag now fails negative number strings directly
rather than relying on strtoimax() to choke on "--".

The yacc parser (only place where PN_NONNEG is used) currently never
does this so it makes no difference, but this is now visible from unit
tests, so...
2026-05-12 20:38:23 -07:00
Roger Crew
7d2650703e failed dbio_read_line resets dbio_line_stream
only really matters for unit testing
since this immediately aborts the actual server
2026-05-09 15:50:19 -07:00
Roger Crew
0580ae1dc9 failed dbio_read_int* should not assign lvalue
only really matters for unit testing since failed integer reads
immediately abort the actual server
2026-05-09 15:48:22 -07:00
Roger Crew
a810c71d66 expose more API for unit testing
dbio_last_error (db_io)
parse_number_from_string (numbers)
sizeof_forked_task (tasks)
2026-05-09 15:52:32 -07:00
Roger Crew
5e3d9f88fa make get_utf return 0-256 in ASCII world 2026-05-09 15:42:16 -07:00
Roger Crew
4fc56925ea forbid using ylo regexps with unicode
replaces an ugly hack and if you really are going to try to get ylo to
work with unicode then you can modify extensions.ac, too.
2026-04-15 14:00:05 -07:00
Roger Crew
0d60aa6895 allow empty initial database file 2025-11-19 03:02:32 -08:00
Roger Crew
af353ef677 fix emergency mode created-wizard.owner 2025-11-19 02:57:38 -08:00
Roger Crew
529d103eae fix INT16 NumNum types 2025-10-03 07:02:42 -07:00
Roger Crew
ebc9c5603d reserve uT-* + add UNIT_TESTS (was -DNOMAIN) to config.h
I realized "whether we are unit-testing or not" really works better as
part of the configuration.  This removes a need to assign to CPPFLAGS
that might otherwise make life difficult later.

N.B. Even though unit test sources need to show up directly in build
directories, they are NOT meant to live in this repository:(we want to
be able to do checkouts and switch between branches without having the
tests change out from under us, in order to, e.g., verify that
something *was* a bug and that a particular change fixed it), hence
the reservation of the uT-* prefix so that we can have these files
appear as needed but be invisible to (this) git repository.

Also, NOMAIN (as in '#ifndef NOMAIN') was violating
my 'double-negative' rule, so that is deprecated.
2025-10-10 21:02:17 -07:00
Roger Crew
f3d3e78108 add testing.ac and makevars for testing targets
first steps towards being able to do 'make test'
2025-10-10 21:02:16 -07:00
Roger Crew
695babf23c add #serial declarations to ax_lp.m4 and ax_xt.m4
oh look, we get to do a version bump on AX_LP (and AX_XT)
2026-05-29 22:59:17 -07:00
Roger Crew
2275cf9a94 ax_xt - fix makevar quoting
_AX_Xt_put_makevars gets an extra level of quoting
2026-05-29 22:54:28 -07:00
Roger Crew
4f836cc06b ax_xt fix put_cdef_unless_options quoting
Yes, I am being totally anal about m4-quoting.
How could you tell?
2026-05-29 22:53:16 -07:00
Roger Crew
0251e492d4 ax_lp - introduce ax_lp_map_beta_sep 2026-05-29 22:18:01 -07:00
Roger Crew
e213fe8d6a ax_lp - introduce ax_lp_prepend 2026-05-29 22:13:05 -07:00
Roger Crew
ae3ea85b85 ax_lp - introduce multi ax_lp_put and ax_lp_check_puts
makes ax_lp_put more consistent with how  ax_lp_get() works.
2026-05-29 22:03:16 -07:00
Roger Crew
94b11c3bf0 all XT declarations write AX_XT_CONFIGURE_EPILOGUE
rather than only letting the first one do it.  This way, the last one
wins.  And then we can allow the ALL_XT_* file lists to be expanded
immediately (because they'll get overwritten if they change later),
which looks more straightforward in the MOO_XT_DUMP_EVERYTHING view.

Not that this makes any real difference now, but it may be better for
futureproofing (i.e., if the epilogue ends up doing more later on).
2026-05-30 00:31:47 -07:00
Roger Crew
35e22ab268 remove extra AC_SUBST(ALL_XT_*,) from AX_XT_CONFIGURE_EPILOGUE
The only difference between AC_SUBST with an argument and without is
the variable assignment, so just do the variable assignment.
2026-05-30 00:07:16 -07:00
Roger Crew
1f3e55b59c ax_lp - expand unquoted [:var] values correctly
(originally was not going to allow this, but it's useful):

We now include values directly in the m4_pushdef() so that they expand
when you'd expect, but we also have to chop the value ENTIRELY out of
the corresponding m4_popdef() call so that any side effects do not get
repeated, which means m4_car() is no longer good enough (since it
expands all of the list elements (which are expected to be quoted
anyway) even though they all get ignored).

which is tricky
2026-05-29 15:59:18 -07:00
Roger Crew
21b4dcad22 ax_lp - allow commentary in keyword-arg lists 2026-05-29 15:55:48 -07:00
Roger Crew
1a8029f9d9 make ax_lp.m4 not depend on autoconf
AC_DEFUN -> m4_defun
and that was all we were using; there isn't even m4sh stuff.
2026-05-29 15:29:37 -07:00
Roger Crew
c51c347461 fix AX_LP_DEFINE_LANGUAGE translit bug
failed on LANGUAGE containing the letter 'A'
2026-05-29 15:23:01 -07:00
Roger Crew
f803c33315 update ax_gcc_func_attribute.m4 to serial 13 2026-05-29 14:38:27 -07:00
Roger Crew
a31ae26850 fix MOO_CHECK_GNU_MAKE
incorrectly failed when directory contains an actual 't' file
2026-05-29 14:41:22 -07:00
Roger Crew
f399b60924 fix git version/commit for VPATH build outside of src tree
need to cd into src tree before doing git rev-list|describe
2026-05-09 15:38:04 -07:00
Roger Crew
31b3544492 fix ChangeLog.txt, typos
Ken Fox wrote the xml extension

(+ random other crap)
2025-10-02 15:24:52 -07:00
Roger Crew
666b90a404 put dev branch warning on README 2025-10-03 06:59:19 -07:00
Roger Crew
dc11b0fe61 make distribution 2025-10-01 04:25:06 -07:00
Roger Crew
d94f4ac868 fix Makefile clean targets for tarball
The Tarball People will be unhappy
if make clean deletes keywords.c, parser.c, etc...
2025-10-01 04:22:24 -07:00
Roger Crew
2fa5048111 bump version to 1.9.0 2025-10-01 01:39:11 -07:00
Roger Crew
45328456cf new README 2025-10-01 01:39:11 -07:00
Roger Crew
f754a411d3 ChangeLog.txt -> 1.9.0 2025-10-01 01:39:11 -07:00
Roger Crew
74f2dbce88 Extensions.md + tutorial 2025-10-01 01:38:51 -07:00
Roger Crew
1d91d4f8cc %%extension waif 2025-09-30 23:04:53 -07:00
Roger Crew
92d689db8c BITWISE_OPERATORS option 2025-09-30 23:04:53 -07:00
Roger Crew
e12b0e1f6c BQM_INCLUDES_WAIFS, Waif byte quota adjustments 2025-09-30 23:04:53 -07:00
Roger Crew
951e8c2f42 BFT bitwise implementation
(For "Break the Fewest Things")

This version parses everything that the non-bitop server parses
including

  9.&&x
  9.||x
  p ? 9.|x

and otherwise preserves the behavior of the original bitop
implementation, except in the following cases

      2.|.5
  p ? 2.|.5
  p ? 2.|.5 | x

which are no-win situations (non-bitop server inevitably
allows the 2nd as a conditional but must fail the other two,
while the original implementation bitop server does the opposite).

Essentially, you have to introduce spaces

  2 .|. 5

if you want to be sure of this being read as a bitwise inclusive or.
Since the unparser automatically puts spaces around bitops, this will
not be an issue for any saved databases, only for cases where code is
being parsed on the fly and particular syntax errors are expected (or not).
2025-09-30 23:04:53 -07:00
Roger Crew
324cf46237 WAIF_CORE ifdef festival 2025-09-30 23:04:53 -07:00
Roger Crew
1527c3f1f4 fix EOF handling on bitwise operators
make sure we never getch EOF twice
2025-09-30 23:04:53 -07:00
Roger Crew
49fb5bba5d refers_to() looks completely broken 2025-09-30 23:04:53 -07:00
Kenny Root
1086e7374d Add bitwise operators
Add in bitwise AND ".&.", OR ".|.", and XOR ".^."

Add arithmetic left shift "<<", arithmetic right shift ">>",
and logical right shift operators ">>>"

This retains the original parsing of something like "9.^.5" to be
interpreted as "square root of 9"  However, "9.^. 5" is interpreted as
"9 XOR 5".

( The number parsing code moving to parse_number() is the only
  significant change in adapting this extension to the new server;
  the original behavior of the extension is retained in this commit
    --wrog )

Change-Id: I99291bed3d07d68ced204ea27bf684dc09a861fc
2025-09-30 23:04:53 -07:00
Roger Crew
0cc27f8751 fprintf(stderr) should be errlog()
if there is a logfile, then stderr gets closed early on...
2025-09-30 23:04:53 -07:00
Roger Crew
3c6900e421 %%extension xml
rewrote to use the handlers differently,
to rearrange memory usage so that MAXCONCAT limits are honored
and so that text from multiple consecutive chardata handler calls
gets consolidated even in the xml_parse_document case.
Uses current expat / shared lib by default

(meaning no more ./expat directory; you can still configure
--with-expatpath=... if you really want, but that version was really
old (1.2, circa 2000).  --with-expatpath should also work with a
modern expat dist (latest is 2.5 now) if you need a static lib for
some reason)

no API changes (yet).
2025-09-30 23:04:53 -07:00
Roger Crew
aba684e138 remove bound from WaifPropdefs.defs
this is supposed to work (it's been in the C standard since 1990)
2025-09-30 23:04:53 -07:00
Roger Crew
9e0763d5f6 --enable-sz=bq* 2025-09-30 23:04:53 -07:00