new code in read_line and write_file. New cmdline flag
(-D --dos) to automatically write the file in DOS format,
regardless of the original format.
- - Mac file writing supported too. Flag -M, --mac. No toggle
- as of yet.
+ - Mac file writing supported too. Flag -M, --mac. Toggle
+ Meta-O (MacOS? OS-X? =-)
- nano.c:
main()
- Added vars oldcurrent and oldcurrent_x to check whether cursor
char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg,
*toggle_nohelp_msg, *toggle_picomode_msg, *toggle_mouse_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
char *toggle_load_msg, *nano_openprev_msg, *nano_opennext_msg;
toggle_backwards_msg = _("Backwards Search");
toggle_case_msg = _("Case Sensitive Search");
toggle_dos_msg = _("Writing file in DOS format");
+ toggle_mac_msg = _("Writing file in Mac format");
#ifdef HAVE_REGEX_H
toggle_regexp_msg = _("Regular expressions");
#endif
CASE_SENSITIVE, 0);
toggle_init_one(&toggles[10], TOGGLE_DOS_KEY, toggle_dos_msg,
DOS_FILE, 0);
+ toggle_init_one(&toggles[11], TOGGLE_MAC_KEY, toggle_mac_msg,
+ MAC_FILE, 0);
#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);
- toggle_init_one(&toggles[12], NANO_OPENPREV_KEY, nano_openprev_msg,
+ toggle_init_one(&toggles[13], NANO_OPENPREV_KEY, nano_openprev_msg,
0, '<');
- toggle_init_one(&toggles[13], NANO_OPENNEXT_KEY, nano_opennext_msg,
+ toggle_init_one(&toggles[14], NANO_OPENNEXT_KEY, nano_opennext_msg,
0, '>');
#endif
#define TOGGLE_CASE_KEY NANO_ALT_A
#define TOGGLE_LOAD_KEY NANO_ALT_F
#define TOGGLE_DOS_KEY NANO_ALT_D
+#define TOGGLE_MAC_KEY NANO_ALT_O
/* Toggle stuff, these static lengths need to go away RSN */
#define WHEREIS_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 INSERTFILE_LIST_LEN (2 - NO_BROWSER)
#define BROWSER_LIST_LEN 4