summaryrefslogtreecommitdiffstats
path: root/src/kadmin/cli
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-05-21 19:03:45 +0000
committerGreg Hudson <ghudson@mit.edu>2010-05-21 19:03:45 +0000
commit97c2ef984114336bd52c8accd869c676be9c35bc (patch)
tree90a3328bb51179670968298519297b325a4c1df8 /src/kadmin/cli
parent263b6258c20e52b648b68a2580fb6cffc7e84d2a (diff)
downloadkrb5-97c2ef984114336bd52c8accd869c676be9c35bc.tar.gz
krb5-97c2ef984114336bd52c8accd869c676be9c35bc.tar.xz
krb5-97c2ef984114336bd52c8accd869c676be9c35bc.zip
Use ANSI-style function definitions in our copy of getdate.y
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24081 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/cli')
-rw-r--r--src/kadmin/cli/getdate.y48
1 files changed, 11 insertions, 37 deletions
diff --git a/src/kadmin/cli/getdate.y b/src/kadmin/cli/getdate.y
index 6ea75eb08d..a4173f53e7 100644
--- a/src/kadmin/cli/getdate.y
+++ b/src/kadmin/cli/getdate.y
@@ -530,19 +530,14 @@ static TABLE const TimezoneTable[] = {
/* ARGSUSED */
static int
-yyerror(s)
- char *s;
+yyerror(char *s)
{
return 0;
}
static time_t
-ToSeconds(Hours, Minutes, Seconds, Meridian)
- time_t Hours;
- time_t Minutes;
- time_t Seconds;
- MERIDIAN Meridian;
+ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
{
if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
return -1;
@@ -570,15 +565,8 @@ ToSeconds(Hours, Minutes, Seconds, Meridian)
* of seconds since 00:00:00 1/1/70 GMT.
*/
static time_t
-Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
- time_t Month;
- time_t Day;
- time_t Year;
- time_t Hours;
- time_t Minutes;
- time_t Seconds;
- MERIDIAN Meridian;
- DSTMODE DSTmode;
+Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes,
+ time_t Seconds, MERIDIAN Meridian, DSTMODE DSTmode)
{
static int DaysInMonth[12] = {
31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
@@ -625,10 +613,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
static time_t
-DSTcorrect(Start, Future, error)
- time_t Start;
- time_t Future;
- int *error;
+DSTcorrect(time_t Start, time_t Future, int *error)
{
time_t StartDay;
time_t FutureDay;
@@ -651,11 +636,7 @@ DSTcorrect(Start, Future, error)
static time_t
-RelativeDate(Start, DayOrdinal, DayNumber, error)
- time_t Start;
- time_t DayOrdinal;
- time_t DayNumber;
- int *error;
+RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber, int *error)
{
struct tm *tm;
time_t now;
@@ -673,9 +654,7 @@ RelativeDate(Start, DayOrdinal, DayNumber, error)
static time_t
-RelativeMonth(Start, RelMonth)
- time_t Start;
- time_t RelMonth;
+RelativeMonth(time_t Start, time_t RelMonth)
{
struct tm *tm;
time_t Month;
@@ -704,8 +683,7 @@ RelativeMonth(Start, RelMonth)
static int
-LookupWord(buff)
- char *buff;
+LookupWord(char *buff)
{
register char *p;
register char *q;
@@ -859,8 +837,7 @@ yylex()
/* Yield A - B, measured in seconds. */
static time_t
-difftm(a, b)
- struct tm *a, *b;
+difftm(struct tm *a, struct tm *b)
{
int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
@@ -887,8 +864,7 @@ difftm(a, b)
time_t get_date(char *);
time_t
-get_date(p)
- char *p;
+get_date(char *p)
{
struct my_timeb *now = NULL;
struct tm *tm, gmt;
@@ -1044,9 +1020,7 @@ get_date(p)
#if defined(TEST)
/* ARGSUSED */
-main(ac, av)
- int ac;
- char *av[];
+main(int ac, char *av[])
{
char buff[128];
time_t d;