Commit 6d9aa085 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

cosmetic fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 6 additions and 8 deletions
+6 -8
...@@ -209,17 +209,16 @@ typedef struct toggle { ...@@ -209,17 +209,16 @@ typedef struct toggle {
long flag; /* What flag actually gets toggled. */ long flag; /* What flag actually gets toggled. */
struct toggle *next; struct toggle *next;
} toggle; } toggle;
#endif /* !NANO_SMALL */ #endif
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
typedef struct rcoption { typedef struct rcoption {
const char *name; const char *name;
long flag; long flag;
} rcoption; } rcoption;
#endif /* ENABLE_NANORC */ #endif
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
typedef struct colortype { typedef struct colortype {
int fg; /* fg color */ int fg; /* fg color */
int bg; /* bg color */ int bg; /* bg color */
...@@ -241,8 +240,7 @@ typedef struct syntaxtype { ...@@ -241,8 +240,7 @@ typedef struct syntaxtype {
colortype *color; /* color struct for this syntax */ colortype *color; /* color struct for this syntax */
struct syntaxtype *next; struct syntaxtype *next;
} syntaxtype; } syntaxtype;
#endif
#endif /* ENABLE_COLOR */
#ifndef NANO_SMALL #ifndef NANO_SMALL
typedef struct historytype { typedef struct historytype {
...@@ -250,6 +248,7 @@ typedef struct historytype { ...@@ -250,6 +248,7 @@ typedef struct historytype {
struct historytype *prev; struct historytype *prev;
char *data; char *data;
} historytype; } historytype;
typedef struct historyheadtype { typedef struct historyheadtype {
struct historytype *next; /* Keep *next and *prev members struct historytype *next; /* Keep *next and *prev members
* together. */ * together. */
...@@ -260,7 +259,7 @@ typedef struct historyheadtype { ...@@ -260,7 +259,7 @@ typedef struct historyheadtype {
int count; int count;
int len; int len;
} historyheadtype; } historyheadtype;
#endif /* !NANO_SMALL */ #endif
/* Bitwise flags so we can save space (or more correctly, not waste /* Bitwise flags so we can save space (or more correctly, not waste
* it). */ * it). */
......
...@@ -431,8 +431,7 @@ char *mallocstrassn(char *dest, char *src) ...@@ -431,8 +431,7 @@ char *mallocstrassn(char *dest, char *src)
void new_magicline(void) void new_magicline(void)
{ {
filebot->next = (filestruct *)nmalloc(sizeof(filestruct)); filebot->next = (filestruct *)nmalloc(sizeof(filestruct));
filebot->next->data = charalloc(1); filebot->next->data = mallocstrcpy(NULL, "");
filebot->next->data[0] = '\0';
filebot->next->prev = filebot; filebot->next->prev = filebot;
filebot->next->next = NULL; filebot->next->next = NULL;
filebot->next->lineno = filebot->lineno + 1; filebot->next->lineno = filebot->lineno + 1;
......
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