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