Code Search for Developers
 
 
  

rcs2.c from CQual at Krugle


Show rcs2.c syntax highlighted

$$a _op_deref($$a *$NONYEAR);

   int printf(const char * $NONYEAR format, $NONYEAR ...);
   int sprintf(char * str, const char * format, $NONYEAR ...);

   char * $YYYY date2str(char * $RCSYEAR date, char * $NONYEAR datebuf) {
     char *p = (char * $NONYEAR)date;
     while (*p++ != '.')
       ;
     sprintf(datebuf,
             "19%.*s/%.2s/%.2s" + (((char * $NONYEAR)date)[2]=='.' ?  0  :  2),
             (int)(p-date-1), date, p, p+3
             );
     return (char * $YYYY)datebuf;
   }
   int main(void) {
     char *today = (char * $RCSYEAR)"99.05.12";
     char *nextyear = (char * $RCSYEAR)"2000.05.12";
     char *datebuf = "\0         ";
     printf("today is %s\n", date2str(today,datebuf));
     printf("nextyear is %s\n", date2str(nextyear,datebuf));
     return 1;
   }




See more files for this project here

CQual

CQual - A tool for adding type qualifiers to C

Project homepage: http://sourceforge.net/projects/cqual
Programming language(s): C,Java,Shell Script
License: other

  README
  linux-lock.c
  linux-lock.i
  linux-lock2.c
  linux-lock2.i
  lock.c
  lock2.c
  lock3.c
  rcs1.c
  rcs2.c
  rcs3.c
  taint-cast.c
  taint-const-subtyping.c
  taint-poly.c
  taint-varargs.c
  taint0.c
  taint1.c
  taint2.c
  user0.c
  user1.c
  y2k1.c
  y2k2.c
  y2k3.c
  y2k4.c