• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/less/

Lines Matching refs:ifile

14  * It is actually a pointer to an ifile structure,
26 struct ifile {
27 struct ifile *h_next; /* Links for command line list */
28 struct ifile *h_prev;
34 char h_opened; /* Has this ifile been opened? */
44 #define int_ifile(h) ((struct ifile *)(h))
50 static struct ifile anchor = { &anchor, &anchor, NULL, NULL, NULL, 0, 0, '\0',
56 struct ifile *p;
64 * Link an ifile into the ifile list.
68 struct ifile *p;
69 struct ifile *prev;
90 * Unlink an ifile from the ifile list.
94 struct ifile *p;
103 * Allocate a new ifile structure and stick a filename in it.
106 * Return a pointer to the new ifile structure.
108 static struct ifile *
111 struct ifile *prev;
113 struct ifile *p;
118 p = (struct ifile *) ecalloc(1, sizeof(struct ifile));
138 * Delete an existing ifile structure.
144 struct ifile *p;
149 * If the ifile we're deleting is the currently open ifile,
163 * Get the ifile after a given one in the list.
169 struct ifile *p;
178 * Get the ifile before a given one in the list.
184 struct ifile *p;
193 * Return a different ifile from the given one.
196 getoff_ifile(ifile)
197 IFILE ifile;
201 if ((newifile = prev_ifile(ifile)) != NULL_IFILE)
203 if ((newifile = next_ifile(ifile)) != NULL_IFILE)
218 * Find an ifile structure, given a filename.
220 static struct ifile *
224 struct ifile *p;
250 * Get the ifile associated with a filename.
252 * insert the new ifile after "prev" in the list.
259 struct ifile *p;
267 * Get the display filename associated with a ifile.
270 get_filename(ifile)
271 IFILE ifile;
273 if (ifile == NULL)
275 return (int_ifile(ifile)->h_filename);
279 * Get the canonical filename associated with a ifile.
282 get_real_filename(ifile)
283 IFILE ifile;
285 if (ifile == NULL)
287 return (int_ifile(ifile)->h_rfilename);
291 * Get the index of the file associated with a ifile.
294 get_index(ifile)
295 IFILE ifile;
297 return (int_ifile(ifile)->h_index);
304 store_pos(ifile, scrpos)
305 IFILE ifile;
308 int_ifile(ifile)->h_scrpos = *scrpos;
316 get_pos(ifile, scrpos)
317 IFILE ifile;
320 *scrpos = int_ifile(ifile)->h_scrpos;
324 * Mark the ifile as "opened".
327 set_open(ifile)
328 IFILE ifile;
330 int_ifile(ifile)->h_opened = 1;
334 * Return whether the ifile has been opened previously.
337 opened(ifile)
338 IFILE ifile;
340 return (int_ifile(ifile)->h_opened);
344 hold_ifile(ifile, incr)
345 IFILE ifile;
348 int_ifile(ifile)->h_hold += incr;
352 held_ifile(ifile)
353 IFILE ifile;
355 return (int_ifile(ifile)->h_hold);
359 get_filestate(ifile)
360 IFILE ifile;
362 return (int_ifile(ifile)->h_filestate);
366 set_filestate(ifile, filestate)
367 IFILE ifile;
370 int_ifile(ifile)->h_filestate = filestate;
374 set_altpipe(ifile, p)
375 IFILE ifile;
378 int_ifile(ifile)->h_altpipe = p;
382 get_altpipe(ifile)
383 IFILE ifile;
385 return (int_ifile(ifile)->h_altpipe);
389 set_altfilename(ifile, altfilename)
390 IFILE ifile;
393 struct ifile *p = int_ifile(ifile);
400 get_altfilename(ifile)
401 IFILE ifile;
403 return (int_ifile(ifile)->h_altfilename);
410 struct ifile *p;