Commit Graph

109 Commits

Author SHA1 Message Date
Baptiste Daroussin
98e903e7a0 Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR:		bin/140309 [1]
Submitted by:	Philippe Pepiot <ksh@philpep.org> [1]
Approved by:	des (mentor)
MFC after:	1 month
2012-05-21 13:31:26 +00:00
Ulrich Spörlein
487ac9ac21 Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
David E. O'Brien
6d4a0c96d3 Fix the build on 64-bit hosts. WARNS=6 fails on them. 2010-11-09 02:51:38 +00:00
David E. O'Brien
2d15e75781 Back out r214961 for skeleton.c -- it broke the groff build. 2010-11-08 19:00:22 +00:00
David E. O'Brien
7846096d2b Add '-y' for bison compatibility.
Obtained from:	http://invisible-island.net
2010-11-07 23:44:40 +00:00
David E. O'Brien
c81609f43f Inherit WARNS from parent directory.
Submitted by:	marius
2010-11-07 23:34:05 +00:00
David E. O'Brien
92a010d28b Directly use memory allocation functions and remove needless casts in
their usage.  Also use associated modern types instead of k&r ones.
2010-11-07 23:22:42 +00:00
David E. O'Brien
f5015507b0 Change to ANSI-C function definitions. 2010-11-07 22:51:54 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Ed Schouten
a6c287f615 Let both yacc and lex generate code that passes -Wold-style-definition.
Both these tools emit code where several functions have no `void'
keyword placed in the arugment list when the function has no arguments.
2009-12-30 22:46:08 +00:00
Ralf S. Engelschall
9ed01df370 remove external reference to not (or at least no longer) existing variable 'myname' 2009-12-17 08:37:02 +00:00
Colin Percival
5fe69bb518 Setting a variable to the same value twice doesn't actually make it
more likely to have the right value.  Remove superfluous assignments.

Found by:	LLVM/Clang Static Checker
2008-08-04 06:39:52 +00:00
Colin Percival
f9bcf9cabf Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

This commit eliminates 117 false positive bug reports of the form
"allocate memory; error out if pointer is NULL; use pointer".
2008-08-04 01:25:48 +00:00
Xin LI
c1613cd50a Indent the else path, reduce diff against OpenBSD. 2008-07-18 23:35:31 +00:00
Kevin Lo
068d36032a Fix a longstanding bug, from Otto Moerbeck:
if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action

Obtained from:	OpenBSD
2008-07-18 15:05:14 +00:00
Ruslan Ermilov
6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
Ruslan Ermilov
6a3e8b0adc Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Wes Peters
0d1bf85301 Use getopt instead of hand-rolled argument parsing. Usage remains
the same, no man page changes required.

PR:		bin/48313
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org>
Reviewed by:	joe@
2004-03-05 01:52:09 +00:00
Chad David
c979c169a7 Add __unused to the declaration of yyrcsid in a more portable way.
Discussed with: alfred, bde, jmallett, obrien
2003-02-12 18:03:55 +00:00
Chad David
0b40ce9875 Backout my previous commit as requested. This solution generates
parsers that are non-portable.
2003-02-08 17:23:22 +00:00
Chad David
143c9ae267 Add __unused to the declaration of yyrcsid. 2003-02-07 03:39:27 +00:00
Ruslan Ermilov
de95573725 mdoc(7) police: back out unproved changes from previous revision.
Approved by:	re
2002-11-26 15:34:18 +00:00
Philippe Charnier
a1843ba8bc Add section number to .Xr directive. 2002-10-16 15:46:43 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
Robert Drehmel
ddd16e87d0 Use the constants from <limits.h> for the sizes of integral C types
rather than defining them ourselves.
2002-06-11 11:27:20 +00:00
Juli Mallett
6fc8ba94c6 Note that this appeared at least as early as PWB UNIX.
Use the literal string 'PWB UNIX', as we still have no .At macro for it.
2002-06-10 22:59:59 +00:00
Ruslan Ermilov
df182f6dd1 mdoc(7) police: tidy up the markup. 2002-05-30 06:56:43 +00:00
David E. O'Brien
046eb0421e Restore some of the original variable names, but fix the warnings their
renaming addressed by removing the global variants instead.
2002-04-23 20:30:30 +00:00
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Bill Fenner
69b1a0d9c0 mdoc police: use .El to end the list in the ENVIRONMENT section. 2002-04-17 21:34:47 +00:00
David E. O'Brien
17026331d6 Quiet uninitialized warnings. 2002-04-10 03:00:50 +00:00
Ruslan Ermilov
c3e3cbe16e No longer needed to #ifdef __FBSDID, this is now handled by Makefile.inc1. 2002-04-09 11:39:05 +00:00
David E. O'Brien
dd78e49935 Revert the "tell the program name in diagnostics". What was I thinking??
warnx() already does this for us.
2002-04-05 03:21:41 +00:00
David E. O'Brien
2c7178b5fc Minor reordering of declarations to reduce diffs to OpenBSD/NetBSD. 2002-04-04 22:25:04 +00:00
David E. O'Brien
cdef1605ae Allow to compile errorlessly with GCC 3.1. 2002-04-04 22:15:56 +00:00
David E. O'Brien
653bbe6003 Fix signal race.
Use strlen() rather than magic number.
Use _PATH_TMP.

Obtained from:	OpenBSD rev 1.13 (sig race) & rev 1.9 (strlen)
2002-04-04 22:15:13 +00:00
David E. O'Brien
7a285819e3 Revert revision 1.3. This is WARNS=4 clean w/o it and it only increases
the diffs to Open/NetBSD.
2002-04-04 22:10:23 +00:00
David E. O'Brien
ff28a75fed Fix style regression introduced in rev 1.11 during a WARNS cleanup. 2002-04-04 21:59:10 +00:00
David E. O'Brien
947ba7d8b9 Add STANDARDS, ENVIRONMENT, and TABLES sections.
Obtained from:	OpenBSD
2002-04-04 21:31:03 +00:00
David E. O'Brien
daab8c603e Minor word smithing. 2002-04-04 21:24:19 +00:00
David E. O'Brien
a6fc4226b5 Follow suit with OpenBSD and NetBSD and tell the program name in diagnostics. 2002-04-04 21:09:06 +00:00
David E. O'Brien
96b0ad0ef3 Follow suit with OpenBSD and NetBSD and tell the program name in diagnostics. 2002-04-04 20:58:27 +00:00
Warner Losh
3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
Mark Murray
e35f9517d6 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
Mark Murray
e1a50fc693 WARNS=2 fix, but do not set this im Makefile, because this ill be the
default for src/usr.bin/
2001-12-11 22:13:02 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Warner Losh
bc505f7742 Only use __FBSDID if it is defined. This fixes the 4.4-release (but
not stable) -> current upgrade path.

Reviewed by: markm
2001-12-08 02:28:16 +00:00
Mark Murray
f1b6a5418e Use __FBSDID(). 2001-12-02 21:24:03 +00:00
Mark Murray
f906e265a6 WARNS=2 and s/register//.
Set NO_WERROR=true because there are some flex(1) issues that need
to be dealt with.
2001-12-01 17:34:42 +00:00