[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH][dev19] Fix for Sun's cc
From: |
John Bley |
Subject: |
lynx-dev [PATCH][dev19] Fix for Sun's cc |
Date: |
Sat, 13 Mar 1999 12:21:03 -0500 (EST) |
It always bothered me that I couldn't compile lynx with
Sun's "cc: SC4.0 18 Oct 1995 C 4.0" default compiler, so I decided to
find out why it wasn't working. Turns out that gcc will let you
initialize a static struct inline with a function call, but Sun's
compiler won't. I'm not sure what the standard says, but, hey, this
works with both of them.
The variable names were arbitrarily and somewhat poorly chosen.
--
John Bley - address@hidden
Duke '99 - English/Computer Science
Since English is a mess, it maps well onto the problem space,
which is also a mess, which we call reality. - Larry Wall
diff -Burp lynx2-8-2/src/UCdomap.h lynx2-8-2-patched/src/UCdomap.h
--- lynx2-8-2/src/UCdomap.h Thu Mar 4 05:39:45 1999
+++ lynx2-8-2-patched/src/UCdomap.h Sat Mar 13 12:09:27 1999
@@ -57,6 +57,8 @@ extern int UCNumCharsets;
extern void UCInit NOARGS;
+static struct unimapdesc_str default_unimapdesc_str = {0,NULL,0,1};
+static struct unimapdesc_str another_default_unimapdesc_str = {0,NULL,0,0};
/*
* INSTRUCTIONS for adding new character sets which do not have
@@ -78,29 +80,29 @@ extern void UCInit NOARGS;
* what is output to the terminal. - KW
*/
#define UC_CHARSET_SETUP_euc_cn UC_Charset_Setup("euc-cn","Chinese",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+ NULL,NULL,0,default_unimapdesc_str,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_euc_jp UC_Charset_Setup("euc-jp","Japanese (EUC-JP)",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+ NULL,NULL,0,default_unimapdesc_str,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_shift_jis UC_Charset_Setup("shift_jis","Japanese
(Shift_JIS)",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+ NULL,NULL,0,default_unimapdesc_str,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_euc_kr UC_Charset_Setup("euc-kr","Korean",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+ NULL,NULL,0,default_unimapdesc_str,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_big5 UC_Charset_Setup("big5","Taipei (Big5)",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+ NULL,NULL,0,default_unimapdesc_str,\
128,UCT_ENC_CJK,0)
/*
* Placeholder for non-translation mode. - FM
*/
#define UC_CHARSET_SETUP_x_transparent
UC_Charset_Setup("x-transparent","Transparent",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,0},\
+ NULL,NULL,0,another_default_unimapdesc_str,\
128,1,0)
#define UC_CHARSET_SETUP_utf_8 UC_Charset_Setup("utf-8","UNICODE (UTF-8)",\
- NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,0},\
+ NULL,NULL,0,another_default_unimapdesc_str,\
128,UCT_ENC_UTF8,0)
- lynx-dev [PATCH][dev19] Fix for Sun's cc,
John Bley <=