Skip to content

Commit

Permalink
src: convert tabs to spaces, git red of form feed char
Browse files Browse the repository at this point in the history
  • Loading branch information
Jafaral committed Mar 9, 2024
1 parent 3047862 commit 0298959
Show file tree
Hide file tree
Showing 153 changed files with 31,364 additions and 31,365 deletions.
2 changes: 1 addition & 1 deletion src/common/dconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void initalloc(word codesize)
tfatal("insufficient memory for block region", NULL);
blkend = blkbase + abrsize;
}



void err_msg(n, v)
int n;
Expand Down
14 changes: 7 additions & 7 deletions src/common/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ nodeptr lval;
__merr_errors++;
nocode++;
}


/*
* mapterm finds a printable string for the given token type
* and value.
Expand All @@ -96,7 +96,7 @@ nodeptr val;
return "???";
}
#endif /* SEPARATE_YYERROR */


/*
* tfatal produces the translator error messages s1 and s2 (if nonnull). The
* location of the error is found in tok_loc.
Expand Down Expand Up @@ -131,7 +131,7 @@ void tfatal(char *s1, char *s2)
__merr_errors++;
nocode++;
}


/*
* nfatal produces the error messages s1 and s2 (if nonnull), and associates
* it with source location of node.
Expand All @@ -152,7 +152,7 @@ char *s1, *s2;
__merr_errors++;
nocode++;
}



/*
* twarn produces s1 and s2 (if nonnull) as translator warning messages.
Expand All @@ -173,7 +173,7 @@ char *s1, *s2;
#endif
}



/*
* tsyserr is called for fatal errors. The message s is produced and the
* translator exits.
Expand All @@ -189,7 +189,7 @@ char *s;

exit(EXIT_FAILURE);
}


/*
* quit - immediate exit with error message
*/
Expand All @@ -199,7 +199,7 @@ char *msg;
{
quitf(msg,"");
}


/*
* quitf - immediate exit with message format and argument
*/
Expand Down
8 changes: 4 additions & 4 deletions src/common/filepart.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static char *tryfile (char *buf, char *dir, char *name, char *extn);
#ifndef PathSep
#define PathSep " ;"
#endif /* PathSep */


static char *last_vetted_path;
static char *vetted_PathSep;
void vet_the_PathSep(char *s)
Expand Down Expand Up @@ -183,7 +183,7 @@ char *buf, *dir, *name, *extn;
else
return NULL;
}


/*
* fparse - break a file name down into component parts.
* Result is a pointer to a struct of static pointers good until the next call.
Expand Down Expand Up @@ -245,7 +245,7 @@ char *s;

return &fp;
}


/*
* makename - make a file name, optionally substituting a new dir and/or ext
*/
Expand All @@ -269,7 +269,7 @@ char *dest, *d, *name, *e;

return dest;
}


/*
* smatch - case-insensitive string match - returns nonzero if they match
*/
Expand Down
22 changes: 11 additions & 11 deletions src/common/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ char *lpath; /* LPATH for finding source files */
static int ifdepth; /* depth of $if nesting */

extern int __merr_errors, nocode; /* provided by icont, iconc */


/*
* ppinit(fname, inclpath, m4) -- initialize preprocessor to read from fname.
*
Expand Down Expand Up @@ -239,7 +239,7 @@ void ppecho()
while ((c = ppch()) != EOF)
putchar(c);
}


/*
* ppch() -- get preprocessed character.
*/
Expand Down Expand Up @@ -392,7 +392,7 @@ int ppch()
}
}
}


/*
* rline(fp) -- read arbitrarily long line and return pointer.
*
Expand Down Expand Up @@ -446,7 +446,7 @@ FILE *fp;
n = LINE_SIZE_INCR;
}
}


/*
* pushdef(d) -- insert definition into the input stream.
*/
Expand Down Expand Up @@ -484,7 +484,7 @@ long lno;
bnxt = tbuf;
bstop = blim = tbuf + strlen(tbuf);
}


/*
* ppdir(s) -- handle preprocessing directive.
*
Expand Down Expand Up @@ -550,7 +550,7 @@ char *s;
pfatal("explicit $error", s); /* issue msg with text */
return NULL;
}


/*
* define(s) -- handle $define directive.
*/
Expand Down Expand Up @@ -600,7 +600,7 @@ char *s;
dlookup(name, -1, (char *)NULL);
return NULL;
}


/*
* include(s) -- handle $include directive.
*/
Expand Down Expand Up @@ -658,7 +658,7 @@ char *s;
pushline(curfile->fname, curfile->lno);
return NULL;
}


/*
* ifdef(s), ifndef(s) -- conditional processing if s is/isn't defined.
*/
Expand Down Expand Up @@ -722,7 +722,7 @@ char *s;
ifdepth--;
return NULL;
}


/*
* skipcode(doelse,report) -- skip code to $else (doelse=1) or $endif (=0).
*
Expand Down Expand Up @@ -787,7 +787,7 @@ int doelse, report;
* At EOF, just return; main loop will report unterminated $if.
*/
}


/*
* Token scanning functions.
*/
Expand Down Expand Up @@ -910,7 +910,7 @@ char *dst, *src;
*dst = '\0';
return lim + 1;
}


/*
* dlookup(name, len, val) look up entry in definition table.
*
Expand Down
4 changes: 2 additions & 2 deletions src/common/long.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ char *s;
while(*s++) l++;
return l;
}


/* Shell sort with some enhancements from Knuth.. */

void lqsort( base, nel, width, cmp )
Expand Down Expand Up @@ -48,7 +48,7 @@ int (*cmp)();
}
}
#endif /* IntBits == 16 */


/*
* Write a long string in int-sized chunks.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/common/save.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef ExecImages



/*
* save(s) -- for generic BSD systems.
*/
Expand Down Expand Up @@ -62,7 +62,7 @@ int ef;
return hdr.a_data;
}
#endif /* GenericBSD */


/*
* save(s) -- for Sun Workstations.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/common/strtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct str_buf *sbuf;
sbuf->endimage = s2;
sbuf->end = sbuf->strtimage + sbuf->size;
}


/*
* spec_str - install a special string (null terminated) in the string table.
*/
Expand Down Expand Up @@ -153,7 +153,7 @@ char *s;
str_tbl[h] = se;
return s;
}


/*
* str_install - find out if the string at the end of the buffer is in
* the string table. If not, put it there. Return a pointer to the
Expand Down Expand Up @@ -203,7 +203,7 @@ struct str_buf *sbuf;
str_tbl[h] = se;
return se->s;
}


/*
* streq - compare s1 with s2 for len bytes, and return 1 for equal,
* 0 for not equal.
Expand Down
26 changes: 13 additions & 13 deletions src/common/yylex.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct node tok_loc =
{0, NULL, 0, 0}; /* "model" node containing location of current token */

struct str_buf lex_sbuf; /* string buffer for lexical analyzer */


/*
* yylex - find the next token in the input stream, and return its token
* type and value to the parser.
Expand Down Expand Up @@ -246,7 +246,7 @@ int yylex()

return (t->t_type);
}


#ifdef MultipleRuns
/*
* yylexinit - initialize variables for multiple runs
Expand All @@ -259,7 +259,7 @@ void yylexinit()
cc = '\n';
}
#endif /* MultipleRuns */


/*
* getident - gather an identifier beginning with ac. The character
* following identifier goes in cc.
Expand Down Expand Up @@ -302,7 +302,7 @@ int *cc;
return (struct toktab *)T_Ident;
}
}


/*
* findres - if the string just copied into the string space by getident
* is a reserved word, return a pointer to its entry in the token table.
Expand Down Expand Up @@ -333,7 +333,7 @@ static struct toktab *findres()
}
return NULL;
}


/*
* bufcmp - compare a null terminated string to what is in the string buffer.
*/
Expand All @@ -351,7 +351,7 @@ char *s;
else
return 0;
}


/*
* getnum - gather a numeric literal starting with ac and put the
* character following the literal into *cc.
Expand Down Expand Up @@ -445,7 +445,7 @@ int *cc;
yylval = IntNode(yytext_install(&lex_sbuf));
return T_Int;
}


/*
* getstring - gather a string literal starting with ac and place the
* character following the literal in *cc.
Expand Down Expand Up @@ -526,7 +526,7 @@ int *cc;
return T_Cset;
}
}


#if !defined(Iconc)

/*
Expand All @@ -551,7 +551,7 @@ static int ctlesc()
#endif /* !EBCDIC */

}


/*
* octesc - translate an octal escape -- backslash followed by
* one, two, or three octal digits.
Expand Down Expand Up @@ -579,7 +579,7 @@ int ac;
return ToEBCDIC[c & 0377];
#endif /* EBCDIC != 2 */
}


/*
* hexesc - translate a hexadecimal escape -- backslash-x
* followed by one or two hexadecimal digits.
Expand Down Expand Up @@ -617,7 +617,7 @@ static int hexesc()
}

#endif /* !Iconc */


/*
* setlineno - set line number from #line comment, return following char.
*/
Expand All @@ -641,7 +641,7 @@ static int setlineno()
}
return c;
}


/*
* setfilenm - set file name from #line comment, return following char.
*/
Expand All @@ -668,7 +668,7 @@ register int c;
return c;
}
}


/*
* nextchar - return the next character in the input.
*
Expand Down
Loading

0 comments on commit 0298959

Please sign in to comment.