"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cmd.c" between
most-5.0.0a.tar.gz and most-5.1.0.tar.gz

About: most is a textfile paging program (supports multiple windows and can scroll left and right).

cmd.c  (most-5.0.0a):cmd.c  (most-5.1.0)
/* /*
This file is part of MOST. This file is part of MOST.
Copyright (c) 1991, 1999, 2002, 2005, 2006, 2007 John E. Davis Copyright (c) 1991, 1999, 2002, 2005-2018, 2019 John E. Davis
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) Software Foundation; either version 2 of the License, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, but WITHOUT This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
skipping to change at line 76 skipping to change at line 76
char *msg; char *msg;
Most_Case_Sensitive = !Most_Case_Sensitive; Most_Case_Sensitive = !Most_Case_Sensitive;
if (Most_Case_Sensitive) if (Most_Case_Sensitive)
msg = "Searches now respect case."; msg = "Searches now respect case.";
else else
msg = "Searches nolonger respect case."; msg = "Searches nolonger respect case.";
most_message (msg, 0); most_message (msg, 0);
} }
void most_toggle_research (void)
{
char *msg;
Most_Do_Regexp_Search = !Most_Do_Regexp_Search;
if (Most_Do_Regexp_Search)
msg = "Regexp search enabled";
else
msg = "Regexp search disabled";
most_message (msg, 0);
}
void most_delete_file_cmd (void) void most_delete_file_cmd (void)
{ {
int bell = 0; int bell = 0;
char ch; char ch;
char *msg; char *msg;
if ('*' == *Most_Buf->file) return; if ('*' == *Most_Buf->file) return;
if (Most_Secure_Mode) Most_D_Opt = 0; if (Most_Secure_Mode) Most_D_Opt = 0;
if (Most_D_Opt == 0) return; if (Most_D_Opt == 0) return;
skipping to change at line 116 skipping to change at line 130
} }
void most_toggle_options (void) void most_toggle_options (void)
{ {
char ch; char ch;
char *msg = NULL; char *msg = NULL;
int n; int n;
unsigned int save; unsigned int save;
most_select_minibuffer(); most_select_minibuffer();
SLsmg_write_string("Toggle option: b(binary) d(selective display) t(tab) v(ve rbose) w(wrap)"); SLsmg_write_string("Toggle: b(binary) t(tab) v(verbose) w(wrap) d(selective d isplay) ");
SLsmg_gotorc (SLtt_Screen_Rows - 1, 0); SLsmg_gotorc (SLtt_Screen_Rows - 1, 0);
SLsmg_refresh (); SLsmg_refresh ();
ch = getkey_nocase(); ch = getkey_nocase();
switch (ch) switch (ch)
{ {
default: default:
msg = "\007Invalid option!"; msg = "\007Invalid option!";
break; break;
skipping to change at line 239 skipping to change at line 253
/* ----------------------------------------------------------------------*/ /* ----------------------------------------------------------------------*/
void most_extended_key_cmd (void) void most_extended_key_cmd (void)
{ {
char ch; char ch;
if (Most_Secure_Mode) Most_D_Opt = 0; if (Most_Secure_Mode) Most_D_Opt = 0;
most_select_minibuffer(); most_select_minibuffer();
SLsmg_write_string ("Choose: N (next file), C (toggle case), O (toggle option s)"); SLsmg_write_string ("Choose: N (next file), C(toggle case), R(toggle re-searc h) O(toggle options)");
if (Most_D_Opt) SLsmg_write_string (" ,D (delete file)"); if (Most_D_Opt) SLsmg_write_string (" ,D (delete file)");
SLsmg_gotorc (SLtt_Screen_Rows - 1, 0); SLsmg_gotorc (SLtt_Screen_Rows - 1, 0);
SLsmg_refresh (); SLsmg_refresh ();
ch = getkey_nocase(); ch = getkey_nocase();
SLsmg_erase_eol (); SLsmg_erase_eol ();
most_exit_minibuffer (); most_exit_minibuffer ();
switch (ch) switch (ch)
{ {
case 'N': case 'N':
most_next_file (); most_next_file ();
break; break;
case 'C': case 'C':
most_toggle_case (); most_toggle_case ();
break; break;
case 'R':
most_toggle_research ();
break;
case 'O': case 'O':
most_toggle_options (); most_toggle_options ();
break; break;
case 'D': case 'D':
if (Most_D_Opt) if (Most_D_Opt)
{ {
most_delete_file_cmd (); most_delete_file_cmd ();
break; break;
} }
/* drop */ /* drop */
 End of changes. 5 change blocks. 
3 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)