Article View: mod.amiga
Article #52Aztec C time() and stat()
From: walton
Date: Fri, 16 Jan 1987 19:07
Date: Fri, 16 Jan 1987 19:07
23 lines
1474 bytes
1474 bytes
While trying some UN*X code out on Aztec C 3.20a (including
compress and the most recent mod.sources make), I discovered two facts
to share:
(1) The Aztec time() call returns the long integer number of
seconds elapsed since 1 January 1978 00:00, and NOT the funny
bit-by-bit format in the documentation, which is peculiar to
MS/DOS (MicroSoft's Damaged Operating System).
(2) The stat() call exists, though it is undocumented. Calling
sequence is:
#include <stat.h>
stat(file, statbuf);
char *file; /* name of file */
struct stat *statbuf; /* pointer to status buffer */
stat() returns the mode bits, modification time, and size of the
file, as shown by the definition in stat.h.
Stephen Walton ARPA: ametek!walton@csvax.caltech.edu
Ametek Computer Research Div. BITNET: walton@caltech
610 N. Santa Anita Ave. UUCP: ...!ucbvax!sun!megatest!ametek!walton
Arcadia, CA 91006 USA
818-445-6811
Technical Details
Message-ID:
<953@ulowell.cs.ulowell.edu>Path:
arc1-ca.pugleaf.net!utzoo!decvax!wanginst!apollo!ulowell!ametek.UUCP!waltonShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!wanginst!apollo!ulowell!ametek.UUCP!walton From: walton@ametek.UUCP.UUCP Newsgroups: mod.amiga Subject: Aztec C time() and stat() Message-ID: <953@ulowell.cs.ulowell.edu> Date: Fri, 16-Jan-87 14:07:10 EST Article-I.D.: ulowell.953 Posted: Fri Jan 16 14:07:10 1987 Date-Received: Sat, 17-Jan-87 14:38:46 EST Sender: page@ulowell.cs.ulowell.edu Organization: Ametek Computer Research Div. Lines: 23 Approved: page@ulowell.cs.ulowell.edu