Lines Matching defs:line
339 * get_line attempts to get a line from the map, upto LINESZ. A line in
341 * is used at the end of the line. Returns line on success, a NULL on
345 get_line(FILE *fp, char *map, char *line, int linesz)
347 register char *p = line;
354 if (fgets(p, linesz - (p-line), fp) == NULL) {
355 return (*line ? line : NULL); /* EOF */
358 len = strlen(line);
360 p = line;
363 p = &line[len - 1];
366 * Is input line too long?
373 * read the rest of the line to discard.
380 while (p >= line && isspace(*(uchar_t *)p))
382 if (p < line) { /* empty line */
383 p = line;
395 * if '#' is the first character in the line.
397 p = line;
399 if (p == line || isspace(*(p-1))) {
411 * discard rest of line and return an empty string.
413 * we are done with this line.
417 if (*p == '\n') /* end of the long line */
425 "map %s: line too long (max %d chars)",
427 *line = '\0';
430 return (line);
543 * line too long...
612 * line too long...