Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.questions Subject: Re: SCCS/cftime clash Keywords: %d%m%y%H%M%S SCCS cftime Message-ID: <1990Jun14.211132.20855@iwarp.intel.com> Date: 14 Jun 90 21:11:32 GMT References: <1056@nixsin.UUCP> <13120@smoke.BRL.MIL> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 25 In-Reply-To: gwyn@smoke.BRL.MIL (Doug Gwyn) In article <13120@smoke.BRL.MIL>, gwyn@smoke (Doug Gwyn) writes: | In article <1056@nixsin.UUCP> koerberm@nixsin.UUCP (Mathias Koerber) writes: | >I got a problem involving SCCS. In my program (stored as an SCCS-file) | >I use cftime(buf,"%d%m%y%H%M%S",&now) to generate a date/timestring | | There is no really elegant solution to this. One portable solution | is to use instead | { | static char format[] = "%d%m%y%H?M%S"; | format[8] = '%'; /* darn that SCCS */ | cftime(buf,format,&now); | } (didn't we do this already?) static char format[] = "\045d\045m\045y\045H\045M\045S"; No runtime hacks needed. I dare SCCS to find %M% in *that*! Just another C hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/