| 141 | } |
| 142 | |
| 143 | static void get_fieldname(const char *arg, char *fieldname) |
| 144 | { |
| 145 | char *pactual = strchr(arg, '|'); |
| 146 | char *pstart; |
| 147 | |
| 148 | if (pactual) |
| 149 | { |
| 150 | /* The actual parameter type starts after the '|' */ |
| 151 | |
| 152 | pactual++; |
| 153 | pstart = strchr(pactual, '|'); |
| 154 | if (pstart) |
| 155 | { |
| 156 | /* The fieldname is everything past the second '|' to the end of |
| 157 | * the string |
| 158 | */ |
| 159 | |
| 160 | pstart++; |
| 161 | strncpy(fieldname, pstart, MAX_PARMSIZE - 1); |
| 162 | return; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | fprintf(stderr, "%d: Missing union fieldname: %s\n", g_lineno, arg); |
| 167 | exit(15); |
| 168 | } |
| 169 | |
| 170 | static FILE *open_proxy(void) |
| 171 | { |
no test coverage detected