diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 10 | ||||
-rw-r--r-- | src/LYPrint.c | 3 | ||||
-rw-r--r-- | src/makefile.in | 6 |
3 files changed, 14 insertions, 5 deletions
diff --git a/src/GridText.c b/src/GridText.c index 0c4290f5..433b86b2 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -355,8 +355,8 @@ PUBLIC HText * HText_new ARGS1( self->state = S_text; self->kanji_buf = '\0'; self->in_sjis = 0; - self->have_8bit_chars = NO; #ifdef EXP_CHARTRANS + self->have_8bit_chars = NO; HText_getChartransInfo(self); UCSetTransParams(&self->T, self->UCLYhndl, self->UCI, @@ -2252,8 +2252,10 @@ check_IgnoreExcess: ch = ' '; } +#ifdef EXP_CHARTRANS if (ch & 0x80) text->have_8bit_chars = YES; +#endif { HTLine * line = text->last_line; /* May have changed */ @@ -4911,6 +4913,7 @@ PUBLIC char * HTLoadedDocumentCharset NOARGS return (NULL); } +#ifdef EXP_CHARTRANS PUBLIC BOOL HTLoadedDocumentEightbit NOARGS { if (!HTMainText) @@ -4918,6 +4921,7 @@ PUBLIC BOOL HTLoadedDocumentEightbit NOARGS else return (HTMainText->have_8bit_chars); } +#endif PUBLIC void HText_setNodeAnchorBookmark ARGS1( CONST char *, bookmark) @@ -4976,9 +4980,11 @@ PRIVATE int HText_TrueLineSize ARGS3( if (IgnoreSpaces) { for (i = 0; i < line->size; i++) { if (!IsSpecialAttrChar((unsigned char)line->data[i]) && +#ifdef EXP_CHARTRANS (!(text && text->T.output_utf8) || (unsigned char)line->data[i] < 128 || ((unsigned char)(line->data[i] & 0xc0) == 0xc0)) && +#endif !isspace((unsigned char)line->data[i]) && (unsigned char)line->data[i] != HT_NON_BREAK_SPACE && (unsigned char)line->data[i] != HT_EM_SPACE) { @@ -7021,11 +7027,13 @@ PUBLIC BOOL HText_hasNoCacheSet ARGS1( return ((text && text->no_cache) ? TRUE : FALSE); } +#ifdef EXP_CHARTRANS PUBLIC BOOL HText_hasUTF8OutputSet ARGS1( HText *, text) { return ((text && text->T.output_utf8) ? TRUE : FALSE); } +#endif /* ** Check charset and set the kcode element. - FM diff --git a/src/LYPrint.c b/src/LYPrint.c index 58d0b1a1..0bd554ae 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -584,8 +584,8 @@ PUBLIC int printfile ARGS1( * if the document has 8-bit characters and we we seem * to have a valid charset. - kw */ - use_cte = HTLoadedDocumentEightbit(); #ifdef EXP_CHARTRANS + use_cte = HTLoadedDocumentEightbit(); disp_charset = LYCharSet_UC[current_char_set].MIMEname; /* * Don't send a charset if we have a CJK character set @@ -597,6 +597,7 @@ PUBLIC int printfile ARGS1( disp_charset = NULL; } #else + use_cte = NO; disp_charset = NULL; #endif /* EXP_CHARTRANS */ use_type = (disp_charset || HTisDocumentSource()); diff --git a/src/makefile.in b/src/makefile.in index f8b4e7af..8b2a14db 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -25,7 +25,7 @@ LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \ HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \ LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \ LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \ -LYStyle.o LYHash.o $(CHARTRANS_OBJS) +LYStyle.o LYHash.o @EXTRA_OBJS@ all: lynx @@ -39,9 +39,9 @@ all: lynx @SHOW_CC@ @ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@ -lynx: message do_chartrans_stuff $(OBJS) $(WWWLIB) +lynx: message @EXTRA_DEPS@ $(OBJS) $(WWWLIB) @echo "Linking and creating Lynx executable" - $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS) + $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(LIBS) @echo "Copying Lynx executable into this directory" cp lynx .. @echo "Welcome to Lynx!" |