Commit Graph

78 Commits

Author SHA1 Message Date
Dianne Skoll f852f7e7e5 Refactor conversion of "-" to "-stdin-" 2025-05-24 22:55:02 -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 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 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 436526c27d Fix -Wformat-security warnings. 2025-01-16 12:37:13 -05:00
Dianne Skoll c2ec4e9d29 Don't require any translation strings to include a trailing "\n" 2025-01-14 13:46:23 -05:00
Dianne Skoll 17ccf5d2b4 Make more messages translatable. 2025-01-14 11:27:47 -05:00
Dianne Skoll 562cec3dc8 Mass-update copyright date to 2025. 2024-12-29 13:47:07 -05:00
Dianne Skoll b8c4786b33 Allow INCLUDE/DO/SYSINCLUDE to take a QuotedString argument. This allows for filenames with spaces in them. 2024-12-13 10:38:34 -05:00
Dianne Skoll 5e333f6162 Add the SYSINCLUDE directive. 2024-12-13 08:18:22 -05:00
Dianne Skoll 356b562d75 Fix logic error in resetting IF flags and Popfile interaction. 2024-12-12 12:14:29 -05:00
Dianne Skoll d9796e72e5 Allow error messages to be localized. 2024-12-09 19:55:23 -05:00
Dianne Skoll 087fbfd8e6 If a path returned by glob is a directory, ignore it. 2024-12-06 20:18:45 -05:00
Dianne Skoll ff641d7990 Refuse to open directories. 2024-12-06 20:09:30 -05:00
Dianne Skoll d161a8ff1a Actually allow up to 9 levels of INCLUDE nesting.
Remind unit tests / tests (push) Successful in 42s
2024-11-30 23:03:09 -05:00
Dianne Skoll 533718b0a0 Massive whitespace cleanups: Untabify everything. 2024-11-08 20:30:13 -05:00
Dianne Skoll fa1033db6f Don't warn about assuming REM type if we've already warned about assuming "REM" 2024-08-21 15:09:41 -04:00
Dianne Skoll 7c86bc910a Better diagnostics of unmatched IFs 2024-06-05 09:08:04 -04:00
Dianne Skoll b454cf5b20 Refactor set_cloexec to make it more convenient to call. 2024-03-31 09:49:32 -04:00
Dianne Skoll 26977a4ac0 Fix a bunch of cppcheck complaints and also update the cppcheck Makefile target. 2024-03-11 12:10:03 -04:00
Dianne Skoll 0f782f7697 Set CLOEXEC flag on files we open.
When running programs in server mode, connect stdin and stdout to /dev/null
2024-02-29 09:22:15 -05:00
Dianne Skoll 72d10178bf Mass-update copyright year to 2024. 2023-12-31 12:05:03 -05:00
Dianne Skoll 2f196e3c9f Update copyright year. :) 2022-12-30 13:43:28 -05:00
Dianne Skoll 0cea410529 Add a bunch of: "SPDX-License-Identifier: GPL-2.0-only" comments. 2022-12-26 14:24:33 -05:00
Dianne Skoll 387125d983 Start fixing terminology: Julian becomes DSE
Remind's so-called "Julian" date is not a true Julian date.
It's really the number of days since the Remind Epoch, so rename
to DSE (Days Since Epoch)
2022-12-21 13:14:00 -05:00
Dianne Skoll aa5f9297b2 Add tests for handling world-writable dirs and files. 2022-12-20 10:38:28 -05:00
Dianne Skoll 8c4a7e766f Don't read world-writable directories 2022-12-20 10:26:47 -05:00
Dianne Skoll df9ef6e13a Print call stack if an error occurs in a user-defined function. 2022-03-25 14:03:06 -04:00
Dianne Skoll 4d17494371 Bump copyright date. 2022-03-14 21:12:20 -04:00
Dianne Skoll d6b4fdd6d3 Always clean up. 2022-01-20 20:10:39 -05:00
Dianne Skoll e637c20dee Don't try to do filedir() shenanigans for "DO /absolute/path" 2022-01-20 19:47:04 -05:00
Dianne Skoll e51d7f3c6d Add "DO file" command which is equivalent to "INCLUDE [filedir()]/file" 2022-01-20 19:30:10 -05:00
Dianne Skoll 0a1d0011f6 Add "-+username" option to trust "username" for the purpose of allowing RUN. 2021-10-05 12:04:44 -04:00
Dianne Skoll 4395e2f7ed Use "pclose" rather than "fclose" to close descriptors opened with "popen" 2021-09-05 11:45:55 -04:00
Dianne Skoll 3c9b5b786e Convert \n from continuation lines in INCLUDECMD to ' ' to make it a little friendlier. 2021-09-05 11:28:54 -04:00
Dianne Skoll 895ac6f0f7 Fix bugs in INCLUDECMD. Improve INCLUDECMD documentation. Add ! feature
If you use:

    INCLUDECMD !some_command

then RUN is disabled for the outptu of some_command.
2021-09-05 10:49:04 -04:00
Dianne Skoll 759ca0253e Strip leading spaces from arg to INCLUDECMD. 2021-09-05 10:05:18 -04:00
Dianne Skoll 0ca368c8d9 Parse arg to INCLUDECMD as a character string, not a sequence of tokens. 2021-09-05 10:02:59 -04:00
Dianne Skoll c65fd826a5 Use cached results of commands. 2021-09-04 23:25:37 -04:00
Dianne Skoll a163a0c446 Add INCLUDECMD command
Executes a shell command and reads the resulting output as a Remind script.
2021-09-04 23:00:03 -04:00
Dianne Skoll 34409f7a7d Update copyright year. 2021-04-02 10:43:54 -04:00
Dianne Skoll 4f6dcde980 Upper-case section references.
Prevent potential null pointer dereference.
2020-10-31 16:57:13 -04:00
Dianne Skoll fbbffb4672 Bump version to 3.1.18 and copyright year to 2020. 2019-12-30 11:15:00 -05:00
Dianne Skoll 52d252723f Depenguinization. 2018-11-04 10:56:47 -05:00
David F. Skoll 29c8475ea9 s/David/Dianne/ 2015-04-17 02:07:18 -04:00
David F. Skoll fc2d7ae446 Add support for __EOF__ to make Remind stop reading a file. 2014-05-22 14:19:06 -04:00
David F. Skoll 1e5b44d063 Make handling of continued lines same as in 3.1.8. 2010-04-25 10:07:12 -04:00
David F. Skoll 099ad9945d Fix huge bug in handling of continued lines. 2010-04-25 10:03:13 -04:00
David F. Skoll a1faa8d804 Finish up Purge Mode:
o Make it recognize constant expressions (yay!)
o Make it not add a blank line to end of *.purged files.
o Make it nuke #!P comments in the source files.
2010-04-21 09:02:25 -04:00
David F. Skoll d294e62be1 More work on purge mode. 2010-04-20 11:34:07 -04:00