lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev patch: minore chartrans tweak


From: Leonid Pauzner
Subject: lynx-dev patch: minore chartrans tweak
Date: Tue, 12 Oct 1999 16:07:15 +0400 (MSD)

* tweak CJK_EX code for incorrect x-transparent charset handler -
  it now depends on --with-charsets=  configure flag.
* tweak comments in UCDomap.c to be consistent with KW changes as of 2.8.3dev7



diff -u old/lymainlo.c ./lymainlo.c
--- old/lymainlo.c      Sat Oct  9 20:20:42 1999
+++ ./lymainlo.c        Tue Oct 12 15:38:20 1999
@@ -44,14 +44,12 @@
 extern HTCJKlang HTCJK;
 extern char *string_short(char *str, int cut_pos);     /* LYExtern.c */

-#define CHARSET_TRANS 14       /* "Transparent" in LYCharSets.c */
-
 PUBLIC char *str_kcode(HTkcode code)
 {
     char *p;
     static char buff[8];

-    if (current_char_set == CHARSET_TRANS) {
+    if (current_char_set == TRANSPARENT) {
        p = "THRU";
     } else if (!LYRawMode) {
        p = "RAW";
diff -u old/ucmap.h ./ucmap.h
--- old/ucmap.h Wed May 12 19:06:06 1999
+++ ./ucmap.h   Tue Oct 12 15:39:32 1999
@@ -50,6 +50,7 @@
 extern int LATIN1;     /* UCGetLYhndl_byMIME("iso-8859-1") */
 extern int US_ASCII;   /* UCGetLYhndl_byMIME("us-ascii")   */
 extern int UTF8;       /* UCGetLYhndl_byMIME("utf-8")      */
+extern int TRANSPARENT;       /* UCGetLYhndl_byMIME("x-transparent")  */

 /*
 In general, Lynx translates letters from document charset to display charset.

diff -u old/ucdomap.c ./ucdomap.c
--- old/ucdomap.c       Thu Oct  7 12:43:26 1999
+++ ./ucdomap.c Tue Oct 12 15:33:44 1999
@@ -491,8 +491,6 @@
     }
     /*
      * The font is always 256 characters - so far.
-     *  (this function preserved by num_uni==0 so unicount=NULL for built-in
-     *  charsets like CJK or x-transparent should not be a problem?)
      */
     con_clear_unimap();
 #endif
@@ -755,7 +753,6 @@

     /*
      * The default font is always 256 characters.
-     *  (default font can not be a fake one, so unicout!=NULL for sure.)
      */
     con_clear_unimap(1);

@@ -790,6 +787,7 @@
 PUBLIC int LATIN1 = -1;        /* UCGetLYhndl_byMIME("iso-8859-1") */
 PUBLIC int US_ASCII = -1;      /* UCGetLYhndl_byMIME("us-ascii")   */
 PUBLIC int UTF8 = -1;          /* UCGetLYhndl_byMIME("utf-8")      */
+PUBLIC int TRANSPARENT = -1;   /* UCGetLYhndl_byMIME("x-transparent")  */


 PRIVATE int UC_con_set_unimap ARGS2(
@@ -813,11 +811,10 @@

     /*
      * The font is always 256 characters - so far.
-     *  (fake 0 for built-in charsets like CJK or x-transparent, add a check)
      */
     con_clear_unimap(0);

-    for (i = 0; i < 256 && UCInfo[UC_charset_out_hndl].unicount != NULL; i++) {
+    for (i = 0; i < 256; i++) {
        for (j = UCInfo[UC_charset_out_hndl].unicount[i]; j; j--) {
            con_insert_unipair(*(p++), (u16)i, 0);
        }
@@ -2235,15 +2232,16 @@
  *  check function UCGetLYhndl_byMIME in this file.
  */

-/* easy to type: */
+/* for coding/performance - easy to type: */
     LATIN1   = UCGetLYhndl_byMIME("iso-8859-1");
     US_ASCII = UCGetLYhndl_byMIME("us-ascii");
     UTF8     = UCGetLYhndl_byMIME("utf-8");
+    TRANSPARENT     = UCGetLYhndl_byMIME("x-transparent");
 }

 /*
  *  Safe variant of UCGetLYhndl_byMIME, with blind recovery from typo
- *  in user input: lynx.cfg, userdefs.h, switches from command line.
+ *  in user input: lynx.cfg, userdefs.h, command line switches.
  */
 PUBLIC int safeUCGetLYhndl_byMIME ARGS1 (CONST char *, value)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]