/* Program: BIBLEFIL.C Author : Kim Moser Date : 19 August, 1990 System : IBM PC / Borland Turbo C 2.0 Descrip: Filter to extract chapter/verse headings from text files in BIBLExx.ZIP files. Usage : BIBLEFIL outfile */ #include #include #include char TMP[512]; void main(void) { char *s; while (gets(TMP) != NULL) { if ((s = strchr(TMP, 0x1F)) != NULL) { if ((s = strchr(s, ':')) == NULL) { fprintf(stderr, "0x15 found but ':' not found.\nLine = '%s'\n", TMP); exit(-1); } else { if ((s = strchr(s, ' ')) == NULL) { fprintf(stderr, "':' found but ' ' not found.\nLine = '%s'\n", TMP); exit(-1); } else { puts(s+2); } } } else { puts((TMP[0]==' ') ? TMP+1 : TMP); } } }