Deleted Added
full compact
1/*
2 * Copyright (C) 1984-2002 Mark Nudelman
2 * Copyright (C) 1984-2005 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.
9 */
10

--- 306 unchanged lines hidden (view full) ---

317 free(alt_filename);
318 }
319 del_ifile(ifile);
320 free(qopen_filename);
321 free(filename);
322 /*
323 * Re-open the current file.
324 */
325 if (was_curr_ifile == ifile)
326 {
327 /*
328 * Whoops. The "current" ifile is the one we just deleted.
329 * Just give up.
330 */
331 quit(QUIT_ERROR);
332 }
333 reedit_ifile(was_curr_ifile);
334 return (1);
335 } else if ((f = open(qopen_filename, OPEN_READ)) < 0)
336 {
337 /*
338 * Got an error trying to open it.
339 */
340 parg.p_string = errno_message(filename);

--- 160 unchanged lines hidden (view full) ---

501edit_last()
502{
503 curr_ifile = NULL_IFILE;
504 return (edit_prev(1));
505}
506
507
508/*
501 * Edit the next or previous file in the command line (ifile) list.
509 * Edit the n-th next or previous file in the command line (ifile) list.
510 */
511 static int
512edit_istep(h, n, dir)
513 IFILE h;
514 int n;
515 int dir;
516{
517 IFILE next;

--- 32 unchanged lines hidden (view full) ---

550 return (0);
551}
552
553 static int
554edit_inext(h, n)
555 IFILE h;
556 int n;
557{
550 return (edit_istep(h, n, 1));
558 return (edit_istep(h, n, +1));
559}
560
561 public int
562edit_next(n)
563 int n;
564{
557 return edit_istep(curr_ifile, n, 1);
565 return edit_istep(curr_ifile, n, +1);
566}
567
568 static int
569edit_iprev(h, n)
570 IFILE h;
571 int n;
572{
573 return (edit_istep(h, n, -1));

--- 214 unchanged lines hidden ---