#!/usr/bin/perl print "// This file made from ../data/pflags. Don't edit, it'll go away.\n"; print "\#ifndef PFLAGS_H\n\#define PFLAGS_H\n\n"; $temp = 0; print "enum PFlag {\n"; while (<STDIN>) { s/\n//; @thing = split(' '); print " PFL_", uc $thing[0], " = ", $temp, " , \n"; $temp++; } if ($temp>(32*16)) { print "#error too many pflags to fit"; } print "};\n"; print "inline void operator++(PFlag &p, int=0) { p = PFlag(p + 1); }\n"; print "\nextern int PFL_MAX;\n\n#endif\n";