[hackers] [sbase] Rename pusharg() to deinputstr() || sin

From: <git_AT_suckless.org>
Date: Wed, 08 Jan 2014 21:35:10 +0100

commit cec487585cad1d652dfafd9d41cf1f9dcff265be
Author: sin <sin_AT_2f30.org>
Date: Wed Jan 8 20:22:10 2014 +0000

    Rename pusharg() to deinputstr()

diff --git a/xargs.c b/xargs.c
index b0c43b5..66087cf 100644
--- a/xargs.c
+++ b/xargs.c
_AT_@ -19,7 +19,7 @@ static int eatspace(void);
 static int parsequote(int);
 static int parseescape(void);
 static char *poparg(void);
-static void pusharg(char *);
+static void deinputstr(char *);
 static void waitchld(void);
 static void runcmd(void);
 
_AT_@ -86,7 +86,7 @@ main(int argc, char *argv[])
                             i >= NARGS - 1) {
                                 if (strlen(arg) + 1 > argmaxsz)
                                         enprintf(EXIT_FAILURE, "insufficient argument space
");
- pusharg(arg);
+ deinputstr(arg);
                                 break;
                         }
                         cmd[i] = strdup(arg);
_AT_@ -123,6 +123,15 @@ deinputc(int ch)
 }
 
 static void
+deinputstr(char *arg)
+{
+ char *p;
+
+ for (p = &arg[strlen(arg) - 1]; p >= arg; p--)
+ deinputc(*p);
+}
+
+static void
 fillargbuf(int ch)
 {
         if (argbpos >= argbsz) {
_AT_@ -157,10 +166,8 @@ parsequote(int q)
         int ch;
 
         while ((ch = inputc()) != EOF) {
- if (ch == q) {
- fillargbuf('
Received on Wed Jan 08 2014 - 21:35:10 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 08 2014 - 21:36:12 CET