changeset 1678:4a6a53da1c53 draft

Remove xexec_optargs().
author Rob Landley <rob@landley.net>
date Sat, 07 Feb 2015 16:23:59 -0600
parents 49c851da3658
children ce1d240b8ec8
files lib/lib.h lib/xwrap.c
diffstat 2 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lib/lib.h	Sat Feb 07 16:23:03 2015 -0600
+++ b/lib/lib.h	Sat Feb 07 16:23:59 2015 -0600
@@ -93,7 +93,6 @@
 void xputs(char *s);
 void xputc(char c);
 void xflush(void);
-void xexec_optargs(int skip);
 void xexec(char **argv);
 pid_t xpopen_both(char **argv, int *pipes);
 int xpclose_both(pid_t pid, int *pipes);
--- a/lib/xwrap.c	Sat Feb 07 16:23:03 2015 -0600
+++ b/lib/xwrap.c	Sat Feb 07 16:23:59 2015 -0600
@@ -129,17 +129,6 @@
   if (fflush(stdout) || ferror(stdout)) perror_exit("write");;
 }
 
-// Call xexec with a chunk of optargs, starting at skip. (You can't just
-// call xexec() directly because toy_init() frees optargs.)
-void xexec_optargs(int skip)
-{
-  char **s = toys.optargs;
-
-  toys.optargs = 0;
-  xexec(s+skip);
-}
-
-
 // Die unless we can exec argv[] (or run builtin command).  Note that anything
 // with a path isn't a builtin, so /bin/sh won't match the builtin sh.
 void xexec(char **argv)