rename read_block
to read_crossreference_block
This commit is contained in:
parent
afe4cf32dc
commit
844c48eb11
@ -309,7 +309,7 @@ void build(void) {
|
|||||||
}
|
}
|
||||||
/* get the first file name in the old cross-reference */
|
/* get the first file name in the old cross-reference */
|
||||||
blocknumber = -1;
|
blocknumber = -1;
|
||||||
read_block(); /* read the first cross-ref block */
|
read_crossreference_block(); /* read the first cross-ref block */
|
||||||
scanpast('\t'); /* skip the header */
|
scanpast('\t'); /* skip the header */
|
||||||
oldfile = getoldfile();
|
oldfile = getoldfile();
|
||||||
} else { /* force cross-referencing of all the source files */
|
} else { /* force cross-referencing of all the source files */
|
||||||
@ -558,13 +558,13 @@ void copydata(void) {
|
|||||||
while(*cp != '\t') {
|
while(*cp != '\t') {
|
||||||
dbputc(*cp++);
|
dbputc(*cp++);
|
||||||
}
|
}
|
||||||
} while(*++cp == '\0' && (cp = read_block()) != NULL);
|
} while(*++cp == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
dbputc('\t'); /* copy the tab */
|
dbputc('\t'); /* copy the tab */
|
||||||
|
|
||||||
/* get the next character */
|
/* get the next character */
|
||||||
/* HBB 2010-08-21: potential problem if above loop was left
|
/* HBB 2010-08-21: potential problem if above loop was left
|
||||||
* with cp==NULL */
|
* with cp==NULL */
|
||||||
if(cp && (*(cp + 1) == '\0')) { cp = read_block(); }
|
if(cp && (*(cp + 1) == '\0')) { cp = read_crossreference_block(); }
|
||||||
/* exit if at the end of this file's data */
|
/* exit if at the end of this file's data */
|
||||||
if(cp == NULL || *cp == NEWFILE) { break; }
|
if(cp == NULL || *cp == NEWFILE) { break; }
|
||||||
/* look for an #included file */
|
/* look for an #included file */
|
||||||
@ -598,13 +598,13 @@ void copyinverted(void) {
|
|||||||
while(*cp != '\n') {
|
while(*cp != '\n') {
|
||||||
dbputc(*cp++);
|
dbputc(*cp++);
|
||||||
}
|
}
|
||||||
} while(*++cp == '\0' && (cp = read_block()) != NULL);
|
} while(*++cp == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
dbputc('\n'); /* copy the newline */
|
dbputc('\n'); /* copy the newline */
|
||||||
|
|
||||||
/* get the next character */
|
/* get the next character */
|
||||||
/* HBB 2010-08-21: potential problem if above loop was left
|
/* HBB 2010-08-21: potential problem if above loop was left
|
||||||
* with cp==NULL */
|
* with cp==NULL */
|
||||||
if(cp && (*(cp + 1) == '\0')) { cp = read_block(); }
|
if(cp && (*(cp + 1) == '\0')) { cp = read_crossreference_block(); }
|
||||||
/* exit if at the end of this file's data */
|
/* exit if at the end of this file's data */
|
||||||
if(cp == NULL) { break; }
|
if(cp == NULL) { break; }
|
||||||
switch(*cp) {
|
switch(*cp) {
|
||||||
|
@ -50,13 +50,13 @@
|
|||||||
/* get the next character in the cross-reference */
|
/* get the next character in the cross-reference */
|
||||||
/* note that blockp is assumed not to be null */
|
/* note that blockp is assumed not to be null */
|
||||||
#define getrefchar() \
|
#define getrefchar() \
|
||||||
(*(++blockp + 1) != '\0' ? *blockp : (read_block() != NULL ? *blockp : '\0'))
|
(*(++blockp + 1) != '\0' ? *blockp : (read_crossreference_block() != NULL ? *blockp : '\0'))
|
||||||
|
|
||||||
/* skip the next character in the cross-reference */
|
/* skip the next character in the cross-reference */
|
||||||
/* note that blockp is assumed not to be null and that
|
/* note that blockp is assumed not to be null and that
|
||||||
this macro will always be in a statement by itself */
|
this macro will always be in a statement by itself */
|
||||||
#define skiprefchar() \
|
#define skiprefchar() \
|
||||||
if(*(++blockp + 1) == '\0') (void)read_block()
|
if(*(++blockp + 1) == '\0') (void)read_crossreference_block()
|
||||||
|
|
||||||
#define DUMMYCHAR ' ' /* use space as a dummy character */
|
#define DUMMYCHAR ' ' /* use space as a dummy character */
|
||||||
#define MSGLEN ((PATLEN) + 80) /* displayed message length */
|
#define MSGLEN ((PATLEN) + 80) /* displayed message length */
|
||||||
|
@ -159,7 +159,7 @@ bool check_for_assignment(void) {
|
|||||||
if(asgn_char[0] == '\0') {
|
if(asgn_char[0] == '\0') {
|
||||||
/* get the next block when we reach the end of
|
/* get the next block when we reach the end of
|
||||||
* the current block */
|
* the current block */
|
||||||
if(NULL == (asgn_char = read_block())){
|
if(NULL == (asgn_char = read_crossreference_block())){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,10 +240,10 @@ char *find_symbol_or_assignment(const char *pattern, bool assign_flag) {
|
|||||||
while(*cp != '\n') {
|
while(*cp != '\n') {
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
} while(*(cp + 1) == '\0' && (cp = read_block()) != NULL);
|
} while(*(cp + 1) == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
|
|
||||||
/* skip the found character */
|
/* skip the found character */
|
||||||
if(cp != NULL && *(++cp + 1) == '\0') { cp = read_block(); }
|
if(cp != NULL && *(++cp + 1) == '\0') { cp = read_crossreference_block(); }
|
||||||
if(cp == NULL) { break; }
|
if(cp == NULL) { break; }
|
||||||
/* look for a source file, function, or macro name */
|
/* look for a source file, function, or macro name */
|
||||||
if(*cp == '\t') {
|
if(*cp == '\t') {
|
||||||
@ -811,7 +811,7 @@ bool matchrest(void) {
|
|||||||
++blockp;
|
++blockp;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
} while(*(blockp + 1) == '\0' && read_block() != NULL);
|
} while(*(blockp + 1) == '\0' && read_crossreference_block() != NULL);
|
||||||
|
|
||||||
if(*blockp == '\n' && cpattern[i] == '\0') { return (true); }
|
if(*blockp == '\n' && cpattern[i] == '\0') { return (true); }
|
||||||
return (false);
|
return (false);
|
||||||
@ -914,7 +914,7 @@ void putline(FILE *output) {
|
|||||||
}
|
}
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
} while(*(cp + 1) == '\0' && (cp = read_block()) != NULL);
|
} while(*(cp + 1) == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
blockp = cp;
|
blockp = cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -940,7 +940,7 @@ void fetch_string_from_dbase(char *s, size_t length) {
|
|||||||
}
|
}
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
} while(length > 0 && cp[1] == '\0' && (cp = read_block()) != NULL);
|
} while(length > 0 && cp[1] == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
blockp = cp;
|
blockp = cp;
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
}
|
}
|
||||||
@ -955,14 +955,14 @@ char *scanpast(char c) {
|
|||||||
while(*cp != c) {
|
while(*cp != c) {
|
||||||
++cp;
|
++cp;
|
||||||
}
|
}
|
||||||
} while(*(cp + 1) == '\0' && (cp = read_block()) != NULL);
|
} while(*(cp + 1) == '\0' && (cp = read_crossreference_block()) != NULL);
|
||||||
blockp = cp;
|
blockp = cp;
|
||||||
if(cp != NULL) { skiprefchar(); /* skip the found character */ }
|
if(cp != NULL) { skiprefchar(); /* skip the found character */ }
|
||||||
return blockp;
|
return blockp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read a block of the cross-reference */
|
/* read a block of the cross-reference */
|
||||||
char *read_block(void) {
|
char *read_crossreference_block(void) {
|
||||||
/* read the next block */
|
/* read the next block */
|
||||||
blocklen = read(symrefs, block, BUFSIZ);
|
blocklen = read(symrefs, block, BUFSIZ);
|
||||||
blockp = block;
|
blockp = block;
|
||||||
@ -1171,7 +1171,7 @@ long dbseek(long offset) {
|
|||||||
sleep(3);
|
sleep(3);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
read_block();
|
read_crossreference_block();
|
||||||
blocknumber = n;
|
blocknumber = n;
|
||||||
}
|
}
|
||||||
blockp = block + offset % BUFSIZ;
|
blockp = block + offset % BUFSIZ;
|
||||||
|
@ -197,7 +197,7 @@ const char * prepend_path(const char * prepand_with, const char * file);
|
|||||||
char *inviewpath(const char *file);
|
char *inviewpath(const char *file);
|
||||||
char *lookup(char *ident, bool do_compressed);
|
char *lookup(char *ident, bool do_compressed);
|
||||||
char *pathcomponents(char *path, int components);
|
char *pathcomponents(char *path, int components);
|
||||||
char *read_block(void);
|
char *read_crossreference_block(void);
|
||||||
char *scanpast(char c);
|
char *scanpast(char c);
|
||||||
|
|
||||||
char **parse_options(const int argc, const char * const * const argv);
|
char **parse_options(const int argc, const char * const * const argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user