Lines Matching refs:caret_info
144 struct caret_info struct
151 static struct caret_info caret_info = { NULL, 1, 0 }; argument
156 if (caret_info.source) in cleanup_caret()
157 fclose (caret_info.source); in cleanup_caret()
165 if (! (caret_info.source in location_caret()
166 || (caret_info.source = fopen (loc.start.file, "r"))) in location_caret()
173 if (caret_info.line <= loc.start.line) in location_caret()
174 fseek (caret_info.source, caret_info.offset, SEEK_SET); in location_caret()
177 caret_info.line = 1; in location_caret()
178 caret_info.offset = 0; in location_caret()
179 fseek (caret_info.source, caret_info.offset, SEEK_SET); in location_caret()
183 while (caret_info.line < loc.start.line) in location_caret()
184 caret_info.line += fgetc (caret_info.source) == '\n'; in location_caret()
185 caret_info.offset = ftell (caret_info.source); in location_caret()
192 ssize_t len = getline (&buf, &size, caret_info.source); in location_caret()