mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-29 05:39:55 +03:00
Moving some variables to a better place.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5038 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
e94a00a26c
commit
eaf235f1e6
@ -2,6 +2,7 @@
|
||||
* src/color.c (color_update): When there are no syntaxes, for example
|
||||
with --ignorercfiles, do not try to find one, because that would lead
|
||||
to the magic database being searched, which slows down startup a lot.
|
||||
* src/color.c (color_update): Move some variables to a better place.
|
||||
|
||||
2014-06-29 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/rcfile.c: Fix compilation with --enable-tiny --enable-nanorc.
|
||||
|
10
src/color.c
10
src/color.c
@ -155,13 +155,6 @@ void color_update(void)
|
||||
colortype *tmpcolor, *defcolor = NULL;
|
||||
regexlisttype *e;
|
||||
|
||||
/* Var magicstring will stay NULL if we fail to get a magic result. */
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
const char *magicstring = NULL;
|
||||
magic_t cookie = NULL;
|
||||
struct stat fileinfo;
|
||||
#endif
|
||||
|
||||
assert(openfile != NULL);
|
||||
|
||||
openfile->syntax = NULL;
|
||||
@ -266,6 +259,9 @@ void color_update(void)
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
/* Check magic if we don't have an answer yet. */
|
||||
if (openfile->colorstrings == NULL) {
|
||||
struct stat fileinfo;
|
||||
magic_t cookie = NULL;
|
||||
const char *magicstring = NULL;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "No result from headerline either, trying libmagic...\n");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user