mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-22 15:59:19 +00:00
more stuff pushed into private
SCCS-file: date.c SCCS-SID: 4.7
This commit is contained in:
committed by
Paul Eggert
parent
404c356d2f
commit
900c0170f5
39
date.c
39
date.c
@ -21,7 +21,7 @@ static char elsieid[] = "%W%";
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTIES OF MERCHANT[A]BILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -34,11 +34,22 @@ char copyright[] =
|
|||||||
static char sccsid[] = "@(#)date.c 4.23 (Berkeley) 9/20/88";
|
static char sccsid[] = "@(#)date.c 4.23 (Berkeley) 9/20/88";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "syslog.h"
|
#include "sys/time.h" /* for DST_NONE */
|
||||||
#include "sys/time.h"
|
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "tzfile.h"
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The two things date knows about time are. . .
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TM_YEAR_BASE
|
||||||
|
#define TM_YEAR_BASE 1900
|
||||||
|
#endif /* !defined TM_YEAR_BASE */
|
||||||
|
|
||||||
|
#ifndef SECSPERMIN
|
||||||
|
#define SECSPERMIN 60
|
||||||
|
#endif /* !defined SECSPERMIN */
|
||||||
|
|
||||||
|
#include "syslog.h"
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
#include "sys/socket.h"
|
#include "sys/socket.h"
|
||||||
#include "netinet/in.h"
|
#include "netinet/in.h"
|
||||||
@ -68,22 +79,6 @@ static char sccsid[] = "@(#)date.c 4.23 (Berkeley) 9/20/88";
|
|||||||
#define NTIME_MSG "{"
|
#define NTIME_MSG "{"
|
||||||
#endif /* !defined NTIME_MSG */
|
#endif /* !defined NTIME_MSG */
|
||||||
|
|
||||||
#ifndef EXIT_SUCCESS
|
|
||||||
#define EXIT_SUCCESS 0
|
|
||||||
#endif /* !defined EXIT_SUCCESS */
|
|
||||||
|
|
||||||
#ifndef EXIT_FAILURE
|
|
||||||
#define EXIT_FAILURE 1
|
|
||||||
#endif /* !defined EXIT_FAILURE */
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE 1
|
|
||||||
#endif /* !defined TRUE */
|
|
||||||
|
|
||||||
#ifndef FALSE
|
|
||||||
#define FALSE 0
|
|
||||||
#endif /* !defined FALSE */
|
|
||||||
|
|
||||||
extern double atof();
|
extern double atof();
|
||||||
extern char ** environ;
|
extern char ** environ;
|
||||||
extern char * getlogin();
|
extern char * getlogin();
|
||||||
@ -234,7 +229,7 @@ char * argv[];
|
|||||||
** The normal check won't work since
|
** The normal check won't work since
|
||||||
** the given time is valid in GMT.
|
** the given time is valid in GMT.
|
||||||
*/
|
*/
|
||||||
if (atoi(cp + 1) >= 60)
|
if (atoi(cp + 1) >= SECSPERMIN)
|
||||||
wildinput("time", value,
|
wildinput("time", value,
|
||||||
"out of range seconds given");
|
"out of range seconds given");
|
||||||
}
|
}
|
||||||
@ -462,7 +457,7 @@ struct tm * tmp;
|
|||||||
for ( ; ; ) {
|
for ( ; ; ) {
|
||||||
if (cp == NULL) {
|
if (cp == NULL) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"date: error: can't allocate memory\n");
|
"date: error: can't get memory\n");
|
||||||
errensure();
|
errensure();
|
||||||
(void) exit(retval);
|
(void) exit(retval);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user