From: Chris To: A.Ford@ford-mason.co.uk Subject: cronolog: template parser patch Date: Mon, 11 Feb 2002 03:45:33 -0800 Hi Andrew, I discovered that cronolog doesn't understand all possible strftime formats (unfortunate), even though it uses strftime to generate the final filenames (which is a good thing). I've attached a patch that addresses one particular format modifier (the '-', '_', or '0' that can proceed the actual conversion character); we needed this because we use frontpage extensions with apache, and it wants log filenames that don't have leading 0's on the day and month. Regards, Chris Jaeger MTS, Ensim Corporation diff -ur cronolog-1.6.1/src/cronoutils.c cronolog-1.6.1.new/src/cronoutils.c --- cronolog-1.6.1/src/cronoutils.c Mon Dec 20 00:34:44 1999 +++ cronolog-1.6.1.new/src/cronoutils.c Mon Feb 11 03:19:32 2002 @@ -204,9 +204,21 @@ { if (ch == '%') { - ch = *spec++; - if (!ch) break; + do { + ch = *spec++; + if (!ch) break; + switch(ch) { + case '_': + case '-': + case '0': + continue; + } + break; + } while(1); + + if(!ch) break; + switch (ch) { case 'y': /* two digit year */