--- maketape.c 2010-04-25 12:40:57.000000000 -0700 +++ maketape-mac.c 2010-04-25 12:40:36.000000000 -0700 @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -81,7 +82,7 @@ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ BYTE buf[65500]; /* output AWSTAPE buffer */ int blkCount; /* block count for EOF1 */ -char julianToday[5]; /* today's date in julian format */ +char julianToday[6]; /* today's date in julian format */ char *mode = "r"; /* mode for input files to be opened in */ int binary = 0; /* whether input files are binary */ int nltape = 0; /* whether this is a non-labelled tape */ @@ -96,7 +97,7 @@ { time_t timer; struct tm *tblock; -char year[3]; /* y2k compensation */ +char year[4]; /* y2k compensation */ timer = time(NULL); /* get time of day from system */ tzset(); /* read TZ environment variable */ @@ -106,6 +107,7 @@ strncpy(julianToday, year+1, 2); sprintf(julianToday+2, "%3.3i", tblock->tm_yday); + printf("Julian day: %s\n", julianToday); return; } /* julianDate */