home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18800 < prev    next >
Encoding:
Text File  |  1992-12-22  |  781 b   |  24 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!uunet.ca!wildcan!sq!chance!john
  3. From: john@chance.gts.org (John R MacMillan)
  4. Subject: Re: sccs eats good code -
  5. Message-ID: <1992Dec22.162453.4009@chance.gts.org>
  6. Organization: $HOME
  7. References: <1992Dec21.4396.29992@dosgate> <1992Dec22.005828.20926@jpl-devvax.jpl.nasa.gov> <1992Dec22.035408.22372@cs.tu-berlin.de>
  8. Date: Tue, 22 Dec 1992 16:24:53 GMT
  9. Lines: 13
  10.  
  11. |Another portable alternative to the suggested
  12. |
  13. |    static char fmt[] = { '%','w','%','H','%','M','%','S','\0' };
  14. |
  15. |(braces courtesy of International Brace Fund for the Needy ;-) would be
  16. |
  17. |    if (strftime(time_str, 64, "%w%H\
  18. |%M%S", time_struct) != 7)
  19.  
  20. And yet another:
  21.     if (strftime(time_str, 64, "%w%" "H%" "M%S", time_struct) != 7)
  22.  
  23. (or however you want to break it up).
  24.