version 1.33, 2005/11/14 19:54:10 |
version 1.34, 2006/03/11 19:41:30 |
|
|
{ |
{ |
int ifd, statfailed; |
int ifd, statfailed; |
char *p, *s, lbuf[MAXLINELEN]; |
char *p, *s, lbuf[MAXLINELEN]; |
LINENUM iline; |
|
struct stat filestat; |
struct stat filestat; |
off_t i; |
off_t i; |
ptrdiff_t sz; |
ptrdiff_t sz; |
size_t lines_allocated; |
size_t iline, lines_allocated; |
|
|
#ifdef DEBUGGING |
#ifdef DEBUGGING |
if (debug & 8) |
if (debug & 8) |
|
|
plan_b(const char *filename) |
plan_b(const char *filename) |
{ |
{ |
FILE *ifp; |
FILE *ifp; |
int i = 0, j, maxlen = 1; |
size_t i = 0, j, maxlen = 1; |
char *p; |
char *p; |
bool found_revision = (revision == NULL); |
bool found_revision = (revision == NULL); |
|
|
|
|
else { |
else { |
tiline[whichbuf] = baseline; |
tiline[whichbuf] = baseline; |
|
|
lseek(tifd, (off_t) (baseline / lines_per_buf * |
if (lseek(tifd, (off_t) (baseline / lines_per_buf * |
BUFFERSIZE), SEEK_SET); |
BUFFERSIZE), SEEK_SET) < 0) |
|
pfatal("cannot seek in the temporary input file"); |
|
|
if (read(tifd, tibuf[whichbuf], BUFFERSIZE) < 0) |
if (read(tifd, tibuf[whichbuf], BUFFERSIZE) < 0) |
pfatal("error reading tmp file %s", TMPINNAME); |
pfatal("error reading tmp file %s", TMPINNAME); |
|
|
rev_in_string(const char *string) |
rev_in_string(const char *string) |
{ |
{ |
const char *s; |
const char *s; |
int patlen; |
size_t patlen; |
|
|
if (revision == NULL) |
if (revision == NULL) |
return true; |
return true; |