summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@gnu.org>2002-11-01 17:20:33 +0000
committerJeff Bailey <jbailey@gnu.org>2002-11-01 17:20:33 +0000
commit4a703f8271a7b17104f728f0e0a421b2ff65a966 (patch)
tree05d7a6270f23dc0dabad33feced47bbe14f4e07c /lib
parent360e5ac69c0372078359a1facd962381e38d33e0 (diff)
downloadmailutils-4a703f8271a7b17104f728f0e0a421b2ff65a966.tar.gz
mailutils-4a703f8271a7b17104f728f0e0a421b2ff65a966.tar.bz2
2002-11-01 Jeff Bailey <jbailey@gnu.org>
* mh/Makefile.am: Use MHPROGRAMS and MHLIBRARIES instead of MH_PROGRAMS and MH_LIBRARIES so that automake doesn't complain. * mail.remote/Makefile.am: Use SMTPPROGRAMS instead of SMTP_PROGRAMS so that automake doesn't complain. * configure.ac: Adjust for above changes. * mh/Makefile.am: Use AM_YFLAGS instead of YFLAGS. * libmu_scm/Makefile.am: Use AM_CPPFLAGS instead of CPPFLAGS * autogen.sh: Redo using 'autoreconf'. This is now the right tool to use for generating the build environment. * Makefile.am: Require version 1.7.1, add std-options to AUTOMAKE_OPTIONS * configure.in: Require version 2.54. Update quoting. Change AC_ARG_WITH and AC_ARG_ENABLE to use AC_HELP_STRING * m4/enable.m4: Change AC_ARG_ENABLE to use AC_HELP_STRING * lib/Makefile.am: Remove ansi2knr * lib/ansi2knr.c: Remove * lib/ansi2knr.1: Remove
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am1
-rw-r--r--lib/ansi2knr.136
-rw-r--r--lib/ansi2knr.c678
3 files changed, 0 insertions, 715 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 86e4aea0e..ed168c68c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,7 +2,6 @@
2# Copyright (C) 2000,2001,2002 Free Software Foundation 2# Copyright (C) 2000,2001,2002 Free Software Foundation
3# See file COPYING in the distribution root directory for copying conditions. 3# See file COPYING in the distribution root directory for copying conditions.
4 4
5AUTOMAKE_OPTIONS = ansi2knr
6noinst_LTLIBRARIES = libmailutils.la 5noinst_LTLIBRARIES = libmailutils.la
7 6
8SUBDIRS = posix 7SUBDIRS = posix
diff --git a/lib/ansi2knr.1 b/lib/ansi2knr.1
deleted file mode 100644
index f9ee5a631..000000000
--- a/lib/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
1.TH ANSI2KNR 1 "19 Jan 1996"
2.SH NAME
3ansi2knr \- convert ANSI C to Kernighan & Ritchie C
4.SH SYNOPSIS
5.I ansi2knr
6[--varargs] input_file [output_file]
7.SH DESCRIPTION
8If no output_file is supplied, output goes to stdout.
9.br
10There are no error messages.
11.sp
12.I ansi2knr
13recognizes function definitions by seeing a non-keyword identifier at the left
14margin, followed by a left parenthesis, with a right parenthesis as the last
15character on the line, and with a left brace as the first token on the
16following line (ignoring possible intervening comments). It will recognize a
17multi-line header provided that no intervening line ends with a left or right
18brace or a semicolon. These algorithms ignore whitespace and comments, except
19that the function name must be the first thing on the line.
20.sp
21The following constructs will confuse it:
22.br
23 - Any other construct that starts at the left margin and follows the
24above syntax (such as a macro or function call).
25.br
26 - Some macros that tinker with the syntax of the function header.
27.sp
28The --varargs switch is obsolete, and is recognized only for
29backwards compatibility. The present version of
30.I ansi2knr
31will always attempt to convert a ... argument to va_alist and va_dcl.
32.SH AUTHOR
33L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
34continues to maintain the current version; most of the code in the current
35version is his work. ansi2knr also includes contributions by Francois
36Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/lib/ansi2knr.c b/lib/ansi2knr.c
deleted file mode 100644
index 8142b3856..000000000
--- a/lib/ansi2knr.c
+++ /dev/null
@@ -1,678 +0,0 @@
1/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
2
3/*$Id$*/
4/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
5
6/*
7ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
8WARRANTY. No author or distributor accepts responsibility to anyone for the
9consequences of using it or for whether it serves any particular purpose or
10works at all, unless he says so in writing. Refer to the GNU General Public
11License (the "GPL") for full details.
12
13Everyone is granted permission to copy, modify and redistribute ansi2knr,
14but only under the conditions described in the GPL. A copy of this license
15is supposed to have been given to you along with ansi2knr so you can know
16your rights and responsibilities. It should be in a file named COPYLEFT,
17or, if there is no file named COPYLEFT, a file named COPYING. Among other
18things, the copyright notice and this notice must be preserved on all
19copies.
20
21We explicitly state here what we believe is already implied by the GPL: if
22the ansi2knr program is distributed as a separate set of sources and a
23separate executable file which are aggregated on a storage medium together
24with another program, this in itself does not bring the other program under
25the GPL, nor does the mere fact that such a program or the procedures for
26constructing it invoke the ansi2knr executable bring any other part of the
27program under the GPL.
28*/
29
30/*
31 * Usage:
32 ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
33 * --filename provides the file name for the #line directive in the output,
34 * overriding input_file (if present).
35 * If no input_file is supplied, input is read from stdin.
36 * If no output_file is supplied, output goes to stdout.
37 * There are no error messages.
38 *
39 * ansi2knr recognizes function definitions by seeing a non-keyword
40 * identifier at the left margin, followed by a left parenthesis,
41 * with a right parenthesis as the last character on the line,
42 * and with a left brace as the first token on the following line
43 * (ignoring possible intervening comments), except that a line
44 * consisting of only
45 * identifier1(identifier2)
46 * will not be considered a function definition unless identifier2 is
47 * the word "void", and a line consisting of
48 * identifier1(identifier2, <<arbitrary>>)
49 * will not be considered a function definition.
50 * ansi2knr will recognize a multi-line header provided
51 * that no intervening line ends with a left or right brace or a semicolon.
52 * These algorithms ignore whitespace and comments, except that
53 * the function name must be the first thing on the line.
54 * The following constructs will confuse it:
55 * - Any other construct that starts at the left margin and
56 * follows the above syntax (such as a macro or function call).
57 * - Some macros that tinker with the syntax of function headers.
58 */
59
60/*
61 * The original and principal author of ansi2knr is L. Peter Deutsch
62 * <ghost@aladdin.com>. Other authors are noted in the change history
63 * that follows (in reverse chronological order):
64 lpd 1999-04-12 added minor fixes from Pavel Roskin
65 <pavel_roskin@geocities.com> for clean compilation with
66 gcc -W -Wall
67 lpd 1999-03-22 added hack to recognize lines consisting of
68 identifier1(identifier2, xxx) as *not* being procedures
69 lpd 1999-02-03 made indentation of preprocessor commands consistent
70 lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
71 endless loop; quoted strings within an argument list
72 confused the parser
73 lpd 1999-01-24 added a check for write errors on the output,
74 suggested by Jim Meyering <meyering@ascend.com>
75 lpd 1998-11-09 added further hack to recognize identifier(void)
76 as being a procedure
77 lpd 1998-10-23 added hack to recognize lines consisting of
78 identifier1(identifier2) as *not* being procedures
79 lpd 1997-12-08 made input_file optional; only closes input and/or
80 output file if not stdin or stdout respectively; prints
81 usage message on stderr rather than stdout; adds
82 --filename switch (changes suggested by
83 <ceder@lysator.liu.se>)
84 lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
85 compilers that don't understand void, as suggested by
86 Tom Lane
87 lpd 1996-01-15 changed to require that the first non-comment token
88 on the line following a function header be a left brace,
89 to reduce sensitivity to macros, as suggested by Tom Lane
90 <tgl@sss.pgh.pa.us>
91 lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
92 undefined preprocessor symbols as 0; changed all #ifdefs
93 for configuration symbols to #ifs
94 lpd 1995-04-05 changed copyright notice to make it clear that
95 including ansi2knr in a program does not bring the entire
96 program under the GPL
97 lpd 1994-12-18 added conditionals for systems where ctype macros
98 don't handle 8-bit characters properly, suggested by
99 Francois Pinard <pinard@iro.umontreal.ca>;
100 removed --varargs switch (this is now the default)
101 lpd 1994-10-10 removed CONFIG_BROKETS conditional
102 lpd 1994-07-16 added some conditionals to help GNU `configure',
103 suggested by Francois Pinard <pinard@iro.umontreal.ca>;
104 properly erase prototype args in function parameters,
105 contributed by Jim Avera <jima@netcom.com>;
106 correct error in writeblanks (it shouldn't erase EOLs)
107 lpd 1989-xx-xx original version
108 */
109
110/* Most of the conditionals here are to make ansi2knr work with */
111/* or without the GNU configure machinery. */
112
113#if HAVE_CONFIG_H
114# include <config.h>
115#endif
116
117#include <stdio.h>
118#include <ctype.h>
119
120#if HAVE_CONFIG_H
121
122/*
123 For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
124 This will define HAVE_CONFIG_H and so, activate the following lines.
125 */
126
127# if STDC_HEADERS || HAVE_STRING_H
128# include <string.h>
129# else
130# include <strings.h>
131# endif
132
133#else /* not HAVE_CONFIG_H */
134
135/* Otherwise do it the hard way */
136
137# ifdef BSD
138# include <strings.h>
139# else
140# ifdef VMS
141 extern int strlen(), strncmp();
142# else
143# include <string.h>
144# endif
145# endif
146
147#endif /* not HAVE_CONFIG_H */
148
149#if STDC_HEADERS
150# include <stdlib.h>
151#else
152/*
153 malloc and free should be declared in stdlib.h,
154 but if you've got a K&R compiler, they probably aren't.
155 */
156# ifdef MSDOS
157# include <malloc.h>
158# else
159# ifdef VMS
160 extern char *malloc();
161 extern void free();
162# else
163 extern char *malloc();
164 extern int free();
165# endif
166# endif
167
168#endif
169
170/* Define NULL (for *very* old compilers). */
171