aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2023-11-26Minor change.HEADmasterSergey Poznyakoff1
* src/cf.c (make_socket): Use getaddrinfo.
2023-06-02Add missing includeSergey Poznyakoff1
2023-06-02Switch to newer autotoolsSergey Poznyakoff4
2023-04-05Fix bug in handling of the "message" statementSergey Poznyakoff1
* src/rush.c (set_error_msg): Copy message text.
2023-01-22Update copyright yearsSergey Poznyakoff115
2022-07-16Version 2.3release-2.3Sergey Poznyakoff2
2022-07-13Pull latest wordsplitSergey Poznyakoff1
2022-07-13Bugfix in remoptSergey Poznyakoff1
* src/rush.c (remove_option): Make sure tail pointer never points past the terminating null character.
2022-01-17Improve previous commitSergey Poznyakoff1
2022-01-12Fix EOF check with flex >= 2.6.1Sergey Poznyakoff1
2022-01-02Version 2.2release-2.2Sergey Poznyakoff2
2022-01-02Update copyright yearSergey Poznyakoff115
2021-09-01Add missing includesSergey Poznyakoff2
2021-08-28transform: fix replacement of numbered pattern instanceSergey Poznyakoff2
* src/transform.c (_single_transform_name_to_slist): Avoid duplicating initial prefix if replace is not needed. * tests/transform.at: Add new testcases.
2021-04-07Pull wordsplitSergey Poznyakoff2
2021-02-16BugfixSergey Poznyakoff1
* src/rush.c: Expand argument to -X test
2021-02-16Implement file type and ownership testsSergey Poznyakoff12
* NEWS: Document changes. * configure.ac: Version 2.1.90. Raise autoconf and automake requirements. * doc/rush.texi: Document changes. * src/cfgram.y: New rule for file system tests. * src/cflex.l: New rule for the TEST token. * src/rush.c (groupmember): Change type of the first argument. (rush_access,eval_fstest): New functions. (test_eval): Process the test_fstest node type. * src/rush.h (test_fstest): New node type. (fstest_op): New enum. (test_node): New member: fstest * tests/.gitignore: Add mksock * tests/mksock.c: New file. * tests/fstest.at: New test. * tests/Makefile.am: Add new test. * tests/testsuite.at: Likewise.
2021-01-06Update copyright yearsSergey Poznyakoff114
2020-06-14Use wordsplit v1.1Sergey Poznyakoff1
2019-07-12Version 2.1release-2.1Sergey Poznyakoff2
2019-07-10Use wordsplit for a submoduleSergey Poznyakoff4
2019-07-01BugfixesSergey Poznyakoff4
* doc/rush.rc.5: Fix typo. * src/cfgram.y: Allow for multiple EOLs and comments after the preface statement. * src/cflex.l: \n produces a single EOL token * tests/regexp.at: Fix improper usage of literal user name in the expected string.
2019-07-01Version 2.0release-2.0Sergey Poznyakoff3
2019-06-30Minor fixSergey Poznyakoff7
* configure.ac: Version 1.9.91 * NEWS: Update. * src/cfgram.y: Fix calls to compile_transform_expr. * src/config.c: Likewise. * src/rush.c (die): Allow for fmt==NULL. (die_usage): New function. * src/rush.h (die_usage): New proto. (compile_transform_expr): Change signature. * src/transform.c (parse_transform_expr): Take struct cfloc * as an additional argument. Use it in diagnostics. (compile_transform_expr): Likewise.
2019-06-29Issue a notice when parsing a legacy configuration fileSergey Poznyakoff24
* NEWS: Document changes. * doc/rush.texi: Fix references to the legacy syntax docs. * src/config.c (cfparse_old): Issue a notice. * src/rush.c (vlogmsg): Discern between LOG_INFO and LOG_NOTICE. * tests/legacy/argc.at: Update stderr expectation. * tests/legacy/backref.at: Likewise. * tests/legacy/chdir.at: Likewise. * tests/legacy/command.at: Likewise. * tests/legacy/delete.at: Likewise. * tests/legacy/env.at: Likewise. * tests/legacy/error.at: Likewise. * tests/legacy/fallthrough.at: Likewise. * tests/legacy/gid.at: Likewise. * tests/legacy/interactive.at: Likewise. * tests/legacy/map.at: Likewise. * tests/legacy/match.at: Likewise. * tests/legacy/matchprog.at: Likewise. * tests/legacy/newgrp.at: Likewise. * tests/legacy/set.at: Likewise. * tests/legacy/setvar.at: Likewise. * tests/legacy/transform.at: Likewise. * tests/legacy/uid.at: Likewise. * tests/legacy/umask.at: Likewise. * tests/legacy/unsetvar.at: Likewise.
2019-06-29Finish the docsSergey Poznyakoff2
2019-06-27New transformation statements: insert and remoptSergey Poznyakoff12
* doc/rush.rc.5: Update (unfinished). * doc/rush.texi: Document the changes. * etc/rush.rc (svn): Rewrite the rule using insert and remopt. * src/cfgram.y: New statements: insert and remopt. * src/cflex.l: New keywords. * src/config.c (_parse_transform_ar,_parse_map_ar) (_parse_delete_ar,_parse_delete): Initialize node->target.v.arg.ins to 0. * src/rush.c (get_arg_no): Strict boundary checking. (rush_transform): Special handling for transform_remopt. Support argument insertions. * src/rush.h (transform_target.arg): Change type. (transform_remopt): New constant. (option_defn): New struct. (transform_node.v.remopt): New member. * tests/insert.at: New file. * tests/remopt.at: New file. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Include new tests.
2019-06-13Make sure user-defined variables are given preference over the environment ones.Sergey Poznyakoff3
The order of precedence is: (1) request variables, (2) user variables, (3) environment. * lib/wordsplit.c (wordsplit_find_env): Rewrite as wsplt_env_lookup (wsplt_env_getvar): New function. (expvar): Select preference of wsplt_env_lookup vs. wsplt_env_getvar depending on the value if WRDSO_GETVARPREF option. * lib/wordsplit.h (WRDSO_GETVARPREF): New option. * src/map.c (rush_expand_string): Set WRDSO_GETVARPREF option.
2019-06-13Propagate changes to the environment due to ${X=V} constructs.Sergey Poznyakoff10
* doc/rush.texi: Document the evalenv statement. * lib/wordsplit.c (_wsplt_store_errctx): Fix typo in the error message. (wsplt_assign_var): Fix a +1 offset of the ws_envidx field. * src/cfgram.y: New rule for the evalenv statement. * src/cflex.l: Likewise. * src/map.c (find_user_varptr): New function. (rush_getvarptr): Use find_user_varptr. (getvar): Try user-defined variables if no request variable matched. Environment variables are handled by wordsplit itself. (rush_expand_string): Pass environment to wordsplit. Propagate changes back to req->env and req->var_kv. * src/rush.c (envar_eval): New case. * src/rush.h (envar_eval): New constant. * tests/Makefile.am: Add new test. * tests/testsuite.at: Add new test. * tests/evalenv.at: New test.
2019-06-06Minor fix in wordsplit (pull from grecs a0c096190f)Sergey Poznyakoff1
2019-06-03Minor fixSergey Poznyakoff2
* lib/librush.h (wildmatch): Both string arguments are constant. * lib/wildmatch.c: Likewise.
2019-06-01BugfixSergey Poznyakoff1
* lib/wildmatch.c (wilder_match): Fix processing of Kleene star.
2019-05-31Fix typoSergey Poznyakoff1
2019-05-21Accept wildcards as arguments to keepenv and unsetenv commands.Sergey Poznyakoff10
* lib/wildmatch.c: New source. * lib/Makefile.am: Add wildmatch.c * lib/librush.h (wildmatch): New proto. * src/cfgram.y (asgn_list): Accept quoted strings. (unset_envar): New function. (env_setup): Call unset_envar. * tests/keepenv.at: Test new features. * tests/unsetenv.at: Likewise. * doc/rush.8: Update. * doc/rush.rc.5: Start rewriting. * doc/rush.texi: Update.
2019-05-16Synch with grecs 1fa2dd2cSergey Poznyakoff1
2019-05-15Rename "member" test to "group"Sergey Poznyakoff6
2019-05-15BugixesSergey Poznyakoff3
* doc/rush.texi: Revise the docs. * etc/rush.rc: Fix typo. * src/cf.c (glattrib_debug): Don't override the value set from the command line.
2019-05-15Report names of undefined variablesSergey Poznyakoff6
* lib/wordsplit.c: Import from grecs 20899f65 * lib/wordsplit.h: Likewise. * src/map.c (rush_ws_error): New function. (rush_expand_string): Set ws.ws_error. Use error context when reporting WRDSE_UNDEF. * src/rush.c (main): Use reparse_cmdline. * src/rush.h (rush_ws_error): New proto. * tests/undef.at: Update.
2019-05-15Refuse to set or unset read-only request variables.Sergey Poznyakoff10
Among the request variables, only $program, $command, and positional variables can be changed. Neither $program nor $command can be unset. Unsetting a positional variable has the same effect as deleting it. * doc/rush.texi: Improve docs. * src/cf.h (new_rush_rule): Change signature. * src/cfgram.y: Refuse to modify read-only variables. New statement: unset [N] (equivalent to "delete N") * src/config.c (parse_input_buf): Rule tag generation is handled by new_rush_rule now. * src/map.c (vardef): New field: target. (rush_variable_target): New function. (rush_request_getvar): Removed. (rush_getvarptr): New function to use instead of it. * src/rush.c (rush_transform): Use rush_getvarptr * src/rush.h (target_readonly): New target type. (rush_request_getvar): Remove proto. (rush_getvarptr) (rush_variable_target): New proto. * tests/delete.at: Reflect the changes. * tests/setvar.at: Likewise. * tests/unsetvar.at: Likewise.
2019-05-14Import wordsplit from grecs 1658f568Sergey Poznyakoff8
* doc/rush.texi: Document $# * lib/wordsplit.c: Update. * lib/wordsplit.h: Update. * src/cflex.l: Handle $#, $@, and $* as one word. * src/config.c (_parse_argc): Translate to $# * src/map.c (var_argc): Remove. (request_vars): Remove argc. * tests/argc.at: Use $# instead of $argc * tests/compound.at: Likewise.
2019-05-14Import wordsplit from grecs 8652a500Sergey Poznyakoff4
This fixes handling of variable and command references in the request command line.
2019-05-14docs: spell checkingSergey Poznyakoff1
2019-05-13Convert example configuration to the new formatSergey Poznyakoff1
2019-05-13Add support for ${-N} argument referencesSergey Poznyakoff6
* lib/wordsplit.c (ISPOSBEG): New define. (expvar): Support for ${-N} notation. * src/cflex.l: Support for ${-N} notation. * tests/matcharg.at: Test ${N} and ${-N} notations.
2019-05-12Rewrite rush.texi (initial draft)Sergey Poznyakoff1
2019-05-12Improve the "member" conditionSergey Poznyakoff1
* src/cfgram.y: "member" condition can take one argument.
2019-05-10Improve scannerSergey Poznyakoff10
* src/cf.c (cfstream_open_stdin): New function. (cfstream_avail): Use eof field. * src/cf.h (CFSTREAM): New field: eof. (cfstream_open_stdin,cflex_test,dumpstr): New proto. * src/cflex.l: Don't expand escapes within ${V:-""} construct. Keep track of locations when returning single-character tokens. (cflex_test): New function. * src/dump.c (dumpstr): New function. * src/map.c (rush_expand_string): Retain backslash in invalid escape sequences. * src/rush.c: Implement scanner test mode. * src/rushopt.opt (-T): New option. * tests/lex.at: New test. * tests/Makefile.am: Add new test. * tests/testsuite.at: Add new test.
2019-05-09Update rush-po to support both versions of the configuration file.Sergey Poznyakoff1
2019-05-08Fixes in scannerSergey Poznyakoff1
* src/cflex.l: Merge INMATCH and ARGS. Generalize rule for unquoted strings. Use stringbuf_add_escape_octal and stringbuf_add_escape_hex (complements dc4dcf015f24).
2019-05-08New comparison operator !~Sergey Poznyakoff3
* src/cfgram.y: New production. * src/cflex.l: Handle !~ * tests/regexp.at: Add new test.

Return to:

Send suggestions and report system problems to the System administrator.