Lines Matching full:var
74 struct variable *var, **pnext; in parceargs() local
103 var = malloc(sizeof(*var)); in parceargs()
104 memset(var, 0, sizeof(*var)); in parceargs()
105 asprintf(&var->name, "%s%s%s:%s", in parceargs()
109 var->h = h; in parceargs()
110 *pnext = var; in parceargs()
111 pnext = &var->next; in parceargs()
117 var = malloc(sizeof(*var)); in parceargs()
118 memset(var, 0, sizeof(*var)); in parceargs()
121 var->name = strsep(&tmp1, "#"); in parceargs()
123 var->instance = atoi(tmp1); in parceargs()
127 var->val = atoi(tmp2); in parceargs()
131 *pnext = var; in parceargs()
132 pnext = &var->next; in parceargs()
161 t = strlen(hname) - strlen(var->name); in parceargs()
163 if (strcmp(hname + t, var->name) != 0) in parceargs()
167 } else if (strcmp(hname, var->name) != 0) in parceargs()
169 if (var->instance != instance++) in parceargs()
171 var->h = h; in parceargs()
175 if (var->h.usage == 0) in parceargs()
176 errx(1, "Unknown item '%s'", var->name); in parceargs()
303 struct variable *var; in dumpdata() local
319 for (var = vars; var; var = var->next) { in dumpdata()
320 if (rid == var->h.report_ID && in dumpdata()
321 kind == var->h.kind) in dumpdata()
324 if (var == NULL) in dumpdata()
358 for (var = vars; var; var = var->next) { in dumpdata()
359 if ((kind < 3 ? kind : hid_input) != var->h.kind) in dumpdata()
361 if (var->h.report_ID != 0 && in dumpdata()
362 dbuf[0] != var->h.report_ID) in dumpdata()
366 printf("%s=", var->name); in dumpdata()
368 prdata(dbuf, &var->h); in dumpdata()
380 struct variable *var; in writedata() local
389 for (var = vars; var; var = var->next) { in writedata()
390 if (rid == var->h.report_ID && kind == var->h.kind) in writedata()
393 if (var == NULL) in writedata()
421 for (var = vars; var; var = var->next) { in writedata()
422 if (rid != var->h.report_ID || kind != var->h.kind) in writedata()
424 hid_set_data(dbuf, &var->h, var->val); in writedata()