summaryrefslogtreecommitdiffstats
path: root/usr.bin/indent/lexi.c
Commit message (Collapse)AuthorAgeFilesLines
* Use the appropriate error function for displaying the error,dds2005-11-201-1/+1
| | | | | | instead of printing it to stdout. MFC after: 1 week
* Fixed misformatting of "struct foo *bar" in function parameter lists. Itbde2004-02-091-8/+11
| | | | | | | | | | was mangled to "struct foo * bar". There should be an option to control this, but no space is normal. This finishes fixing the bugs in rev.1.4. indent(1) still doesn't really understand types in parameter lists. It thinks keywords inside parentheses are for casts or sizeofs. This works accidentally for scalar types and this quick fix makes it work similarly but not so accidentally for struct/union/enum types.
* Expanded the size of the keyword table from 100 to 1000 entries so thatbde2004-02-091-1/+3
| | | | | | | | | | the number of typedef-names is not so limited. Same as in rev.1.4. Added the "const" and "volatile" to the keyword table. Rev.1.4 added these but they were misclassified so they were not formatted as types. indent still doesn't really understand them. E.g., it mangles "char * const *foo" and "char *const *foo". This change mainly stops it mangling "char const foo" to "char<declaration-indent>const foo".
* Backed out rev.1.4 and 1.7 so they they can be implemented and committedbde2004-02-091-18/+5
| | | | | | | | | | | | | properly. Of the 3 changes mentioned in the log message for rev.1.4, the first (implementing -[n]fcb) was correct but didn't touch this file, the second (no-space-after-sizeof) was not actually done (it is the default and is controlled by the undcoumented -[n]bs options), and the third (no-space-after 'struct foo *') was very buggy and was reduced to wrong comments and other style bugs by backing out the main part of it in rev.1.6. Rev.1.4 had 2 changes which were not mentioned in its commit log: expand specials[] so that more than -83 typedef-names can be specified (this was the one working change in rev.1.4), and add "const" and "volatile" to specials[] (this was buggy).
* err() on allocation failure. WARNS=9 compliantcharnier2003-06-151-2/+1
| | | | | use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering when a message is provided, use errx() instead of err().
* Spellingcharnier2002-10-161-2/+2
|
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Remove deprecated register qualifier.jmallett2002-06-241-3/+3
|
* 1) Const enough things to avoid warnings.dwmalone2002-03-301-6/+7
| | | | | | | | 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cast some ptrdiff_ts to ints before using as a field width. 5) Avoid shadowing a local variable p with another local variable p.
* Make this compile cleanly when warnings are enabled:schweikh2001-10-281-44/+45
| | | | | | | | | | | | | | - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dangling elses - no more implicit int - make functions static where possible - use prototypes - don't use varargs hack for diag() Requested by: joerg MFC after: 2 weeks
* Properly handle backslash newline within an identifier or keyword.schweikh2001-10-191-1/+11
| | | | | | | | PR: bin/6015 Submitted by: myself (schweikh) Patch by: Alexey V.Neyman <alex.neyman@auriga.ru> Tested by: indenting my chess problem solver and running its test suite MFC after: 3 weeks
* Fix damage I did in rev 1.4 that broke formatting this example:obrien2001-04-201-0/+2
| | | | void foo(struct bar *bar) { return 0; }
* Don't abuse the SCCS `@(#)' for RCS.obrien2000-12-251-1/+1
| | | | Requested by: bde
* Add or fix FreeBSD IDs.obrien2000-12-091-1/+2
|
* "Implement -[n]fcb (formatting of block comments) and attempt to implementobrien2000-12-091-6/+18
| | | | | | | no-space=after-sizeof (not optional) and no-space-after 'struct foo *' (not optional). Without these, indent unKNFizes even more perfectly KNF code." Submitted by: bde
* Support integer constant unsigned-suffix and long-long-suffix.rnordier1998-05-191-3/+21
|
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+559
OpenPOWER on IntegriCloud