- if (match->rm_so==-1
- || match->rm_eo==-1) {
- fprintf(ERRH1"Trying to substitute '%c' but no \"matches\" entry not set for \"%s\""WHERE1,
- ERRH2,*patt,item->text,WHERE2);
- exit(EXIT_FAILURE);
- }
- if (match->rm_so>match->rm_eo) {
- fprintf(ERRH1"Trying to substitute '%c' start>end (%d>%d) for \"%s\""WHERE1,
- ERRH2,*patt,match->rm_so,match->rm_eo,item->text,WHERE2);
- exit(EXIT_FAILURE);
- }
- start=src+match->rm_so; end=src+match->rm_eo;
- }
- else {
- start=patt; end=patt+1;
+ if (match->rm_so==-1
+ || match->rm_eo==-1) {
+ fprintf(ERRH1"Trying to substitute '%c' but no \"matches\" entry not set for \"%s\""WHERE1,
+ ERRH2,*patt,item->text,WHERE2);
+ exit(EXIT_FAILURE);
+ }
+ if (match->rm_so>match->rm_eo) {
+ fprintf(ERRH1"Trying to substitute '%c' start>end (%d>%d) for \"%s\""WHERE1,
+ ERRH2,*patt,match->rm_so,match->rm_eo,item->text,WHERE2);
+ exit(EXIT_FAILURE);
+ }
+ start=src+match->rm_so; end=src+match->rm_eo;
+ }
+ else {
+ start=patt; end=patt+1;
+ }
+ patt++;
+ break;
+ case PATT_END:
+ start=src+matches->rm_eo;
+ end=src+strlen(src);
+ pattpos=PATT_TERM; /* assumed: patt=NULL; */
+ break;
+ default:
+ assert(0);