scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

gentz.awk (224B)


      1 BEGIN { print "#include \"../libc.h\"\nstruct tzone tzones[] = {" }
      2 {
      3     split($2,a,":")
      4     min = a[1] * 60
      5     min = min + a[2]
      6     sec = min * 60
      7     printf "\t{\"%s\", %d},\n", $1, sec
      8 }
      9 END { print "\t{0,\t0}\n};\n" }