Commit Graph

222 Commits

Author SHA1 Message Date
Dianne Skoll 074feffaab Make sure we redirect stdin from /dev/null for RUN and shell() 2025-10-07 14:34:19 -04:00
Dianne Skoll 5092d5bc16 More warning_level annotations. 2025-09-25 18:08:29 -04:00
Dianne Skoll d15c8f106b Support hexadecimal integer constants in expressions; add hex() function. 2025-09-11 17:02:22 -04:00
Dianne Skoll 097dda1750 Make asc() always return a number between 0 and 255. 2025-09-11 16:42:32 -04:00
Dianne Skoll d9bf902153 Put #ifdef guards around wide char code. 2025-09-10 17:56:32 -04:00
Dianne Skoll 53a12de2f9 Fix typo 2025-09-10 17:54:26 -04:00
Dianne Skoll fe2b34da68 Avoid memory leak. 2025-09-10 17:54:06 -04:00
Dianne Skoll 55975154b1 Add codepoint() and mbchar() functions. 2025-09-10 17:33:57 -04:00
Dianne Skoll b00cf9c5b7 Remove some unnecessary assignments. 2025-09-10 13:48:18 -04:00
Dianne Skoll 375576fcc5 Add better support for multi-byte character set.
The functions mbindex, mbstrlen and mbsubstr are just like
index, strlen and substr, but they use and return 1-based
character indexes rather than 1-based byte indexes.
2025-09-10 13:25:27 -04:00
Dianne Skoll ef7021972e Add trigimetz and trigeventstarttz functions. 2025-09-04 15:36:27 -04:00
Dianne Skoll 4237dc4a3f Allow empty string to be used in tzconvert to designate system default time zone. 2025-09-04 10:09:46 -04:00
Dianne Skoll dfabda7dee add trigtz() function 2025-09-03 14:19:31 -04:00
Dianne Skoll bcfee04cae Handle another time zone edge case. 2025-09-03 13:21:16 -04:00
Dianne Skoll 5f9e71f9eb More timezone fixification. 2025-09-03 13:05:54 -04:00
Dianne Skoll 272336226e Add timezone support to evaltrig. 2025-09-03 12:42:59 -04:00
Dianne Skoll 7979a69cb9 First semi-sorta-working time zone adjustment. 2025-09-03 12:22:09 -04:00
Dianne Skoll fe002557cf New approach to handling time zone specs in REM command. 2025-09-03 11:02:01 -04:00
Dianne Skoll 5d46df871f Clamp trigger() to "1 January 1990 AT 00:00" if UTC flag is used. 2025-08-28 13:30:21 -04:00
Dianne Skoll c5d661124c Never return a year < 1990 from trigger() 2025-08-28 12:53:28 -04:00
Dianne Skoll 0c9ec11fce Add clarifying comment. 2025-08-16 10:09:44 -04:00
Dianne Skoll 7b7b861399 Disable RUN in callbacks to ordx and subst_xxx functions. 2025-08-15 20:27:51 -04:00
Dianne Skoll 5ee415c2fb Add trigistodo(), trigcompletethrough() and trigmaxoverdue() introspection functions. 2025-08-15 15:20:57 -04:00
Dianne Skoll 0976cd64f3 If evaluating ordx(n) yields an error, then error out instead of continuing with ord(n) 2025-08-12 18:27:20 -04:00
Dianne Skoll f9a6aba81d Allow ord(n) to be overridden with user-defined function ordx(n)
Lets language packs customize ord.
2025-08-11 23:29:08 -04:00
Dianne Skoll 68a4b23b6f Rework scanfrom so it's computed as needed. 2025-08-11 16:52:41 -04:00
Dianne Skoll dfb137085a Defensive programming. 2025-07-24 15:26:17 -04:00
Dianne Skoll ea5e8c90ff More const stuff. 2025-07-21 18:46:31 -04:00
Dianne Skoll 6fed350e1f Give better error messages thant "Type mismatch" for bad month or weekday names. 2025-07-05 09:52:30 -04:00
Dianne Skoll 005ccef953 Pass NULLs in a bunch of places where FromDSE result is not needed. 2025-07-02 14:21:32 -04:00
Dianne Skoll 578c98c865 Pass NULLs to FromDSE for info we don't need. 2025-07-02 14:10:42 -04:00
Dianne Skoll 2954fca8d8 Allow month to be specified by name in all places where it can be specified by number. 2025-07-02 11:40:02 -04:00
Dianne Skoll 8356dacf2a Allow first argument of daysinmon to be a string. 2025-07-02 11:20:15 -04:00
Dianne Skoll 4fd145cf4e Allow daysinmon() to take a single DATE or DATETIME argument. 2025-07-02 10:14:48 -04:00
Dianne Skoll 68d487ade9 Make a macro DBGX to avoid typo-ing '&' as '&&' in future. :) 2025-05-26 22:44:28 -04:00
Dianne Skoll 9d42879170 Make "value" constant iff variable exists and is constant.
Otherwise, it's non-constant.
2025-05-26 22:22:49 -04:00
Dianne Skoll 44b50fc6be Make "value()" evaluate its second argument lazily.
If the variable whose name is the first argument exists, don't
bother evaluating the second argument.
2025-05-26 21:56:04 -04:00
Dianne Skoll 8d88192483 Keep a hash table of filenames we've seen so we don't need to strdup the current filename all over the place. 2025-05-24 22:51:16 -04:00
Dianne Skoll a6ca571fe5 Fix indentation. 2025-05-24 22:13:47 -04:00
Dianne Skoll c5bc459dd9 Add "-du" debugging flag to print a list of variables that were set but never used. 2025-05-23 16:55:10 -04:00
Dianne Skoll 7e5dc26ee5 *PROPERLY* disable RUN in eval. :) 2025-05-23 12:03:09 -04:00
Dianne Skoll 4c2b6031cd Disable shell() inside an eval("...") for safety.
Based on email from Tim Chase.
2025-05-23 11:48:06 -04:00
Dianne Skoll 0ec43d570c Add "const" function, which is the inverse of "nonconst" 2025-05-23 08:47:12 -04:00
Dianne Skoll 70a97a8fe5 Add trigbase() built-in function. 2025-05-22 17:44:42 -04:00
Dianne Skoll 3118f8d2a4 Add "eval()" built-in function. 2025-05-22 13:52:07 -04:00
Dianne Skoll 357f7105bd Better coerce error messages. 2025-05-22 10:03:32 -04:00
Dianne Skoll ec8cae6d4b Mark a few functions as non-const that were incorrectly marked const before. 2025-05-21 23:43:26 -04:00
Dianne Skoll 1e3657b728 Overhaul how IF/ELSE work so we can track "constant-ness" of variables.
We now keep track of whether a variable holds a "constant" value
(ie, a value that will stay the same on successive Remind runs)
so Purge Mode can be more accurate.
2025-05-20 22:11:39 -04:00
Dianne Skoll 6aa217044b Implement wkdaynum("dayname") 2025-05-14 18:30:47 -04:00
Dianne Skoll c64d939237 Allow argument to monnum to be a string, in which case it's parsed as a month name. 2025-05-14 09:57:16 -04:00