File global/gen-conds.awk artifact d4ceed024e part of check-in 9ea8c28897
BEGIN { FS=":" offset = 0x7F print "#ifndef KIglobal_cond" print "#define KIglobal_cond" print "typedef enum kglobal_cond {" printf("kglobal_module_offset = 0x%x,\n", offset) } $2 == "short" { printf("\t%scond_id = 0x%x,\n", $3, offset*NR) } $2 == "long" { printf("\t%s_cond_id = 0x%x,\n", $3, offset*NR) } END { print "} kglobal_cond;" print "extern struct kglobal_module_record" print "\t{ const char* name, * desc, ** error_list }" print "\tkglobal_module_ident[];" print "#endif" }