From 2ad5d2e919e85114986d3c40053bb2aeabe87b3a Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 22 Apr 2009 20:20:42 +0400 Subject: [PATCH] Fixed linkage. charset.c: cp_display and cp_source variables are made global not static and... charset.h: ...defined here as extern. search.h: added required #include's. search.c: fixed cp_display and cp_source variables declaration. --- src/charsets.c | 4 ++-- src/charsets.h | 2 ++ src/search.c | 4 ++-- src/search.h | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/charsets.c b/src/charsets.c index dd9c4b7f7..8ca8ec5fb 100644 --- a/src/charsets.c +++ b/src/charsets.c @@ -39,8 +39,8 @@ struct codepage_desc *codepages; unsigned char conv_displ[256]; unsigned char conv_input[256]; -static const char *cp_display = NULL; -static const char *cp_source = NULL; +const char *cp_display = NULL; +const char *cp_source = NULL; int diff --git a/src/charsets.h b/src/charsets.h index 87e168a7f..1494f8e75 100644 --- a/src/charsets.h +++ b/src/charsets.h @@ -16,6 +16,8 @@ struct codepage_desc { char *name; }; +extern const char *cp_display; +extern const char *cp_source; extern struct codepage_desc *codepages; const char *get_codepage_id (const int n); diff --git a/src/search.c b/src/search.c index 735abd039..41aa57920 100644 --- a/src/search.c +++ b/src/search.c @@ -57,8 +57,8 @@ typedef enum { /*** file scope variables ************************************************************************/ -extern const char *cp_source; -extern const char *cp_display; +const char *cp_source; +const char *cp_display; /*** file scope functions ************************************************************************/ diff --git a/src/search.h b/src/search.h index cf53eb2ad..7d28c845c 100644 --- a/src/search.h +++ b/src/search.h @@ -1,6 +1,10 @@ #ifndef MC__SEARCH_H #define MC__SEARCH_H +#include + +#include "../src/global.h" /* */ + /*** typedefs(not structures) and defined constants **********************************************/ typedef int (*mc_search_fn) (const void *user_data, gsize char_offset);