* 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
+3 -3
View File
@@ -23,9 +23,9 @@ if $(INCLUDE_GPL_ADDONS) = 1 {
GPL_ONLY = "" ; GPL_ONLY = "" ;
} }
BEOS_BIN = "[" addattr alert arp base64 basename bc beep bison bzip2 cat catattr BEOS_BIN = "[" addattr alert arp base64 basename bc beep bison bzip2 cal cat
chgrp chmod chop chown cksum clear clockconfig cmp comm compress cp copyattr catattr chgrp chmod chop chown cksum clear clockconfig cmp comm compress
$(X86_ONLY)CortexAddOnHost cp copyattr $(X86_ONLY)CortexAddOnHost
csplit ctags cut date dc dd desklink df diff diff3 dircolors dirname csplit ctags cut date dc dd desklink df diff diff3 dircolors dirname
driveinfo dstcheck du echo eject env error expand expr driveinfo dstcheck du echo eject env error expand expr
expr factor false fdinfo ffm find finddir fmt fold fortune frcode ftp funzip fwcontrol expr factor false fdinfo ffm find finddir fmt fold fortune frcode ftp funzip fwcontrol
+1
View File
@@ -17,6 +17,7 @@ AddResources hey : hey.rdef ;
# standard commands that don't need any additional library # standard commands that don't need any additional library
StdBinCommands StdBinCommands
cal.c
catattr.cpp catattr.cpp
chop.c chop.c
clear.c clear.c
+11 -19
View File
@@ -34,14 +34,6 @@
* SUCH DAMAGE. * 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 <sys/types.h>
#include <ctype.h> #include <ctype.h>
@@ -96,7 +88,7 @@ char day_headings[] = " ";
char j_day_headings[] = " "; char j_day_headings[] = " ";
/* leap year -- account for gregorian reformation in 1752 */ /* 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 */ /* number of centuries since 1700, not inclusive */
#define centuries_since_1700(yr) ((yr) > 1700 ? (yr) / 100 - 17 : 0) #define centuries_since_1700(yr) ((yr) > 1700 ? (yr) / 100 - 17 : 0)
@@ -109,16 +101,16 @@ char j_day_headings[] = " ";
int julian; int julian;
void ascii_day __P((char *, int)); void ascii_day(char *, int);
void center __P((char *, int, int)); void center(char *, int, int);
void day_array __P((int, int, int *)); void day_array(int, int, int *);
int day_in_week __P((int, int, int)); int day_in_week(int, int, int);
int day_in_year __P((int, int, int)); int day_in_year(int, int, int);
void j_yearly __P((int)); void j_yearly(int);
void monthly __P((int, int)); void monthly(int, int);
void trim_trailing_spaces __P((char *)); void trim_trailing_spaces(char *);
void usage __P((void)); void usage(void);
void yearly __P((int)); void yearly(int);
int int
main(argc, argv) main(argc, argv)