FreeCalypso > hg > ueda-linux
comparison netdiff/renpart/mainproc.c @ 139:bf188727e606
donl-rename-parts reader: no tEDAx-style escapes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 07 Sep 2020 04:25:11 +0000 |
parents | 77acb816727b |
children |
comparison
equal
deleted
inserted
replaced
138:77acb816727b | 139:bf188727e606 |
---|---|
45 fprintf(stderr, "%s line %d: too many fields\n", | 45 fprintf(stderr, "%s line %d: too many fields\n", |
46 infname, lineno); | 46 infname, lineno); |
47 exit(1); | 47 exit(1); |
48 } | 48 } |
49 fields[nfields++] = cp; | 49 fields[nfields++] = cp; |
50 while (*cp) { | 50 while (*cp && !isspace(*cp)) |
51 if (isspace(*cp)) { | 51 cp++; |
52 *cp++ = '\0'; | 52 if (*cp) |
53 break; | 53 *cp++ = '\0'; |
54 } | |
55 if (*cp++ != '\\') | |
56 continue; | |
57 switch (*cp++) { | |
58 case '\\': | |
59 case 'n': | |
60 case 'r': | |
61 case 't': | |
62 case ' ': | |
63 case '\t': | |
64 continue; | |
65 default: | |
66 fprintf(stderr, "%s line %d: invalid escape\n", | |
67 infname, lineno); | |
68 exit(1); | |
69 } | |
70 } | |
71 } | 54 } |
72 } | 55 } |
73 | 56 |
74 static void | 57 static void |
75 process_netpoint() | 58 process_netpoint() |