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.
This commit is contained in:
Andrew Borodin 2009-04-22 20:20:42 +04:00
parent ab729f822a
commit 2ad5d2e919
4 changed files with 10 additions and 4 deletions

View File

@ -39,8 +39,8 @@ struct codepage_desc *codepages;
unsigned char conv_displ[256]; unsigned char conv_displ[256];
unsigned char conv_input[256]; unsigned char conv_input[256];
static const char *cp_display = NULL; const char *cp_display = NULL;
static const char *cp_source = NULL; const char *cp_source = NULL;
int int

View File

@ -16,6 +16,8 @@ struct codepage_desc {
char *name; char *name;
}; };
extern const char *cp_display;
extern const char *cp_source;
extern struct codepage_desc *codepages; extern struct codepage_desc *codepages;
const char *get_codepage_id (const int n); const char *get_codepage_id (const int n);

View File

@ -57,8 +57,8 @@ typedef enum {
/*** file scope variables ************************************************************************/ /*** file scope variables ************************************************************************/
extern const char *cp_source; const char *cp_source;
extern const char *cp_display; const char *cp_display;
/*** file scope functions ************************************************************************/ /*** file scope functions ************************************************************************/

View File

@ -1,6 +1,10 @@
#ifndef MC__SEARCH_H #ifndef MC__SEARCH_H
#define MC__SEARCH_H #define MC__SEARCH_H
#include <config.h>
#include "../src/global.h" /* <glib.h> */
/*** typedefs(not structures) and defined constants **********************************************/ /*** typedefs(not structures) and defined constants **********************************************/
typedef int (*mc_search_fn) (const void *user_data, gsize char_offset); typedef int (*mc_search_fn) (const void *user_data, gsize char_offset);