Annotation of OpenXM/src/hgm/mh/src/genusage.c, Revision 1.1
1.1 ! takayama 1: #include <stdio.h>
! 2: #include <string.h>
! 3: #define SIZE 4098
! 4: main() {
! 5: char s[SIZE];
! 6: int i;
! 7: printf("/* This is automatically generated. Do not edit it.*/\n");
! 8: while (fgets(s,SIZE-1,stdin)!=NULL) {
! 9: if (s[0] == '!') {
! 10: printf("%s",&(s[1]));
! 11: continue;
! 12: }
! 13: printf("oxprintfe(\"");
! 14: for (i=0; i<strlen(s); i++) {
! 15: if (s[i] == '\\') printf("\\\\");
! 16: else if (s[i] == 0xa) printf("\\n");
! 17: else if (s[i] == '%') printf("%%%%");
! 18: else if (s[i] == '"') printf("\\\"");
! 19: else putchar(s[i]);
! 20: }
! 21: printf("\");\n");
! 22: }
! 23: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>