Spelling
This commit is contained in:
parent
97fa9b7739
commit
dc51023cb3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105244
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
This is the C indenter, it originally came from the University of Illinois
|
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
|
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
|
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
|
| Time passed. Some years later, indent showed up on one of the early
|
||||||
| emacs distributions.
|
| 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
|
| 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
|
| 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
|
| 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
|
| Berkeley's copyright probably should only cover their changes, and I
|
||||||
| don't know their feelings about sending it out.
|
| 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
|
that copyright, but I am confident (based on the statements of its
|
||||||
author) that the code, as it stands with its copyright, is
|
author) that the code, as it stands with its copyright, is
|
||||||
distributable, and will not cause any legal problems.
|
distributable, and will not cause any legal problems.
|
||||||
|
@ -84,7 +84,7 @@ main(int argc, char **argv)
|
|||||||
int i; /* local loop counter */
|
int i; /* local loop counter */
|
||||||
int scase; /* set to true when we see a case, so we will
|
int scase; /* set to true when we see a case, so we will
|
||||||
* know what to do with the following colon */
|
* 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. */
|
* if(...), while(...), etc. */
|
||||||
int squest; /* when this is positive, we have seen a ?
|
int squest; /* when this is positive, we have seen a ?
|
||||||
* without the matching : in a <c>?<s>:<s>
|
* without the matching : in a <c>?<s>:<s>
|
||||||
@ -359,7 +359,7 @@ main(int argc, char **argv)
|
|||||||
fill_buffer();
|
fill_buffer();
|
||||||
break;
|
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
|
if (flushed_nl) /* if we flushed a newline, make sure it is
|
||||||
* put back */
|
* put back */
|
||||||
force_nl = true;
|
force_nl = true;
|
||||||
@ -1104,7 +1104,7 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if (match_state[ifdef_level].tos >= 0
|
if (match_state[ifdef_level].tos >= 0
|
||||||
&& bcmp(&ps, &match_state[ifdef_level], sizeof ps))
|
&& bcmp(&ps, &match_state[ifdef_level], sizeof ps))
|
||||||
diag2(0, "Syntactically inconsistant #ifdef alternatives.");
|
diag2(0, "Syntactically inconsistent #ifdef alternatives.");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (blanklines_around_conditional_compilation) {
|
if (blanklines_around_conditional_compilation) {
|
||||||
|
@ -241,7 +241,7 @@ struct parser_state {
|
|||||||
int col_1; /* set to true if the last token started in
|
int col_1; /* set to true if the last token started in
|
||||||
* column 1 */
|
* column 1 */
|
||||||
int com_col; /* this is the column in which the current
|
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
|
int com_ind; /* the column in which comments to the right
|
||||||
* of code should start */
|
* of code should start */
|
||||||
int com_lines; /* the number of lines with comments, set by
|
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
|
int p_l_follow; /* used to remember how to indent following
|
||||||
* statement */
|
* statement */
|
||||||
int paren_level; /* parenthesization level. used to indent
|
int paren_level; /* parenthesization level. used to indent
|
||||||
* within stmts */
|
* within statements */
|
||||||
short paren_indents[20]; /* column positions of each paren */
|
short paren_indents[20]; /* column positions of each paren */
|
||||||
int pcase; /* set to 1 if the current line label is a
|
int pcase; /* set to 1 if the current line label is a
|
||||||
* case. It is printed differently from a
|
* case. It is printed differently from a
|
||||||
|
@ -242,7 +242,7 @@ lexi(void)
|
|||||||
ps.last_u_d = true;
|
ps.last_u_d = true;
|
||||||
return (decl);
|
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
|
last_code = ident; /* Remember that this is the code we will
|
||||||
* return */
|
* return */
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ lexi(void)
|
|||||||
code = (had_eof ? 0 : newline);
|
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
|
* return code to stop
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
@ -168,7 +168,7 @@ parse(int tk) /* tk: the code for the construct scanned */
|
|||||||
ps.p_stack[ps.tos] = stmt;
|
ps.p_stack[ps.tos] = stmt;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
diag2(1, "Stmt nesting error.");
|
diag2(1, "Statement nesting error.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case swstmt: /* had switch (...) */
|
case swstmt: /* had switch (...) */
|
||||||
|
Loading…
Reference in New Issue
Block a user