scc

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

0196-invalidchar.c (664B)


      1 int
      2 main(void) {
      3 	static struct {
      4 		char *name;
      5 		const int offhour;
      6 	} tzones[] = {
      7 		{ "CDT", -5 * 3600 },
      8 		{ "CST", -6 * 3600 },
      9 		{ "EDT", -4 * 3600 },
     10 		{ "EST", -5 * 3600 },
     11 		{ "MDT", -6 * 3600 },
     12 		{ "MST", -7 * 3600 },
     13 		{ "PDT", -7 * 3600 },
     14 		{ "PST", -8 * 3600 },
     15 	};
     16 
     17 	if (tzones[0].offhour != -18000)
     18 		return 1;
     19 	if (tzones[1].offhour != -21600)
     20 		return 2;
     21 	if (tzones[2].offhour != -14400)
     22 		return 3;
     23 	if (tzones[3].offhour != -18000)
     24 		return 4;
     25 	if (tzones[4].offhour != -21600)
     26 		return 5;
     27 	if (tzones[5].offhour != -25200)
     28 		return 6;
     29 	if (tzones[6].offhour != -25200)
     30 		return 7;
     31 	if (tzones[7].offhour != -28800)
     32 		return 8;
     33 
     34 	return 0;
     35 }