fix build problem

This commit is contained in:
Fumitoshi UKAI
2003-09-22 21:27:42 +00:00
parent 604c11affe
commit b0754b366a
4 changed files with 21 additions and 19 deletions

View File

@@ -166,7 +166,7 @@ wctarget:
RANLIB='$(RANLIB)' RANLIB='$(RANLIB)'
dummy.o: entity.c dummy.o: entity.c
$(CC) $(CFLAGS) -DDUMMY -o $@ $? $(CC) $(CFLAGS) -DDUMMY -c -o $@ $?
$(IMGDISPLAY): w3mimgdisplay.o $(IMGOBJS) $(IMGDISPLAY): w3mimgdisplay.o $(IMGOBJS)
$(CC) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o $(IMGOBJS) $(LDFLAGS) $(LIBS) $(IMGLDFLAGS) $(CC) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o $(IMGOBJS) $(LDFLAGS) $(LIBS) $(IMGLDFLAGS)

View File

@@ -1,4 +1,4 @@
/* $Id: entity.c,v 1.5 2003/09/22 21:02:18 ukai Exp $ */ /* $Id: entity.c,v 1.6 2003/09/22 21:27:42 ukai Exp $ */
#ifdef DUMMY #ifdef DUMMY
#include "Str.h" #include "Str.h"
#define NBSP " " #define NBSP " "
@@ -62,5 +62,5 @@ conv_entity(unsigned int c)
} }
#endif #endif
#endif #endif
return p ? p : "?"; return "?";
} }

25
menu.c
View File

@@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.34 2003/09/22 21:02:20 ukai Exp $ */ /* $Id: menu.c,v 1.35 2003/09/22 21:27:42 ukai Exp $ */
/* /*
* w3m menu.c * w3m menu.c
*/ */
@@ -1678,6 +1678,9 @@ interpret_menu(FILE * mf)
char *p, *s; char *p, *s;
int in_menu = 0, nmenu = 0, nitem = 0, type; int in_menu = 0, nmenu = 0, nitem = 0, type;
MenuItem *item = NULL; MenuItem *item = NULL;
#ifdef USE_M17N
wc_ces charset = SystemCharset;
#endif
while (!feof(mf)) { while (!feof(mf)) {
line = Strfgets(mf); line = Strfgets(mf);
@@ -1718,6 +1721,14 @@ interpret_menu(FILE * mf)
nitem = 0; nitem = 0;
item[nitem].type = MENU_END; item[nitem].type = MENU_END;
} }
#ifdef USE_M17N
else if (!strcmp(s, "charset") || !strcmp(s, "encoding")) {
s = getQWord(&p);
if (*s == '\0') /* error */
continue;
charset = wc_guess_charset(s, charset);
}
#endif
} }
} }
@@ -1726,9 +1737,6 @@ initMenu(void)
{ {
FILE *mf; FILE *mf;
MenuList *list; MenuList *list;
#ifdef USE_M17N
wc_ces charset = SystemCharset;
#endif
w3mMenuList = New_N(MenuList, 3); w3mMenuList = New_N(MenuList, 3);
w3mMenuList[0].id = "Main"; w3mMenuList[0].id = "Main";
@@ -1744,6 +1752,7 @@ initMenu(void)
#ifdef USE_M17N #ifdef USE_M17N
if (!MainMenuEncode) { if (!MainMenuEncode) {
MenuItem *item;
for (item = MainMenuItem; item->type != MENU_END; item++) for (item = MainMenuItem; item->type != MENU_END; item++)
item->label = item->label =
wc_conv(item->label, MainMenuCharset, InnerCharset)->ptr; wc_conv(item->label, MainMenuCharset, InnerCharset)->ptr;
@@ -1938,14 +1947,6 @@ accesskey_menu(Buffer *buf)
ap[n] = a; ap[n] = a;
n++; n++;
} }
#ifdef USE_M17N
else if (!strcmp(s, "charset") || !strcmp(s, "encoding")) {
s = getQWord(&p);
if (*s == '\0') /* error */
continue;
charset = wc_guess_charset(s, charset);
}
#endif
} }
label[nitem] = NULL; label[nitem] = NULL;

9
rc.c
View File

@@ -1,9 +1,10 @@
/* $Id: rc.c,v 1.87 2003/09/22 21:02:20 ukai Exp $ */ /* $Id: rc.c,v 1.88 2003/09/22 21:27:42 ukai Exp $ */
/* /*
* Initialization file etc. * Initialization file etc.
*/ */
#include "fm.h" #include "fm.h"
#include "myctype.h" #include "myctype.h"
#include "proto.h"
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include "parsetag.h" #include "parsetag.h"
@@ -1507,7 +1508,7 @@ to_str(struct param_ptr *p)
Buffer * Buffer *
load_option_panel(void) load_option_panel(void)
{ {
Str str; Str src;
struct param_ptr *p; struct param_ptr *p;
struct sel_c *s; struct sel_c *s;
#ifdef USE_M17N #ifdef USE_M17N
@@ -1519,8 +1520,8 @@ load_option_panel(void)
if (optionpanel_str == NULL) if (optionpanel_str == NULL)
optionpanel_str = Sprintf(optionpanel_src1, w3m_version, optionpanel_str = Sprintf(optionpanel_src1, w3m_version,
html_quote(Local_cookie->ptr), CMT_HELPER); html_quote(localCookie()->ptr), CMT_HELPER);
#ifdef LANG == JA #if LANG == JA
if (!OptionEncode) { if (!OptionEncode) {
optionpanel_str = optionpanel_str =
wc_Str_conv(optionpanel_str, OptionCharset, InnerCharset); wc_Str_conv(optionpanel_str, OptionCharset, InnerCharset);