OpenBSD CVS

CVS log for src/usr.bin/yacc/skeleton.c


[BACK] Up to [local] / src / usr.bin / yacc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Wed Feb 3 01:10:10 2021 UTC (3 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.39: +3 -5 lines
Diff to previous 1.39 (colored)

remove ancient malloc ? realloc dance.  always use realloc.
ok millert tb

Revision 1.39 / (download) - annotate - [select for diffs], Thu Dec 31 23:22:39 2015 UTC (8 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Declare yyparse() so the generated code is safe with
-Werror-implicit-function-declaration

ok millert@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Dec 30 17:16:47 2015 UTC (8 years, 4 months ago) by mmcc
Branch: MAIN
Changes since 1.37: +17 -9 lines
Diff to previous 1.37 (colored)

Back out of 1.36 and 1.37, which made simplifications to allocation
logic based on C89. It broke a few C++ ports. Prompted by kettenis@

Revision 1.37 / (download) - annotate - [select for diffs], Wed Dec 30 14:45:38 2015 UTC (8 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

put back casts for realloc because c++ needs them. reported by naddy

Revision 1.36 / (download) - annotate - [select for diffs], Mon Dec 28 19:14:04 2015 UTC (8 years, 4 months ago) by mmcc
Branch: MAIN
Changes since 1.35: +9 -17 lines
Diff to previous 1.35 (colored)

realloc and free's behavior when passed NULL is defined by C89, so we
can safely assume it.

ok millert@. Also discussed with deraadt@, sthen@, and espie@.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Mar 16 18:38:30 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

lint is dead (long live the lint!), so stop using it as a cpp conditional
(namespace pollution!) or talking about its opinion on code.

ok krw@

Revision 1.34 / (download) - annotate - [select for diffs], Fri Mar 7 19:44:07 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.33: +3 -6 lines
Diff to previous 1.33 (colored)

a few other tweaks it's easier to see in the light of day

Revision 1.33 / (download) - annotate - [select for diffs], Fri Mar 7 19:34:49 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.32: +327 -332 lines
Diff to previous 1.32 (colored)

drag this code into modern style. ok zhuk

Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 21 02:18:00 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.31: +6 -34 lines
Diff to previous 1.31 (colored)

drop support for pre-standard C, it's time to move on. ok deraadt

Revision 1.31 / (download) - annotate - [select for diffs], Wed Oct 30 20:33:00 2013 UTC (10 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.30: +7 -6 lines
Diff to previous 1.30 (colored)

Make yystacksize unsigned to avoid a warning about sign comparision
mismatches.  Also store the result of "yyssp - yyss" in a long, not
an int.  We could use ptrdiff_t but don't want to rely on that type
being defined for portability on old systems without it.  OK deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:50 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.29: +1 -17 lines
Diff to previous 1.29 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jul 8 15:06:50 2008 UTC (15 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.28: +7 -3 lines
Diff to previous 1.28 (colored)

Fix an venerable bug: 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.  Detected by my new malloc,
experienced by sturm@ on sparc64; ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Sep 3 21:14:58 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.27: +13 -4 lines
Diff to previous 1.27 (colored)

move back to using malloc() instead of calloc(), because the yacc
skeleton really should only call malloc/realloc/free, no other external
APIs at all.  theefore, add a pre-check for the overflow case, thus
protecting realloc too; tested mblamer, ok millert, help from kettenis

Revision 1.27 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:36 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.26 / (download) - annotate - [select for diffs], Thu Apr 20 16:51:32 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

use new LINTED keyword for a global which is perhaps not used, but must
be there; ok cloder

Revision 1.25 / (download) - annotate - [select for diffs], Thu Apr 20 03:07:36 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored)

yydebug has to always be there, even if it is not used.  this pleases
lint on every program that has a .y in it....; ok cloder though he does
not understand yet

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 10 16:40:45 2005 UTC (18 years, 11 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

-Wall clean; ok otto deraadt

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 12 13:39:50 2004 UTC (20 years, 2 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.22: +16 -2 lines
Diff to previous 1.22 (colored)

fix memory leak in the code yacc generates, ok millert deraadt

Revision 1.22 / (download) - annotate - [select for diffs], Tue Nov 25 20:00:15 2003 UTC (20 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

obvious fix for gcc3.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jun 19 16:34:53 2003 UTC (20 years, 11 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.20: +3 -4 lines
Diff to previous 1.20 (colored)

ansify; ok miod

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:24 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.19: +3 -7 lines
Diff to previous 1.19 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 3 21:34:21 2002 UTC (21 years, 5 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.18: +23 -12 lines
Diff to previous 1.18 (colored)

constify the not yet constified tables, use defined(__STDC__) instead of ifdef __STC__ where appropriate; millert@ ok

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:18 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.17: +9 -9 lines
Diff to previous 1.17 (colored)

kill more registers

millert@ ok

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 16 06:29:45 2001 UTC (22 years, 10 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored)

-Wall cleanup; ok deraadt

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 26 00:03:33 2001 UTC (23 years, 2 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.15: +13 -4 lines
Diff to previous 1.15 (colored)

Silence some warnings in generated grammers compiled with YYDEBUG;
okay millert@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jan 27 21:34:23 2000 UTC (24 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

er, oops, types must be same for multiple assignment

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jan 26 22:37:24 2000 UTC (24 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +12 -4 lines
Diff to previous 1.13 (colored)

if yygrowstack() fails to allocate memory, free all yacc memory allocations and reset for future yyparse() calls... obscure eh

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 18 15:45:12 1998 UTC (25 years, 6 months ago) by dm
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.12: +5 -1 lines
Diff to previous 1.12 (colored)

revert last change for K\&R C compilers without const

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 18 03:22:55 1998 UTC (25 years, 6 months ago) by dm
Branch: MAIN
Changes since 1.11: +2 -6 lines
Diff to previous 1.11 (colored)

drop the __attribute__ stuf in favor of a simple const

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 17 06:13:43 1998 UTC (25 years, 6 months ago) by dm
Branch: MAIN
Changes since 1.10: +6 -2 lines
Diff to previous 1.10 (colored)

add __attribute__ ((unused)) to the yyrcsid under GCC 2

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 8 04:21:08 1998 UTC (25 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.9: +8 -4 lines
Diff to previous 1.9 (colored)

Don't assume realloc() can take NULL as first arg.  Yacc needs to generate portable code...

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 25 18:52:18 1998 UTC (26 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

remove const, so it works on !ansi compiler

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 3 00:53:25 1997 UTC (27 years, 4 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

YYRECOVERING(), not YYRECOVERING.  Approved by Robert Corbett

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 27 08:05:18 1996 UTC (27 years, 4 months ago) by tholo
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Remove some GCC warnings in generated output; from Steve Price via FreeBSD

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 28 02:03:26 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

silence gcc in super-pedantic mode; based on freebsd pr#1427

Revision 1.5 / (download) - annotate - [select for diffs], Mon May 20 07:31:54 1996 UTC (28 years ago) by tholo
Branch: MAIN
Changes since 1.4: +8 -0 lines
Diff to previous 1.4 (colored)

Use prototypes if 'defined(__cplusplus) || __STDC__'

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 23:45:21 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +90 -15 lines
Diff to previous 1.3 (colored)

sync to netbsd 960418

Revision 1.3 / (download) - annotate - [select for diffs], Wed Mar 27 19:33:21 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

From NetBSD: merge of 960317

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 22 01:41:55 1995 UTC (28 years, 5 months ago) by niklas
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

Imported from Cygnus byacc: Define YYEMPTY and YYLEX, because GCC uses them.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:47:06 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:47:06 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

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.