diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-07-31 17:41:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-07-31 17:41:34 -0700 |
commit | b38e34fdec127166ac1e4a3db47c07c53959c677 (patch) | |
tree | 03670c51ae5596480ee3480c8309ee2d67def4e9 /txr.c | |
parent | 0b38bc996c4c7e2693931bbd5103c7772b56b4bd (diff) | |
download | txr-b38e34fdec127166ac1e4a3db47c07c53959c677.tar.gz txr-b38e34fdec127166ac1e4a3db47c07c53959c677.tar.bz2 txr-b38e34fdec127166ac1e4a3db47c07c53959c677.zip |
txr-016 2009-10-16txr-016
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -39,7 +39,7 @@ #include "match.h" #include "txr.h" -const char *version = "015"; +const char *version = "016"; const char *progname = "txr"; const char *spec_file = "stdin"; obj_t *spec_file_str; @@ -69,10 +69,12 @@ void help(void) " %s [ options ] query-file { data-file }*\n" "\n" "The query-file or data-file arguments may be specified as -, in which case\n" -"standard input is used. If these arguments end with a | character, then\n" -"they are treated as command pipes. Leading arguments which begin with a -\n" -"followed by one or more characters, and which are not arguments to options\n" -"are interpreted as options. The -- option indicates the end of the options.\n" +"standard input is used. All data-file arguments which begin with a !\n" +"character are treated as command pipes. Those which begin with a $\n" +"are interpreted as directories to read. Leading arguments which begin\n" +"with a - followed by one or more characters, and which are not arguments to\n" +"options are interpreted as options. The -- option indicates the end of the\n" +"options.\n" "\n" "If no data-file arguments sare supplied, then the query itself must open a\n" "a data source prior to attempting to make any pattern match, or it will\n" @@ -89,8 +91,9 @@ void help(void) "-a num Generate array variables up to num-dimensions.\n" " Default is 1. Additional dimensions are fudged\n" " by generating numeric suffixes\n" -"-f query Specify the query text as an argument.\n" -" The query-file argument is omitted in this case.\n" +"-c query-text The query is read from the query-text argument\n" +" itself. The query-file argument is omitted in\n" +" this case; the first argument is a data file.\n" "--help You already know!\n" "--version Display program version\n" "\n" @@ -211,7 +214,7 @@ int main(int argc, char **argv) return 0; } - if (!strcmp(*argv, "-a") || !strcmp(*argv, "-f")) { + if (!strcmp(*argv, "-a") || !strcmp(*argv, "-c")) { long val; char *errp; char opt = (*argv)[1]; @@ -235,7 +238,7 @@ int main(int argc, char **argv) opt_arraydims = val; break; - case 'f': + case 'c': specstring = string(strdup(*argv)); break; } @@ -264,7 +267,7 @@ int main(int argc, char **argv) opt_nobindings = 1; break; case 'a': - case 'f': + case 'c': case 'D': fprintf(stderr, "%s: option -%c does not clump\n", progname, *popt); return EXIT_FAILURE; |