/[man-db]/man-db/lib/pipeline.c
ViewVC logotype

Diff of /man-db/lib/pipeline.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by cjwatson, Mon Aug 4 00:06:16 2003 UTC revision 1.12 by cjwatson, Mon Aug 4 11:04:42 2003 UTC
# Line 137  static char *argstr_get_word (const char Line 137  static char *argstr_get_word (const char
137                  if (litstart < *argstr) {                  if (litstart < *argstr) {
138                          char *tmp = xstrndup (litstart, *argstr - litstart);                          char *tmp = xstrndup (litstart, *argstr - litstart);
139                          out = strappend (out, tmp, NULL);                          out = strappend (out, tmp, NULL);
140                            free (tmp);
141                  }                  }
142    
143                  switch (**argstr) {                  switch (**argstr) {
# Line 166  static char *argstr_get_word (const char Line 167  static char *argstr_get_word (const char
167    
168                          case '\\':                          case '\\':
169                                  backslashed[0] = *++*argstr;                                  backslashed[0] = *++*argstr;
170                                  if (!backslashed[0])                                  if (!backslashed[0]) {
171                                          /* Unterminated quoting; give up. */                                          /* Unterminated quoting; give up. */
172                                            if (out)
173                                                    free (out);
174                                          return NULL;                                          return NULL;
175                                    }
176                                  backslashed[1] = '\0';                                  backslashed[1] = '\0';
177                                  out = strappend (out, backslashed, NULL);                                  out = strappend (out, backslashed, NULL);
178                                  litstart = ++*argstr;                                  litstart = ++*argstr;
# Line 179  static char *argstr_get_word (const char Line 183  static char *argstr_get_word (const char
183                  }                  }
184          }          }
185    
186          if (quotemode)          if (quotemode) {
187                  /* Unterminated quoting; give up. */                  /* Unterminated quoting; give up. */
188                    if (out)
189                            free (out);
190                  return NULL;                  return NULL;
191            }
192    
193          /* Copy any accumulated literal characters. */          /* Copy any accumulated literal characters. */
194          if (litstart < *argstr) {          if (litstart < *argstr) {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26