2 .TH ANSI2KNR 1 "9 September 1998" \" -*- nroff -*-
4 ansi2knr \- convert ANSI C to Kernighan & Ritchie C
6 \fBansi2knr\fR [\fB--filename\fR \fIfilename\fR] [\fIinput_file\fR [\fIoutput_file\fR]]
9 \fB--filename\fR provides the file name for the #line directive in the output,
10 overriding \fIinput_file\fR (if present).
12 If no \fIinput_file\fR is supplied, input is read from stdin.
14 If no \fIoutput_file\fR is supplied, output goes to stdout.
16 There are no error messages.
19 recognizes function definitions by seeing a non-keyword identifier at the left
20 margin, followed by a left parenthesis, with a right parenthesis as the last
21 character on the line, and with a left brace as the first token on the
22 following line (ignoring possible intervening comments). It will recognize a
23 multi-line header provided that no intervening line ends with a left or right
24 brace or a semicolon. These algorithms ignore whitespace and comments, except
25 that the function name must be the first thing on the line.
27 The following constructs will confuse it:
29 - Any other construct that starts at the left margin and follows the
30 above syntax (such as a macro or function call).
32 - Some macros that tinker with the syntax of the function header.
34 The --varargs switch is obsolete, and is recognized only for
35 backwards compatibility. The present version of
37 will always attempt to convert a ... argument to va_alist and va_dcl.
39 L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
40 continues to maintain the current version; most of the code in the current
41 version is his work. ansi2knr also includes contributions by Francois
42 Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.