Skip to content

Instantly share code, notes, and snippets.

@mattdennewitz
Created September 17, 2011 23:26
Show Gist options
  • Select an option

  • Save mattdennewitz/1224488 to your computer and use it in GitHub Desktop.

Select an option

Save mattdennewitz/1224488 to your computer and use it in GitHub Desktop.
Patch for printing extended headers in 'cwgame'
*** cwgame.c 2011-09-17 18:24:18.000000000 -0500
--- cwgame__print_ext_hdrs.c 2011-09-17 18:24:12.000000000 -0500
***************
*** 2229,2234 ****
--- 2229,2246 ----
}
}
+ for (i = 0; i <= max_ext_field; i++) {
+ if (ext_fields[i]) {
+ if (ascii && comma) {
+ *(buf++) = ',';
+ }
+ else {
+ comma = 1;
+ }
+ buf += sprintf(buf, "\"%s\"", ext_field_data[i].header);
+ }
+ }
+
printf("%s", output_line);
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment