Commit Graph

1158 Commits

Author SHA1 Message Date
Dianne Skoll cef6e6717c Convert C++-style comments to C-style comments. 2025-03-24 11:42:54 -04:00
Dianne Skoll b9f09b9a2d Fix some cppcheck warnings. 2025-03-23 13:24:38 -04:00
Dianne Skoll ed15b7deb5 Update JSON parser to latest version from https://github.com/udp/json-parser 2025-03-22 12:09:30 -04:00
Dianne Skoll c004944a59 Replace '1440' with 'MINUTES_PER_DAY' in a bunch of spots. 2025-03-20 17:20:25 -04:00
Dianne Skoll deda94a69e Comment and code cleanups. 2025-03-19 18:08:28 -04:00
Dianne Skoll 3d8f0e3907 Code cleanup; fix astro example. 2025-03-19 12:35:51 -04:00
Dianne Skoll 160f85a1f8 Fix %2 and %@ formatters to print "12:XXam" instead of "0:XXam" 2025-03-19 12:35:25 -04:00
Dianne Skoll 190dfa3a8f Add moonrisedir and moonsetdir functions. 2025-03-19 11:57:01 -04:00
Dianne Skoll a22c674846 Add moonrise and moonset functions. 2025-03-19 11:45:34 -04:00
Dianne Skoll ba224445b1 Allocate 256 expr_nodes in a chunk instead of 64. 2025-03-16 10:55:42 -04:00
Dianne Skoll 6aeee47bfa Remove unused code. 2025-03-16 10:47:54 -04:00
Dianne Skoll c506fa4613 Refactor code. 2025-03-13 23:51:22 -04:00
Dianne Skoll 04404a252e Remove check for '%' in parse_atom. 2025-03-13 23:45:21 -04:00
Dianne Skoll be746f9fa7 Print placeholder args when printing error message for user function invoked with incorrect number of arguments. 2025-03-13 23:33:19 -04:00
Dianne Skoll 4b905dbc02 Set LC_ALL and LANG right before sort. 2025-03-08 23:09:30 -05:00
Dianne Skoll 0f76750e05 Set locale for sorting. 2025-03-08 23:04:38 -05:00
Dianne Skoll 917d943953 Avoid memory leak. 2025-03-01 12:01:15 -05:00
Dianne Skoll 471ecff267 Report both starting and ending lines for commands spanning multiple lines because of \-line continuation.
This affects error and warning messages primarily.  The JSON
interchange format has an additional lineno_start entry for
reminders that span multiple lines.  (Historically, lineno
was the *last* line of the reminder statement and I kept
that for compatibility.)
2025-02-16 20:30:16 -05:00
Dianne Skoll 5acbb907b4 Issue warning if a substitution sequence related to time is used without an AT clause.
Remind unit tests / tests (push) Successful in 31s
2025-02-10 09:23:43 -05:00
Dianne Skoll b37a7cd993 Revert change to how -y generates tags.
Remind unit tests / tests (push) Successful in 48s
Commit e7ec975ff0 changed how the
MD5 sum was calculated to include the filename and line number.

This commit reverts that change; the tag is generated purely
on the REM command line.
2025-02-08 22:25:09 -05:00
Dianne Skoll 9c93e7e6a1 Better error message.
Remind unit tests / tests (push) Successful in 1m17s
2025-02-03 23:09:17 -05:00
Dianne Skoll 1641f99f97 Include the "info" element in pop-up reminders. 2025-02-01 15:02:54 -05:00
Dianne Skoll f9f9552850 Avoid segfault if we call dosubst("%<foo>") 2025-02-01 14:50:49 -05:00
Dianne Skoll 3b43222585 Add the triginfo("header") function and corresponding %<...> substitution sequence. 2025-02-01 14:39:06 -05:00
Dianne Skoll 231d9d77e7 Save the info chain when saving the last trigger. 2025-02-01 14:16:17 -05:00
Dianne Skoll 6140221bf3 Make a function static. 2025-02-01 11:15:52 -05:00
Dianne Skoll 51b831fb6a Check for proper escaping in JSON and TRANSLATE DUMP. 2025-02-01 11:15:25 -05:00
Dianne Skoll 0ebaaa4097 Add optional add_quote argument to escape() 2025-02-01 10:58:55 -05:00
Dianne Skoll 694c4099d1 Add \xAA sequence for parsing quoted strings; add the escape() built-in function; update docs. 2025-02-01 10:36:38 -05:00
Dianne Skoll ca56b4c90e Disallow "\x00" 2025-02-01 10:12:51 -05:00
Dianne Skoll 5c965e2083 Add "\xAB" escapes to string parser.
\x followed by one or two hex digits gets converted to that character.
2025-02-01 10:08:12 -05:00
Dianne Skoll e7ec975ff0 Support location and description fields in tkremind. 2025-01-31 16:30:07 -05:00
Dianne Skoll 8c4ca12ca7 When creating the "info" JSON hash, make the keys lower-case instead of upper-case.
Remind unit tests / tests (push) Successful in 46s
2025-01-31 08:07:53 -05:00
Dianne Skoll e832eb868c Make INFO require "Header: Value" strings; make the "info" element in the JSON output a hash instead of an array.
Remind unit tests / tests (push) Successful in 36s
2025-01-30 16:58:56 -05:00
Dianne Skoll e6ceeee2ec Add the "INFO" clause to the REM command.
Remind unit tests / tests (push) Successful in 33s
Intended to pass additional information to a back-end to use as it wishes.
One example is to add extra info such as locaiton, description, etc. to ical
files.
2025-01-28 15:51:28 -05:00
Dianne Skoll bbeece644e Use "custom.h" rather than <custom.h> for our header file. 2025-01-24 08:10:06 -05:00
Dianne Skoll 8d09abc363 Use snprintf in favor of sprintf almost everywhere.
Remind unit tests / tests (push) Successful in 35s
2025-01-22 11:11:08 -05:00
Dianne Skoll 124c5c4e7e Make test mode warning more verbose.
Remind unit tests / tests (push) Successful in 35s
2025-01-21 11:54:24 -05:00
Dianne Skoll 77024562b3 Fix SystemDate to always return 2025-01-06 in --test mode.
Remind unit tests / tests (push) Successful in 38s
2025-01-21 11:52:20 -05:00
Dianne Skoll 35c33ae915 Prevent infinite test loop. 2025-01-21 11:48:56 -05:00
Dianne Skoll 901831ff75 Add --test long option to make the test suite repeatable.
Remind unit tests / tests (push) Failing after 3h14m50s
2025-01-20 13:33:00 -05:00
Dianne Skoll ffba7fcb03 Make queue tests work at any time of the day.
Remind unit tests / tests (push) Successful in 33s
If the REMIND_RUNNING_TEST environment variable is set to 1, then
SystemTime adjusts times near midnight so the queue tests pass.

Remind prints a warning if it is set so you don't accidentally
set it in normal use.
2025-01-20 10:15:19 -05:00
Dianne Skoll 6f11e727f8 Truncate any absurdly-long translations of "am" or "pm" rather than letting a buffer overflow. 2025-01-19 22:01:45 -05:00
Dianne Skoll 447bda5c91 Warn if given a bad debug flag. 2025-01-17 10:22:22 -05:00
Dianne Skoll 4f351c089e Add the "-dq" debugging flag, for outputing TRANSLATE commands needed by a reminder script.
Remind unit tests / tests (push) Successful in 44s
2025-01-17 08:46:29 -05:00
Dianne Skoll 8d0743dd3e Don't allow a translation entry if printf-style formatters differ. 2025-01-16 12:53:23 -05:00
Dianne Skoll 436526c27d Fix -Wformat-security warnings. 2025-01-16 12:37:13 -05:00
Dianne Skoll 4f79b0d42a Remove leading space from translatable. 2025-01-15 11:02:06 -05:00
Dianne Skoll c96f9f21ed Properly print already-translated TRANS-type system variables in TRANSLATE GENERATE output.
Remind unit tests / tests (push) Successful in 36s
2025-01-14 15:02:08 -05:00
Dianne Skoll dc192f2a69 Final good version of TRANSLATE GENERATE. 2025-01-14 14:59:01 -05:00