Commit bd28ee47 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

when DISABLE_HELP is defined, leave out some unused shortcut and toggle

list parameters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3815 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 240 additions and 207 deletions
+240 -207
...@@ -106,6 +106,13 @@ CVS code - ...@@ -106,6 +106,13 @@ CVS code -
- Don't return NULL when the current directory doesn't exist, as - Don't return NULL when the current directory doesn't exist, as
we can still recover from that. (DLR, found by Mike Frysinger) we can still recover from that. (DLR, found by Mike Frysinger)
- Add various cleanups. (DLR) - Add various cleanups. (DLR)
- global.c:
shortcut_init(), sc_init_one()
- Don't include blank_after when DISABLE_HELP is defined, as
it's never used then. (DLR)
toggle_init(), toggle_init_one()
- Don't include desc or blank_after when DISABLE_HELP is
defined, as neither are ever used then. (DLR)
- help.c: - help.c:
do_help() do_help()
- Simplify screen update handling and exiting. (DLR) - Simplify screen update handling and exiting. (DLR)
......
This diff is collapsed.
...@@ -291,11 +291,12 @@ typedef struct shortcut { ...@@ -291,11 +291,12 @@ typedef struct shortcut {
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
const char *help; const char *help;
/* The help file entry text for this function. */ /* The help file entry text for this function. */
#endif
bool blank_after; bool blank_after;
/* Whether there should be a blank line after the help entry /* Whether there should be a blank line after the help entry
* text for this function. */ * text for this function. */
/* Key values that aren't used should be set to NANO_NO_KEY. */ #endif
/* Note: Key values that aren't used should be set to
* NANO_NO_KEY. */
int ctrlval; int ctrlval;
/* The special sentinel key or control key we want bound, if /* The special sentinel key or control key we want bound, if
* any. */ * any. */
...@@ -320,9 +321,11 @@ typedef struct toggle { ...@@ -320,9 +321,11 @@ typedef struct toggle {
const char *desc; const char *desc;
/* The description of the toggle, e.g. "Cut to end"; we'll /* The description of the toggle, e.g. "Cut to end"; we'll
* append Enabled or Disabled to it. */ * append Enabled or Disabled to it. */
#ifndef DISABLE_HELP
bool blank_after; bool blank_after;
/* Whether there should be a blank line after the description of /* Whether there should be a blank line after the description of
* the toggle. */ * the toggle. */
#endif
long flag; long flag;
/* Which flag actually gets toggled. */ /* Which flag actually gets toggled. */
struct toggle *next; struct toggle *next;
......
...@@ -342,16 +342,19 @@ void save_history(void); ...@@ -342,16 +342,19 @@ void save_history(void);
/* Public functions in global.c. */ /* Public functions in global.c. */
size_t length_of_list(const shortcut *s); size_t length_of_list(const shortcut *s);
#ifndef NANO_TINY #ifndef NANO_TINY
void toggle_init_one(int val, const char *desc, bool blank_after, long void toggle_init_one(int val
flag); #ifndef DISABLE_HELP
, const char *desc, bool blank_after
#endif
, long flag);
void toggle_init(void); void toggle_init(void);
#endif #endif
void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc, void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
const char *help, , const char *help, bool blank_after
#endif #endif
bool blank_after, int metaval, int funcval, int miscval, bool , int metaval, int funcval, int miscval, bool view, void
view, void (*func)(void)); (*func)(void));
void shortcut_init(bool unjustify); void shortcut_init(bool unjustify);
void free_shortcutage(shortcut **shortcutage); void free_shortcutage(shortcut **shortcutage);
#ifdef DEBUG #ifdef DEBUG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment