aboutsummaryrefslogtreecommitdiff
path: root/toys/toylist.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-12-15 21:47:25 -0600
committerRob Landley <rob@landley.net>2007-12-15 21:47:25 -0600
commitbc07865a504c291b9c88e41b3481ee6b44334b4d (patch)
tree591494c428601e5324d91814cbcb690e4e530ba6 /toys/toylist.h
parent4e68de1ef854fadd74fcb63c3a5ad15dce457a4c (diff)
downloadtoybox-bc07865a504c291b9c88e41b3481ee6b44334b4d.tar.gz
Start of "patch" support. Writes to stdout at the moment.
Diffstat (limited to 'toys/toylist.h')
-rw-r--r--toys/toylist.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/toys/toylist.h b/toys/toylist.h
index 9d040265..9b992028 100644
--- a/toys/toylist.h
+++ b/toys/toylist.h
@@ -67,6 +67,16 @@ struct oneit_data {
char *console;
};
+struct patch_data {
+ char *infile;
+ long prefix;
+
+ struct double_list *plines, *flines;
+ long oldline, oldlen, newline, newlen;
+ int context, state;
+ int filein, fileout, filepatch;
+};
+
struct sleep_data {
long seconds;
};
@@ -92,6 +102,7 @@ extern union toy_union {
struct mkfifo_data mkfifo;
struct netcat_data netcat;
struct oneit_data oneit;
+ struct patch_data patch;
struct sleep_data sleep;
struct touch_data touch;
struct toysh_data toysh;
@@ -140,6 +151,7 @@ USE_MKFIFO(NEWTOY(mkfifo, "<1m:", TOYFLAG_BIN))
USE_NETCAT(OLDTOY(nc, netcat, "i#w#l@p#s:q#f:e", TOYFLAG_BIN))
USE_NETCAT(NEWTOY(netcat, "i#w#l@p#s:q#f:e", TOYFLAG_BIN))
USE_ONEIT(NEWTOY(oneit, "+<1c:p", TOYFLAG_SBIN))
+USE_PATCH(NEWTOY(patch, "up#i:R", TOYFLAG_USR|TOYFLAG_BIN))
USE_PWD(NEWTOY(pwd, NULL, TOYFLAG_BIN))
USE_READLINK(NEWTOY(readlink, "<1f", TOYFLAG_BIN))
USE_TOYSH(OLDTOY(sh, toysh, "c:i", TOYFLAG_BIN))