The NetBSD Project

CVS log for src/usr.bin/indent/args.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / indent

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.73 / (download) - annotate - [select for diffs], Fri Jan 20 00:24:25 2023 UTC (11 days, 9 hours ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

indent: fix misleading comment

Revision 1.72 / (download) - annotate - [select for diffs], Thu Nov 25 21:48:23 2021 UTC (14 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10
Changes since 1.71: +7 -7 lines
Diff to previous 1.71 (colored)

indent: make error message for missing command line arguments clearer

Revision 1.71 / (download) - annotate - [select for diffs], Fri Nov 19 20:23:17 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.70: +4 -6 lines
Diff to previous 1.70 (colored)

indent: reduce casts to unsigned char for character classification

No functional change.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Nov 7 18:09:56 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

indent: parse special options strictly

Revision 1.69 / (download) - annotate - [select for diffs], Fri Nov 5 21:52:17 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.68: +8 -8 lines
Diff to previous 1.68 (colored)

indent: clean up argument parsing

In struct pro, place the dependent member below its dependency.

In load_profile, consistently use -1 when outside a comment.

No functional change.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Oct 31 22:38:12 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (colored)

indent: clean up

Initialize buffers in reading order, make comments more expressive,
rename add_typename to register_typename, remove unused macro.

No functional change.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Oct 29 19:52:59 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.66: +3 -5 lines
Diff to previous 1.66 (colored)

indent: parse options in a platform-independent way

Previously, on an ILP32 platform, the option '-ts30000000000000000'
resulted in the error message 'must be an integer', on LP64 platforms it
resulted in the error message 'must be between 1 and 80'. Remove this
unnecessary difference.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Oct 28 22:20:08 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

indent: clean up indentation, comments, reduce

No functional change.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Oct 28 21:35:57 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.64: +3 -4 lines
Diff to previous 1.64 (colored)

indent: fix error message for buffer overflow during option parsing

At this early time, the input file has not been opened yet, so there is
no reason to output either the input file name or the line number.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Oct 28 21:32:48 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.63: +25 -22 lines
Diff to previous 1.63 (colored)

indent: make error messages for option parsing more precise

Revision 1.63 / (download) - annotate - [select for diffs], Thu Oct 28 21:02:04 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.62: +8 -9 lines
Diff to previous 1.62 (colored)

indent: parse option '-cli' strictly

Revision 1.62 / (download) - annotate - [select for diffs], Thu Oct 28 20:49:36 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.61: +71 -70 lines
Diff to previous 1.61 (colored)

indent: topologically sort functions

No functional change.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Oct 28 20:31:17 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.60: +3 -5 lines
Diff to previous 1.60 (colored)

indent: change product name, update version number

NetBSD's indent has deviated enough from FreeBSD's indent to warrant a
different product name. When indent was copied from FreeBSD in 2019,
that update introduced several new bugs, some of which have been fixed
in the NetBSD version.

NetBSD indent, unlike FreeBSD indent, supports C99 comments and C99
initializer designators.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Oct 26 19:36:30 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

indent: run indent on its own source code

With manual corrections afterwards, to compensate for the remaining bugs
in indent.

Without the type definitions in .indent.pro, the opening braces of the
functions kw_name and lexi_alnum would not be at the beginning of the
line.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Oct 24 19:14:33 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

indent: run indent on its own source code

With manual corrections afterwards. Indent still does not get
extra_expr_indent correctly, it also indents global variables after
tagged declarations too deep.

No functional change.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Oct 24 11:19:25 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored)

indent: rename nitems to array_length

Revision 1.57 / (download) - annotate - [select for diffs], Sun Oct 24 10:54:12 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

indent: sort includes

Revision 1.56 / (download) - annotate - [select for diffs], Sun Oct 17 18:13:00 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.55: +27 -17 lines
Diff to previous 1.55 (colored)

indent: parse int command line options strictly

On i386 and other platforms where LONG_MAX == INT_MAX, the test
t_errors/option_tabsize_very_large failed since the behavior on integer
overflow differs between ILP32 and LP64 platforms. Noticed by gson@.

Avoid this unintended difference by adding reasonable limits for each of
the integer options and by replacing atoi with strtol.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 13 23:33:52 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.54: +6 -5 lines
Diff to previous 1.54 (colored)

indent: check command line options stricter

Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Oct 8 20:07:44 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.53: +6 -6 lines
Diff to previous 1.53 (colored)

indent: clean up argument handling

Sort the macros, remove redundancy from comment.

Remove redundant lint comment. Lint still does not recognize
__attribute__((__noreturn__)), but it also doesn't perform advanced
control flow analysis, so there is no point in having the comment, as it
doesn't suppress any warnings.

No functional change.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Oct 8 19:27:20 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.52: +20 -22 lines
Diff to previous 1.52 (colored)

indent: unexport add_typedefs_from_file

No functional change.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Oct 8 19:03:34 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.51: +6 -6 lines
Diff to previous 1.51 (colored)

indent: run indent on indent.h

The formatting looks mostly OK.

Some struct members had excessively long names, leaving no space for
their corresponding comments. Renamed some of them using well-known
abbreviations.

The formatting for debug_vis_range is messed up, no idea why. It is
clearly a function declaration, not a function definition, so there is
no need to place the function name in column 1.

No functional change.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Oct 7 22:56:49 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored)

indent: rename opt.btype_2 to brace_same_line

No functional change.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Oct 7 21:41:59 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.49: +3 -6 lines
Diff to previous 1.49 (colored)

indent: fix wrong or outdated comments

No functional change.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Oct 7 19:42:41 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.48: +7 -11 lines
Diff to previous 1.48 (colored)

indent: remove global variable option_source

It is only needed at startup, while parsing the options. The string "?"
was not needed at all.

No functional change.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Oct 7 18:32:09 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

indent: raise WARNS from the default 5 up to 6

Revision 1.47 / (download) - annotate - [select for diffs], Thu Oct 7 18:07:25 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.46: +5 -4 lines
Diff to previous 1.46 (colored)

tests/indent: test parsing of command line options in profile file

Revision 1.46 / (download) - annotate - [select for diffs], Thu Oct 7 17:38:21 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.45: +11 -8 lines
Diff to previous 1.45 (colored)

indent: complain if the profile from the command line does not exist

Revision 1.45 / (download) - annotate - [select for diffs], Thu Oct 7 17:31:33 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.44: +21 -25 lines
Diff to previous 1.44 (colored)

indent: allow long comments in profile files

When reading a comment in a profile file, don't store the characters of
the comment in the buffer, just skip them. This allows for long comments
without triggering overflow errors.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 7 16:45:38 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.43: +6 -2 lines
Diff to previous 1.43 (colored)

indent: prevent buffer overflow when reading profile

Revision 1.43 / (download) - annotate - [select for diffs], Sun Oct 3 19:09:59 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.42: +11 -11 lines
Diff to previous 1.42 (colored)

indent: clean up load_profile

No functional change.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Oct 3 18:53:37 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.41: +17 -17 lines
Diff to previous 1.41 (colored)

indent: reduce duplicate code in load_profiles

No functional change.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Oct 3 18:44:51 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.40: +25 -30 lines
Diff to previous 1.40 (colored)

indent: rename functions

There was no good reason for using the different verbs 'scan' and 'set'
for two functions that essentially do the same.

No functional change.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Oct 3 18:41:36 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

indent: fix content of profile_name

Previously, profile_name included the leading "-P", which was confusing.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Sep 26 21:05:48 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored)

indent: unexport keyword table, clean up

No functional change.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Sep 26 20:48:10 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.37: +43 -43 lines
Diff to previous 1.37 (colored)

indent: force all option variables to be in struct options

No functional change.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Sep 26 20:43:44 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.36: +16 -13 lines
Diff to previous 1.36 (colored)

indent: reduce memory usage of the options table

Almost all boolean options are negatable, so model this directly instead
of saving each option twice. This saves memory, is faster and more
directly models reality.

No functional change.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Sep 26 20:21:47 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.35: +19 -14 lines
Diff to previous 1.35 (colored)

indent: list options in the same order as in the manual page

No functional change.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Sep 26 20:12:37 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.34: +30 -52 lines
Diff to previous 1.34 (colored)

indent: reduce code for listing the options

After this change, the few options that do not follow the standard
scheme become more visible. They are '-bl', '-br' and '-ta'.

No functional change.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Sep 26 19:57:23 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

indent: negate and rename option.leave_comma

The old name did not mirror the description in the manual page, and it
was the only option that is negated. Inverting it allows the options
table to be compressed.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Sep 26 19:37:11 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.32: +14 -14 lines
Diff to previous 1.32 (colored)

indent: let indent format its own code -- in supervised mode

After running indent on the code, I manually selected each change that
now looks better than before. The remaining changes are left for later.
All in all, indent did a pretty good job, except for syntactic additions
from after 1990, but that was to be expected. Examples for such
additions are GCC's __attribute__ and C99 designated initializers.

Indent has only few knobs to tune the indentation. The knob for the
continuation indentation applies to function declarations as well as to
expressions. The knob for indentation of local variable declarations
applies to struct members as well, even if these are members of a
top-level struct.

Several code comments crossed the right margin in column 78. Several
other code comments were correctly broken though. The cause for this
difference was not obvious.

No functional change.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Sep 26 00:57:28 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.31: +75 -93 lines
Diff to previous 1.31 (colored)

indent: handle special options separately

Handling the special options separately removes the need for several
macro definitions. It saves a bit of memory since without the option
'--version', the option names are shorter.

No functional change.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Sep 25 23:38:45 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.30: +72 -76 lines
Diff to previous 1.30 (colored)

indent: reduce abstraction layer for defining boolean options

When initializing a boolean option, the most natural values are true and
false. Replace the previous values ON and OFF with them.

No functional change.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Sep 25 22:16:58 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.29: +17 -15 lines
Diff to previous 1.29 (colored)

indent: clean up argument handling

No functional change.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Sep 25 21:42:43 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.28: +10 -12 lines
Diff to previous 1.28 (colored)

indent: clean up argument handling

No functional change.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Sep 25 21:20:59 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

indent: reduce binary size

No functional change.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Sep 25 18:49:03 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

indent: rename option variable to be more expressive

No functional change.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Sep 25 17:20:02 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)

indent: convert options from ibool to bool

No functional change intended.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Sep 25 17:11:23 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.24: +94 -83 lines
Diff to previous 1.24 (colored)

indent: prepare for lint's strict bool mode

Before C99, C had no boolean type. Instead, indent used int for that,
just like many other programs. Even with C99, bool and int can be used
interchangeably in many situations, such as querying '!i' or '!ptr' or
'cond == 0'.

Since January 2021, lint provides the strict bool mode, which makes bool
a non-arithmetic type that is incompatible with any other type. Having
clearly separate types helps in understanding the code.

To migrate indent to strict bool mode, the first step is to apply all
changes that keep the resulting binary the same. Since sizeof(bool) is
1 and sizeof(int) is 4, the type ibool serves as an intermediate type.
For now it is defined to int, later it will become bool.

The current code compiles cleanly in C99 and C11 mode, as well as in
lint's strict bool mode. There are a few tricky places:

In args.c in 'struct pro', there are two types of options: boolean and
integer. Boolean options point to a bool variable, integer options
point to an int variable. To keep the current structure of the code,
the pointer has been changed to 'void *'. To ensure type safety, the
definition of the options is done via preprocessor magic, which in C11
mode ensures the correct pointer types. (Add CFLAGS+=-std=gnu11 at the
very bottom of the Makefile.)

In indent.c in process_preprocessing, a boolean variable is
post-incremented. That variable is only assigned to another variable,
and that variable is only used in a boolean context. To provoke a
different behavior between the '++' and the '= true', the source code
to be indented would need 1 << 32 preprocessing directives, which is
unlikely to happen in practice.

In io.c in dump_line, the variables ps.in_stmt and ps.in_decl only ever
get the values 0 and 1. For these values, the expressions 'a & ~b' and
'a && !b' are equivalent, in all versions of C. The compiler may
generate different code for them, though.

In io.c in parse_indent_comment, the assignment to inhibit_formatting
takes place in integer context. If the compiler is smart enough to
detect the possible values of on_off, it may generate the same code
before and after the change, but that is rather unlikely.

The second step of the migration will be to replace ibool with bool,
step by step, just in case there are any hidden gotchas in the code,
such as sizeof or pointer casts.

No change to the resulting binary.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Sep 25 14:16:06 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.23: +73 -91 lines
Diff to previous 1.23 (colored)

indent: clean up initialization of options

The default values in 'struct pro' were redundant but all consistent,
even with the commented defaults in main_parse_command_line.

No functional change.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Sep 25 13:38:32 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.22: +2 -6 lines
Diff to previous 1.22 (colored)

indent: remove ifdef for lint

NetBSD lint does not need them anymore, FreeBSD does not have lint.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Mar 14 00:22:16 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored)

indent: fix lint warnings

No functional change.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Mar 13 13:51:08 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored)

indent: distinguish between 'column' and 'indentation'

column == 1 + indentation.

In addition, indentation is a relative distance while column is an
absolute position.  Therefore, don't confuse these two concepts, to
prevent off-by-one errors.

No functional change.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Mar 13 11:19:43 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +4 -4 lines
Diff to previous 1.19 (colored)

indent: fix confusing variable names

The word 'col' should only be used for the 1-based column number.  This
name is completely inappropriate for a line length since that provokes
off-by-one errors.  The name 'cols' would be acceptable although
confusing since it sounds so similar to 'col'.

Therefore, rename variables that are related to the maximum line length
to 'line_length' since that makes for obvious code and nicely relates to
the description of the option in the manual page.

No functional change.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Mar 12 23:10:18 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +3 -4 lines
Diff to previous 1.18 (colored)

indent: use consistent indentation for 'else'

Half of the code used -ce, the other half the opposite -nce.

No functional change.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Mar 9 16:48:28 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored)

indent: manually indent comments

It's strange that indent's own code is not formatted by indent itself,
which would be a good demonstration of its capabilities.

In its current state, I don't trust indent to get even the tokenization
correct, therefore the only safe way is to format the code manually.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 7 20:52:11 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +7 -9 lines
Diff to previous 1.16 (colored)

indent: sprinkle a few const

No functional change.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Mar 7 20:47:13 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

indent: remove redundant parentheses around return value

No functional change.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 7 10:42:48 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.14: +11 -11 lines
Diff to previous 1.14 (colored)

indent: use all headers in all files

This is a prerequisite for converting the token types to an enum instead
of a preprocessor define, since the return type of lexi will become
token_type.  Having the enum will make debugging easier.

There was a single naming collision, which forced the variable in
scan_profile to be renamed.  All other token names are used nowhere
else.

No change to the resulting binary.

Revision 1.13.16.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:20 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.13: +248 -349 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Thu Apr 4 20:39:17 2019 UTC (3 years, 9 months ago) by kamil
Branch: FREEBSD, CSRG
CVS Tags: r340138
Changes since 1.1.1.1: +173 -119 lines
Diff to previous 1.1.1.1 (colored)

FreeBSD indent r340138

Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 4 15:22:13 2019 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Changes since 1.13: +248 -349 lines
Diff to previous 1.13 (colored)

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.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Feb 22 21:20:29 2016 UTC (6 years, 11 months ago) by ginsbach
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Stray '\n' in errx(3) format.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Feb 22 19:04:18 2016 UTC (6 years, 11 months ago) by ginsbach
Branch: MAIN
Changes since 1.11: +9 -13 lines
Diff to previous 1.11 (colored)

Use errx(3).

Revision 1.10.24.1 / (download) - annotate - [select for diffs], Sun Sep 21 18:58:56 2014 UTC (8 years, 4 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.10: +8 -2 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Pull up following revision(s) (requested by mrg in ticket #110):
	usr.bin/indent/io.c: revision 1.15
	usr.bin/indent/indent_globs.h: revision 1.10
	usr.bin/indent/args.c: revision 1.11
	usr.bin/indent/indent.1: revision 1.23
	usr.bin/indent/indent.c: revision 1.19
port the -ut / -nut options from freebsd.  -ut (default) enables tabs
in output, the -nut uses spaces.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 4 04:06:07 2014 UTC (8 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.10: +8 -2 lines
Diff to previous 1.10 (colored)

port the -ut / -nut options from freebsd.  -ut (default) enables tabs
in output, the -nut uses spaces.

Revision 1.9.42.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:52 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.10 / (download) - annotate - [select for diffs], Sun Apr 12 11:09:49 2009 UTC (13 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Branch point for: netbsd-7
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored)

Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)

Revision 1.9 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:07 2003 UTC (19 years, 5 months ago) by agc
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, mjf-devfs2-base, mjf-devfs2, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: jym-xensuspend
Changes since 1.8: +29 -2 lines
Diff to previous 1.8 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 14 09:44:00 2003 UTC (19 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.7: +6 -5 lines
Diff to previous 1.7 (colored)

use bounded string op

Revision 1.7 / (download) - annotate - [select for diffs], Sun May 26 22:53:38 2002 UTC (20 years, 8 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.6: +7 -11 lines
Diff to previous 1.6 (colored)

Remove #ifndef'd __STDC__ code. ANSIfy.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 19 17:00:08 1998 UTC (24 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, minoura-xpg4dl-base, minoura-xpg4dl, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

char -> unsigned char, braces for gcc-2.8.1

Revision 1.5 / (download) - annotate - [select for diffs], Sun Oct 19 03:17:12 1997 UTC (25 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.4: +322 -192 lines
Diff to previous 1.4 (colored)

WARNSify, fix .Nm usage, deprecate register, use <err.h>, KNFify (with indent!;)

Revision 1.4 / (download) - annotate - [select for diffs], Sat Oct 18 16:04:26 1997 UTC (25 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.3: +9 -5 lines
Diff to previous 1.3 (colored)

merge lite-2.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 9 20:20:09 1997 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

RCS ID police

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:14:36 1993 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1, netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

Add RCS identifiers.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Jun 6 21:52:03 1993 UTC (29 years, 8 months ago) by mrg
Branch: FREEBSD, CSRG
CVS Tags: lite-2
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

4.4BSD-Lite2

Revision 1.1 / (download) - annotate - [select for diffs], Fri Apr 9 12:59:07 1993 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8

added, from net/2 (patch 124).

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>