This commit is contained in:
Philippe Charnier 2002-10-16 13:58:39 +00:00
parent 97fa9b7739
commit dc51023cb3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105244
5 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,6 @@
$FreeBSD$
This is the C indenter, it originally came from the University of Illinois
via some distribution tape for PDP-11 Unix. It has subsequently been
hacked upon by James Gosling @ CMU. It isn't very pretty, and really needs
@ -45,7 +48,7 @@ version. David Willcox (the author) states that:
| Time passed. Some years later, indent showed up on one of the early
| emacs distributions.
|
| Later still, someone from UC Berlekey called the UofI and asked if
| Later still, someone from UC Berkeley called the UofI and asked if
| indent was in the public domain. They wanted to include it in their
| UNIX distributions, along with the emacs stuff. I was no longer at the
| UofI, but Rob Kolstad, who was, asked me about it. I told him I didn't
@ -67,7 +70,7 @@ version. David Willcox (the author) states that:
| Berkeley's copyright probably should only cover their changes, and I
| don't know their feelings about sending it out.
In any case, there appears to be noone at UofI to clarify/and change
In any case, there appears to be none at UofI to clarify/and change
that copyright, but I am confident (based on the statements of its
author) that the code, as it stands with its copyright, is
distributable, and will not cause any legal problems.

View File

@ -84,7 +84,7 @@ main(int argc, char **argv)
int i; /* local loop counter */
int scase; /* set to true when we see a case, so we will
* know what to do with the following colon */
int sp_sw; /* when true, we are in the expressin of
int sp_sw; /* when true, we are in the expression of
* if(...), while(...), etc. */
int squest; /* when this is positive, we have seen a ?
* without the matching : in a <c>?<s>:<s>
@ -359,7 +359,7 @@ main(int argc, char **argv)
fill_buffer();
break;
}
default: /* it is the start of a normal statment */
default: /* it is the start of a normal statement */
if (flushed_nl) /* if we flushed a newline, make sure it is
* put back */
force_nl = true;
@ -1104,7 +1104,7 @@ main(int argc, char **argv)
*/
if (match_state[ifdef_level].tos >= 0
&& bcmp(&ps, &match_state[ifdef_level], sizeof ps))
diag2(0, "Syntactically inconsistant #ifdef alternatives.");
diag2(0, "Syntactically inconsistent #ifdef alternatives.");
#endif
}
if (blanklines_around_conditional_compilation) {

View File

@ -241,7 +241,7 @@ struct parser_state {
int col_1; /* set to true if the last token started in
* column 1 */
int com_col; /* this is the column in which the current
* coment should start */
* comment should start */
int com_ind; /* the column in which comments to the right
* of code should start */
int com_lines; /* the number of lines with comments, set by
@ -275,7 +275,7 @@ struct parser_state {
int p_l_follow; /* used to remember how to indent following
* statement */
int paren_level; /* parenthesization level. used to indent
* within stmts */
* within statements */
short paren_indents[20]; /* column positions of each paren */
int pcase; /* set to 1 if the current line label is a
* case. It is printed differently from a

View File

@ -242,7 +242,7 @@ lexi(void)
ps.last_u_d = true;
return (decl);
}
ps.last_u_d = false; /* Operator after indentifier is binary */
ps.last_u_d = false; /* Operator after identifier is binary */
last_code = ident; /* Remember that this is the code we will
* return */
@ -362,7 +362,7 @@ lexi(void)
code = (had_eof ? 0 : newline);
/*
* if data has been exausted, the newline is a dummy, and we should
* if data has been exhausted, the newline is a dummy, and we should
* return code to stop
*/
break;

View File

@ -168,7 +168,7 @@ parse(int tk) /* tk: the code for the construct scanned */
ps.p_stack[ps.tos] = stmt;
}
else
diag2(1, "Stmt nesting error.");
diag2(1, "Statement nesting error.");
break;
case swstmt: /* had switch (...) */