diff --git a/BUGS b/BUGS index 1749f619..c5dc9193 100644 --- a/BUGS +++ b/BUGS @@ -6,20 +6,20 @@ - edit_refresh() and update_line() do not handle selecting text when the cursor is beyond COLS (10) [FIXED] - no way to do a replace with the empty string (11) [FIXED, yay!] -- Spelling support is not elegant like pico's integration of the 'spell' +- Spelling support is not elegant like Pico's integration of the 'spell' program. Nano only uses ispell (for now) (12) [FIXED] - Moving to the end of a line when close to a multiple of COLS and at least COLS * 2 does not make the screen jump early like it would for if we were around COLS (bugs in edit_refresh, update_line) (13) [FIXED, mostly] -- When at the very bottom of the edit window, do_wrap goes berzerk and - puts the curor somewhere bad, subsequent keystrokes crash the program +- When at the very bottom of the edit window, do_wrap goes berserk and + puts the cursor somewhere bad; subsequent keystrokes crash the program (14) [FIXED, mostly] - Doing a replacement of a substring of the replace string (e.g. replacing - "ed" with "fred" causes an infinite loop. (15) [FIXED] + "ed" with "fred" causes an infinite loop). (15) [FIXED] - Cutting a file with marked text and both marker ends on the same line causes a random segfault (16) [FIXED] -- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3 +- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3. Error is in bitwise assignment (nano.h). (17) [FIXED] - The wrapping code does not work right for lines like the following: * * @@ -27,9 +27,10 @@ - Nano fails to follow symlinks, even though -l isn't being used (20). [Bug in global flag init, FIXED] - When using --help or --version, the SIGINT character gets lost. (21) [FIXED] -- edit_refresh() and update_line() (and related functions), have - trouble when a tab is the character that is the boundry at COLS (23) [FIXED] -- there is an off-by-one error in keeping track of totsize. It is caused +- edit_refresh() and update_line() (and related functions) have + trouble when a tab is the character that is the boundary at COLS (23) + [FIXED] +- There is an off-by-one error in keeping track of totsize. It is caused by the fact that we count the newline at the end when we read in a file but we do not, in fact, display this newline. This should go away implicitly when the "Magic Line" returns, but it is noted here for @@ -41,50 +42,52 @@ a dialog about not being able to write the file, and it will not let the user exit (29, discovered by Joshua Jensen) [FIXED] - Using nano -k, marked text is not cut properly. (31) [FIXED] -- Invoking -t or -k has the effect of invoking both option. (32) [FIXED] +- Invoking -t or -k has the effect of invoking both options. (32) [FIXED] - totsize becomes incorrect after word-wrapping (25) [FIXED] -- Wrapping a line with autoindent mode sometimes causes a segfault (19)[FIXED] +- Wrapping a line with autoindent mode sometimes causes a segfault (19) + [FIXED] - When inserting files, the display sometimes fails to display properly - until a pageup/down occurs (22)[FIXED] -- In search/replace code there is too much refreshing in bottomwin (26) - [FIXED] + until a pageup/down occurs (22) [FIXED] +- In search/replace code, there is too much refreshing in bottomwin (26) + [FIXED] - In replace, there is no way to accept the default replace string. (27) - [FIXED] + [FIXED] - Using nano -t, user can not exit until a filename is given via ^O. (30) - [FIXED] + [FIXED] - totsize problems still abound in do_justify (33) [FIXED] -- Using -k cut text is not pasted properly. (34) [FIXED]. -- Using -k pasted text is not updated properly if it goes beyond editbot. (35) - [FIXED] -- Doing a cut with -k can screw up the filestruct, fault is in cutting +- Using -k, cut text is not pasted properly. (34) [FIXED]. +- Using -k, pasted text is not updated properly if it goes beyond editbot. (35) + [FIXED] +- Doing a cut with -k can screw up the filestruct; fault is in cutting code. (36) [FIXED] - Hitting enter on the magic line makes new lines, but they are not written out to disk when saved..... (37). [FIXED] -- Page up and page down do not work the same way as Pico (# of lines). (38) - [FIXED] +- Page up and page down do not work the same way as in Pico (# of lines). (38) + [FIXED] - When doing a search and the marker is set, the screen does not always properly update the inverted text (39). [FIXED] -- Searches for a string that only exist on one line multiple times will - fail after finding the last occurance (discovered by Ken Tyler) (40). [FIXED] -- Alt-Z is current broken to toggle suspend. I guess I still don't know +- Searches for a string that only exists on one line multiple times will + fail after finding the last occurrence (discovered by Ken Tyler) (40). + [FIXED] +- Alt-Z is currently broken to toggle suspend. I guess I still don't know signals very well =-) (41) [FIXED]. - Unable to cut the entire file using the marker (discovered by Kev Tyler) (42). [FIXED] - The keypad does not work when nano runs in the Gnome terminal (43). [FIXED] -- When reading in a file, if the file is a directory the contents of the +- When reading in a file, if the file is a directory, the contents of the file being edited are blown away (discovered by Chris Pimlot) (44). [FIXED] - in certain terms, nano will leave a "ghost" of screen upon exit when called from inside mutt (among other settings) (45). [FIXED] - In replace, hitting the Goto line shortcut key does nothing after a search string is entered (discovered by Rocco Corsi) (46) [FIXED]. -- When typing in a string in serahc or replace and hitting CASE_SENSITVE +- When typing in a string in search or replace and hitting CASE_SENSITIVE or the other search string, the current string edit is blown away in favor of the last stored search (47) [FIXED] -- If nano fails to open a file when it starts up,doing almost anything +- If nano fails to open a file when it starts up, doing almost anything causes a segfault (discovered by Ben Roberts) (48). [FIXED] - In certain terminals, nano would not work properly with keypad(). - Turned out to be the silly timeout(0) call which is completely - unneeded anyway. (49) [FIXED] + Turned out to be the silly timeout(0) call, which is completely + unneeded, anyway. (49) [FIXED] - With less than a page of text, doing a page down will move the current line to the top of the screen, which it shouldn't do. (50) [FIXED] @@ -97,7 +100,7 @@ - Cut to end cutting (-k) causes segfaults (try cutting "- Backup making (filename~)?" line in TODO file) (discovered by higuita@cadernoverde.com) (54) [FIXED]. -- When using autoindent (-i), wrapped text does not get auto-indented +- When using autoindent (-i), wrapped text does not get autoindented (55, discovered by Mark Senior) [FIXED]. - When using -R (regex) and -p (pico mode), subsequent searches after the first fail if no string is entered (56) [FIXED]. diff --git a/ChangeLog b/ChangeLog index 16189aa0..e23ea10c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ Cvs code - the mouse with the shortcuts. FIXME - Does not support clicking on filenames in the browser, yet. - Changed mouse disabling code from depending on --enable-tiny - to its own flag, --disable mouse. The --tiny option defines + to its own flag, --disable-mouse. The --tiny option defines this automatically, but now just mouse support can be disabled if desired. - File Browser supports the "Goto Directory" @@ -15,12 +15,13 @@ Cvs code - and change the aproproate calls which used nmalloc for lack of an apropriate calloc function *** FIXME *** - After "Alternate" spell checker is called, cursor is repositioned on - the same line as before ^T was called. + the same line as before ^T was pressed. - Moved config.h up in all .c files #include list (Albert Chin). - - Added config.guess and config.sub to distribution because - apparently newer autoconf/automakes can't live without them. + - Added config.guess and config.sub to distribution because, + apparently, newer autoconf/automakes can't live without them. + - Various spelling updates by David Lawrence Ramsey. - configure.in: - - New option, --enable-nanorc which allows people to have a .nanorc + - New option, --enable-nanorc, which allows people to have a .nanorc initialization file and set options normally used on the command line, and color later on. - Added --enable-color option to allow color and syntax highlighting @@ -73,7 +74,7 @@ nano 1.0.1 - 04/06/2001 - General: - added configure option --disable-wrapping. Does what it says, no wrapping or checks are done. Separate from --enable-tiny, - some may want a barebones Pico clone that does wrap text. + some may want a bare-bones Pico clone that does wrap text. Affects configure, nano.c:do_char() and check_wrap() obviously, version(), and do_char(). - aclocal.m4: @@ -129,7 +130,7 @@ nano-1.0.0 - 03/22/2001 2b for placement of cursor. - move.c: page_down() - - Check for totlines < editwinrows in check for superflous + - Check for totlines < editwinrows in check for superfluous edit update (fixed BUG #57). - search.c: print_replaced() @@ -158,11 +159,11 @@ nano-0.9.99pre3 - 02/19/2001 - nano.c: do_delete() - Added check for current->next == fileptr, as we have a magic - line code again, fixes sillyness at the end of the last line + line code again, fixes silliness at the end of the last line before the magic line (reported by J.A. Neitzel). do_justify() - If the keystroke after the justify is not the unjustify key, - blank the statsubar (bug reported by Neil Parks). + blank the statusbar (bug reported by Neil Parks). main() - Added ENABLE_NLS check around gettext stuff. - winio.c: @@ -203,7 +204,8 @@ General - Rewritten using getpwent (suggested by Rocco). - Removed redundant conditional (Rocco). real_dir_from_tilde() - - Rewritten using getpwent (suggested by Adam, much optimized by Rocco). + - Rewritten using getpwent (suggested by Adam, much optimized by + Rocco). - global.c: - Don't define toggles global or toggle_init_one if using --tiny. - nano.c: @@ -232,13 +234,13 @@ General - Various #ifdef & #ifndef cleanups. (Rocco) - Added message for when keypad goes awry. Added code in main and function print_numlock_warning() to notify user, and added an - apropriate section in the faq to refer to this brokenness. + appropriate section in the faq to refer to this brokenness. - Added macros in nano.h for magic values that might be unclear in nano.c:global_init(). (Rocco) - configure.in: - Fix for _use_keypad check breaking slang support (Christian Weisgerber). - - Changed to automatically define the 5 DISABLE varibles when + - Changed to automatically define the 5 DISABLE variables when NANO_SMALL (enable-tiny) is requested at configure. - faq.html: - Added some info on making the binary smaller with the configure @@ -271,7 +273,7 @@ General - When NANO_SMALL (enable-tiny) is defined, the 5 main DISABLE variables (SPELLER, HELP, JUSTIFY, BROWSER, TABCOMP) are not reported as enabled when Nano is called with -V (--version) - command-line option. (Rocco) + command line option. (Rocco) usage() - Alternate speller option no longer valid if DISABLE_SPELLER is active. (Rocco) @@ -296,8 +298,8 @@ General - - Keypad code has been changed slightly. Now checks for _use_keypad flag in window to see whether or not to turn the keypad() back off when finished (taken from aumix). Moved - to winio.c where it should probably be anyway. New confgure - check for _use_keypad in window sstruct. This will have to do + to winio.c where it should probably be anyway. New configure + check for _use_keypad in window struct. This will have to do for now. - Moved keypad() calls for PDCURSES from main() to window_init() so the keypad continues to work after a Meta-X, for example. @@ -318,7 +320,7 @@ General - do_browser() - Don't decrement longest by the length of path. Fixes crashes on entering various dirs (Rocco). - - Don't ungetch() the exit key, unneeded, fixes inerting a file + - Don't ungetch() the exit key, unneeded, fixes inserting a file causes exit code. - move.c: page_down() @@ -375,7 +377,7 @@ General - Added check for S_ISBLK and S_ISCHR, don't open device files! - nano.c: renumber() - - Dont stupidly assign the value of prev->lineno if prev == NULL! + - Don't stupidly assign the value of prev->lineno if prev == NULL! main() - Added code to check for Alt-Alt (27-27) keystrokes and set the next keystroke as a control sequence. New variable @@ -408,7 +410,7 @@ General "speller" for -s, so it should be --disable-speller. - files.c: write_file() - - Added tmp check to TMP_OPT section (how apropriate). + - Added tmp check to TMP_OPT section (how appropriate). - Added new consistency checking code from securityfocus article by Oliver Friedrichs, and use O_EXCL if tmp == 1. - We now run check on result of lstat(), not stat(), to be @@ -423,7 +425,7 @@ General edit_add() - Off by one display error (fix by Rocco Corsi). do_replace_highlight() - - New code to handle being past COLS (Roco Corsi). + - New code to handle being past COLS (Rocco Corsi). - Moved from search.c, as it's definitely a winio function now =) update_line() - More '$' display fixes (Rocco Corsi). @@ -438,15 +440,15 @@ nano 0.9.22 - 12/02/2000 - Took out help from spell_list and changed SPELL_LIST_LEN to 1. Is using a spell checker THAT difficult? =-) - New function nano_disabled_msg(), to alert that certain - functions have been disabled, similaer to nano_tiny feature. + functions have been disabled, similar to nano_tiny feature. - New configure options: - Added configure argument --disable-tabcomp. Affects bottom of files.c and write_file, utils.c:check_wildcard_match() - and winio.c:nanogettsr(). + and winio.c:nanogetstr(). - New options --enable-extra. New code in nano.c:version() to print out various options from ./configure, function do_credits(). - Added --disable-spell option for those who want to just disable - the spell check feature. Affects the spellinf fucntions + the spell check feature. Affects the spelling functions do_spell, do_int_speller and do_alt_speller. - Added --disable-justify to get rid of the justify function. Affects do_justify() (not surprisingly). @@ -462,8 +464,8 @@ nano 0.9.22 - 12/02/2000 - global.c: shortcut_init() - Now takes an argument as to whether to display the unjustify - shortcut or the normal uncut text one. Needed to accomodate - the klugey unjustify code. + shortcut or the normal uncut text one. Needed to accommodate + the kludgey unjustify code. - nano.1, nano.1.html: - Updated date on pages because of -p changes. - Added "NOTES" section, where I explain what nano.save & friends @@ -516,7 +518,7 @@ nano 0.9.21 - 11/23/2000 whether or not to display "New File" in the statusbar. - search.c: findnextstr() - - Fix curent_x increment bug by using another variable (Rocco Corsi). + - Fix current_x increment bug by using another variable (Rocco Corsi). search_init() - Silly typo in our "one simple call" of statusq. Stopped previous search string from being displayed. @@ -525,7 +527,8 @@ nano 0.9.21 - 11/23/2000 using PICO_MODE and answer == "" - winio.c: do_up() - - Deleted first update_line() call, screws up display when marker is set. + - Deleted first update_line() call, screws up display when marker is + set. - nano.1, nano.1.html - Updated man page for new -p definition. @@ -538,12 +541,13 @@ nano 0.9.20 - 11/18/2000 changed code in search_init(), do_replace(), nanogetstr (see below). - Added some missing gettext calls here and there (Jordi). - - Revamped nanogetsr() and calls to it to use variable length strings. + - Revamped nanogetstr() and calls to it to use variable length + strings. MANY changes in nanogetstr(), many chances in search.c, new function mallocstrcpy which is sure to be a programmatic nightmare, changed last_search, last_replace, answer to pointers. New function not_found_msg in search.c for displaying - truncated strings in satusbar when the string is not found + truncated strings in statusbar when the string is not found (-pedantic fixes by Rocco Corsi). We disable this feature when using PICO_MODE (-p). - New spelling code by Rocco Corsi. New functions @@ -567,7 +571,7 @@ nano 0.9.20 - 11/18/2000 - global.c - New global replace_list_2, for 2nd half of the replace dialog ("Replace with:"), has fewer options than first half because - they were inapropriate. + they were inappropriate. toggle_init() - Added #ifdef around toggle_regex_msg to get rid of compiler warning. @@ -577,7 +581,7 @@ nano 0.9.20 - 11/18/2000 - New function, toggles turning the keypad on and off in edit and bottomwin(). Added call to this in finish(), fixes bug #45. - search.c - findnexstr() + findnextstr() - New arg for begin_x variable, basically a rewrite that makes a little more sense and isn't quite as messy (Rocco Corsi). - Update the line we're checking if not the whole screen, because @@ -589,7 +593,7 @@ nano 0.9.20 - 11/18/2000 do_replace() - Added code for Gotoline key after entering the search term. Fixes bug #46. - - Removed redundant code involving processing replacemenet string. + - Removed redundant code involving processing replacement string. Converted if statements to switch statements. - Optimizations by Rocco Corsi. - Removed code for deleted shortcuts from in replace_list_2. @@ -659,12 +663,12 @@ nano 0.9.18 - 09/18/2000 keypad in many terms, which is very bad. - Made insert key call do_insertfile(). do_toggle() - - Rewrote function to allow NOHELP toggle to wotk on systems + - Rewrote function to allow NOHELP toggle to work on systems without a working resizewin(). New function window_init(). mouse_init() - Add keypad only if mouse support is on, otherwise mouse doesn't work. I guess you have to choose between having the mouse and - having a working keypad for the time being (thank god for Meta-m). + having a working keypad for the time being (thank god for Meta-M). - winio.c: total_refresh() - Added titlebar() call. @@ -690,7 +694,7 @@ nano-0.9.17 - 09/04/2000 nano.c. - Changed from Alt-key symbol (@) which is completely nonstandard to the *nix "Meta" symbol (M-). Changed help_init to show - the M-key usage and the help text to explain keys whcih generate + the M-key usage and the help text to explain keys which generate Meta. Moved the toggle Meta keystrokes to the first column instead of the third as they are the primary keystrokes for the functions. Thanks Mini editor team :-> @@ -774,7 +778,7 @@ nano-0.9.15 - 08/03/2000 - Fixed typo (?) in check for inptr->next. Caused lots of grief for editing lines at filebot. main() - - Removed now useless usrtabsize variable (Christian Weisgerber). + - Removed now useless usertabsize variable (Christian Weisgerber). - search.c: replace_abort() - redundant, now just calls search abort until it does something @@ -836,8 +840,8 @@ nano-0.9.13 - 07/23/2000 die(): - More intelligent emergency-save filename selection (Rob) do_spell(): - - Changed exit semantincs a bit so that aspell wouldn't get - all screwy (bug disovered by Joshua Jensen. + - Changed exit semantics a bit so that aspell wouldn't get + all screwy (bug discovered by Joshua Jensen. - files.c: read_file(): - Added init of buf variable, hopefully this will stop the @@ -860,7 +864,7 @@ nano-0.9.13 - 07/23/2000 the opposite function. - Fixed bug #28. findnextstr() - - do not center string found if it is currently visable. (Adam) + - do not center string found if it is currently visible. (Adam) - fr.po: - French update by Clement Laforet . - es.po: @@ -928,21 +932,21 @@ nano-0.9.12 - 07/07/2000 nano-0.9.11 - 06/20/2000 - New flag "-T" or "--tabsize" to specify how to display tab widths. Affects main() in nano.c, strlenpt(), xpt() and actual_x() (et al) in - winio.c, and nano.h. Many harcoded "8"s have been changed to the + winio.c, and nano.h. Many hardcoded "8"s have been changed to the TABSIZE int. Added changes to nano.1 and nano.1.html. - id.po: - Indonesian translation by Tedi Heriyanto. - es.po: - Updated translation (Jordi Mallach). - winio.c - - Rewrite of display functions to correct the display problems + - Rewrite of display functions to correct the display problems we had been seeing. Affects: add_marked_sameline, edit_add, and many others. (Rob Siemborski) - totsize fixes (Rob Siemborski) total_refresh(): - - Cut dispaly_main_list call, as this function is only supposed to refresh - what's already on the screen, not go through the process of adding the - text again. + - Cut display_main_list call, as this function is only supposed to + refresh what's already on the screen, not go through the process + of adding the text again. - cut.c: - totsize fixes (Rob Siemborski) - nano.c: @@ -952,13 +956,14 @@ nano-0.9.11 - 06/20/2000 - Removed all functions that were split into other files. Affects LOTS of funcs. do_enter(): - - Added reset of placewewant to end. + - Added reset of placewewant to end. do_insertfile(): - Fix display problem when using ctrl-r to load a file into the buffer (Rob Siemborski) handle_sigwinch(): - - Added titlebar(), edit_refresh() and display_main_list() calls because - a resize wasn't picking up on possible different width correctly. + - Added titlebar(), edit_refresh() and display_main_list() calls + because a resize wasn't picking up on possible different width + correctly. - utils.c: - Moved nmalloc() and nrealloc() here. - move.c: @@ -983,14 +988,14 @@ nano-0.9.10 - 06/04/2000 exit nano before it runs (--version, --help, etc). nano-0.9.9 - 05/31/2000 -- Makeile.am: +- Makefile.am: - Added proper lines for defining LOCALEDIR. - configure.in: - Spelling fixes (Jordi Mallach) - Removed CFLAGS changes for gcc, reduces portability according to some, and it certainly doesn't seem to decrease exe size. - es.po: - - Spanish ranslation updates (Jordi Mallach) + - Spanish translation updates (Jordi Mallach) - POTFILES.in: - Added global.c file, was screwing up translations (i.e. they weren't getting done). @@ -1013,7 +1018,7 @@ nano-0.9.9 - 05/31/2000 renumber(), renumber_all(): - Removed totsize-- and totsize init in renumber_all. do_mouse(): - - Added edit_refresh() call to show hilight updates. Removed + - Added edit_refresh() call to show highlight updates. Removed unnecessary wrefresh(edit). main(): - Moved up locale calls so that translated --help messages would @@ -1027,7 +1032,7 @@ nano-0.9.9 - 05/31/2000 - malloc call changed to nmalloc (Rob Siemborski). - winio.c: total_refresh(): - - Completely rewrote function, not quite so braindamaged now. + - Completely rewrote function, not quite so brain-damaged now. nano-0.9.8 - 05/18/2000 - nano.c: @@ -1036,7 +1041,7 @@ nano-0.9.8 - 05/18/2000 character (Adam Rogoyski). Removed raw()/noraw() calls so that nano gets input in 'normal' mode, which is the Right Way(tm) to do it. ^S, ^Z and ^Q now work properly as a result, as well as - ^C. New variable term, global bariable oldterm to save previous + ^C. New variable term, global variable oldterm to save previous term settings, and changes to finish() and die(). - Added extra #ifdefs in getopt code, so that above code and flag init is run even if GETOPT_LONG is not #defined. @@ -1050,8 +1055,8 @@ nano-0.9.8 - 05/18/2000 loop. - global.c: shortcut_init(): - - Removed suspend sc_init call and suspend message because suspend is no - longer needed in the shortcut list to work properly. + - Removed suspend sc_init call and suspend message because suspend + is no longer needed in the shortcut list to work properly. nano-0.9.7 - 05/14/2000 - nano.c: @@ -1086,7 +1091,7 @@ nano-0.9.6 - 05/08/2000 edit_update(): - Removed yucky code that didn't work, this function now just computes edittop and editbot and calls edit_refresh() to do the - rest, which removes a lot of dupliicate code.. + rest, which removes a lot of duplicate code.. nano-0.9.5 - 05/01/2000 - Removed bytes from file struct because it was computationally wasteful. @@ -1151,14 +1156,14 @@ nano-0.9.4 - 04/25/2000 of do_down before setting current_x = 0 (discovered by Adam). do_justify(): - Fixed segfault when reaching the last line (tried to assign - currrent->next->data when current->next == NULL) (discovered + current->next->data when current->next == NULL) (discovered by Adam). - utils.c: - Removed extra macro defs that are now in nano.h. - nano.h: - Changed macro SET() to use |= instead of ^=. Fixes bug in cut code when cutting more than one line, and cutbuffer gets - blown away when it shouldnt. + blown away when it shouldn't. nano-0.9.3 - 04/29/2000 - cut.c: @@ -1173,28 +1178,29 @@ nano-0.9.3 - 04/29/2000 - nano.c: do_backspace(), do_char(): - Removed "magic line" code. It was basically causing more bugs - than it was helping for the sake of compatibillity. This fixes + than it was helping for the sake of compatibility. This fixes at least one known segfault condition. do_enter(): - Added setting editbot to new node if the new node is the last node in the file. write_file(): - - Changed writing file bahavior. Now, if last line of the file - has any data on it, we write a newline on it, else we dont. + - Changed writing file behavior. Now, if last line of the file + has any data on it, we write a newline on it, else we don't. - winio.c: add_marked_sameline(): - New code that checks for whether the begin and end of the marker are on different lines. Missing previously. edit_add(): - - added some more checks for text length. Cleaned up some mvwaddnstrs that - could be written more simply as waddnstrs. + - added some more checks for text length. Cleaned up some + mvwaddnstrs that could be written more simply as waddnstrs. edit_refresh(): - - Removed check for temp == filebot, it is now treated like any other line. - Fixes a bug where selected text on the last line shows normally. + - Removed check for temp == filebot, it is now treated like any other + line. Fixes a bug where selected text on the last line shows + normally. xpt(): - Removed an extra computation for tabs variable that was incorrect. xplustabs(): - - Since xpt now actualy works, this func is now just a wrapper for + - Since xpt now actually works, this func is now just a wrapper for xpt(current, current_x) - nano.1, nano.1.html: - Added -l option to man pages. @@ -1216,7 +1222,7 @@ nano-0.9.1 - 04/14/2000 - Added pico compatibility for ^T when in search or switch to switch to the opposite function. Added one to REPLACE_LIST_LEN and WHEREIS_LIST_LEN in nano.h, new args to sc_init_one in global.c and - new strings that will have to be gettex()ed. New argument 'replacing' + new strings that will have to be gettext()ed. New argument 'replacing' to search_init(). Handlers in do_replace and do_search(). - New write code, now follows symbolic links instead of replacing them with the new file. New option (-l, --nofollow) to enable the old @@ -1227,7 +1233,7 @@ nano-0.9.1 - 04/14/2000 a segfault *sigh*. do_replace(): - Incremented current_x by the length of the replacement - text inside the main repalce loop. Fixes bug #15. + text inside the main replace loop. Fixes bug #15. add_marked_sameline(): - New function, handles marked text when start & end of marker is on one line, also supports most marked text when cursor > COLS. @@ -1245,7 +1251,7 @@ nano-0.9.0 - 04/07/2000 - Removed inner loop code, now calls update_line() for each line in question, MUCH nicer. - xplustabs(), xpt(): - - Removed redundant increment of tabs when collumn no % 8 == 0. + - Removed redundant increment of tabs when column no % 8 == 0. - Added check for data[i] < 32, most of such bits are 2 chars wide. - update_line(): - Fixed a stupid call to strlenpt with col when we should have @@ -1263,7 +1269,7 @@ nano-0.8.8 - 03/12/2000 New dirs po/ and intl/, changes to configure.in and Automake.am to support i18n. - nano.c: - includes: Ddded sys/param.h and limits.h. (Adam Rogoyski). + includes: Added sys/param.h and limits.h. (Adam Rogoyski). statics: Changed some things that were not necessarily static (Adam Rogoyski). nrealloc(): New function, similar to nmalloc(). Changed calls from @@ -1277,21 +1283,22 @@ nano-0.8.8 - 03/12/2000 nano-0.8.7 - 03/01/2000 - main.c: - do_wrap(): Better fix for segfaults, and fix for lisnes being wrapped + do_wrap(): Better fix for segfaults, and fix for lines being wrapped to a single character on one line when no good place to - break the line exists, and for wrapping lines longer than COLS. + break the line exists, and for wrapping lines longer than + COLS. - nano.1.html: Html version of man page, now included in dist. For the benefit of nano packages in Linux distributions. nano-0.8.6 - 02/24/2000 -- gobal.c: +- global.c: shortcut_init(): Added shortcuts for goto_line and do_replace when using pico_msgs. Oops. - nano.c: statics: Changed fill back to 0 from 71 by default (Adam Rogoyski). - do_wrap(): Added check for backing up past tabs, which we shouldnt do. + do_wrap(): Added check for backing up past tabs, which we shouldn't do. Removed check for backing up past spaces first. main(): Added for loop to check for alt keys instead of hard list. do_enter(): Fix for bug #14, added call to reset_cursor and messed @@ -1313,7 +1320,7 @@ nano-0.8.5 - 02/18/2000 - winio.c: edit_refresh(): Temporary fix for selecting text when temp == current. - edit_refresh() is now unmanagably complex, and must be + edit_refresh() is now unmanageably complex, and must be revamped. check_statblank(): Added check for constupdate, makes things less choppy @@ -1349,7 +1356,7 @@ nano-0.8.3 - 02/08/2000 main(): Removed case for ignoring char 126 (~). That's kind of important, we'll have to fix handling that sequence when - pageing up/down on a terminal some other way... Revamped + paging up/down on a terminal some other way... Revamped main switch loop in much snazzier fashion based on the shortcut list. - winio.c: @@ -1377,7 +1384,7 @@ nano-0.8.2 - 02/02/2000 - Added initial mouse (-m, --mouse) support. New global variable use_mouse. (Adam Rogoyski) -- nano.c: Set intial value of fill to COLS - 8 rather than just 72 +- nano.c: Set initial value of fill to COLS - 8 rather than just 72 regardless. (Adam Rogoyski). do_delete(): Deleted call to do_backspace() when on the end of a line, @@ -1403,7 +1410,7 @@ do_goto(): bottombars() with replace_list instead of goto_list. - nano.h: New char *help in shortcut structure for help - feature. Added NANO_*_MSG and NANO_*_HELP #deifnes + feature. Added NANO_*_MSG and NANO_*_HELP #defines for help function and i18n. - global.c: New functions shortcut_init (called in nano.c) and @@ -1435,7 +1442,7 @@ main(): the buffer when we page up/down on a vt terminal. write_file(): Fixes for umask (Adam Rogoyski). Renamed tmpfile - variable to tmp. Documented the tmp opttion + variable to tmp. Documented the tmp option better in the function comments. Fixed my stupidly commented out check for tmp on setting umask which I really like => @@ -1448,7 +1455,8 @@ write_file(): New checks for getopt_long, getopt.h, removed CFLAGS and LDFLAGS changes. Gonna have to run strip manually now =-) (Andy Kahn) - Added check for HAVE_WRESIZE, new file acconfig.h (me). + Added check for HAVE_WRESIZE, new file acconfig.h + (me). nano-0.7.9 - 01/24/2000 - New autoindent feature. Command flag 'i' or '--autoindent'. New @@ -1473,7 +1481,7 @@ nano-0.7.9 - 01/24/2000 nano-0.7.8 - 01/23/2000 - Stubbed justify function. Affects main() in nano.c and nano.h defines. -- Added Fkey equivalents for Pico compatibilty. Affects nano.h defines +- Added Fkey equivalents for Pico compatibility. Affects nano.h defines and main() in nano.c - Removed redundant reset_cursor() calls from the blank() routines. - nano.c: @@ -1552,7 +1560,7 @@ nano 0.7.6 - 01/15/2000 0.7.3 Fixed a double blank_statusbar() when jumping to first and last lines. Took out unnecessary updates in load_file. Bug fix in do_left. Missing updates to totlines, fixed bug #7 (last line not - having a newline at the end doesnt get read, bugfix in do_replace + having a newline at the end doesn't get read, bugfix in do_replace with replace all, more/better comments (Robert Siemborski) 0.7.2 Our first patch accepted into the source! configure fixes and optimizations (Erik Anderson). Added missing stdarg.h to winio.c. @@ -1593,35 +1601,36 @@ nano 0.7.6 - 01/15/2000 0.6.1 Starting to implement wrapping toggle. Fix for unhandled control codes being entered into the buffer. Bug fix in actual_x; more > COLS - 1 functionality, especially on lines with TABs. Fixed being - locked into cutbuffer when cutting more than one marked screen of text. + locked into cutbuffer when cutting more than one marked screen of + text. 0.6.0 We have TABs!!! To do this, placewewant is now set to the actual width on the screen we want to be, not an index of current->data. New functions xplustabs and actual_x convert the actual place the cursor should be on the screen to and from the place in the string. 0.5.5 Changed do_right to test do_down before setting current_x to 0, - eliminiating the "looping" on the last line when holding the right + eliminating the "looping" on the last line when holding the right arrow. Preliminary support for longer than COLS - 1 lines. Wrote do_delete. -0.5.4 Fixed a big in total_update that wasn't repainting the screen properly. - tipgetstr is much more messy but text is now more editable ;) - Fixed crash on entering a new file, hopefully. Awful stub for tab - handling, only in do_right() to save me some sanity. +0.5.4 Fixed a bug in total_update that wasn't repainting the screen + properly. tipgetstr is much more messy but text is now more + editable ;) Fixed crash on entering a new file, hopefully. Awful + stub for tab handling, only in do_right() to save me some sanity. 0.5.3 Added check for malloc.h. Implementing uncut from marker slowly. Fixed a few bugs in do_uncut when not uncutting from marked text. - I would not trust your data with the mark code right now, but then - we're not at version 1.0 yet so dont trust anything ;) -0.5.2 Added reset_cursor() before end of update_line so cursor doesnt + I would not trust your data with the mark code right now, but then + we're not at version 1.0 yet so dont trust anything ;) +0.5.2 Added reset_cursor() before end of update_line so cursor doesn't jump after each keystroke entered. Select text stubbed. Fixed - a bug in total_refresh(). Setting a mark will hilight properly, + a bug in total_refresh(). Setting a mark will highlight properly, but does not actually affect what gets put in the cutbuffer (yet). 0.5.1 Writing a file out causes modified to be set back to 0. Good. Set_modified function written. Cut and uncut text now set modified when called. 0.5.0 Half way there! Implemented write out, save function seems - stable. Changed statusbar blank routing to not refresh, a separte + stable. Changed statusbar blank routing to not refresh, a separate program calls it and then refreshes. Made the program not clear - the srceen on exit, just the bottom two lines (like Pico). + the screen on exit, just the bottom two lines (like Pico). 0.4.2 Implemented replace all in replace function. Crude exit function (asks yes or no if modified but does not write to file). 0.4.1 Implementing search & replace. Fixed crash on deleting at top of @@ -1629,7 +1638,7 @@ nano 0.7.6 - 01/15/2000 Implemented ^A and ^E (beginning and end of line). 0.4.0 Split code into global.c and proto.h to allow for better multiple file handling. Added #defines for the majority of the shortcut - kets in tip.h for easy modification. + keys in tip.h for easy modification. 0.3.1 Write edit_refresh which doesn't move the screen around, just updates what's there already. do_wrap() and do_enter() added. 0.3.0 Preliminary cutbuffer (cut and uncut) support. diff --git a/NEWS b/NEWS index f31c655e..84110dab 100644 --- a/NEWS +++ b/NEWS @@ -23,11 +23,11 @@ default list of shortcuts, "^G Get Help" is now Listed and "^_ Goto Line" is not). The Yes/No/All keys have finally been internationalized also. All in all, quite - a few changes considering nano is supposed to be in a code - freeze. But there are the usual helping of bugfixes, a + a few changes, considering nano is supposed to be in a code + freeze. But there are the usual helping of bugfixes, a nasty bug when cutting text in -k mode and some - compatibility with older ncurses libraries have also been - fixed. All in all, a lot to see. + compatibility issues with older ncurses libraries have also + been fixed. All in all, a lot to see. 01/31/2001 - Nano 0.9.99pre2 is released. Not surprisingly, all that is new is bugfixes, bugfixes, bugfixes. There were a few @@ -60,7 +60,7 @@ tab completion in certain instances. Have fun and Happy New Year! -12/18/2000 - Nano 0.9.24 is released. This versions contains the last of +12/18/2000 - Nano 0.9.24 is released. This version contains the last of the security fixes for writing files, as well as for a nasty segfault when nano is unable to open a file for reading, among other fixes. Nano also now cowardly @@ -74,7 +74,7 @@ 12/08/2000 - Nano 0.9.23 is the "race conditions bite" release. The main reason for this release is the less-than-optimal fix for the security issue in nano with following symbolic - links. Hopefully this will fix the probelm permanently. + links. Hopefully this will fix the problem permanently. The --nofollow option also works again for those who are real security nuts. There are also some display and search fixes, and the --disable-spell function was renamed @@ -114,10 +114,10 @@ (courtesy of Mr. Rocco Corsi) and tab completion when reading in or writing out files! There's also the usual billion or so bug fixes. Feedback on this release is - welcome because so much much has changed, especially with - the previous string display in search and replace. Email - -> nano@nano-editor.org <-. If you like something, don't - like something, or just want to order a pizza, let us know! + welcome because so much has changed, especially with the + previous string display in search and replace. Email -> + nano@nano-editor.org <-. If you like something, don't like + something, or just want to order a pizza, let us know! 10/02/2000 - Nano 0.9.19 is the "Chris is getting married in less than a week and needs a distraction" release. There are only @@ -143,16 +143,16 @@ flags (M-c, M-i, M-z, M-x, M-p, M-w, M-m, M-k and M-e for -c, -i, -x, -p, -w, -k, and -R). -08/09/2000 - Nano 0.9.16, after some struggling, is release. This release +08/09/2000 - Nano 0.9.16, after some struggling, is released. This release should fix a few of the holes that 0.9.15 dug. The "cutting text on the first line" bug is fixed, as is the "cutting text on the last line" bug. Nice symmetry there huh? Also the --tabsize argument should now work as well as by using -T. -08/03/2000 - Nano 0.9.15 is the "I cant think of a release description" +08/03/2000 - Nano 0.9.15 is the "I can't think of a release description" release. There are the usual gala of display bugfixes, - a for the the nasty bug in -k mode that could create a + a fix for the the nasty bug in -k mode that could create a loop in the file being edited, and some other code cleanup. Also, the -T option should now work regardless of the curses library used. Yay. @@ -161,7 +161,7 @@ be skipped as a version number" release. One typo caused unending problems (calling nano with either -t or -k caused both flags to be used). The -k code is also now - closer in functionality to Pico's -k mode, please + closer in functionality to Pico's -k mode; please note that this code is not finished yet. Working on this code has made me realize that there is not enough abstraction in the code, and I will be working on that @@ -170,7 +170,7 @@ 07/23/2000 - Nano 0.9.13 has a few new bits and bobs, most notably the -k option from Pico (cut to end of line). The majority - of changes in this release are bugfixes however, including + of changes in this release are bugfixes, however, including the usual display fixes and fixes for writing to symbolic links and un-writeable files. Barring any other major changes, this should be the feature set for nano 1.0, @@ -179,12 +179,12 @@ 07/07/2000 - Nano 0.9.12 (The "lucky day" release) is bursting with new features, bug fixes, and yummy fruit flavor. For changes, the alternate replace keystroke ^W^T is now - ^W^R to be compatible with later version of Pico. + ^W^R to be compatible with later versions of Pico. ^W^T is now goto line, again for Pico compatibility. As for new features, the wonderful/hated magic line code has returned with a vengeance! Also, regular expression searches and replaces have been incorporated - via the -R flag. And of course there are the usual + via the -R flag. And, of course, there are the usual helping of display and other bug fixes to top it all off. @@ -198,8 +198,8 @@ this function just changes the way tabs LOOK in the editor, the tabs you input are still real tabs of normal width (usually 8 characters); nano just makes them look - smaller or bigger whlie in the editor. New in the - translation department is an indonesian translation (id). + smaller or bigger while in the editor. New in the + translation department is an Indonesian translation (id). 06/06/2000 - Nano 0.9.10 is primarily a bugfix for the loss of SIGINT when using "run and terminate" flags (for example, --help). @@ -218,7 +218,7 @@ the resize crash people have been experiencing. It also offers a new input method that should allow nano to do things the right way (like ^S, ^Q, custom suspend keys) - and hopefully wont break with non-US keyboards. There + and hopefully won't break with non-US keyboards. There are also the obligatory display fixes and speedups. Have fun with it. @@ -239,7 +239,7 @@ 05/01/2000 - Nano 0.9.5 attempts to speed up the display of text to be at least somewhat reasonable. Much code profiling has been done to reduce the - rediculous number of redundant display updates. This + ridiculous number of redundant display updates. This will probably expose a lot of bugs that can then be fixed, so this release is probably not for the faint of heart. For anyone curious, I would call nano 0.9.2 @@ -265,7 +265,7 @@ so it is being removed for the time being, and perhaps indefinitely. - Other new stuff includes a --emable-tiny option to make + Other new stuff includes an --enable-tiny option to make nano ultra small (disabling i18n, detailed help and the marker and mouse code), and --with-slang to use the slang libraries instead of ncurses. @@ -292,7 +292,7 @@ 04/07/2000 - Nano 0.9.0 has some updates, new language support and a much better refresh setup (It's still not great, but...) - There should also be more stabillity editing long lines, + There should also be more stability editing long lines, as there was a stupid mistake in the update_line call. Silly me =) @@ -301,13 +301,13 @@ Most things work, the rest doesn't doesn't work because (a) I can't fix it or I would have already done so, and (b) the amount of patches I'm receiving right now is quite - negligible. Forrunately this release marks the first + negligible. Fortunately, this release marks the first release since I have acquired ownership of the nano pages on SourceForge. Here's hoping SF will get us some more - visibilitiy, translators and patches. + visibility, translators and patches. 03/12/2000 - After a hiatus, I have finally moved (not unpacked though) - to my new home into albany. Thus I should now have more + to my new home into Albany. Thus I should now have more time to work on nano. Nano 0.8.8, the "dear god what broke this time?" release, incorporates patches for both i18n and many bugfixes. It is VERY likely something broke @@ -316,8 +316,8 @@ I would like to announce that I'm going to need translations soonish, so if you are fluent in other - languages than english (or even better, if your native - language is not english) and you would like to submit a + languages than English (or even better, if your native + language is not English) and you would like to submit a translation file to me, please feel free to do so. If you do, I will list your name and email in the AUTHORS file as the maintainer of the .po file, and from then on it is @@ -325,9 +325,9 @@ 03/01/2000 - Well, to continue my trend of going back on my previous release's comments, nano 0.8.7 is released. The crashing - behavior was still occuring, and this most recent fix also + behavior was still occurring, and this most recent fix also fixes some other wrapping problems, so here you go. - There may be another relase soon, there may not be, is + There may be another release soon, there may not be, is that vague enough? =) 02/25/2000 - More minor bugfixes in 0.8.6, the bizarre behavior at the end @@ -354,11 +354,11 @@ but I may be changing jobs very soon. I will release version 0.8.2 as is (no i18n, no help menu (yet). I expect things to settle down by the end of next week, and - then I can try to start on the i18n support and help menu, + then I can try to start on the i18n support and help menu; look for these new features in version 0.8.5 to 0.9.0. 01/28/2000 - Nano 0.8.1 marks our first official step toward - internationaliation (i18n) and the help system (^G). I + internationalization (i18n) and the help system (^G). I will be merging in Jordi's patches for initial i18n in the next version, and will implement the help system with i18n built into it shortly after that. Please don't @@ -367,14 +367,14 @@ 01/25/2000 - Nano 0.8.0 is officially the 'let's try and be at least a little portable, mmmmkay?' release. There are many - portability checks and fixes, many thanks to Andy Kahn for + portability checks and fixes; many thanks to Andy Kahn for his patches. I removed the broken do_spell behavior with - the 'spell' program, for now we only try to call 'ispell' + the 'spell' program; for now, we only try to call 'ispell' until I write a better method to handle the output of the normal 'spell' command. 01/24/2000 - Nano 0.7.9 features many new features. Among them are a - new autoindent feature (-i, --autoondent), tempfile + new autoindent feature (-i, --autoindent), tempfile flag like Pico's -t flag (-t, --tempfile), and preliminary spelling program support. The spelling function tries to run 'spell' and then 'ispell' in that order, but you @@ -387,7 +387,7 @@ all the changes in this release will cause a few bugs, so 0.7.8 will primarily be about fixing those bugs. - Things added this release include resizeability (kinda), + Things added this release include resizability (kinda), new -x and -c flags (see nano -h for help), long command line flag support, and the usual array of bugfixes. diff --git a/README b/README index 18c6061a..cc461c90 100644 --- a/README +++ b/README @@ -11,10 +11,10 @@ Overview redistribution. Because of this, Pine and Pico are not included with many GNU/Linux distributions. Also, other features (like goto line number or search and replace) were unavailable until recently or - require a command-line flag. Yuck. + require a command line flag. Yuck. nano aims to solve these problems by emulating the functionality of - Pico as closely as possible while adressing the problems above and + Pico as closely as possible while addressing the problems above and perhaps providing other extra functionality. The nano editor is now an official GNU package. For more information @@ -29,7 +29,7 @@ How to compile and install nano make make install - It's that simple. Use --prefix with configutr to override the + It's that simple. Use --prefix with configure to override the default installation directory of /usr/local. Web Page diff --git a/TODO b/TODO index ca8f1856..62cc7fdc 100644 --- a/TODO +++ b/TODO @@ -25,7 +25,7 @@ For Next Version: - .nanorc ????? - Backup making (filename~)? - Search (etc) string history [1.1] -- Implent Pico's -j and -g flags, as they are pretty easy to do. +- Implement Pico's -j and -g flags, as they are pretty easy to do. - Make mouse support work with clicking on the shortcuts (-m). Must make global variable pointing to current shortcut list to determine what keystroke to ungetch(). diff --git a/cut.c b/cut.c index eff32e39..a1d01e18 100644 --- a/cut.c +++ b/cut.c @@ -104,7 +104,7 @@ void cut_marked_segment(filestruct * top, int top_x, filestruct * bot, /* We explicitly don't decrement totlines here because we don't snarf * up a newline when we're grabbing the last line of the mark. For - * the same reason we don't do an extra totsize decrement */ + * the same reason, we don't do an extra totsize decrement. */ add_to_cutbuffer(bot); top->next = next; @@ -116,7 +116,7 @@ void cut_marked_segment(filestruct * top, int top_x, filestruct * bot, current = top; current_x = top_x; - /* If we're hitting the end of the buffer we should clean that up. */ + /* If we're hitting the end of the buffer, we should clean that up. */ if (bot == filebot) { if (next != NULL) { filebot = next; @@ -335,7 +335,7 @@ int do_uncut_text(void) newend->next = tmp; /* If tmp isn't null, we're in the middle: update the - * prev pointer. If it IS null, we're at the end, update + * prev pointer. If it IS null, we're at the end; update * the filebot pointer */ if (tmp != NULL) diff --git a/faq.html b/faq.html index e90f3b92..40225195 100644 --- a/faq.html +++ b/faq.html @@ -24,7 +24,7 @@ nano? TIP?
1.6. What is the current version of nano? -
1.7. I want to read the man page +
1.7. I want to read the manpage without having to download the program!

@@ -552,7 +552,7 @@ both, i.e. distribute modified binaries. should I use then?

If you are looking to use a Free -Software program similar to PINE and emacs is not your things, you should +Software program similar to PINE and emacs is not your thing, you should definitely take a look at mutt.  It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that diff --git a/files.c b/files.c index 350ae625..51cb2051 100644 --- a/files.c +++ b/files.c @@ -161,7 +161,7 @@ int read_file(int fd, char *filename) /* Now we allocate a bigger buffer 128 characters at a time. If we allocate a lot of space for one line, we may indeed have to use a buffer this big later on, so we don't - decrease it at all. We do free it at the end though. */ + decrease it at all. We do free it at the end, though. */ if (i >= bufx - 1) { buf = nrealloc(buf, bufx + 128); @@ -301,7 +301,7 @@ int do_insertfile(void) /* Here we want to rebuild the edit window */ fix_editbot(); - /* If we've gone off the bottom, recenter, otherwise just redraw */ + /* If we've gone off the bottom, recenter; otherwise, just redraw */ if (current->lineno > editbot->lineno) edit_update(current, CENTER); else @@ -320,7 +320,7 @@ int do_insertfile(void) /* * Write a file out. If tmp is nonzero, we set the umask to 0600, - * we don't set the global variable filename to it's name, and don't + * we don't set the global variable filename to its name, and don't * print out how many lines we wrote on the statusbar. * * tmp means we are writing a tmp file in a secure fashion. We use @@ -452,7 +452,7 @@ int write_file(char *name, int tmp) if (realexists == -1 || tmp || (!ISSET(FOLLOW_SYMLINKS) && S_ISLNK(lst.st_mode))) { - /* Use default umask as file permisions if file is a new file. */ + /* Use default umask as file permissions if file is a new file. */ mask = umask(0); umask(mask); @@ -611,7 +611,7 @@ char *real_dir_from_tilde(char *buf) } else { - /* Figure how how much of of the str we need to compare */ + /* Figure how how much of the str we need to compare */ for (i = 1; buf[i] != '/' && buf[i] != 0; i++) ; @@ -749,7 +749,7 @@ char **cwd_tab_completion(char *buf, int *num_matches) #ifdef PATH_MAX if ((dirName = getcwd(NULL, PATH_MAX+1)) == NULL) #else - /* The better, but aparently segfault-causing way */ + /* The better, but apparently segfault-causing way */ if ((dirName = getcwd(NULL, 0)) == NULL) #endif /* PATH_MAX */ return matches; @@ -900,7 +900,7 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) break; default: - /* Check to see if all matches share a beginning, and if so + /* Check to see if all matches share a beginning, and, if so, tack it onto buf and then beep */ if (strcmp(buf, "") && strstr(buf, "/")) { @@ -1080,7 +1080,7 @@ char **browser_init(char *path, int *longest, int *numents) return filelist; } -/* Free our malloced memory */ +/* Free our malloc()ed memory */ void free_charptrarray(char **array, int len) { int i; @@ -1090,7 +1090,7 @@ void free_charptrarray(char **array, int len) free(array); } -/* only print the last part of a path, isn't there a shell +/* only print the last part of a path; isn't there a shell command for this? */ char *tail(char *foo) { @@ -1157,7 +1157,7 @@ char *do_browser(char *inpath) filelist = browser_init(path, &longest, &numents); foo = nmalloc(longest + 8); - /* Sort the list by directory first then alphabetically */ + /* Sort the list by directory first, then alphabetically */ qsort(filelist, numents, sizeof(char *), diralphasort); kb = keypad_on(edit, 1); @@ -1178,7 +1178,7 @@ char *do_browser(char *inpath) editline = 0; col = 0; - /* Compute line number we're on now so we don't divide by zero later */ + /* Compute line number we're on now, so we don't divide by zero later */ if (width == 0) lineno = selected; else @@ -1351,8 +1351,8 @@ char *do_browser(char *inpath) col += strlen(foo); /* Put file info in the string also */ - /* We use lstat here to detect links, then if we find a - symlink we examine it via stat() to see if it is a + /* We use lstat here to detect links; then, if we find a + symlink, we examine it via stat() to see if it is a directory or just a file symlink */ lstat(filelist[j], &st); if (S_ISDIR(st.st_mode)) @@ -1426,7 +1426,7 @@ char *do_browser(char *inpath) return retval; } -/* Browser front end, checks to see if inpath has a dir in it and if so +/* Browser front end, checks to see if inpath has a dir in it and, if so, starts do_browser from there, else from the current dir */ char *do_browse_from(char *inpath) { @@ -1436,7 +1436,7 @@ char *do_browse_from(char *inpath) tmp = mallocstrcpy(tmp, inpath); - /* If there's no / in the string, we may was well start from . */ + /* If there's no / in the string, we may as well start from . */ if (tmp == NULL || *tmp == '\0' || !strstr(tmp, "/")) { #ifdef PATH_MAX char *from = getcwd(NULL, PATH_MAX+1); diff --git a/global.c b/global.c index f56f96be..dc065956 100644 --- a/global.c +++ b/global.c @@ -35,7 +35,7 @@ /* * Global variables */ -int flags = 0; /* Our new flag containig many options */ +int flags = 0; /* Our new flag containing many options */ WINDOW *edit; /* The file portion of the editor */ WINDOW *topwin; /* Top line of screen */ WINDOW *bottomwin; /* Bottom buffer */ @@ -57,7 +57,7 @@ filestruct *cutbuffer = NULL; /* A place to store cut text */ char *answer = NULL; /* Answer str to many questions */ int totlines = 0; /* Total number of lines in the file */ int totsize = 0; /* Total number of bytes in the file */ -int placewewant = 0; /* The collum we'd like the cursor +int placewewant = 0; /* The column we'd like the cursor to jump to when we go to the next or previous line */ @@ -209,7 +209,7 @@ void shortcut_init(int unjustify) nano_nextpage_msg = _("Move to the next screen"); nano_cut_msg = _("Cut the current line and store it in the cutbuffer"); nano_uncut_msg = _("Uncut from the cutbuffer into the current line"); - nano_cursorpos_msg = _("Show the posititon of the cursor"); + nano_cursorpos_msg = _("Show the position of the cursor"); nano_spell_msg = _("Invoke the spell checker (if available)"); nano_up_msg = _("Move up one line"); nano_down_msg = _("Move down one line"); diff --git a/move.c b/move.c index 071ea8d6..42927a94 100644 --- a/move.c +++ b/move.c @@ -56,7 +56,7 @@ int page_down(void) if (current == filebot) return 0; - /* AHEM, if we only have a screen or less of text, DONT do an + /* AHEM, if we only have a screen or less of text, DON'T do an edit_update, just move the cursor to editbot! */ if (edittop == fileage && editbot == filebot && totlines < editwinrows) { current = editbot; diff --git a/nano.1 b/nano.1 index f967bfb8..fd47e66f 100644 --- a/nano.1 +++ b/nano.1 @@ -23,7 +23,7 @@ This manual page documents briefly the command. .PP .\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, +.\" \fI\fP escape sequences to invoke bold face and italics, .\" respectively. \fBnano\fP is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather @@ -44,7 +44,7 @@ Enable regular expression matching for search strings, as well as Show the current version number and author. .TP .B \-h (\-\-help) -Display a summary of commandline options. +Display a summary of command line options. .TP .B \-c (\-\-const) Constantly show the cursor position. @@ -58,7 +58,7 @@ Enable cut from cursor to end of line with ^K. .TP .B \-l (\-\-nofollow) If the file being edited is a symbolic link, replace the link with a -a new file, do not follow it. Good for editing files in /tmp perhaps? +a new file, do not follow it. Good for editing files in /tmp, perhaps? .TP .B \-m (\-\-mouse) Enable mouse support (if available for your system). @@ -69,14 +69,14 @@ at the bottom of the screen, as well as the display and entry of previous search and replace strings. .TP .B \-r (\-\-fill) -Wrap lines at column #cols. By default this is the width of the screen, +Wrap lines at column #cols. By default, this is the width of the screen, less eight. .TP .B \-s (\-\-speller) Enable alternative spell checker command. .TP .B \-t (\-\-tempfile) -Always save changed buffer without prompting. Same as Pico -t option. +Always save changed buffer without prompting. Same as Pico -t option. .TP .B \-v (\-\-view) View file (read only) mode. @@ -97,10 +97,10 @@ Ignored, for compatibility with Pico. Places cursor at LINE on startup. .SH NOTES Nano will try to dump the buffer into an emergency file in some cases. -Mainly, this will happen if Nano recieves a SIGHUP or runs out of +Mainly, this will happen if Nano receives a SIGHUP or runs out of memory, when it will write the buffer into a file named "nano.save" if the buffer didn't have a name already, or will add a ".save" suffix to the -current finename. Nano will \fBnot\fP write this file if a previous one +current filename. Nano will \fBnot\fP write this file if a previous one exists in the current directory. .SH BUGS Please send any comments or bug reports to diff --git a/nano.1.html b/nano.1.html index 67d3840a..7a95f407 100644 --- a/nano.1.html +++ b/nano.1.html @@ -60,7 +60,7 @@ Show the current version number and author.
-h (--help)
-Display a summary of commandline options. +Display a summary of command line options.
-c (--const)
@@ -78,7 +78,7 @@ Enable cut from cursor to end of line with ^K.
If the file being edited is a symbolic link, replace the link with a -a new file, do not follow it. Good for editing files in /tmp perhaps? +a new file, do not follow it. Good for editing files in /tmp, perhaps?
-m (--mouse)
@@ -92,7 +92,7 @@ search and replace strings.
-r (--fill)
-Wrap lines at column #cols. By default this is the width of the screen, +Wrap lines at column #cols. By default, this is the width of the screen, less eight.
-s (--speller) @@ -101,7 +101,7 @@ Enable alternative spell checker command.
-t (--tempfile)
-Always save changed buffer without prompting. Same as Pico -t option. +Always save changed buffer without prompting. Same as Pico -t option.
-v (--view)
@@ -131,10 +131,10 @@ Places cursor at LINE on startup.

NOTES

Nano will try to dump the buffer into an emergency file in some cases. -Mainly, this will happen if Nano recieves a SIGHUP or runs out of +Mainly, this will happen if Nano receives a SIGHUP or runs out of memory, when it will write the buffer into a file named "nano.save" if the buffer didn't have a name already, or will add a ".save" suffix to the -current finename. Nano will not write this file if a previous one +current filename. Nano will not write this file if a previous one exists in the current directory.  

BUGS

diff --git a/nano.c b/nano.c index f1874814..3ea4568d 100644 --- a/nano.c +++ b/nano.c @@ -66,7 +66,7 @@ int fill = 0; /* Fill - where to wrap lines, basically */ struct termios oldterm; /* The user's original term settings */ -static struct sigaction act; /* For all out fun signal handlers */ +static struct sigaction act; /* For all our fun signal handlers */ #ifndef DISABLE_HELP static char *help_text_init = ""; /* Initial message, not including shortcuts */ @@ -629,7 +629,7 @@ int do_enter(filestruct * inptr) /* The logic here is as follows: * -> If we are at the bottom of the buffer, we want to recenter - * (read: rebuild) the screen and forcably move the cursor. + * (read: rebuild) the screen and forcibly move the cursor. * -> otherwise, we want simply to redraw the screen and update * where we think the cursor is. */ @@ -1002,7 +1002,7 @@ void do_wrap(filestruct * inptr, char input_char) totlines++; - /* Everything about it makes me want this line here but it causes + /* Everything about it makes me want this line here, but it causes * totsize to be high by one for some reason. Sigh. (Rob) */ /* totsize++; */ @@ -1066,7 +1066,7 @@ void check_wrap(filestruct * inptr, char ch) #endif /* DISABLE_WRAPPING */ /* Stuff we do when we abort from programs and want to clean up the - * screen. This doesnt do much right now. + * screen. This doesn't do much right now. */ void do_early_abort(void) { @@ -1420,7 +1420,7 @@ int do_alt_speller(char *file_name) /* Start a new process for the alternate speller */ if ((pid_spell = fork()) == 0) { - /* Start alternate spell program, we are using the PATH here!?!? */ + /* Start alternate spell program; we are using the PATH here!?!? */ execvp(spellargs[0], spellargs); /* Should not be reached, if alternate speller is found!!! */ @@ -1725,7 +1725,7 @@ void handle_sigwinch(int s) void signal_init(void) { - /* Trap SIGINT and SIGQUIT cuz we want them to do useful things. */ + /* Trap SIGINT and SIGQUIT cuz we want them to do useful things. */ memset(&act, 0, sizeof(struct sigaction)); act.sa_handler = SIG_IGN; sigaction(SIGINT, &act, NULL); @@ -1741,7 +1741,7 @@ void signal_init(void) } - /* Trap SIGHUP cuz we want to write the file out. */ + /* Trap SIGHUP cuz we want to write the file out. */ act.sa_handler = handle_hup; sigaction(SIGHUP, &act, NULL); @@ -1755,7 +1755,7 @@ void window_init(void) if ((editwinrows = LINES - 5 + no_help()) < MIN_EDITOR_ROWS) die_too_small(); - /* Setup up the main text window */ + /* Set up the main text window */ edit = newwin(editwinrows, COLS, 2, 0); /* And the other windows */ @@ -2009,7 +2009,7 @@ int do_justify(void) display_main_list(); reset_cursor(); - /* Now get a keystroke and see if it's unjustify, if not unget the keytroke + /* Now get a keystroke and see if it's unjustify; if not, unget the keystroke and return */ if ((kbinput = wgetch(edit)) != NANO_UNJUSTIFY_KEY) { ungetch(kbinput); @@ -2027,7 +2027,7 @@ int do_justify(void) if (tmptop->prev == NULL) edit_refresh(); - /* Restore totsize from befure justify */ + /* Restore totsize from before justify */ totsize = totbak; free_filestruct(tmptop); blank_statusbar_refresh(); @@ -2163,8 +2163,8 @@ void do_toggle(int which) #endif } -/* If the NumLock key has made the keypad gone awry, print an error - message, hopefully we can address it later. */ +/* If the NumLock key has made the keypad go awry, print an error + message; hopefully we can address it later. */ void print_numlock_warning(void) { static int didmsg = 0; @@ -2415,7 +2415,7 @@ int main(int argc, char *argv[]) #ifdef DEBUG fprintf(stderr, _("Main: bottom win\n")); #endif - /* Set up up bottom of window */ + /* Set up bottom of window */ display_main_list(); #ifdef DEBUG @@ -2529,7 +2529,7 @@ int main(int argc, char *argv[]) wgetch(edit); break; case 126: /* Hack, make insert key do something - usefile, like insert file */ + useful, like insert file */ do_insertfile(); keyhandled = 1; break; diff --git a/nano.h b/nano.h index 0b36be8e..58e22bce 100644 --- a/nano.h +++ b/nano.h @@ -85,7 +85,7 @@ typedef struct shortcut { typedef struct toggle { int val; /* Sequence to toggle the key. Should only need 1 */ char *desc; /* Description for when toggle is, uh, toggled, - e.g. "Pico Messages", we'll append Enabled or + e.g. "Pico Messages"; we'll append Enabled or Disabled */ int flag; /* What flag actually gets toggled */ } toggle; @@ -120,7 +120,7 @@ typedef struct rcoption { #define CUT_TO_END (1<<17) #define DISABLE_CURPOS (1<<18) -/* Control key sequences, chaning these would be very very bad */ +/* Control key sequences, changing these would be very very bad */ #define NANO_CONTROL_A 1 #define NANO_CONTROL_B 2 @@ -181,7 +181,7 @@ typedef struct rcoption { #define NANO_ALT_Y 'y' #define NANO_ALT_Z 'z' -/* Some semi-changeable keybindings, dont play with unless you're sure you +/* Some semi-changeable keybindings; don't play with unless you're sure you know what you're doing */ #define NANO_INSERTFILE_KEY NANO_CONTROL_R diff --git a/nano.info b/nano.info index 5c5efd3a..89d1a13a 100644 --- a/nano.info +++ b/nano.info @@ -69,7 +69,7 @@ Command Line Options Print the version number and copyright and quit. `-c, --const' - Constantly display the cursor posititon and line number on the + Constantly display the cursor position and line number on the statusbar. `-h, --help' @@ -115,7 +115,7 @@ Command Line Options well, as in Expert Mode it is located at the very bottom of the editor. - Note: When accesing the help system, Expert Mode is temporarily + Note: When accessing the help system, Expert Mode is temporarily disabled to display the help system navigation keys. `-v, --view' @@ -165,7 +165,7 @@ Special Functions ================= Special functions use the Control key (displayed in the help and -shotcut lists as ^) or the Meta key (displayed as M). +shortcut lists as ^) or the Meta key (displayed as M). * Control key sequences are entered by holding down the Control key and pressing the desired letter. @@ -189,7 +189,7 @@ are three sections: left, center and right. The section on the left displays the version of `nano' being used. The center section displays the current file name, or "New Buffer" if the file has not yet been named. The section on the right will display "Modified" if the file -has been modified since it ws last saved or opened. +has been modified since it was last saved or opened. Special modes: When nano is in "File browser" mode, the center section will display the current directory instead of the filename. @@ -207,8 +207,8 @@ The Statusbar The Statusbar shows important and informational messages. Any error messages that occur from using the editor will appear on the statusbar. Any questions that are asked of the user will be asked on the statusbar, -and any user input (serch strings, file names, etc) will be input on the -statusbar. +and any user input (search strings, file names, etc) will be input on +the statusbar.  File: nano.info, Node: Shortcut Lists, Prev: The Statusbar, Up: Editor Basics @@ -216,7 +216,7 @@ File: nano.info, Node: Shortcut Lists, Prev: The Statusbar, Up: Editor Basics Shortcut Lists ============== - The Shorcut Lists are the two lines at the bottom of the screen + The Shortcut Lists are the two lines at the bottom of the screen which show some of the more commonly used functions in the editor. The exact functions which are displayed depend on whether Pico Compatibility Mode mode is enabled. *Note Pico Compatibility::, for @@ -278,14 +278,14 @@ File: nano.info, Node: The File Browser, Next: Pico Compatibility, Prev: Feat The File Browser **************** - When reading or writilg files, pressing ^T will invoke the file + When reading or writing files, pressing ^T will invoke the file browser. Here, one can navigate directories in a graphical manner in order to find the desired file. Basic movement in the file browser is accomplished with he arrow keys and page up/down. The behavior of the enter (or 's') key varies by what is currently selected. If the currently selected object is a directory, -the file browser will enter and display the contects of the directory. +the file browser will enter and display the contents of the directory. If the object is a file, this filename and path are copied to the statusbar and the file browser is exited. @@ -362,10 +362,10 @@ consider the following command line options: Disable the justify (^J)/unjustify (^U) functions in the editor. `--disable-speller' - Disables spell checker abillity. + Disables spell checker ability. `--disable-help' - Disables the help function (^G). Disabling this option maks the + Disables the help function (^G). Disabling this option makes the binary much smaller, but makes it difficult for new users to learn more than very basic things about using the editor. @@ -393,17 +393,17 @@ Node: Top199 Node: Introduction507 Node: Overview933 Node: Command Line Options1513 -Ref: Expert Mode3236 +Ref: Expert Mode3235 Node: Editor Basics4078 Node: Entering Text4303 Node: Special Functions4643 -Node: The Titlebar5497 -Node: The Statusbar6194 -Node: Shortcut Lists6774 -Node: Online Help7166 -Node: Feature Toggles7542 -Node: The File Browser8685 -Node: Pico Compatibility9394 -Node: Building and Configure Options11436 +Node: The Titlebar5498 +Node: The Statusbar6196 +Node: Shortcut Lists6777 +Node: Online Help7170 +Node: Feature Toggles7546 +Node: The File Browser8689 +Node: Pico Compatibility9398 +Node: Building and Configure Options11440  End Tag Table diff --git a/nano.texi b/nano.texi index f096d2a6..0bfad0ef 100644 --- a/nano.texi +++ b/nano.texi @@ -118,7 +118,7 @@ Turns on regular expression search and search/replace. Print the version number and copyright and quit. @item -c, --const -Constantly display the cursor posititon and line number on the statusbar. +Constantly display the cursor position and line number on the statusbar. @item -h, --help Print the usage and exit. @@ -163,7 +163,7 @@ In Expert Mode, the Shortcut Lists will not appear at the bottom of the screen. This affects the location of the statusbar as well, as in Expert Mode it is located at the very bottom of the editor. -Note: When accesing the help system, Expert Mode is temporarily disabled +Note: When accessing the help system, Expert Mode is temporarily disabled to display the help system navigation keys. @item -v, --view @@ -205,7 +205,7 @@ edited. @section Special Functions Special functions use the Control key (displayed in the help and -shotcut lists as ^) or the Meta key (displayed as M). +shortcut lists as ^) or the Meta key (displayed as M). @itemize @bullet @@ -230,7 +230,7 @@ three sections: left, center and right. The section on the left displays the version of @code{nano} being used. The center section displays the current file name, or "New Buffer" if the file has not yet been named. The section on the right will display "Modified" if the file has been -modified since it ws last saved or opened. +modified since it was last saved or opened. Special modes: When nano is in "File browser" mode, the center section will display the current directory instead of the filename. @@ -245,13 +245,13 @@ bottom line in Expert Mode. @xref{Expert Mode}, for more info. The Statusbar shows important and informational messages. Any error messages that occur from using the editor will appear on the statusbar. Any questions that are asked of the user will be asked on the statusbar, -and any user input (serch strings, file names, etc) will be input on the +and any user input (search strings, file names, etc) will be input on the statusbar. @node Shortcut Lists, , The Statusbar, Editor Basics @section Shortcut Lists -The Shorcut Lists are the two lines at the bottom of the screen which show +The Shortcut Lists are the two lines at the bottom of the screen which show some of the more commonly used functions in the editor. The exact functions which are displayed depend on whether Pico Compatibility Mode mode is enabled. @xref{Pico Compatibility}, for more info. @@ -308,14 +308,14 @@ toggles the -z (--suspend) command line flag. @node The File Browser, Pico Compatibility, Feature Toggles, Top @chapter The File Browser -When reading or writilg files, pressing ^T will invoke the file browser. +When reading or writing files, pressing ^T will invoke the file browser. Here, one can navigate directories in a graphical manner in order to find the desired file. Basic movement in the file browser is accomplished with he arrow keys and page up/down. The behavior of the enter (or 's') key varies by what is currently selected. If the currently selected object is a directory, -the file browser will enter and display the contects of the directory. If +the file browser will enter and display the contents of the directory. If the object is a file, this filename and path are copied to the statusbar and the file browser is exited. @@ -389,10 +389,10 @@ Disable the tab completion code when reading or writing files. Disable the justify (^J)/unjustify (^U) functions in the editor. @item --disable-speller -Disables spell checker abillity. +Disables spell checker ability. @item --disable-help -Disables the help function (^G). Disabling this option maks the +Disables the help function (^G). Disabling this option makes the binary much smaller, but makes it difficult for new users to learn more than very basic things about using the editor. diff --git a/po/ca.po b/po/ca.po index 6659f8b6..7a7b629a 100644 --- a/po/ca.po +++ b/po/ca.po @@ -222,7 +222,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Enganxar el cutbuffer a la línia actual" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Mostrar la posició del cursor" #: global.c:213 diff --git a/po/cs.po b/po/cs.po index fdb3ecb6..806d6b3b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -223,7 +223,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Vlož z cutbufferu do aktuální řádky" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Ukaž pozici kurzoru" #: global.c:213 diff --git a/po/de.po b/po/de.po index 1a9c98e2..a4dd76e5 100644 --- a/po/de.po +++ b/po/de.po @@ -223,7 +223,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Aus der Zwischenablage einfügen" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Cursoposition anzeigen" #: global.c:213 diff --git a/po/es.po b/po/es.po index adc4d90e..a22e06a3 100644 --- a/po/es.po +++ b/po/es.po @@ -222,7 +222,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Pegar el cutbuffer en la línea actual" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Mostrar la posición del cursor" #: global.c:213 diff --git a/po/fi.po b/po/fi.po index 7c8a1dfb..ac53dd6f 100644 --- a/po/fi.po +++ b/po/fi.po @@ -221,7 +221,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Kopioi rivi leiketilasta nykyiselle riville" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Näytä kohdistimen sijainti" #: global.c:213 diff --git a/po/fr.po b/po/fr.po index 4cda086f..cceac849 100644 --- a/po/fr.po +++ b/po/fr.po @@ -229,7 +229,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Copie la chaîne en mémoire vers la ligne courante" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Affiche la position du curseur" #: global.c:213 diff --git a/po/gl.po b/po/gl.po index 9723ec51..3e80969b 100644 --- a/po/gl.po +++ b/po/gl.po @@ -219,7 +219,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Pegar do buffer de cortado na lińa actual" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Amosa-la posición do cursor" #: global.c:213 diff --git a/po/hu.po b/po/hu.po index 8be157d1..e141ae69 100644 --- a/po/hu.po +++ b/po/hu.po @@ -222,7 +222,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "A cutbufferben lévő sor beillesztése az aktuális sorba" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "A kurzor helyének mutatása" #: global.c:213 diff --git a/po/id.po b/po/id.po index 00e980b0..2aee5a16 100644 --- a/po/id.po +++ b/po/id.po @@ -222,7 +222,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Kembalikan dari cutbuffer ke baris saat ini" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Tampilkan posisi kursor" #: global.c:213 diff --git a/po/it.po b/po/it.po index 3e7a47af..e61a669f 100644 --- a/po/it.po +++ b/po/it.po @@ -225,7 +225,7 @@ msgid "Uncut from the cutbuffer into the current line" msgstr "Uncut dal cutbuffer dentro la linea corrente" #: global.c:212 -msgid "Show the posititon of the cursor" +msgid "Show the position of the cursor" msgstr "Mostra la posizione del cursore" #: global.c:213 diff --git a/rcfile.c b/rcfile.c index f0343a92..b361df2b 100644 --- a/rcfile.c +++ b/rcfile.c @@ -58,8 +58,8 @@ rcoption rcopts[NUM_RCOPTS] = {"nohelp", NO_HELP}, {"suspend", SUSPEND}}; -/* We have an error in some part of the rcfile, put it on stderr and - make the usr hit return to continue starting up nano */ +/* We have an error in some part of the rcfile; put it on stderr and + make the user hit return to continue starting up nano */ void rcfile_error(char *msg, ...) { va_list ap; @@ -75,7 +75,7 @@ void rcfile_error(char *msg, ...) } -/* Just print the error (one of many perhaps) but don't abort, yet */ +/* Just print the error (one of many, perhaps) but don't abort, yet */ void rcfile_msg(int *errors, char *msg, ...) { va_list ap; @@ -91,7 +91,7 @@ void rcfile_msg(int *errors, char *msg, ...) } -/* Parse the next word from the string. Returns NULL of we hit EOL */ +/* Parse the next word from the string. Returns NULL if we hit EOL */ char *parse_next_word(char *ptr) { while (*ptr != ' ' && *ptr != '\n' && ptr != '\0') diff --git a/search.c b/search.c index ed63146c..57ce24b2 100644 --- a/search.c +++ b/search.c @@ -66,7 +66,7 @@ void search_init_globals(void) /* Set up the system variables for a search or replace. Returns -1 on abort, 0 on success, and 1 on rerun calling program - Return -2 to run opposite program (searchg -> replace, replace -> search) + Return -2 to run opposite program (search -> replace, replace -> search) replacing = 1 if we call from do_replace, 0 if called from do_search func. */ @@ -261,14 +261,14 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx, for (tmp = fileptr->data; tmp != found; tmp++) current_x_find++; - /* Ensure we haven't wrap around again! */ + /* Ensure we haven't wrapped around again! */ if ((search_last_line) && (current_x_find >= beginx)) { if (!quiet) not_found_msg(needle); return NULL; } - /* Set globals now that we are sure we found something */ + /* Set globals, now that we are sure we found something */ current = fileptr; current_x = current_x_find; @@ -353,9 +353,9 @@ void print_replaced(int num) void replace_abort(void) { - /* Identicle to search_abort, so we'll call it here. If it + /* Identical to search_abort, so we'll call it here. If it does something different later, we can change it back. For now - it's just a waste to duplicat code */ + it's just a waste to duplicate code */ search_abort(); placewewant = xplustabs(); } @@ -434,7 +434,7 @@ char *replace_line(void) search_match_count = regmatches[0].rm_eo - regmatches[0].rm_so; new_line_size = replace_regexp(NULL, 0); /* If they specified an invalid subexpression in the replace - * text, return NULL indicating an error */ + * text, return NULL, indicating an error */ if (new_line_size < 0) return NULL; } else { @@ -463,7 +463,7 @@ char *replace_line(void) /* The tail of the original line */ /* This may expose other bugs, because it no longer - goes through each character on the string + goes through each character in the string and tests for string goodness. But because we can assume the invariant that current->data is less than current_x + strlen(last_search) long, @@ -513,7 +513,7 @@ int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx, if (!fileptr) break; - /* Make sure only wholewords are found */ + /* Make sure only whole words are found */ if (wholewords) { /* start of line or previous character not a letter */ @@ -610,7 +610,7 @@ int do_replace(void) return 0; } - /* Again, there was a previous string but they deleted it and hit enter */ + /* Again, there was a previous string, but they deleted it and hit enter */ if (!ISSET(PICO_MODE) && !strcmp(answer, "")) { statusbar(_("Replace Cancelled")); replace_abort(); diff --git a/utils.c b/utils.c index d0298ccc..a88eb3ef 100644 --- a/utils.c +++ b/utils.c @@ -53,7 +53,7 @@ char *strcasestr(char *haystack, char *needle) { char *localneedle, *localhaystack, *found, *tmp, *tmp2; - /* Make a copy of the search string and searcgh space */ + /* Make a copy of the search string and search space */ localneedle = nmalloc(strlen(needle) + 2); localhaystack = nmalloc(strlen(haystack) + 2); @@ -133,7 +133,7 @@ void *nrealloc(void *ptr, size_t howmuch) return r; } -/* Copy one malloced string to another pointer. +/* Copy one malloc()ed string to another pointer. Should be used as dest = mallocstrcpy(dest, src); */ diff --git a/winio.c b/winio.c index 70128ddc..88ec03f8 100644 --- a/winio.c +++ b/winio.c @@ -38,7 +38,7 @@ /* winio.c statics */ static int statblank = 0; /* Number of keystrokes left after - we call statubar() before we + we call statusbar(), before we actually blank the statusbar */ /* Local Function Prototypes for only winio.c */ @@ -66,7 +66,7 @@ int do_last_line(void) return 1; } -/* Like xplustabs, but for a specifc index of a speficific filestruct */ +/* Like xplustabs, but for a specific index of a specific filestruct */ int xpt(filestruct * fileptr, int index) { int i, tabs = 0; @@ -82,7 +82,7 @@ int xpt(filestruct * fileptr, int index) else tabs += tabsize - (tabs % tabsize); } else if (fileptr->data[i] & 0x80) - /* Make 8 bit chars only 1 collumn! */ + /* Make 8 bit chars only 1 column! */ ; else if (fileptr->data[i] < 32) tabs++; @@ -149,7 +149,7 @@ int strlenpt(char *buf) else tabs += tabsize - (tabs % tabsize); } else if (buf[i] & 0x80) - /* Make 8 bit chars only 1 collumn! */ + /* Make 8 bit chars only 1 column! */ ; else if (buf[i] < 32) tabs++; @@ -159,7 +159,7 @@ int strlenpt(char *buf) } -/* resets current_y based on the position of current and puts the cursor at +/* resets current_y, based on the position of current, and puts the cursor at (current_y, current_x) */ void reset_cursor(void) { @@ -254,7 +254,7 @@ void nanoget_repaint(char *buf, char *inputbuf, int x) #endif } -/* Get the input from the kb, this should only be called from statusq */ +/* Get the input from the kb; this should only be called from statusq */ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, int start_x) { @@ -621,7 +621,7 @@ void set_modified(void) /* And so start the display update routines */ /* Given a column, this returns the "page" it is on */ /* "page" in the case of the display columns, means which set of 80 */ -/* characters is viewable (ie: page 1 shows from 1 to COLS) */ +/* characters is viewable (e.g.: page 1 shows from 1 to COLS) */ inline int get_page_from_virtual(int virtual) { int page = 2; @@ -657,7 +657,7 @@ inline int get_page_end_virtual(int page) /* This takes care of the case where there is a mark that covers only */ /* the current line. */ -/* It expects a line with no tab characers (ie: the type that edit_add */ +/* It expects a line with no tab characters (i.e.: the type that edit_add */ /* deals with */ void add_marked_sameline(int begin, int end, filestruct * fileptr, int y, int virt_cur_x, int this_page) @@ -665,7 +665,7 @@ void add_marked_sameline(int begin, int end, filestruct * fileptr, int y, /* * The general idea is to break the line up into 3 sections: before * the mark, the mark, and after the mark. We then paint each in - * turn (for those that are currently visible, of course + * turn (for those that are currently visible, of course) * * 3 start points: 0 -> begin, begin->end, end->strlen(data) * in data : pre sel post @@ -677,7 +677,7 @@ void add_marked_sameline(int begin, int end, filestruct * fileptr, int y, int pre_data_len = begin, sel_data_len = end - begin, post_data_len = 0; /* Determined from the other two */ /* now fix the start locations & lengths according to the cursor's - * position (ie: our page) */ + * position (i.e.: our page) */ if (pre_data_len < this_page_start) pre_data_len = 0; else @@ -731,14 +731,14 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x, int virt_mark_beginx, int this_page) { #ifndef NANO_SMALL - /* There are quite a few cases that could take place, we'll deal + /* There are quite a few cases that could take place; we'll deal * with them each in turn */ if (ISSET(MARK_ISSET) && !((fileptr->lineno > mark_beginbuf->lineno && fileptr->lineno > current->lineno) || (fileptr->lineno < mark_beginbuf->lineno && fileptr->lineno < current->lineno))) { - /* If we get here we are on a line that is atleast + /* If we get here we are on a line that is at least * partially selected. The lineno checks above determined * that */ if (fileptr != mark_beginbuf && fileptr != current) { @@ -772,14 +772,14 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x, } } else if (fileptr == mark_beginbuf) { /* - * we're updating the line that was first marked + * We're updating the line that was first marked, * but we're not currently on it. So we want to * figure out which half to invert based on our * relative line numbers. * - * i.e. If we're above the "beginbuf" line, we want to - * mark the left side. Otherwise we're below, so we - * mark the right + * I.e. if we're above the "beginbuf" line, we want to + * mark the left side. Otherwise, we're below, so we + * mark the right. */ int target; @@ -833,7 +833,7 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x, } } else if (fileptr == current) { - /* we're on the cursor's line, but it's not the first + /* We're on the cursor's line, but it's not the first * one we marked. Similar to the previous logic. */ int this_page_start = get_page_start_virtual(this_page), this_page_end = get_page_end_virtual(this_page); @@ -904,7 +904,7 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x, * Just update one line in the edit buffer. Basically a wrapper for * edit_add * - * index gives is a place in the string to update starting from. + * index gives us a place in the string to update starting from. * Likely args are current_x or 0. */ void update_line(filestruct * fileptr, int index) @@ -925,7 +925,7 @@ void update_line(filestruct * fileptr, int index) mvwaddstr(edit, line, 0, hblank); - /* Next, convert all the tabs to spaces so everything else is easy */ + /* Next, convert all the tabs to spaces, so everything else is easy */ index = xpt(fileptr, index); realdata = fileptr->data; @@ -961,7 +961,7 @@ void update_line(filestruct * fileptr, int index) /* Now, Paint the line */ if (current == fileptr && index > COLS - 2) { /* This handles when the current line is beyond COLS */ - /* It requires figureing out what page we're at */ + /* It requires figuring out what page we're on */ page = get_page_from_virtual(index); col = get_page_start_virtual(page); @@ -1032,7 +1032,7 @@ void edit_refresh(void) } /* - * Same as above, but touch the window first so everything is redrawn. + * Same as above, but touch the window first, so everything is redrawn. */ void edit_refresh_clearok(void) { @@ -1042,7 +1042,7 @@ void edit_refresh_clearok(void) } /* - * Nice generic routine to update the edit buffer given a pointer to the + * Nice generic routine to update the edit buffer, given a pointer to the * file struct =) */ void edit_update(filestruct * fileptr, int topmidbot) @@ -1068,7 +1068,7 @@ void edit_update(filestruct * fileptr, int topmidbot) edit_refresh(); } -/* This function updates current based on where current_y is, reset_cursor +/* This function updates current, based on where current_y is; reset_cursor does the opposite */ void update_cursor(void) { @@ -1094,7 +1094,7 @@ void update_cursor(void) /* * Ask a question on the statusbar. Answer will be stored in answer * global. Returns -1 on aborted enter, -2 on a blank string, and 0 - * otherwise, the valid shortcut key caught, Def is any editable text we + * otherwise, the valid shortcut key caught. Def is any editable text we * want to put up by default. * * New arg tabs tells whether or not to allow tab completion. @@ -1268,7 +1268,7 @@ int do_yesno(int all, int leavecursor, char *msg, ...) break; default: - /* Look for the kbinput in the yes, no and (optinally) all str */ + /* Look for the kbinput in the yes, no and (optimally) all str */ for (i = 0; yesstr[i] != 0 && yesstr[i] != kbinput; i++) ; if (yesstr[i] != 0) { @@ -1408,7 +1408,7 @@ int do_cursorpos(void) } /* Our broken, non-shortcut list compliant help function. - But hey, it's better than nothing, and it's dynamic! */ + But, hey, it's better than nothing, and it's dynamic! */ int do_help(void) { #ifndef DISABLE_HELP @@ -1427,7 +1427,7 @@ int do_help(void) if (ISSET(NO_HELP)) { - /* Well if we're going to do this, we should at least + /* Well, if we're going to do this, we should at least do it the right way */ no_help_flag = 1; UNSET(NO_HELP); @@ -1466,7 +1466,7 @@ int do_help(void) break; } - /* Calculate where in the text we should be based on the page */ + /* Calculate where in the text we should be, based on the page */ for (i = 1; i < page; i++) { row = 0; j = 0; @@ -1495,7 +1495,7 @@ int do_help(void) } if (j == COLS - 5) { - /* Don't print half a word if we've run of of space */ + /* Don't print half a word if we've run out of space */ while (*end != ' ' && *end != '\0') { end--; j--; @@ -1571,7 +1571,7 @@ void dump_buffer_reverse(filestruct * inptr) #endif /* DEBUG */ } -/* Fix editbot based on the assumption that edittop is correct */ +/* Fix editbot, based on the assumption that edittop is correct */ void fix_editbot(void) { int i; @@ -1589,7 +1589,7 @@ void do_replace_highlight(int highlight_flag, char *word) highlight_word = mallocstrcpy(highlight_word, ¤t->data[current_x]); highlight_word[strlen(word)] = '\0'; - /* adjust output when word extends beyond screen*/ + /* adjust output when word extends beyond screen */ x = xplustabs(); y = get_page_end_virtual(get_page_from_virtual(x)) + 1; @@ -1718,7 +1718,7 @@ void do_credits(void) int keypad_on(WINDOW * win, int newval) { -/* This is taken right from aumix. Don't sue me */ +/* This is taken right from aumix. Don't sue me. */ #ifdef HAVE_USEKEYPAD int old;