Home | History | Annotate | Download | only in src

Lines Matching full:caret_info

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