correct, remove and add comments

This commit is contained in:
anon 2024-11-10 13:10:21 +01:00
parent 6a6ced836b
commit 4917ddebbe
3 changed files with 6 additions and 5 deletions

View File

@ -128,9 +128,9 @@ void setup_build_filenames(char *reffile) {
path = malloc(strlen(reffile) + 10u);
strcpy(path, reffile);
s = (char *)basename(path); // this is save because the returned pointer is inside $path, and we know we can edit it
s = (char *)basename(path); // this is safe because the returned pointer is inside $path, and we know we can edit it
*s = '\0';
strcat(path, "n");
strcat(path, "n"); // XXX: prefix signalling "new"
++s;
strcpy(s, basename(reffile));
newreffile = strdup(path);
@ -193,6 +193,8 @@ void build(void) {
unsigned long fileindex; /* source file name index */
bool interactive = true; /* output progress messages */
// XXX: find a safe way to remove this,
// building is cheap, $HOME moves rarely
/* normalize the current directory relative to the home directory so
the cross-reference is not rebuilt when the user's login is moved */
strcpy(newdir, currentdir);

View File

@ -225,7 +225,6 @@ void putcrossref(void) {
lineoffset = dboffset;
dboffset += fprintf(newrefs, "%d ", lineno);
/* HBB 20010425: added this line: */
my_yytext[my_yyleng] = '\0';
blank = false;

View File

@ -138,7 +138,7 @@ void sourcedir(char *dirlist) {
}
dir = strtok(NULL, DIRSEPS);
}
free(dirlist); /* HBB 20000421: avoid memory leaks */
free(dirlist);
}
/* add a source directory to the list */
@ -224,7 +224,7 @@ void makefilelist(void) {
makevpsrcdirs(); /* make the view source directory list */
/* if -i was falseT given and there are source file arguments */
/* if -i was NOT given and there are source file arguments */
if(namefile == NULL && fileargc > 0) {
/* put them in a list that can be expanded */