char *name; /* token name */
int value; /* token id */
};
-static struct SpecialToken VariousWords[] = {
+static const struct SpecialToken VariousWords[] = {
{"midnight", MIDNIGHT}, /* 00:00:00 of today or tomorrow */
{"noon", NOON}, /* 12:00:00 of today or tomorrow */
{"teatime", TEATIME}, /* 16:00:00 of today or tomorrow */
{NULL, 0} /*** SENTINEL ***/
};
-static struct SpecialToken TimeMultipliers[] = {
+static const struct SpecialToken TimeMultipliers[] = {
{"second", SECONDS}, /* seconds multiplier */
{"seconds", SECONDS}, /* (pluralized) */
{"sec", SECONDS}, /* (generic) */
* required for us to be able distinguish between 'mon' as 'month'
* and 'mon' as 'monday'
*/
-static struct SpecialToken *Specials;
+static const struct SpecialToken *Specials;
static const char **scp; /* scanner - pointer at arglist */
static char scc; /* scanner - count of remaining arguments */
greater than zero if S1 is lexicographically less than,
equal to or greater than S2. -- copied from GNU libc*/
static int mystrcasecmp(
- s1,
- s2)
- const char *s1;
- const char *s2;
+ const char *s1,
+ const char *s2)
{
const unsigned char *p1 = (const unsigned char *) s1;
const unsigned char *p2 = (const unsigned char *) s2;
* token() fetches a token from the input stream
*/
static int token(
- )
+ void)
{
int idx;