summaryrefslogtreecommitdiffstats
path: root/usr.bin/indent
Commit message (Collapse)AuthorAgeFilesLines
* Add the Clang specific -Wmissing-variable-declarations to WARNS=6.ed2013-04-191-0/+3
| | | | | | | | | | | | | This compiler flag enforces that that people either mark variables static or use an external declarations for the variable, similar to how -Wmissing-prototypes works for functions. Due to the fact that Yacc/Lex generate code that cannot trivially be changed to not warn because of this (lots of yy* variables), add a NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this specific compiler warning. Announced on: toolchain@
* Make struct fstate aligned to the same as an int as its pointer is cast toandrew2012-12-221-1/+1
| | | | | an int pointer in args.c. This fixes an issue with ARM where the struct will be byte aligned but an int pointer must be 4 byte aligned.
* Remove superfluous paragraph macro.joel2012-03-251-3/+0
|
* Document the [n]eei and [n]bacc optionseadler2012-03-031-1/+23
| | | | | | | PR: docs/165009 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Approved by: bcr MFC after: 1 week
* Spelling fixes for usr.bin/uqs2011-12-302-5/+5
|
* In usr.bin/indent/io.c, fix a few warnings about format strings not being ↵dim2011-12-171-2/+2
| | | | | | literals. MFC after: 1 week
* Use NULL instead of 0 when setting up pointer.kevlo2010-08-101-8/+8
|
* indent(1): don't treat bare '_t' as a type name when -ta is usedavg2010-04-151-2/+3
| | | | | | | | | | It seems that identifier "_t" is sometimes used as a variable name, even in our tree. Not that I endorse that, but still it's better to require at least one character before _t suffix to consider an identifier to be a type name. Reported by: Alex Vasylenko <lxv@omut.org> MFC after: 1 week
* indent(1): add a new option, -ta, to treat all *_t identifiers as typesavg2010-03-314-0/+19
| | | | | | Submitted by: Hans Petter Selasky Discussed with: bde MFC after: 10 days
* indent(1): correctly handle case/label at the very start of a functionavg2010-03-311-1/+1
| | | | | Obtained from: NetBSD (rev. 1.11 of indent.c) MFC after: 1 week
* initialize variable (WARNS=6)charnier2006-09-131-0/+1
|
* Use the appropriate error function for displaying the error,dds2005-11-201-1/+1
| | | | | | instead of printing it to stdout. MFC after: 1 week
* Declare find_err in indent_globs.h where the other shared variablesdwmalone2005-11-133-4/+1
| | | | live rather than listing it as an extern in indent.c.
* Fix all the spelling mistakes I could find in the man pages for wordskeramida2005-07-311-2/+2
| | | | | | | | that have at least 3 characters. MFC after: 1 week Thanks to: Music band ``Chingon'' for keeping me company while searching for these.
* Expand contractions.ru2005-02-131-2/+2
|
* Expand *n't contractions.ru2005-02-131-2/+2
|
* Quote example file names consistently, and fix a small grammatical nit.ceri2005-02-041-2/+2
|
* Clarify a bit the BUGS section.keramida2005-02-031-4/+3
| | | | | | PR: docs/77024 Submitted by: Adrian Filipi <adrian@ubergeeks.com> Reviewed by: ru
* Fix a buffer overflow by using strncpy() instead of strcpy().das2004-09-191-4/+4
| | | | | | Also, use strdup() instead of malloc()/strcpy(). PR: 64164
* Deal with double whitespace.ru2004-07-031-23/+23
|
* Mechanically kill hard sentence breaks.ru2004-07-021-50/+100
|
* Bump document date.schweikh2004-06-301-1/+1
| | | | Submitted by: ru
* Document recently acquired options.schweikh2004-06-291-0/+12
| | | | | | PR: 67983 Submitted by: Chip Norkus <wd@teleri.net> MFC after: 2 weeks
* Fix problems with non-8 space tabs. New options for functionschweikh2004-06-274-15/+45
| | | | | | | | | | | declarations with the opening brace on the same line as the declaration of arguments all spaces and no tabs (a feature which exists in GNU's indent). Man page update to follow RSN. PR: bin/67983 Submitted by: Chip Norkus <wd@teleri.net> Style guidance and bug for bug compatibility by: bde MFC after: 2 weeks
* Fixed document date.ru2004-05-191-1/+1
|
* Support C-style comments in profile.des2004-03-211-3/+18
|
* Only indent once for continuation lines when not lining up withbde2004-02-122-3/+5
| | | | | | | | | | | | | | parentheses if the continuation indent is exactly half of the main indent. Indenting one contination indent for every level of parentheses gives bad results in most cases and is not what is done in about 90% of properly hand-formatted KNF code (sys/kern/*.c, nvi/common/*.c). The main advantage of the non-default KNF options -nlp -ci4 is that continuation lines don't accidentally line up with the next main indentation level or march to the right, and increasing their indentation defeats this. This behaviour change is limited to when the continuation indent is exactly half of the main indent to avoid adding yet another option.
* Added an option -ldi<N> to control indentation of local variable names.bde2004-02-094-4/+27
| | | | | | | | | | | | The default is to be backwards compatible and non-KNF (use the same indentation for locals as for globals; -ldi0 gives KNF indentation for locals (none)). The indentation for globals also applies to struct member names in local declatations. The indentation of variable names in multi-line declarations is broken in various ways and this commit gives some new variations. indent.1: Also clarified the description of -di<N>.
* Only use tabs to indent variable names if the declaration indent isbde2004-02-091-8/+8
| | | | | | | | nonzero (so that the 1-char indentation given by -di0 is never rendered by a tab). Removed garbage commented out code for setting the indentation of variable names.
* Backed out a part of previous commit that wasn;t mentioned in the logbde2004-02-091-2/+1
| | | | | message and wasn't quite ready (it avoided indenting the names of local variables).
* Fixed tab lossage in indented variable names. The -diN option wasbde2004-02-091-6/+22
| | | | | | | worse than useless because it caused things like mangling of "^int\tfoo" to "int foo" (this for N = 8). This quick fix breaks the invariant that characters between s_code and e_code have width 1, but nothing seems to depend on this.
* 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-157-21/+46
| | | | | use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering when a message is provided, use errx() instead of err().
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-3/+3
| | | | especially in troff files.
* Spellingcharnier2002-10-165-10/+13
|
* Consistently use FBSDIDobrien2002-06-306-14/+16
|
* Remove deprecated register qualifier.jmallett2002-06-247-40/+40
|
* Use `The .Nm utility'charnier2002-04-201-14/+22
|
* 1) Const enough things to avoid warnings.dwmalone2002-03-306-30/+31
| | | | | | | | 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-288-227/+310
| | | | | | | | | | | | | | - 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
* Remove whitespace at EOL.dd2001-07-151-9/+9
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* 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; }
* Fix indent endless on garbage input (i.e., if it encountered EOF whileobrien2001-02-271-1/+1
| | | | | | waiting for a '}' nesting terminator) Obtained from: OpenBSD rev 1.8
* Preceed/preceeding are not english words. Use precede and preceding.asmodai2001-02-181-1/+1
|
* Don't abuse the SCCS `@(#)' for RCS.obrien2000-12-256-6/+6
| | | | Requested by: bde
* The options I added where not formated to new manpage style specs.obrien2000-12-091-4/+7
|
OpenPOWER on IntegriCloud