Home | History | Annotate | Download | only in showmap

Lines Matching defs:line

40 static int parse_header(const char* line, const mapinfo* prev, mapinfo** mi) {
47 if (sscanf(line, "%lx-%lx %*s %*x %*x:%*x %*d%n", &start, &end, &name_pos) != 2) {
52 while (isspace(line[name_pos])) {
56 if (line[name_pos]) {
57 strlcpy(name, line + name_pos, sizeof(name));
87 static int parse_field(mapinfo* mi, const char* line) {
91 if (sscanf(line, "%63s %d kB", field, &size) != 2) {
165 char line[1024];
177 while (fgets(line, sizeof(line), fp) != 0) {
178 len = strlen(line);
179 if (line[len - 1] == '\n') {
180 line[--len] = 0;
183 if (current != NULL && !parse_field(current, line)) {
188 if (!parse_header(line, current, &next)) {
194 fprintf(stderr, "warning: could not parse map info line: %s\n", line);