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

Diff for /src/usr.bin/awk/b.c between version 1.35 and 1.36

version 1.35, 2020/12/09 20:00:11 version 1.36, 2021/03/02 20:41:42
Line 942 
Line 942 
         if (special_case == REPEAT_PLUS_APPENDED) {          if (special_case == REPEAT_PLUS_APPENDED) {
                 size++;         /* for the final + */                  size++;         /* for the final + */
         } else if (special_case == REPEAT_WITH_Q) {          } else if (special_case == REPEAT_WITH_Q) {
                 size += init_q + (atomlen+1)* n_q_reps;                  size += init_q + (atomlen+1)* (n_q_reps-init_q);
         } else if (special_case == REPEAT_ZERO) {          } else if (special_case == REPEAT_ZERO) {
                 size += 2;      /* just a null ERE: () */                  size += 2;      /* just a null ERE: () */
         }          }
Line 971 
Line 971 
                 }                  }
         }          }
         memcpy(&buf[j], reptok+reptoklen, suffix_length);          memcpy(&buf[j], reptok+reptoklen, suffix_length);
         if (special_case == REPEAT_ZERO) {          j += suffix_length;
                 buf[j+suffix_length] = '\0';          buf[j] = '\0';
         } else {  
                 buf[size] = '\0';  
         }  
         /* free old basestr */          /* free old basestr */
         if (firstbasestr != basestr) {          if (firstbasestr != basestr) {
                 if (basestr)                  if (basestr)

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36