diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-10 22:20:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-10 22:20:55 +0000 |
commit | b8aaa8bec8414f8e55cf9b61fe0873d242c773b8 (patch) | |
tree | 5e43016c4fae834239fd38972fd58355ed6b54b5 /usr.bin/cal | |
parent | f18f6607440f6d2da08fac3522d88a65c77a5f3e (diff) |
mostly ansi cleanup; pval ok
Diffstat (limited to 'usr.bin/cal')
-rw-r--r-- | usr.bin/cal/cal.c | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/usr.bin/cal/cal.c b/usr.bin/cal/cal.c index 0774d67c78d..ef33b217d53 100644 --- a/usr.bin/cal/cal.c +++ b/usr.bin/cal/cal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cal.c,v 1.9 2003/06/03 02:56:06 millert Exp $ */ +/* $OpenBSD: cal.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $ */ /* $NetBSD: cal.c,v 1.6 1995/03/26 03:10:24 glass Exp $ */ /* @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cal.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: cal.c,v 1.9 2003/06/03 02:56:06 millert Exp $"; +static char rcsid[] = "$OpenBSD: cal.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $"; #endif #endif /* not lint */ @@ -134,9 +134,7 @@ void usage(void); void yearly(int); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { struct tm *local_time; time_t now; @@ -196,8 +194,7 @@ main(argc, argv) #define J_HEAD_SEP 2 void -monthly(month, year) - int month, year; +monthly(int month, int year) { int col, row, len, days[MAXDAYS]; char *p, lineout[30]; @@ -219,8 +216,7 @@ monthly(month, year) } void -j_yearly(year) - int year; +j_yearly(int year) { int col, *dp, i, month, row, which_cal; int days[12][MAXDAYS]; @@ -254,8 +250,7 @@ j_yearly(year) } void -yearly(year) - int year; +yearly(int year) { int col, *dp, i, month, row, which_cal; int days[12][MAXDAYS]; @@ -297,9 +292,7 @@ yearly(year) * builds that array for any month from Jan. 1 through Dec. 9999. */ void -day_array(month, year, days) - int month, year; - int *days; +day_array(int month, int year, int *days) { int day, dw, dm; @@ -321,8 +314,7 @@ day_array(month, year, days) * return the 1 based day number within the year */ int -day_in_year(day, month, year) - int day, month, year; +day_in_year(int day, int month, int year) { int i, leap; @@ -340,8 +332,7 @@ day_in_year(day, month, year) * missing days. */ int -day_in_week(day, month, year) - int day, month, year; +day_in_week(int day, int month, int year) { long temp; @@ -355,9 +346,7 @@ day_in_week(day, month, year) } void -ascii_day(p, day) - char *p; - int day; +ascii_day(char *p, int day) { int display, val; static char *aday[] = { @@ -397,8 +386,7 @@ ascii_day(p, day) } void -trim_trailing_spaces(s) - char *s; +trim_trailing_spaces(char *s) { char *p; @@ -412,10 +400,7 @@ trim_trailing_spaces(s) } void -center(str, len, separate) - char *str; - int len; - int separate; +center(char *str, int len, int separate) { len -= strlen(str); @@ -425,7 +410,7 @@ center(str, len, separate) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: cal [-jy] [[month] year]\n"); |