* 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.
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;
#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