aboutsummaryrefslogtreecommitdiff
path: root/generated
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-01-12 12:46:16 -0800
committerElliott Hughes <enh@google.com>2019-01-12 12:46:45 -0800
commitf3d78baf22de5bec9e889e2a77557e6235148ea2 (patch)
tree2222b528aec3bc5236402c482a73868c3d237456 /generated
parent73a2fe2f78af20859d22da89faaa3e27fec5a178 (diff)
parentbf76b49e295bfa945e79666371e3dd127bc82708 (diff)
downloadtoybox-f3d78baf22de5bec9e889e2a77557e6235148ea2.tar.gz
Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ib829ec0ae0c1bf35142dbf2cff8ff6daddeab71d
Diffstat (limited to 'generated')
-rw-r--r--generated/flags.h26
-rw-r--r--generated/globals.h1
-rw-r--r--generated/help.h4
-rw-r--r--generated/newtoys.h4
4 files changed, 19 insertions, 16 deletions
diff --git a/generated/flags.h b/generated/flags.h
index 002c5630..34c31ccd 100644
--- a/generated/flags.h
+++ b/generated/flags.h
@@ -2342,12 +2342,13 @@
#undef FOR_runcon
#endif
-// sed (help)(version)e*f*i:;nEr[+Er] (help)(version)e*f*i:;nEr[+Er]
+// sed (help)(version)e*f*i:;nErz(null-data)[+Er] (help)(version)e*f*i:;nErz(null-data)[+Er]
#undef OPTSTR_sed
-#define OPTSTR_sed "(help)(version)e*f*i:;nEr[+Er]"
+#define OPTSTR_sed "(help)(version)e*f*i:;nErz(null-data)[+Er]"
#ifdef CLEANUP_sed
#undef CLEANUP_sed
#undef FOR_sed
+#undef FLAG_z
#undef FLAG_r
#undef FLAG_E
#undef FLAG_n
@@ -2532,9 +2533,9 @@
#undef FOR_start
#endif
-// stat <1c:fLt <1c:fLt
+// stat <1c:(format)fLt <1c:(format)fLt
#undef OPTSTR_stat
-#define OPTSTR_stat "<1c:fLt"
+#define OPTSTR_stat "<1c:(format)fLt"
#ifdef CLEANUP_stat
#undef CLEANUP_stat
#undef FOR_stat
@@ -5258,14 +5259,15 @@
#ifndef TT
#define TT this.sed
#endif
-#define FLAG_r (1<<0)
-#define FLAG_E (1<<1)
-#define FLAG_n (1<<2)
-#define FLAG_i (1<<3)
-#define FLAG_f (1<<4)
-#define FLAG_e (1<<5)
-#define FLAG_version (1<<6)
-#define FLAG_help (1<<7)
+#define FLAG_z (1<<0)
+#define FLAG_r (1<<1)
+#define FLAG_E (1<<2)
+#define FLAG_n (1<<3)
+#define FLAG_i (1<<4)
+#define FLAG_f (1<<5)
+#define FLAG_e (1<<6)
+#define FLAG_version (1<<7)
+#define FLAG_help (1<<8)
#endif
#ifdef FOR_sendevent
diff --git a/generated/globals.h b/generated/globals.h
index 1188d805..dd3ce2bc 100644
--- a/generated/globals.h
+++ b/generated/globals.h
@@ -1241,6 +1241,7 @@ struct sed_data {
long nextlen, rememberlen, count;
int fdout, noeol;
unsigned xx;
+ char delim;
};
// toys/posix/sort.c
diff --git a/generated/help.h b/generated/help.h
index 815fd246..692a1d4a 100644
--- a/generated/help.h
+++ b/generated/help.h
@@ -480,7 +480,7 @@
#define HELP_sleep "usage: sleep LENGTH\n\nWait before exiting. An optional suffix can be \"m\" (minutes), \"h\" (hours),\n\"d\" (days), or \"s\" (seconds, the default).\n\n\n"
-#define HELP_sed "usage: sed [-inrE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e Add SCRIPT to list\n-f Add contents of SCRIPT_FILE to list\n-i Edit each file in place (-iEXT keeps backup file with extension EXT)\n-n No default output (use the p command to output matched lines)\n-r Use extended regular expression syntax\n-E Alias for -r\n-s Treat input files separately (implied by -i)\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n [ADDRESS[,ADDRESS]]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimeter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n { Start a new command block, continuing until a corresponding \"}\".\n Command blocks may nest. If the block has an address, commands within\n the block are only run for lines within the block's address range.\n\n } End command block (this command cannot have an address)\n\n d Delete this line and move on to the next one\n (ignores remaining COMMANDs)\n\n D Delete one line of input and restart command SCRIPT (same as \"d\"\n unless you've glued lines together with \"N\" or similar)\n\n g Get remembered line (overwriting current line)\n\n G Get remembered line (appending to current line)\n\n h Remember this line (overwriting remembered line)\n\n H Remember this line (appending to remembered line, if any)\n\n l Print line, escaping \\abfrtv (but not newline), octal escaping other\n nonprintable characters, wrapping lines to terminal width with a\n backslash, and appending $ to actual end of line.\n\n n Print default output and read next line, replacing current line\n (If no next line available, quit processing script)\n\n N Append next line of input to this line, separated by a newline\n (This advances the line counter for address matching and \"=\", if no\n next line available quit processing script without default output)\n\n p Print this line\n\n P Print this line up to first newline (from \"N\")\n\n q Quit (print default output, no more commands processed or lines read)\n\n x Exchange this line with remembered line (overwrite in both directions)\n\n = Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n a [text] Append text to output before attempting to read next line\n\n b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n c [text] Delete line, output text at end of matching address range\n (ignores remaining COMMANDs)\n\n i [text] Print text\n\n r [file] Append contents of file to output before attempting to read\n next line.\n\n s/S/R/F Search for regex S, replace matched text with R using flags F.\n The first character after the \"s\" (anything but newline or\n backslash) is the delimiter, escape with \\ to use normally.\n\n The replacement text may contain \"&\" to substitute the matched\n text (escape it with backslash for a literal &), or \\1 through\n \\9 to substitute a parenthetical subexpression in the regex.\n You can also use the normal backslash escapes such as \\n and\n a backslash at the end of the line appends the next line.\n\n The flags are:\n\n [0-9] A number, substitute only that occurrence of pattern\n g Global, substitute all occurrences of pattern\n i Ignore case when matching\n p Print the line if match was found and replaced\n w [file] Write (append) line to file if match replaced\n\n t [label] Test, jump to :label only if an \"s\" command found a match in\n this line since last test (replacing with same text counts)\n\n T [label] Test false, jump only if \"s\" hasn't found a match.\n\n w [file] Write (append) line to file\n\n y/old/new/ Change each character in 'old' to corresponding character\n in 'new' (with standard backslash escapes, delimiter can be\n any repeated character except \\ or \\n)\n\n : [label] Labeled target for jump commands\n\n # Comment, ignore rest of this line of SCRIPT\n\nDeviations from posix: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, printf escapes in text, line\ncontinuations, semicolons after all commands, 2-address anywhere an\naddress is allowed, \"T\" command, multiline continuations for [abc],\n\\; to end [abc] argument before end of line.\n\n"
+#define HELP_sed "usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e Add SCRIPT to list\n-f Add contents of SCRIPT_FILE to list\n-i Edit each file in place (-iEXT keeps backup file with extension EXT)\n-n No default output (use the p command to output matched lines)\n-r Use extended regular expression syntax\n-E POSIX alias for -r\n-s Treat input files separately (implied by -i)\n-z Use \\0 rather than \\n as the input line separator\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n [ADDRESS[,ADDRESS]]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimeter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n { Start a new command block, continuing until a corresponding \"}\".\n Command blocks may nest. If the block has an address, commands within\n the block are only run for lines within the block's address range.\n\n } End command block (this command cannot have an address)\n\n d Delete this line and move on to the next one\n (ignores remaining COMMANDs)\n\n D Delete one line of input and restart command SCRIPT (same as \"d\"\n unless you've glued lines together with \"N\" or similar)\n\n g Get remembered line (overwriting current line)\n\n G Get remembered line (appending to current line)\n\n h Remember this line (overwriting remembered line)\n\n H Remember this line (appending to remembered line, if any)\n\n l Print line, escaping \\abfrtv (but not newline), octal escaping other\n nonprintable characters, wrapping lines to terminal width with a\n backslash, and appending $ to actual end of line.\n\n n Print default output and read next line, replacing current line\n (If no next line available, quit processing script)\n\n N Append next line of input to this line, separated by a newline\n (This advances the line counter for address matching and \"=\", if no\n next line available quit processing script without default output)\n\n p Print this line\n\n P Print this line up to first newline (from \"N\")\n\n q Quit (print default output, no more commands processed or lines read)\n\n x Exchange this line with remembered line (overwrite in both directions)\n\n = Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n a [text] Append text to output before attempting to read next line\n\n b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n c [text] Delete line, output text at end of matching address range\n (ignores remaining COMMANDs)\n\n i [text] Print text\n\n r [file] Append contents of file to output before attempting to read\n next line.\n\n s/S/R/F Search for regex S, replace matched text with R using flags F.\n The first character after the \"s\" (anything but newline or\n backslash) is the delimiter, escape with \\ to use normally.\n\n The replacement text may contain \"&\" to substitute the matched\n text (escape it with backslash for a literal &), or \\1 through\n \\9 to substitute a parenthetical subexpression in the regex.\n You can also use the normal backslash escapes such as \\n and\n a backslash at the end of the line appends the next line.\n\n The flags are:\n\n [0-9] A number, substitute only that occurrence of pattern\n g Global, substitute all occurrences of pattern\n i Ignore case when matching\n p Print the line if match was found and replaced\n w [file] Write (append) line to file if match replaced\n\n t [label] Test, jump to :label only if an \"s\" command found a match in\n this line since last test (replacing with same text counts)\n\n T [label] Test false, jump only if \"s\" hasn't found a match.\n\n w [file] Write (append) line to file\n\n y/old/new/ Change each character in 'old' to corresponding character\n in 'new' (with standard backslash escapes, delimiter can be\n any repeated character except \\ or \\n)\n\n : [label] Labeled target for jump commands\n\n # Comment, ignore rest of this line of SCRIPT\n\nDeviations from POSIX: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, NUL-separated input with -z,\nprintf escapes in text, line continuations, semicolons after all commands,\n2-address anywhere an address is allowed, \"T\" command, multiline\ncontinuations for [abc], \\; to end [abc] argument before end of line.\n\n"
#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path\n\n"
@@ -502,7 +502,7 @@
#define HELP_printf "usage: printf FORMAT [ARGUMENT...]\n\nFormat and print ARGUMENT(s) according to FORMAT, using C printf syntax\n(% escapes for cdeEfgGiosuxX, \\ escapes for abefnrtv0 or \\OCTAL or \\xHEX).\n\n"
-#define HELP_patch "usage: patch [-d DIR] [-i file] [-p depth] [-Rlu] [--dry-run]\n\nApply a unified diff to one or more files.\n\n-d Modify files in DIR\n-i Input file (defaults=stdin)\n-l Loose match (ignore whitespace)\n-p Number of '/' to strip from start of file paths (default=all)\n-R Reverse patch\n-s Silent except for errors\n-u Ignored (only handles \"unified\" diffs)\n--dry-run Don't change files, just confirm patch applies\n\nThis version of patch only handles unified diffs, and only modifies\na file when all all hunks to that file apply. Patch prints failed\nhunks to stderr, and exits with nonzero status if any hunks fail.\n\nA file compared against /dev/null (or with a date <= the epoch) is\ncreated/deleted as appropriate.\n\n"
+#define HELP_patch "usage: patch [-d DIR] [-i file] [-p depth] [-Rlsu] [--dry-run]\n\nApply a unified diff to one or more files.\n\n-d Modify files in DIR\n-i Input file (default=stdin)\n-l Loose match (ignore whitespace)\n-p Number of '/' to strip from start of file paths (default=all)\n-R Reverse patch\n-s Silent except for errors\n-u Ignored (only handles \"unified\" diffs)\n--dry-run Don't change files, just confirm patch applies\n\nThis version of patch only handles unified diffs, and only modifies\na file when all hunks to that file apply. Patch prints failed hunks\nto stderr, and exits with nonzero status if any hunks fail.\n\nA file compared against /dev/null (or with a date <= the epoch) is\ncreated/deleted as appropriate.\n\n"
#define HELP_paste "usage: paste [-s] [-d DELIMITERS] [FILE...]\n\nMerge corresponding lines from each input file.\n\n-d List of delimiter characters to separate fields with (default is \\t)\n-s Sequential mode: turn each input file into one line of output\n\n"
diff --git a/generated/newtoys.h b/generated/newtoys.h
index ff41c1de..ed8e004f 100644
--- a/generated/newtoys.h
+++ b/generated/newtoys.h
@@ -208,7 +208,7 @@ USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN))
USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN))
USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN))
-USE_SED(NEWTOY(sed, "(help)(version)e*f*i:;nEr[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP))
+USE_SED(NEWTOY(sed, "(help)(version)e*f*i:;nErz(null-data)[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP))
USE_SENDEVENT(NEWTOY(sendevent, "<4>4", TOYFLAG_USR|TOYFLAG_SBIN))
USE_SEQ(NEWTOY(seq, "<1>3?f:s:w[!fw]", TOYFLAG_USR|TOYFLAG_BIN))
USE_SETENFORCE(NEWTOY(setenforce, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN))
@@ -228,7 +228,7 @@ USE_SLEEP(NEWTOY(sleep, "<1", TOYFLAG_BIN))
USE_SORT(NEWTOY(sort, USE_SORT_FLOAT("g")"S:T:m" "o:k*t:" "xVbMcszdfirun", TOYFLAG_USR|TOYFLAG_BIN))
USE_SPLIT(NEWTOY(split, ">2a#<1=2>9b#<1l#<1[!bl]", TOYFLAG_USR|TOYFLAG_BIN))
USE_START(NEWTOY(start, "", TOYFLAG_USR|TOYFLAG_SBIN))
-USE_STAT(NEWTOY(stat, "<1c:fLt", TOYFLAG_BIN))
+USE_STAT(NEWTOY(stat, "<1c:(format)fLt", TOYFLAG_BIN))
USE_STOP(NEWTOY(stop, "", TOYFLAG_USR|TOYFLAG_SBIN))
USE_STRINGS(NEWTOY(strings, "t:an#=4<1fo", TOYFLAG_USR|TOYFLAG_BIN))
USE_STTY(NEWTOY(stty, "?aF:g[!ag]", TOYFLAG_BIN))