* Made cal.c compile, and fixed warnings.

* Added it to the build, and the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-12-06 20:40:24 +00:00
parent ba1265f96e
commit a83a20f685
3 changed files with 15 additions and 22 deletions

View File

@ -23,9 +23,9 @@ if $(INCLUDE_GPL_ADDONS) = 1 {
GPL_ONLY = "" ;
}
BEOS_BIN = "[" addattr alert arp base64 basename bc beep bison bzip2 cat catattr
chgrp chmod chop chown cksum clear clockconfig cmp comm compress cp copyattr
$(X86_ONLY)CortexAddOnHost
BEOS_BIN = "[" addattr alert arp base64 basename bc beep bison bzip2 cal cat
catattr chgrp chmod chop chown cksum clear clockconfig cmp comm compress
cp copyattr $(X86_ONLY)CortexAddOnHost
csplit ctags cut date dc dd desklink df diff diff3 dircolors dirname
driveinfo dstcheck du echo eject env error expand expr
expr factor false fdinfo ffm find finddir fmt fold fortune frcode ftp funzip fwcontrol

View File

@ -17,6 +17,7 @@ AddResources hey : hey.rdef ;
# standard commands that don't need any additional library
StdBinCommands
cal.c
catattr.cpp
chop.c
clear.c

View File

@ -34,14 +34,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1989, 1993, 1994\n\n
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)cal.c 8.4 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/types.h>
#include <ctype.h>
@ -96,7 +88,7 @@ char day_headings[] = " ";
char j_day_headings[] = " ";
/* leap year -- account for gregorian reformation in 1752 */
#define leap_year(yr) ((yr) <= 1752 ? !((yr) % 4) : !((yr) % 4) && ((yr) % 100) || !((yr) % 400))
#define leap_year(yr) ((yr) <= 1752 ? !((yr) % 4) : (!((yr) % 4) && ((yr) % 100)) || !((yr) % 400))
/* number of centuries since 1700, not inclusive */
#define centuries_since_1700(yr) ((yr) > 1700 ? (yr) / 100 - 17 : 0)
@ -109,16 +101,16 @@ char j_day_headings[] = " ";
int julian;
void ascii_day __P((char *, int));
void center __P((char *, int, int));
void day_array __P((int, int, int *));
int day_in_week __P((int, int, int));
int day_in_year __P((int, int, int));
void j_yearly __P((int));
void monthly __P((int, int));
void trim_trailing_spaces __P((char *));
void usage __P((void));
void yearly __P((int));
void ascii_day(char *, int);
void center(char *, int, int);
void day_array(int, int, int *);
int day_in_week(int, int, int);
int day_in_year(int, int, int);
void j_yearly(int);
void monthly(int, int);
void trim_trailing_spaces(char *);
void usage(void);
void yearly(int);
int
main(argc, argv)