[BACK]Return to process.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sed

Diff for /src/usr.bin/sed/process.c between version 1.25 and 1.26

version 1.25, 2015/07/19 17:21:21 version 1.26, 2015/07/20 18:24:15
Line 441 
Line 441 
         int count, i;          int count, i;
         char buf[8 * 1024];          char buf[8 * 1024];
   
         for (i = 0; i < appendx; i++)          for (i = 0; i < appendx; i++)
                 switch (appends[i].type) {                  switch (appends[i].type) {
                 case AP_STRING:                  case AP_STRING:
                         fwrite(appends[i].s, sizeof(char), appends[i].len,                          fwrite(appends[i].s, sizeof(char), appends[i].len,
                             outfile);                              outfile);
                         break;                          break;
                 case AP_FILE:                  case AP_FILE:
Line 476 
Line 476 
         const char *escapes;          const char *escapes;
         char *p;          char *p;
   
         for (count = 0; *s; ++s) {          for (count = 0; *s; ++s) {
                 if (count >= termwidth) {                  if (count >= termwidth) {
                         (void)fprintf(outfile, "\\\n");                          (void)fprintf(outfile, "\\\n");
                         count = 0;                          count = 0;
Line 512 
Line 512 
     int nomatch, size_t slen)      int nomatch, size_t slen)
 {  {
         int eval;          int eval;
   
         if (preg == NULL) {          if (preg == NULL) {
                 if (defpreg == NULL)                  if (defpreg == NULL)
                         err(FATAL, "first RE may not be empty");                          err(FATAL, "first RE may not be empty");
Line 522 
Line 522 
         /* Set anchors */          /* Set anchors */
         match[0].rm_so = 0;          match[0].rm_so = 0;
         match[0].rm_eo = slen;          match[0].rm_eo = slen;
   
         eval = regexec(defpreg, string,          eval = regexec(defpreg, string,
             nomatch ? 0 : maxnsub + 1, match, eflags | REG_STARTEND);              nomatch ? 0 : maxnsub + 1, match, eflags | REG_STARTEND);
         switch (eval) {          switch (eval) {

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26