Deleted Added
full compact
getdate.y (203723) getdate.y (235789)
1%{
2/*
3** Originally written by Steven M. Bellovin <smb@research.att.com> while
4** at the University of North Carolina at Chapel Hill. Later tweaked by
5** a couple of people on Usenet. Completely overhauled by Rich $alz
6** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990;
7**
8** This grammar has 10 shift/reduce conflicts.
9**
10** This code is in the public domain and has no copyright.
11*/
12/* SUPPRESS 287 on yaccpar_sccsid *//* Unused static variable */
13/* SUPPRESS 288 on yyerrlab *//* Label unused */
14
15#include <sys/cdefs.h>
1%{
2/*
3** Originally written by Steven M. Bellovin <smb@research.att.com> while
4** at the University of North Carolina at Chapel Hill. Later tweaked by
5** a couple of people on Usenet. Completely overhauled by Rich $alz
6** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990;
7**
8** This grammar has 10 shift/reduce conflicts.
9**
10** This code is in the public domain and has no copyright.
11*/
12/* SUPPRESS 287 on yaccpar_sccsid *//* Unused static variable */
13/* SUPPRESS 288 on yyerrlab *//* Label unused */
14
15#include <sys/cdefs.h>
16__FBSDID("$FreeBSD: head/usr.bin/find/getdate.y 203723 2010-02-09 21:24:41Z ed $");
16__FBSDID("$FreeBSD: head/usr.bin/find/getdate.y 235789 2012-05-22 16:33:10Z bapt $");
17
18#include <stdio.h>
19#include <ctype.h>
20
21/* The code at the top of get_date which figures out the offset of the
22 current time zone checks various CPP symbols to see if special
23 tricks are need, but defaults to using the gettimeofday system call.
24 Include <sys/time.h> if that will be used. */

--- 30 unchanged lines hidden (view full) ---

55 is to use byacc instead of bison, which should generate a portable
56 parser. I played with adding "#define alloca dont_use_alloca", to
57 give an error if the parser generator uses alloca (and thus detect
58 unportable getdate.c's), but that seems to cause as many problems
59 as it solves. */
60
61#include <time.h>
62
17
18#include <stdio.h>
19#include <ctype.h>
20
21/* The code at the top of get_date which figures out the offset of the
22 current time zone checks various CPP symbols to see if special
23 tricks are need, but defaults to using the gettimeofday system call.
24 Include <sys/time.h> if that will be used. */

--- 30 unchanged lines hidden (view full) ---

55 is to use byacc instead of bison, which should generate a portable
56 parser. I played with adding "#define alloca dont_use_alloca", to
57 give an error if the parser generator uses alloca (and thus detect
58 unportable getdate.c's), but that seems to cause as many problems
59 as it solves. */
60
61#include <time.h>
62
63#define yyparse getdate_yyparse
64#define yylex getdate_yylex
65#define yyerror getdate_yyerror
66
63#define yylex getdate_yylex
64#define yyerror getdate_yyerror
65
67static int yyparse(void);
68static int yylex(void);
69static int yyerror(const char *);
70
71time_t get_date(char *);
72
73#define EPOCH 1970
74#define HOUR(x) ((time_t)(x) * 60)
75#define SECSPERDAY (24L * 60L * 60L)

--- 886 unchanged lines hidden ---
66static int yylex(void);
67static int yyerror(const char *);
68
69time_t get_date(char *);
70
71#define EPOCH 1970
72#define HOUR(x) ((time_t)(x) * 60)
73#define SECSPERDAY (24L * 60L * 60L)

--- 886 unchanged lines hidden ---