MCPcopy Create free account
hub / github.com/apache/nuttx / get_fieldname

Function get_fieldname

tools/mksyscall.c:143–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static 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
170static FILE *open_proxy(void)
171{

Callers 2

generate_proxyFunction · 0.85
generate_wrapperFunction · 0.85

Calls 4

fprintfFunction · 0.85
exitFunction · 0.85
strchrFunction · 0.50
strncpyFunction · 0.50

Tested by

no test coverage detected