version 1.30, 2015/10/23 11:43:16 |
version 1.31, 2015/12/07 18:46:35 |
|
|
static struct fixs nmonths[13]; /* short national month names */ |
static struct fixs nmonths[13]; /* short national month names */ |
|
|
void |
void |
|
fill_print_date(struct match *m, struct tm *tm) |
|
{ |
|
if (strftime(m->print_date, sizeof(m->print_date), |
|
daynames ? "%a %b %d" : "%b %d", tm) == 0) |
|
m->print_date[sizeof(m->print_date) - 1] = '\0'; |
|
} |
|
|
|
void |
setnnames(void) |
setnnames(void) |
{ |
{ |
char buf[80]; |
char buf[80]; |
|
|
} |
} |
|
|
(void)mktime(&tmtmp); |
(void)mktime(&tmtmp); |
if (strftime(tmp->print_date, |
fill_print_date(tmp, &tmtmp); |
sizeof(tmp->print_date), |
|
/* "%a %b %d", &tm); Skip weekdays */ |
|
"%b %d", &tmtmp) == 0) |
|
tmp->print_date[sizeof(tmp->print_date) - 1] = '\0'; |
|
|
|
tmp->var = varp; |
tmp->var = varp; |
tmp->next = NULL; |
tmp->next = NULL; |
return(tmp); |
return(tmp); |
|
|
if ((tmp = malloc(sizeof(struct match))) == NULL) |
if ((tmp = malloc(sizeof(struct match))) == NULL) |
err(1, NULL); |
err(1, NULL); |
tmp->when = ttmp; |
tmp->when = ttmp; |
if (strftime(tmp->print_date, |
fill_print_date(tmp, &tmtmp); |
sizeof(tmp->print_date), |
|
/* "%a %b %d", &tm); Skip weekdays */ |
|
"%b %d", &tmtmp) == 0) |
|
tmp->print_date[sizeof(tmp->print_date) - 1] = '\0'; |
|
tmp->bodun = bodun && tdiff == -1; |
tmp->bodun = bodun && tdiff == -1; |
tmp->var = varp; |
tmp->var = varp; |
tmp->next = NULL; |
tmp->next = NULL; |