CVS code -
+- General:
+ - Miscellaneous comment fixes. (DLR)
+ do_credits()
+ - Update the last copyright notice to include 2006. (DLR)
- README:
- Add more miscellaneous cosmetic fixes. (DLR)
- doc/syntax/python.nanorc:
* browser.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
/* The directory we were in, if any, before backing up via
* browsing to "..". */
char *ans = NULL;
- /* The last answer the user typed on the statusbar. */
+ /* The last answer the user typed at the statusbar prompt. */
size_t old_selected;
/* The selected file we had before the current selected file. */
* chars.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
/* Whether we've enabled UTF-8 support. */
static const wchar_t bad_wchar = 0xFFFD;
/* If we get an invalid multibyte sequence, we treat it as
- * Unicode FFFD (Replacement Character), unless we're
- * determining if it's a control character or searching for a
- * match to it. */
+ * Unicode FFFD (Replacement Character), unless we're searching
+ * for a match to it. */
static const char *const bad_mbchar = "\xEF\xBF\xBD";
static const int bad_mbchar_len = 3;
* color.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#ifdef ENABLE_COLOR
/* For each syntax list entry, go through the list of colors and assign
- * color pairs. */
+ * the color pairs. */
void set_colorpairs(void)
{
const syntaxtype *this_syntax = syntaxes;
* cut.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
if (copy_text) {
if (cutbuffer != NULL) {
/* If the cutbuffer isn't empty, save where it currently
- * ends. This is where the new text will be added. */
+ * ends. This is where we'll add the new text. */
cb_save = cutbottom;
cb_save_len = strlen(cutbottom->data);
}
cut_marked();
openfile->mark_set = FALSE;
} else if (ISSET(CUT_TO_END))
- /* Otherwise, if the CUT_TO_END flag is set, move all text up to
- * the end of the line into the cutbuffer. */
+ /* If the CUT_TO_END flag is set, move all text up to the end of
+ * the line into the cutbuffer. */
cut_to_eol();
else
#endif
- /* Otherwise, move the entire line into the cutbuffer. */
+ /* Move the entire line into the cutbuffer. */
cut_line();
#ifndef NANO_TINY
* files.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
int i;
const char *msg;
char *ans = mallocstrcpy(NULL, "");
- /* The last answer the user typed on the statusbar. */
+ /* The last answer the user typed at the statusbar prompt. */
filestruct *edittop_save = openfile->edittop;
size_t current_x_save = openfile->current_x;
ssize_t current_y_save = openfile->current_y;
int i, retval = 0;
append_type append = OVERWRITE;
char *ans;
- /* The last answer the user typed on the statusbar. */
+ /* The last answer the user typed at the statusbar prompt. */
#ifdef NANO_EXTRA
static bool did_credits = FALSE;
#endif
* global.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#endif
char *answer = NULL;
- /* The answer string used in the statusbar prompt. */
+ /* The answer string used by the statusbar prompt. */
ssize_t tabsize = -1;
/* The width of a tab in spaces. The default value is set in
* help.c *
* *
* Copyright (C) 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
/* The current shortcut list. */
#endif
const char *ptr;
- /* The current line of help text. */
+ /* The current line of the help text. */
size_t old_line = (size_t)-1;
/* The line we were on before the current line. */
* move.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
free(char_mb);
- /* If we haven't found it, leave the cursor at the end of the
- * file. */
+ /* If we haven't found it, move to the end of the file. */
if (openfile->current == NULL)
openfile->current = openfile->filebot;
}
}
- /* If we haven't found it, leave the cursor at the beginning of the
- * file. */
+ /* If we haven't found it, move to the beginning of the file. */
if (openfile->current == NULL)
openfile->current = openfile->fileage;
/* If we've found it, move backward until we find the character
* nano.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
static struct termios oldterm;
/* The user's original terminal settings. */
static struct sigaction act;
- /* For all our fun signal handlers. */
+ /* Used to set up all our fun signal handlers. */
/* Create a new filestruct node. Note that we do not set prevnode->next
* to the new line. */
* nano.h *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#define ISSET(bit) ((flags & bit) != 0)
#define TOGGLE(bit) flags ^= bit
-/* Macros for character allocation, etc. */
+/* Macros for character allocation and more. */
#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
#define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char))
* prompt.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#include <string.h>
static char *prompt = NULL;
- /* The prompt string for statusbar questions. */
+ /* The prompt string used for statusbar questions. */
static size_t statusbar_x = (size_t)-1;
/* The cursor position in answer. */
static size_t statusbar_pww = (size_t)-1;
* proto.h *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#include "nano.h"
-/* All public external variables. See global.c for their
- * descriptions. */
+/* All external variables. See global.c for their descriptions. */
#ifndef NANO_TINY
extern sigjmp_buf jump_buf;
extern bool jump_buf_main;
extern char *homedir;
-/* All public functions in browser.c. */
+/* All functions in browser.c. */
#ifndef DISABLE_BROWSER
char *do_browser(char *path, DIR *dir);
char *do_browse_from(const char *inpath);
char *striponedir(const char *path);
#endif
-/* All public functions in chars.c. */
+/* All functions in chars.c. */
#ifdef ENABLE_UTF8
void utf8_init(void);
bool using_utf8(void);
bool is_valid_mbstring(const char *s);
#endif
-/* All public functions in color.c. */
+/* All functions in color.c. */
#ifdef ENABLE_COLOR
void set_colorpairs(void);
void color_init(void);
void color_update(void);
#endif
-/* All public functions in cut.c. */
+/* All functions in cut.c. */
void cutbuffer_reset(void);
void cut_line(void);
#ifndef NANO_TINY
#endif
void do_uncut_text(void);
-/* All public functions in files.c. */
+/* All functions in files.c. */
void make_new_buffer(void);
void initialize_buffer(void);
void initialize_buffer_text(void);
void save_history(void);
#endif
-/* All public functions in global.c. */
+/* All functions in global.c. */
size_t length_of_list(const shortcut *s);
#ifndef NANO_TINY
void toggle_init_one(int val
void thanks_for_all_the_fish(void);
#endif
-/* All public functions in help.c. */
+/* All functions in help.c. */
#ifndef DISABLE_HELP
void do_help(void (*refresh_func)(void));
void do_help_void(void);
size_t help_line_len(const char *ptr);
#endif
-/* All public functions in move.c. */
+/* All functions in move.c. */
void do_first_line(void);
void do_last_line(void);
void do_page_up(void);
void do_left(void);
void do_right(void);
-/* All public functions in nano.c. */
+/* All functions in nano.c. */
filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode, filestruct
#endif
void do_output(char *output, size_t output_len, bool allow_cntrls);
-/* All public functions in prompt.c. */
+/* All functions in prompt.c. */
int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
bool *ran_func, bool *finished, bool allow_funcs, void
(*refresh_func)(void));
void do_prompt_abort(void);
int do_yesno_prompt(bool all, const char *msg);
-/* All public functions in rcfile.c. */
+/* All functions in rcfile.c. */
#ifdef ENABLE_NANORC
void rcfile_error(const char *msg, ...);
char *parse_next_word(char *ptr);
void do_rcfile(void);
#endif
-/* All public functions in search.c. */
+/* All functions in search.c. */
#ifdef HAVE_REGEX_H
int regexp_init(const char *regexp);
void regexp_cleanup(void);
#endif
#endif
-/* All public functions in text.c. */
+/* All functions in text.c. */
#ifndef NANO_TINY
void do_mark(void);
#endif
#endif
void do_verbatim_input(void);
-/* All public functions in utils.c. */
+/* All functions in utils.c. */
int digits(size_t n);
void get_homedir(void);
bool parse_num(const char *str, ssize_t *val);
void dump_filestruct_reverse(void);
#endif
-/* All public functions in winio.c. */
+/* All functions in winio.c. */
void get_key_buffer(WINDOW *win);
size_t get_key_buffer_len(void);
void unget_input(int *input, size_t input_len);
* rcfile.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
static bool errors = FALSE;
/* Whether we got any errors while parsing an rcfile. */
static size_t lineno = 0;
- /* If we did, the line number where the current error
- * occurred. */
+ /* If we did, the line number where the last error occurred. */
static char *nanorc = NULL;
/* The path to the rcfile we're parsing. */
#ifdef ENABLE_COLOR
* search.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
if (interactive) {
char *ans = mallocstrcpy(NULL, answer);
- /* Ask for it. */
+ /* Ask for the line and column. */
int i = do_prompt(FALSE,
#ifndef DISABLE_TABCOMP
TRUE,
* text.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
/* Indent or unindent the current line (or all lines covered by the mark
* if the mark is on) len columns, depending on whether len is positive
* or negative. If the TABS_TO_SPACES flag is set, indent/unindent by
- * len spaces. Otherwise, indent/unindent by (len / tabsize) tabs and
- * (len % tabsize) spaces. */
+ * len spaces. Otherwise, indent or unindent by (len / tabsize) tabs
+ * and (len % tabsize) spaces. */
void do_indent(ssize_t cols)
{
bool indent_changed = FALSE;
* utils.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
}
/* Return the user's home directory. We use $HOME, and if that fails,
- * we fall back on getpwuid(). */
+ * we fall back on the home directory of the effective user ID. */
void get_homedir(void)
{
if (homedir == NULL) {
* winio.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
- * Copyright (C) 2005, 2006 David Lawrence Ramsey *
+ * Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
#include <ctype.h>
static int *key_buffer = NULL;
- /* The keystroke buffer, containing all the keystrokes we have
- * at a given point. */
+ /* The keystroke buffer, containing all the keystrokes we
+ * haven't handled yet at a given point. */
static size_t key_buffer_len = 0;
/* The length of the keystroke buffer. */
static int statusblank = 0;
"",
"",
"(c) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta",
- "(c) 2005, 2006 David Lawrence Ramsey",
+ "(c) 2005, 2006, 2007 David Lawrence Ramsey",
"",
"",
"",