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

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![peter.curran@canrem.com]
  3. From: "peter curran" <peter.curran@canrem.com>
  4. Subject: sccs eats good code -
  5. Message-ID: <1992Dec21.4396.29992@dosgate>
  6. Reply-To: "peter curran" <peter.curran@canrem.com>
  7. Organization: Canada Remote Systems
  8. Distribution: comp
  9. Date: 21 Dec 92 18:51:40 EST
  10. Lines: 34
  11.  
  12. In article <1992Dec18.215413.65833@evolving.com> jww@evolving.com
  13. (John W. Woolley) writes:
  14.  
  15. >Evolving Systems recently began using a new source control system,
  16. >CMVC, which as I understand it is a wrapper around SCCS.  The new
  17. >source control system interacted with our code in an unintended way.
  18.  
  19. >We had a chunk of source so:
  20. >  if (strftime(time_str, 64, "%w%H%M%S", time_struct) != 7)
  21. >
  22. >Nice normal ANSI C.  But SCCS had spotted the string %H% in the
  23. >above bit of code, and had done its replacement thing so:
  24. >
  25. >  if (strftime(time_str, 64, "%w12/14/92M%S", time_struct) != 7)
  26. >
  27. >which caused strftime to yield results differing somewhat from those
  28. >intended.
  29.  
  30. A simple solution is to replace the original string with something
  31. like "%w%\H%\M%\S".  Ugly, but it works.  Unfortunately, it is an
  32. "active" solution - if you don't notice the problem when you write
  33. the code, you may get unexpected replacements, whereas with a "good"
  34. system, you would only get the replacements when you want them.
  35. (As others pointed out, a solution is to get rid of SCCS.  My
  36. recommendation is to get rid of source code management systems,
  37. but that would raise a few screams, so I won't mention it.)
  38.  
  39. Peter Curran
  40. Usenet: peter.curran@canrem.com     RIME: CRS (#118)
  41. ---
  42.  ■ DeLuxe² 1.25 #12339 ■ 
  43. --
  44. Canada Remote Systems  - Toronto, Ontario
  45. World's Largest PCBOARD System - 416-629-7000/629-7044
  46.