edit.c (238730) | edit.c (293190) |
---|---|
1/* | 1/* |
2 * Copyright (C) 1984-2012 Mark Nudelman | 2 * Copyright (C) 1984-2015 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, see the README file. 8 */ 9 10 --- 48 unchanged lines hidden (view full) --- 59 struct textlist *tlist; 60 char *str; 61{ 62 char *s; 63#if SPACES_IN_FILENAMES 64 int meta_quoted = 0; 65 int delim_quoted = 0; 66 char *esc = get_meta_escape(); | 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, see the README file. 8 */ 9 10 --- 48 unchanged lines hidden (view full) --- 59 struct textlist *tlist; 60 char *str; 61{ 62 char *s; 63#if SPACES_IN_FILENAMES 64 int meta_quoted = 0; 65 int delim_quoted = 0; 66 char *esc = get_meta_escape(); |
67 int esclen = strlen(esc); | 67 int esclen = (int) strlen(esc); |
68#endif 69 70 tlist->string = skipsp(str); 71 tlist->endstring = tlist->string + strlen(tlist->string); 72 for (s = str; s < tlist->endstring; s++) 73 { 74#if SPACES_IN_FILENAMES 75 if (meta_quoted) --- 330 unchanged lines hidden (view full) --- 406 if (r == 0) 407 { 408 curr_ino = statbuf.st_ino; 409 curr_dev = statbuf.st_dev; 410 } 411 } 412#endif 413 if (every_first_cmd != NULL) | 68#endif 69 70 tlist->string = skipsp(str); 71 tlist->endstring = tlist->string + strlen(tlist->string); 72 for (s = str; s < tlist->endstring; s++) 73 { 74#if SPACES_IN_FILENAMES 75 if (meta_quoted) --- 330 unchanged lines hidden (view full) --- 406 if (r == 0) 407 { 408 curr_ino = statbuf.st_ino; 409 curr_dev = statbuf.st_dev; 410 } 411 } 412#endif 413 if (every_first_cmd != NULL) |
414 { 415 ungetcc(CHAR_END_COMMAND); |
|
414 ungetsc(every_first_cmd); | 416 ungetsc(every_first_cmd); |
417 } |
|
415 } 416 417 free(qopen_filename); 418 no_display = !any_display; 419 flush(); 420 any_display = TRUE; 421 422 if (is_tty) --- 5 unchanged lines hidden (view full) --- 428 /* 429 * Indicate there is nothing displayed yet. 430 */ 431 pos_clear(); 432 clr_linenum(); 433#if HILITE_SEARCH 434 clr_hilite(); 435#endif | 418 } 419 420 free(qopen_filename); 421 no_display = !any_display; 422 flush(); 423 any_display = TRUE; 424 425 if (is_tty) --- 5 unchanged lines hidden (view full) --- 431 /* 432 * Indicate there is nothing displayed yet. 433 */ 434 pos_clear(); 435 clr_linenum(); 436#if HILITE_SEARCH 437 clr_hilite(); 438#endif |
436 cmd_addhist(ml_examine, filename); | 439 if (strcmp(filename, FAKE_HELPFILE) && strcmp(filename, FAKE_EMPTYFILE)) 440 cmd_addhist(ml_examine, filename, 1); |
437 if (no_display && errmsgs > 0) 438 { 439 /* 440 * We displayed some messages on error output 441 * (file descriptor 2; see error() function). 442 * Before erasing the screen contents, 443 * display the file name and wait for a keystroke. 444 */ --- 295 unchanged lines hidden (view full) --- 740 */ 741 return; 742 743 /* 744 * {{ We could use access() here. }} 745 */ 746 filename = shell_unquote(filename); 747 exists = open(filename, OPEN_READ); | 441 if (no_display && errmsgs > 0) 442 { 443 /* 444 * We displayed some messages on error output 445 * (file descriptor 2; see error() function). 446 * Before erasing the screen contents, 447 * display the file name and wait for a keystroke. 448 */ --- 295 unchanged lines hidden (view full) --- 744 */ 745 return; 746 747 /* 748 * {{ We could use access() here. }} 749 */ 750 filename = shell_unquote(filename); 751 exists = open(filename, OPEN_READ); |
748 close(exists); | 752 if (exists >= 0) 753 close(exists); |
749 exists = (exists >= 0); 750 751 /* 752 * Decide whether to overwrite the log file or append to it. 753 * If it doesn't exist we "overwrite" it. 754 */ 755 if (!exists || force_logfile) 756 { --- 65 unchanged lines hidden --- | 754 exists = (exists >= 0); 755 756 /* 757 * Decide whether to overwrite the log file or append to it. 758 * If it doesn't exist we "overwrite" it. 759 */ 760 if (!exists || force_logfile) 761 { --- 65 unchanged lines hidden --- |