Lines Matching defs:line
57 static struct netstat *lookup_get_column(struct netstat *ns, const char *line)
61 column = strchr(line, ':');
65 return lookup_get(ns, line, column - line);
68 static void netstat_read_type(FILE *fnetstat, struct netstat **dest, char *line)
70 struct netstat *type = lookup_get_column(*dest, line);
71 const char *pos = line;
87 pos = strchr(line, ' ') + 1;
149 char *line = NULL;
163 while (getline(&line, &line_sz, fnetstat) != -1)
164 netstat_read_type(fnetstat, &ret, line);
172 while (getline(&line, &line_sz, fnetstat) != -1)
173 netstat_read_type(fnetstat, &ret, line);
184 free(line);