lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev YA EBCDIC Patch - LY_BOLD_START_CHAR


From: pg
Subject: lynx-dev YA EBCDIC Patch - LY_BOLD_START_CHAR
Date: Mon, 8 Mar 1999 15:38:26 -0700 (MST)

Ouch!  I just discovered that the EBCDIC's HT character, '\005',
is used by Lynx as LY_BOLD_START_CHAR.  I believe the safest way
to fix this is to continue to use '\005' in ASCII, and use ASCII's
HT character as LY_BOLD_START_CHAR for EBCDIC platforms, because
the ASCII HT is unlikely to have been so overloaded on ASCII
platforms.

This change should have no effect on ASCII platforms.  Well, almost;
I noticed that the argument to macro IsSpecialAttrChar was not safely
bracketed and fixed it.  I hope no code counted on its being
unbracketed.

<sigh>

-- gil
==============================================================
* Undo overlaying of EBCDIC tab by LY_BOLD_START_CHAR in GridText.h - PG

%%% Created Mon Mar  8 15:26:50 MST 1999 by target lynx.patch. %%%
diff -bru orig/lynx2-8-2/src/GridText.h lynx2-8-2/src/GridText.h
--- orig/lynx2-8-2/src/GridText.h       Thu Mar  4 03:39:45 1999
+++ lynx2-8-2/src/GridText.h    Mon Mar  8 15:13:31 1999
@@ -18,14 +18,27 @@
 #endif /* !HT_EM_SPACE */
 #define LY_UNDERLINE_START_CHAR        '\003'
 #define LY_UNDERLINE_END_CHAR  '\004'
+
+/* Turn about is fair play ASCII platforms use EBCDIC tab;
+   EBCDIC platforms use ASCII tab for LY_BOLD_START_CHAR.
+*/
+#ifdef EBCDIC
+#define LY_BOLD_START_CHAR     '\011'
+#else
 #define LY_BOLD_START_CHAR     '\005'
+#endif
+
 #define LY_BOLD_END_CHAR       '\006'
 #ifndef LY_SOFT_HYPHEN
 #define LY_SOFT_HYPHEN         ((char)7)
 #endif /* !LY_SOFT_HYPHEN */
 #define LY_SOFT_NEWLINE        ((char)8)
 
-#define IsSpecialAttrChar(a)  ((a > '\002') && (a <= '\010'))
+#ifdef EBCDIC
+#define IsSpecialAttrChar(a)  (((a) > '\002') && ((a) <= '\011') && 
((a)!='\t'))
+#else
+#define IsSpecialAttrChar(a)  (((a) > '\002') && ((a) <= '\010'))
+#endif
 
 #define TABSTOP 8
 #define SPACES  "        "  /* must be at least TABSTOP spaces long */

reply via email to

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