Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!seismo!hao!hplabs!sri-unix!gwyn@Brl-Vld.ARPA From: gwyn@Brl-Vld.ARPA Newsgroups: net.unix-wizards Subject: Re: question about ctime(3) and time(2) in unix v6 Message-ID: <475@sri-arpa.UUCP> Date: Fri, 30-Mar-84 14:24:41 EST Article-I.D.: sri-arpa.475 Posted: Fri Mar 30 14:24:41 1984 Date-Received: Wed, 4-Apr-84 03:27:53 EST Lines: 15 From: Doug Gwyn (VLD/VMB) The reason for int tval[2] instead of long tval was that the original 6th Edition UNIX C or its precursors did not know about the "long" data type, so two (short) ints were used to hold long data. I suspect your real problem however is that you are not declaring the type of the time() function to be a long. If you fail to declare a function, C will assume that it is int-valued. You should also look at the actual source for the time() function. I have seen at least three versions of this on 6th Edition UNIXes. Maybe yours does not return a long value but rather a 0-or-1 success indicator (in which case, call time() first then call ctime() later with the address of the storage that ctime() filled).