aboutsummaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-01-21 10:48:00 -0800
committerElliott Hughes <enh@google.com>2020-01-21 10:49:30 -0800
commit5304200444657a2747a40369b809a80b4338b020 (patch)
treef5e4d121fade8491f6cf09be8984faae9d2a0666 /android
parentf3f88ad0dcdf9ff633a7d46f18d345b0753509a0 (diff)
parent3f715ff0c7d29c54a775ea8158e4884eee5c8790 (diff)
downloadtoybox-5304200444657a2747a40369b809a80b4338b020.tar.gz
Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: I2e48baf03afa3480b165491bc67966a408c04e0e
Diffstat (limited to 'android')
-rw-r--r--android/device/generated/flags.h6
-rw-r--r--android/device/generated/globals.h23
-rw-r--r--android/device/generated/help.h6
-rw-r--r--android/device/generated/newtoys.h2
-rw-r--r--android/linux/generated/flags.h6
-rw-r--r--android/linux/generated/globals.h23
-rw-r--r--android/linux/generated/help.h6
-rw-r--r--android/linux/generated/newtoys.h2
-rw-r--r--android/mac/generated/flags.h6
-rw-r--r--android/mac/generated/globals.h23
-rw-r--r--android/mac/generated/help.h6
-rw-r--r--android/mac/generated/newtoys.h2
12 files changed, 93 insertions, 18 deletions
diff --git a/android/device/generated/flags.h b/android/device/generated/flags.h
index e7a49da0..df64f1c4 100644
--- a/android/device/generated/flags.h
+++ b/android/device/generated/flags.h
@@ -176,12 +176,13 @@
#undef FOR_bzcat
#endif
-// cal >2 >2
+// cal >2h >2h
#undef OPTSTR_cal
-#define OPTSTR_cal ">2"
+#define OPTSTR_cal ">2h"
#ifdef CLEANUP_cal
#undef CLEANUP_cal
#undef FOR_cal
+#undef FLAG_h
#endif
// cat uvte uvte
@@ -3560,6 +3561,7 @@
#ifndef TT
#define TT this.cal
#endif
+#define FLAG_h (1<<0)
#endif
#ifdef FOR_cat
diff --git a/android/device/generated/globals.h b/android/device/generated/globals.h
index f266685a..de606809 100644
--- a/android/device/generated/globals.h
+++ b/android/device/generated/globals.h
@@ -989,6 +989,22 @@ struct vi_data {
char *last_search;
int tabstop;
int list;
+ struct str_line {
+ int alloc;
+ int len;
+ char *data;
+ } *il;
+ struct linelist {
+ struct linelist *up;//next
+ struct linelist *down;//prev
+ struct str_line *line;
+ } *text, *screen, *c_r;
+ //yank buffer
+ struct yank_buf {
+ char reg;
+ int alloc;
+ char* data;
+ } yank;
};
// toys/pending/wget.c
@@ -1003,6 +1019,12 @@ struct basename_data {
char *s;
};
+// toys/posix/cal.c
+
+struct cal_data {
+ struct tm *now;
+};
+
// toys/posix/chgrp.c
struct chgrp_data {
@@ -1547,6 +1569,7 @@ extern union global_union {
struct vi_data vi;
struct wget_data wget;
struct basename_data basename;
+ struct cal_data cal;
struct chgrp_data chgrp;
struct chmod_data chmod;
struct cksum_data cksum;
diff --git a/android/device/generated/help.h b/android/device/generated/help.h
index 60aad721..a53e10c9 100644
--- a/android/device/generated/help.h
+++ b/android/device/generated/help.h
@@ -234,9 +234,9 @@
#define HELP_lsmod "usage: lsmod\n\nDisplay the currently loaded modules, their sizes and their dependencies."
-#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [File...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n i Cannot be modified (immutable)\n j Write all data to journal first\n s Zero disk storage when deleted\n S Write file contents synchronously\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
+#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [file...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n C No copy on write\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n F Case-insensitive directory lookups (casefold)\n i Cannot be modified (immutable)\n j Write all data to journal first\n P Project hierarchy\n S Write file contents synchronously\n s Zero disk storage when deleted\n T Top of directory hierarchy\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
-#define HELP_lsattr "usage: lsattr [-Radlv] [Files...]\n\nList file attributes on a Linux second extended file system.\n(AacDdijsStu defined in chattr --help)\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
+#define HELP_lsattr "usage: lsattr [-Radlv] [file...]\n\nList file attributes on a Linux second extended file system.\nFlag letters are defined in chattr help.\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
#define HELP_losetup "usage: losetup [-cdrs] [-o OFFSET] [-S SIZE] {-d DEVICE...|-j FILE|-af|{DEVICE FILE}}\n\nAssociate a loopback device with a file, or show current file (if any)\nassociated with a loop device.\n\nInstead of a device:\n-a Iterate through all loopback devices\n-f Find first unused loop device (may create one)\n-j FILE Iterate through all loopback devices associated with FILE\n\nexisting:\n-c Check capacity (file size changed)\n-d DEV Detach loopback device\n-D Detach all loopback devices\n\nnew:\n-s Show device name (alias --show)\n-o OFF Start association at offset OFF into FILE\n-r Read only\n-S SIZE Limit SIZE of loopback association (alias --sizelimit)"
@@ -602,7 +602,7 @@
#define HELP_cat "usage: cat [-etuv] [file...]\n\nCopy (concatenate) files to stdout. If no files listed, copy from stdin.\nFilename \"-\" is a synonym for stdin.\n\n-e Mark each newline with $\n-t Show tabs as ^I\n-u Copy one byte at a time (slow)\n-v Display nonprinting characters as escape sequences with M-x for\n high ascii characters (>127), and ^x for other nonprinting chars"
-#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year."
+#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year.\n\n-h Don't highlight today"
#define HELP_basename "usage: basename [-a] [-s SUFFIX] NAME... | NAME [SUFFIX]\n\nReturn non-directory portion of a pathname removing suffix.\n\n-a All arguments are names\n-s SUFFIX Remove suffix (implies -a)"
diff --git a/android/device/generated/newtoys.h b/android/device/generated/newtoys.h
index 5edf5527..7d8ad220 100644
--- a/android/device/generated/newtoys.h
+++ b/android/device/generated/newtoys.h
@@ -21,7 +21,7 @@ USE_BOOTCHARTD(NEWTOY(bootchartd, 0, TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
USE_BRCTL(NEWTOY(brctl, "<1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_BUNZIP2(NEWTOY(bunzip2, "cftkv", TOYFLAG_USR|TOYFLAG_BIN))
USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN))
-USE_CAL(NEWTOY(cal, ">2", TOYFLAG_USR|TOYFLAG_BIN))
+USE_CAL(NEWTOY(cal, ">2h", TOYFLAG_USR|TOYFLAG_BIN))
USE_CAT(NEWTOY(cat, "u"USE_CAT_V("vte"), TOYFLAG_BIN))
USE_CATV(NEWTOY(catv, USE_CATV("vte"), TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(NEWTOY(cd, ">1LP[-LP]", TOYFLAG_NOFORK))
diff --git a/android/linux/generated/flags.h b/android/linux/generated/flags.h
index 409755e6..65c2525a 100644
--- a/android/linux/generated/flags.h
+++ b/android/linux/generated/flags.h
@@ -176,12 +176,13 @@
#undef FOR_bzcat
#endif
-// cal >2
+// cal >2h
#undef OPTSTR_cal
-#define OPTSTR_cal ">2"
+#define OPTSTR_cal ">2h"
#ifdef CLEANUP_cal
#undef CLEANUP_cal
#undef FOR_cal
+#undef FLAG_h
#endif
// cat uvte uvte
@@ -3560,6 +3561,7 @@
#ifndef TT
#define TT this.cal
#endif
+#define FLAG_h (FORCED_FLAG<<0)
#endif
#ifdef FOR_cat
diff --git a/android/linux/generated/globals.h b/android/linux/generated/globals.h
index f266685a..de606809 100644
--- a/android/linux/generated/globals.h
+++ b/android/linux/generated/globals.h
@@ -989,6 +989,22 @@ struct vi_data {
char *last_search;
int tabstop;
int list;
+ struct str_line {
+ int alloc;
+ int len;
+ char *data;
+ } *il;
+ struct linelist {
+ struct linelist *up;//next
+ struct linelist *down;//prev
+ struct str_line *line;
+ } *text, *screen, *c_r;
+ //yank buffer
+ struct yank_buf {
+ char reg;
+ int alloc;
+ char* data;
+ } yank;
};
// toys/pending/wget.c
@@ -1003,6 +1019,12 @@ struct basename_data {
char *s;
};
+// toys/posix/cal.c
+
+struct cal_data {
+ struct tm *now;
+};
+
// toys/posix/chgrp.c
struct chgrp_data {
@@ -1547,6 +1569,7 @@ extern union global_union {
struct vi_data vi;
struct wget_data wget;
struct basename_data basename;
+ struct cal_data cal;
struct chgrp_data chgrp;
struct chmod_data chmod;
struct cksum_data cksum;
diff --git a/android/linux/generated/help.h b/android/linux/generated/help.h
index 122b8d94..f93684a2 100644
--- a/android/linux/generated/help.h
+++ b/android/linux/generated/help.h
@@ -236,9 +236,9 @@
#define HELP_lsmod "usage: lsmod\n\nDisplay the currently loaded modules, their sizes and their dependencies."
-#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [File...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n i Cannot be modified (immutable)\n j Write all data to journal first\n s Zero disk storage when deleted\n S Write file contents synchronously\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
+#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [file...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n C No copy on write\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n F Case-insensitive directory lookups (casefold)\n i Cannot be modified (immutable)\n j Write all data to journal first\n P Project hierarchy\n S Write file contents synchronously\n s Zero disk storage when deleted\n T Top of directory hierarchy\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
-#define HELP_lsattr "usage: lsattr [-Radlv] [Files...]\n\nList file attributes on a Linux second extended file system.\n(AacDdijsStu defined in chattr --help)\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
+#define HELP_lsattr "usage: lsattr [-Radlv] [file...]\n\nList file attributes on a Linux second extended file system.\nFlag letters are defined in chattr help.\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
#define HELP_losetup "usage: losetup [-cdrs] [-o OFFSET] [-S SIZE] {-d DEVICE...|-j FILE|-af|{DEVICE FILE}}\n\nAssociate a loopback device with a file, or show current file (if any)\nassociated with a loop device.\n\nInstead of a device:\n-a Iterate through all loopback devices\n-f Find first unused loop device (may create one)\n-j FILE Iterate through all loopback devices associated with FILE\n\nexisting:\n-c Check capacity (file size changed)\n-d DEV Detach loopback device\n-D Detach all loopback devices\n\nnew:\n-s Show device name (alias --show)\n-o OFF Start association at offset OFF into FILE\n-r Read only\n-S SIZE Limit SIZE of loopback association (alias --sizelimit)"
@@ -608,7 +608,7 @@
#define HELP_cat "usage: cat [-etuv] [file...]\n\nCopy (concatenate) files to stdout. If no files listed, copy from stdin.\nFilename \"-\" is a synonym for stdin.\n\n-e Mark each newline with $\n-t Show tabs as ^I\n-u Copy one byte at a time (slow)\n-v Display nonprinting characters as escape sequences with M-x for\n high ascii characters (>127), and ^x for other nonprinting chars"
-#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year."
+#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year.\n\n-h Don't highlight today"
#define HELP_basename "usage: basename [-a] [-s SUFFIX] NAME... | NAME [SUFFIX]\n\nReturn non-directory portion of a pathname removing suffix.\n\n-a All arguments are names\n-s SUFFIX Remove suffix (implies -a)"
diff --git a/android/linux/generated/newtoys.h b/android/linux/generated/newtoys.h
index 5edf5527..7d8ad220 100644
--- a/android/linux/generated/newtoys.h
+++ b/android/linux/generated/newtoys.h
@@ -21,7 +21,7 @@ USE_BOOTCHARTD(NEWTOY(bootchartd, 0, TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
USE_BRCTL(NEWTOY(brctl, "<1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_BUNZIP2(NEWTOY(bunzip2, "cftkv", TOYFLAG_USR|TOYFLAG_BIN))
USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN))
-USE_CAL(NEWTOY(cal, ">2", TOYFLAG_USR|TOYFLAG_BIN))
+USE_CAL(NEWTOY(cal, ">2h", TOYFLAG_USR|TOYFLAG_BIN))
USE_CAT(NEWTOY(cat, "u"USE_CAT_V("vte"), TOYFLAG_BIN))
USE_CATV(NEWTOY(catv, USE_CATV("vte"), TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(NEWTOY(cd, ">1LP[-LP]", TOYFLAG_NOFORK))
diff --git a/android/mac/generated/flags.h b/android/mac/generated/flags.h
index f188d2b3..efef9bd3 100644
--- a/android/mac/generated/flags.h
+++ b/android/mac/generated/flags.h
@@ -176,12 +176,13 @@
#undef FOR_bzcat
#endif
-// cal >2
+// cal >2h
#undef OPTSTR_cal
-#define OPTSTR_cal ">2"
+#define OPTSTR_cal ">2h"
#ifdef CLEANUP_cal
#undef CLEANUP_cal
#undef FOR_cal
+#undef FLAG_h
#endif
// cat uvte uvte
@@ -3560,6 +3561,7 @@
#ifndef TT
#define TT this.cal
#endif
+#define FLAG_h (FORCED_FLAG<<0)
#endif
#ifdef FOR_cat
diff --git a/android/mac/generated/globals.h b/android/mac/generated/globals.h
index f266685a..de606809 100644
--- a/android/mac/generated/globals.h
+++ b/android/mac/generated/globals.h
@@ -989,6 +989,22 @@ struct vi_data {
char *last_search;
int tabstop;
int list;
+ struct str_line {
+ int alloc;
+ int len;
+ char *data;
+ } *il;
+ struct linelist {
+ struct linelist *up;//next
+ struct linelist *down;//prev
+ struct str_line *line;
+ } *text, *screen, *c_r;
+ //yank buffer
+ struct yank_buf {
+ char reg;
+ int alloc;
+ char* data;
+ } yank;
};
// toys/pending/wget.c
@@ -1003,6 +1019,12 @@ struct basename_data {
char *s;
};
+// toys/posix/cal.c
+
+struct cal_data {
+ struct tm *now;
+};
+
// toys/posix/chgrp.c
struct chgrp_data {
@@ -1547,6 +1569,7 @@ extern union global_union {
struct vi_data vi;
struct wget_data wget;
struct basename_data basename;
+ struct cal_data cal;
struct chgrp_data chgrp;
struct chmod_data chmod;
struct cksum_data cksum;
diff --git a/android/mac/generated/help.h b/android/mac/generated/help.h
index 122b8d94..f93684a2 100644
--- a/android/mac/generated/help.h
+++ b/android/mac/generated/help.h
@@ -236,9 +236,9 @@
#define HELP_lsmod "usage: lsmod\n\nDisplay the currently loaded modules, their sizes and their dependencies."
-#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [File...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n i Cannot be modified (immutable)\n j Write all data to journal first\n s Zero disk storage when deleted\n S Write file contents synchronously\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
+#define HELP_chattr "usage: chattr [-R] [-+=AacDdijsStTu] [-v version] [file...]\n\nChange file attributes on a Linux second extended file system.\n\n-R Recurse\n-v Set the file's version/generation number\n\nOperators:\n '-' Remove attributes\n '+' Add attributes\n '=' Set attributes\n\nAttributes:\n A Don't track atime\n a Append mode only\n C No copy on write\n c Enable compress\n D Write dir contents synchronously\n d Don't backup with dump\n F Case-insensitive directory lookups (casefold)\n i Cannot be modified (immutable)\n j Write all data to journal first\n P Project hierarchy\n S Write file contents synchronously\n s Zero disk storage when deleted\n T Top of directory hierarchy\n t Disable tail-merging of partial blocks with other files\n u Allow file to be undeleted"
-#define HELP_lsattr "usage: lsattr [-Radlv] [Files...]\n\nList file attributes on a Linux second extended file system.\n(AacDdijsStu defined in chattr --help)\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
+#define HELP_lsattr "usage: lsattr [-Radlv] [file...]\n\nList file attributes on a Linux second extended file system.\nFlag letters are defined in chattr help.\n\n-R Recursively list attributes of directories and their contents\n-a List all files in directories, including files that start with '.'\n-d List directories like other files, rather than listing their contents\n-l List long flag names\n-v List the file's version/generation number"
#define HELP_losetup "usage: losetup [-cdrs] [-o OFFSET] [-S SIZE] {-d DEVICE...|-j FILE|-af|{DEVICE FILE}}\n\nAssociate a loopback device with a file, or show current file (if any)\nassociated with a loop device.\n\nInstead of a device:\n-a Iterate through all loopback devices\n-f Find first unused loop device (may create one)\n-j FILE Iterate through all loopback devices associated with FILE\n\nexisting:\n-c Check capacity (file size changed)\n-d DEV Detach loopback device\n-D Detach all loopback devices\n\nnew:\n-s Show device name (alias --show)\n-o OFF Start association at offset OFF into FILE\n-r Read only\n-S SIZE Limit SIZE of loopback association (alias --sizelimit)"
@@ -608,7 +608,7 @@
#define HELP_cat "usage: cat [-etuv] [file...]\n\nCopy (concatenate) files to stdout. If no files listed, copy from stdin.\nFilename \"-\" is a synonym for stdin.\n\n-e Mark each newline with $\n-t Show tabs as ^I\n-u Copy one byte at a time (slow)\n-v Display nonprinting characters as escape sequences with M-x for\n high ascii characters (>127), and ^x for other nonprinting chars"
-#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year."
+#define HELP_cal "usage: cal [[month] year]\n\nPrint a calendar.\n\nWith one argument, prints all months of the specified year.\nWith two arguments, prints calendar for month and year.\n\n-h Don't highlight today"
#define HELP_basename "usage: basename [-a] [-s SUFFIX] NAME... | NAME [SUFFIX]\n\nReturn non-directory portion of a pathname removing suffix.\n\n-a All arguments are names\n-s SUFFIX Remove suffix (implies -a)"
diff --git a/android/mac/generated/newtoys.h b/android/mac/generated/newtoys.h
index 5edf5527..7d8ad220 100644
--- a/android/mac/generated/newtoys.h
+++ b/android/mac/generated/newtoys.h
@@ -21,7 +21,7 @@ USE_BOOTCHARTD(NEWTOY(bootchartd, 0, TOYFLAG_STAYROOT|TOYFLAG_USR|TOYFLAG_BIN))
USE_BRCTL(NEWTOY(brctl, "<1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_BUNZIP2(NEWTOY(bunzip2, "cftkv", TOYFLAG_USR|TOYFLAG_BIN))
USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN))
-USE_CAL(NEWTOY(cal, ">2", TOYFLAG_USR|TOYFLAG_BIN))
+USE_CAL(NEWTOY(cal, ">2h", TOYFLAG_USR|TOYFLAG_BIN))
USE_CAT(NEWTOY(cat, "u"USE_CAT_V("vte"), TOYFLAG_BIN))
USE_CATV(NEWTOY(catv, USE_CATV("vte"), TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(NEWTOY(cd, ">1LP[-LP]", TOYFLAG_NOFORK))