-/* Copyright (C) 1990 Transarc Corporation - All rights reserved */
/*
- * (C) COPYRIGHT IBM CORPORATION 1987, 1988
- * LICENSED MATERIALS - PROPERTY OF IBM
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
*/
-
+#include <afsconfig.h>
#include <afs/param.h>
+
+RCSID("$Header$");
+
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#ifdef AFS_NT40_ENV
#include <malloc.h>
#endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#ifdef HAVE_STRING_H
#include <string.h>
#else
+#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
+#endif
+#include <stdlib.h>
#include "afsutil.h"
#include "ktime.h"
};
/* free token list returned by parseLine */
+#ifdef undef
static LocalFreeTokens(alist)
register struct token *alist; {
register struct token *nlist;
}
return 0;
}
+#endif
static space(x)
int x; {
char *aline;
struct token **alist; {
char tbuffer[256];
- register char *tptr;
+ register char *tptr = NULL;
int inToken;
struct token *first, *last;
register struct token *ttok;
char *key;
afs_int32 value;
} ptkeys [] = {
- "sun", 0x10000,
- "mon", 0x10001,
- "tue", 0x10002,
- "wed", 0x10003,
- "thu", 0x10004,
- "fri", 0x10005,
- "sat", 0x10006,
- "sunday", 0x10000,
- "monday", 0x10001,
- "tuesday", 0x10002,
- "wednesday", 0x10003,
- "thursday", 0x10004,
- "thur", 0x10004,
- "friday", 0x10005,
- "saturday", 0x10006,
- "am", 0x20000,
- "pm", 0x20001,
- "a.m.", 0x20000,
- "p.m.", 0x20001,
- 0, 0,
+ { "sun", 0x10000, },
+ { "mon", 0x10001, },
+ { "tue", 0x10002, },
+ { "wed", 0x10003, },
+ { "thu", 0x10004, },
+ { "fri", 0x10005, },
+ { "sat", 0x10006, },
+ { "sunday", 0x10000, },
+ { "monday", 0x10001, },
+ { "tuesday", 0x10002, },
+ { "wednesday", 0x10003, },
+ { "thursday", 0x10004, },
+ { "thur", 0x10004, },
+ { "friday", 0x10005, },
+ { "saturday", 0x10006, },
+ { "am", 0x20000, },
+ { "pm", 0x20001, },
+ { "a.m.", 0x20000, },
+ { "p.m.", 0x20001, },
+ { 0, 0, }
};
/* ktime_DateOf
{
struct ktime tk;
-bzero(&tk, sizeof(tk));
+memset(&tk, 0, sizeof(tk));
if ( ParseTime(&tk, astr) )
return (-1); /* syntax error */
register afs_int32 code;
struct ptemp *tp;
- bzero(ak, sizeof(*ak));
+ memset(ak, 0, sizeof(*ak));
code = LocalParseLine(adate, &tt);
if (code) return -1;
for(;tt;tt=tt->next) {
/* compare date in both formats, and return as in strcmp */
+#ifdef undef
static KTimeCmp(aktime, atm)
register struct ktime *aktime;
register struct tm *atm; {
}
return 0;
}
+#endif
/* compare date in both formats, and return as in strcmp */
static KDateCmp(akdate, atm)