|
Lines 234-239
Link Here
|
| 234 |
void monthly(int, int, int); |
234 |
void monthly(int, int, int); |
| 235 |
void monthly3(int, int, int); |
235 |
void monthly3(int, int, int); |
| 236 |
void trim_trailing_spaces(char *); |
236 |
void trim_trailing_spaces(char *); |
|
|
237 |
void trim_one_trailing_space(char *); |
| 237 |
void usage(void); |
238 |
void usage(void); |
| 238 |
void headers_init(void); |
239 |
void headers_init(void); |
| 239 |
extern char *__progname; |
240 |
extern char *__progname; |
|
Lines 445-451
Link Here
|
| 445 |
for (col = 0, p = lineout; col < 7; col++) |
446 |
for (col = 0, p = lineout; col < 7; col++) |
| 446 |
p = ascii_day(p, days[row * 7 + col]); |
447 |
p = ascii_day(p, days[row * 7 + col]); |
| 447 |
*p = '\0'; |
448 |
*p = '\0'; |
| 448 |
trim_trailing_spaces(lineout); |
449 |
trim_one_trailing_space(lineout); |
| 449 |
sprintf(out->s[row+2], "%s", lineout); |
450 |
sprintf(out->s[row+2], "%s", lineout); |
| 450 |
} |
451 |
} |
| 451 |
} |
452 |
} |
|
Lines 716-721
Link Here
|
| 716 |
*p = '\0'; |
717 |
*p = '\0'; |
| 717 |
} |
718 |
} |
| 718 |
|
719 |
|
|
|
720 |
void |
| 721 |
trim_one_trailing_space(s) |
| 722 |
char *s; |
| 723 |
{ |
| 724 |
char *p; |
| 725 |
|
| 726 |
for (p = s; *p; ++p) |
| 727 |
continue; |
| 728 |
if (p > s && isspace(*--p)) |
| 729 |
*p = '\0'; |
| 730 |
} |
| 731 |
|
| 719 |
/* |
732 |
/* |
| 720 |
* Center string, handling multibyte characters appropriately. |
733 |
* Center string, handling multibyte characters appropriately. |
| 721 |
* In addition if the string is too large for the width it's truncated. |
734 |
* In addition if the string is too large for the width it's truncated. |