Add Mac toggle Meta-O for Mac format

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2001-09-22 04:34:23 +00:00
parent 8fa1e28681
commit 995177f2d9
3 changed files with 11 additions and 7 deletions

View File

@ -14,8 +14,8 @@ CVS code -
new code in read_line and write_file. New cmdline flag new code in read_line and write_file. New cmdline flag
(-D --dos) to automatically write the file in DOS format, (-D --dos) to automatically write the file in DOS format,
regardless of the original format. regardless of the original format.
- Mac file writing supported too. Flag -M, --mac. No toggle - Mac file writing supported too. Flag -M, --mac. Toggle
as of yet. Meta-O (MacOS? OS-X? =-)
- nano.c: - nano.c:
main() main()
- Added vars oldcurrent and oldcurrent_x to check whether cursor - Added vars oldcurrent and oldcurrent_x to check whether cursor

View File

@ -151,7 +151,7 @@ void toggle_init(void)
char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg, char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg,
*toggle_nohelp_msg, *toggle_picomode_msg, *toggle_mouse_msg, *toggle_nohelp_msg, *toggle_picomode_msg, *toggle_mouse_msg,
*toggle_cuttoend_msg, *toggle_wrap_msg, *toggle_case_msg, *toggle_cuttoend_msg, *toggle_wrap_msg, *toggle_case_msg,
*toggle_backwards_msg, *toggle_dos_msg; *toggle_backwards_msg, *toggle_dos_msg, *toggle_mac_msg;
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
char *toggle_load_msg, *nano_openprev_msg, *nano_opennext_msg; char *toggle_load_msg, *nano_openprev_msg, *nano_opennext_msg;
@ -171,6 +171,7 @@ void toggle_init(void)
toggle_backwards_msg = _("Backwards Search"); toggle_backwards_msg = _("Backwards Search");
toggle_case_msg = _("Case Sensitive Search"); toggle_case_msg = _("Case Sensitive Search");
toggle_dos_msg = _("Writing file in DOS format"); toggle_dos_msg = _("Writing file in DOS format");
toggle_mac_msg = _("Writing file in Mac format");
#ifdef HAVE_REGEX_H #ifdef HAVE_REGEX_H
toggle_regexp_msg = _("Regular expressions"); toggle_regexp_msg = _("Regular expressions");
#endif #endif
@ -204,13 +205,15 @@ void toggle_init(void)
CASE_SENSITIVE, 0); CASE_SENSITIVE, 0);
toggle_init_one(&toggles[10], TOGGLE_DOS_KEY, toggle_dos_msg, toggle_init_one(&toggles[10], TOGGLE_DOS_KEY, toggle_dos_msg,
DOS_FILE, 0); DOS_FILE, 0);
toggle_init_one(&toggles[11], TOGGLE_MAC_KEY, toggle_mac_msg,
MAC_FILE, 0);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
toggle_init_one(&toggles[11], TOGGLE_LOAD_KEY, toggle_load_msg, toggle_init_one(&toggles[12], TOGGLE_LOAD_KEY, toggle_load_msg,
MULTIBUFFER, 0); MULTIBUFFER, 0);
toggle_init_one(&toggles[12], NANO_OPENPREV_KEY, nano_openprev_msg, toggle_init_one(&toggles[13], NANO_OPENPREV_KEY, nano_openprev_msg,
0, '<'); 0, '<');
toggle_init_one(&toggles[13], NANO_OPENNEXT_KEY, nano_opennext_msg, toggle_init_one(&toggles[14], NANO_OPENNEXT_KEY, nano_opennext_msg,
0, '>'); 0, '>');
#endif #endif

3
nano.h
View File

@ -276,6 +276,7 @@ know what you're doing */
#define TOGGLE_CASE_KEY NANO_ALT_A #define TOGGLE_CASE_KEY NANO_ALT_A
#define TOGGLE_LOAD_KEY NANO_ALT_F #define TOGGLE_LOAD_KEY NANO_ALT_F
#define TOGGLE_DOS_KEY NANO_ALT_D #define TOGGLE_DOS_KEY NANO_ALT_D
#define TOGGLE_MAC_KEY NANO_ALT_O
/* Toggle stuff, these static lengths need to go away RSN */ /* Toggle stuff, these static lengths need to go away RSN */
@ -309,7 +310,7 @@ know what you're doing */
#define WHEREIS_LIST_LEN (8 - NO_REGEX - NO_TOGGLES) #define WHEREIS_LIST_LEN (8 - NO_REGEX - NO_TOGGLES)
#define REPLACE_LIST_LEN (8 - NO_REGEX - NO_TOGGLES) #define REPLACE_LIST_LEN (8 - NO_REGEX - NO_TOGGLES)
#define TOGGLE_LEN (12 - NO_REGEX + MULTI_TOGGLES) #define TOGGLE_LEN (13 - NO_REGEX + MULTI_TOGGLES)
#define WRITEFILE_LIST_LEN (3 - NO_BROWSER) #define WRITEFILE_LIST_LEN (3 - NO_BROWSER)
#define INSERTFILE_LIST_LEN (2 - NO_BROWSER) #define INSERTFILE_LIST_LEN (2 - NO_BROWSER)
#define BROWSER_LIST_LEN 4 #define BROWSER_LIST_LEN 4