Lines Matching refs:ch
18 char *to, *from, ch; in parse_c_string() local
26 ch = *(++from); in parse_c_string()
27 switch (ch) { in parse_c_string()
47 ch = *(from + 1); in parse_c_string()
48 if (ch >= 'a' && ch <= 'f') in parse_c_string()
49 ch = ch - 'a' + 'A'; in parse_c_string()
50 if (ch >= '0' && ch <= '9') in parse_c_string()
51 v = ch - '0'; in parse_c_string()
52 else if (ch >= 'A' && ch <= 'F') in parse_c_string()
53 v = ch + 10 - 'A'; in parse_c_string()
59 ch = *(from + 1); in parse_c_string()
60 if (ch >= 'a' && ch <= 'f') in parse_c_string()
61 ch = ch - 'a' + 'A'; in parse_c_string()
62 if (ch >= '0' && ch <= '9') in parse_c_string()
63 v = (v * 16) + (ch - '0'); in parse_c_string()
64 else if (ch >= 'A' && ch <= 'F') in parse_c_string()
65 v = (v * 16) + (ch + 10 - 'A'); in parse_c_string()
75 if (ch >= '0' && ch <= '9') { in parse_c_string()
76 v = ch - '0'; in parse_c_string()
77 ch = *(from + 1); in parse_c_string()
78 if (ch >= '0' && ch <= '9') { in parse_c_string()
80 v = (8 * v) + (ch - '0'); in parse_c_string()
81 ch = *(from + 1); in parse_c_string()
82 if (ch >= '0' && ch <= '9') { in parse_c_string()
84 v = (8 * v) + (ch - '0'); in parse_c_string()
87 ch = v; in parse_c_string()
89 *to = ch; in parse_c_string()
101 unsigned char ch; in print_c_string() local
107 ch = *cp++; in print_c_string()
108 if (ch == '\a') in print_c_string()
110 else if (ch == '\b') in print_c_string()
112 else if (ch == '\f') in print_c_string()
114 else if (ch == '\n') in print_c_string()
116 else if (ch == '\t') in print_c_string()
118 else if (ch == '\v') in print_c_string()
120 else if (ch == '\\') in print_c_string()
122 else if (ch == '\'') in print_c_string()
124 else if (ch == '\"') in print_c_string()
126 else if ((ch < 32) || (ch > 126)) in print_c_string()
127 fprintf(f, "\\%03o", ch); in print_c_string()
129 fputc(ch, f); in print_c_string()