version 1.25, 2015/07/19 17:21:21 |
version 1.26, 2015/07/20 18:24:15 |
|
|
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: |
|
|
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; |
|
|
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"); |
|
|
/* 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) { |