long vs. int [2] in ctime and time for unix v6

gds at Mit-Csr.ARPA gds at Mit-Csr.ARPA
Fri Mar 30 12:02:00 AEST 1984


I discovered the trouble.  I made a mistake.  The correct code is included.
One question, can one alternate legally between int [2] and long or must they
be converted to each other?

main()
{

          char *t;
          long tod;
          time(&tod);
          t = ctime(&tod); /* weird behavior */
          printf("%s\n", t);
}

-------



More information about the Comp.unix.wizards mailing list