[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev more chartrans patch
From: |
Leonid Pauzner |
Subject: |
lynx-dev more chartrans patch |
Date: |
Sun, 28 Feb 1999 16:22:42 +0300 (MSK) |
This is a minore patch based on discussion with KW,
in addition to my previous one.
Also trace log header now always inform us about
anonymous restrictions set (IMHO for adminisrator,
a restricted user hardly have shell access to see the log file).
diff -u old/lycharse.c ./lycharse.c
--- old/lycharse.c Thu Feb 25 09:42:06 1999
+++ ./lycharse.c Sun Feb 28 16:06:06 1999
@@ -331,7 +331,7 @@
*/
PUBLIC CONST char ** LYCharSets[MAXCHARSETS]={
ISO_Latin1, /* ISO Latin 1 */
- SevenBitApproximations, /* ISO 8859-15 (Latin 9)*/
+ SevenBitApproximations, /* 7 Bit Approximations */
};
/*
@@ -340,7 +340,7 @@
*/
PUBLIC CONST char * LYchar_set_names[MAXCHARSETS + 1]={
"Western (ISO-8859-1)",
- "Western (ISO-8859-15)",
+ "7 bit approximations (US-ASCII)",
(char *) 0
};
@@ -368,7 +368,11 @@
/*
* Placeholders for Unicode tables. - FM
*/
- {-1,"iso-8859-15", UCT_ENC_8BIT,0,0,0, UCT_R_8BIT,UCT_R_ASCII},
+ {-1,"us-ascii", UCT_ENC_7BIT,0,
+ UCT_REP_SUBSETOF_LAT1,
+ UCT_CP_SUBSETOF_LAT1, UCT_R_ASCII,UCT_R_ASCII},
+
+/* {-1,"iso-8859-15", UCT_ENC_8BIT,0,0,0, UCT_R_8BIT,UCT_R_ASCII}, */
};
@@ -382,7 +386,7 @@
*/
PUBLIC int LYlowest_eightbit[MAXCHARSETS]={
160, /* ISO Latin 1 */
- 160, /* ISO 8859-15 (Latin 9)*/
+ 999, /* 7 bit approximations */
};
diff -u old/ucdomap.c ./ucdomap.c
--- old/ucdomap.c Thu Feb 25 10:21:00 1999
+++ ./ucdomap.c Sun Feb 28 15:52:10 1999
@@ -783,6 +783,12 @@
PUBLIC int UCLYhndl_for_unspec = -1;
PUBLIC int UCLYhndl_for_unrec = -1;
+ /* easy to type, will initialize later */
+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") */
+
+
PRIVATE int UC_con_set_unimap ARGS2(
int, UC_charset_out_hndl,
int, update_flag)
@@ -2082,6 +2088,11 @@
* To add synonyms for any charset name
* check function UCGetLYhndl_byMIME in this file.
*/
+
+/* easy to type: */
+ LATIN1 = UCGetLYhndl_byMIME("iso-8859-1");
+ US_ASCII = UCGetLYhndl_byMIME("us-ascii");
+ UTF8 = UCGetLYhndl_byMIME("utf-8");
}
/*
diff -u old/ucmap.h ./ucmap.h
--- old/ucmap.h Thu Sep 17 03:43:48 1998
+++ ./ucmap.h Sun Feb 28 14:44:42 1999
@@ -45,8 +45,9 @@
extern int UCLYhndl_HTFile_for_unrec;
/* easy to type: */
-#define LATIN1 UCGetLYhndl_byMIME("iso-8859-1")
-#define US_ASCII UCGetLYhndl_byMIME("us-ascii")
+extern int LATIN1; /* UCGetLYhndl_byMIME("iso-8859-1") */
+extern int US_ASCII; /* UCGetLYhndl_byMIME("us-ascii") */
+extern int UTF8; /* UCGetLYhndl_byMIME("utf-8") */
/*
In general, Lynx translates letters from document charset to display charset.
diff -u old/ucaux.c ./ucaux.c
--- old/ucaux.c Thu Feb 25 09:57:30 1999
+++ ./ucaux.c Sun Feb 28 15:44:50 1999
@@ -1,6 +1,7 @@
#include <HTUtils.h>
#include <HTCJK.h>
+#include <UCMap.h>
#include <UCDefs.h>
#include <HTStream.h>
#include <UCAux.h>
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Fri Feb 19 16:24:22 1999
+++ ./lymain.c Sun Feb 28 14:23:14 1999
@@ -1122,14 +1122,6 @@
LYOpenTraceLog();
/*
- * If TRACE is on, indicate whether the
- * anonymous restrictions are set. - FM
- */
- if (LYRestricted) {
- CTRACE(tfp, "LYMain: Anonymous restrictions set.\n");
- }
-
- /*
* Set up the default jump file stuff. - FM
*/
StrAllocCopy(jumpprompt, JUMP_PROMPT);
diff -u old/lymainlo.c ./lymainlo.c
--- old/lymainlo.c Fri Feb 19 16:24:24 1999
+++ ./lymainlo.c Sun Feb 28 14:31:28 1999
@@ -168,6 +168,13 @@
fflush(stdout);
fflush(stderr);
fprintf(tfp, "\t\t%s (%s)\n\n", LYNX_TRACELOG_TITLE, LYNX_VERSION);
+ /*
+ * If TRACE is on, indicate whether the
+ * anonymous restrictions are set. - FM
+ */
+ if (LYRestricted) {
+ CTRACE(tfp, "Anonymous restrictions are set.\n");
+ }
}
return TRUE;
}
- lynx-dev more chartrans patch,
Leonid Pauzner <=