Age | Commit message (Collapse) | Author | Files |
|
* src/cf.c (make_socket): Use getaddrinfo.
|
|
|
|
|
|
* src/rush.c (set_error_msg): Copy message text.
|
|
|
|
|
|
|
|
* src/rush.c (remove_option): Make sure tail pointer never points
past the terminating null character.
|
|
|
|
|
|
|
|
|
|
|
|
* src/transform.c (_single_transform_name_to_slist): Avoid duplicating
initial prefix if replace is not needed.
* tests/transform.at: Add new testcases.
|
|
|
|
* src/rush.c: Expand argument to -X test
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
* 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.
|
|
|
|
* 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.
|
|
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.
|
|
* 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.
|
|
|
|
* lib/librush.h (wildmatch): Both string arguments are constant.
* lib/wildmatch.c: Likewise.
|
|
* lib/wildmatch.c (wilder_match): Fix processing of Kleene star.
|
|
|
|
* 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.
|
|
|
|
|
|
* 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.
|
|
* 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.
|
|
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.
|
|
* 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.
|
|
This fixes handling of variable and command references in the request
command line.
|
|
|
|
|
|
* 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.
|
|
|
|
* src/cfgram.y: "member" condition can take one argument.
|
|
* 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.
|
|
|
|
* src/cflex.l: Merge INMATCH and ARGS.
Generalize rule for unquoted strings.
Use stringbuf_add_escape_octal and
stringbuf_add_escape_hex (complements dc4dcf015f24).
|
|
* src/cfgram.y: New production.
* src/cflex.l: Handle !~
* tests/regexp.at: Add new test.
|