Commit Graph

65 Commits

Author SHA1 Message Date
joerg
dae9bc894f Avoid common symbol declarations 2020-04-23 00:17:34 +00:00
christos
8451d1ca24 use stdarg, annotate function as __printflike and fix broken formats. 2019-10-19 15:44:31 +00:00
wiz
95f5209749 New sentence, new line. Whitespace fixes. 2019-04-04 22:02:06 +00:00
kamil
b844317c23 FreeBSD indent r340138 2019-04-04 20:39:17 +00:00
kamil
d845d12b1a Upgrade indent(1)
Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

 - Added an option -ldi<N> to control indentation of local variable names.
 - Added option -P for loading user-provided files as profiles
 - Added -tsn for setting tabsize
 - Rename -nsac/-sac ("space after cast") to -ncs/-cs
 - Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
 - Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
 - Group global option variables into an options structure
 - Use bsearch() for looking up type keywords.
 - Don't produce unneeded space character in function declarators
 - Don't unnecessarily add a blank before a comment ends.
 - Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
2019-04-04 15:27:35 +00:00
kamil
d6a1bc3f07 Upgrade indent(1)
Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

 - Added an option -ldi<N> to control indentation of local variable names.
 - Added option -P for loading user-provided files as profiles
 - Added -tsn for setting tabsize
 - Rename -nsac/-sac ("space after cast") to -ncs/-cs
 - Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
 - Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
 - Group global option variables into an options structure
 - Use bsearch() for looking up type keywords.
 - Don't produce unneeded space character in function declarators
 - Don't unnecessarily add a blank before a comment ends.
 - Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.
2019-04-04 15:22:13 +00:00
mrg
fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
sevan
39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
dholland
f6685469c0 Fix CSRG-era typo: typedef, not typdef. Spotted by Piotr Stefaniak. 2016-06-05 18:35:32 +00:00
wiz
2aa636aa06 Remove trailing whitespace. 2016-02-25 14:55:56 +00:00
ginsbach
522de9efc9 Fix obvious contraction spelling mistakes by adding missing apostrophes. 2016-02-25 13:23:27 +00:00
ginsbach
7a1819b192 Remove double space before [.,:] in macro arguments. 2016-02-24 17:38:15 +00:00
ginsbach
5299bba682 Add the [n]ei and [n]eei options to the synopsis; already documented in
description.
2016-02-24 17:13:48 +00:00
ginsbach
3660d7d0e7 Use warnx(3). 2016-02-22 22:01:48 +00:00
ginsbach
db3e293160 Stray '\n' in errx(3) format. 2016-02-22 21:20:29 +00:00
ginsbach
781408a293 Use errx(3). 2016-02-22 19:04:18 +00:00
mrg
a1ff035944 port the -ut / -nut options from freebsd. -ut (default) enables tabs
in output, the -nut uses spaces.
2014-09-04 04:06:07 +00:00
njoly
bee4003ac7 Remove a few unneeded Pp macros. 2012-10-13 14:18:16 +00:00
wiz
1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
wiz
2f3e33b8d2 Spell out parenthesis. From Ryo HAYASAKA in PR 44372. 2011-01-12 06:17:52 +00:00
lukem
3a944ba17e Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare) 2009-04-12 11:09:49 +00:00
joerg
614d810747 Remove physical markup. 2009-03-24 00:17:25 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
peter
e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
wiz
c825c1ecf5 When marking up "C", use .Tn consisntently. From YOMURA Masanori in private mail. 2005-09-11 23:17:34 +00:00
dsl
b23af931be Add (unsigned char) cast to ctype functions 2004-10-30 17:43:02 +00:00
itojun
4f228a52dc safer use of realloc 2003-10-16 06:45:22 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
itojun
3f02ac18b7 use bounded string op 2003-07-14 09:44:00 +00:00
christos
fc24d74cc3 PR/21645: Mishka: Localized comments don't work with indent. 2003-06-19 15:45:22 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
44e7d056da Remove #ifndef'd __STDC__ code. ANSIfy. 2002-05-26 22:53:38 +00:00
kristerw
dba96eaf2b Recognize all C9x integer constants (ISO/IEC 9899:1999 section 6.4.4.1)
Patch taken from FreeBSD.

Fixes PR bin/9219.
2002-03-22 22:30:02 +00:00
wiz
71a64b7c8a .Pp not necessary before or after .Ss/.Sh. 2001-12-01 19:27:33 +00:00
wiz
1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
kristerw
9e13614e51 Correct a minor nroff nit.
This closes PR bin/9220.
2001-07-20 13:43:50 +00:00
kleink
7902fe0dc9 Handle a labeled statement at the beginning of a function correctly;
from Nagae Hidetake <nagae@tk.airnet.ne.jp> in PR bin/12781.
2001-06-16 21:47:42 +00:00
fair
203b7d74ef Correct one typo in the patch from PR 9220. 2001-03-23 20:12:41 +00:00
fair
fb3c4927d6 Commit patch from PR 9220 to document all options, and consistently
document defaults. Also, clean up nroff nits.
2001-03-16 06:23:20 +00:00
is
4bd5d81118 Due to infinite wisdom by the language designers, the difference of pointers
has a type of (int) on i386 and (long) on sparc, and I don't even want to
know what else on other cpu types.
2000-10-14 18:07:10 +00:00
is
135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
mycroft
08d7dabc15 Remove a spurious .ne. 1999-03-24 06:25:57 +00:00
garbled
9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
kristerw
6d5adc08bd Made indent recognize the [fF], [uU], [lL], [uU][lL], [lL][lL], and
[uU][lL][lL] constant suffixes. (PR bin/6516 by Brian Ginsbach)
1999-03-15 20:28:45 +00:00
mycroft
a1c657fe56 Clean up SYNOPSIS formatting. 1999-03-07 11:29:58 +00:00
christos
be59268229 char -> unsigned char, braces for gcc-2.8.1 1998-12-19 17:00:08 +00:00
wsanchez
ab92b4feee Get rid of multiply defined common symbols 1998-10-08 01:30:27 +00:00
mellon
dccbf9bc96 Support indenting standard input. When indenting standard input, write output to standard output. 1998-09-06 20:17:30 +00:00
ross
f670fa10c5 Add { and } to shut up egcs. Reformat the more questionable code. 1998-08-25 20:59:36 +00:00
mrg
71f20d7c82 use static int instead of static 1998-03-30 02:25:33 +00:00