version 1.21, 2003/06/26 18:19:29 |
version 1.22, 2003/06/26 22:04:45 |
|
|
} |
} |
if (opt == D_CONTEXT || opt == D_UNIFIED) { |
if (opt == D_CONTEXT || opt == D_UNIFIED) { |
/* |
/* |
* if this new change is within 'context' lines of |
* If this new change is within 'context' lines of |
* the previous change, just add it to the change |
* the previous change, just add it to the change |
* record. If the record is full or if this |
* record. If the record is full or if this |
* change is more than 'context' lines from the previous |
* change is more than 'context' lines from the previous |
|
|
if ((opt == D_EDIT || opt == D_REVERSE) && c <= d) |
if ((opt == D_EDIT || opt == D_REVERSE) && c <= d) |
prints(".\n"); |
prints(".\n"); |
if (inifdef) { |
if (inifdef) { |
fprintf(stdout, "#endif /* %s */\n", endifname); |
fprintf(stdout, "#endif /* %s */\n", ifdefname); |
inifdef = 0; |
inifdef = 0; |
} |
} |
} |
} |
|
|
static void |
static void |
fetch(long *f, int a, int b, FILE *lb, char *s, int oldfile) |
fetch(long *f, int a, int b, FILE *lb, char *s, int oldfile) |
{ |
{ |
int oneflag = (*ifdef1 != '\0') != (*ifdef2 != '\0'); |
|
int i, j, c, col, nc; |
int i, j, c, col, nc; |
|
|
/* |
/* |
|
|
if (a > b) |
if (a > b) |
return; |
return; |
if (opt == D_IFDEF) { |
if (opt == D_IFDEF) { |
if (inifdef) |
if (inifdef) { |
fprintf(stdout, "#else /* %s%s */\n", |
fprintf(stdout, "#else /* %s%s */\n", |
oneflag && oldfile == 1 ? "!" : "", ifdef2); |
oldfile == 1 ? "!" : "", ifdefname); |
else { |
} else { |
if (oneflag) { |
if (oldfile) |
/* There was only one ifdef given */ |
fprintf(stdout, "#ifndef %s\n", ifdefname); |
endifname = ifdef2; |
else |
if (oldfile) |
fprintf(stdout, "#ifdef %s\n", ifdefname); |
fprintf(stdout, "#ifndef %s\n", endifname); |
|
else |
|
fprintf(stdout, "#ifdef %s\n", endifname); |
|
} else { |
|
endifname = oldfile ? ifdef1 : ifdef2; |
|
fprintf(stdout, "#ifdef %s\n", endifname); |
|
} |
|
} |
} |
inifdef = 1 + oldfile; |
inifdef = 1 + oldfile; |
} |
} |
|
|
} |
} |
} |
} |
} |
} |
|
|
if (inifdef && !wantelses) { |
|
fprintf(stdout, "#endif /* %s */\n", endifname); |
|
inifdef = 0; |
|
} |
|
} |
} |
|
|
#define POW2 /* define only if HALFLONG is 2**n */ |
#define POW2 /* define only if HALFLONG is 2**n */ |
|
|
int a, b, c, d; |
int a, b, c, d; |
char ch; |
char ch; |
|
|
if (cvp > context_vec_ptr) |
if (context_vec_start > context_vec_ptr) |
return; |
return; |
|
|
b = d = 0; /* gcc */ |
b = d = 0; /* gcc */ |
|
|
int a, b, c, d; |
int a, b, c, d; |
char ch; |
char ch; |
|
|
if (cvp > context_vec_ptr) |
if (context_vec_start > context_vec_ptr) |
return; |
return; |
|
|
b = d = 0; /* gcc */ |
b = d = 0; /* gcc */ |