diff options
Diffstat (limited to 'src')
87 files changed, 16619 insertions, 495 deletions
diff --git a/src/GridText.c b/src/GridText.c index 28f23420..ef0c7de5 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -28,6 +28,13 @@ #include "LYMail.h" #include "LYList.h" #include "LYCharSets.h" +#ifdef EXP_CHARTRANS +#include "UCDefs.h" +#include "UCAux.h" +#ifdef EXP_CHARTRANS_AUTOSWITCH +#include "UCAuto.h" +#endif /* EXP_CHARTRANS_AUTOSWITCH */ +#endif /* EXP_CHARTRANS */ #include "LYexit.h" #include "LYLeaks.h" @@ -153,6 +160,11 @@ struct _HText { HTStream* target; /* Output stream */ HTStreamClass targetClass; /* Output routines */ +#ifdef EXP_CHARTRANS + LYUCcharset * UCI; /* pointer to node_anchor's UCInfo */ + int UCLYhndl; /* tells us what charset we are fed */ + UCTransParams T; +#endif }; /* @@ -182,7 +194,22 @@ PRIVATE HTStyle default_style = PRIVATE HTList * loaded_texts = NULL; /* A list of all those in memory */ PUBLIC HTList * search_queries = NULL; /* isindex and whereis queries */ PRIVATE void free_all_texts NOARGS; -PRIVATE int HText_TrueLineSize PARAMS((HTLine *line)); +PRIVATE int HText_TrueLineSize PARAMS((HTLine *line, HText *text)); + +#ifdef EXP_CHARTRANS +PRIVATE void htext_get_chartrans_info ARGS1(HText *, me) +{ + me->UCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor,UCT_STAGE_HTEXT); + if (me->UCLYhndl < 0) { + int chndl = current_char_set; + HTAnchor_setUCInfoStage(me->node_anchor, chndl, UCT_STAGE_HTEXT, + UCT_SETBY_STRUCTURED); + me->UCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor, + UCT_STAGE_HTEXT); + } + me->UCI = HTAnchor_getUCInfoStage(me->node_anchor,UCT_STAGE_HTEXT); +} +#endif /* EXP_CHARTRANS */ /* Creation Method ** --------------- @@ -276,6 +303,14 @@ PUBLIC HText * HText_new ARGS1( self->kanji_buf = '\0'; self->in_sjis = 0; +#ifdef EXP_CHARTRANS + htext_get_chartrans_info(self); + UCSetTransParams(&self->T, + self->UCLYhndl, self->UCI, + current_char_set, + &LYCharSet_UC[current_char_set]); +#endif /* EXP_CHARTRANS */ + /* * Check the kcode setting if the anchor has a charset element. - FM */ @@ -289,7 +324,6 @@ PUBLIC HText * HText_new ARGS1( * if the underline is not filled with dots. */ if (underscore_string[0] != '.') { - char *p; /* * Create and array of dots for the UNDERSCORES macro. - FM */ @@ -427,6 +461,12 @@ PUBLIC void HText_free ARGS1( * if it is not a destination of other links. - FM */ if (self->node_anchor) { +#ifdef EXP_CHARTRANS + HTAnchor_resetUCInfoStage(self->node_anchor, -1, UCT_STAGE_STRUCTURED, + UCT_SETBY_NONE); + HTAnchor_resetUCInfoStage(self->node_anchor, -1, UCT_STAGE_HTEXT, + UCT_SETBY_NONE); +#endif /* EXP_CHARTRANS */ HTAnchor_delete(self->node_anchor); } @@ -441,12 +481,16 @@ PUBLIC void HText_free ARGS1( /* Output a line ** ------------- */ -PRIVATE int display_line ARGS1( - HTLine *, line) +PRIVATE int display_line ARGS2( + HTLine *, line, + HText *, text) { register int i,j; - char buffer[3]; + char buffer[7]; char *data; +#ifdef EXP_CHARTRANS + int utf_extra = 0; +#endif buffer[0] = buffer[1] = buffer[2] = '\0'; clrtoeol(); @@ -517,6 +561,33 @@ PRIVATE int display_line ARGS1( } default: +#ifdef EXP_CHARTRANS + if (text->T.output_utf8 && !isascii(buffer[0])) { + if ((*buffer & 0xe0) == 0xc0) { + utf_extra = 1; + } else if ((*buffer & 0xf0) == 0xe0) { + utf_extra = 2; + } else if ((*buffer & 0xf8) == 0xf0) { + utf_extra = 3; + } else if ((*buffer & 0xfc) == 0xf8) { + utf_extra = 4; + } else if ((*buffer & 0xfe) == 0xfc) { + utf_extra = 5; + } else { /* garbage */ + utf_extra = 0; + } + if (strlen(data) < utf_extra) + utf_extra = 0; /* shouldn't happen */ + } + if (utf_extra) { + strncpy(&buffer[1], data, utf_extra); + buffer[utf_extra+1] = '\0'; + addstr(buffer); + buffer[1] = '\0'; + data += utf_extra; + utf_extra = 0; + } else +#endif /* EXP_CHARTRANS */ /* For CJK strings, by Masanobu Kimura */ if (HTCJK != NOCJK && !isascii(buffer[0])) { buffer[1] = *data; @@ -652,13 +723,17 @@ PRIVATE void display_page ARGS3( { HTLine * line = NULL; int i; - char *cp, tmp[3]; + char *cp, tmp[7]; int last_screen; TextAnchor *Anchor_ptr = NULL; FormInfo *FormInfo_ptr; BOOL display_flag = FALSE; HTAnchor *link_dest; static int last_nlinks = 0; +#ifdef EXP_CHARTRANS + int utf_found = 0; + static int charset_last_displayed = -1; +#endif /* EXP_CHARTRANS */ lynx_mode = NORMAL_LYNX_MODE; @@ -698,6 +773,25 @@ PRIVATE void display_page ARGS3( i++, line = line->next) /* Loop */ assert(line->next != NULL); +#ifdef EXP_CHARTRANS +#ifdef EXP_CHARTRANS_AUTOSWITCH +#ifdef LINUX + if (LYlowest_eightbit[current_char_set] <= 255 && + (current_char_set != charset_last_displayed) && + /* current_char_set has changed since last invocation, + and it's not just 7-bit. + Also we don't want to do this for -dump and -source etc. */ + LYCursesON) { + charset_last_displayed = current_char_set; + stop_curses(); + UCChangeTerminalCodepage(current_char_set, + &LYCharSet_UC[current_char_set]); + start_curses(); + } +#endif /* LINUX */ +#endif /* EXP_CHARTRANS_AUTOSWITCH */ +#endif /* EXP_CHARTRANS */ + /* * Check whether to force a screen clear to enable scrollback, * or as a hack to fix a reverse clear screen problem for some @@ -718,25 +812,45 @@ PRIVATE void display_page ARGS3( */ if (line) { for (i = 0; i < (display_lines); i++) { +#ifdef EXP_CHARTRANS + int len_needed; +#endif /* EXP_CHARTRANS */ assert(line != NULL); - display_line(line); + display_line(line, text); /* * If the target is on this line, underline it. */ if (strlen(target) > 0 && +#ifdef EXP_CHARTRANS + (case_sensitive ? + (cp = LYno_attr_mbcs_strstr(line->data, target, + text->T.output_utf8, + &len_needed)) != NULL : + (cp = LYno_attr_mbcs_case_strstr(line->data, target, + text->T.output_utf8, + &len_needed)) != NULL) && + ((int)line->offset + len_needed) < LYcols +#else (case_sensitive ? (cp = LYno_attr_char_strstr(line->data, target)) != NULL : (cp = LYno_attr_char_case_strstr(line->data, target)) != NULL) && ((int)(cp - (char *)line->data) + - (int)line->offset + strlen(target)) < LYcols) { + (int)line->offset + strlen(target)) < LYcols +#endif /* EXP_CHARTRANS */ + ) { int itmp = 0; int written = 0; int x_pos=(int)line->offset + (int)(cp - line->data); int len = strlen(target); +#ifdef EXP_CHARTRANS + int utf_extra = 0; +#endif /* EXP_CHARTRANS */ + start_bold(); + start_reverse(); start_underline(); /* underline string */ for (; written < len && (tmp[0] = line->data[itmp]) != '\0'; @@ -748,6 +862,35 @@ PRIVATE void display_page ARGS3( } else if (cp == &line->data[itmp]) { /* first character of target */ move(i+1, x_pos); +#ifdef EXP_CHARTRANS + if (text->T.output_utf8 && !isascii(tmp[0])) { + if ((*tmp & 0xe0) == 0xc0) { + utf_extra = 1; + } else if ((*tmp & 0xf0) == 0xe0) { + utf_extra = 2; + } else if ((*tmp & 0xf8) == 0xf0) { + utf_extra = 3; + } else if ((*tmp & 0xfc) == 0xf8) { + utf_extra = 4; + } else if ((*tmp & 0xfe) == 0xfc) { + utf_extra = 5; + } else { /* garbage */ + utf_extra = 0; + } + if (strlen(&line->data[1]) < utf_extra) + utf_extra = 0; /* shouldn't happen */ + } + if (utf_extra) { + strncpy(&tmp[1], &line->data[itmp+1], utf_extra); + tmp[utf_extra+1] = '\0'; + itmp += utf_extra; + addstr(tmp); + tmp[1] = '\0'; + written = written + utf_extra + 1; + utf_extra = 0; + utf_found++; + } else +#endif /* EXP_CHARTRANS */ if (HTCJK != NOCJK && !isascii(tmp[0])) { /* For CJK strings, by Masanobu Kimura */ tmp[1] = line->data[++itmp]; @@ -761,6 +904,35 @@ PRIVATE void display_page ARGS3( } else if (&line->data[itmp] > cp) { /* print all the other target chars */ +#ifdef EXP_CHARTRANS + if (text->T.output_utf8 && !isascii(tmp[0])) { + if ((*tmp & 0xe0) == 0xc0) { + utf_extra = 1; + } else if ((*tmp & 0xf0) == 0xe0) { + utf_extra = 2; + } else if ((*tmp & 0xf8) == 0xf0) { + utf_extra = 3; + } else if ((*tmp & 0xfc) == 0xf8) { + utf_extra = 4; + } else if ((*tmp & 0xfe) == 0xfc) { + utf_extra = 5; + } else { /* garbage */ + utf_extra = 0; + } + if (strlen(&line->data[1]) < utf_extra) + utf_extra = 0; /* shouldn't happen */ + } + if (utf_extra) { + strncpy(&tmp[1], &line->data[itmp+1], utf_extra); + tmp[utf_extra+1] = '\0'; + itmp += utf_extra; + addstr(tmp); + tmp[1] = '\0'; + written = written + utf_extra + 1; + utf_extra = 0; + utf_found++; + } else +#endif /* EXP_CHARTRANS */ if (HTCJK != NOCJK && !isascii(tmp[0])) { /* For CJK strings, by Masanobu Kimura */ tmp[1] = line->data[++itmp]; @@ -775,6 +947,8 @@ PRIVATE void display_page ARGS3( } stop_underline(); + stop_reverse(); + stop_bold(); move(i+2, 0); } @@ -945,7 +1119,12 @@ PRIVATE void display_page ARGS3( if (!display_flag) /* nothing on the page */ addstr("\n Document is empty"); - if (HTCJK != NOCJK || TRACE) { + + if (HTCJK != NOCJK || +#ifdef EXP_CHARTRANS + text->T.output_utf8 || +#endif /* EXP_CHARTRANS */ + TRACE) { /* for non-multibyte curses ;_; */ clearok(curscr, TRUE); } @@ -1144,6 +1323,10 @@ PRIVATE void split_line ARGS2( for (i = (plen - 1); i >= 0; i--) { if (p[i] == LY_BOLD_START_CHAR || p[i] == LY_BOLD_END_CHAR || +#ifdef EXP_CHARTRANS +#define IS_UTFEXTRA(ch) (text->T.output_utf8 && ((unsigned char)(ch)&0xc0) == 0x80) + IS_UTFEXTRA(p[i]) || +#endif /* EXP_CHARTRANS */ p[i] == LY_SOFT_HYPHEN) { ctrl_chars_on_this_line++; } @@ -1194,6 +1377,9 @@ PRIVATE void split_line ARGS2( *cp == LY_UNDERLINE_END_CHAR || *cp == LY_BOLD_START_CHAR || *cp == LY_BOLD_END_CHAR || +#ifdef EXP_CHARTRANS + IS_UTFEXTRA(*cp) || +#endif /* EXP_CHARTRANS */ *cp == LY_SOFT_HYPHEN) ctrl_chars_on_previous_line++; } @@ -1236,9 +1422,8 @@ PRIVATE void blank_lines ARGS2( if (!HText_LastLineSize(text)) { /* No text on current line */ HTLine * line = text->last_line->prev; while ((line != text->last_line) && - (HText_TrueLineSize(line) == 0)) { - if (newlines == 0) - break; + (HText_TrueLineSize(line, text) == 0)) { + if (newlines == 0) break; newlines--; /* Don't bother: already blank */ line = line->prev; } @@ -1319,6 +1504,10 @@ PUBLIC void HText_appendCharacter ARGS2( return; if ((unsigned char)ch == 155 && HTCJK == NOCJK) { /* octal 233 */ if (!HTPassHighCtrlRaw && +#ifdef EXP_CHARTRANS + !text->T.transp && !text->T.output_utf8 && + (155 < LYlowest_eightbit[current_char_set]) && +#endif /* EXP_CHARTRANS */ strncmp(LYchar_set_names[current_char_set], "IBM PC character set", 20) && strncmp(LYchar_set_names[current_char_set], @@ -1473,6 +1662,14 @@ PUBLIC void HText_appendCharacter ARGS2( } } +#ifdef EXP_CHARTRANS + if (IS_UTFEXTRA(ch)) { + line->data[line->size++] = ch; + line->data[line->size] = '\0'; + ctrl_chars_on_this_line++; + return; + } +#endif /* EXP_CHARTRANS */ /* * New Line. @@ -1984,6 +2181,11 @@ re_parse: if (anchor_ptr->line_pos > 0) { register int offset = 0, i = 0; for (; i < anchor_ptr->line_pos; i++) +#ifdef EXP_CHARTRANS + if (IS_UTFEXTRA(line_ptr->data[i])) + offset++; + else +#endif /* EXP_CHARTRANS */ if (IsSpecialAttrChar(line_ptr->data[i])) offset++; anchor_ptr->line_pos -= offset; @@ -3135,7 +3337,7 @@ PUBLIC int HText_LastLineSize ARGS1( { if (!text || !text->last_line || !text->last_line->size) return 0; - return HText_TrueLineSize(text->last_line); + return HText_TrueLineSize(text->last_line, text); } PUBLIC int HText_PreviousLineSize ARGS1( @@ -3147,11 +3349,10 @@ PUBLIC int HText_PreviousLineSize ARGS1( return 0; if (!(line = text->last_line->prev)) return 0; - return HText_TrueLineSize(line); + return HText_TrueLineSize(line, text); } -PRIVATE int HText_TrueLineSize ARGS1( - HTLine *, line) +PRIVATE int HText_TrueLineSize ARGS2(HTLine *,line, HText *,text) { int i, true_size = 0; @@ -3160,6 +3361,10 @@ PRIVATE int HText_TrueLineSize ARGS1( for (i = 0; i < line->size; i++) { if (!IsSpecialAttrChar(line->data[i])) { +#ifdef EXP_CHARTRANS + if (!text->T.output_utf8 || (unsigned char)line->data[i] < 128 || + ((unsigned char)(line->data[i] & 0xc0) == 0xc0)) +#endif /* EXP_CHARTRANS */ true_size++; } } @@ -3683,7 +3888,7 @@ PUBLIC int HText_beginInput ARGS2( I->checked = TRUE; } else { TextAnchor * b = text->first_anchor; - int i = 0; + int i2 = 0; while (b) { if (b->link_type == INPUT_ANCHOR && b->input_field->type == F_RADIO_TYPE && @@ -3694,11 +3899,11 @@ PUBLIC int HText_beginInput ARGS2( StrAllocCopy(b->input_field->orig_value, "0"); break; } - i++; + i2++; } } if (b == text->last_anchor) { - if (i == 0) + if (i2 == 0) I->checked = TRUE; break; } diff --git a/src/HTAlert.c b/src/HTAlert.c index 2d40ea51..246716e3 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -254,7 +254,6 @@ PUBLIC BOOL HTConfirmCookie ARGS6( CONST char *, value) { char message[256]; - HTList *hl; domain_entry *de; int ch, namelen, valuelen, space_free; diff --git a/src/HTFWriter.c b/src/HTFWriter.c index 58baaa9f..55e5d932 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -12,8 +12,12 @@ #include "tcp.h" #include "LYCurses.h" #include "HTFWriter.h" +#include "HTSaveToFile.h" #include "HTFormat.h" +#ifdef EXP_CHARTRANS +#include "UCDefs.h" +#endif /* EXP_CHARTRANS */ #include "HTAlert.h" #include "HTFile.h" #include "HTPlain.h" @@ -21,6 +25,9 @@ #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #include "LYStrings.h" #include "LYUtils.h" @@ -37,7 +44,8 @@ PUBLIC char * WWW_Download_File=NULL; /* contains the name of the temp file */ PUBLIC char LYCancelDownload=FALSE; /* exported to HTFormat.c in libWWW */ -extern char dump_output_immediately; /* if true dump to stdout and quit */ +/* Type mismatch found here - char != BOOLEAN - WSB */ +extern BOOLEAN dump_output_immediately; /* if true dump to stdout and quit */ #ifdef VMS extern BOOLEAN HadVMSInterrupt; /* flag from cleanup_sig() */ @@ -201,14 +209,28 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me) * HTLoadFile() to handle it. - FM */ StrAllocCopy(addr, "file://localhost"); +#ifdef DOSPATH + StrAllocCat(addr, "/"); + StrAllocCat(addr, HTDOS_wwwName(path)); +#else #ifdef VMS StrAllocCat(addr, HTVMS_wwwName(path)); #else StrAllocCat(addr, path); #endif /* VMS */ +#endif /* DOSPATH */ StrAllocCopy(me->anchor->FileCache, path); FREE(path); FREE(me->anchor->content_encoding); +#ifdef EXP_CHARTRANS + /* lock the chartrans info we may possibly have, + so HTCharSetFormat will not apply the default for + local files */ + HTAnchor_copyUCInfoStage(me->anchor, + UCT_STAGE_PARSER, + UCT_STAGE_MIME, + UCT_SETBY_PARSER); +#endif status = HTLoadFile(addr, me->anchor, me->output_format, @@ -271,7 +293,9 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me) if (me->anchor->FileCache) remove(me->anchor->FileCache); FREE(me); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -761,7 +785,7 @@ PUBLIC HTStream* HTCompressed ARGS3( char fnam[256]; CONST char *suffix; char *uncompress_mask = NULL; - char *compress_suffix; + char *compress_suffix = ""; char *cp; FILE *fp = NULL; diff --git a/src/HTInit.c b/src/HTInit.c index e5dff4e1..adc9a64e 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -594,7 +594,9 @@ PRIVATE int ExitWithError ARGS1(char *,txt) { if (txt) fprintf(stderr, "metamail: %s\n", txt); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); diff --git a/src/HTML.c b/src/HTML.c index b8aa4e0f..81cb1894 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -28,6 +28,11 @@ #include "LYGlobalDefs.h" #include "LYCharUtils.h" #include "LYCharSets.h" +#ifdef EXP_CHARTRANS +#include "UCMap.h" +#include "UCDefs.h" +#include "UCAux.h" +#endif #include "HTAlert.h" #include "HTFont.h" @@ -107,6 +112,13 @@ a sequence of styles. PRIVATE void actually_set_style ARGS1(HTStructured *, me) { if (!me->text) { /* First time through */ +#ifdef EXP_CHARTRANS + html_get_chartrans_info(me); + UCSetTransParams(&me->T, + me->UCLYhndl, me->UCI, + HTAnchor_getUCLYhndl(me->node_anchor,UCT_STAGE_HTEXT), + HTAnchor_getUCInfoStage(me->node_anchor,UCT_STAGE_HTEXT)); +#endif /* EXP_CHARTRANS */ me->text = HText_new2(me->node_anchor, me->target); HText_beginAppend(me->text); HText_setStyle(me->text, me->new_style); @@ -459,6 +471,9 @@ PRIVATE void HTML_start_element ARGS5( char *map_href = NULL; char *title = NULL; char *temp = NULL; +#ifdef EXP_CHARTRANS + int dest_char_set = -1; +#endif static BOOLEAN first_option = TRUE; /* is this the first option tag? */ HTParentAnchor *dest = NULL; /* an anchor's destination */ BOOL dest_ismap = FALSE; /* is dest an image map script? */ @@ -810,9 +825,9 @@ PRIVATE void HTML_start_element ARGS5( NULL, /* Tag */ href, /* Addresss */ (void *)0); /* Type */ - if (dest = HTAnchor_parent( + if ((dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) - )) { + )) != 0) { if (!HTAnchor_title(dest)) HTAnchor_setTitle(dest, title); dest = NULL; @@ -1399,8 +1414,7 @@ PRIVATE void HTML_start_element ARGS5( * The INDENT value is in "en" (enval per column) units. * Divide it by enval, rounding odd values up. - FM */ - target = - (int)((((float)atoi(value[HTML_TAB_INDENT]))/enval)+(0.5)); + target = ((1.0 * atoi(value[HTML_TAB_INDENT])) / enval) + 0.5; } /* * If we are being directed to a column too far to the left @@ -2115,7 +2129,7 @@ PRIVATE void HTML_start_element ARGS5( (present && present[HTML_A_TYPE] && value[HTML_A_TYPE]) ? - (HTLinkType*)HTAtom_for(value[HTML_A_TYPE]) : (HTLinkType*)0); /* Type */ + (HTLinkType*)HTAtom_for(value[HTML_A_TYPE]) : (HTLinkType *)0); /* Type */ /* * Get rid of href since no longer needed. @@ -2143,7 +2157,17 @@ PRIVATE void HTML_start_element ARGS5( } if (present[HTML_A_ISMAP]) dest_ismap = TRUE; +#ifdef EXP_CHARTRANS + if (present[HTML_A_CHARSET] && + value[HTML_A_CHARSET] && *value[HTML_A_CHARSET] != '\0') { + dest_char_set = UCGetLYhndl_byMIME(value[HTML_A_CHARSET]); + if (dest_char_set < 0) + dest_char_set = UCLYhndl_for_unrec; + } + if (title != NULL || dest_ismap == TRUE || dest_char_set >= 0) +#else if (title != NULL || dest_ismap == TRUE) +#endif /* EXP_CHARTRANS */ dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) ); @@ -2151,6 +2175,13 @@ PRIVATE void HTML_start_element ARGS5( HTAnchor_setTitle(dest, title); if (dest && dest_ismap) dest->isISMAPScript = TRUE; +#ifdef EXP_CHARTRANS + if (dest && dest_char_set >= 0) + HTAnchor_setUCInfoStage(dest, dest_char_set, + UCT_STAGE_PARSER, + UCT_SETBY_DEFAULT); + dest_char_set = -1; +#endif /* EXP_CHARTRANS */ dest = NULL; dest_ismap = FALSE; FREE(title); @@ -2170,9 +2201,9 @@ PRIVATE void HTML_start_element ARGS5( * which typically returns the image's default. - FM */ if (me->inA && me->CurrentA) { - if (dest = HTAnchor_parent( + if ((dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) - )) { + )) != 0) { if (dest->isISMAPScript == TRUE) { dest_ismap = TRUE; if (TRACE) @@ -2405,11 +2436,11 @@ PRIVATE void HTML_start_element ARGS5( HText_endAnchor(me->text); HText_appendCharacter(me->text, '-'); if (id_string) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } @@ -2420,9 +2451,9 @@ PRIVATE void HTML_start_element ARGS5( map_href, /* Addresss */ (void *)0); /* Type */ if (me->CurrentA && title) { - if (dest = HTAnchor_parent( + if ((dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) - )) { + )) != 0) { if (!HTAnchor_title(dest)) HTAnchor_setTitle(dest, title); } @@ -2446,11 +2477,11 @@ PRIVATE void HTML_start_element ARGS5( ((map_href || dest_ismap) ? "(IMAGE)" : "(OBJECT)") : "[IMAGE]")); if (id_string && !map_href) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } @@ -2459,11 +2490,11 @@ PRIVATE void HTML_start_element ARGS5( HTML_put_character(me, ' '); /* space char may be ignored */ me->in_word = NO; if (id_string) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } @@ -2474,9 +2505,9 @@ PRIVATE void HTML_start_element ARGS5( map_href, /* Addresss */ (void *)0); /* Type */ if (me->CurrentA && title) { - if (dest = HTAnchor_parent( + if ((dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) - )) { + )) != 0) { if (!HTAnchor_title(dest)) HTAnchor_setTitle(dest, title); } @@ -2500,11 +2531,11 @@ PRIVATE void HTML_start_element ARGS5( HTML_put_character(me, ' '); /* space char may be ignored */ me->in_word = NO; if (id_string) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } @@ -2539,9 +2570,7 @@ PRIVATE void HTML_start_element ARGS5( * We're in an anchor and have a USEMAP, so end the anchor * and start a new one for the client-side MAP. - FM */ - if (dest_ismap || (present && present[HTML_IMG_ISMAP])) { - HTML_put_string(me, "[ISMAP]"); - } else { + if (!(dest_ismap || (present && present[HTML_IMG_ISMAP]))) { HTML_put_string(me, "[LINK]"); } if (me->inBoldA == TRUE && me->inBoldH == FALSE) { @@ -2549,7 +2578,8 @@ PRIVATE void HTML_start_element ARGS5( } me->inBoldA = FALSE; HText_endAnchor(me->text); - HText_appendCharacter(me->text, '-'); + if (!(dest_ismap || (present && present[HTML_IMG_ISMAP]))) + HText_appendCharacter(me->text, '-'); } else { HTML_put_character(me, ' '); me->in_word = NO; @@ -2560,9 +2590,9 @@ PRIVATE void HTML_start_element ARGS5( map_href, /* Addresss */ (void *)0); /* Type */ if (me->CurrentA && title) { - if (dest = HTAnchor_parent( + if ((dest = HTAnchor_parent( HTAnchor_followMainLink((HTAnchor*)me->CurrentA) - )) { + )) != 0) { if (!HTAnchor_title(dest)) HTAnchor_setTitle(dest, title); } @@ -2591,11 +2621,11 @@ PRIVATE void HTML_start_element ARGS5( me->in_word = NO; } if (id_string) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } @@ -3402,11 +3432,27 @@ PRIVATE void HTML_start_element ARGS5( HTChildAnchor * source; HTAnchor *link_dest; + UPDATE_STYLE; /* - * Set to know we are in a form. + * FORM was declared SGML_EMPTY in HTMLDTD.c, and + * SGML_character() in SGML.c checks for a FORM end + * tag to call HTML_end_element() directly (with a + * check in that to bypass decrementing of the HTML + * parser's stack), so if we have an open FORM, close + * that one now. - FM + */ + if (me->inFORM) { + if (TRACE) { + fprintf(stderr, + "HTML: Missing FORM end tag. Faking it!\n"); + } + HTML_end_element(me, HTML_FORM, (char **)&include); + } + + /* + * Set to know we are in a new form. */ me->inFORM = TRUE; - UPDATE_STYLE; if (present && present[HTML_FORM_ACTION] && value[HTML_FORM_ACTION]) { @@ -3451,7 +3497,7 @@ PRIVATE void HTML_start_element ARGS5( NULL, action, (void *)0); - if (link_dest = HTAnchor_followMainLink((HTAnchor *)source)) { + if ((link_dest = HTAnchor_followMainLink((HTAnchor *)source)) != 0) { /* * Memory leak fixed. * 05-28-94 Lynx 2-3-1 Garrett Arch Blythe @@ -3562,7 +3608,7 @@ PRIVATE void HTML_start_element ARGS5( /* Check for unclosed TEXTAREA */ if (me->inTEXTAREA) { if (TRACE) { - fprintf(stderr, "HTML: Missing TEXTAREA end tag\n"); + fprintf(stderr, "HTML: Missing TEXTAREA end tag.\n"); } else if (!me->inBadHTML) { _statusline(BAD_HTML_USE_TRACE); me->inBadHTML = TRUE; @@ -4109,11 +4155,11 @@ PRIVATE void HTML_start_element ARGS5( if (present && present[HTML_OPTION_ID] && value[HTML_OPTION_ID] && *value[HTML_OPTION_ID]) { - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ value[HTML_OPTION_ID], /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); I.id = (char *)value[HTML_OPTION_ID]; @@ -4270,7 +4316,8 @@ PRIVATE void HTML_end_element ARGS3( char *temp = NULL, *cp = NULL; #ifdef CAREFUL /* parser assumed to produce good nesting */ - if (element_number != me->sp[0].tag_number) { + if (element_number != me->sp[0].tag_number && + HTML_dtd.tags[element_number].contents != SGML_EMPTY) { fprintf(stderr, "HTMLText: end of element %s when expecting end of %s\n", HTML_dtd.tags[element_number].name, @@ -4290,18 +4337,20 @@ PRIVATE void HTML_end_element ARGS3( } /* - * Pop state off stack. + * Pop state off stack if it's not a FORM end tag. - FM */ - if (me->sp < me->stack + MAX_NESTING+1) { - (me->sp)++; - if (TRACE) - fprintf(stderr, - "HTML:end_element: Popped style off stack - %s\n", - me->sp->style->name); - } else { - if (TRACE) - fprintf(stderr, + if (HTML_dtd.tags[element_number].contents != SGML_EMPTY) { + if (me->sp < me->stack + MAX_NESTING+1) { + (me->sp)++; + if (TRACE) + fprintf(stderr, + "HTML:end_element: Popped style off stack - %s\n", + me->sp->style->name); + } else { + if (TRACE) + fprintf(stderr, "Stack underflow error! Tried to pop off more styles than exist in stack\n"); + } } /* @@ -4725,11 +4774,10 @@ PRIVATE void HTML_end_element ARGS3( * Finish the data off. */ { - int s = 0, e = 0, n = 0; + int s = 0, e = 0; char *start = NULL, *first_end = NULL; BOOL have_param = FALSE; char *data = NULL; - HTPresentation *Pres; HTChunkTerminate(&me->object); data = me->object.data; @@ -4910,7 +4958,7 @@ PRIVATE void HTML_end_element ARGS3( if (TRACE) fprintf(stderr, "HTML: OBJECT has USEMAP. Converting to IMG.\n"); -Object_as_IMG: + StrAllocCat(*include, "<IMG ISOBJECT"); if (me->object_id != NULL) { /* @@ -5058,7 +5106,12 @@ End_Object: break; case HTML_FORM: - /* Make sure we had a form start tag. */ + /* + * Check if we had a FORM start tag, and issue a + * message if not, but fall through to ensure that + * the FORM-related globals in GridText.c are + * initialized. - FM + */ if (!me->inFORM) { if (TRACE) { fprintf(stderr, "HTML: Unmatched FORM end tag\n"); @@ -5067,12 +5120,6 @@ End_Object: me->inBadHTML = TRUE; sleep(MessageSecs); } - /* - * We probably did start a form, for which bad HTML - * caused a substitution, so we'll try to end. - * - break; - */ } /* @@ -5348,9 +5395,34 @@ End_Object: */ /* (In fact, they all shrink!) */ -PUBLIC void HTML_put_entity ARGS2(HTStructured *, me, int, entity_number) +PUBLIC int HTML_put_entity ARGS2(HTStructured *, me, int, entity_number) { - HTML_put_string(me, p_entity_values[entity_number]); + int nent = HTML_dtd.number_of_entities; + + if (entity_number < nent) { + HTML_put_string(me, p_entity_values[entity_number]); + return HT_OK; +#ifdef EXP_CHARTRANS + } else if (me->UCLYhndl < 0) { + return HT_CANNOT_TRANSLATE; + } else { + UCode_t uni = HTML_dtd.extra_entity_info[entity_number-nent].code; + int c_out = UCTransUniChar(uni, me->UCLYhndl); + if (c_out > 0) { + HTML_put_character(me, (char)c_out); + return HT_OK; + } else if (c_out==UCTRANS_NOTFOUND) { + char buf[21]; + int c_out2 = UCTransUniCharStr(buf,20, uni, me->UCLYhndl, NO); + if (c_out2 >= 0) { + HTML_put_string(me, buf); + return HT_OK; + } + } + return HT_CANNOT_TRANSLATE; +#endif /* EXP_CHARTRANS */ + } + return HT_OK; } /* Free an HTML object @@ -5364,16 +5436,40 @@ PUBLIC void HTML_put_entity ARGS2(HTStructured *, me, int, entity_number) ** If non-interactive, everything is freed off. No: crashes -listrefs ** Otherwise, the interactive object is left. */ -PUBLIC void HTML_free ARGS1(HTStructured *, me) +PRIVATE void HTML_free ARGS1(HTStructured *, me) { + char *include = NULL; + UPDATE_STYLE; /* Creates empty document here! */ if (me->comment_end) HTML_put_string(me, me->comment_end); if (me->text) { + /* + * Emphasis containers should have been closed via + * the SGML_free() wind-down, but let's play it + * safe. - FM + */ if (me->inUnderline) { HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR); me->inUnderline = FALSE; } + + /* + * FORM was declared SGML_EMPTY in HTMLDTD.c, and + * SGML_character() in SGML.c checks for a FORM end + * tag to call HTML_end_element() directly (with a + * check in that to bypass decrementing of the HTML + * parser's stack), so if we still have an open FORM, + * close it now. - FM + */ + if (me->inFORM) { + HTML_end_element(me, HTML_FORM, (char **)&include); + me->inFORM = FALSE; + } + + /* + * Now call the cleanup function. - FM + */ HText_endAppend(me->text); } @@ -5401,9 +5497,28 @@ PUBLIC void HTML_free ARGS1(HTStructured *, me) PRIVATE void HTML_abort ARGS2(HTStructured *, me, HTError, e) { + char *include = NULL; + if (me->text) { - if (me->inUnderline) + /* + * If we have an open emphasis container, close it now. - FM + */ + if (me->inUnderline) { HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR); + me->inUnderline = FALSE; + } + + /* + * If we have an open FORM container, close it now. - FM + */ + if (me->inFORM) { + HTML_end_element(me, HTML_FORM, (char **)&include); + me->inFORM = FALSE; + } + + /* + * Now call the cleanup function. - FM + */ HText_endAppend(me->text); } @@ -5542,7 +5657,9 @@ PUBLIC HTStructured* HTML_new ARGS3( return HTMLGenerator(intermediate); fprintf(stderr, "\n** Internal error: can't parse HTML to %s\n", HTAtom_name(format_out)); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -5676,6 +5793,11 @@ PUBLIC HTStructured* HTML_new ARGS3( me->comment_start = NULL; me->comment_end = NULL; +#ifdef EXP_CHARTRANS + html_get_chartrans_info(me); + + UCTransParams_clear(&me->T); +#endif /* EXP_CHARTRANS */ me->target = stream; if (stream) @@ -5694,7 +5816,7 @@ PUBLIC HTStream* HTMLToPlain ARGS3( HTParentAnchor *, anchor, HTStream *, sink) { - return SGML_new(&HTML_dtd, HTML_new(anchor, pres->rep_out, sink)); + return SGML_new(&HTML_dtd, anchor, HTML_new(anchor, pres->rep_out, sink)); } /* HTConverter for HTML to C code @@ -5716,7 +5838,7 @@ PUBLIC HTStream* HTMLToC ARGS3( html->comment_start = "/* "; html->comment_end = " */\n"; /* Must start in col 1 for cpp */ /* HTML_put_string(html,html->comment_start); */ - return SGML_new(&HTML_dtd, html); + return SGML_new(&HTML_dtd, anchor, html); } /* Presenter for HTML @@ -5732,7 +5854,7 @@ PUBLIC HTStream* HTMLPresent ARGS3( HTParentAnchor *, anchor, HTStream *, sink) { - return SGML_new(&HTML_dtd, HTML_new(anchor, WWW_PRESENT, NULL)); + return SGML_new(&HTML_dtd, anchor, HTML_new(anchor, WWW_PRESENT, NULL)); } #endif /* !GUI */ diff --git a/src/HTML.h b/src/HTML.h index c4bd3caf..ed3aefee 100644 --- a/src/HTML.h +++ b/src/HTML.h @@ -7,6 +7,11 @@ #ifndef HTML_H #define HTML_H +#ifdef EXP_CHARTRANS +#include "UCDefs.h" +#include "UCAux.h" +#endif + #ifndef HTUTILS_H #include "HTUtils.h" #endif /* HTUTILS_H */ @@ -132,6 +137,12 @@ struct _HTStructured { BOOL inUnderline; BOOL needBoldH; + +#ifdef EXP_CHARTRANS + LYUCcharset * UCI; /* pointer to node_anchor's UCInfo */ + int UCLYhndl; /* tells us what charset we are fed */ + UCTransParams T; +#endif }; struct _HTStream { @@ -145,7 +156,7 @@ struct _HTStream { extern void HTML_put_character PARAMS((HTStructured *me, char c)); extern void HTML_put_string PARAMS((HTStructured *me, CONST char *s)); extern void HTML_write PARAMS((HTStructured *me, CONST char *s, int l)); -extern void HTML_put_entity PARAMS((HTStructured *me, int entity_number)); +extern int HTML_put_entity PARAMS((HTStructured *me, int entity_number)); #endif /* Lynx_HTML_Handler */ /* P U B L I C diff --git a/src/LYBookmark.c b/src/LYBookmark.c index de1b8d07..79e61df9 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -12,6 +12,9 @@ #include "LYCurses.h" #include "GridText.h" +#ifdef DOSPATH +#include "HTDOS.h" +#endif #ifdef VMS #include "HTVMSUtils.h" #include <nam.h> @@ -46,9 +49,6 @@ PUBLIC char * get_bookmark_filename ARGS1( char string_buffer[256]; FILE *fp; int MBM_tmp; -#ifndef VMS - int len; -#endif /* !VMS */ /* * Multi_Bookmarks support. - FMG & FM @@ -115,21 +115,31 @@ success: is_mosaic_hotlist = TRUE; fclose(fp); newname = convert_mosaic_bookmark_file(filename_buffer); +#ifdef DOSPATH + sprintf(URL_buffer,"file://localhost/%s", + HTDOS_wwwName((char *)newname)); +#else #ifdef VMS sprintf(URL_buffer,"file://localhost%s", HTVMS_wwwName((char *)newname)); #else sprintf(URL_buffer,"file://localhost%s", newname); #endif /* VMS */ +#endif /* DOSPATH */ } else { fclose(fp); is_mosaic_hotlist = FALSE; +#ifdef DOSPATH + sprintf(URL_buffer,"file://localhost/%s", + HTDOS_wwwName((char *)filename_buffer)); +#else #ifdef VMS sprintf(URL_buffer,"file://localhost%s", HTVMS_wwwName((char *)filename_buffer)); #else sprintf(URL_buffer,"file://localhost%s", filename_buffer); #endif /* VMS */ +#endif /* DOSPATH */ } StrAllocCopy(*URL, URL_buffer); @@ -524,7 +534,9 @@ PUBLIC void remove_bookmark_link ARGS2( fp = NULL; fclose(nfp); nfp = NULL; - +#ifdef DOSPATH + remove(filename_buffer); +#endif /* DOSPATH */ if (rename(newfile, filename_buffer) != -1) { #ifdef VMS char VMSfilename[256]; @@ -548,7 +560,11 @@ PUBLIC void remove_bookmark_link ARGS2( * Check if this is the case and do something appropriate. * Used to be ODD_RENAME */ +#ifdef _WINDOWS + if (errno == ENOTSAM) { +#else if (errno == EXDEV) { +#endif /* WINDOWS */ char buffer[2048]; sprintf(buffer, "%s %s %s", MV_PATH, newfile, filename_buffer); system(buffer); @@ -663,12 +679,10 @@ get_advanced_choice: */ PUBLIC int select_menu_multi_bookmarks NOARGS { - FILE *fp; - int c, MBM_counter, MBM_tmp_count, MBM_allow; + int c, MBM_tmp_count, MBM_allow; int MBM_screens, MBM_from, MBM_to, MBM_current; char string_buffer[256]; char shead_buffer[256]; - char *cp, *cp1; /* * If not enabled, pick the "default" (0). diff --git a/src/LYBookmark.h b/src/LYBookmark.h index a776a81a..ee642be2 100644 --- a/src/LYBookmark.h +++ b/src/LYBookmark.h @@ -14,15 +14,5 @@ extern int select_menu_multi_bookmarks NOPARAMS; extern BOOLEAN LYHaveSubBookmarks NOPARAMS; extern void LYMBM_statusline PARAMS((char *text)); -#define BOOKMARK_TITLE "Bookmark file" -#define MOSAIC_BOOKMARK_TITLE "Converted Mosaic Hotlist" -#define MBM_V_MAXFILES 25 /* Max number of sub-bookmark files */ -/* - * Arrays that holds the names of sub-bookmark files - * and their descriptions. - */ -char *MBM_A_subbookmark[MBM_V_MAXFILES+1]; -char *MBM_A_subdescript[MBM_V_MAXFILES+1]; - #endif /* LYBOOKMARK_H */ diff --git a/src/LYCgi.c b/src/LYCgi.c index de6293ec..fce4596a 100644 --- a/src/LYCgi.c +++ b/src/LYCgi.c @@ -117,7 +117,7 @@ PUBLIC void add_lynxcgi_environment ARGS1( } } -PUBLIC int LYLoadCGI ARGS4( +PRIVATE int LYLoadCGI ARGS4( CONST char *, arg, HTParentAnchor *, anAnchor, HTFormat, format_out, diff --git a/src/LYCharSets.c b/src/LYCharSets.c index 5b243f35..6f3b7123 100644 --- a/src/LYCharSets.c +++ b/src/LYCharSets.c @@ -5,6 +5,9 @@ #include "LYGlobalDefs.h" #include "LYCharSets.h" #include "LYCharUtils.h" +#ifdef EXP_CHARTRANS +#include "UCMap.h" +#endif /* EXP_CHARTRANS */ #include "HTFont.h" #include "GridText.h" #include "LYCurses.h" @@ -20,6 +23,18 @@ extern HTCJKlang HTCJK; PUBLIC HTkcode kanji_code = NOKANJI; PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE; +#ifdef EXP_CHARTRANS +extern void UCInit NOARGS; +extern int UCInitialized; +#else +#ifndef MAX_CHARSETS +#define MAX_CHARSETS +#endif +#ifndef MAX_CHARSETSP +#define MAX_CHARSETSP +#endif +#endif /* EXP_CHARTRANS */ + /* INSTRUCTIONS for adding new character sets !!!! * * Make up a character set and add it in the same @@ -47,7 +62,7 @@ PRIVATE char * ISO_Latin1[] = { "\303", /* capital A, tilde - Atilde */ "\304", /* capital A, dieresis or umlaut mark - Auml */ "\307", /* capital C, cedilla - Ccedil */ - "\320", /* capital Eth, Icelandic - Dstrok */ + "\320", /* capital Eth or D with stroke - Dstrok */ "\320", /* capital Eth, Icelandic - ETH */ "\311", /* capital E, acute accent - Eacute */ "\312", /* capital E, circumflex accent - Ecirc */ @@ -166,8 +181,8 @@ PRIVATE char * ISO_Latin2[] = { "A", /* capital A, tilde - Atilde */ "\304", /* capital A, dieresis or umlaut mark - Auml */ "\307", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ - "DH", /* capital Eth, Icelandic - ETH */ + "\320", /* capital Eth or D with stroke - Dstrok */ + "\320", /* capital Eth, Icelandic - ETH */ "\311", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ "E", /* capital E, grave accent - Egrave */ @@ -289,7 +304,7 @@ PRIVATE char * ISO_LatinN[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -350,7 +365,7 @@ PRIVATE char * ISO_LatinN[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -428,7 +443,7 @@ PRIVATE char * DEC_Multinational[] = { "\303", /* capital A, tilde - Atilde */ "\304", /* capital A, dieresis or umlaut mark - Auml */ "\307", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "\311", /* capital E, acute accent - Eacute */ "\312", /* capital E, circumflex accent - Ecirc */ @@ -550,7 +565,7 @@ PRIVATE char * PC_charset[] = { "A", /* capital A, tilde - Atilde */ "\216", /* capital A, dieresis or umlaut mark - Auml */ "\200", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "\220", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -599,7 +614,7 @@ PRIVATE char * PC_charset[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic - eth */ + "dh", /* small eth, Icelandic - eth */ "\211", /* small e, dieresis or umlaut mark - euml */ "\253", /* fraction 1/2 (½) - frac12 */ "\254", /* fraction 1/4 (¼) - frac14 */ @@ -672,7 +687,7 @@ PRIVATE char * PC_850_charset[] = { "\307", /* capital A, tilde - Atilde */ "\216", /* capital A, dieresis or umlaut mark - Auml */ "\200", /* capital C, cedilla - Ccedil */ - "\321", /* capital Eth, Icelandic - Dstrok */ + "\321", /* capital Eth or D with stroke - Dstrok */ "\321", /* capital Eth, Icelandic - ETH */ "\220", /* capital E, acute accent - Eacute */ "\322", /* capital E, circumflex accent - Ecirc */ @@ -793,7 +808,7 @@ PRIVATE char * Macintosh[] = { "\314", /* capital A, tilde - Atilde */ "\200", /* capital A, dieresis or umlaut mark - Auml */ "\202", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "\203", /* capital E, acute accent - Eacute */ "\346", /* capital E, circumflex accent - Ecirc */ @@ -912,7 +927,7 @@ PRIVATE char * NeXT_Step[] = { "\204", /* capital A, tilde - Atilde */ "\205", /* capital A, dieresis or umlaut mark - Auml */ "\207", /* capital C, cedilla - Ccedil */ - "\220", /* capital Eth, Icelandic - Dstrok */ + "\220", /* capital Eth or D with stroke - Dstrok */ "\220", /* capital Eth, Icelandic - ETH */ "\211", /* capital E, acute accent - Eacute */ "\212", /* capital E, circumflex accent - Ecirc */ @@ -1036,7 +1051,7 @@ PRIVATE char * KOI8_R[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1097,7 +1112,7 @@ PRIVATE char * KOI8_R[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "\243", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1179,7 +1194,7 @@ PRIVATE char * Chinese[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1240,7 +1255,7 @@ PRIVATE char * Chinese[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1322,7 +1337,7 @@ PRIVATE char * EUC_JP[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1383,7 +1398,7 @@ PRIVATE char * EUC_JP[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1465,7 +1480,7 @@ PRIVATE char * Shift_JIS[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1526,7 +1541,7 @@ PRIVATE char * Shift_JIS[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1608,7 +1623,7 @@ PRIVATE char * Korean[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1669,7 +1684,7 @@ PRIVATE char * Korean[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1751,7 +1766,7 @@ PRIVATE char * Taipei[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1812,7 +1827,7 @@ PRIVATE char * Taipei[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -1881,7 +1896,7 @@ PRIVATE char * Taipei[] = { ** ** This MUST match exactly the table referred to in the DTD! */ -PRIVATE char * SevenBitApproximations[] = { +PUBLIC char * SevenBitApproximations[] = { "AE", /* capital AE diphthong (ligature) - AElig */ "A", /* capital A, acute accent - Aacute */ "A", /* capital A, circumflex accent - Acirc */ @@ -1894,7 +1909,7 @@ PRIVATE char * SevenBitApproximations[] = { "A", /* capital A, dieresis or umlaut mark - Auml*/ #endif /* LY_UMLAUT */ "C", /* capital C, cedilla - Ccedil */ - "DH", /* capital Eth, Icelandic - Dstrok */ + "Dj", /* capital D with stroke - Dstrok */ "DH", /* capital Eth, Icelandic - ETH */ "E", /* capital E, acute accent - Eacute */ "E", /* capital E, circumflex accent - Ecirc */ @@ -1955,7 +1970,7 @@ PRIVATE char * SevenBitApproximations[] = { "\002", /* emsp NEVER CHANGE THIS - emsp */ "-", /* dash the width of ensp - endash */ "\002", /* ensp NEVER CHANGE THIS - ensp */ - "e", /* small eth, Icelandic eth */ + "dh", /* small eth, Icelandic eth */ "e", /* small e, dieresis or umlaut mark - euml */ " 1/2", /* fraction 1/2 (½) - frac12 */ " 1/4", /* fraction 1/4 (¼) - frac14 */ @@ -2029,7 +2044,7 @@ PRIVATE char * SevenBitApproximations[] = { /* * Add the array name to LYCharSets */ -PUBLIC char ** LYCharSets[]={ +PUBLIC char ** LYCharSets[MAX_CHARSETS]={ ISO_Latin1, ISO_Latin2, ISO_LatinN, @@ -2044,14 +2059,15 @@ PUBLIC char ** LYCharSets[]={ Shift_JIS, Korean, Taipei, - SevenBitApproximations + SevenBitApproximations, + ISO_Latin1 /* maybe... - kw */ }; /* * Add the name that the user will see below. * The order of LYCharSets and char_set_names MUST be the same */ -PUBLIC char * LYchar_set_names[]={ +PUBLIC char * LYchar_set_names[MAX_CHARSETSP]={ "ISO Latin 1 ", "ISO Latin 2 ", "Other ISO Latin ", @@ -2067,17 +2083,63 @@ PUBLIC char * LYchar_set_names[]={ "Korean ", "Taipei (Big5) ", "7 bit approximations", + "Transparent ", (char *) 0 }; +#ifdef EXP_CHARTRANS -#ifdef USE_SLANG +PUBLIC int LYNumCharsets = 0; /* will be initialized later by UC_Register... */ + +#include <UCDefs.h> +/* + * Associate additional pieces of info with each of the charsets listed + * above. + * Will be automatically modified (and extended) by charset translations + * which are loaded using the EXP_CHARTRANS mechanism. + * Most important piece of info to put here is a MIME charset name. + * Used for EXP_CHARTRANS. + * The order of LYCharSets and LYCharSet_UC MUST be the same. + * + * Note that most of the charsets added by the new mechanism in src/chrtrans + * don't show up here at all. They don't have to. + */ +PUBLIC LYUCcharset LYCharSet_UC[MAX_CHARSETS]= +{ + {-1,"iso-8859-1", UCT_ENC_8BIT,UCT_REP_IS_LAT1,UCT_CP_IS_LAT1,UCT_R_LAT1, + UCT_R_LAT1}, + {-1,"iso-8859-2", UCT_ENC_8BIT,0,0, UCT_R_LAT1,UCT_R_8859S}, + {-1,"x-iso-8859-other",UCT_ENC_8BIT,0,0, UCT_R_LAT1,UCT_R_8859S}, + {-1,"dec-mcs", UCT_ENC_8BIT,0,0, UCT_R_LAT1,UCT_R_8859S}, + {-1,"cp437", UCT_ENC_8BIT,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"cp850", UCT_ENC_8BIT,UCT_REP_SUPERSETOF_LAT1,0, + UCT_R_8BIT,UCT_R_ASCII}, + {-1,"macintosh", UCT_ENC_8BIT,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"x-next", UCT_ENC_8BIT,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"koi8-r", UCT_ENC_8BIT,0,0, UCT_R_8BIT,UCT_R_ASCII}, +/* There is no strict correlation for the next five, since the tranfer + * charset gets decoded into Display Char Set by the CJK code (separate + * from EXP_CHARTRANS mechanism). For now, just put something there for + * MIME charset name. */ + {-1,"iso-2022-cn", UCT_ENC_CJK,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"euc-jp", UCT_ENC_CJK,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"shift_jis", UCT_ENC_CJK,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"iso-2022-kr", UCT_ENC_CJK,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"big5", UCT_ENC_CJK,0,0, UCT_R_8BIT,UCT_R_ASCII}, + {-1,"us-ascii", UCT_ENC_7BIT,UCT_REP_SUBSETOF_LAT1, + UCT_CP_SUBSETOF_LAT1, + UCT_R_ASCII,UCT_R_ASCII}, + {-1,"x-transparent", UCT_ENC_8BIT,0,0, UCT_R_8BIT,UCT_R_ASCII} +}; +#endif + +#if defined(USE_SLANG) || defined(EXP_CHARTRANS) /* * Add the code of the the lowest character with the high bit set * that can be directly displayed. - * Currently only used by SLANG. + * Used by SLANG and for EXP_CHARTRANS. * The order of LYCharSets and LYlowest_eightbit MUST be the same. */ -PUBLIC int LYlowest_eightbit[]={ +PUBLIC int LYlowest_eightbit[MAX_CHARSETS]={ 160, /* ISO Latin 1 */ 160, /* ISO Latin 2 */ 160, /* Other ISO Latin */ @@ -2092,9 +2154,10 @@ PUBLIC int LYlowest_eightbit[]={ 128, /* Japanese (SJIS) */ 128, /* Korean */ 128, /* Taipei (Big5) */ - 999 /* 7 bit approximations */ + 999, /* 7 bit approximations */ + 128 /* Transparent (???) */ }; -#endif /* USE_SLANG */ +#endif /* USE_SLANG || EXP_CHARTRANS */ /* @@ -2186,8 +2249,29 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i) HTPassHighCtrlNum = FALSE; } +#ifdef EXP_CHARTRANS + if (LYCharSet_UC[i].enc != UCT_ENC_CJK) { + + if (LYRawMode) { + UCLYhndl_for_unspec = i; + } else { + int chndl = 0; + if (UCAssume_MIMEcharset) + chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + if (chndl != i || chndl != UCLYhndl_for_unspec) + UCLYhndl_for_unspec = chndl < 0 ? 0 : chndl; + else + UCLYhndl_for_unspec = 0; + } + } +#endif /* EXP_CHARTRANS */ + #ifdef USE_SLANG - SLsmg_Display_Eight_Bit = LYlowest_eightbit[i]; + if (LYlowest_eightbit[i] > 191) + /* higher than this may output cntrl chars to screen - kw */ + SLsmg_Display_Eight_Bit = 191; + else + SLsmg_Display_Eight_Bit = LYlowest_eightbit[i]; #endif /* USE_SLANG */ return; @@ -2314,7 +2398,7 @@ PUBLIC CONST char * LYEntityNames[] = { "Iacute", /* 205, capital I, acute accent */ "Icirc", /* 206, capital I, circumflex accent */ "Iuml", /* 207, capital I, dieresis or umlaut mark */ - "ETH", /* 208, capital Eth, Icelandic (Dstrok) */ + "ETH", /* 208, capital Eth, Icelandic (or Latin2 Dstrok) */ "Ntilde", /* 209, capital N, tilde */ "Ograve", /* 210, capital O, grave accent */ "Oacute", /* 211, capital O, acute accent */ @@ -2381,6 +2465,10 @@ PUBLIC CONST char * HTMLGetEntityName ARGS1(int,i) * 173, but keeps our substitutions for * characters that are not part of the * ISO-8859-1 charset. - FM + * + * Return '\0' to signal that there isn't a one-character + * equivalent. Caller must check! and do whatever additional + * processing it wants to do instead. - kw */ PUBLIC char HTMLGetLatinOneValue ARGS1(int,i) { @@ -2400,6 +2488,8 @@ PUBLIC char HTMLGetLatinOneValue ARGS1(int,i) break; default: + if (ch && ISO_Latin1[i][1]) /* Got a string longer than 1 char */ + return '\0'; break; } @@ -2417,4 +2507,33 @@ PUBLIC void HTMLUseCharacterSet ARGS1(int,i) HTMLSetHaveCJKCharacterSet(i); return; } +/* + * Initializer, calls initialization function for the + * CHARTRANS handling if compiled in. - kw + * (Also to ensure this module is linked + * if the external model is common block, and the + * module is ever placed in a library. - FM) ?? + */ +PUBLIC int LYCharSetsDeclared NOPARAMS +{ + int status = 1; + +#ifdef EXP_CHARTRANS + UCInit(); + status = UCInitialized; + + if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) + UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + else + UCLYhndl_for_unspec = 0; + if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset) + UCLYhndl_HTFile_for_unspec = + UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); + if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset) + UCLYhndl_for_unrec = + UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); +#endif + + return status; +} diff --git a/src/LYCharSets.h b/src/LYCharSets.h index 97fe9b10..f6e0f8a5 100644 --- a/src/LYCharSets.h +++ b/src/LYCharSets.h @@ -8,10 +8,20 @@ extern char *LYchar_set_names[]; extern char ** LYCharSets[]; +extern char * SevenBitApproximations[]; /* made public. -kw */ extern char ** p_entity_values; -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(EXP_CHARTRANS) extern int LYlowest_eightbit[]; -#endif /* USE_SLANG */ +#endif /* USE_SLANG || EXP_CHARTRANS */ + +#ifdef EXP_CHARTRANS +extern int LYNumCharsets; +extern LYUCcharset LYCharSet_UC[]; +#endif /* EXP_CHARTRANS */ + +/* Initializer for LYCharSets.c */ +extern int LYCharSetsDeclared NOPARAMS; + extern void HTMLSetCharacterHandling PARAMS((int i)); extern void HTMLSetRawModeDefault PARAMS((int i)); extern void HTMLSetUseDefaultRawMode PARAMS((int i, BOOLEAN modeflag)); diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 26f33cc1..6a3a3858 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -20,6 +20,12 @@ #include "LYCharUtils.h" #include "LYCharSets.h" +#ifdef EXP_CHARTRANS +#include "UCMap.h" +#include "UCDefs.h" +#include "UCAux.h" +#endif + #include "HTAlert.h" #include "HTFont.h" #include "HTForms.h" @@ -34,6 +40,9 @@ #include "LYCurses.h" #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #include "LYexit.h" #include "LYLeaks.h" @@ -330,39 +339,25 @@ PUBLIC char * LYUnEscapeEntities ARGS3( continue; /* ** For 8482 (trade) use the character reference if it's - ** a hidden INPUT, otherwise handle as named entify. - FM + ** a hidden INPUT, otherwise use whatever the tables have + ** for ™. - FM, kw */ - } else if (value == 8482) { - if (hidden) { + } else if (value == 8482 && hidden) { *q++ = '&'; *q++ = '#'; if (cpe != '\0') *(p-1) = cpe; p = cp; continue; - } else { - if (cpe != '\0') { - p--; - *p = cpe; - } - cp = (p - 6); - *cp++ = '&'; - *cp++ = 't'; - *cp++ = 'r'; - *cp++ = 'a'; - *cp++ = 'd'; - *cp++ = 'e'; - p -= 6; - continue; - } /* ** If it's ASCII, or is 8-bit but HTPassEightBitNum ** is set or the character set is "ISO Latin 1", ** use it's value. - FM */ - } else if (value < 161 || HTPassEightBitNum || + } else if (value < 161 || + (value < 256 && (HTPassEightBitNum || !strncmp(LYchar_set_names[current_char_set], - "ISO Latin 1", 11)) { + "ISO Latin 1", 11)))) { /* ** No conversion needed. */ @@ -378,8 +373,12 @@ PUBLIC char * LYUnEscapeEntities ARGS3( */ } else { CONST char * name; - value -= 160; - name = HTMLGetEntityName(value); + if (value == 8482) { /* trade mark sign falls through to here -kw */ + name = "trade"; + } else { + value -= 160; + name = HTMLGetEntityName(value); + } for(low = 0, high = HTML_dtd.number_of_entities; high > low; diff < 0 ? (low = i+1) : (high = i)) { @@ -761,7 +760,30 @@ PUBLIC void LYUnEscapeToLatinOne ARGS2( ** is set and it's 8-bit. - FM */ buf[0] = HTMLGetLatinOneValue(i); - if ((unsigned char)buf[0] > 159 && isURL == TRUE) { + if (buf[0] == '\0') { + /* + ** The entity does not have an 8859-1 representation + ** of exactly one char length. Try to deal with it + ** anyway - either HTEscape the whole mess, or pass + ** through raw. So make sure the ISO_Latin1 table, + ** which is the first table in LYCharSets, has resonable + ** substitution strings! (if it really must have any + ** longer than one char..) -kw + */ + if (!LYCharSets[0][i][0]) /* totally empty, skip - kw */ + /* do nothing */ ; + else if (isURL) { + /* *All* will be HTEscape'd - kw */ + esc = HTEscape(LYCharSets[0][i], URL_XALPHAS); + for (e = 0; esc[e]; e++) + *q++ = esc[e]; + FREE(esc); + } else { + /* *Nothing* will be HTEscape'd - kw */ + for (e = 0; LYCharSets[0][i][e]; e++) + *q++ = (unsigned char)(LYCharSets[0][i][e]); + } + } else if ((unsigned char)buf[0] > 159 && isURL == TRUE) { esc = HTEscape(buf, URL_XALPHAS); for (e = 0; esc[e]; e++) *q++ = esc[e]; @@ -1186,12 +1208,16 @@ PUBLIC void LYFillLocalFileURL ARGS2( StrAllocCat(*href, HTVMS_wwwName(getenv("PATH"))); #else char curdir[DIRNAMESIZE]; -#ifdef NO_GETCWD - getwd (curdir); -#else +#if HAVE_GETCWD getcwd (curdir, DIRNAMESIZE); +#else + getwd (curdir); #endif /* NO_GETCWD */ +#ifdef DOSPATH + StrAllocCat(*href, HTDOS_wwwName(curdir)); +#else StrAllocCat(*href, curdir); +#endif /* DOSPATH */ #endif /* VMS */ } @@ -1562,6 +1588,29 @@ PUBLIC void LYZero_OL_Counter ARGS1( return; } +#ifdef EXP_CHARTRANS +/* +** This function is used by the HTML Structured object. - kw +*/ +PUBLIC void html_get_chartrans_info ARGS1(HTStructured *, me) +{ + me->UCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor,UCT_STAGE_STRUCTURED); + if (me->UCLYhndl < 0) { + int chndl = HTAnchor_getUCLYhndl(me->node_anchor, UCT_STAGE_HTEXT); + if (chndl < 0) { + chndl = current_char_set; + HTAnchor_setUCInfoStage(me->node_anchor, chndl, UCT_STAGE_HTEXT, + UCT_SETBY_STRUCTURED); + } + HTAnchor_setUCInfoStage(me->node_anchor, chndl, + UCT_STAGE_STRUCTURED, UCT_SETBY_STRUCTURED); + me->UCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor, + UCT_STAGE_STRUCTURED); + } + me->UCI = HTAnchor_getUCInfoStage(me->node_anchor,UCT_STAGE_STRUCTURED); +} +#endif /* EXP_CHARTRANS */ + /* ** This function processes META tags in HTML streams. - FM */ @@ -1573,7 +1622,7 @@ PUBLIC void LYHandleMETA ARGS4( { char *http_equiv = NULL, *name = NULL, *content = NULL; char *href = NULL, *id_string = NULL, *temp = NULL; - char *cp, *cp0, *cp1; + char *cp, *cp0, *cp1 = 0; int url_type = 0, i; if (!me || !present) @@ -1643,8 +1692,8 @@ PUBLIC void LYHandleMETA ARGS4( * Check for a no-cache Pragma * or Cache-Control directive. - FM */ - if (!strcasecomp((name ? name : http_equiv), "Pragma") || - !strcasecomp((name ? name : http_equiv), "Cache-Control")) { + if (!strcasecomp((http_equiv ? http_equiv : name), "Pragma") || + !strcasecomp((http_equiv ? http_equiv : name), "Cache-Control")) { LYUnEscapeToLatinOne(&content, FALSE); LYTrimHead(content); LYTrimTail(content); @@ -1661,7 +1710,7 @@ PUBLIC void LYHandleMETA ARGS4( * should. - FM */ if ((!me->node_anchor->cache_control) && - !strcasecomp((name ? name : http_equiv), "Cache-Control")) { + !strcasecomp((http_equiv ? http_equiv : name), "Cache-Control")) { for (i = 0; content[i]; i++) content[i] = TOLOWER(content[i]); StrAllocCopy(me->node_anchor->cache_control, content); @@ -1708,7 +1757,7 @@ PUBLIC void LYHandleMETA ARGS4( /* * Check for an Expires directive. - FM */ - } else if (!strcasecomp((name ? name : http_equiv), "Expires")) { + } else if (!strcasecomp((http_equiv ? http_equiv : name), "Expires")) { /* * If we didn't get a Expires MIME header, * store it in the anchor element, and if we @@ -1733,7 +1782,7 @@ PUBLIC void LYHandleMETA ARGS4( * the charset via a server's header. - AAC & FM */ } else if (!(me->node_anchor->charset && *me->node_anchor->charset) && - !strcasecomp((name ? name : http_equiv), "Content-Type")) { + !strcasecomp((http_equiv ? http_equiv : name), "Content-Type")) { LYUnEscapeToLatinOne(&content, FALSE); LYTrimHead(content); LYTrimTail(content); @@ -1746,10 +1795,90 @@ PUBLIC void LYHandleMETA ARGS4( if ((cp = strstr(content, "text/html;")) != NULL && (cp1 = strstr(content, "charset")) != NULL && cp1 > cp) { + BOOL chartrans_ok = NO; + char *cp3 = NULL, *cp4; + int chndl; + cp1 += 7; - while (*cp1 == ' ' || *cp1 == '=') + while (*cp1 == ' ' || *cp1 == '=' || *cp1 == '"') cp1++; - +#ifdef EXP_CHARTRANS + StrAllocCopy(cp3, cp1); /* copy to mutilate more */ + for (cp4=cp3; (*cp4 != '\0' && *cp4 != '"' && + *cp4 != ';' && *cp4 != ':' && + !WHITE(*cp4)); cp4++) + /* nothing */ ; + *cp4 = '\0'; + cp4 = cp3; + chndl = UCGetLYhndl_byMIME(cp3); + if (chndl < 0) { + if (0==strcmp(cp4, "cn-big5")) { + cp4 += 3; + chndl = UCGetLYhndl_byMIME(cp4); + } + else if (0==strncmp(cp4, "cn-gb", 5)) { + StrAllocCopy(cp3, "gb2312"); + cp4 = cp3; + chndl = UCGetLYhndl_byMIME(cp4); + } + } + if (UCCanTranslateFromTo(chndl, current_char_set)) + { + chartrans_ok = YES; + StrAllocCopy(me->node_anchor->charset, cp4); + HTAnchor_setUCInfoStage(me->node_anchor, chndl, + UCT_STAGE_PARSER, UCT_SETBY_STRUCTURED); + } + else if (chndl < 0) {/* got something but we don't + recognize it */ + chndl = UCLYhndl_for_unrec; + if (UCCanTranslateFromTo(chndl, + current_char_set)) + { + chartrans_ok = YES; + HTAnchor_setUCInfoStage(me->node_anchor, + chndl, + UCT_STAGE_PARSER, UCT_SETBY_STRUCTURED); + } + } + FREE(cp3); + if (chartrans_ok) { + LYUCcharset * p_in = + HTAnchor_getUCInfoStage(me->node_anchor, + UCT_STAGE_PARSER); + LYUCcharset * p_out = + HTAnchor_setUCInfoStage(me->node_anchor, + current_char_set, + UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT); + if (!p_out) /* try again */ + p_out = + HTAnchor_getUCInfoStage(me->node_anchor, + UCT_STAGE_HTEXT); + if (0==strcmp(p_in->MIMEname,"x-transparent")) + { + HTPassEightBitRaw = TRUE; + HTAnchor_setUCInfoStage(me->node_anchor, + HTAnchor_getUCLYhndl(me->node_anchor, + UCT_STAGE_HTEXT), + UCT_STAGE_PARSER, UCT_SETBY_DEFAULT); + } + if (0==strcmp(p_out->MIMEname,"x-transparent")) + { + HTPassEightBitRaw = TRUE; + HTAnchor_setUCInfoStage(me->node_anchor, + HTAnchor_getUCLYhndl(me->node_anchor, + UCT_STAGE_PARSER), + UCT_STAGE_HTEXT, UCT_SETBY_DEFAULT); + } + if (!(p_in->enc & UCT_ENC_CJK) && + (p_in->codepoints & UCT_CP_SUBSETOF_LAT1)){ + HTCJK = NOCJK; + } else if (chndl == current_char_set) { + HTPassEightBitRaw = TRUE; + } + html_get_chartrans_info(me); + } else /* Fall through to old behavior */ +#endif /* EXP_CHARTRANS */ if (!strncmp(cp1, "us-ascii", 8) || !strncmp(cp1, "iso-8859-1", 10)) { StrAllocCopy(me->node_anchor->charset, "iso-8859-1"); @@ -1829,7 +1958,7 @@ PUBLIC void LYHandleMETA ARGS4( /* * Check for a Refresh directive. - FM */ - } else if (!strcasecomp((name ? name : http_equiv), "Refresh")) { + } else if (!strcasecomp((http_equiv ? http_equiv : name), "Refresh")) { char *Seconds = NULL; /* @@ -1957,8 +2086,8 @@ PUBLIC void LYHandleMETA ARGS4( * via a server header. - FM */ } else if (!(me->node_anchor->SugFname && *me->node_anchor->SugFname) && - !strcasecomp((name ? - name : http_equiv), "Content-Disposition")) { + !strcasecomp((http_equiv ? + http_equiv : name), "Content-Disposition")) { cp = content; while (*cp != '\0' && strncasecomp(cp, "file;", 5)) cp++; @@ -1983,7 +2112,7 @@ PUBLIC void LYHandleMETA ARGS4( /* * Check for a Set-Cookie directive. - AK */ - } else if (!strcasecomp((name ? name : http_equiv), "Set-Cookie")) { + } else if (!strcasecomp((http_equiv ? http_equiv : name), "Set-Cookie")) { /* * We're using the Request-URI as the second argument, * regardless of whether a Content-Base header or BASE @@ -2183,11 +2312,11 @@ PUBLIC void LYHandleID ARGS2( /* * Create the link if we still have a non-zero-length string. - FM */ - if (ID_A = HTAnchor_findChildAndLink( + if ((ID_A = HTAnchor_findChildAndLink( me->node_anchor, /* Parent */ id, /* Tag */ NULL, /* Addresss */ - (void *)0)) { /* Type */ + (void *)0)) != 0) { /* Type */ HText_beginAnchor(me->text, ID_A); HText_endAnchor(me->text); } diff --git a/src/LYCharUtils.h b/src/LYCharUtils.h index 94c5e1fd..8c71b5c0 100644 --- a/src/LYCharUtils.h +++ b/src/LYCharUtils.h @@ -41,6 +41,7 @@ extern char *LYUppercaseI_OL_String PARAMS(( int seqnum)); extern char *LYLowercaseI_OL_String PARAMS(( int seqnum)); +extern void html_get_chartrans_info PARAMS((HTStructured * me)); extern void LYHandleMETA PARAMS(( HTStructured * me, CONST BOOL* present, diff --git a/src/LYClean.c b/src/LYClean.c index 2d97a386..bfdaa98f 100644 --- a/src/LYClean.c +++ b/src/LYClean.c @@ -70,7 +70,9 @@ PUBLIC void cleanup_sig ARGS1( /* * Ignore further interrupts. - mhc: 11/2/91 */ +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_IGN); +#endif /* NOSIGHUP */ #ifdef VMS /* @@ -86,7 +88,10 @@ PUBLIC void cleanup_sig ARGS1( if (traversal) dump_traversal_history(); +#ifndef NOSIGHUP if (sig != SIGHUP) { +#endif /* NOSIGHUP */ + if (!dump_output_immediately) { /* * cleanup() also calls cleanup_files(). @@ -97,11 +102,15 @@ PUBLIC void cleanup_sig ARGS1( printf("\r\nExiting via interrupt: %d\r\n", sig); fflush(stdout); } +#ifndef NOSIGHUP } else { cleanup_files(); } +#endif /* NOSIGHUP */ - (void) signal(SIGHUP, SIG_DFL); +#ifndef NOSIGHUP + (void) signal(SIGHUP, SIG_IGN); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -140,7 +149,9 @@ PUBLIC void cleanup NOARGS * Cleanup signals - just in case. * Ignore further interrupts. - mhc: 11/2/91 */ - (void) signal (SIGHUP, SIG_IGN); +#ifndef NOSIGHUP + (void) signal(SIGHUP, SIG_IGN); +#endif /* NOSIGHUP */ (void) signal (SIGTERM, SIG_IGN); #ifndef VMS /* use ttclose() from cleanup() for VMS */ diff --git a/src/LYCookie.c b/src/LYCookie.c index 14f2ecfc..17690dc0 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -211,7 +211,7 @@ PRIVATE void store_cookie ARGS3( HTList *hl, *next; cookie *c2; time_t now = time(NULL); - int pathlen, pos; + int pos; CONST char *ptr; domain_entry *de = NULL; diff --git a/src/LYCurses.c b/src/LYCurses.c index d4bda6f1..cc3f423d 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -39,11 +39,17 @@ extern int _NOSHARE(COLS); PRIVATE int dumbterm PARAMS((char *terminal)); BOOLEAN LYCursesON = FALSE; +#if defined(USE_SLANG) || defined(COLOR_CURSES) +PRIVATE int Current_Attr; +#endif + #ifdef USE_SLANG PUBLIC unsigned int Lynx_Color_Flags = 0; -PRIVATE int Current_Attr; PUBLIC BOOLEAN FullRefresh = FALSE; PUBLIC int curscr = 0; +#ifdef SLANG_MBCS_HACK +PUBLIC int PHYSICAL_SLtt_Screen_Cols = 10;/* will be set by size_change - kw */ +#endif /* SLANG_MBCS_HACK */ PUBLIC void LY_SLrefresh NOARGS { @@ -65,14 +71,14 @@ PUBLIC void VTHome NOARGS } #endif /* VMS */ -PUBLIC void sl_add_attr ARGS1( +PUBLIC void lynx_add_attr ARGS1( int, a) { Current_Attr |= a; SLsmg_set_color(Current_Attr); } -PUBLIC void sl_sub_attr ARGS1( +PUBLIC void lynx_sub_attr ARGS1( int, a) { Current_Attr &= ~a; @@ -122,7 +128,9 @@ PRIVATE void sl_suspend ARGS1( SLang_init_tty(3, 0, 1); #endif /* SLANG_VERSION > 9929 */ signal(SIGTSTP, sl_suspend); +#ifndef _WINDOWS SLtty_set_suspend_state(1); +#endif if (sig == SIGTSTP) SLsmg_resume_smg(); /* @@ -141,6 +149,232 @@ PRIVATE void sl_suspend ARGS1( #endif /* USE_SLANG */ +#ifdef COLOR_CURSES +/* + * This block of code is designed to produce the same color effects using SVr4 + * curses as the slang library's implementation in this module. That maps the + * SGR codes into a 0-7 index into the color table, with special treatment for + * backgrounds. There's a bit of convoluted (but necessary) code handling the + * special case of initialization before 'initscr()' is called. + * 1997/1/19 - T.E.Dickey <dickey@clark.net> + */ +PRIVATE int lynx_uses_color; +PRIVATE int lynx_called_initscr; + +PRIVATE struct { + int fg, bg; + chtype attr; +} lynx_color_cfg[] = { + /*0*/ { COLOR_BLACK, COLOR_WHITE, A_NORMAL}, /* A_NORMAL */ + /*1*/ { COLOR_BLUE, COLOR_WHITE, A_NORMAL}, /* A_BOLD */ + /*2*/ { COLOR_YELLOW, COLOR_BLUE, A_BOLD}, /* A_REVERSE */ + /*3*/ { COLOR_GREEN, COLOR_WHITE, A_NORMAL}, /* A_REVERSE | A_BOLD */ + /*4*/ { COLOR_MAGENTA, COLOR_WHITE, A_NORMAL}, /* A_UNDERLINE */ + /*5*/ { COLOR_BLUE, COLOR_WHITE, A_NORMAL}, /* A_UNDERLINE | A_BOLD */ + /*6*/ { COLOR_RED, COLOR_WHITE, A_NORMAL}, /* A_UNDERLINE | A_REVERSE */ + /*7*/ { COLOR_MAGENTA, COLOR_CYAN, A_NORMAL} /* A_UNDERLINE | A_BOLD | A_REVERSE */ +}; + +/* + * Hold the codes for color-pairs here until 'initscr()' is called. + */ +PRIVATE struct { + int fg; + int bg; +} lynx_color_pairs[25]; + +/* + * Map the SGR attributes (0-7) into ANSI colors, modified with the actual BOLD + * attribute we'll get 16 colors. + */ +PRIVATE void lynx_set_wattr ARGS1(WINDOW *, win) +{ + if (lynx_uses_color) { + int code = 0; + int attr = A_NORMAL; + int offs = 1; + static int have_underline = -1; + static int no_color_video = -1; + + if (have_underline < 0) { +#ifndef DOSPATH + have_underline = tigetstr("smul") != 0; +#else + have_underline = 1; +#endif /* DOSPATH */ + } + + if (no_color_video < 0) { + no_color_video = tigetnum("ncv"); + } + + if (Current_Attr & A_BOLD) + code |= 1; + if (Current_Attr & A_REVERSE) + code |= 2; + if (Current_Attr & A_UNDERLINE) + code |= 4; + attr = lynx_color_cfg[code].attr; + + /* + * FIXME: no_color_video isn't implemented (97/4/14) in ncurses 4.x, + * but may be in SVr4 (which would make this redundant for the latter). + */ + if ((Current_Attr & A_BOLD) && !(no_color_video & 33)) { + attr |= A_BOLD; + offs = 17; + } + + if ((Current_Attr & A_UNDERLINE) && !(no_color_video & 2)) { + attr |= A_UNDERLINE; + offs = 17; + } + + attr |= COLOR_PAIR(code+offs); + + wattrset(win, attr); + } else { + wattrset(win, Current_Attr); + } +} + +PRIVATE void lynx_map_color ARGS1(int, n) +{ + int m; + + lynx_color_pairs[n+1].fg = lynx_color_cfg[n].fg; + lynx_color_pairs[n+1].bg = lynx_color_cfg[n].bg; + + lynx_color_pairs[n+9].fg = lynx_color_cfg[n].fg; + lynx_color_pairs[n+9].bg = lynx_color_cfg[0].bg; + + lynx_color_pairs[n+17].fg = lynx_color_cfg[n].bg; + lynx_color_pairs[n+17].bg = lynx_color_cfg[n].bg; + + if (lynx_called_initscr) { + for (m = 0; m <= 16; m += 8) { + init_pair(n+m+1, + lynx_color_pairs[n+m+1].fg, + lynx_color_pairs[n+m+1].bg); + } + if (n == 0) + bkgd(COLOR_PAIR(9)); + } +} + +PUBLIC int lynx_chg_color ARGS3( + int, color, + int, fg, + int, bg + ) +{ + if (color >= 0 && color < 8 + && fg >= 0 && fg < 16 + && bg >= 0 && bg < 16) { + lynx_color_cfg[color].fg = fg & 7; + lynx_color_cfg[color].bg = bg & 7; + lynx_color_cfg[color].attr = (fg & 8) ? A_BOLD : A_NORMAL; + lynx_map_color(color); + } else { + return -1; + } + return 0; +} + +PUBLIC void lynx_set_color ARGS1(int, a) +{ + if (lynx_uses_color) { + attrset(lynx_color_cfg[a].attr | COLOR_PAIR(a+1)); + } +} + +PUBLIC void lynx_standout ARGS1(int, flag) +{ + if (flag) + lynx_add_attr(A_REVERSE); + else + lynx_sub_attr(A_REVERSE); +} + +PUBLIC void lynx_add_wattr ARGS2(WINDOW *, win, int, a) +{ + Current_Attr |= a; + lynx_set_wattr(win); +} + +PUBLIC void lynx_add_attr ARGS1(int, a) +{ + lynx_add_wattr (stdscr, a); +} + +PUBLIC void lynx_sub_wattr ARGS2(WINDOW *, win, int, a) +{ + Current_Attr &= ~a; + lynx_set_wattr(win); +} + +PUBLIC void lynx_sub_attr ARGS1(int, a) +{ + lynx_sub_wattr (stdscr, a); +} + +PRIVATE void lynx_init_colors NOARGS +{ + lynx_uses_color = FALSE; + + if (has_colors()) { + int n, m; + + lynx_uses_color = TRUE; + start_color(); + + for (n = 0; n < sizeof(lynx_color_cfg)/sizeof(lynx_color_cfg[0]); n++) { + for (m = 0; m <= 16; m += 8) { + init_pair(n+m+1, + lynx_color_pairs[n+m+1].fg, + lynx_color_pairs[n+m+1].bg); + } + if (n == 0) + bkgd(COLOR_PAIR(9)); + } + } +} + +PUBLIC void lynx_setup_colors NOARGS +{ + int n; + for (n = 0; n < 8; n++) + lynx_map_color(n); +} +#endif /* COLOR_CURSES */ + +#if defined (DJGPP) && !defined (SLANG) +/* + * Sorry about making a completely new function, + * but the real one is messy! WB + */ +PUBLIC void start_curses NOARGS +{ + static BOOLEAN first_time = TRUE; + + if(first_time) + { + initscr(); /* start curses */ + first_time = FALSE; + cbreak(); + noecho(); + keypad(stdscr, TRUE); + fflush(stdin); + fflush(stdout); + lynx_init_colors(); + lynx_called_initscr = TRUE; + } else sock_init(); + + LYCursesON = TRUE; + clear(); + +} +#else PUBLIC void start_curses NOARGS { #ifdef USE_SLANG @@ -177,10 +411,14 @@ PUBLIC void start_curses NOARGS #endif /* !VMS */ SLsmg_init_smg(); SLsmg_Display_Eight_Bit = LYlowest_eightbit[current_char_set]; + if (SLsmg_Display_Eight_Bit > 191) + SLsmg_Display_Eight_Bit = 191; /* may print ctrl chars otherwise - kw */ SLsmg_Newline_Moves = -1; SLsmg_Backspace_Moves = 1; #ifndef VMS +#ifndef _WINDOWS SLtty_set_suspend_state(1); +#endif /* _WINDOWS */ #ifdef SIGTSTP signal(SIGTSTP, sl_suspend); #endif /* SIGTSTP */ @@ -191,7 +429,7 @@ PUBLIC void start_curses NOARGS #ifdef VMS /* - * If we are VMS then do initsrc() everytime start_curses() + * If we are VMS then do initscr() everytime start_curses() * is called! */ initscr(); /* start curses */ @@ -206,7 +444,9 @@ PUBLIC void start_curses NOARGS if (initscr() == NULL) { /* start curses */ fprintf(stderr, "Terminal initialisation failed - unknown terminal type?\n"); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); (void) signal(SIGINT, SIG_DFL); #ifdef SIGTSTP @@ -216,6 +456,10 @@ PUBLIC void start_curses NOARGS exit (-1); } first_time = FALSE; +#if defined(COLOR_CURSES) + lynx_init_colors(); + lynx_called_initscr = TRUE; +#endif /* USE_SLANG */ } #endif /* VMS */ @@ -225,41 +469,67 @@ PUBLIC void start_curses NOARGS crmode(); raw(); #else -#ifdef NO_CBREAK - crmode(); -#else +#if HAVE_CBREAK cbreak(); -#endif /* NO_CBREAK */ +#else + crmode(); +#endif /* HAVE_CBREAK */ signal(SIGINT, cleanup_sig); #endif /* VMS */ noecho(); -#if !defined(VMS) && !defined(NO_KEYPAD) +#if defined(HAVE_KEYPAD) keypad(stdscr,TRUE); -#endif /* !VMS && !NO_KEYPAD */ +#endif /* HAVE_KEYPAD */ + +#ifdef NCURSES_MOUSE_VERSION + /* Inform ncurses that we're interested in knowing when mouse + button 1 is clicked */ + if (LYUseMouse) + mousemask(BUTTON1_CLICKED, NULL); +#endif /* NCURSES_MOUSE_VERSION */ fflush(stdin); fflush(stdout); #endif /* USE_SLANG */ +#ifdef _WINDOWS + clear(); +#endif + LYCursesON = TRUE; } +#endif /* defined (DJGPP) && !defined (SLANG) */ PUBLIC void stop_curses NOARGS { echo(); +#ifdef DJGPP + sock_exit(); +#endif +#if defined (DOSPATH) && !defined (SLANG) + clrscr(); +/* + clear(); + refresh(); +*/ +#else /* * Fixed for better dumb terminal support. * 05-28-94 Lynx 2-3-1 Garrett Arch Blythe */ if(LYCursesON == TRUE) { +#ifdef NCURSES_MOUSE_VERSION + mousemask(0, NULL); +#endif endwin(); /* stop curses */ } fflush(stdout); +#endif /* DJGPP */ LYCursesON = FALSE; @@ -300,8 +570,6 @@ PUBLIC BOOLEAN setup ARGS1( * Some yoyo used these under conditions which require * -dump, so force that mode here. - FM */ - extern int mainloop(); - dump_output_immediately = TRUE; LYcols = 80; keypad_mode = LINKS_ARE_NUMBERED; @@ -389,14 +657,14 @@ PUBLIC BOOLEAN setup ARGS1( start_curses(); -#ifndef NO_TTYTYPE +#if HAVE_TTYTYPE /* * Get terminal type (strip 'dec-' from vms style types). */ if (strncmp((CONST char*)ttytype, "dec-vt", 6) == 0) { (void) setterm(ttytype + 4); } -#endif /* !NO_TTYTYPE */ +#endif /* HAVE_TTYTYPE */ LYlines = LINES; LYcols = COLS; diff --git a/src/LYCurses.h b/src/LYCurses.h index d18cd6e3..ea4d3b82 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -31,7 +31,19 @@ #define REDEFINE_CR #endif /* CR */ +#ifdef DOSPATH +# include "curses.h" +#else #ifdef NCURSES +# ifdef HAVE_CONFIG_H +# ifdef NCURSESHEADER +# include <ncurses.h> +# else +# include <curses.h> +# endif +extern void LYsubwindow PARAMS((WINDOW * param)); + +# else /* FIXME: remove this after configure script is complete */ # ifndef NCURSESHEADER # include <ncurses/curses.h> # else @@ -40,26 +52,25 @@ # else # include <ncurses.h> # endif /* __NetBSD__ */ -# endif /* NCURSESINCDIR */ +# endif /* HAVE_CONFIG_H */ +# endif /* NCURSESHEADER */ + #else # ifdef ULTRIX # include <cursesX.h> /* ultrix */ # else -# if defined(SUN) || defined(sun) || defined(SGI) || defined(SCO) || defined(ISC) || defined(PTX2) -# include "curses.h" +# if defined(VMS) && defined(__GNUC__) +# include "LYGCurses.h" # else -# if defined(VMS) && defined(__GNUC__) -# include "LYGCurses.h" +# if defined(sony_news) +# include "/usr/sony/include/jcurses.h" /* sony_news */ # else -# if defined(sony_news) -# include "/usr/sony/include/jcurses.h" /* sony_news */ -# else -# include <curses.h> /* everything else */ -# endif /* sony_news */ -# endif /* VMS && __GNUC__ */ -# endif /* SUN || sun || SGI || SCO || ISC || PTX2 */ +# include <curses.h> /* everything else */ +# endif /* sony_news */ +# endif /* VMS && __GNUC__ */ # endif /* ULTRIX */ #endif /* NCURSES */ +#endif /* DOSPATH */ #endif /* USE_SLANG */ @@ -97,36 +108,35 @@ extern void VMSbox PARAMS((WINDOW *win, int height, int width)); #endif /* !USE_SLANG */ #endif /* VMS */ - -#ifdef USE_SLANG -extern void sl_add_attr PARAMS((int a)); -extern void sl_sub_attr PARAMS((int a)); +#if defined(USE_SLANG) || defined(COLOR_CURSES) +extern void lynx_add_attr PARAMS((int a)); +extern void lynx_sub_attr PARAMS((int a)); extern void lynx_setup_colors NOPARAMS; - -#define start_bold() sl_add_attr(1) -#define start_reverse() sl_add_attr(2) -#define start_underline() sl_add_attr(4) -#define stop_bold() sl_sub_attr(1) -#define stop_reverse() sl_sub_attr(2) -#define stop_underline() sl_sub_attr(4) - extern unsigned int Lynx_Color_Flags; +#endif + +#ifdef USE_SLANG #define SL_LYNX_USE_COLOR 1 #define SL_LYNX_USE_BLINK 2 +#define start_bold() lynx_add_attr(1) +#define start_reverse() lynx_add_attr(2) +#define start_underline() lynx_add_attr(4) +#define stop_bold() lynx_sub_attr(1) +#define stop_reverse() lynx_sub_attr(2) +#define stop_underline() lynx_sub_attr(4) #ifdef FANCY_CURSES #undef FANCY_CURSES #endif /* FANCY_CURSES */ -#ifndef NO_KEYPAD -#define NO_KEYPAD -#endif /* !NO_KEYPAD */ -#ifndef NO_TTYTYPE -#define NO_TTYTYPE -#endif /* !NO_TTYTYPE */ /* Map some curses functions to slang functions. */ #define stdscr NULL +#ifdef SLANG_MBCS_HACK +extern int PHYSICAL_SLtt_Screen_Cols; +#define COLS PHYSICAL_SLtt_Screen_Cols +#else #define COLS SLtt_Screen_Cols +#endif /* SLANG_MBCS_HACK */ #define LINES SLtt_Screen_Rows #define move SLsmg_gotorc #define addstr SLsmg_write_string @@ -182,38 +192,55 @@ extern void VTHome NOPARAMS; #else /* NOT VMS: */ +#ifdef COLOR_CURSES +extern void lynx_add_wattr PARAMS((WINDOW *, int)); +extern void lynx_sub_wattr PARAMS((WINDOW *, int)); +extern void lynx_set_color PARAMS((int)); +extern void lynx_standout PARAMS((int)); +extern int lynx_chg_color PARAMS((int, int, int)); +#undef standout +#define standout() lynx_standout(TRUE) +#undef standend +#define standend() lynx_standout(FALSE) +#else +#define lynx_add_attr attrset +#define lynx_add_wattr wattrset +#define lynx_sub_attr attroff +#define lynx_sub_wattr wattroff +#endif + #ifdef UNDERLINE_LINKS -#define start_bold() attrset(A_UNDERLINE) -#define stop_bold() attroff(A_UNDERLINE) -#define start_underline() attrset(A_BOLD) -#define stop_underline() attroff(A_BOLD) +#define start_bold() lynx_add_attr(A_UNDERLINE) +#define stop_bold() lynx_sub_attr(A_UNDERLINE) +#define start_underline() lynx_add_attr(A_BOLD) +#define stop_underline() lynx_sub_attr(A_BOLD) #else /* not UNDERLINE_LINKS: */ -#define start_bold() attrset(A_BOLD) -#define stop_bold() attroff(A_BOLD) -#define start_underline() attrset(A_UNDERLINE) -#define stop_underline() attroff(A_UNDERLINE) +#define start_bold() lynx_add_attr(A_BOLD) +#define stop_bold() lynx_sub_attr(A_BOLD) +#define start_underline() lynx_add_attr(A_UNDERLINE) +#define stop_underline() lynx_sub_attr(A_UNDERLINE) #endif /* UNDERLINE_LINKS */ #if defined(SNAKE) && defined(HP_TERMINAL) -#define start_reverse() wattrset(stdscr,A_DIM) -#define wstart_reverse(a) wattrset(a,A_DIM) -#define stop_reverse() wattroff(stdscr,A_DIM) -#define wstop_reverse(a) wattroff(a,A_DIM) +#define start_reverse() lynx_add_wattr(stdscr,A_DIM) +#define wstart_reverse(a) lynx_add_wattr(a,A_DIM) +#define stop_reverse() lynx_sub_wattr(stdscr,A_DIM) +#define wstop_reverse(a) lynx_sub_wattr(a,A_DIM) #else -#define start_reverse() attrset(A_REVERSE) -#define wstart_reverse(a) wattrset(a,A_REVERSE) -#define stop_reverse() attroff(A_REVERSE) -#define wstop_reverse(a) wattroff(a,A_REVERSE) +#define start_reverse() lynx_add_attr(A_REVERSE) +#define wstart_reverse(a) lynx_add_wattr(a,A_REVERSE) +#define stop_reverse() lynx_sub_attr(A_REVERSE) +#define wstop_reverse(a) lynx_sub_wattr(a,A_REVERSE) #endif /* SNAKE && HP_TERMINAL */ #endif /* VMS */ #else /* Not FANCY_CURSES: */ #define start_bold() standout() -#define start_underline() 1 /* nothing */ +#define start_underline() /* nothing */ #define start_reverse() standout() #define wstart_reverse(a) wstandout(a) #define stop_bold() standend() -#define stop_underline() 1 /* nothing */ +#define stop_underline() /* nothing */ #define stop_reverse() standend() #define wstop_reverse(a) wstandend(a) diff --git a/src/LYDownload.c b/src/LYDownload.c index 89fcf61a..92dba795 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -15,6 +15,9 @@ #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #include "LYexit.h" #include "LYLeaks.h" @@ -197,11 +200,15 @@ check_recall: strcpy(command, buffer); if ((len=strlen(command)) > 0 && command[len-1] == '/') command[len-1] = '\0'; +#ifdef DOSPATH + strcat(command, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS strcat(command, HTVMS_wwwName((char *)Home_Dir())); #else strcat(command, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ strcat(command, cp); strcpy(buffer, command); } @@ -224,7 +231,11 @@ check_recall: cp = NULL; if (cp) { sprintf(command,"%s/%s", cp, buffer); +#ifdef DOSPATH + strcpy(buffer, HTDOS_name(command)); +#else strcpy(buffer, command); +#endif } #endif /* VMS */ @@ -532,7 +543,7 @@ PUBLIC int LYdownload_options ARGS2(char **,newfile, char *,data_file) } /* make the file a URL now */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) sprintf(download_filename,"file://localhost/%s",tempfile); #else sprintf(download_filename,"file://localhost%s",tempfile); diff --git a/src/LYEdit.c b/src/LYEdit.c index 2f01982d..98940c4e 100644 --- a/src/LYEdit.c +++ b/src/LYEdit.c @@ -14,6 +14,9 @@ #include <unixio.h> #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #include "LYLeaks.h" @@ -54,7 +57,7 @@ PUBLIC int edit_current_file ARGS3(char *,newfile, int,cur, int,lineno) * * On VMS, only try the path. */ -#ifndef VMS +#if !defined (VMS) && !defined (DOSPATH) colon = strchr(newfile,':'); StrAllocCopy(filename, colon+1); HTUnEscape(filename); @@ -63,31 +66,40 @@ PUBLIC int edit_current_file ARGS3(char *,newfile, int,cur, int,lineno) #endif /* !VMS */ filename = HTParse(newfile,"",PARSE_PATH+PARSE_PUNCTUATION); HTUnEscape(filename); +#ifdef DOSPATH + if (strlen(filename)>1) filename++; +#endif +#ifdef DOSPATH + if ((fp = fopen(HTDOS_name(filename),"r")) == NULL) { +#else #ifdef VMS if ((fp = fopen(HTVMS_name("",filename),"r")) == NULL) { #else if ((fp = fopen(filename,"r")) == NULL) { - #endif /* VMS */ +#endif /* DOSPATH */ HTAlert(COULD_NOT_ACCESS_FILE); FREE(filename); goto failure; } -#ifndef VMS +#if !defined (VMS) && !defined (DOSPATH) } #endif /* !VMS */ fclose(fp); - #if defined(VMS) || defined(CANT_EDIT_UNWRITABLE_FILES) /* * Don't allow editing if user lacks append access. */ +#ifdef DOSPATH + if ((fp = fopen(HTDOS_name("",filename),"a")) == NULL) { +#else #ifdef VMS if ((fp = fopen(HTVMS_name("",filename),"a")) == NULL) { #else if ((fp = fopen(filename,"a")) == NULL) { #endif /* VMS */ +#endif /* DOSPATH */ _statusline(NOAUTH_TO_EDIT_FILE); sleep(MessageSecs); goto failure; @@ -102,9 +114,18 @@ PUBLIC int edit_current_file ARGS3(char *,newfile, int,cur, int,lineno) strstr(editor, "pico") || strstr(editor,"jove") || strstr(editor, "jed")) sprintf(command,"%s +%d \"%s\"",editor, lineno+links[cur].ly, +#ifdef DOSPATH + HTDOS_name(filename)); +#else filename); +#endif /* DOSPATH */ else - sprintf(command,"%s \"%s\"",editor, filename); + sprintf(command,"%s \"%s\"",editor, +#ifdef DOSPATH + HTDOS_name(filename)); +#else + filename); +#endif /* DOSPATH */ #endif /* VMS */ if (TRACE) { fprintf(stderr, "LYEdit: %s\n",command); diff --git a/src/LYForms.c b/src/LYForms.c index 8474dc12..6385fc02 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -14,6 +14,11 @@ #include "LYLeaks.h" +#ifdef ALT_CHAR_SET +#define BOXVERT 0 /* use alt char set for popup window vertical borders */ +#define BOXHORI 0 /* use alt char set for popup window vertical borders */ +#endif + #ifndef BOXVERT #define BOXVERT '*' /* character for popup window vertical borders */ #endif @@ -353,6 +358,27 @@ breakfor: } +/* Use this rather than the 'wprintw()' function to write a blank-padded + * string to the given window, since someone's asserted that printw doesn't + * handle 8-bit characters unlike addstr (though more info would be useful). + * + * We're blank-filling so that with SVr4 curses, it'll show the background + * color to a uniform width in the popup-menu. + */ +#ifndef USE_SLANG +PRIVATE void paddstr ARGS3( + WINDOW *, the_window, + int, width, + char *, the_string) +{ + width -= strlen(the_string); + waddstr(the_window, the_string); + while (width-- > 0) + waddstr(the_window, " "); +} +#endif + + PRIVATE int popup_options ARGS7( int, cur_selection, OptionType *, list, @@ -504,6 +530,13 @@ PRIVATE int popup_options ARGS7( return(orig_selection); } scrollok(form_window, TRUE); +#ifdef NCURSES +#ifdef wgetbkgd +#define getbkgd(w) wgetbkgd(w) /* workaround pre-1.9.9g bug */ +#endif + LYsubwindow(form_window); + wbkgd(form_window, getbkgd(stdscr)); +#endif #else SLsmg_fill_region (top, lx - 1, bottom - top, width + 4, ' '); #endif /* !USE_SLANG */ @@ -533,8 +566,7 @@ redraw: if (i >= window_offset && i - window_offset < length) { #ifndef USE_SLANG wmove(form_window,(i+1)-window_offset,2); - wclrtoeol(form_window); - waddstr(form_window,opt_ptr->name); + paddstr(form_window, width, opt_ptr->name); #else SLsmg_gotorc (top + (i+1)-window_offset, lx - 1 + 2); SLsmg_write_nstring (opt_ptr->name, width); @@ -564,7 +596,7 @@ redraw: if (opt_ptr != NULL) { #ifndef USE_SLANG wmove(form_window,(i+1)-window_offset,2); - waddstr(form_window,opt_ptr->name); + paddstr(form_window, width, opt_ptr->name); #else SLsmg_gotorc (top + (i+1)-window_offset, lx - 1 + 2); SLsmg_write_nstring (opt_ptr->name, width); @@ -579,7 +611,7 @@ redraw: #ifndef USE_SLANG wstart_reverse(form_window); wmove(form_window,(i+1)-window_offset,2); - waddstr(form_window,opt_ptr->name); + paddstr(form_window, width, opt_ptr->name); wstop_reverse(form_window); wrefresh(form_window); #else @@ -1042,6 +1074,9 @@ restore_popup_statusline: } #ifndef USE_SLANG delwin(form_window); +#ifdef NCURSES + LYsubwindow(0); +#endif #endif /* !USE_SLANG */ refresh(); diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 59c9f0ab..dd0b5376 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -26,6 +26,9 @@ #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #ifdef DIRED_SUPPORT #include "LYLocal.h" #endif /* DIRED_SUPPORT */ @@ -358,11 +361,15 @@ Try_Redirected_URL: if ((cp = strchr(doc->address, '~'))) { strncpy(addressbuf, doc->address, cp-doc->address); addressbuf[cp - doc->address] = '\0'; +#ifdef DOSPATH + p = HTDOS_wwwName((char *)Home_Dir()); +#else #ifdef VMS p = HTVMS_wwwName((char *)Home_Dir()); #else p = (char *)Home_Dir(); #endif /* VMS */ +#endif /* DOSPATH */ strcat(addressbuf, p); strcat(addressbuf, cp+1); p = addressbuf; @@ -603,11 +610,15 @@ Try_Redirected_URL: *cp = '\0'; cp += 2; StrAllocCopy(temp, doc->address); +#ifdef DOSPATH + StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); #else StrAllocCat(temp, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ if (*cp) StrAllocCat(temp, cp); StrAllocCopy(doc->address, temp); diff --git a/src/LYGetFile.h b/src/LYGetFile.h index 0a318674..2e4faede 100644 --- a/src/LYGetFile.h +++ b/src/LYGetFile.h @@ -9,7 +9,7 @@ extern BOOLEAN getfile PARAMS((document *doc)); extern int follow_link_number PARAMS((int c, int cur)); extern void add_trusted PARAMS((char *str, int type)); -extern BOOLEAN exec_ok PARAMS((CONST char *source, CONST char *link, int type)); +extern BOOLEAN exec_ok PARAMS((CONST char *source, CONST char *linkpath, int type)); /* values for follow_link_number.c */ #define DO_FORMS_STUFF 1 diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index afd6f53a..5a46b095 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -123,6 +123,7 @@ extern char *pref_charset; /* Lynx's preferred character set - MM */ extern BOOLEAN LYNewsPosting; /* News posting supported if TRUE */ extern char *LynxSigFile; /* Signature file, in or off home */ extern char *system_mail; +extern char *system_mail_flags; extern char *lynx_temp_space; extern char *lynx_save_space; extern BOOLEAN LYforce_HTML_mode; @@ -253,10 +254,16 @@ extern BOOLEAN LYNoRefererHeader; /* Never send Referer header? */ extern BOOLEAN LYNoRefererForThis; /* No Referer header for this URL? */ extern BOOLEAN LYNoFromHeader; /* Never send From header? */ extern BOOLEAN LYListNewsNumbers; +extern BOOLEAN LYUseMouse; extern BOOLEAN LYListNewsDates; extern BOOLEAN LYRawMode; extern BOOLEAN LYDefaultRawMode; extern BOOLEAN LYUseDefaultRawMode; +#ifdef EXP_CHARTRANS +extern char *UCAssume_MIMEcharset; +extern char *UCAssume_localMIMEcharset; +extern char *UCAssume_unrecMIMEcharset; +#endif /* EXP_CHARTRANS */ extern BOOLEAN LYisConfiguredForX; extern char *URLDomainPrefixes; extern char *URLDomainSuffixes; @@ -270,4 +277,14 @@ extern int LYStatusLine; /* Line for statusline() or -1 */ extern BOOLEAN LYCollapseBRs; /* Collapse serial BRs? */ extern BOOLEAN LYSetCookies; /* Process Set-Cookie headers? */ extern char *XLoadImageCommand; /* Default image viewer for X */ + +#define BOOKMARK_TITLE "Bookmark file" +#define MOSAIC_BOOKMARK_TITLE "Converted Mosaic Hotlist" +#define MBM_V_MAXFILES 25 /* Max number of sub-bookmark files */ +/* + * Arrays that holds the names of sub-bookmark files + * and their descriptions. + */ +extern char *MBM_A_subbookmark[MBM_V_MAXFILES+1]; +extern char *MBM_A_subdescript[MBM_V_MAXFILES+1]; #endif /* LYGLOBALDEFS_H */ diff --git a/src/LYHistory.c b/src/LYHistory.c index 54969ef7..9b6daabc 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -311,7 +311,7 @@ PUBLIC int showhistory ARGS1( /* * Make the file a URL now. */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) sprintf(hist_filename,"file://localhost/%s", tempfile); #else sprintf(hist_filename,"file://localhost%s", tempfile); @@ -366,7 +366,7 @@ PUBLIC int showhistory ARGS1( PUBLIC BOOLEAN historytarget ARGS1( document *, newdoc) { - int number, c; + int number; DocAddress WWWDoc; HTParentAnchor *tmpanchor; HText *text; @@ -453,7 +453,7 @@ PUBLIC int LYShowVisitedLinks ARGS1( /* * Make the file a URL now. */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) sprintf(vl_filename,"file://localhost/%s", tempfile); #else sprintf(vl_filename,"file://localhost%s", tempfile); diff --git a/src/LYJump.c b/src/LYJump.c index f7f8d440..e5e67871 100644 --- a/src/LYJump.c +++ b/src/LYJump.c @@ -55,13 +55,13 @@ PUBLIC void LYJumpTable_free NOARGS * Utility for listing shortcuts, making any repeated * shortcut the most current in the list. - FM */ -PUBLIC void LYAddJumpShortcut ARGS2(HTList *,history, char *,shortcut) +PUBLIC void LYAddJumpShortcut ARGS2(HTList *, historyp, char *,shortcut) { char *new; char *old; - HTList *cur = history; + HTList *cur = historyp; - if (!history || !(shortcut && *shortcut)) + if (! historyp || !(shortcut && *shortcut)) return; if ((new = (char *)calloc(1, (strlen(shortcut) + 1))) == NULL) @@ -70,12 +70,12 @@ PUBLIC void LYAddJumpShortcut ARGS2(HTList *,history, char *,shortcut) while (NULL != (old = (char *)HTList_nextObject(cur))) { if (!strcmp(old, new)) { - HTList_removeObject(history, old); + HTList_removeObject(historyp, old); FREE(old); break; } } - HTList_addObject(history, new); + HTList_addObject(historyp, new); return; } diff --git a/src/LYJump.h b/src/LYJump.h index 2329471b..5da8f885 100644 --- a/src/LYJump.h +++ b/src/LYJump.h @@ -21,7 +21,7 @@ struct JumpTable { extern struct JumpTable *JThead; extern void LYJumpTable_free NOPARAMS; -extern void LYAddJumpShortcut PARAMS((HTList *history, char *shortcut)); +extern void LYAddJumpShortcut PARAMS((HTList *the_history, char *shortcut)); extern BOOL LYJumpInit PARAMS((char *config)); extern char *LYJump PARAMS((int key)); diff --git a/src/LYKeymap.h b/src/LYKeymap.h index a06b7942..c5b42c19 100644 --- a/src/LYKeymap.h +++ b/src/LYKeymap.h @@ -12,7 +12,7 @@ extern void set_numbers_as_arrows NOPARAMS; extern void reset_numbers_as_arrows NOPARAMS; extern void print_keymap PARAMS((char **newfile)); extern char *key_for_func PARAMS((int func)); -extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int keyname)); +extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int Keyname)); extern char keymap[]; /* main keymap matrix */ diff --git a/src/LYList.c b/src/LYList.c index bff4f967..59f6d497 100644 --- a/src/LYList.c +++ b/src/LYList.c @@ -69,7 +69,7 @@ PUBLIC int showlist ARGS2(char **, newfile, BOOLEAN, titles) /* * Make the file a URL now. */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) sprintf(list_filename, "file://localhost/%s", tempfile); #else sprintf(list_filename, "file://localhost%s", tempfile); diff --git a/src/LYLocal.c b/src/LYLocal.c index 6ef0ad65..3dd45b97 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -58,6 +58,7 @@ struct dired_menu { # define DE_TAG 1 # define DE_DIR 2 # define DE_FILE 3 +#define DE_SYMLINK 4 char *sfx; char *link; char *rest; @@ -76,21 +77,37 @@ struct dired_menu { { 0, "", "New Directory", "(in current directory)", "LYNXDIRED://NEW_FOLDER%d", NULL }, -{ 0, "", "Install", +{ DE_FILE, "", "Install", +"(of current selection)", "LYNXDIRED://INSTALL_SRC%p", NULL }, +{ DE_DIR, "", "Install", "(of current selection)", "LYNXDIRED://INSTALL_SRC%p", NULL }, -{ 0, "", "Modify Name", +{ DE_FILE, "", "Modify File Name", +"(of current selection)", "LYNXDIRED://MODIFY_NAME%p", NULL }, +{ DE_DIR, "", "Modify Directory Name", "(of current selection)", "LYNXDIRED://MODIFY_NAME%p", NULL }, +{ DE_SYMLINK, "", "Modify Name", +"(of selected symbolic link)", "LYNXDIRED://MODIFY_NAME%p", NULL }, #ifdef OK_PERMIT -{ 0, "", "Permit Name", +{ DE_FILE, "", "Modify File Permissions", +"(of current selection)", "LYNXDIRED://PERMIT_SRC%p", NULL }, +{ DE_DIR, "", "Modify Directory Permissions", "(of current selection)", "LYNXDIRED://PERMIT_SRC%p", NULL }, #endif /* OK_PERMIT */ -{ 0, "", "Change Location", -"(of current selection)", "LYNXDIRED://MODIFY_LOCATION%p", NULL }, +{ DE_FILE, "", "Change Location", +"(of selected file)" , "LYNXDIRED://MODIFY_LOCATION%p", NULL }, +{ DE_DIR, "", "Change Location", +"(of selected directory)", "LYNXDIRED://MODIFY_LOCATION%p", NULL }, +{ DE_SYMLINK, "", "Change Location", +"(of selected symbolic link)", "LYNXDIRED://MODIFY_LOCATION%p", NULL }, -{ 0, "", "Remove", +{ DE_FILE, "", "Remove File", + "(current selection)", "LYNXDIRED://REMOVE_SINGLE%p", NULL }, +{ DE_DIR, "", "Remove Directory", + "(current selection)", "LYNXDIRED://REMOVE_SINGLE%p", NULL }, +{ DE_SYMLINK, "", "Remove Symbolic Link", "(current selection)", "LYNXDIRED://REMOVE_SINGLE%p", NULL }, #if defined(OK_UUDECODE) && !defined(ARCHIVE_ONLY) @@ -1508,16 +1525,19 @@ PUBLIC int dired_options ARGS2( { static char tempfile[128]; static BOOLEAN first = TRUE; - char dired_filename[256]; char path[512], dir[512]; /* much too large */ char tmpbuf[LINESIZE]; lynx_html_item_type *nxt; struct stat dir_info; FILE *fp0; - char *cp,*tp = NULL; - /* char *escaped; */ - char * dir_url = NULL; - char * path_url = NULL; + char *cp = NULL; + char * dir_url = NULL; /* will hold URL-escaped path of + directory from where DIRED_MENU was + invoked (NOT its full URL) */ + char * path_url = NULL; /* will hold URL-escaped path of file + (or directory) which was selected + when DIRED_MENU was invoked (NOT + its full URL) */ BOOLEAN nothing_tagged; int count; struct dired_menu *mp; @@ -1536,9 +1556,8 @@ PUBLIC int dired_options ARGS2( } /* make the tempfile a URL */ - strcpy(dired_filename, "file://localhost"); - strcat(dired_filename, tempfile); - StrAllocCopy(*newfile, dired_filename); + StrAllocCopy(*newfile, "file://localhost"); + StrAllocCat(*newfile, tempfile); cp = doc->address; if(!strncmp(cp,"file://localhost",16)) @@ -1576,19 +1595,11 @@ PUBLIC int dired_options ARGS2( return 0; } -#ifdef NOTDEFINED - if ((cp = strrchr(path,'.')) != NULL && strlen(path) > strlen(cp)) { - *cp = '\0'; - tp = strrchr(path,'.'); - *cp = '.'; - } -#endif /* NOTDEFINED */ } else { path[0] = '\0'; StrAllocCopy(path_url, path); } - /*escaped = (char *) HTEscape(path,(unsigned char) 4); path_url instead- kw*/ nothing_tagged = (HTList_isEmpty(tagged)); fprintf(fp0,"<head>\n<title>%s</title></head>\n<body>\n",DIRED_MENU_TITLE); @@ -1648,11 +1659,18 @@ PUBLIC int dired_options ARGS2( continue; if (mp->cond == DE_TAG && nothing_tagged) continue; - if (mp->cond == DE_DIR && (dir_info.st_mode & S_IFMT) != S_IFDIR) + if (mp->cond == DE_DIR && + (!*path || (dir_info.st_mode & S_IFMT) != S_IFDIR)) continue; - if (mp->cond == DE_FILE && (dir_info.st_mode & S_IFMT) != S_IFREG) + if (mp->cond == DE_FILE && + (!*path || (dir_info.st_mode & S_IFMT) != S_IFREG)) continue; - if (strcmp(mp->sfx, &path[strlen(path)-strlen(mp->sfx)]) != 0) + if (mp->cond == DE_SYMLINK && + (!*path || (dir_info.st_mode & S_IFMT) != S_IFLNK)) + continue; + if (*mp->sfx && + (strlen(path) < strlen(mp->sfx) || + strcmp(mp->sfx, &path[strlen(path)-strlen(mp->sfx)]) != 0)) continue; fprintf(fp0, "<a href=\"%s", render_item(mp->href, path_url, dir_url, buf,2048, YES)); @@ -1673,7 +1691,6 @@ PUBLIC int dired_options ARGS2( fprintf(fp0,"</body>\n"); fclose(fp0); - /* FREE(escaped); not used any more - kw*/ FREE(dir_url); FREE(path_url); @@ -1787,9 +1804,10 @@ PUBLIC BOOLEAN local_install ARGS3( char tmpbuf[512]; static char savepath[512]; /* this will be the link that is to be installed */ struct stat dir_info; - char *args[5]; + char *args[6]; HTList *tag; int count = 0; + int n = 0, src; /* indices into 'args[]' */ /* Determine the status of the selected item. */ @@ -1838,23 +1856,27 @@ PUBLIC BOOLEAN local_install ARGS3( } statusline("Just a moment, ..."); - args[0] = "install"; - args[2] = destpath; - args[3] = (char *) 0; + args[n++] = "install"; +#ifdef INSTALL_ARGS + args[n++] = INSTALL_ARGS; +#endif + src = n++; + args[n++] = destpath; + args[n] = (char *) 0; sprintf(tmpbuf, "install %s", destpath); tag = tagged; if (HTList_isEmpty(tagged)) { - args[1] = savepath; + args[src] = savepath; if (my_spawn(INSTALL_PATH, args, tmpbuf) <= 0) return (-1); count++; } else { char * name; while ((name = (char *)HTList_nextObject(tag))) { - args[1] = name; - if (strncmp("file://localhost", args[1], 16) == 0) - args[1] = name + 16; + args[src] = name; + if (strncmp("file://localhost", args[src], 16) == 0) + args[src] = name + 16; if (my_spawn(INSTALL_PATH, args, tmpbuf) <= 0) return ((count == 0) ? -1 : count); @@ -1898,10 +1920,12 @@ PUBLIC void add_menu_item ARGS1( *cp++ = '\0'; if (strcasecomp(str, "tag") == 0) new->cond = DE_TAG; - if (strcasecomp(str, "dir") == 0) + else if (strcasecomp(str, "dir") == 0) new->cond = DE_DIR; - if (strcasecomp(str, "file") == 0) + else if (strcasecomp(str, "file") == 0) new->cond = DE_FILE; + else if (strcasecomp(str, "link") == 0) + new->cond = DE_SYMLINK; /* conditional on matching suffix */ str = cp; diff --git a/src/LYMail.c b/src/LYMail.c index 639f0f46..b943efb2 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -10,6 +10,7 @@ #include "LYSystem.h" #include "LYGlobalDefs.h" #include "HTParse.h" +#include "LYMail.h" #include "LYLeaks.h" @@ -36,8 +37,8 @@ PUBLIC void mailform ARGS4( char self[80]; char cmd[512]; int len, i, ch; -#ifdef VMS - char tmpfile[256]; +#if defined(VMS) || defined(DOSPATH) + char my_tempfile[256]; char *address_ptr1, *address_ptr2; BOOLEAN first = TRUE; #endif /* VMS */ @@ -176,9 +177,9 @@ PUBLIC void mailform ARGS4( return; } -#ifdef VMS - sprintf(tmpfile, "%s%s", lynx_temp_space, "temp_mail.txt"); - if ((fd = fopen(tmpfile,"w")) == NULL) { +#if defined(VMS) || defined(DOSPATH) + sprintf(my_tempfile, "%s%s", lynx_temp_space, "temp_mail.txt"); + if ((fd = fopen(my_tempfile,"w")) == NULL) { HTAlert(FORM_MAILTO_FAILED); FREE(address); return; @@ -192,6 +193,7 @@ PUBLIC void mailform ARGS4( StrAllocCat(address, cp); } } +#ifdef VMS if (mailto_type && !strncasecomp(mailto_type, "multipart/form-data", 19)) { /* @@ -202,11 +204,19 @@ PUBLIC void mailform ARGS4( fprintf(fd, "X-Content-Type: %s\n\n", mailto_type); } #else -#ifdef MMDF - sprintf(cmd, "%s -mlruxto,cc\\*",system_mail); + if (mailto_type && *mailto_type) { + fprintf(fd, "Mime-Version: 1.0\n"); + fprintf(fd, "Content-Type: %s\n", mailto_type); + } + fprintf(fd,"To: %s\n", address); + if (personal_mail_address && *personal_mail_address) + fprintf(fd,"From: %s\n", personal_mail_address); + remove_tildes(self); + fprintf(fd,"Subject: %.70s\n\n", subject); +#endif + #else - sprintf(cmd, "%s -t -oi", system_mail); -#endif /* MMDF */ + sprintf(cmd, "%s %s", system_mail, system_mail_flags); if ((fd = popen(cmd, "w")) == NULL) { HTAlert(FORM_MAILTO_FAILED); @@ -264,12 +274,13 @@ PUBLIC void mailform ARGS4( pclose(fd); sleep(MessageSecs); #endif /* UNIX */ -#ifdef VMS +#if defined(VMS) || defined(DOSPATH) fclose(fd); +#ifdef VMS sprintf(cmd, "%s %s/subject=\"%.70s\" %s ", system_mail, (strncasecomp(system_mail, "MAIL", 4) ? "" : "/noself"), - subject, tmpfile); + subject, my_tempfile); address_ptr1 = address; do { @@ -288,13 +299,15 @@ PUBLIC void mailform ARGS4( address_ptr1 = address_ptr2; } while (address_ptr1 != NULL); - +#else + sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tempfile); +#endif stop_curses(); printf("Sending form content:\n\n$ %s\n\nPlease wait...", cmd); system(cmd); sleep(MessageSecs); start_curses(); - remove(tmpfile); + remove(my_tempfile); #endif /* VMS */ FREE(address); @@ -311,9 +324,8 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, FILE *fd, *fp; char *address = NULL; char cmd[512], *cp, *cp0, *cp1; - int i; -#ifdef VMS - char tmpfile[256]; +#if defined(VMS) || defined(DOSPATH) + char my_tempfile[256]; char *address_ptr1, *address_ptr2; BOOLEAN first = TRUE; #endif /* VMS */ @@ -348,11 +360,7 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, } #ifdef UNIX -#ifdef MMDF - sprintf(cmd, "%s -mlruxto,cc\\*", system_mail); -#else - sprintf(cmd, "%s -t -oi", system_mail); -#endif /* MMDF */ + sprintf(cmd, "%s %s", system_mail, system_mail_flags); if ((fd = popen(cmd, "w")) == NULL) { FREE(address); @@ -364,9 +372,9 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, fprintf(fd,"X-URL: %s\n", filename); fprintf(fd,"X-Mailer: Lynx, Version %s\n\n", LYNX_VERSION); #endif /* UNIX */ -#ifdef VMS - sprintf(tmpfile, "%s%s", lynx_temp_space, "temp_mail.txt"); - if ((fd = fopen(tmpfile,"w")) == NULL) { +#if defined(VMS) || defined(DOSPATH) + sprintf(my_tempfile, "%s%s", lynx_temp_space, "temp_mail.txt"); + if ((fd = fopen(my_tempfile,"w")) == NULL) { FREE(address); return; } @@ -392,10 +400,11 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, #ifdef UNIX pclose(fd); #endif /* UNIX */ -#ifdef VMS +#if defined(VMS) || defined(DOSPATH) fclose(fd); +#ifdef VMS sprintf(cmd, "%s /subject=\"Lynx Error in %s\" %s ", - system_mail, filename, tmpfile); + system_mail, filename, my_tempfile); address_ptr1 = address; do { @@ -415,8 +424,11 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, address_ptr1 = address_ptr2; } while (address_ptr1 != NULL); +#else + sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tempfile); +#endif system(cmd); - remove(tmpfile); + remove(my_tempfile); #endif /* VMS */ if (traversal) { @@ -425,7 +437,9 @@ PUBLIC void mailmsg ARGS4(int,cur, char *,owner_address, if ((ofp = fopen(TRAVERSE_ERRORS,"a+")) == NULL) { if ((ofp = fopen(TRAVERSE_ERRORS,"w")) == NULL) { perror(NOOPEN_TRAV_ERR_FILE); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -465,7 +479,10 @@ PUBLIC void reply_by_mail ARGS3( char *temp = NULL; int i, len; int c = 0; /* user input */ - char tmpfile[256], cmd[512]; + char my_tempfile[256], cmd[512]; +#ifdef DOSPATH + char tmpfile2[256]; +#endif static char *personal_name = NULL; char subject[80]; #ifdef VMS @@ -486,16 +503,16 @@ PUBLIC void reply_by_mail ARGS3( return; } - tempname(tmpfile,NEW_FILE); - if (((cp = strrchr(tmpfile, '.')) != NULL) && + tempname(my_tempfile,NEW_FILE); + if (((cp = strrchr(my_tempfile, '.')) != NULL) && #ifdef VMS NULL == strchr(cp, ']') && #endif /* VMS */ NULL == strchr(cp, '/')) { *cp = '\0'; - strcat(tmpfile, ".txt"); + strcat(my_tempfile, ".txt"); } - if ((fd = fopen(tmpfile,"w")) == NULL) { + if ((fd = fopen(my_tempfile,"w")) == NULL) { HTAlert(MAILTO_URL_TEMPOPEN_FAILED); return; } @@ -663,7 +680,7 @@ PUBLIC void reply_by_mail ARGS3( FREE(address); FREE(body); fclose(fd); /* Close the tmpfile. */ - remove(tmpfile); /* Delete the tmpfile. */ + remove(my_tempfile); /* Delete the tmpfile. */ HTAlert(NO_ADDRESS_IN_MAILTO_URL); return; } @@ -692,8 +709,10 @@ PUBLIC void reply_by_mail ARGS3( /* * Put the To: line in the header. */ +#ifndef DOSPATH sprintf(buf,"To: %s\n", address); StrAllocCopy(header, buf); +#endif /* * Put the X-URL and X-Mailer lines in the header. */ @@ -868,7 +887,7 @@ PUBLIC void reply_by_mail ARGS3( } addstr("\n"); remove_tildes(user_input); -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) if (*user_input) { cp = user_input; while (*cp == ' ' || *cp == ',') @@ -878,6 +897,13 @@ PUBLIC void reply_by_mail ARGS3( StrAllocCat(address, cp); } } +#ifdef DOSPATH + if (*address) { + sprintf(buf,"To: %s\n",address); + StrAllocCat(header, buf); + } +#endif + #else if (*user_input) { sprintf(buf,"Cc: %s\n",user_input); @@ -930,7 +956,7 @@ PUBLIC void reply_by_mail ARGS3( if (strstr(editor, "pico")) { editor_arg = " -t"; /* No prompt for filename to use */ } - sprintf(user_input,"%s%s %s",editor,editor_arg,tmpfile); + sprintf(user_input,"%s%s %s",editor,editor_arg,my_tempfile); _statusline(SPAWNING_EDITOR_FOR_MAIL); stop_curses(); if (system(user_input)) { @@ -1050,7 +1076,7 @@ PUBLIC void reply_by_mail ARGS3( !term_letter && c != 7 && c != 3) c = LYgetch(); if (TOUPPER(c) == 'Y') { - if ((fd = fopen(tmpfile, "a")) != NULL) { + if ((fd = fopen(my_tempfile, "a")) != NULL) { fputs("-- \n", fd); while (fgets(user_input, sizeof(user_input), fp) != NULL) { fputs(user_input, fd); @@ -1072,7 +1098,7 @@ PUBLIC void reply_by_mail ARGS3( sprintf(cmd, "%s %s/subject=\"%s\" %s ", system_mail, (strncasecomp(system_mail, "MAIL", 4) ? "" : "/noself"), - subject, tmpfile); + subject, my_tempfile); /* * Now add all the people in the address field. @@ -1111,11 +1137,19 @@ PUBLIC void reply_by_mail ARGS3( * Send the tmpfile into sendmail. */ _statusline(SENDING_YOUR_MSG); -#ifdef MMDF - sprintf(cmd, "%s -mlruxto,cc\\*",system_mail); + sprintf(cmd, "%s %s", system_mail, system_mail_flags); +#ifdef DOSPATH + tempname(tmpfile2,NEW_FILE); + if (((cp = strrchr(tmpfile2, '.')) != NULL) && + NULL == strchr(cp, '/')) { + *cp = '\0'; + strcat(tmpfile2, ".txt"); + } + if ((fp = fopen(tmpfile2,"w")) == NULL) { + HTAlert(MAILTO_URL_TEMPOPEN_FAILED); + return; + } #else - sprintf(cmd,"%s -t -oi", system_mail); -#endif /* MMDF */ signal(SIGINT, SIG_IGN); fp = popen(cmd, "w"); if (fp == NULL) { @@ -1123,7 +1157,8 @@ PUBLIC void reply_by_mail ARGS3( sleep(InfoSecs); goto cleanup; } - fd = fopen(tmpfile, "r"); +#endif /* DOSPATH */ + fd = fopen(my_tempfile, "r"); if (fd == NULL) { _statusline(COMMENT_REQUEST_CANCELLED); sleep(InfoSecs); @@ -1133,7 +1168,18 @@ PUBLIC void reply_by_mail ARGS3( fputs(header, fp); while ((n = fread(buf, 1, sizeof(buf), fd)) != 0) fwrite(buf, 1, n, fp); +#ifdef DOSPATH + sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, tmpfile2); + fclose(fp); /* Close the tmpfile. */ + stop_curses(); + printf("Sending your comment:\n\n$ %s\n\nPlease wait...", cmd); + system(cmd); + sleep(MessageSecs); + start_curses(); + remove(tmpfile2); /* Delete the tmpfile. */ +#else pclose(fp); +#endif fclose(fd); /* Close the tmpfile. */ if (TRACE) @@ -1145,15 +1191,15 @@ PUBLIC void reply_by_mail ARGS3( */ cleanup: signal(SIGINT, cleanup_sig); -#ifndef VMS +#if !defined(VMS) && !defined(DOSPATH) FREE(header); #endif /* !VMS */ -#ifdef VMS +#if defined(VMS) || defined(DOSPATH) cleandown: #endif /* VMS */ term_letter = FALSE; - remove(tmpfile); /* Delete the tmpfile. */ + remove(my_tempfile); /* Delete the tmpfile. */ FREE(address); FREE(body); return; @@ -1164,7 +1210,7 @@ PRIVATE void terminate_letter ARGS1(int,sig) term_letter = TRUE; /* Reassert the AST */ signal(SIGINT, terminate_letter); -#ifdef VMS +#if defined(VMS) || defined(DOSPATH) /* Refresh the screen to get rid of the "interrupt" message */ if (!dump_output_immediately) { clearok(curscr, TRUE); diff --git a/src/LYMail.h b/src/LYMail.h index b14ab5f4..ce2d9aed 100644 --- a/src/LYMail.h +++ b/src/LYMail.h @@ -6,6 +6,8 @@ #include "LYStructs.h" #endif /* LYSTRUCTS_H */ +extern BOOLEAN term_letter; + extern void mailform PARAMS(( char * mailto_address, char * mailto_subject, diff --git a/src/LYMain.c b/src/LYMain.c index ae103c36..b6a36167 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -18,12 +18,18 @@ #include "LYClean.h" #include "LYCharSets.h" #include "LYCharUtils.h" +#ifdef EXP_CHARTRANS +#include "UCMap.h" +#endif /* EXP_CHARTRANS */ #include "LYReadCFG.h" #include "LYrcFile.h" #include "LYKeymap.h" #include "LYList.h" #include "LYJump.h" #include "LYBookmark.h" +#ifdef DOSPATH +#include "HTDOS.h" +#endif #ifndef VMS #ifdef SYSLOG_REQUESTED_URLS @@ -254,6 +260,7 @@ PUBLIC char *pref_charset = NULL; /* preferred character set */ PUBLIC BOOLEAN LYNewsPosting = NEWS_POSTING; /* News posting supported? */ PUBLIC char *LynxSigFile = NULL; /* Signature file, in or off home */ PUBLIC char *system_mail = NULL; /* The path for sending mail */ +PUBLIC char *system_mail_flags = NULL; /* The flags for sending mail */ PUBLIC char *lynx_temp_space = NULL; /* The prefix for temporary file paths */ PUBLIC char *lynx_save_space = NULL; /* The prefix for save to disk paths */ PUBLIC char *LYHostName = NULL; /* treat as a local host name */ @@ -275,11 +282,20 @@ PUBLIC char *form_get_data = NULL; /* User data for get form */ PUBLIC char *http_error_file = NULL; /* Place HTTP status code in this file */ /* Id:Password for protected forms */ PUBLIC char *authentication_info[2] = {NULL, NULL}; + +PUBLIC char *MBM_A_subbookmark[MBM_V_MAXFILES+1]; +PUBLIC char *MBM_A_subdescript[MBM_V_MAXFILES+1]; + PUBLIC BOOLEAN HEAD_request = FALSE; PUBLIC BOOLEAN scan_for_buried_news_references = TRUE; PUBLIC BOOLEAN LYRawMode; PUBLIC BOOLEAN LYDefaultRawMode; PUBLIC BOOLEAN LYUseDefaultRawMode = TRUE; +#ifdef EXP_CHARTRANS +PUBLIC char *UCAssume_MIMEcharset = NULL; +PUBLIC char *UCAssume_localMIMEcharset = NULL; +PUBLIC char *UCAssume_unrecMIMEcharset = NULL; +#endif /* EXP_CHARTRANS */ PUBLIC int LYlines = 24; PUBLIC int LYcols = 80; PUBLIC linkstruct links[MAXLINKS]; @@ -293,6 +309,7 @@ PUBLIC int AlertSecs; /* Seconds to sleep() for HTAlert() messages */ PUBLIC BOOLEAN bookmark_start = FALSE; PUBLIC char *LYUserAgent = NULL; /* Lynx User-Agent header */ PUBLIC char *LYUserAgentDefault = NULL; /* Lynx default User-Agent header */ +PUBLIC BOOLEAN LYUseMouse = FALSE; PUBLIC BOOLEAN LYNoRefererHeader=FALSE; /* Never send Referer header? */ PUBLIC BOOLEAN LYNoRefererForThis=FALSE;/* No Referer header for this URL? */ PUBLIC BOOLEAN LYNoFromHeader = TRUE; /* Never send From header? */ @@ -322,8 +339,6 @@ extern BOOL reloading; /* For Flushing Cache on Proxy Server (HTTP.c) */ extern int HTNewsChunkSize; /* Number of news articles per chunk (HTNews.c) */ extern int HTNewsMaxChunk; /* Max news articles before chunking (HTNews.c) */ -extern int mainloop NOPARAMS; - PRIVATE BOOLEAN anon_restrictions_set = FALSE; PRIVATE BOOLEAN stack_dump = FALSE; PRIVATE char *terminal = NULL; @@ -386,6 +401,7 @@ PRIVATE void free_lynx_globals NOARGS FREE(pref_charset); FREE(LynxSigFile); FREE(system_mail); + FREE(system_mail_flags); FREE(LYUserAgent); FREE(LYUserAgentDefault); FREE(LYHostName); @@ -433,6 +449,34 @@ PUBLIC int main ARGS2( FILE *fp; char filename[256]; +#ifdef _WINDOWS +WSADATA WSAData; + { + int err; + WORD wVerReq; + + _fmode = O_BINARY; + + wVerReq = MAKEWORD(1,1); + + err = WSAStartup(wVerReq, &WSAData); + if (err != 0) + { + printf("No Winsock found, sorry."); + sleep(5); + return; + } + } +#endif /* _WINDOWS */ + +#ifdef DJGPP + sock_init(); +#endif + +#ifdef DOSPATH + terminal = "vt100"; +#endif + /* * Set up the argument list. */ @@ -530,6 +574,14 @@ PUBLIC int main ARGS2( StrAllocCopy(language, PREFERRED_LANGUAGE); StrAllocCopy(pref_charset, PREFERRED_CHARSET); StrAllocCopy(system_mail, SYSTEM_MAIL); + StrAllocCopy(system_mail_flags, SYSTEM_MAIL_FLAGS); +#ifdef DOSPATH + if ((cp = getenv("TEMP")) != NULL) + StrAllocCopy(lynx_temp_space, cp); + else if ((cp = getenv("TMP")) != NULL) + StrAllocCopy(lynx_temp_space, cp); + else +#endif if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL) StrAllocCopy(lynx_temp_space, cp); else @@ -539,11 +591,15 @@ PUBLIC int main ARGS2( StrAllocCopy(temp, lynx_temp_space); if (((len = strlen(temp)) > 0) && temp[len-1] == '/') temp[len-1] = '\0'; +#ifdef DOSPATH + StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); #else StrAllocCat(temp, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ StrAllocCat(temp, cp); StrAllocCopy(lynx_temp_space, temp); FREE(temp); @@ -583,7 +639,6 @@ PUBLIC int main ARGS2( } #else { - len; if (((len = strlen(lynx_temp_space)) > 1) && lynx_temp_space[len-1] != '/') { StrAllocCat(lynx_temp_space, "/"); @@ -665,15 +720,15 @@ PUBLIC int main ARGS2( * set the default restrictions for that account NOW. - FM */ if (!anon_restrictions_set && strlen((char *)ANONYMOUS_USER) > 0 && -#ifdef VMS +#if defined (VMS) || defined (NOUSERS) !strcasecomp(((char *)getenv("USER")==NULL ? " " : getenv("USER")), ANONYMOUS_USER)) { #else -#ifdef NO_CUSERID - STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) { -#else +#if HAVE_CUSERID STREQ((char *)cuserid((char *) NULL), ANONYMOUS_USER)) { -#endif /* NO_CUSERID */ +#else + STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) { +#endif /* HAVE_CUSERID */ #endif /* VMS */ parse_restrictions("default"); anon_restrictions_set = TRUE; @@ -702,20 +757,26 @@ PUBLIC int main ARGS2( /* * Convert a '~' in the configuration file path to $HOME. */ +#ifndef _WINDOWS /* avoid the whole ~ thing for now */ if ((cp = strchr(lynx_cfg_file, '~'))) { *(cp++) = '\0'; StrAllocCopy(temp, lynx_cfg_file); if (((len = strlen(temp)) > 0) && temp[len-1] == '/') temp[len-1] = '\0'; +#ifdef DOSPATH + StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); #else StrAllocCat(temp, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ StrAllocCat(temp, cp); StrAllocCopy(lynx_cfg_file, temp); FREE(temp); } +#endif /* _WINDOWS */ /* * If the configuration file is not available, @@ -728,6 +789,17 @@ PUBLIC int main ARGS2( } fclose(fp); +#ifdef EXP_CHARTRANS + /* + * Make sure we have the character sets declared. + * This will initialize the CHARTRANS handling. - kw + */ + if (!LYCharSetsDeclared()) { + fprintf(stderr, "\nLynx character sets not declared.\n\n"); + exit(-1); + } +#endif /* EXP_CHARTRANS */ + /* * Make sure we have the edit map declared. - FM */ @@ -736,7 +808,7 @@ PUBLIC int main ARGS2( exit(-1); } -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(COLOR_CURSES) /* * Set up default foreground and background colors. */ @@ -785,11 +857,15 @@ PUBLIC int main ARGS2( StrAllocCopy(temp, lynx_save_space); if (((len = strlen(temp)) > 0) && temp[len-1] == '/') temp[len-1] = '\0'; +#ifdef DOSPATH + StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); #else StrAllocCat(temp, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ StrAllocCat(temp, cp); StrAllocCopy(lynx_save_space, temp); FREE(temp); @@ -875,10 +951,10 @@ PUBLIC int main ARGS2( */ if (argc == 2 && strcmp(argv[1], "-") == 0) { char buf[1025]; - char *argv[2]; + char *my_args[2]; - argv[0] = buf; - argv[1] = NULL; + my_args[0] = buf; + my_args[1] = NULL; while (fgets(buf, sizeof(buf) - 1, stdin)) { int j; @@ -887,7 +963,7 @@ PUBLIC int main ARGS2( (buf[j] == CR || buf[j] == LF); j--) { buf[j] = '\0'; } - parse_arg(argv, NULL, -1); + parse_arg(my_args, NULL, -1); } } else { for (i = 1; i < argc; i++) { @@ -960,7 +1036,9 @@ PUBLIC int main ARGS2( /* trap interrupts */ if (!dump_output_immediately) +#ifndef NOSIGHUP (void) signal(SIGHUP, cleanup_sig); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, cleanup_sig); #ifdef SIGWINCH (void) signal(SIGWINCH, size_change); @@ -969,7 +1047,9 @@ PUBLIC int main ARGS2( if (!TRACE && !dump_output_immediately && !stack_dump) { (void) signal(SIGINT, cleanup_sig); #ifndef __linux__ +#ifndef DOSPATH (void) signal(SIGBUS, FatalProblem); +#endif /* DOSPATH */ #endif /* !__linux__ */ (void) signal(SIGSEGV, FatalProblem); (void) signal(SIGILL, FatalProblem); @@ -982,7 +1062,9 @@ PUBLIC int main ARGS2( * So the runaway CPU time problem on Unix should not occur any * more. */ +#ifndef DOSPATH (void) signal(SIGPIPE, SIG_IGN); +#endif /* DOSPATH */ } #endif /* !VMS */ @@ -1025,7 +1107,7 @@ PUBLIC int main ARGS2( * Set up the inside/outside domain restriction flags. - FM */ if (inlocaldomain()) { -#if defined(NO_UTMP) || defined(VMS) /* not selective */ +#if !defined(HAVE_UTMP) || defined(VMS) /* not selective */ telnet_ok = !no_inside_telnet && !no_outside_telnet && telnet_ok; news_ok = !no_inside_news && !no_outside_news && news_ok; ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok; @@ -1037,7 +1119,7 @@ PUBLIC int main ARGS2( news_ok = !no_inside_news && news_ok; ftp_ok = !no_inside_ftp && ftp_ok; rlogin_ok = !no_inside_rlogin && rlogin_ok; -#endif /* NO_UTMP || VMS */ +#endif /* !HAVE_UTMP || VMS */ } else { if (TRACE) fprintf(stderr,"LYMain.c: User in REMOTE domain\n"); @@ -1062,7 +1144,9 @@ PUBLIC int main ARGS2( fprintf(stderr, "The '-head' switch is for http HEAD requests and cannot be used for\n'%s'.\n", startfile); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1081,7 +1165,9 @@ PUBLIC int main ARGS2( fprintf(stderr, "The '-mime_header' switch is for http URLs and cannot be used for\n'%s'.\n", startfile); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1100,7 +1186,9 @@ PUBLIC int main ARGS2( fprintf(stderr, "The '-traversal' switch is for http URLs and cannot be used for\n'%s'.\n", startfile); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1161,7 +1249,9 @@ PUBLIC int main ARGS2( status = mainloop(); if (!nolist && keypad_mode == LINKS_ARE_NUMBERED) printlist(stdout,FALSE); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1275,6 +1365,44 @@ PRIVATE void parse_arg ARGS3( parse_restrictions("default"); anon_restrictions_set = TRUE; +#ifdef EXP_CHARTRANS + } else if ((strncmp(argv[0], "-assume_charset", 15) == 0) || + (strncmp(argv[0], "-assume_local_charset", 21) == 0) || + (strncmp(argv[0], "-assume_unrec_charset", 21) == 0)) { + BOOL local_flag = (argv[0][8] == 'l'); + BOOL unrec_flag = (argv[0][8] == 'u'); + if (nextarg) { + int j; + for (j = 0; cp[j]; j++) + cp[j] = TOLOWER(cp[j]); + if (local_flag) { + StrAllocCopy(UCAssume_localMIMEcharset, cp); + if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset) + UCLYhndl_HTFile_for_unspec = + UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); + } else if (unrec_flag) { + StrAllocCopy(UCAssume_unrecMIMEcharset, cp); + if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset) + UCLYhndl_for_unrec = + UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); + } else { + StrAllocCopy(UCAssume_MIMEcharset, cp); + if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) + UCLYhndl_for_unspec = + UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + } + } else { + if (local_flag) + UCLYhndl_HTFile_for_unspec = 0; + else if (unrec_flag) + UCLYhndl_for_unrec = 0; + else + UCLYhndl_for_unspec = 0; + } + + +#endif + } else if (strncmp(argv[0], "-auth", 5) == 0) { /* * Authentication information for protected forms. @@ -1789,7 +1917,7 @@ PRIVATE void parse_arg ARGS3( file_url disallow using G)oto, served links or bookmarks for\n\ file: URL's\n\ goto disable the 'g' (goto) command\n"); -#if defined(NO_UTMP) || defined(VMS) /* not selective */ +#if !defined(HAVE_UTMP) || defined(VMS) /* not selective */ printf("\ inside_ftp disallow ftps for people coming from inside your\n\ domain (utmp required for selectivity)\n\ @@ -1806,14 +1934,14 @@ PRIVATE void parse_arg ARGS3( your domain\n\ inside_rlogin disallow rlogins for people coming from inside your domain\n\ inside_telnet disallow telnets for people coming from inside your domain\n"); -#endif /* NO_UTMP || VMS */ +#endif /* HAVE_UTMP || VMS */ printf("\ jump disable the 'j' (jump) command\n\ mail disallow mail\n\ multibook disallow multiple bookmark files\n\ news_post disallow USENET News posting.\n\ option_save disallow saving options in .lynxrc\n"); -#if defined(NO_UTMP) || defined(VMS) /* not selective */ +#if !defined(HAVE_UTMP) || defined(VMS) /* not selective */ printf("\ outside_ftp disallow ftps for people coming from outside your\n\ domain (utmp required for selectivity)\n\ @@ -1830,7 +1958,7 @@ PRIVATE void parse_arg ARGS3( your domain\n\ outside_rlogin disallow rlogins for people coming from outside your domain\n\ outside_telnet disallow telnets for people coming from outside your domain\n"); -#endif /* NO_UTMP || VMS */ +#endif /* !HAVE_UTMP || VMS */ printf("\ print disallow most print options\n\ shell disallow shell escapes, and lynxexec, lynxprog or lynxcgi\n\ @@ -1927,6 +2055,10 @@ PRIVATE void parse_arg ARGS3( else use_underscore = TRUE; +#ifdef NCURSES_MOUSE_VERSION + } else if (strncmp(argv[0], "-use_mouse", 9) == 0) { + LYUseMouse = TRUE; +#endif } else { goto Output_Error_and_Help_List; } @@ -1976,6 +2108,11 @@ Output_Help_List: printf(" - receive the arguments from stdin (enclose\n"); printf(" in double-quotes (\"-\") on VMS)\n"); printf(" -anonymous used to specify the anonymous account\n"); +#ifdef EXP_CHARTRANS + printf(" -assume_charset charset for documents that don't specify it\n"); + printf(" -assume_local_charset charset assumed for local files\n"); + printf(" -assume_unrec_charset use this instead of unrecognized charsets\n"); +#endif /* EXP_CHARTRANS */ printf(" -auth=id:pw authentication information for protected forms\n"); printf(" -base prepend a request URL comment and BASE tag to text/html\n"); printf(" outputs for -source or -mime_header dumps\n"); @@ -2070,6 +2207,9 @@ Output_Help_List: printf(" -trace turns on WWW trace mode\n"); printf(" -traversal traverse all http links derived from startfile\n"); printf(" -underscore toggles use of _underline_ format in dumps\n"); +#ifdef NCURSES_MOUSE_VERSION + printf(" -use_mouse enable use of the mouse\n"); +#endif printf(" -validate accept only http URLs (for validation)\n"); printf(" -version print Lynx version information\n"); printf(" -vikeys enable vi-like key movement\n"); @@ -2088,11 +2228,15 @@ PRIVATE void FatalProblem ARGS1( /* * Ignore further interrupts. - mhc: 11/2/91 */ - (void) signal (SIGHUP, SIG_IGN); +#ifndef NOSIGHUP + (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal (SIGTERM, SIG_IGN); (void) signal (SIGINT, SIG_IGN); #ifndef __linux__ +#ifndef DOSPATH (void) signal(SIGBUS, SIG_IGN); +#endif /* ! DOSPATH */ #endif /* !__linux__ */ (void) signal(SIGSEGV, SIG_IGN); (void) signal(SIGILL, SIG_IGN); @@ -2111,7 +2255,9 @@ PRIVATE void FatalProblem ARGS1( } cleanup_sig(0); #ifndef __linux__ +#ifndef DOSPATH signal(SIGBUS, SIG_DFL); +#endif /* DOSPATH */ #endif /* !__linux__ */ signal(SIGSEGV, SIG_DFL); signal(SIGILL, SIG_DFL); diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 1801682f..50fcbffb 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -34,6 +34,9 @@ #include "LYCharSets.h" #include "LYCharUtils.h" #include "LYCookie.h" +#ifdef DOSPATH +#include "HTDOS.h" +#endif #ifdef VMS #include "HTVMSUtils.h" @@ -148,7 +151,8 @@ int mainloop NOARGS BOOLEAN FirstURLRecall = TRUE; char *temp = NULL; BOOLEAN ForcePush = FALSE; - int i, len; + unsigned int len; + int i; #ifdef DIRED_SUPPORT char *tp; @@ -343,7 +347,9 @@ try_again: if ((ofp = fopen(TRAVERSE_ERRORS,"a+")) == NULL) { if ((ofp = fopen(TRAVERSE_ERRORS,"w")) == NULL) { perror(NOOPEN_TRAV_ERR_FILE); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -376,7 +382,9 @@ try_again: printf("\nlynx: Can't access startfile %s\n", startfile); if (!dump_output_immediately) { +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -455,7 +463,9 @@ try_again: "\nlynx: Start file could not be found or is not text/html or text/plain\n"); printf(" Exiting...\n"); if (!dump_output_immediately) { +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -493,11 +503,15 @@ try_again: BOOKMARK_TITLE))) && (temp = HTParse(newdoc.address, "", PARSE_PATH+PARSE_PUNCTUATION)) != NULL) { +#ifdef DOSPATH + cp = HTDOS_wwwName((char *)Home_Dir()); +#else #ifdef VMS cp = HTVMS_wwwName((char *)Home_Dir()); #else cp = (char *)Home_Dir(); #endif /* VMS */ +#endif /* DOSPATH */ len = strlen(cp); #ifdef VMS if (!strncasecomp(temp, cp, len) && @@ -546,17 +560,22 @@ try_again: sleep(AlertSecs); return(-1); } - if (temp = HTParse(newdoc.address, "", - PARSE_ACCESS+PARSE_HOST+PARSE_PUNCTUATION)) { + if ((temp = HTParse(newdoc.address, "", + PARSE_ACCESS+PARSE_HOST+PARSE_PUNCTUATION))) { StrAllocCopy(newdoc.address, temp); HTuncache_current_document(); FREE(curdoc.address); +#ifdef DOSPATH + StrAllocCat(newdoc.address, + HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS StrAllocCat(newdoc.address, HTVMS_wwwName((char *)Home_Dir())); #else StrAllocCat(newdoc.address, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ StrAllocCat(newdoc.address, "/"); StrAllocCat(newdoc.address, (strncmp(BookmarkPage, "./", 2) ? @@ -1090,7 +1109,9 @@ try_again: printf( "Fatal error - could not open output file %s\n",cfile); if (!dump_output_immediately) { +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1141,7 +1162,6 @@ try_again: c = '\t'; #endif /* FASTTAB */ } else { -get_keyboard_input: /* * Get a keystroke from the user. * Save the last keystroke to avoid @@ -1215,7 +1235,9 @@ new_keyboard_input: (nhist <= 0 )) { if (!dump_output_immediately) { cleanup(); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -1253,7 +1275,9 @@ new_keyboard_input: (nhist <= 0 )) { if (!dump_output_immediately) { cleanup(); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -2001,7 +2025,13 @@ new_cmd: /* } /* fall through to LYK_ACTIVATE */ case LYK_ACTIVATE: /* follow a link */ - if (nlinks > 0) { + { + /* Is there a mouse-clicked link waiting? */ + int mouse_tmp = get_mouse_link(); + /* If yes, use it as the link */ + if (mouse_tmp != -1) curdoc.link = mouse_tmp; + } + if (nlinks > 0) { if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { /* * Don't try to submit forms with bad actions. - FM @@ -2139,8 +2169,8 @@ new_cmd: /* !strcmp(lynxjumpfile, curdoc.address)) { LYJumpFileURL = TRUE; LYUserSpecifiedURL = TRUE; - } else if (curdoc.title && - !strcmp(curdoc.title, HISTORY_PAGE_TITLE) || + } else if ((curdoc.title && + !strcmp(curdoc.title, HISTORY_PAGE_TITLE)) || curdoc.bookmark != NULL || (lynxjumpfile && !strcmp(lynxjumpfile, curdoc.address))) { @@ -2402,7 +2432,7 @@ check_goto_URL: LYFillLocalFileURL((char **)&temp, "file://localhost"); LYEnsureAbsoluteURL((char **)&temp, ""); sprintf(user_input_buffer, "%.*s", - (sizeof(user_input_buffer) - 1), temp); + (int)(sizeof(user_input_buffer) - 1), temp); FREE(temp); if ((no_file_url || no_goto_file) && !strncmp(user_input_buffer,"file:",5)) { @@ -3600,11 +3630,17 @@ check_add_bookmark_to_self: stop_curses(); printf(SPAWNING_MSG); fflush(stdout); +#ifdef DOSPATH + system("cls"); + system("echo Type EXIT to return to Lynx."); + system(getenv("COMSPEC") == NULL ? "command.com" : getenv("COMSPEC")); +#else #ifdef VMS system(""); #else system("exec $SHELL"); #endif /* VMS */ +#endif /* DOSPATH */ start_curses(); refresh_screen=TRUE; /* for a showpage */ } else { diff --git a/src/LYMainLoop.h b/src/LYMainLoop.h index 97addc03..b3a5bd99 100644 --- a/src/LYMainLoop.h +++ b/src/LYMainLoop.h @@ -2,8 +2,6 @@ #ifndef LYMAINLOOP_H #define LYMAINLOOP_H - - - +extern int mainloop NOPARAMS; #endif /* LYMAINLOOP_H */ diff --git a/src/LYMap.c b/src/LYMap.c index 3126611c..4aa0346a 100644 --- a/src/LYMap.c +++ b/src/LYMap.c @@ -54,7 +54,7 @@ PUBLIC BOOL LYMapsOnly = FALSE; /* * Utility for freeing the list of MAPs. - FM */ -PUBLIC void LYLynxMaps_free NOARGS +PRIVATE void LYLynxMaps_free NOARGS { ImageMap *map; MapElement *element; diff --git a/src/LYNews.c b/src/LYNews.c index 79ae8e39..65186f00 100644 --- a/src/LYNews.c +++ b/src/LYNews.c @@ -14,6 +14,7 @@ #include "LYSystem.h" #include "GridText.h" #include "LYSignal.h" +#include "LYNews.h" #include "LYGlobalDefs.h" @@ -46,7 +47,7 @@ PUBLIC char *LYNewsPost ARGS2( char *cp = NULL; int c = 0; /* user input */ FILE *fd; - char tmpfile[256]; + char my_tempfile[256]; char *postfile = NULL; char *NewsGroups = NULL; char *org = NULL; @@ -63,8 +64,8 @@ PUBLIC char *LYNewsPost ARGS2( * Open a temporary file for the headers * and message body. - FM */ - tempname(tmpfile, NEW_FILE); - if ((fd = fopen(tmpfile, "w")) == NULL) { + tempname(my_tempfile, NEW_FILE); + if ((fd = fopen(my_tempfile, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(postfile); } @@ -154,7 +155,7 @@ PUBLIC char *LYNewsPost ARGS2( *org != '\0') { StrAllocCat(cp, org); #ifndef VMS - } else if (fp = fopen("/etc/organization", "r")) { + } else if ((fp = fopen("/etc/organization", "r")) != 0) { if (fgets(user_input, sizeof(user_input), fp) != NULL) { if ((cp = strchr(user_input, '\n')) != NULL) *cp = '\0'; @@ -218,7 +219,7 @@ PUBLIC char *LYNewsPost ARGS2( if (strstr(editor, "pico")) { editor_arg = " -t"; /* No prompt for filename to use */ } - sprintf(user_input,"%s%s %s", editor, editor_arg, tmpfile); + sprintf(user_input,"%s%s %s", editor, editor_arg, my_tempfile); _statusline(SPAWNING_EDITOR_FOR_NEWS); stop_curses(); if (system(user_input)) { @@ -290,7 +291,7 @@ PUBLIC char *LYNewsPost ARGS2( !term_message && c != 7 && c != 3) c = LYgetch(); if (TOUPPER(c) == 'Y') { - if ((fd = fopen(tmpfile, "a")) != NULL) { + if ((fd = fopen(my_tempfile, "a")) != NULL) { fputs("-- \n", fd); while (fgets(user_input, sizeof(user_input), fp) != NULL) { fputs(user_input, fd); @@ -301,7 +302,7 @@ PUBLIC char *LYNewsPost ARGS2( fclose(fp); } clear(); /* clear the screen */ - StrAllocCopy(postfile, tmpfile); + StrAllocCopy(postfile, my_tempfile); if (!followup) /* * If it's not a followup, the current document @@ -328,10 +329,10 @@ cleanup: term_message = FALSE; if (!postfile) { #ifdef VMS - while (remove(tmpfile) == 0) + while (remove(my_tempfile) == 0) ; /* loop through all versions */ #else - remove(tmpfile); + remove(my_tempfile); #endif /* VMS */ } FREE(NewsGroups); diff --git a/src/LYOptions.c b/src/LYOptions.c index a795fcfb..236ba680 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -36,12 +36,12 @@ PRIVATE int boolean_choice PARAMS((int status, int line, #define MAXCHOICES 10 PRIVATE void option_statusline ARGS1( - char *, text) + CONST char *, text) { /* * Make sure we have a pointer to a string. */ - if (text == NULL) + if (text == 0) return; /* @@ -956,6 +956,7 @@ PRIVATE int boolean_choice ARGS4( char **, choices) { int response = 0; + int respcmd; int number = 0; int col = (column >= 0 ? column : COL_OPTION_VALUES); @@ -982,10 +983,50 @@ PRIVATE int boolean_choice ARGS4( if (term_options || response == 7 || response == 3) response = '\n'; if (response != '\n' && response != '\r') { + respcmd = keymap[response+1]; +#if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE) + /* does this make sense here? dunno.. - kw */ + if (!respcmd && override[response+1] && !no_dired_support) + respcmd = override[response+1]; +#endif /* DIRED_SUPPORT && OK_OVERRIDE */ + switch (respcmd) { + case LYK_PREV_PAGE: + case LYK_UP_TWO: + case LYK_PREV_LINK: + case LYK_UP_LINK: + case LYK_LEFT_LINK: + case LYK_PREV_DOC: + if(status == 0) + status = number; /* go back to end */ + else + status--; + break; + case LYK_END: + status = number; + break; + + case LYK_HOME: + status = 0; + break; + case LYK_1: + case LYK_2: + case LYK_3: + case LYK_4: + case LYK_5: + case LYK_6: + case LYK_7: + case LYK_8: + case LYK_9: + if((respcmd - LYK_1 + 1) <= number) { + status = respcmd -LYK_1 + 1; + break; + } /* else fall through! */ + default: if (status == number) status = 0; /* go over the top and around */ else status++; + } /* end of switch */ addstr(choices[status]); refresh(); } else { diff --git a/src/LYOptions.h b/src/LYOptions.h index e7464226..c313d257 100644 --- a/src/LYOptions.h +++ b/src/LYOptions.h @@ -2,6 +2,8 @@ #ifndef LYOPTIONS_H #define LYOPTIONS_H +extern BOOLEAN term_options; + extern void options NOPARAMS; extern void edit_bookmarks NOPARAMS; diff --git a/src/LYPrint.c b/src/LYPrint.c index 265747a4..f7cf2e34 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -19,6 +19,9 @@ #ifdef VMS #include "HTVMSUtils.h" #endif /* VMS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #include "LYLeaks.h" @@ -305,11 +308,15 @@ PUBLIC int printfile ARGS1(document *,newdoc) strcpy(buffer, filename); if ((len=strlen(buffer)) > 0 && buffer[len-1] == '/') buffer[len-1] = '\0'; +#ifdef DOSPATH + strcat(buffer, HTDOS_wwwName((char *)Home_Dir())); +#else #ifdef VMS strcat(buffer, HTVMS_wwwName((char *)Home_Dir())); #else strcat(buffer, Home_Dir()); #endif /* VMS */ +#endif /* DOSPATH */ strcat(buffer, cp); strcpy(filename, buffer); } @@ -332,9 +339,17 @@ PUBLIC int printfile ARGS1(document *,newdoc) else cp = NULL; if (cp) +#ifdef DOSPATH + sprintf(buffer,"%s/%s", cp, HTDOS_name(filename)); +#else sprintf(buffer,"%s/%s", cp, filename); +#endif else +#ifdef DOSPATH + strcpy(buffer, HTDOS_name(filename)); +#else strcpy(buffer, filename); +#endif #endif /* VMS */ /* see if it already exists */ @@ -482,7 +497,7 @@ PUBLIC int printfile ARGS1(document *,newdoc) remove_quotes(sug_filename); sprintf(buffer, "%s/subject=\"%s\" %s %s", - SYSTEM_MAIL, sug_filename, tempfile, user_response); + system_mail, sug_filename, tempfile, user_response); stop_curses(); printf(MAILING_FILE); @@ -492,18 +507,22 @@ PUBLIC int printfile ARGS1(document *,newdoc) sleep(MessageSecs); start_curses(); #else /* Unix: */ -#ifdef MMDF - sprintf(buffer, "%s -mlruxto,cc*", SYSTEM_MAIL); -#else - sprintf(buffer, "%s -t -oi", SYSTEM_MAIL); -#endif /* MMDF */ + sprintf(buffer, "%s %s", system_mail, system_mail_flags); +#ifdef DOSPATH + sprintf(tempfile, "%s%s", lynx_temp_space, "temp_mail.txt"); + if ((outfile_fp = fopen(tempfile,"w")) == NULL) { + _statusline(MAIL_REQUEST_FAILED); + sleep(AlertSecs); + return; + } +#else if ((outfile_fp = popen(buffer, "w")) == NULL) { _statusline(MAIL_REQUEST_FAILED); sleep(AlertSecs); break; } - +#endif if (HTisDocumentSource()) { /* * Add Content-Type, Content-Location, and @@ -543,7 +562,18 @@ PUBLIC int printfile ARGS1(document *,newdoc) if (keypad_mode) printlist(outfile_fp, FALSE); +#ifdef DOSPATH + sprintf(buffer, "%s -t \"%s\" -F %s", system_mail, user_response, tempfile); + fclose(outfile_fp); /* Close the tmpfile. */ + stop_curses(); + printf("Sending \n\n$ %s\n\nPlease wait...", buffer); + system(buffer); + sleep(MessageSecs); + start_curses(); + remove(tempfile); /* Delete the tmpfile. */ +#else pclose(outfile_fp); +#endif #endif /* VMS */ break; @@ -931,7 +961,7 @@ PUBLIC int print_options ARGS2(char **,newfile, int,lines_in_file) return(-1); } -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) StrAllocCopy(print_filename, "file://localhost/"); #else StrAllocCopy(print_filename, "file://localhost"); diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index f76f08dd..69c56c63 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -13,6 +13,7 @@ #include "LYCurses.h" #include "LYSignal.h" #include "LYBookmark.h" +#include "LYReadCFG.h" #ifdef DIRED_SUPPORT #include "LYLocal.h" @@ -272,7 +273,28 @@ PRIVATE void add_printer_to_list ARGS2( } } -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(COLOR_CURSES) +#ifdef DOSPATH /* I.E. broken curses */ +static char *Color_Strings[16] = +{ + "black", + "blue", + "green", + "cyan", + "red", + "magenta", + "brown", + "lightgray", + "gray", + "brightblue", + "brightgreen", + "lightcyan", + "brightred", + "brightmagenta", + "yellow", + "white" +}; +#else static char *Color_Strings[16] = { "black", @@ -292,6 +314,7 @@ static char *Color_Strings[16] = "brightcyan", "white" }; +#endif /* DOSPATH (broken curses) */ /* * Validator for COLOR fields. @@ -303,7 +326,7 @@ PRIVATE int check_color ARGS1( for (i = 0; i < 16; i++) { if (!strcmp(color, Color_Strings[i])) - return 0; + return i; } return -1; } @@ -327,7 +350,9 @@ Here FOREGROUND and BACKGROUND must be one of:\n" Color_Strings[i + 2], Color_Strings[i + 3]); } +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -361,13 +386,18 @@ PRIVATE void parse_color ARGS1( exit_with_color_syntax(); *bg++ = 0; +#if defined(USE_SLANG) if ((-1 == check_color(fg)) || (-1 == check_color(bg))) exit_with_color_syntax(); SLtt_set_color(color, NULL, fg, bg); +#else + if (lynx_chg_color(color, check_color(fg), check_color(bg)) < 0) + exit_with_color_syntax(); +#endif } -#endif /* USE_SLANG */ +#endif /* defined(USE_SLANG) || defined(COLOR_CURSES) */ /* * Process the configuration file (lynx.cfg). @@ -483,10 +513,10 @@ PUBLIC void read_cfg ARGS1( } else if (!strncasecomp(buffer, "COLLAPSE_BR_TAGS:", 17)) { LYCollapseBRs = is_true(buffer+17); -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(COLOR_CURSES) } else if (!strncasecomp(buffer, "COLOR:", 6)) { parse_color(buffer + 6); -#endif /* USE_SLANG */ +#endif /* defined(USE_SLANG) || defined(COLOR_CURSES) */ } else if (!strncasecomp(buffer, "cso_proxy:", 10)) { if (getenv("cso_proxy") == NULL) { @@ -655,11 +685,7 @@ PUBLIC void read_cfg ARGS1( break; case 'I': - if (!strncasecomp(buffer, "NEWS_POSTING:", 13)) { - LYNewsPosting = is_true(buffer+13); - no_newspost = (LYNewsPosting == FALSE); - - } else if (!strncasecomp(buffer, "INFOSECS:", 9)) { + if (!strncasecomp(buffer, "INFOSECS:", 9)) { strcpy(temp, buffer+9); for (i = 0; temp[i]; i++) { if (!isdigit(temp[i])) { @@ -794,7 +820,11 @@ PUBLIC void read_cfg ARGS1( break; case 'N': - if (!strncasecomp(buffer, "NEWS_CHUNK_SIZE:", 16)) { + if (!strncasecomp(buffer, "NEWS_POSTING:", 13)) { + LYNewsPosting = is_true(buffer+13); + no_newspost = (LYNewsPosting == FALSE); + + } else if (!strncasecomp(buffer, "NEWS_CHUNK_SIZE:", 16)) { HTNewsChunkSize = atoi(buffer+16); /* * If the new HTNewsChunkSize exceeds the maximum, @@ -1016,6 +1046,9 @@ PUBLIC void read_cfg ARGS1( } else if (!strncasecomp(buffer, "SYSTEM_MAIL:", 12)) { StrAllocCopy(system_mail, buffer+12); + + } else if (!strncasecomp(buffer, "SYSTEM_MAIL_FLAGS:", 18)) { + StrAllocCopy(system_mail_flags, buffer+18); } break; @@ -1025,7 +1058,6 @@ PUBLIC void read_cfg ARGS1( add_trusted(&buffer[13], EXEC_PATH); /* Add exec path */ } #endif /* EXEC_LINKS */ - #ifdef LYNXCGI_LINKS if (!strncasecomp(buffer, "TRUSTED_LYNXCGI:", 16)) { add_trusted(&buffer[16], CGI_PATH); /* Add CGI path */ @@ -1050,6 +1082,11 @@ PUBLIC void read_cfg ARGS1( UseFixedRecords = is_true(buffer+18); #endif /* VMS */ +#ifdef NCURSES_MOUSE_VERSION + } else if(!strncasecomp(buffer, "USE_MOUSE:",10)) { + LYUseMouse = is_true(buffer+10); +#endif + } else if (!strncasecomp(buffer, "USE_SELECT_POPUPS:", 18)) { LYSelectPopups = is_true(buffer+18); } diff --git a/src/LYSearch.c b/src/LYSearch.c index 52a3e110..7dd6c26b 100644 --- a/src/LYSearch.c +++ b/src/LYSearch.c @@ -17,7 +17,7 @@ * in not found do not reset cur and return false. */ -PUBLIC int check_for_target_in_links ARGS2(int *,cur, char *,new_target) +PRIVATE int check_for_target_in_links ARGS2(int *,cur, char *,new_target) { int i = *cur+1; diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index b02b3a05..dc314523 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -62,7 +62,7 @@ PUBLIC int showinfo ARGS4( /* * Make the temporary file a URL now. */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) StrAllocCopy(info_url,"file://localhost/"); #else StrAllocCopy(info_url,"file://localhost"); @@ -250,6 +250,20 @@ PUBLIC int showinfo ARGS4( if (HTLoadedDocumentCharset()) fprintf(fp0, "<dt><em> Charset:</em> %s\n", HTLoadedDocumentCharset()); +#ifdef EXP_CHARTRANS + else { + LYUCcharset * p_in = HTAnchor_getUCInfoStage(HTMainAnchor, + UCT_STAGE_PARSER); + if (!p_in || !(p_in->MIMEname) || !*(p_in->MIMEname) || + HTAnchor_getUCLYhndl(HTMainAnchor, UCT_STAGE_PARSER) < 0) + p_in = HTAnchor_getUCInfoStage(HTMainAnchor, UCT_STAGE_MIME); + if (p_in && p_in->MIMEname && *(p_in->MIMEname) && + HTAnchor_getUCLYhndl(HTMainAnchor, UCT_STAGE_MIME) >= 0) { + fprintf(fp0, "<dt><em> Charset:</em> %s (assumed)\n", + p_in->MIMEname); + } + } +#endif /* EXP_CHARTRANS */ if ((cp = HText_getServer()) != NULL && *cp != '\0') fprintf(fp0, "<dt><em> Server:</em> %s\n", cp); diff --git a/src/LYStrings.c b/src/LYStrings.c index 593dd59c..093ca774 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -9,20 +9,88 @@ #include "LYKeymap.h" #include "LYSignal.h" #include "LYClean.h" +#include "LYMail.h" +#include "LYOptions.h" #include <ctype.h> #include "LYLeaks.h" -#if !defined(FANCY_CURSES) && !defined(NO_KEYPAD) -#define NO_KEYPAD -#endif /* !FANCY_CURSES && !NO_KEYPAD */ - #define FREE(x) if (x) {free(x); x = NULL;} extern BOOL HTPassHighCtrlRaw; extern HTCJKlang HTCJK; +/* If you want to add mouse support for some new platform, it's fairly +** simple to do. Once you've determined the X and Y coordinates of +** the mouse event, loop through the elements in the links[] array and +** see if the coordinates fall within a highlighted link area. If so, +** the code must set mouse_link to the index of the chosen link, +** and return a key value that corresponds to LYK_ACTIVATE. The +** LYK_ACTIVATE code in LYMainLoop.c will then check mouse_link +** and activate that link. If the mouse event didn't fall within a +** link, the code should just set mouse_link to -1 and return -1. --AMK +**/ + +/* The number of the link selected w/ the mouse (-1 if none) */ +static int mouse_link = -1; + +/* Return the value of mouse_link, erasing it */ +PUBLIC int get_mouse_link NOARGS +{ + int t; + t=mouse_link; + mouse_link = -1; + return t; +} + +/* Given X and Y coordinates of a mouse event, set mouse_link to the +** index of the corresponding hyperlink, or set mouse_link to -1 if no +** link matches the event. Returns -1 if no link matched the click, +** or a keycode that must be returned from LYgetch() to activate the +** link. +**/ + +PRIVATE int set_clicked_link ARGS2(int,x,int,y) +{ + int i; + + /* Loop over the links and see if we can get a match */ + for(i=0; i < nlinks && mouse_link == -1; i++) { + /* Check the first line of the link */ + if ( links[i].hightext != NULL && + links[i].ly == y && + (x - links[i].lx) < strlen(links[i].hightext ) ) { + mouse_link=i; + } + /* Check the second line */ + if (links[i].hightext2 != NULL && + 1+links[i].ly == y && + (x - links[i].hightext2_offset) < strlen(links[i].hightext2) ) { + mouse_link=i; + } + } + /* If no link was found, just return a do-nothing code */ + if (mouse_link == -1) return -1; + + /* If a link was hit, we must look for a key which will activate LYK_ACTIVATE + ** XXX The 127 in the following line will depend on the size of the keymap[] + ** array. However, usually we'll find LYK_ACTIVATE somewhere in the first + ** 127 keys (it's usually mapped to the Enter key) + **/ + for (i=0; i<127; i++) { + if (LYisNonAlnumKeyname(i, LYK_ACTIVATE)) { + return i; + } + } + /* Whoops! Nothing's defined as LYK_ACTIVATE! + Well, who are we to argue with the user? + Forget about the mouse click */ + mouse_link = -1; + return -1; +} + + /* * LYstrncpy() terminates strings with a null byte. * Writes a null byte into the n+1 byte of dst. @@ -42,6 +110,44 @@ PUBLIC char * LYstrncpy ARGS3(char *,dst, char *,src, int,n) *(dst+n) = '\0'; return val; } +#ifdef EXP_CHARTRANS +/* + * LYmbcsstrncpy() terminates strings with a null byte. + * Takes acount of multibyte characters. + * src string is copied until either end of string or max number of + * either bytes or glyphs (mbcs sequences) (currently only UTF8). + */ +PUBLIC char * LYmbcsstrncpy ARGS5(char *,dst, char *,src, int,n_bytes, + int,n_glyphs, int,enc) +{ + char *val = dst; + int i_bytes = 0, i_glyphs = 0; + + if (n_bytes < 0) + n_bytes = 0; + if (n_glyphs < 0) + n_glyphs = 0; + +#define IS_NEW_GLYPH(ch) (enc && ((unsigned char)(ch)&0xc0) != 0x80) + + for (; *src != '\0' && i_bytes < n_bytes; + i_bytes++) { + if (IS_NEW_GLYPH(*src)) + if (i_glyphs++ >= n_glyphs) { + *dst = '\0'; + return val; + } + *(dst++) = *(src++); + } + *dst = '\0'; + + return val; +} +#endif /* EXP_CHARTRANS */ + +#undef GetChar + +#undef GetChar #ifdef USE_SLANG #ifdef VMS @@ -49,20 +155,39 @@ PUBLIC char * LYstrncpy ARGS3(char *,dst, char *,src, int,n) #else #define GetChar (int)SLang_getkey #endif /* VMS */ -#else /* Not slang: */ +#endif /* USE_SLANG */ + +#if !defined(GetChar) && defined(NCURSES) +#define GetChar() wgetch(my_subwindow ? my_subwindow : stdscr) +#endif + +#if !defined(GetChar) && defined(SNAKE) +#define GetChar() wgetch(stdscr) +#endif + +#if !defined(GetChar) #ifdef VMS #define GetChar() ttgetc() #else -#if defined(SNAKE) || defined(NCURSES) -#define GetChar() wgetch(stdscr) -#else /* everything but VMS, SNAKE and NCURSES */ #ifndef USE_GETCHAR #define USE_GETCHAR #endif /* !USE_GETCHAR */ #define GetChar() getchar() /* used to be "getc(stdin)" and "getch()" */ -#endif /* SNAKE || NCURSES */ #endif /* VMS */ -#endif /* USE_SLANG */ +#endif /* !defined(GetChar) */ + +#if defined(NCURSES) +/* + * Workaround a bug in ncurses order-of-refresh by setting a pointer to + * the topmost window that should be displayed. + */ +PRIVATE WINDOW *my_subwindow; + +PUBLIC void LYsubwindow ARGS1(WINDOW *, param) +{ + my_subwindow = param; +} +#endif /* * LYgetch() translates some escape sequences and may fake noecho @@ -96,6 +221,21 @@ re_read: } #endif /* !USE_SLANG || VMS */ +#ifdef DOSPATH + if (c == 0) c = '/'; + if (c > 255) { /* handle raw dos keys */ + switch (c) + { + case 464: c = '-'; break; /* keypad minus*/ + case 465: c = '+'; break; /* keypad plus*/ + case 459: c = 13; break; /* keypad enter*/ + case 463: c = '*'; break; /* keypad * */ + case 440: c = 'Q'; break; /* alt x */ + default: break; + } +// if (c < 256) return(c); + } +#endif #ifdef USE_GETCHAR if (c == EOF && errno == EINTR) /* Ctrl-Z causes EINTR in getchar() */ goto re_read; @@ -123,7 +263,9 @@ re_read: } #endif /* IGNORE_CTRL_C */ cleanup(); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -232,10 +374,9 @@ re_read: } if (isdigit(a) && (b == '[' || c == 155) && d != -1 && d != '~') d = GetChar(); -#if defined(NO_KEYPAD) || defined(VMS) } -#else - } else { +#if HAVE_KEYPAD + else { /* convert keypad() mode keys into Lynx defined keys */ @@ -302,9 +443,24 @@ re_read: c=127; /* backspace key (delete, not Ctrl-H) */ break; #endif /* KEY_BACKSPACE */ +#ifdef NCURSES_MOUSE_VERSION + case KEY_MOUSE: + { + MEVENT event; + int err; + + c = -1; + mouse_link = -1; + err=getmouse(&event); + if (event.bstate & BUTTON1_CLICKED) { + c = set_clicked_link(event.x, event.y); + } + } + break; +#endif /* NCURSES_MOUSE_VERSION */ } } -#endif /* defined(NO_KEYPAD) || defined(VMS) */ +#endif /* defined(HAVE_KEYPAD) */ return(c); } @@ -640,8 +796,6 @@ PUBLIC void LYRefreshEdit ARGS1(EDREC *,edit) PUBLIC int LYgetstr ARGS4(char *,inputline, int,hidden, int,bufsize, int,recall) { - extern BOOLEAN term_letter; /* Flag from terminate_letter() AST */ - extern BOOLEAN term_options; /* Flag from terminate_options() AST */ extern BOOLEAN term_message; /* Flag from terminate_message() AST */ #ifdef VMS extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ @@ -742,7 +896,7 @@ PUBLIC char * LYstrstr ARGS2(char *,chptr, char *,tarptr) * It ignores the characters: LY_UNDERLINE_START_CHAR and * LY_UNDERLINE_END_CHAR * LY_BOLD_START_CHAR - * LY_BOLD_END_CHAR[B + * LY_BOLD_END_CHAR * if present in chptr. * It is a case insensitive search. */ @@ -848,6 +1002,153 @@ PUBLIC char * LYno_attr_char_strstr ARGS2(char *,chptr, char *,tarptr) return(NULL); } +#ifdef EXP_CHARTRANS + +#define IS_UTFEXTRA(ch) (utf_flag && ((unsigned char)(ch)&0xc0) == 0x80) +/* + * LYno_attr_mbcs_case_strstr will find the first occurence of the string + * pointed to by tarptr in the string pointed to by chptr. + * It takes account of MultiByte Character Sequences (UTF8). + * The physical lenght of the displayed string up to the end of the target + * string is returned in *nendp if the search is successful. + * It ignores the characters: LY_UNDERLINE_START_CHAR and + * LY_UNDERLINE_END_CHAR + * LY_BOLD_START_CHAR + * LY_BOLD_END_CHAR[B + * if present in chptr. + * It assumes UTF8 if utf_flag is set. + * It is a case insensitive search. + */ +PUBLIC char * LYno_attr_mbcs_case_strstr ARGS4(char *,chptr, char *,tarptr, + BOOL, utf_flag, int *,nendp) +{ + register char *tmpchptr, *tmptarptr; + int len = 0; + + if (!chptr) + return(NULL); + + while (IsSpecialAttrChar(*chptr) && *chptr != '\0') + chptr++; + + for (; *chptr != '\0'; chptr++) { + + if (TOUPPER(*chptr) == TOUPPER(*tarptr)) { + int tarlen = 0; + len++; + + /* see if they line up */ + tmpchptr = chptr+1; + tmptarptr = tarptr+1; + + if (*tmptarptr == '\0') { /* one char target */ + *nendp = len; + return(chptr); + } + while (1) { + if (!IsSpecialAttrChar(*tmpchptr)) { + + if (TOUPPER(*tmpchptr) != TOUPPER(*tmptarptr)) + break; + + if (!IS_UTFEXTRA(*tmptarptr)) + tarlen++; + tmpchptr++; + tmptarptr++; + + } else { + tmpchptr++; + } + + if (*tmptarptr == '\0') { + *nendp = len + tarlen; + return(chptr); + } + if (*tmpchptr == '\0') + break; + } + } else if (!( IS_UTFEXTRA(*chptr) || + IsSpecialAttrChar(*chptr))) { + len++; + } + + } /* end for */ + + return(NULL); +} + +/* + * LYno_attr_mbcs_strstr will find the first occurence of the string + * pointed to by tarptr in the string pointed to by chptr. + * It takes account of MultiByte Character Sequences (UTF8). + * The physical lenght of the displayed string up to the end of the target + * string is returned in *nendp if the search is successful. + * It ignores the characters: LY_UNDERLINE_START_CHAR and + * LY_UNDERLINE_END_CHAR + * LY_BOLD_START_CHAR + * LY_BOLD_END_CHAR + * if present in chptr. + * It assumes UTF8 if utf_flag is set. + * It is a case sensitive search. + */ +PUBLIC char * LYno_attr_mbcs_strstr ARGS4(char *,chptr, char *,tarptr, + BOOL, utf_flag, int *,nendp) +{ + register char *tmpchptr, *tmptarptr; + int len = 0; + + if (!chptr) + return(NULL); + + while (IsSpecialAttrChar(*chptr) && *chptr != '\0') + chptr++; + + for (; *chptr != '\0'; chptr++) { + + if ((*chptr) == (*tarptr)) { + int tarlen = 0; + len++; + + /* see if they line up */ + tmpchptr = chptr+1; + tmptarptr = tarptr+1; + + if (*tmptarptr == '\0') { /* one char target */ + *nendp = len + 1; + return(chptr); + } + while (1) { + if (!IsSpecialAttrChar(*tmpchptr)) { + + if ((*tmpchptr) != (*tmptarptr)) + break; + + if (!IS_UTFEXTRA(*tmptarptr)) + tarlen++; + tmpchptr++; + tmptarptr++; + + } else { + tmpchptr++; + } + + if (*tmptarptr == '\0') { + *nendp = len + tarlen; + return(chptr); + } + if (*tmpchptr == '\0') + break; + } + } else if (!( IS_UTFEXTRA(*chptr) || + IsSpecialAttrChar(*chptr))) { + len++; + } + } /* end for */ + + return(NULL); +} +#endif /* EXP_CHARTRANS */ + /* Allocate a new copy of a string, and returns it */ PUBLIC char * SNACopy ARGS3 (char **,dest, CONST char *,src, int,n) diff --git a/src/LYStrings.h b/src/LYStrings.h index 508d4708..ef1afd39 100644 --- a/src/LYStrings.h +++ b/src/LYStrings.h @@ -7,6 +7,7 @@ extern char *strstr(); #endif /* __STRICT_BSD__ */ +extern int get_mouse_link NOPARAMS; extern char * LYstrncpy PARAMS((char *dst, char *src, int n)); extern int LYgetch NOPARAMS; extern int LYgetstr PARAMS((char *inputline, int hidden, @@ -14,6 +15,14 @@ extern int LYgetstr PARAMS((char *inputline, int hidden, extern char * LYstrstr PARAMS((char *chptr, char *tarptr)); extern char * LYno_attr_char_strstr PARAMS((char *chptr, char *tarptr)); extern char * LYno_attr_char_case_strstr PARAMS((char *chptr, char *tarptr)); +#ifdef EXP_CHARTRANS +extern char * LYmbcsstrncpy PARAMS((char *dst, char *src, int n_bytes, + int n_glyphs, int enc)); +extern char * LYno_attr_mbcs_strstr PARAMS((char *chptr, char *tarptr, + BOOL utf_flag, int *nendp)); +extern char * LYno_attr_mbcs_case_strstr PARAMS((char *chptr, char *tarptr, + BOOL utf_flag, int *nendp)); +#endif extern char * SNACopy PARAMS((char **dest, CONST char *src, int n)); extern char * SNACat PARAMS((char **dest, CONST char *src, int n)); diff --git a/src/LYTraversal.c b/src/LYTraversal.c index 255d8dae..1925860c 100644 --- a/src/LYTraversal.c +++ b/src/LYTraversal.c @@ -3,12 +3,12 @@ #include "LYGlobalDefs.h" #include "LYUtils.h" #include "LYSignal.h" +#include "LYTraversal.h" #include "LYexit.h" #include "LYLeaks.h" /* routines to handle special traversal feature */ -extern char *HText_getTitle(); PUBLIC BOOLEAN lookup ARGS1(char *,target) { @@ -18,7 +18,9 @@ PUBLIC BOOLEAN lookup ARGS1(char *,target) if ((ifp = fopen(TRAVERSE_FILE,"r")) == NULL) { if ((ifp = fopen(TRAVERSE_FILE,"w")) == NULL) { perror("unable to open or create a traversal file"); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -54,7 +56,9 @@ PUBLIC void add_to_table ARGS1(char *,target) if ((ifp = fopen(TRAVERSE_FILE,"a+")) == NULL) { perror("unable to open traversal file"); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -78,7 +82,9 @@ PUBLIC void add_to_traverse_list ARGS2(char *,fname, char *,prev_link_name) if ((ifp = fopen(TRAVERSE_FOUND_FILE,"a+")) == NULL) { perror("unable to open traversal found file"); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); @@ -125,7 +131,9 @@ PUBLIC void add_to_reject_list ARGS1(char *,target) if ((ifp = fopen(TRAVERSE_REJECT_FILE,"a+")) == NULL) { perror("unable to open reject file"); +#ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal(SIGTERM, SIG_DFL); #ifndef VMS (void) signal(SIGINT, SIG_DFL); diff --git a/src/LYUpload.c b/src/LYUpload.c index 4bc9b190..d6cbb1c5 100644 --- a/src/LYUpload.c +++ b/src/LYUpload.c @@ -255,7 +255,7 @@ PUBLIC int LYUpload_options ARGS2 (char **,newfile, char *,directory) #endif /* VMS */ /* make the file a URL now */ -#ifdef VMS +#if defined (VMS) || defined (DOSPATH) sprintf(upload_filename,"file://localhost/%s",tempfile); #else sprintf(upload_filename,"file://localhost%s",tempfile); diff --git a/src/LYUtils.c b/src/LYUtils.c index c45b99a0..4543edca 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -10,7 +10,13 @@ #include "LYGlobalDefs.h" #include "LYSignal.h" #include "GridText.h" +#ifdef EXP_CHARTRANS +#include "LYCharSets.h" +#endif /* EXP_CHARTRANS */ +#ifdef DOSPATH +#include "HTDOS.h" +#endif #ifdef VMS #include <descrip.h> #include <libclidef.h> @@ -32,6 +38,14 @@ #endif /* UTMPX_FOR_UTMP */ #endif /* UNIX */ +#if NEED_PTEM_H +/* they neglected to define struct winsize in termios.h -- it's only in + * termio.h and ptem.h (the former conflicts with other definitions). + */ +#include <sys/stream.h> +#include <sys/ptem.h> +#endif + #include "LYLeaks.h" #ifdef SVR4_BSDSELECT @@ -99,7 +113,7 @@ PUBLIC void highlight ARGS2( */ /* start_bold(); */ start_reverse(); -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(FANCY_CURSES) start_underline (); #endif /* USE_SLANG */ } else { @@ -126,10 +140,17 @@ PUBLIC void highlight ARGS2( /* copy into the buffer only what will fit within the * width of the screen */ +#ifdef EXP_CHARTRANS + LYmbcsstrncpy(buffer,(links[cur].hightext ? + links[cur].hightext : ""), 199, + LYcols - links[cur].lx - 1, + (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8)); +#else LYstrncpy(buffer, (links[cur].hightext ? links[cur].hightext : ""), LYcols-links[cur].lx-1); +#endif /* EXP_CHARTRANS */ addstr(buffer); } @@ -137,7 +158,7 @@ PUBLIC void highlight ARGS2( if (links[cur].hightext2 && links[cur].ly < display_lines) { if (flag == ON) { stop_reverse(); -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(FANCY_CURSES) stop_underline (); #endif /* USE_SLANG */ } else { @@ -150,7 +171,7 @@ PUBLIC void highlight ARGS2( if (flag == ON) { start_reverse(); -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(FANCY_CURSES) start_underline (); #endif /* USE_SLANG */ } else { @@ -174,7 +195,7 @@ PUBLIC void highlight ARGS2( if (flag == ON) { stop_reverse(); -#ifdef USE_SLANG +#if defined(USE_SLANG) || defined(FANCY_CURSES) stop_underline (); #endif /* USE_SLANG */ } else { @@ -295,7 +316,7 @@ PUBLIC char * strip_trailing_slash ARGS1( BOOLEAN mustshow = FALSE; PUBLIC void statusline ARGS1( - char *, text) + CONST char *, text) { char buffer[256]; unsigned char *temp = NULL; @@ -303,7 +324,7 @@ PUBLIC void statusline ARGS1( int max_length, len, i, j; unsigned char k; - if (!text || text==NULL) + if (text == NULL) return; /* @@ -406,9 +427,15 @@ PUBLIC void statusline ARGS1( } clrtoeol(); if (text != NULL) { +#ifdef COLOR_CURSES + lynx_set_color(2); + addstr(buffer); + lynx_set_color(0); +#else start_reverse(); addstr(buffer); stop_reverse(); +#endif } refresh(); @@ -437,7 +464,7 @@ PUBLIC void toggle_novice_line NOARGS } PUBLIC void noviceline ARGS1( - int, more) + int, more_flag) { if (dump_output_immediately) @@ -461,7 +488,7 @@ PUBLIC void noviceline ARGS1( addstr(novice_lines[lineno]); #ifdef NOTDEFINED - if (is_www_index && more) { + if (is_www_index && more_flag) { addstr("This is a searchable index. Use "); addstr(key_for_func(LYK_INDEX_SEARCH)); addstr(" to search:"); @@ -477,7 +504,7 @@ PUBLIC void noviceline ARGS1( } else { addstr("Type a command or ? for help:"); - if (more) { + if (more_flag) { stop_reverse(); addstr(" "); start_reverse(); @@ -534,7 +561,13 @@ PUBLIC int HTCheckForInterrupt NOARGS #endif /* USE_SLANG */ /** Keyboard 'Z' or 'z', or Control-G or Control-C **/ +#if defined (DOSPATH) && defined (NCURSES) + nodelay(stdscr,TRUE); +#endif /* DOSPATH */ c = LYgetch(); +#if defined (DOSPATH) && defined (NCURSES) + nodelay(stdscr,FALSE); +#endif /* DOSPATH */ if (TOUPPER(c) == 'Z' || c == 7 || c == 3) return((int)TRUE); @@ -822,6 +855,12 @@ PUBLIC int is_url ARGS1( while (isspace((unsigned char)*cp)) cp++; +#ifdef DOSPATH /* sorry! */ + if (strncmp(cp, "file:///", 8) && strlen(cp) == 19 && + cp[strlen(cp)-1] == ':') + StrAllocCat(cp,"/"); +#endif + if (!strncasecomp(cp, "news:", 5)) { if (strncmp(cp, "news", 4)) { for (i = 0; i < 4; i++) @@ -1193,22 +1232,16 @@ PUBLIC char * quote_pathname ARGS1( * local domain * */ -#ifdef VMS -#ifndef NO_UTMP -#define NO_UTMP -#endif /* NO_UTMP */ -#endif /* VMS */ - PUBLIC BOOLEAN inlocaldomain NOARGS { -#ifdef NO_UTMP +#if ! HAVE_UTMP return(TRUE); #else int n; FILE *fp; struct utmp me; char *cp, *mytty = NULL; - char *ttyname(); + extern char *ttyname PARAMS((int fd)); if ((cp=ttyname(0))) mytty = strrchr(cp, '/'); @@ -1237,28 +1270,29 @@ PUBLIC BOOLEAN inlocaldomain NOARGS } return(FALSE); -#endif /* NO_UTMP */ +#endif /* !HAVE_UTMP */ } /************** ** This bit of code catches window size change signals **/ -#if defined(VMS) || defined(SNAKE) -#define NO_SIZECHANGE -#endif /* VMS || SNAKE */ - -#if !defined(VMS) && !defined(ISC) +#if !defined(VMS) && !defined(ISC) && !defined(DOSPATH) #include <sys/ioctl.h> #endif /* !VMS && !ISC */ -#ifdef HAVE_TERMIOS_H -#include <termios.h> +/* For systems that have both, but both can't be included, duh */ +#ifdef TERMIO_AND_TERMIOS +# include <termio.h> #else -#ifdef HAVE_TERMIO_H -#include <termio.h> -#endif /* HAVE_TERMIO_H */ -#endif /* HAVE_TERMIOS_H */ +# ifdef HAVE_TERMIOS_H +# include <termios.h> +# else +# ifdef HAVE_TERMIO_H +# include <termio.h> +# endif /* HAVE_TERMIO_H */ +# endif /* HAVE_TERMIOS_H */ +#endif /* TERMIO_AND_TERMIOS */ PUBLIC void size_change ARGS1( int, sig) @@ -1267,13 +1301,17 @@ PUBLIC void size_change ARGS1( SLtt_get_screen_size(); LYlines = SLtt_Screen_Rows; LYcols = SLtt_Screen_Cols; +#ifdef SLANG_MBCS_HACK + PHYSICAL_SLtt_Screen_Cols = LYcols; + SLtt_Screen_Cols = LYcols * 6; +#endif /* SLANG_MBCS_HACK */ if (sig == 0) /* * Called from start_curses(). */ return; #else /* Curses: */ -#ifndef NO_SIZECHANGE +#if HAVE_SIZECHANGE #ifdef TIOCGSIZE struct ttysize win; #else @@ -1303,7 +1341,7 @@ PUBLIC void size_change ARGS1( } #endif /* TIOCGWINSZ */ #endif /* TIOCGSIZE */ -#endif /* !NO_SIZECHANGE */ +#endif /* HAVE_SIZECHANGE */ if (LYlines <= 0) LYlines = 24; @@ -1399,9 +1437,9 @@ PUBLIC void change_sug_filename ARGS1( /*** rename any temporary files ***/ temp = (char *)calloc(1, (strlen(lynx_temp_space) + 60)); if (*lynx_temp_space == '/') - sprintf(temp, "file://localhost%sL%d", lynx_temp_space, getpid()); + sprintf(temp, "file://localhost%sL%d", lynx_temp_space, (int)getpid()); else - sprintf(temp, "file://localhost/%sL%d", lynx_temp_space, getpid()); + sprintf(temp, "file://localhost/%sL%d", lynx_temp_space, (int)getpid()); len = strlen(temp); if (0==strncmp(fname, temp, len)) { cp = strrchr(fname, '.'); @@ -1603,10 +1641,10 @@ PUBLIC void tempname ARGS2( if (action == REMOVE_FILES) { /* REMOVE ALL FILES */ for (; counter > 0; counter--) { sprintf(namebuffer, "%sL%d%uTMP.txt", lynx_temp_space, - getpid(), counter-1); + (int)getpid(), counter-1); remove(namebuffer); sprintf(namebuffer, "%sL%d%uTMP.html", lynx_temp_space, - getpid(), counter-1); + (int)getpid(), counter-1); remove(namebuffer); } } else /* add a file */ { @@ -1614,7 +1652,7 @@ PUBLIC void tempname ARGS2( * Create name */ sprintf(namebuffer, "%sL%d%uTMP.html", lynx_temp_space, - getpid(), counter++); + (int)getpid(), counter++); } return; } @@ -2010,11 +2048,30 @@ PUBLIC void LYConvertToURL ARGS1( if (!old_string || *old_string == '\0') return; - *AllocatedString = NULL; /* so StrAllocCopy doesn't free it */ +#ifdef DOSPATH +{ + char *cp_url = *AllocatedString; + for(; *cp_url != '\0'; cp_url++) + if(*cp_url == '\\') *cp_url = '/'; + cp_url--; + if(*cp_url == ':') + StrAllocCat(*AllocatedString,"/"); +#ifdef NOTDEFINED + if(strlen(old_string) > 3 && *cp_url == '/') + *cp_url = '\0'; +#endif +} +#endif + + *AllocatedString = NULL; /* so StrAllocCopy doesn't free it */ + StrAllocCopy(*AllocatedString,"file://localhost"); if (*old_string != '/') { char *fragment = NULL; +#ifdef DOSPATH + StrAllocCat(*AllocatedString,"/"); +#endif /* DOSPATH */ #ifdef VMS /* * Not a SHELL pathspec. Get the full VMS spec and convert it. @@ -2178,6 +2235,22 @@ have_VMS_URL: fprintf(stderr, "Trying: '%s'\n", *AllocatedString); } #else /* Unix: */ +#ifdef DOSPATH + if (strlen(old_string) == 1 && *old_string == '.') { + /* + * They want . + */ + char curdir[DIRNAMESIZE]; + getcwd (curdir, DIRNAMESIZE); + StrAllocCopy(temp, HTDOS_wwwName(curdir)); + StrAllocCat(*AllocatedString, temp); + FREE(temp); + if (TRACE) { + fprintf(stderr, "Converted '%s' to '%s'\n", + old_string, *AllocatedString); + } + } else +#endif /* DOSPATH */ if (*old_string == '~') { /* * On Unix, covert '~' to Home_Dir(). @@ -2206,18 +2279,28 @@ have_VMS_URL: struct stat st; FILE *fptemp = NULL; BOOL is_local = FALSE; -#ifdef NO_GETCWD - getwd (curdir); -#else +#if HAVE_GETCWD getcwd (curdir, DIRNAMESIZE); +#else + getwd (curdir); #endif /* NO_GETCWD */ /* * Concatenate and simplify, trimming any * residual relative elements. - FM */ +#ifndef DOSPATH StrAllocCopy(temp, curdir); StrAllocCat(temp, "/"); StrAllocCat(temp, old_string); +#else + if (old_string[1] != ':' && old_string[1] != '|') + { + StrAllocCopy(temp, HTDOS_wwwName(curdir)); + if(curdir[strlen(curdir)-1] != '/') + StrAllocCat(temp, "/"); + StrAllocCat(temp, old_string); + } else StrAllocCopy(temp, old_string); +#endif /* DOSPATH */ LYTrimRelFromAbsPath(temp); if (TRACE) { fprintf(stderr, "Converted '%s' to '%s'\n", old_string, temp); @@ -2246,7 +2329,7 @@ have_VMS_URL: * appended to the URL. - FM */ if (fragment != NULL) { - *fragment = '#'; + *fragment = '#'; fragment = NULL; } StrAllocCat(*AllocatedString, temp); @@ -2454,7 +2537,11 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( } else if (Startup && !dump_output_immediately) { fprintf(stdout, "Looking up '%s' first.\n", host); } +#ifndef DJGPP if ((phost = gethostbyname(host)) != NULL) { +#else + if (resolve(host) != 0) { +#endif /* DJGPP */ GotHost = TRUE; FREE(host); FREE(Str); @@ -2541,7 +2628,11 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3( } else if (Startup && !dump_output_immediately) { fprintf(stdout, "Looking up '%s', guessing...\n", host); } +#ifndef DJGPP GotHost = ((phost = gethostbyname(host)) != NULL); +#else + GotHost = (resolve(host) != 0); +#endif /* DJGPP */ if (HostColon != NULL) { *HostColon = ':'; } @@ -2876,6 +2967,12 @@ PUBLIC CONST char * Home_Dir NOARGS if (!homedir) { if ((homedir = getenv("HOME")) == NULL) { +#ifdef DOSPATH /* BAD! WSB */ + if ((homedir = getenv("TEMP")) == NULL) { + if ((homedir = getenv("TMP")) == NULL) + homedir = "C:\\"; + } +#else #ifdef VMS if ((homedir = getenv("SYS$LOGIN")) == NULL) { if ((homedir = getenv("SYS$SCRATCH")) == NULL) @@ -2895,6 +2992,7 @@ PUBLIC CONST char * Home_Dir NOARGS homedir = "/tmp"; } #endif /* VMS */ +#endif /* DOSPATH */ } } return homedir; @@ -3192,7 +3290,7 @@ PUBLIC time_t LYmktime ARGS1( char *, string) { char *s; - time_t now, clock; + time_t now, clock2; int day, month, year, hour, minutes, seconds; char *start; char temp[8]; @@ -3394,20 +3492,20 @@ PUBLIC time_t LYmktime ARGS1( } day += (year - 1968)*1461/4; day += ((((month*153) + 2)/5) - 672); - clock = (time_t)((day * 60 * 60 * 24) + + clock2 = (time_t)((day * 60 * 60 * 24) + (hour * 60 * 60) + (minutes * 60) + seconds); - if (clock <= time(NULL)) - clock = (time_t)0; - if (TRACE && clock > 0) + if (clock2 <= time(NULL)) + clock2 = (time_t)0; + if (TRACE && clock2 > 0) fprintf(stderr, - "LYmktime: clock=%i, ctime=%s", clock, ctime(&clock)); + "LYmktime: clock=%i, ctime=%s", clock2, ctime(&clock2)); - return(clock); + return(clock2); } -#ifdef NO_PUTENV +#if ! HAVE_PUTENV /* no putenv on the next so we use this code instead! */ @@ -3506,4 +3604,11 @@ PUBLIC int putenv ARGS1( return 0; } -#endif /* NO_PUTENV */ +#endif /* !HAVE_PUTENV */ + +#ifdef NEED_REMOVE +int remove ARGS1(char *, name) +{ + return unlink(name); +} +#endif diff --git a/src/LYUtils.h b/src/LYUtils.h index ea5bebc1..477504d6 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -13,9 +13,9 @@ extern void free_and_clear PARAMS((char **obj)); extern void collapse_spaces PARAMS((char *string)); extern void convert_to_spaces PARAMS((char *string, BOOL condense)); extern char * strip_trailing_slash PARAMS((char * dirname)); -extern void statusline PARAMS((char *text)); +extern void statusline PARAMS((CONST char *text)); extern void toggle_novice_line NOPARAMS; -extern void noviceline PARAMS((int more)); +extern void noviceline PARAMS((int more_flag)); extern int HTCheckForInterrupt NOPARAMS; extern BOOLEAN LYisLocalFile PARAMS((char *filename)); extern BOOLEAN LYisLocalHost PARAMS((char *filename)); @@ -53,9 +53,9 @@ extern BOOLEAN LYPathOffHomeOK PARAMS((char *fbuffer, int fbuffer_size)); extern void LYAddPathToHome PARAMS(( char *fbuffer, int fbuffer_size, char *fname)); extern time_t LYmktime PARAMS((char *string)); -#ifdef NO_PUTENV +#if ! HAVE_PUTENV extern int putenv PARAMS((CONST char *string)); -#endif /* NO_PUTENV */ +#endif /* HAVE_PUTENV */ /* * Whether or not the status line must be shown. diff --git a/src/LYexit.c b/src/LYexit.c index 0429c017..7d737606 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -19,7 +19,7 @@ /* * Stack of functions to call upon exit. */ -PRIVATE void (*callstack[ATEXITSIZE])(); +PRIVATE void (*callstack[ATEXITSIZE]) NOPARAMS; PRIVATE int topOfStack = 0; /* @@ -45,15 +45,22 @@ PUBLIC void LYexit ARGS1( int, status) { #ifndef VMS /* On VMS, the VMSexit() handler does these. - FM */ +#ifdef _WINDOWS + WSACleanup(); +#endif if (LYOutOfMemory == TRUE) { /* * Ignore further interrupts. - FM */ - (void) signal (SIGHUP, SIG_IGN); +#ifndef NOSIGHUP + (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ (void) signal (SIGTERM, SIG_IGN); (void) signal (SIGINT, SIG_IGN); #ifndef __linux__ +#ifndef DOSPATH (void) signal(SIGBUS, SIG_IGN); +#endif /* DOSPATH */ #endif /* !__linux__ */ (void) signal(SIGSEGV, SIG_IGN); (void) signal(SIGILL, SIG_IGN); @@ -72,7 +79,9 @@ PUBLIC void LYexit ARGS1( } cleanup_sig(0); #ifndef __linux__ +#ifndef DOSPATH signal(SIGBUS, SIG_DFL); +#endif /* DOSPATH */ #endif /* !__linux__ */ signal(SIGSEGV, SIG_DFL); signal(SIGILL, SIG_DFL); @@ -117,7 +126,7 @@ PUBLIC void LYexit ARGS1( * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe */ #ifdef __STDC__ -PUBLIC int LYatexit(void (*function)()) +PUBLIC int LYatexit(void (*function)(void)) #else /* Not ANSI, ugh! */ PUBLIC int LYatexit(function) void (*function)(); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 4d59e861..a67a64e8 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -18,18 +18,22 @@ PUBLIC void read_rc NOPARAMS char *cp, *cp2; int number_sign; char MBM_line[256]; - int MBM_counter, MBM_counter2; - char *MBM_cp, *MBM_cp2, *MBM_cp1; - int MBM_i1, MBM_i2; + int MBM_counter; + char *MBM_cp2, *MBM_cp1; + int MBM_i2; /* * Make an RC file name. */ +#ifdef DJGPP + sprintf(rcfile, "%s/lynx.rc", Home_Dir()); +#else #ifdef VMS sprintf(rcfile, "sys$login:.lynxrc"); #else sprintf(rcfile, "%s/.lynxrc", Home_Dir()); #endif /* VMS */ +#endif /* DJGPP */ /* * Open the RC file for reading. @@ -471,11 +475,15 @@ PUBLIC int save_rc NOPARAMS /* * Make a name. */ +#ifdef DJGPP + sprintf(rcfile, "%s/lynx.rc", Home_Dir()); +#else #ifdef VMS sprintf(rcfile, "sys$login:.lynxrc"); #else sprintf(rcfile, "%s/.lynxrc", Home_Dir()); #endif /* VMS */ +#endif /* DJGPP */ /* * Open the file for write. diff --git a/src/Makefile b/src/Makefile index 73e271b9..e11132e1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,6 @@ +SHELL = /bin/sh + +CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \ LYMail.o HTAlert.o GridText.o LYGetFile.o \ LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \ @@ -5,13 +8,14 @@ LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \ 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 +LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o \ + $(CHARTRANS_OBJS) CFLAGS= $(MCFLAGS) -I.. $(SLANGINC) all: lynx -lynx: message $(OBJS) $(WWWLIB) +lynx: message do_chartrans_stuff $(OBJS) $(WWWLIB) @echo "Linking and creating Lynx executable" $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS) @echo "Copying Lynx executable into this directory" @@ -21,6 +25,9 @@ lynx: message $(OBJS) $(WWWLIB) message: @echo "Compiling Lynx sources" +do_chartrans_stuff: + -cd chrtrans; $(MAKE) MCFLAGS="$(MCFLAGS)" CC="$(CC)" tables + dbg: $(OBJS) $(WWWLIB) @echo "Making Lynx code" $(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS) @@ -30,6 +37,7 @@ lint: clean: rm -f lynx core *.[ob] + cd chrtrans && $(MAKE) clean LYMain.o: ../userdefs.h LYMainLoop.o: ../userdefs.h @@ -45,4 +53,37 @@ HTInit.o: ../userdefs.h LYTraversal.o: ../userdefs.h LYMail.o: ../userdefs.h LYCharSets.o: ../userdefs.h + +CHRTR= chrtrans/ + +TABLES= $(CHRTR)iso02_uni.h \ + $(CHRTR)iso01_uni.h \ + $(CHRTR)def7_uni.h \ + $(CHRTR)iso03_uni.h \ + $(CHRTR)iso04_uni.h \ + $(CHRTR)iso05_uni.h \ + $(CHRTR)iso07_uni.h \ + $(CHRTR)iso09_uni.h \ + $(CHRTR)iso10_uni.h \ + $(CHRTR)koi8r_uni.h \ + $(CHRTR)cp437_uni.h \ + $(CHRTR)cp850_uni.h \ + $(CHRTR)cp852_uni.h \ + $(CHRTR)cp1250_uni.h \ + $(CHRTR)cp1252_uni.h \ + $(CHRTR)utf8_uni.h \ + $(CHRTR)rfc_suni.h \ + $(CHRTR)mnemonic_suni.h \ + $(CHRTR)mnem_suni.h + +CMN=../WWW/Library/Implementation/ + +$(TABLES): + -cd chrtrans; $(MAKE) tables + +UCdomap.o: UCdomap.c chrtrans/UCkd.h chrtrans/makeuctb chrtrans/makeuctb.c \ + UCdomap.h $(CMN)UCMap.h $(TABLES) ../userdefs.h + $(CC) -c $(CFLAGS) -o $@ $< + +UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h LYCookie.o: ../userdefs.h diff --git a/src/UCAuto.c b/src/UCAuto.c new file mode 100644 index 00000000..ec267f26 --- /dev/null +++ b/src/UCAuto.c @@ -0,0 +1,215 @@ +#ifdef EXP_CHARTRANS +#ifdef EXP_CHARTRANS_AUTOSWITCH +#ifdef LINUX + +/* This file contains code for changing the Linux console mode. +** Currently some names for font files are hardwired in here. +** You have to change this code if it needs accomodation for your +** system (or get the required files...). +** +** Depending on the Display Character Set switched to, and the previous +** one as far as it is known, system("setfont ...") and/or output of +** escape sequences to switch console mode are done. Curses will be +** temporarily suspended while that happens. +** +** NOTE that the setfont calls will also affect all other virtual consoles. +** +** Any ideas how to do this for other systems? +*/ +#include "tcp.h" +#include "HTUtils.h" +#include "UCMap.h" +#include "UCDefs.h" +#include "UCAuto.h" +#include "LYGlobalDefs.h" + +typedef enum {Is_Unset, Is_Set, Dunno, Dont_Care} TGen_state_t; +typedef enum {G0, G1} TGNstate_t; +typedef enum +{ + GN_Blat1, GN_0decgraf, GN_Ucp437, GN_Kuser, GN_dunno, GN_dontCare +} TTransT_t; + +static char T_font_fn[100] = "\0"; +static char T_umap_fn[100] = "\0"; +static char T_setfont_cmd[200] = "\0"; +#define SETFONT "setfont" +#define NOOUTPUT "2>/dev/null" + +PRIVATE void call_setfont ARGS3(char *,font, char *,fnsuffix, char *,umap) +{ + if (font && *font && umap && *umap && + 0==strcmp(font,T_font_fn) && 0==strcmp(umap,T_umap_fn)) { + return; /* no need to repeat */ + } + if (font) + strcpy(T_font_fn, font); + if (umap) + strcpy(T_umap_fn, umap); + + if (!*fnsuffix) + fnsuffix = ""; + + if (umap &&*umap && font && *font) { + sprintf(T_setfont_cmd, "%s %s%s -u %s %s", + SETFONT, font, fnsuffix, umap, NOOUTPUT); + } else if (font && *font) { + sprintf(T_setfont_cmd, "%s %s%s %s", + SETFONT, font, fnsuffix, NOOUTPUT); + } else if (umap && *umap) { + sprintf(T_setfont_cmd, "%s -u %s %s", + SETFONT, umap, NOOUTPUT); + } else { + *T_setfont_cmd = '\0'; + } + + if (*T_setfont_cmd) { + system(T_setfont_cmd); + } +} + +/* This is the thing that actually gets called from display_page(). */ + +PUBLIC void UCChangeTerminalCodepage ARGS2(int, newcs, LYUCcharset *,p) +{ + static int lastcs = -1; + static char * lastname = NULL; + static TGNstate_t lastGN = G0; + static TTransT_t lastTransT = GN_dunno; + static TGen_state_t lastUtf = Dunno; + static TGen_state_t lastHasUmap = Dunno; + + char * name = p->MIMEname; + TGNstate_t GN = G0; + TTransT_t TransT = GN_dunno; + TGen_state_t Utf = Dunno; + TGen_state_t HasUmap = Dunno; + + char tmpbuf1[100], tmpbuf2[20]; + char *cp; + +/* Font sizes are currently hardwired here... */ +#define SUFF1 ".f16" +#define SUFF2 "-16.psf" +#define SUFF3 "-8x16" +#define SUFF4 "8x16" + +/* use this for output of escape sequences... */ +/* for some reason stdout won't do... maybe needs flush() somewhere.. */ +#define ESCOUT stderr + +#ifdef VMS +#define DISPLAY "DECW$DISPLAY" +#else +#define DISPLAY "DISPLAY" +#endif /* VMS */ + + if (display || (cp = getenv(DISPLAY)) != NULL) { + /* We won't do anything in an xterm. Better that way... */ + return; + } + + if (0==strcmp(name,"iso-8859-10")) { + call_setfont("iso10", SUFF1, "iso10.uni"); + TransT = GN_Kuser; + HasUmap = Is_Set; + Utf = Is_Unset; + } else if (0==strncmp(name,"iso-8859-1",10)) { + if ((lastHasUmap==Is_Set) && 0==strcmp(lastname,"cp850")) { + /* cp850 already contains all latin1 characters */ + if (lastTransT != GN_Blat1) + TransT = GN_Blat1; + } else { + call_setfont("lat1u", SUFF2, "lat1u.uni"); + /* "setfont lat1u-16.psf -u lat1u.uni" */ + HasUmap = Is_Set; + if (lastTransT != GN_Blat1) + TransT = GN_Blat1; + } + Utf = Is_Unset; + } else if (0==strcmp(name,"iso-8859-2")) { +/* call_setfont("lat2", SUFF2, "lat2.uni"); */ + /* "setfont lat2-16.psf -u lat2.uni" */ + call_setfont("iso02", SUFF1, "iso02.uni"); + /* "setfont iso02.f16 -u iso02.uni" */ + TransT = GN_Kuser; + HasUmap = Is_Set; + Utf = Is_Unset; + } else if (0==strncmp(name,"iso-8859-",9)) { + sprintf(tmpbuf1, "iso0%s", &name[9]); + sprintf(tmpbuf2, "iso0%s%s", &name[9],".uni"); + call_setfont(tmpbuf1,SUFF1, tmpbuf2); + /* "setfont iso0N.f16 -u iso0N.uni" */ + TransT = GN_Kuser; + HasUmap = Is_Set; + Utf = Is_Unset; + } else if (0==strcmp(name,"koi8-r")) { + call_setfont("koi8", SUFF3, NULL); + TransT = GN_Kuser; + HasUmap = Is_Unset; + Utf = Is_Unset; + } else if (0==strcmp(name,"cp437")) { + call_setfont("default", SUFF4 , "cp437.uni"); + /* "setfont default8x16 -u cp437.uni" */ + if (TransT == GN_Kuser || TransT == GN_Ucp437) + TransT = GN_dontCare; + else + TransT = GN_Ucp437; + HasUmap = Is_Set; + Utf = Is_Unset; + } else if (0==strcmp(name,"cp850")) { + call_setfont("cp850" ,SUFF3 , "cp850.uni"); + /* "setfont cp850-8x16 -u cp850.uni" */ + TransT = GN_Kuser; + HasUmap = Is_Set; + Utf = Is_Unset; + } else if (0==strcmp(name,"x-transparent")) { + Utf = Dont_Care; + } else if (0==strcmp(name,"us-ascii")) { + Utf = Dont_Care; + } else if (0==strncmp(name,"mnem",4)) { + Utf = Dont_Care; + } + + if (TransT != lastTransT) { + if (TransT == GN_Blat1) { + fprintf(ESCOUT,"\033(B"); /* switch Linux console to lat1 table */ + } else if (TransT == GN_0decgraf) { + fprintf(ESCOUT,"\033(0"); + } else if (TransT == GN_Ucp437) { + fprintf(ESCOUT,"\033(U"); /* switch Linux console to 437 table? */ + } else if (TransT == GN_Kuser) { + fprintf(ESCOUT,"\033(K"); /* switch Linux console to user table */ + } + if (TransT != GN_dunno && TransT != GN_dontCare) { + lastTransT = TransT; + } else { + TransT = lastTransT; + } + } + + if (HasUmap != Dont_Care && HasUmap != Dunno) + lastHasUmap = HasUmap; + + if (p->enc == UCT_ENC_UTF8) { + if (lastUtf != Is_Set) { + Utf = Is_Set; + fprintf(ESCOUT,"\033%%G"); /* turn Linux console UTF8 mode ON */ + lastUtf = Utf; + } + return; + } else if (lastUtf == Is_Set && Utf != Dont_Care) { + Utf = Is_Unset; + fprintf(ESCOUT,"\033%%@"); /* turn Linux console UTF8 mode OFF */ + lastUtf = Utf; + } + + if (Utf != Dont_Care && Utf != Dunno) + lastUtf = Utf; + + lastcs = newcs; + lastname = name; +} +#endif /* LINUX */ +#endif /* EXP_CHARTRANS_AUTOSWITCH */ +#endif /* EXP_CHARTRANS */ diff --git a/src/UCAuto.h b/src/UCAuto.h new file mode 100644 index 00000000..3f43e0c7 --- /dev/null +++ b/src/UCAuto.h @@ -0,0 +1 @@ +extern void UCChangeTerminalCodepage PARAMS((int newcs, LYUCcharset * p)); diff --git a/src/UCAux.c b/src/UCAux.c new file mode 100644 index 00000000..cca77ebc --- /dev/null +++ b/src/UCAux.c @@ -0,0 +1,213 @@ +#ifdef EXP_CHARTRANS +#include "HTUtils.h" +#include "tcp.h" + +#include "HTCJK.h" +#include "UCDefs.h" +#include "HTStream.h" +#include "UCAux.h" + +extern HTCJKlang HTCJK; +extern LYUCcharset LYCharSet_UC[]; + +PUBLIC BOOL UCCanUniTranslateFrom ARGS1(int, from) +{ + if (from < 0) + return NO; + if (LYCharSet_UC[from].enc == UCT_ENC_7BIT || + LYCharSet_UC[from].enc == UCT_ENC_UTF8) + return YES; + if (LYCharSet_UC[from].codepoints & (UCT_CP_SUBSETOF_LAT1)) + return YES; + return (LYCharSet_UC[from].UChndl >= 0); +} +PUBLIC BOOL UCCanTranslateUniTo ARGS1(int, to) +{ + if (to < 0) + return NO; + return YES; /* well at least some characters... */ +} +PUBLIC BOOL UCCanTranslateFromTo ARGS2(int, from, int, to) +{ + if (from==to) + return YES; + if (from < 0 || to < 0) + return NO; + if (from==0) + return UCCanTranslateUniTo(to); + if (to==0) + return UCCanUniTranslateFrom(from); + if (LYCharSet_UC[to].enc == UCT_ENC_UTF8) { + return (LYCharSet_UC[from].UChndl >= 0); + } + { + char * fromname = LYCharSet_UC[from].MIMEname; + char * toname = LYCharSet_UC[to].MIMEname; + if (0==strcmp(fromname,"x-transparent") || + 0==strcmp(toname,"x-transparent")) { + return YES; + } + if (LYCharSet_UC[from].enc == UCT_ENC_CJK) { + if (HTCJK == NOCJK) /* use that global flag, for now */ + return NO; + if (HTCJK == JAPANESE && ( + 0==strcmp(fromname,"euc-jp") || + 0==strncmp(fromname,"iso-2022-jp",11) || + 0==strcmp(fromname,"shift_jis") + )) + return YES; + return NO; /* if not handled by (from==to) above */ + } + if (0==strcmp(fromname,"koi8-r")) { + /* will try to uses stripping of high bit... */ + return YES; + } + + if (0==strcmp(fromname,"koi8-r") || /* from cyrillic */ + 0==strcmp(fromname,"iso-8859-5") || + 0==strcmp(fromname,"koi-8")) { + if (0!=strcmp(toname,"iso-8859-5") && + 0!=strcmp(toname,"koi8-r") && + 0!=strcmp(toname,"iso-8859-2")) + return NO; + } + } + return (LYCharSet_UC[from].UChndl >= 0); +} + +/* The idea here is that any stage of the stream pipe which is interested +** in some charset dependent processing will call this function. +** Given input and ouptput charsets, this function will set various flags +** in a UCTransParams structure that _suggest_ to the caller what to do. +** +** Should be called once when a stage starts processing text (and the +** input and output charsets are known), or whenever one of input or +** output charsets has changed (e.g. by SGML.c stage after HTML.c stage +** has processed a META tag). +** The global flags (LYRawMode, HTPassEightBitRaw etc.) are currently +** not taken into account here, it's still up to the caller to do something +** about them. +*/ +PUBLIC void UCSetTransParams ARGS5( + UCTransParams *, pT, + int, cs_in, + CONST LYUCcharset*, p_in, + int, cs_out, + CONST LYUCcharset*, p_out + ) +{ + pT->transp = (0==strcmp(p_in->MIMEname,"x-transparent") || + 0==strcmp(p_out->MIMEname,"x-transparent")); + if (pT->transp) { + pT->do_cjk = FALSE; + pT->decode_utf8 = FALSE; + pT->output_utf8 = FALSE; /* we may, but won't know about it */ + pT->do_8bitraw = TRUE; + pT->use_raw_char_in = TRUE; + pT->strip_raw_char_in = FALSE; + pT->pass_160_173_raw = TRUE; + } else { + BOOL intm_ucs = FALSE; + BOOL use_ucs = FALSE; + pT->do_cjk = ((p_in->enc == UCT_ENC_CJK) && (HTCJK != NOCJK)); + pT->decode_utf8 = (p_in->enc == UCT_ENC_UTF8); + pT->output_utf8 = (p_out->enc == UCT_ENC_UTF8); + if (pT->do_cjk) { + intm_ucs = FALSE; + pT->trans_to_uni = FALSE; + use_ucs = FALSE; + pT->do_8bitraw = FALSE; + pT->pass_160_173_raw = TRUE; + pT->use_raw_char_in = FALSE; /* not used for CJK */ + pT->trans_from_uni = FALSE; /* not used for CJK */ + } else { + intm_ucs = ( + cs_in == 0 || pT->decode_utf8 || + (p_in->codepoints & (UCT_CP_SUBSETOF_LAT1|UCT_CP_SUBSETOF_UCS2)) + ); + pT->trans_to_uni = (!intm_ucs && + UCCanUniTranslateFrom(cs_in)); + pT->strip_raw_char_in = + ((!intm_ucs || + (p_out->enc==UCT_ENC_7BIT) || + (p_out->repertoire & UCT_REP_SUBSETOF_LAT1)) && + cs_in != cs_out && + 0==strcmp(p_in->MIMEname,"koi8-r")); + use_ucs = (intm_ucs || pT->trans_to_uni); + pT->do_8bitraw = (!use_ucs); + pT->pass_160_173_raw = (!use_ucs && + !(p_in->like8859 & UCT_R_8859SPECL) + ); + pT->use_raw_char_in = (!pT->output_utf8 && cs_in == cs_out); + pT->trans_from_uni = (use_ucs && !pT->do_8bitraw && + !pT->use_raw_char_in && + UCCanTranslateUniTo(cs_out)); + } + } +} + +PUBLIC void UCTransParams_clear ARGS1( + UCTransParams *, pT) +{ + pT->transp = FALSE; + pT->do_cjk = FALSE; + pT->decode_utf8 = FALSE; + pT->output_utf8 = FALSE; + pT->do_8bitraw = FALSE; + pT->use_raw_char_in = FALSE; + pT->strip_raw_char_in = FALSE; + pT->pass_160_173_raw = FALSE; + pT->trans_to_uni = FALSE; + pT->trans_from_uni = FALSE; +} + +/* Given an output target HTStream* (can also be a HTStructured* via typecast), +** the target stream's put_character method, and a unicode character, +** CPutUtf8_charstring() will either output the UTF8 encoding of the unicode +** and return YES, or do nothing and return NO (if conversion would be +** unnecessary or the unicode character is considered invalid). +** +** [Could be used more generally, but is currently only used for &#nnnnn +** stuff - generation of UTF8 from 8-bit encoded charsets not yet done +** by SGML.c etc.] +*/ +#define PUTC(ch) ((*myPutc)(target, (char)(ch))) +#define PUTC2(ch) ((*myPutc)(target,(char)(0x80|(0x3f &(ch))))) + +PUBLIC BOOL UCPutUtf8_charstring ARGS3( + HTStream *, target, + putc_func_t *, myPutc, + long, code) +{ + if (code < 128) + return NO; /* indicate to caller we didn't handle it */ + else if (code < 0x800L) { + PUTC(0xc0 | (code>>6)); + PUTC2(code); + } else if (code < 0x10000L) { + PUTC(0xe0 | (code>>12)); + PUTC2(code>>6); + PUTC2(code); + } else if (code < 0x200000L) { + PUTC(0xf0 | (code>>18)); + PUTC2(code>>12); + PUTC2(code>>6); + PUTC2(code); + } else if (code < 0x4000000L) { + PUTC(0xf8 | (code>>24)); + PUTC2(code>>18); + PUTC2(code>>12); + PUTC2(code>>6); + PUTC2(code); + } else if (code<=0x7fffffffL) { + PUTC(0xfc | (code>>30)); + PUTC2(code>>24); + PUTC2(code>>18); + PUTC2(code>>12); + PUTC2(code>>6); + PUTC2(code); + } else + return NO; + return YES; +} +#endif /* EXP_CHARTRANS */ diff --git a/src/UCdomap.c b/src/UCdomap.c new file mode 100644 index 00000000..473fe181 --- /dev/null +++ b/src/UCdomap.c @@ -0,0 +1,1386 @@ +/* + * UCmap.c + * - K&R compatibility macros not (yet?) done - + * + * Derived from code in the Linux kernel console driver. + * The GNU Public Licence therefore applies, see + * the file COPYING in the about_lynx directory + * which should come with every Lynx distribution. + * + * [ original comment: -kw ] + * + * Mapping from internal code (such as Latin-1 or Unicode or IBM PC code) + * to font positions. + * + * aeb, 950210 + */ + +#include "chrtrans/UCkd.h" +#include "tcp.h" +#include "HTMLDTD.h" +#include "HTAAUtil.h" /* defines FREE */ +#include "HTAtom.h" /* for use by UC_setup_LYCharSets_repl() */ +#include "LYGlobalDefs.h" +#include "LYCharSets.h" +#include "UCdomap.h" +#include "UCMap.h" +#include "UCDefs.h" + + /* Include hash tables & parameters */ +#include "chrtrans/def7_uni.h" +#include "chrtrans/iso01_uni.h" +#include "chrtrans/iso02_uni.h" +#include "chrtrans/iso03_uni.h" +#include "chrtrans/iso04_uni.h" +#include "chrtrans/iso05_uni.h" +#include "chrtrans/iso07_uni.h" +#include "chrtrans/iso09_uni.h" +#include "chrtrans/iso10_uni.h" +#include "chrtrans/koi8r_uni.h" +#include "chrtrans/cp437_uni.h" +#include "chrtrans/cp850_uni.h" +#include "chrtrans/cp852_uni.h" +#include "chrtrans/cp1250_uni.h" +#include "chrtrans/cp1252_uni.h" +#include "chrtrans/utf8_uni.h" +#include "chrtrans/rfc_suni.h" +#include "chrtrans/mnemonic_suni.h" +/* #include "chrtrans/mnem_suni.h" */ + +/* Some of the code below, and some of the comments, left in for + historical reasons. Not all those tables below are currently + really needed (and what with all those hardwired codepoints), + but let's keep them around for now, they may come in handy if we + decide to make more extended use of the mechanisms (including e.g. + for chars < 127...) - kw */ + +static u16 translations[][256] = { + /* 8-bit Latin-1 mapped to Unicode -- trivial mapping */ + { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff + }, + /* VT100 graphics mapped to Unicode */ + { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x00a0, + 0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0, 0x00b1, + 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0xf800, + 0xf801, 0x2500, 0xf803, 0xf804, 0x251c, 0x2524, 0x2534, 0x252c, + 0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x007f, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff + }, + /* IBM Codepage 437 mapped to Unicode */ + { + 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, + 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, + 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, + 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, + 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, + 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, + 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, + 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, + 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, + 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, + 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, + 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192, + 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, + 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, + 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, + 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, + 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, + 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, + 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, + 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, + 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 + }, + /* User mapping -- default to codes for direct font mapping */ + { + 0xf000, 0xf001, 0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007, + 0xf008, 0xf009, 0xf00a, 0xf00b, 0xf00c, 0xf00d, 0xf00e, 0xf00f, + 0xf010, 0xf011, 0xf012, 0xf013, 0xf014, 0xf015, 0xf016, 0xf017, + 0xf018, 0xf019, 0xf01a, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f, + 0xf020, 0xf021, 0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027, + 0xf028, 0xf029, 0xf02a, 0xf02b, 0xf02c, 0xf02d, 0xf02e, 0xf02f, + 0xf030, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037, + 0xf038, 0xf039, 0xf03a, 0xf03b, 0xf03c, 0xf03d, 0xf03e, 0xf03f, + 0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047, + 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f, + 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057, + 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f, + 0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067, + 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f, + 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077, + 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf07f, + 0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087, + 0xf088, 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0xf08f, + 0xf090, 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, 0xf097, + 0xf098, 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, 0xf09f, + 0xf0a0, 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, 0xf0a7, + 0xf0a8, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, 0xf0af, + 0xf0b0, 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, 0xf0b7, + 0xf0b8, 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, 0xf0bf, + 0xf0c0, 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, 0xf0c7, + 0xf0c8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0xf0ce, 0xf0cf, + 0xf0d0, 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d7, + 0xf0d8, 0xf0d9, 0xf0da, 0xf0db, 0xf0dc, 0xf0dd, 0xf0de, 0xf0df, + 0xf0e0, 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, 0xf0e5, 0xf0e6, 0xf0e7, + 0xf0e8, 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, 0xf0ed, 0xf0ee, 0xf0ef, + 0xf0f0, 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, 0xf0f5, 0xf0f6, 0xf0f7, + 0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf0fd, 0xf0fe, 0xf0ff + } +}; +static u16 *UC_translate = NULL; + +/* The standard kernel character-to-font mappings are not invertible + -- this is just a best effort. */ + +#define MAX_GLYPH 512 /* Max possible glyph value */ + +static unsigned char * inv_translate = NULL; +static unsigned char inv_norm_transl[MAX_GLYPH]; +static unsigned char * inverse_translations[4] = { NULL, NULL, NULL, NULL }; + +PRIVATE void con_clear_unimap NOPARAMS; + +PRIVATE void set_inverse_transl ARGS1(int, i) +{ + int j, glyph; + u16 *p = translations[i]; + unsigned char *q = inverse_translations[i]; + + if (!q) { + /* slightly messy to avoid calling kmalloc too early */ + q = inverse_translations[i] = ((i == LAT1_MAP) + ? inv_norm_transl + : (unsigned char *) malloc(MAX_GLYPH)); + if (!q) + return; + } + for (j=0; j<MAX_GLYPH; j++) + q[j] = 0; + + for (j=0; j<E_TABSZ; j++) { + glyph = conv_uni_to_pc(p[j]); + if (glyph >= 0 && glyph < MAX_GLYPH && q[glyph] < 32) { + /* prefer '-' above SHY etc. */ + q[glyph] = j; + } + } +} + +u16 *set_translate ARGS1(int, m) +{ + if (!inverse_translations[m]) + set_inverse_transl(m); + inv_translate = inverse_translations[m]; + return translations[m]; +} + +#ifdef NOTDEFINED +/* + * Inverse translation is impossible for several reasons: + * 1. The font<->character maps are not 1-1. + * 2. The text may have been written while a different translation map + * was active, or using Unicode. + * Still, it is now possible to a certain extent to cut and paste non-ASCII. + */ +unsigned char inverse_translate(int glyph) { + if ( glyph < 0 || glyph >= MAX_GLYPH ) + return 0; + else + return ((inv_translate && inv_translate[glyph]) + ? inv_translate[glyph] + : (unsigned char)(glyph & 0xff)); +} + +/* + * Load customizable translation table + * arg points to a 256 byte translation table. + * + * The "old" variants are for translation directly to font (using the + * 0xf000-0xf0ff "transparent" Unicodes) whereas the "new" variants set + * Unicodes explictly. + */ +int con_set_trans_old(unsigned char * arg) +{ + int i; + u16 *p = translations[USER_MAP]; +#if(0) + i = verify_area(VERIFY_READ, (void *)arg, E_TABSZ); + if (i) + return i; +#endif + for (i=0; i<E_TABSZ ; i++) + p[i] = UNI_DIRECT_BASE | (u16) arg[i]; + + set_inverse_transl(USER_MAP); + return 0; +} + +int con_get_trans_old(unsigned char * arg) +{ + int i, ch; + u16 *p = translations[USER_MAP]; +#if(0) + i = verify_area(VERIFY_WRITE, (void *)arg, E_TABSZ); + if (i) + return i; +#endif + for (i=0; i<E_TABSZ ; i++) + { + ch = conv_uni_to_pc(p[i]); +/* put_user((ch & ~0xff) ? 0 : ch, arg+i); */ + arg[i] = (unsigned char)((ch & ~0xff) ? 0 : ch); + } + return 0; +} + +int con_set_trans_new(u16 * arg) +{ + int i; + u16 *p = translations[USER_MAP]; +#if(0) + i = verify_area(VERIFY_READ, (void *)arg, + E_TABSZ*sizeof(u16)); + if (i) + return i; +#endif + for (i=0; i<E_TABSZ ; i++) + p[i] = arg[i]; + + set_inverse_transl(USER_MAP); + return 0; +} + +int con_get_trans_new(u16 * arg) +{ + int i; + u16 *p = translations[USER_MAP]; +#if(0) + i = verify_area(VERIFY_WRITE, (void *)arg, + E_TABSZ*sizeof(u16)); + if (i) + return i; +#endif + for (i=0; i<E_TABSZ ; i++) + arg[i] = p[i]; + + return 0; +} +#endif /* NOTDEFINED */ + + +PRIVATE int +UC_valid_UC_charset ARGS1(int, UC_charset_hndl) +{ + return (UC_charset_hndl >= 0 && UC_charset_hndl < UCNumCharsets); +} + +PRIVATE void +UC_con_set_trans ARGS3(int, UC_charset_in_hndl, int, Gn, int, update_flag) +{ + int i, j; + u16 *p; + u16 *ptrans; + + if (!UC_valid_UC_charset(UC_charset_in_hndl)) + { + if (TRACE) + fprintf(stderr,"UC_con_set_trans: Invalid charset handle %i.\n", + UC_charset_in_hndl); + return; + } + ptrans = translations[Gn]; + p = UCInfo[UC_charset_in_hndl].unitable; +#if(0) + if (p == UC_current_unitable) { /* test whether pointers are equal */ + return; /* nothing to be done */ + } + /* The font is always 256 characters - so far. */ + + con_clear_unimap(); +#endif + for ( i = 0 ; i < 256 ; i++ ) + { + if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) { + ptrans[i] = *p; + for ( ; j ; j-- ) + p++; + } + else + ptrans[i] = 0xfffd; + } + if (update_flag) + set_inverse_transl(Gn); /* Update inverse translation for this one */ +} +/* + * Unicode -> current font conversion + * + * A font has at most 512 chars, usually 256. + * But one font position may represent several Unicode chars. + * A hashtable is somewhat of a pain to deal with, so use a + * "paged table" instead. Simulation has shown the memory cost of + * this 3-level paged table scheme to be comparable to a hash table. + */ + +int hashtable_contents_valid = 0; /* Use ASCII-only mode for bootup*/ +int hashtable_str_contents_valid = 0; + +static u16 **uni_pagedir[32] = +{ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; +static char* **uni_pagedir_str[32] = +{ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; + +u16 * UC_current_unitable = NULL; +struct unimapdesc_str *UC_current_unitable_str = NULL; + +PRIVATE int +con_insert_unipair ARGS2(u16, unicode, u16, fontpos) +{ + int i, n; + u16 **p1, *p2; + + if ( !(p1 = uni_pagedir[n = unicode >> 11]) ) + { + p1 = uni_pagedir[n] = (u16* *) malloc(32*sizeof(u16 *)); + if ( !p1 ) + return -ENOMEM; + + for ( i = 0 ; i < 32 ; i++ ) + p1[i] = NULL; + } + + if ( !(p2 = p1[n = (unicode >> 6) & 0x1f]) ) + { + p2 = p1[n] = (u16 *) malloc(64*sizeof(u16)); + if ( !p2 ) + return -ENOMEM; + + for ( i = 0 ; i < 64 ; i++ ) + p2[i] = 0xffff; /* No glyph for this character (yet) */ + } + + p2[unicode & 0x3f] = fontpos; + + return 0; +} + +PRIVATE int +con_insert_unipair_str ARGS2(u16, unicode, char *, replace_str) +{ + int i, n; + char ***p1, **p2; + + if ( !(p1 = uni_pagedir_str[n = unicode >> 11]) ) + { + p1 = uni_pagedir_str[n] = (char** *) malloc(32*sizeof(char **)); + if ( !p1 ) + return -ENOMEM; + + for ( i = 0 ; i < 32 ; i++ ) + p1[i] = NULL; + } + + if ( !(p2 = p1[n = (unicode >> 6) & 0x1f]) ) + { + p2 = p1[n] = (char* *) malloc(64*sizeof(char *)); + if ( !p2 ) + return -ENOMEM; + + for ( i = 0 ; i < 64 ; i++ ) + p2[i] = NULL; /* No replace string this character (yet) */ + } + + p2[unicode & 0x3f] = replace_str; + + return 0; +} + +/* ui arg was a leftover, deleted -kw */ +PRIVATE void +con_clear_unimap NOARGS +{ + int i, j; + u16 **p1; + + for ( i = 0 ; i < 32 ; i++ ) + { + if ( (p1 = uni_pagedir[i]) != NULL ) + { + for ( j = 0 ; j < 32 ; j++ ) + { + if ( p1[j] ) + free(p1[j]); + } + free(p1); + } + uni_pagedir[i] = NULL; + } + + hashtable_contents_valid = 1; +} + +PRIVATE void +con_clear_unimap_str NOARGS +{ + int i, j; + char ***p1; + + for ( i = 0 ; i < 32 ; i++ ) + { + if ( (p1 = uni_pagedir_str[i]) != NULL ) + { + for ( j = 0 ; j < 32 ; j++ ) + { + if ( p1[j] ) + free(p1[j]); + } + free(p1); + } + uni_pagedir_str[i] = NULL; + } + + hashtable_str_contents_valid = 1; /* ??? probably no use... */ +} + +#ifdef NOTDEFINED +int +con_set_unimap ARGS2(u16, ct, struct unipair *, list) +{ + int err = 0, err1, i; + + while( ct-- ) + { + if ( (err1 = con_insert_unipair(list->unicode, + list->fontpos)) != 0 ) + err = err1; + list++; + } + + for ( i = 0 ; i <= 3 ; i++ ) + set_inverse_transl(i); /* Update all inverse translations */ + + return err; +} +#endif /* NOTDEFINED */ + +/* Loads the unimap for the hardware font, as defined in uni_hash.tbl. + The representation used was the most compact I could come up + with. This routine is executed at sys_setup time, and when the + PIO_FONTRESET ioctl is called. */ + +PRIVATE void +con_set_default_unimap NOARGS +{ + int i, j; + u16 *p; + + /* The default font is always 256 characters */ + + con_clear_unimap(); + + p = dfont_unitable; + for ( i = 0 ; i < 256 ; i++ ) + for ( j = dfont_unicount[i] ; j ; j-- ) + con_insert_unipair(*(p++), i); + + for ( i = 0 ; i <= 3 ; i++ ) + set_inverse_transl(i); /* Update all inverse translations */ + + UC_current_unitable = dfont_unitable; +} + +PUBLIC int UCNumCharsets = 0; + +PUBLIC int UCLYhndl_HTFile_for_unspec = -1; +PUBLIC int UCLYhndl_HTFile_for_unrec = -1; +PUBLIC int UCLYhndl_for_unspec = -1; +PUBLIC int UCLYhndl_for_unrec = -1; + +PRIVATE int +UC_con_set_unimap ARGS2(int, UC_charset_out_hndl, int, update_flag) +{ + int i, j; + u16 *p; + + if (!UC_valid_UC_charset(UC_charset_out_hndl)) + { + if (TRACE) + fprintf(stderr,"UC_con_set_unimap: Invalid charset handle %i.\n", + UC_charset_out_hndl); + return -1; + } + + p = UCInfo[UC_charset_out_hndl].unitable; + if (p == UC_current_unitable) { /* test whether pointers are equal */ + return update_flag; /* nothing to be done */ + } + UC_current_unitable = p; + + /* The font is always 256 characters - so far. */ + + con_clear_unimap(); + + for ( i = 0 ; i < 256 ; i++ ) + for ( j = UCInfo[UC_charset_out_hndl].unicount[i] ; j ; j-- ) + con_insert_unipair(*(p++), i); + + if (update_flag) + for ( i = 0 ; i <= 3 ; i++ ) + set_inverse_transl(i); /* Update all inverse translations */ + return 0; +} + +PRIVATE int +UC_con_set_unimap_str ARGS2(u16, ct, struct unipair_str *, list) +{ + int err = 0, err1; + + while( ct-- ) + { + if ( (err1 = con_insert_unipair_str(list->unicode, + list->replace_str)) != 0 ) + err = err1; + list++; + } + + /* No inverse translations for replacement strings! */ + if (!err) hashtable_str_contents_valid = 1; + return err; +} + +#if 0 /* UNUSED */ +int +con_get_unimap ARGS3(u16, ct, u16 *, uct, struct unipair *, list) +{ + int i, j, k, ect; + u16 **p1, *p2; + + ect = 0; + if (hashtable_contents_valid) + { + for ( i = 0 ; i < 32 ; i++ ) + if ( (p1 = uni_pagedir[i]) != NULL ) + for ( j = 0 ; j < 32 ; j++ ) + if ( (p2 = *(p1++)) != NULL ) + for ( k = 0 ; k < 64 ; k++ ) + { + if ( *p2 < MAX_GLYPH && ect++ < ct ) + { + list->unicode = (u16) ((i<<11)+(j<<6)+k); + list->fontpos = (u16) *p2; + list++; + } + p2++; + } + } + *uct = ect; + return ((ect <= ct) ? 0 : -ENOMEM); +} +#endif + +int +conv_uni_to_pc ARGS1(long, ucs) +{ + int h; + u16 **p1, *p2; + + /* Only 16-bit codes supported at this time */ + if (ucs > 0xffff) + ucs = 0xfffd; /* U+FFFD: REPLACEMENT CHARACTER */ + else if (ucs < 0x20 || ucs >= 0xfffe) + return -1; /* Not a printable character */ + else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f)) + return -2; /* Zero-width space */ + /* + * UNI_DIRECT_BASE indicates the start of the region in the User Zone + * which always has a 1:1 mapping to the currently loaded font. The + * UNI_DIRECT_MASK indicates the bit span of the region. + */ + else if ( (ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE ) + return ucs & UNI_DIRECT_MASK; + + if (!hashtable_contents_valid) + return -3; + + if ( (p1 = uni_pagedir[ucs >> 11]) && + (p2 = p1[(ucs >> 6) & 0x1f]) && + (h = p2[ucs & 0x3f]) < MAX_GLYPH ) + return h; + + return -4; /* not found */ +} + +/* Note: contents of outbuf is not changes for negative return value! */ +PRIVATE int +conv_uni_to_str ARGS3(char*, outbuf, int, buflen, long, ucs) +{ + char *h; + char ***p1, **p2; + + /* Only 16-bit codes supported at this time */ + if (ucs > 0xffff) + ucs = 0xfffd; /* U+FFFD: REPLACEMENT CHARACTER */ +/* Maybe the following two cases should be allowed here?? -kw */ + else if (ucs < 0x20 || ucs >= 0xfffe) + return -1; /* Not a printable character */ + else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f)) + return -2; /* Zero-width space */ + /* + * UNI_DIRECT_BASE indicates the start of the region in the User Zone + * which always has a 1:1 mapping to the currently loaded font. The + * UNI_DIRECT_MASK indicates the bit span of the region. + */ +/* We dont handle the following here: */ +#if(0) + else if ( (ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE ) + return ucs & UNI_DIRECT_MASK; +#endif + if (!hashtable_str_contents_valid) + return -3; + + if ( (p1 = uni_pagedir_str[ucs >> 11]) && + (p2 = p1[(ucs >> 6) & 0x1f]) && + (h = p2[ucs & 0x3f]) ) { + strncpy (outbuf,h,(size_t) (buflen-1)); + return 1; /* ok ! */ + } + return -4; /* not found */ +} + +PUBLIC int UCInitialized = 0; +/* + * [ original comment: - kw ] + * This is called at sys_setup time, after memory and the console are + * initialized. It must be possible to call kmalloc(..., GFP_KERNEL) + * from this function, hence the call from sys_setup. + */ +PRIVATE void +UCconsole_map_init NOARGS +{ + con_set_default_unimap(); + UCInitialized = 1; +} + +/* OK now, finally, some stuff that is more specifically for Lynx: - kw */ + +PUBLIC int UCGetcharset_byMIMEname PARAMS((char * UC_MIMEcharset)); +PUBLIC int UCGetcharset_byLYNXname PARAMS((char * UC_LYNXcharset)); + +PUBLIC int UCTransUniChar ARGS2(long, unicode, int, charset_out) +{ + int rc; + int UChndl_out; + u16 * ut; + + if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) + return -12; + + ut = UCInfo[UChndl_out].unitable; + if (ut != UC_current_unitable) { + rc = UC_con_set_unimap(UChndl_out, 1); + if (rc < 0) + return rc; + } + rc = conv_uni_to_pc(unicode); + if (rc == -4) + rc = conv_uni_to_pc(0xfffd); + return rc; +} +/* returns string length, or negative value for error. */ + +PUBLIC int UCTransUniCharStr ARGS5(char *, outbuf, int, buflen, long, unicode, + int, charset_out, int, chk_single_flag) +{ + int rc, src = 0, ignore_err; + int UChndl_out; + struct unimapdesc_str * repl; + u16 * ut; + +if (buflen<2) + return -13; + + if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) + return -12; + + if (chk_single_flag) { + ut = UCInfo[UChndl_out].unitable; + if (ut != UC_current_unitable) { + src = UC_con_set_unimap(UChndl_out, 1); + if (src < 0) + return src; + } + src = conv_uni_to_pc(unicode); + if (src >= 32) { + outbuf[0] = src; outbuf[1] = '\0'; + return 1; } + } + + repl = &(UCInfo[UChndl_out].replacedesc); + if (repl != UC_current_unitable_str) { + con_clear_unimap_str(); + ignore_err = UC_con_set_unimap_str(repl->entry_ct, repl->entries); + UC_current_unitable_str = repl; + } + rc = conv_uni_to_str(outbuf, buflen, unicode); + if (rc == -4) + rc = conv_uni_to_str(outbuf, buflen, 0xfffd); + if (rc >= 0) + return (strlen(outbuf)); + + if (chk_single_flag && src == -4) { + rc = conv_uni_to_pc(0xfffd); + if (rc >= 32) { + outbuf[0] = rc; outbuf[1] = '\0'; + return 1; } + else return rc; + } + return -4; +} + +int UC_lastautoGN = 0; + +PRIVATE int UC_MapGN ARGS2(int, UChndl, int, update_flag) +{ + int i,Gn,found,lasthndl; + found = 0; + Gn = -1; + for (i=0; i<4 && Gn<0; i++) { + if (UC_GNhandles[i] < 0) + Gn = i; + else if (UC_GNhandles[i] == UChndl) + {Gn = i; found = 1;} + } + if (found) return Gn; + if (Gn >= 0) { + UCInfo[UChndl].GN = Gn; + UC_GNhandles[Gn] = UChndl; + } + else { + if (UC_lastautoGN == GRAF_MAP) + Gn = IBMPC_MAP; + else Gn = GRAF_MAP; + UC_lastautoGN = Gn; + lasthndl = UC_GNhandles[Gn]; + UCInfo[lasthndl].GN = -1; + UCInfo[UChndl].GN = Gn; + UC_GNhandles[Gn] = UChndl; + } + UC_con_set_trans(UChndl,Gn,update_flag); + return Gn; +} + +PUBLIC int UCTransChar ARGS3(char, ch_in, int, charset_in, int, charset_out) +{ + int unicode, Gn; + int rc; + int UChndl_in, UChndl_out; + u16 * ut; + int upd = 0; + +#ifndef UC_NO_SHORTCUTS + if (charset_in == charset_out) + return (unsigned char)ch_in; +#endif + if (charset_in < 0) return -11; + if ((UChndl_in = LYCharSet_UC[charset_in].UChndl) < 0) + return -11; + if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) + return -12; + if (!UCInfo[UChndl_in].num_uni) + return -11; + if ((Gn = UCInfo[UChndl_in].GN) < 0) + {Gn = UC_MapGN(UChndl_in,0); upd = 1;} + + ut = UCInfo[UChndl_out].unitable; + if (ut == UC_current_unitable) + {if (upd) set_inverse_transl(Gn);} + else { + rc = UC_con_set_unimap(UChndl_out, 1); + if (rc > 0) + set_inverse_transl(Gn); + else if (rc < 0) + return rc; + } + UC_translate = set_translate(Gn); + unicode = UC_translate[(unsigned char)ch_in]; + rc = conv_uni_to_pc(unicode); + if (rc == -4) + rc = conv_uni_to_pc(0xfffd); + return rc; +} + +PUBLIC long int UCTransToUni ARGS2(char, ch_in, int, charset_in) +{ + int unicode, Gn; + unsigned char ch_iu; + int UChndl_in; + + ch_iu = (unsigned char)ch_in; +#ifndef UC_NO_SHORTCUTS + if (charset_in == 0) + return ch_iu; + if ((unsigned char)ch_in < 128) + return ch_iu; +#endif + if (charset_in < 0) return -11; + if ((UChndl_in = LYCharSet_UC[charset_in].UChndl) < 0) + return -11; + if (!UCInfo[UChndl_in].num_uni) + return -11; + if ((Gn = UCInfo[UChndl_in].GN) < 0) + {Gn = UC_MapGN(UChndl_in,1);} + + UC_translate = set_translate(Gn); + unicode = UC_translate[(unsigned char)ch_in]; + + return unicode; +} + +#if 0 /* UNUSED */ +PUBLIC int UCReverseTransChar ARGS3(char, ch_out, int, charset_in, int, charset_out) +{ + int Gn; + int rc; + int UChndl_in, UChndl_out; + u16 * ut; + +#ifndef UC_NO_SHORTCUTS + if (charset_in == charset_out) + return ch_out; +#endif + if (charset_in < 0) return -11; + if ((UChndl_in = LYCharSet_UC[charset_in].UChndl) < 0) + return -11; + if (charset_out < 0) return -12; + if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) + return -12; + if (!UCInfo[UChndl_in].num_uni) + return -11; + + ut = UCInfo[UChndl_out].unitable; + if (ut == UC_current_unitable) { + if ((Gn = UCInfo[UChndl_in].GN) >= 0) { + UC_translate = set_translate(Gn); + rc = inv_translate[(unsigned int)ch_out]; + if (rc >= 32) return rc; + } + else { + Gn = UC_MapGN(UChndl_in,1); + UC_translate = set_translate(Gn); + rc = inv_translate[(unsigned int)ch_out]; + if (rc >= 32) return rc; + } + } + return UCTransChar(ch_out, charset_out, charset_in); +} +#endif + +/* returns string length, or negative value for error. */ + +PUBLIC int UCTransCharStr ARGS6(char *, outbuf, int, buflen, char, ch_in, + int, charset_in, int, charset_out, int, chk_single_flag) +{ + int unicode, Gn; + int rc, src = 0, ignore_err; + int UChndl_in, UChndl_out; + struct unimapdesc_str * repl; + u16 * ut; + int upd = 0; + +if (buflen<2) + return -13; +#ifndef UC_NO_SHORTCUTS + if (chk_single_flag && charset_in == charset_out) { + outbuf[0] = ch_in; outbuf[1] = '\0'; + return 1; } +#endif + if (charset_in < 0) return -11; + if ((UChndl_in = LYCharSet_UC[charset_in].UChndl) < 0) + return -11; + if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) + return -12; + if (!UCInfo[UChndl_in].num_uni) + return -11; + if ((Gn = UCInfo[UChndl_in].GN) < 0) + {Gn = UC_MapGN(UChndl_in,!chk_single_flag); upd=chk_single_flag;} + + UC_translate = set_translate(Gn); + unicode = UC_translate[(unsigned char)ch_in]; + + if (chk_single_flag) { + ut = UCInfo[UChndl_out].unitable; + if (ut == UC_current_unitable) + {if (upd) set_inverse_transl(Gn);} + else { + src = UC_con_set_unimap(UChndl_out, 1); + if (src > 0) + set_inverse_transl(Gn); + else if (src < 0) + return src; + } + src = conv_uni_to_pc(unicode); + if (src >= 32) { + outbuf[0] = src; outbuf[1] = '\0'; + return 1; } + } + + repl = &(UCInfo[UChndl_out].replacedesc); + if (repl != UC_current_unitable_str) { + con_clear_unimap_str(); + ignore_err = UC_con_set_unimap_str(repl->entry_ct, repl->entries); + UC_current_unitable_str = repl; + } + rc = conv_uni_to_str(outbuf, buflen, unicode); + if (rc == -4) + rc = conv_uni_to_str(outbuf, buflen, 0xfffd); + if (rc >= 0) + return (strlen(outbuf)); + + if (chk_single_flag && src == -4) { + rc = conv_uni_to_pc(0xfffd); + if (rc >= 32) { + outbuf[0] = rc; outbuf[1] = '\0'; + return 1; } + else return rc; + } + return -4; +} + +PRIVATE int UC_FindGN_byMIME ARGS1(char *, UC_MIMEcharset) +{ + int i; + for (i=0; i<4; i++) + if (!strcmp(UC_MIMEcharset,UC_GNsetMIMEnames[i])) + return i; + return -1; +} + +PUBLIC int UCGetRawUniMode_byLYhndl ARGS1(int, i) +{ + if(i < 0) return 0; + return LYCharSet_UC[i].enc; +} + +/* Currently the charset name has to match exactly -- not substring + matching as was done before (see HTMIME.c, HTML.c). */ +PUBLIC int UCGetLYhndl_byMIME ARGS1(CONST char *,UC_MIMEcharset) +{ + int i; + int LYhndl = -1; + + if (!UC_MIMEcharset || !(*UC_MIMEcharset)) return -1; + + for (i=0; i<MAX_CHARSETS && i<LYNumCharsets && + LYchar_set_names[i] && LYhndl<0; i++) + if (LYCharSet_UC[i].MIMEname && + !strcmp(UC_MIMEcharset,LYCharSet_UC[i].MIMEname)) { + LYhndl = i; + } + if (LYhndl < 0) { /* not yet found, special treatment + for several CJK charsets etc... cheating here + Also recognize UTF-8 as synonym for UNICODE-1-1-UTF-8 + (The example file for now still uses the long name, + so that's what will be used internally.) */ + if (0==strcmp(UC_MIMEcharset, "utf-8")) + return UCGetLYhndl_byMIME("unicode-1-1-utf-8"); + if (0==strncmp(UC_MIMEcharset, "iso-2022-jp", 11)) + return UCGetLYhndl_byMIME("euc-jp"); + else if (0==strcmp(UC_MIMEcharset, "euc-kr")) + return UCGetLYhndl_byMIME("iso-2022-kr"); + else if (0==strcmp(UC_MIMEcharset, "gb2312")) + return UCGetLYhndl_byMIME("iso-2022-cn"); + else if (0==strcmp(UC_MIMEcharset, "euc-cn")) + return UCGetLYhndl_byMIME("iso-2022-cn"); + else if (0==strcmp(UC_MIMEcharset, "koi-8")) /* accentsoft bogosity */ + return UCGetLYhndl_byMIME("koi8-r"); + } + return LYhndl; /* returns -1 if no charset found by that MIME name */ +} + +/* function UC_setup_LYCharSets_repl() tries to set up a subtable in + LYCharSets[] appropriate for this new charset, for compatibility + with the "old method". Maybe not nice (maybe not evene necessary + any more), but it works (as far as it goes..). + + We try to be conservative and only allocate new memory for this + if needed. If not needed, just point to SevenBitApproximations[i]. + [Could do the same for ISO_Latin1[] if it's identical to that, but + would make it even *more* messy than it already is...] + This the only function in this file that knows, or cares, about the + HTMLDTD or details of LYCharSets[] subtables (and therefore somewhat + violates the idea that this file should be independent of those). + As in other places, we rely on ISO_Latin1 being the *first* table + in LYCharSets. - kw */ + +/* We need to remember which ones were allocated and which are static.*/ +static char** remember_allocated_LYCharSets[MAX_CHARSETS]; + +PRIVATE void UCreset_allocated_LYCharSets NOARGS +{ + int i=0; + for(;i<MAX_CHARSETS;i++) + remember_allocated_LYCharSets[i]=NULL; +} + +PRIVATE void UCfree_allocated_LYCharSets NOARGS +{ + int i=0; + for(;i<MAX_CHARSETS;i++) + if(remember_allocated_LYCharSets[i]!=NULL) + FREE(remember_allocated_LYCharSets[i]); +} + +PRIVATE char ** UC_setup_LYCharSets_repl ARGS2(int, UC_charset_in_hndl, int, lowest8) +{ + char ** ISO_Latin1 = LYCharSets[0]; + char **p; + char **prepl; + u16 *pp; + char ** tp; + char *s7; + char *s8; + int i,j,changed; + u16 k; + u8 *ti; + /* create a temporary table for reverse lookup of latin1 codes: */ + tp = (char **) malloc(96 * sizeof(char *)); + if (!tp) return NULL; + for (i=0; i<96; i++) + tp[i] = NULL; + ti = (u8 *) malloc(96 * sizeof(u8)); + if (!ti) { + FREE(tp); + return NULL; + } + for (i=0; i<96; i++) + ti[i] = 0; + + pp = UCInfo[UC_charset_in_hndl].unitable; + + /* Determine if we have any mapping of a Unicode in the range 160-255 + to an allowed code point > 0x80 in our new charset... + Store any mappings found in ti[]. */ + if (UCInfo[UC_charset_in_hndl].num_uni > 0) + for ( i = 0 ; i < 256 ; i++ ) + { + if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) { + if ((k = *pp) >= 160 && k < 256 && i >= lowest8) { + ti[k-160] = i; + } + for ( ; j ; j-- ) + pp++; + } + } + { + u16 ct; + struct unipair_str *list; + + /* Determine if we have any mapping of a Unicode in the range 160-255 + to a replacement string for our new charset... + Store any mappings found in tp[]. */ + ct = UCInfo[UC_charset_in_hndl].replacedesc.entry_ct; + list = UCInfo[UC_charset_in_hndl].replacedesc.entries; + while( ct-- ) + { + if ((k = list->unicode) >= 160 && k < 256) { + tp[k-160] = list->replace_str; + } + list++; + } + } + /* Now allocate a new table compatible with LYCharSets[] + and with the HTMLDTD for entitied. + We don't know yet whether we'll keep it around. */ + p = prepl = (char **) malloc(HTML_dtd.number_of_entities * sizeof(char *)); + if (!p) { + FREE(tp); FREE(ti); + return NULL; + } + changed = 0; + for (i=0; i<HTML_dtd.number_of_entities; i++,p++) { + /* For each of those entities, we check what the "old method" + ISO_Latin1[] mapping does with them. If it is nothing we + want to use, just point to the SevenBitApproximations[] string. */ + s7 = SevenBitApproximations[i]; + s8 = ISO_Latin1[i]; + *p = s7; + if (s8 && (unsigned char)(*s8) >= 160 && strlen(s8) == 1) { + /* We have an entity that is mapped to one valid eightbit latin1 char*/ + if (ti[(unsigned char)(*s8) - 160] >= lowest8 && + !(s7[0] == ti[(unsigned char)(*s8) - 160] && s7[1] == '\0')) { + /* ...which in turn is mapped, by our "new method", to another + valid eightbit char for this new charset: either to itself... */ + if (ti[(unsigned char)(*s8) - 160] == (unsigned char)(*s8)) + *p = s8; + else { + /* ...or another byte... */ +#ifdef NOTDEFINED + *p = (char *)malloc(2*sizeof(char)); + if (!*p) { + FREE(tp); FREE(ti); FREE(prepl); + return NULL; + } + (*p)[0] = ti[(unsigned char)(*s8) - 160]; + (*p)[1] = '\0'; +#else + /* use this instead... make those buggers int HTAtoms, so + they will be cleaned up at exit... all for the sake of + preventing memory leaks, sigh */ + static char dummy[2]; /* one char dummy string */ + + dummy[0] = ti[(unsigned char)(*s8) - 160]; + *p = HTAtom_name(HTAtom_for(dummy)); +#endif /* ! NOTDEFINED */ + } + changed = 1; + } + else if (tp[(unsigned char)(*s8) - 160] && + 0!=strcmp(s7,tp[(unsigned char)(*s8) - 160])) { + /* ...or which is mapped, by our "new method", to a replacement + string for this new charset. */ + *p = tp[(unsigned char)(*s8) - 160]; + changed = 1; + } + } + } + FREE(tp); FREE(ti); + if (!changed) { + FREE(prepl); + return NULL; + } + return prepl; +} +/* "New method" meets "Old method" ... */ + +PRIVATE int UC_Register_with_LYCharSets ARGS4(int, s, + char *, UC_MIMEcharset, + char *, UC_LYNXcharset, + int, lowest_eightbit) +{ + int i, LYhndl,found; + char ** repl; + + LYhndl = -1; + if (LYNumCharsets == 0) /* initialize here; so whoever changes + LYCharSets.c doesn't have to count... */ + for (i=0; (i<MAX_CHARSETS) && LYchar_set_names[i]; i++) + LYNumCharsets = i+1; + + /* Do different kinds of searches... after all, this is experimental...*/ + for (i=0; i<MAX_CHARSETS && LYchar_set_names[i] && LYhndl<0; i++) + if (!strcmp(UC_LYNXcharset,LYchar_set_names[i])) + LYhndl = i; + for (i=0; i<MAX_CHARSETS && LYchar_set_names[i] && LYhndl<0; i++) + if (LYCharSet_UC[i].MIMEname && + !strcmp(UC_MIMEcharset,LYCharSet_UC[i].MIMEname)) + LYhndl = i; + + if (LYhndl < 0) { /* not found */ + found = 0; + if (LYNumCharsets >= MAX_CHARSETS) { + if (TRACE) + fprintf(stderr,"UC_Register_with_LYCharSets: Too many. Ignoring %s/%s.", + UC_MIMEcharset,UC_LYNXcharset); + return -1; + } + /* add to LYCharSets.c lists */ + LYhndl = LYNumCharsets; LYNumCharsets ++; + LYlowest_eightbit[LYhndl] = 999; + LYCharSets[LYhndl] = SevenBitApproximations; + /* Hmm, try to be conservative here. */ + LYchar_set_names[LYhndl] = UC_LYNXcharset; + LYchar_set_names[LYhndl+1] = (char *) 0; + /* Terminating NULL may be looked for by Lynx code */ + } else found = 1; + + LYCharSet_UC[LYhndl].UChndl = s; + /* Can we just copy the pointer? Hope so... */ + LYCharSet_UC[LYhndl].MIMEname = UC_MIMEcharset; + LYCharSet_UC[LYhndl].enc = UCInfo[s].enc; + + /* @@@ We really SHOULD get more info from the table files, and set + relevant flags in the LYCharSet_UC[] entry with that info... + for now, let's try it without - kw */ + + if (lowest_eightbit < LYlowest_eightbit[LYhndl]) + LYlowest_eightbit[LYhndl] = lowest_eightbit; + else if (lowest_eightbit > LYlowest_eightbit[LYhndl]) + UCInfo[s].lowest_eight = LYlowest_eightbit[LYhndl]; + + if (!found && LYhndl > 0) { + repl = UC_setup_LYCharSets_repl(s,UCInfo[s].lowest_eight); + if (repl) { + LYCharSets[LYhndl] = repl; + /* remember to FREE at exit */ + remember_allocated_LYCharSets[LYhndl]=repl; + } + } + return LYhndl; +} + + +/* This only sets up the structure - no initialization of the tables + * is done here yet. + */ +void UC_Charset_Setup ARGS8(char *, UC_MIMEcharset, + char *, UC_LYNXcharset, + u8 *, unicount, u16 *, unitable, int, nnuni, + struct unimapdesc_str, replacedesc, int, lowest_eight, + int, UC_rawuni) +{ + int s, Gn; + int i, status = 0, found; + + /* Get (new?) slot */ + + found = -1; + for (i=0; i<UCNumCharsets && found<0; i++) { + if (!strcmp(UCInfo[i].MIMEname,UC_MIMEcharset)) + found = i; + } + if (found >= 0) s = found; + else { + if (UCNumCharsets >= MAX_CHARSETS) + { + if (TRACE) + fprintf(stderr,"UC_Charset_Setup: Too many. Ignoring %s/%s.", + UC_MIMEcharset,UC_LYNXcharset); + return; + } + s = UCNumCharsets; + UCInfo[s].MIMEname = UC_MIMEcharset; + } + UCInfo[s].LYNXname = UC_LYNXcharset; + UCInfo[s].unicount = unicount; + UCInfo[s].unitable = unitable; + UCInfo[s].num_uni = nnuni; + UCInfo[s].replacedesc = replacedesc; + Gn = UC_FindGN_byMIME(UC_MIMEcharset); + if (Gn >= 0) + UC_GNhandles[Gn] = s; + UCInfo[s].GN = Gn; + if (UC_rawuni == UCT_ENC_UTF8) lowest_eight = 128; /* cheat here */ + UCInfo[s].lowest_eight = lowest_eight; + UCInfo[s].enc = UC_rawuni; + UCInfo[s].LYhndl = UC_Register_with_LYCharSets(s, UC_MIMEcharset, + UC_LYNXcharset, lowest_eight); + UCInfo[s].uc_status = status; + if (found < 0) UCNumCharsets++; + return; +} + +PRIVATE void UCcleanup_mem NOARGS +{ + int i; + UCfree_allocated_LYCharSets(); + con_clear_unimap_str(); + con_clear_unimap(); + for (i=1; i<4; i++) /* first one is static! */ + FREE(inverse_translations[i]); +} + +PUBLIC void UCInit NOARGS +{ + UCreset_allocated_LYCharSets(); + atexit(UCcleanup_mem); + UCconsole_map_init(); + + UC_CHARSET_SETUP; + UC_CHARSET_SETUP_iso_8859_1; + UC_CHARSET_SETUP_iso_8859_2; + UC_CHARSET_SETUP_iso_8859_3; + UC_CHARSET_SETUP_iso_8859_4; + UC_CHARSET_SETUP_iso_8859_5; + UC_CHARSET_SETUP_iso_8859_7; + UC_CHARSET_SETUP_iso_8859_9; + UC_CHARSET_SETUP_iso_8859_10; + UC_CHARSET_SETUP_koi8_r; + + UC_CHARSET_SETUP_cp437; + UC_CHARSET_SETUP_cp850; + UC_CHARSET_SETUP_cp852; + UC_CHARSET_SETUP_windows_1250; + UC_CHARSET_SETUP_iso_8859_1_windows_; + UC_CHARSET_SETUP_unicode_1_1_utf_8; + UC_CHARSET_SETUP_mnemonic_ascii_0; + UC_CHARSET_SETUP_mnemonic; +/* UC_CHARSET_SETUP_mnem; */ +} diff --git a/src/UCdomap.h b/src/UCdomap.h new file mode 100644 index 00000000..0009f6eb --- /dev/null +++ b/src/UCdomap.h @@ -0,0 +1,58 @@ +/* + * [old comments: - kw ] + * consolemap.h + * + * Interface between console.c, selection.c and UCmap.c + */ +#define LAT1_MAP 0 +#define GRAF_MAP 1 +#define IBMPC_MAP 2 +#define USER_MAP 3 + +#ifndef MAX_CHARSETS +#define MAX_CHARSETS +#endif + +extern int hashtable_contents_valid; +extern unsigned char inverse_translate PARAMS((int glyph)); +extern u16 *set_translate PARAMS((int m)); +extern int conv_uni_to_pc PARAMS((long ucs)); + +extern int hashtable_str_contents_valid; /* ??? probably no use... */ + +/* Some conventions i try to follow (loosely): + [a-z]* only internal, names from linux driver code. + UC_* to be only known internally. + UC[A-Z]* to be exported to other parts of Lynx. -kw +*/ + +extern void UC_Charset_Setup PARAMS((char * UC_MIMEcharset, char * UC_LYNXcharset, + u8 * unicount, u16 * unitable, int nnuni, + struct unimapdesc_str replacedesc, int lowest_eight, + int UC_rawuni)); + +char *UC_GNsetMIMEnames[4] = + {"iso-8859-1","x-dec-graphics","cp437","x-transparent"}; +int UC_GNhandles[4] = {-1, -1, -1, -1}; + +struct UC_charset { + char *MIMEname; + char *LYNXname; + u8* unicount; + u16* unitable; + int num_uni; + struct unimapdesc_str replacedesc; + int uc_status; + int LYhndl; + int GN; + int lowest_eight; + int enc; +}; +char * UC_charsetMIMEnames[MAX_CHARSETS]; + +PUBLIC struct UC_charset UCInfo[MAX_CHARSETS]; + +PUBLIC int UCNumCharsets; + +extern void UCInit NOARGS; + diff --git a/src/chrtrans/MAKEFILE.W32 b/src/chrtrans/MAKEFILE.W32 new file mode 100644 index 00000000..4968995f --- /dev/null +++ b/src/chrtrans/MAKEFILE.W32 @@ -0,0 +1,129 @@ +# +# Borland C++ IDE generated makefile +# +.AUTODEPEND + + +# +# Borland C++ tools +# +IMPLIB = Implib +BCC32 = Bcc32 +BccW32.cfg +TLINK32 = TLink32 +TLIB = TLib +BRC32 = Brc32 +TASM32 = Tasm32 +# +# IDE macros +# + + +# +# Options +# +IDE_LFLAGS32 = -LD:\BC45\LIB +LLATC32_dbmakeuctbdexe = -LCURSES;D:\BC45\LIB -Tpe -ap -c -wdpl -wdup +RLATC32_dbmakeuctbdexe = -w32 -k +BLATC32_dbmakeuctbdexe = +CNIEAT_dbmakeuctbdexe = -I.\;..\..\CURSES;..;..\..\WWW\LIBRARY\IMPLEMENTATION;D:\BC45\INCLUDE -DNO_UNISTD_H;_WINDOWS;NCURSES;FANCY_CURSES;XMOSAIC_HACK;ACCESS_AUTH;NO_UTMP;NO_CUSERID;NO_TTYTYPE;NOSIGHUP;DOSPATH;NOUSERS +LNIEAT_dbmakeuctbdexe = -x +LEAT_dbmakeuctbdexe = $(LLATC32_dbmakeuctbdexe) +REAT_dbmakeuctbdexe = $(RLATC32_dbmakeuctbdexe) +BEAT_dbmakeuctbdexe = $(BLATC32_dbmakeuctbdexe) + +# +# Dependency List +# +Dep_char = \ + .\makeuctb.exe + +char : BccW32.cfg $(Dep_char) + echo MakeNode + +Dep_dbmakeuctbdexe = \ + .\makeuctb.obj + +.\makeuctb.exe : $(Dep_dbmakeuctbdexe) + $(TLINK32) @&&| + /v $(IDE_LFLAGS32) $(LEAT_dbmakeuctbdexe) $(LNIEAT_dbmakeuctbdexe) + +D:\BC45\LIB\c0x32.obj+ +.\makeuctb.obj +$<,$* +D:\BC45\LIB\bidsf.lib+ +D:\BC45\LIB\import32.lib+ +D:\BC45\LIB\cw32.lib + +| + +.\makeuctb.obj : makeuctb.c + $(BCC32) -P- -c @&&| + $(CEAT_dbmakeuctbdexe) $(CNIEAT_dbmakeuctbdexe) -o$@ makeuctb.c +| + +# Compiler configuration file +BccW32.cfg : + Copy &&| +-R +-v +-vi +-H +-H=lynx.csm +-w- +-A- +-wcpt +-wrpt +-wrng +-w-voi +-w-ret +-w-sus +-w-dup +-w-big +-w-ext +-w-zdi +-w-bei +-w-obi +-w-ofp +-w-eas +-w-hid +-w-ncf +-w-ibc +-w-dsz +-w-nst +-w-mpc +-w-mpd +-w-ntd +-w-nvf +-w-hch +-w-inl +-w-lin +-w-lvc +-w-pia +-w-def +-w-nod +-w-pro +-w-rvl +-w-ccc +-w-aus +-w-par +-w-rch +-w-eff +-w-ill +-w-ias +-w-msg +-WC +-Ot +-d- +-K +-a- +-w-stu +-wbbf +-w-dpu +-wcln +-wsig +-wucp +-g200 +-H- +-v- +| $@ + + diff --git a/src/chrtrans/MAKEW32.BAT b/src/chrtrans/MAKEW32.BAT new file mode 100644 index 00000000..1259b344 --- /dev/null +++ b/src/chrtrans/MAKEW32.BAT @@ -0,0 +1,25 @@ +@echo If .tbl files are added or removed you will need to hand edit +@echo this batch file. +@echo . +make -f makefile.w32 +makeuctb iso01_uni.tbl > iso01_uni.h +makeuctb iso02_uni.tbl > iso02_uni.h +makeuctb iso03_uni.tbl > iso03_uni.h +makeuctb iso04_uni.tbl > iso04_uni.h +makeuctb iso05_uni.tbl > iso05_uni.h +makeuctb iso07_uni.tbl > iso07_uni.h +makeuctb iso09_uni.tbl > iso09_uni.h +makeuctb iso10_uni.tbl > iso10_uni.h +makeuctb cp437_uni.tbl > cp437_uni.h +makeuctb cp850_uni.tbl > cp850_uni.h +makeuctb cp852_uni.tbl > cp852_uni.h +makeuctb cp1250_uni.tbl > cp1250_uni.h +makeuctb cp1252_uni.tbl > cp1252_uni.h +makeuctb utf8_uni.tbl > utf8_uni.h +makeuctb mnemonic_suni.tbl > mnemonic_suni.h +makeuctb mnem_suni.tbl > mnem_suni.h +makeuctb rfc_suni.tbl > rfc_suni.h +makeuctb def7_uni.tbl > def7_uni.h +makeuctb koi8r_uni.tbl > koi8r_uni.h + + diff --git a/src/chrtrans/Makefile b/src/chrtrans/Makefile new file mode 100644 index 00000000..055dbad2 --- /dev/null +++ b/src/chrtrans/Makefile @@ -0,0 +1,78 @@ +# +# Makefile for the makeuctb and unicode tables. +# +# This may not yet work for the general case. +# Only some dependencies included. +# +# +CFLAGS = $(MCFLAGS) -I.. -I../.. -I../../WWW/Library/Implementation + +.SUFFIXES: .tbl +# +# This file contains the font map for the default (hardware) font +# + +FONTMAP_INC = iso01_uni.h# default, if not set by recursive call + +### #include $(TOPDIR)/Rules.make ??? + +### fastdep: $(FONTMAP_INC) + +### MCFLAGS=-g -DUNIX -DLINUX -DNO_KEYPAD -DNO_TTYTYPE -DEXP_CHARTRANS -I.. -I../../WWW/Library/Implementation -I../.. + +CHRTR= + +TABLES= $(CHRTR)iso02_uni.h \ + $(CHRTR)iso01_uni.h \ + $(CHRTR)def7_uni.h \ + $(CHRTR)iso03_uni.h \ + $(CHRTR)iso04_uni.h \ + $(CHRTR)iso05_uni.h \ + $(CHRTR)iso07_uni.h \ + $(CHRTR)iso09_uni.h \ + $(CHRTR)iso10_uni.h \ + $(CHRTR)koi8r_uni.h \ + $(CHRTR)cp437_uni.h \ + $(CHRTR)cp850_uni.h \ + $(CHRTR)cp852_uni.h \ + $(CHRTR)cp1250_uni.h \ + $(CHRTR)cp1252_uni.h \ + $(CHRTR)utf8_uni.h \ + $(CHRTR)rfc_suni.h \ + $(CHRTR)mnemonic_suni.h \ + $(CHRTR)mnem_suni.h + +default: $(FONTMAP_INC) + +tables: $(TABLES) + +makeuctb: makeuctb.c UCkd.h + $(CC) $(CFLAGS) -o makeuctb makeuctb.c + +.tbl.h: + ./makeuctb $*.tbl > $@ + +iso01_uni.h: iso01_uni.tbl makeuctb +iso02_uni.h: iso02_uni.tbl makeuctb +iso03_uni.h: iso03_uni.tbl makeuctb +iso04_uni.h: iso04_uni.tbl makeuctb +iso05_uni.h: iso05_uni.tbl makeuctb +iso07_uni.h: iso07_uni.tbl makeuctb +iso09_uni.h: iso09_uni.tbl makeuctb +iso10_uni.h: iso10_uni.tbl makeuctb +cp437_uni.h: cp437_uni.tbl makeuctb +cp850_uni.h: cp850_uni.tbl makeuctb +cp852_uni.h: cp852_uni.tbl makeuctb +cp1250_uni.h: cp1250_uni.tbl makeuctb +cp1252_uni.h: cp1252_uni.tbl makeuctb +utf8_uni.h: utf8_uni.tbl makeuctb +mnemonic_suni.h: mnemonic_suni.tbl makeuctb +mnem_suni.h: mnem_suni.tbl makeuctb +rfc_suni.h: rfc_suni.tbl makeuctb + +clean: + rm -f makeuctb *.o *uni.h + +distclean: clean + -rm -rf obsolete + rm -f core *.bak *.sav *~ *.h_old diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format new file mode 100644 index 00000000..e5eca7bf --- /dev/null +++ b/src/chrtrans/README.format @@ -0,0 +1,103 @@ +Some notes on the format of table files used here. +(See README.tables for what to do with them.) + +The format is derived from stuff in the console driver of the +Linux kernel (as are the guts of the chartrans machinery). +THAT DOES NOT MEAN that anything here is Linux specific - it isn't. + +[Note that the format may change, this is still somewhat experimental.] + +There are four kinds of lines: + +Summary example: + + # This line is a comment, the next line is a directive + OBrand new Charset! + 0x41 U+0041 U+0391 + U+00cd:I' + +Description: + +a) comment lines start with a '#' character. + (trailing comments are allowed on some of the other lines, if in doubt + check the examples..) + +b) directives: + start with a special character, currently recognized are the letters: + + O The name under which this should appear on the O)ptions screen + M The name for this charset in MIME syntax (one word with digits + and some other non-letters allowed, should be IANA registered) + R a number which flags some special property (encoding) for this + charset [see utf8.uni for example, see UCDefs.h for details]. + +c) character translation definitions: + they look like + + 0x41 U+0041 U+0391 ... + + and are used for "forward" translation (mapping this charset to Unicode) + AS WELL AS "back" translation (mapping Unicodes to an 8-bit + [incl. 7-bit ASCII] code). + + For the "forward" direction, only the first Unicode is used; for + "back" translation, all listed Unicodes are mapped to the byte (i.e. + code point) on the left. + + The above example line would tell the chartrans mechanism: + "For this charset, code position 65 [hex 0x41] contains Unicode + U+0041 (LATIN CAPITAL LETTER A). For translation of Unicodes to + this charset, use byte value 65 [hex 0x41] for U+0041 (LATIN CAPITAL + LETTER A) as well as for U+0391 (GREEK CAPITAL LETTER ALPHA)." + + [Note that for bytes in the ASCII range 0x00-0x7F, the forward translations + will (probably) not be used by Lynx. It doesn't hurt to list those, + too, for completeness.] + + Some other forms are also accepted: + + * Syntax accepted: + * <fontpos> <unicode> <unicode> ... + * <fontpos> <unicode range> <unicode range> ... + * <fontpos> idem + * <range> idem + * <range> <unicode range> + * + * where <range> ::= <fontpos>-<fontpos> + * and <unicode> ::= U+<h><h><h><h> + * and <h> ::= <hexadecimal digit> + +d) string replacement definitions: + + They look like + + U+00cd:I' + + which would mean "Replace Unicode U+00cd (LATIN CAPITAL LETTER I WITH + ACUTE" with the string (consisting of two character) I' (if no other + translation is available)." + + Note that everything after the ':' is currently taken VERBATIM, so + careful with trailing blanks etc. + + * Syntax accepted: + * <unicode> :<replace> + * <unicode range> :<replace> + * + * where <unicode range> ::= <unicode>-<unicode> + * and <unicode> ::= U+<h><h><h><h> + * and <h> ::= <hexadecimal digit> + * and <replace> any string not containing '\n' or '\0' + +Motivation: + +- It is an extention of the format already in use for Linux (kernel, + kbd package), those files can be used with some minimal editing. + +- It is easy to convert Unicode tables for other charsets, as they + are commonly found on ftp sites etc., to this format - the right + sed command should do 99% of the work. + +- The format is independent of details of other parts of the Lynx code, + unlike the "old" LYCharsets.c mechanism. The tables don't have to + be changed in synch when e.g. new entities are added to the HTMLDTD. diff --git a/src/chrtrans/README.tables b/src/chrtrans/README.tables new file mode 100644 index 00000000..94622a99 --- /dev/null +++ b/src/chrtrans/README.tables @@ -0,0 +1,52 @@ +The translation table files in this directory are _examples only_. +They were collected from several sources (among them Linux kbd package, +ftp://dkuug.dk/, ftp://unicode.org/) and automatically comverted (if +applicable), but not checked in detail. The Unicode/UCS2 values +for some of the RFC1345 Mnemonic codes are out of date, a cleanup and +update would be needed for serious use (including removing the mappings +from the "private zone" U+E000 etc.). + +More tranlation files can be easily provided (and new character entities +added to HTMLDTD.c), this set is just to test whether the system works +in principle (and also how it behaves with of incomplete data...) + +See the file README.format for a brief explanation of what's in the +table files. + +The examples have names *_uni or *_suni with a .tbl suffix, but it +doesn't really matter. The auxiliary program makeuctb (MAKE UniCode +TaBle) is used to "compile" them into C header files, which can be +included by UCdomap.c. + +Ideally this should be taken care of by the Makefiles.. + + +To make a new chartrans table available to Lynx (and thereby make a new +charset known to Lynx) you currently have to manually edit UCdomap.c, in +two places: + +a) Near the top, you will find a bunch of lines (some may be commented out) + + #include "chrtrans/<fn>.h" + +Add or comment out as you wish. (But it's probably safest to leave the +first one, referring to "chrtrans/iso01_uni.h", in place...) + +b) At the bottom, you will find a bunch of lines (again, some may be + commented out by default) of the form + + UC_CHARSET_SETUP_<something>; + +which should correspond to the #include lines from a). Again, +add or substract as you wish (but preferably consistent with what you +did under a)...) [The <something> is derived from the charset's MIME name. +if in doubt, check the last lines of the corresponding ...uni.h file.] + +c) To let make automatically notice when you have changed one of the + table files, and automatically regenerate the *uni.h file(s), +you also have to add any new tables to both src/Makefile *and* +src/chrtrans/Makefile. (That may be inconvenient, but I didn't want to +depend on features than not all makes may have.) Note that for recompiling +Lynx, a `make clean' should not be necessary if you have *only* made +changes to the files in src/chrtrans. + diff --git a/src/chrtrans/UCkd.h b/src/chrtrans/UCkd.h new file mode 100644 index 00000000..2cc2ebdb --- /dev/null +++ b/src/chrtrans/UCkd.h @@ -0,0 +1,59 @@ +#ifndef _UC_KD_H +#define _UC_KD_H +#include <sys/types.h> + +/* NOTE: THE FOLLOWING #define MAY NEED ADJUSTMENT. + u16 should be an unsigned type of 16 bit length (two octets). + u8 should be an unsigned type of 8 bit length (one octet). + */ +#ifndef u16 +#define u16 unsigned short +#endif + + +#ifndef u8 +#define u8 unsigned char +#endif + +#ifdef NOTDEFINED +struct consolefontdesc { + u_short charcount; /* characters in font (256 or 512) */ + u_short charheight; /* scan lines per character (1-32) */ + char *chardata; /* font data in expanded form */ +}; +#endif +typedef char scrnmap_t; +#define E_TABSZ 256 + +struct unipair { + u16 unicode; + u16 fontpos; +}; +struct unipair_str { + u16 unicode; + char * replace_str; +}; +struct unimapdesc { + u16 entry_ct; + struct unipair *entries; +}; +struct unimapdesc_str { + u16 entry_ct; + struct unipair_str *entries; +}; + + +#define UNI_DIRECT_BASE 0xF000 /* start of Direct Font Region */ +#define UNI_DIRECT_MASK 0x01FF /* Direct Font Region bitmask */ + +#define UC_MAXLEN_ID_APPEND 20 +#define UC_MAXLEN_MIMECSNAME 40 +#define UC_MAXLEN_LYNXCSNAME 40 +#define UC_LEN_LYNXCSNAME 20 + +#define EX_OK 0 /* successful termination */ +#define EX_USAGE 64 /* command line usage error */ +#define EX_DATAERR 65 /* data format error */ +#define EX_NOINPUT 66 /* cannot open input */ + +#endif /* _UC_KD_H */ diff --git a/src/chrtrans/cp1250_uni.tbl b/src/chrtrans/cp1250_uni.tbl new file mode 100644 index 00000000..75416b67 --- /dev/null +++ b/src/chrtrans/cp1250_uni.tbl @@ -0,0 +1,281 @@ +#The MIME name of this charset. +Mwindows-1250 + +#Name as a Display Charset (used on Options screen) +O MS Windows CP 1250 + +# +# Name: cp1250_WinLatin2 to Unicode table +# Unicode version: 2.0 +# Table version: 2.00 +# Table format: Format A +# Date: 04/24/96 +# Authors: Lori Brownell <loribr@microsoft.com> +# K.D. Chang <a-kchang@microsoft.com> +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp1250_WinLatin2 code (in hex) +# Column #2 is the Unicode (in hex as 0xXXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp1250_WinLatin2 order +# +#0x00 U+0000 #NULL +#0x01 U+0001 #START OF HEADING +#0x02 U+0002 #START OF TEXT +#0x03 U+0003 #END OF TEXT +#0x04 U+0004 #END OF TRANSMISSION +#0x05 U+0005 #ENQUIRY +#0x06 U+0006 #ACKNOWLEDGE +#0x07 U+0007 #BELL +#0x08 U+0008 #BACKSPACE +#0x09 U+0009 #HORIZONTAL TABULATION +#0x0A U+000A #LINE FEED +#0x0B U+000B #VERTICAL TABULATION +#0x0C U+000C #FORM FEED +#0x0D U+000D #CARRIAGE RETURN +#0x0E U+000E #SHIFT OUT +#0x0F U+000F #SHIFT IN +#0x10 U+0010 #DATA LINK ESCAPE +#0x11 U+0011 #DEVICE CONTROL ONE +#0x12 U+0012 #DEVICE CONTROL TWO +#0x13 U+0013 #DEVICE CONTROL THREE +#0x14 U+0014 #DEVICE CONTROL FOUR +#0x15 U+0015 #NEGATIVE ACKNOWLEDGE +#0x16 U+0016 #SYNCHRONOUS IDLE +#0x17 U+0017 #END OF TRANSMISSION BLOCK +#0x18 U+0018 #CANCEL +#0x19 U+0019 #END OF MEDIUM +#0x1A U+001A #SUBSTITUTE +#0x1B U+001B #ESCAPE +#0x1C U+001C #FILE SEPARATOR +#0x1D U+001D #GROUP SEPARATOR +#0x1E U+001E #RECORD SEPARATOR +#0x1F U+001F #UNIT SEPARATOR +0x20 U+0020 #SPACE +0x21 U+0021 #EXCLAMATION MARK +0x22 U+0022 #QUOTATION MARK +0x23 U+0023 #NUMBER SIGN +0x24 U+0024 #DOLLAR SIGN +0x25 U+0025 #PERCENT SIGN +0x26 U+0026 #AMPERSAND +0x27 U+0027 #APOSTROPHE +0x28 U+0028 #LEFT PARENTHESIS +0x29 U+0029 #RIGHT PARENTHESIS +0x2A U+002A #ASTERISK +0x2B U+002B #PLUS SIGN +0x2C U+002C #COMMA +0x2D U+002D #HYPHEN-MINUS +0x2E U+002E #FULL STOP +0x2F U+002F #SOLIDUS +0x30 U+0030 #DIGIT ZERO +0x31 U+0031 #DIGIT ONE +0x32 U+0032 #DIGIT TWO +0x33 U+0033 #DIGIT THREE +0x34 U+0034 #DIGIT FOUR +0x35 U+0035 #DIGIT FIVE +0x36 U+0036 #DIGIT SIX +0x37 U+0037 #DIGIT SEVEN +0x38 U+0038 #DIGIT EIGHT +0x39 U+0039 #DIGIT NINE +0x3A U+003A #COLON +0x3B U+003B #SEMICOLON +0x3C U+003C #LESS-THAN SIGN +0x3D U+003D #EQUALS SIGN +0x3E U+003E #GREATER-THAN SIGN +0x3F U+003F #QUESTION MARK +0x40 U+0040 #COMMERCIAL AT +0x41 U+0041 #LATIN CAPITAL LETTER A +0x42 U+0042 #LATIN CAPITAL LETTER B +0x43 U+0043 #LATIN CAPITAL LETTER C +0x44 U+0044 #LATIN CAPITAL LETTER D +0x45 U+0045 #LATIN CAPITAL LETTER E +0x46 U+0046 #LATIN CAPITAL LETTER F +0x47 U+0047 #LATIN CAPITAL LETTER G +0x48 U+0048 #LATIN CAPITAL LETTER H +0x49 U+0049 #LATIN CAPITAL LETTER I +0x4A U+004A #LATIN CAPITAL LETTER J +0x4B U+004B #LATIN CAPITAL LETTER K +0x4C U+004C #LATIN CAPITAL LETTER L +0x4D U+004D #LATIN CAPITAL LETTER M +0x4E U+004E #LATIN CAPITAL LETTER N +0x4F U+004F #LATIN CAPITAL LETTER O +0x50 U+0050 #LATIN CAPITAL LETTER P +0x51 U+0051 #LATIN CAPITAL LETTER Q +0x52 U+0052 #LATIN CAPITAL LETTER R +0x53 U+0053 #LATIN CAPITAL LETTER S +0x54 U+0054 #LATIN CAPITAL LETTER T +0x55 U+0055 #LATIN CAPITAL LETTER U +0x56 U+0056 #LATIN CAPITAL LETTER V +0x57 U+0057 #LATIN CAPITAL LETTER W +0x58 U+0058 #LATIN CAPITAL LETTER X +0x59 U+0059 #LATIN CAPITAL LETTER Y +0x5A U+005A #LATIN CAPITAL LETTER Z +0x5B U+005B #LEFT SQUARE BRACKET +0x5C U+005C #REVERSE SOLIDUS +0x5D U+005D #RIGHT SQUARE BRACKET +0x5E U+005E #CIRCUMFLEX ACCENT +0x5F U+005F #LOW LINE +0x60 U+0060 #GRAVE ACCENT +0x61 U+0061 #LATIN SMALL LETTER A +0x62 U+0062 #LATIN SMALL LETTER B +0x63 U+0063 #LATIN SMALL LETTER C +0x64 U+0064 #LATIN SMALL LETTER D +0x65 U+0065 #LATIN SMALL LETTER E +0x66 U+0066 #LATIN SMALL LETTER F +0x67 U+0067 #LATIN SMALL LETTER G +0x68 U+0068 #LATIN SMALL LETTER H +0x69 U+0069 #LATIN SMALL LETTER I +0x6A U+006A #LATIN SMALL LETTER J +0x6B U+006B #LATIN SMALL LETTER K +0x6C U+006C #LATIN SMALL LETTER L +0x6D U+006D #LATIN SMALL LETTER M +0x6E U+006E #LATIN SMALL LETTER N +0x6F U+006F #LATIN SMALL LETTER O +0x70 U+0070 #LATIN SMALL LETTER P +0x71 U+0071 #LATIN SMALL LETTER Q +0x72 U+0072 #LATIN SMALL LETTER R +0x73 U+0073 #LATIN SMALL LETTER S +0x74 U+0074 #LATIN SMALL LETTER T +0x75 U+0075 #LATIN SMALL LETTER U +0x76 U+0076 #LATIN SMALL LETTER V +0x77 U+0077 #LATIN SMALL LETTER W +0x78 U+0078 #LATIN SMALL LETTER X +0x79 U+0079 #LATIN SMALL LETTER Y +0x7A U+007A #LATIN SMALL LETTER Z +0x7B U+007B #LEFT CURLY BRACKET +0x7C U+007C #VERTICAL LINE +0x7D U+007D #RIGHT CURLY BRACKET +0x7E U+007E #TILDE +#0x7F U+007F #DELETE +#0x80 #UNDEFINED +#0x81 #UNDEFINED +0x82 U+201A #SINGLE LOW-9 QUOTATION MARK +#0x83 #UNDEFINED +0x84 U+201E #DOUBLE LOW-9 QUOTATION MARK +0x85 U+2026 #HORIZONTAL ELLIPSIS +0x86 U+2020 #DAGGER +0x87 U+2021 #DOUBLE DAGGER +#0x88 #UNDEFINED +0x89 U+2030 #PER MILLE SIGN +0x8A U+0160 #LATIN CAPITAL LETTER S WITH CARON +0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK +0x8C U+015A #LATIN CAPITAL LETTER S WITH ACUTE +0x8D U+0164 #LATIN CAPITAL LETTER T WITH CARON +0x8E U+017D #LATIN CAPITAL LETTER Z WITH CARON +0x8F U+0179 #LATIN CAPITAL LETTER Z WITH ACUTE +#0x90 #UNDEFINED +0x91 U+2018 #LEFT SINGLE QUOTATION MARK +0x92 U+2019 #RIGHT SINGLE QUOTATION MARK +0x93 U+201C #LEFT DOUBLE QUOTATION MARK +0x94 U+201D #RIGHT DOUBLE QUOTATION MARK +0x95 U+2022 #BULLET +0x96 U+2013 #EN DASH +0x97 U+2014 #EM DASH +#0x98 #UNDEFINED +0x99 U+2122 #TRADE MARK SIGN +0x9A U+0161 #LATIN SMALL LETTER S WITH CARON +0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +0x9C U+015B #LATIN SMALL LETTER S WITH ACUTE +0x9D U+0165 #LATIN SMALL LETTER T WITH CARON +0x9E U+017E #LATIN SMALL LETTER Z WITH CARON +0x9F U+017A #LATIN SMALL LETTER Z WITH ACUTE +0xA0 U+00A0 #NO-BREAK SPACE +0xA1 U+02C7 #CARON +0xA2 U+02D8 #BREVE +0xA3 U+0141 #LATIN CAPITAL LETTER L WITH STROKE +0xA4 U+00A4 #CURRENCY SIGN +0xA5 U+0104 #LATIN CAPITAL LETTER A WITH OGONEK +0xA6 U+00A6 #BROKEN BAR +0xA7 U+00A7 #SECTION SIGN +0xA8 U+00A8 #DIAERESIS +0xA9 U+00A9 #COPYRIGHT SIGN +0xAA U+015E #LATIN CAPITAL LETTER S WITH CEDILLA +0xAB U+00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +#0xAC #UNDEFINED +0xAD U+00AD #SOFT HYPHEN +0xAE U+00AE #REGISTERED SIGN +0xAF U+017B #LATIN CAPITAL LETTER Z WITH DOT ABOVE +0xB0 U+00B0 #DEGREE SIGN +0xB1 U+00B1 #PLUS-MINUS SIGN +0xB2 U+02DB #OGONEK +0xB3 U+0142 #LATIN SMALL LETTER L WITH STROKE +0xB4 U+00B4 #ACUTE ACCENT +0xB5 U+00B5 #MICRO SIGN +0xB6 U+00B6 #PILCROW SIGN +0xB7 U+00B7 #MIDDLE DOT +0xB8 U+00B8 #CEDILLA +0xB9 U+0105 #LATIN SMALL LETTER A WITH OGONEK +0xBA U+015F #LATIN SMALL LETTER S WITH CEDILLA +0xBB U+00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xBC U+013D #LATIN CAPITAL LETTER L WITH CARON +0xBD U+02DD #DOUBLE ACUTE ACCENT +0xBE U+013E #LATIN SMALL LETTER L WITH CARON +0xBF U+017C #LATIN SMALL LETTER Z WITH DOT ABOVE +0xC0 U+0154 #LATIN CAPITAL LETTER R WITH ACUTE +0xC1 U+00C1 #LATIN CAPITAL LETTER A WITH ACUTE +0xC2 U+00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX +0xC3 U+0102 #LATIN CAPITAL LETTER A WITH BREVE +0xC4 U+00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS +0xC5 U+0139 #LATIN CAPITAL LETTER L WITH ACUTE +0xC6 U+0106 #LATIN CAPITAL LETTER C WITH ACUTE +0xC7 U+00C7 #LATIN CAPITAL LETTER C WITH CEDILLA +0xC8 U+010C #LATIN CAPITAL LETTER C WITH CARON +0xC9 U+00C9 #LATIN CAPITAL LETTER E WITH ACUTE +0xCA U+0118 #LATIN CAPITAL LETTER E WITH OGONEK +0xCB U+00CB #LATIN CAPITAL LETTER E WITH DIAERESIS +0xCC U+011A #LATIN CAPITAL LETTER E WITH CARON +0xCD U+00CD #LATIN CAPITAL LETTER I WITH ACUTE +0xCE U+00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX +0xCF U+010E #LATIN CAPITAL LETTER D WITH CARON +0xD0 U+0110 #LATIN CAPITAL LETTER D WITH STROKE +0xD1 U+0143 #LATIN CAPITAL LETTER N WITH ACUTE +0xD2 U+0147 #LATIN CAPITAL LETTER N WITH CARON +0xD3 U+00D3 #LATIN CAPITAL LETTER O WITH ACUTE +0xD4 U+00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0xD5 U+0150 #LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +0xD6 U+00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS +0xD7 U+00D7 #MULTIPLICATION SIGN +0xD8 U+0158 #LATIN CAPITAL LETTER R WITH CARON +0xD9 U+016E #LATIN CAPITAL LETTER U WITH RING ABOVE +0xDA U+00DA #LATIN CAPITAL LETTER U WITH ACUTE +0xDB U+0170 #LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +0xDC U+00DC #LATIN CAPITAL LETTER U WITH DIAERESIS +0xDD U+00DD #LATIN CAPITAL LETTER Y WITH ACUTE +0xDE U+0162 #LATIN CAPITAL LETTER T WITH CEDILLA +0xDF U+00DF #LATIN SMALL LETTER SHARP S +0xE0 U+0155 #LATIN SMALL LETTER R WITH ACUTE +0xE1 U+00E1 #LATIN SMALL LETTER A WITH ACUTE +0xE2 U+00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0xE3 U+0103 #LATIN SMALL LETTER A WITH BREVE +0xE4 U+00E4 #LATIN SMALL LETTER A WITH DIAERESIS +0xE5 U+013A #LATIN SMALL LETTER L WITH ACUTE +0xE6 U+0107 #LATIN SMALL LETTER C WITH ACUTE +0xE7 U+00E7 #LATIN SMALL LETTER C WITH CEDILLA +0xE8 U+010D #LATIN SMALL LETTER C WITH CARON +0xE9 U+00E9 #LATIN SMALL LETTER E WITH ACUTE +0xEA U+0119 #LATIN SMALL LETTER E WITH OGONEK +0xEB U+00EB #LATIN SMALL LETTER E WITH DIAERESIS +0xEC U+011B #LATIN SMALL LETTER E WITH CARON +0xED U+00ED #LATIN SMALL LETTER I WITH ACUTE +0xEE U+00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX +0xEF U+010F #LATIN SMALL LETTER D WITH CARON +0xF0 U+0111 #LATIN SMALL LETTER D WITH STROKE +0xF1 U+0144 #LATIN SMALL LETTER N WITH ACUTE +0xF2 U+0148 #LATIN SMALL LETTER N WITH CARON +0xF3 U+00F3 #LATIN SMALL LETTER O WITH ACUTE +0xF4 U+00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0xF5 U+0151 #LATIN SMALL LETTER O WITH DOUBLE ACUTE +0xF6 U+00F6 #LATIN SMALL LETTER O WITH DIAERESIS +0xF7 U+00F7 #DIVISION SIGN +0xF8 U+0159 #LATIN SMALL LETTER R WITH CARON +0xF9 U+016F #LATIN SMALL LETTER U WITH RING ABOVE +0xFA U+00FA #LATIN SMALL LETTER U WITH ACUTE +0xFB U+0171 #LATIN SMALL LETTER U WITH DOUBLE ACUTE +0xFC U+00FC #LATIN SMALL LETTER U WITH DIAERESIS +0xFD U+00FD #LATIN SMALL LETTER Y WITH ACUTE +0xFE U+0163 #LATIN SMALL LETTER T WITH CEDILLA +0xFF U+02D9 #DOT ABOVE + + diff --git a/src/chrtrans/cp1252_uni.tbl b/src/chrtrans/cp1252_uni.tbl new file mode 100644 index 00000000..e9660295 --- /dev/null +++ b/src/chrtrans/cp1252_uni.tbl @@ -0,0 +1,287 @@ +#Shall this become the "default" translation? +#Meaning of that is currently unclear... It's different +#from the default input or defualt output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Miso-8859-1-windows-3.1-latin-1 + +#Name as a Display Charset (used on Options screen) +O MS Windows CP 1252 + +# +# Name: cp1252_WinLatin1 to Unicode table +# Unicode version: 1.1 +# Table version: 1.1 +# Table format: Format A +# Date: 03/31/95 +# Authors: Michel Suignard <michelsu@microsoft.com> +# Lori Hoerth <lorih@microsoft.com> +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp1252_WinLatin1 code (in hex) +# Column #2 is the Unicode (in hex as U+XXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp1252_WinLatin1 order +# +0x00 U+0000 #Null +0x01 U+0001 #START OF HEADING +0x02 U+0002 #START OF TEXT +0x03 U+0003 #END OF TEXT +0x04 U+0004 #END OF TRANSMISSION +0x05 U+0005 #ENQUIRY +0x06 U+0006 #ACKNOWLEDGE +0x07 U+0007 #BELL +0x08 U+0008 #BACKSPACE +0x09 U+0009 #HORIZONTAL TABULATION +0x0a U+000a #LINE FEED +0x0b U+000b #VERTICAL TABULATION +0x0c U+000c #FORM FEED +0x0d U+000d #CARRIAGE RETURN +0x0e U+000e #SHIFT OUT +0x0f U+000f #SHIFT IN +0x10 U+0010 #DATA LINK ESCAPE +0x11 U+0011 #DEVICE CONTROL ONE +0x12 U+0012 #DEVICE CONTROL TWO +0x13 U+0013 #DEVICE CONTROL THREE +0x14 U+0014 #DEVICE CONTROL FOUR +0x15 U+0015 #NEGATIVE ACKNOWLEDGE +0x16 U+0016 #SYNCHRONOUS IDLE +0x17 U+0017 #END OF TRANSMISSION BLOCK +0x18 U+0018 #CANCEL +0x19 U+0019 #END OF MEDIUM +0x1a U+001a #SUBSTITUTE +0x1b U+001b #ESCAPE +0x1c U+001c #FILE SEPARATOR +0x1d U+001d #GROUP SEPARATOR +0x1e U+001e #RECORD SEPARATOR +0x1f U+001f #UNIT SEPARATOR +0x20 U+0020 #SPACE +0x21 U+0021 #EXCLAMATION MARK +0x22 U+0022 #QUOTATION MARK +0x23 U+0023 #NUMBER SIGN +0x24 U+0024 #DOLLAR SIGN +0x25 U+0025 #PERCENT SIGN +0x26 U+0026 #AMPERSAND +0x27 U+0027 #APOSTROPHE +0x28 U+0028 #LEFT PARENTHESIS +0x29 U+0029 #RIGHT PARENTHESIS +0x2a U+002a #ASTERISK +0x2b U+002b #PLUS SIGN +0x2c U+002c #COMMA +0x2d U+002d #HYPHEN-MINUS +0x2e U+002e #FULL STOP +0x2f U+002f #SOLIDUS +0x30 U+0030 #DIGIT ZERO +0x31 U+0031 #DIGIT ONE +0x32 U+0032 #DIGIT TWO +0x33 U+0033 #DIGIT THREE +0x34 U+0034 #DIGIT FOUR +0x35 U+0035 #DIGIT FIVE +0x36 U+0036 #DIGIT SIX +0x37 U+0037 #DIGIT SEVEN +0x38 U+0038 #DIGIT EIGHT +0x39 U+0039 #DIGIT NINE +0x3a U+003a #COLON +0x3b U+003b #SEMICOLON +0x3c U+003c #LESS-THAN SIGN +0x3d U+003d #EQUALS SIGN +0x3e U+003e #GREATER-THAN SIGN +0x3f U+003f #QUESTION MARK +0x40 U+0040 #COMMERCIAL AT +0x41 U+0041 #LATIN CAPITAL LETTER A +0x42 U+0042 #LATIN CAPITAL LETTER B +0x43 U+0043 #LATIN CAPITAL LETTER C +0x44 U+0044 #LATIN CAPITAL LETTER D +0x45 U+0045 #LATIN CAPITAL LETTER E +0x46 U+0046 #LATIN CAPITAL LETTER F +0x47 U+0047 #LATIN CAPITAL LETTER G +0x48 U+0048 #LATIN CAPITAL LETTER H +0x49 U+0049 #LATIN CAPITAL LETTER I +0x4a U+004a #LATIN CAPITAL LETTER J +0x4b U+004b #LATIN CAPITAL LETTER K +0x4c U+004c #LATIN CAPITAL LETTER L +0x4d U+004d #LATIN CAPITAL LETTER M +0x4e U+004e #LATIN CAPITAL LETTER N +0x4f U+004f #LATIN CAPITAL LETTER O +0x50 U+0050 #LATIN CAPITAL LETTER P +0x51 U+0051 #LATIN CAPITAL LETTER Q +0x52 U+0052 #LATIN CAPITAL LETTER R +0x53 U+0053 #LATIN CAPITAL LETTER S +0x54 U+0054 #LATIN CAPITAL LETTER T +0x55 U+0055 #LATIN CAPITAL LETTER U +0x56 U+0056 #LATIN CAPITAL LETTER V +0x57 U+0057 #LATIN CAPITAL LETTER W +0x58 U+0058 #LATIN CAPITAL LETTER X +0x59 U+0059 #LATIN CAPITAL LETTER Y +0x5a U+005a #LATIN CAPITAL LETTER Z +0x5b U+005b #LEFT SQUARE BRACKET +0x5c U+005c #REVERSE SOLIDUS +0x5d U+005d #RIGHT SQUARE BRACKET +0x5e U+005e #CIRCUMFLEX ACCENT +0x5f U+005f #LOW LINE +0x60 U+0060 #GRAVE ACCENT +0x61 U+0061 #LATIN SMALL LETTER A +0x62 U+0062 #LATIN SMALL LETTER B +0x63 U+0063 #LATIN SMALL LETTER C +0x64 U+0064 #LATIN SMALL LETTER D +0x65 U+0065 #LATIN SMALL LETTER E +0x66 U+0066 #LATIN SMALL LETTER F +0x67 U+0067 #LATIN SMALL LETTER G +0x68 U+0068 #LATIN SMALL LETTER H +0x69 U+0069 #LATIN SMALL LETTER I +0x6a U+006a #LATIN SMALL LETTER J +0x6b U+006b #LATIN SMALL LETTER K +0x6c U+006c #LATIN SMALL LETTER L +0x6d U+006d #LATIN SMALL LETTER M +0x6e U+006e #LATIN SMALL LETTER N +0x6f U+006f #LATIN SMALL LETTER O +0x70 U+0070 #LATIN SMALL LETTER P +0x71 U+0071 #LATIN SMALL LETTER Q +0x72 U+0072 #LATIN SMALL LETTER R +0x73 U+0073 #LATIN SMALL LETTER S +0x74 U+0074 #LATIN SMALL LETTER T +0x75 U+0075 #LATIN SMALL LETTER U +0x76 U+0076 #LATIN SMALL LETTER V +0x77 U+0077 #LATIN SMALL LETTER W +0x78 U+0078 #LATIN SMALL LETTER X +0x79 U+0079 #LATIN SMALL LETTER Y +0x7a U+007a #LATIN SMALL LETTER Z +0x7b U+007b #LEFT CURLY BRACKET +0x7c U+007c #VERTICAL LINE +0x7d U+007d #RIGHT CURLY BRACKET +0x7e U+007e #TILDE +0x7f U+007f #DELETE +# 0x80 U+0080 #NOT USED +# 0x81 U+0081 #NOT USED +0x82 U+201a #SINGLE LOW-9 QUOTATION MARK +0x83 U+0192 #LATIN SMALL LETTER F WITH HOOK +0x84 U+201e #DOUBLE LOW-9 QUOTATION MARK +0x85 U+2026 #HORIZONTAL ELLIPSIS +0x86 U+2020 #DAGGER +0x87 U+2021 #DOUBLE DAGGER +0x88 U+02c6 #MODIFIER LETTER CIRCUMFLEX ACCENT +0x89 U+2030 #PER MILLE SIGN +0x8a U+0160 #LATIN CAPITAL LETTER S WITH CARON +0x8b U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK +0x8c U+0152 #LATIN CAPITAL LIGATURE OE +0x8d U+008d #NOT USED +0x8e U+008e #NOT USED +0x8f U+008f #NOT USED +0x90 U+0090 #NOT USED +0x91 U+2018 #LEFT SINGLE QUOTATION MARK +0x92 U+2019 #RIGHT SINGLE QUOTATION MARK +0x93 U+201c #LEFT DOUBLE QUOTATION MARK +0x94 U+201d #RIGHT DOUBLE QUOTATION MARK +0x95 U+2022 #BULLET +0x96 U+2013 #EN DASH +0x97 U+2014 #EM DASH +0x98 U+02dc #SMALL TILDE +0x99 U+2122 #TRADE MARK SIGN +0x9a U+0161 #LATIN SMALL LETTER S WITH CARON +0x9b U+203a #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +0x9c U+0153 #LATIN SMALL LIGATURE OE +0x9d U+009d #NOT USED +0x9e U+009e #NOT USED +0x9f U+0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS +0xa0 U+00a0 #NO-BREAK SPACE +0xa1 U+00a1 #INVERTED EXCLAMATION MARK +0xa2 U+00a2 #CENT SIGN +0xa3 U+00a3 #POUND SIGN +0xa4 U+00a4 #CURRENCY SIGN +0xa5 U+00a5 #YEN SIGN +0xa6 U+00a6 #BROKEN BAR +0xa7 U+00a7 #SECTION SIGN +0xa8 U+00a8 #DIAERESIS +0xa9 U+00a9 #COPYRIGHT SIGN +0xaa U+00aa #FEMININE ORDINAL INDICATOR +0xab U+00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0xac U+00ac #NOT SIGN +0xad U+00ad #SOFT HYPHEN +0xae U+00ae #REGISTERED SIGN +0xaf U+00af #MACRON +0xb0 U+00b0 #DEGREE SIGN +0xb1 U+00b1 #PLUS-MINUS SIGN +0xb2 U+00b2 #SUPERSCRIPT TWO +0xb3 U+00b3 #SUPERSCRIPT THREE +0xb4 U+00b4 #ACUTE ACCENT +0xb5 U+00b5 #MICRO SIGN +0xb6 U+00b6 #PILCROW SIGN +0xb7 U+00b7 #MIDDLE DOT +0xb8 U+00b8 #CEDILLA +0xb9 U+00b9 #SUPERSCRIPT ONE +0xba U+00ba #MASCULINE ORDINAL INDICATOR +0xbb U+00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xbc U+00bc #VULGAR FRACTION ONE QUARTER +0xbd U+00bd #VULGAR FRACTION ONE HALF +0xbe U+00be #VULGAR FRACTION THREE QUARTERS +0xbf U+00bf #INVERTED QUESTION MARK +0xc0 U+00c0 #LATIN CAPITAL LETTER A WITH GRAVE +0xc1 U+00c1 #LATIN CAPITAL LETTER A WITH ACUTE +0xc2 U+00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX +0xc3 U+00c3 #LATIN CAPITAL LETTER A WITH TILDE +0xc4 U+00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS +0xc5 U+00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE +0xc6 U+00c6 #LATIN CAPITAL LIGATURE AE +0xc7 U+00c7 #LATIN CAPITAL LETTER C WITH CEDILLA +0xc8 U+00c8 #LATIN CAPITAL LETTER E WITH GRAVE +0xc9 U+00c9 #LATIN CAPITAL LETTER E WITH ACUTE +0xca U+00ca #LATIN CAPITAL LETTER E WITH CIRCUMFLEX +0xcb U+00cb #LATIN CAPITAL LETTER E WITH DIAERESIS +0xcc U+00cc #LATIN CAPITAL LETTER I WITH GRAVE +0xcd U+00cd #LATIN CAPITAL LETTER I WITH ACUTE +0xce U+00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX +0xcf U+00cf #LATIN CAPITAL LETTER I WITH DIAERESIS +0xd0 U+00d0 #LATIN CAPITAL LETTER ETH +0xd1 U+00d1 #LATIN CAPITAL LETTER N WITH TILDE +0xd2 U+00d2 #LATIN CAPITAL LETTER O WITH GRAVE +0xd3 U+00d3 #LATIN CAPITAL LETTER O WITH ACUTE +0xd4 U+00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0xd5 U+00d5 #LATIN CAPITAL LETTER O WITH TILDE +0xd6 U+00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS +0xd7 U+00d7 #MULTIPLICATION SIGN +0xd8 U+00d8 #LATIN CAPITAL LETTER O WITH STROKE +0xd9 U+00d9 #LATIN CAPITAL LETTER U WITH GRAVE +0xda U+00da #LATIN CAPITAL LETTER U WITH ACUTE +0xdb U+00db #LATIN CAPITAL LETTER U WITH CIRCUMFLEX +0xdc U+00dc #LATIN CAPITAL LETTER U WITH DIAERESIS +0xdd U+00dd #LATIN CAPITAL LETTER Y WITH ACUTE +0xde U+00de #LATIN CAPITAL LETTER THORN +0xdf U+00df #LATIN SMALL LETTER SHARP S +0xe0 U+00e0 #LATIN SMALL LETTER A WITH GRAVE +0xe1 U+00e1 #LATIN SMALL LETTER A WITH ACUTE +0xe2 U+00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0xe3 U+00e3 #LATIN SMALL LETTER A WITH TILDE +0xe4 U+00e4 #LATIN SMALL LETTER A WITH DIAERESIS +0xe5 U+00e5 #LATIN SMALL LETTER A WITH RING ABOVE +0xe6 U+00e6 #LATIN SMALL LIGATURE AE +0xe7 U+00e7 #LATIN SMALL LETTER C WITH CEDILLA +0xe8 U+00e8 #LATIN SMALL LETTER E WITH GRAVE +0xe9 U+00e9 #LATIN SMALL LETTER E WITH ACUTE +0xea U+00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX +0xeb U+00eb #LATIN SMALL LETTER E WITH DIAERESIS +0xec U+00ec #LATIN SMALL LETTER I WITH GRAVE +0xed U+00ed #LATIN SMALL LETTER I WITH ACUTE +0xee U+00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX +0xef U+00ef #LATIN SMALL LETTER I WITH DIAERESIS +0xf0 U+00f0 #LATIN SMALL LETTER ETH +0xf1 U+00f1 #LATIN SMALL LETTER N WITH TILDE +0xf2 U+00f2 #LATIN SMALL LETTER O WITH GRAVE +0xf3 U+00f3 #LATIN SMALL LETTER O WITH ACUTE +0xf4 U+00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0xf5 U+00f5 #LATIN SMALL LETTER O WITH TILDE +0xf6 U+00f6 #LATIN SMALL LETTER O WITH DIAERESIS +0xf7 U+00f7 #DIVISION SIGN +0xf8 U+00f8 #LATIN SMALL LETTER O WITH STROKE +0xf9 U+00f9 #LATIN SMALL LETTER U WITH GRAVE +0xfa U+00fa #LATIN SMALL LETTER U WITH ACUTE +0xfb U+00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX +0xfc U+00fc #LATIN SMALL LETTER U WITH DIAERESIS +0xfd U+00fd #LATIN SMALL LETTER Y WITH ACUTE +0xfe U+00fe #LATIN SMALL LETTER THORN +0xff U+00ff #LATIN SMALL LETTER Y WITH DIAERESIS + + diff --git a/src/chrtrans/cp437_uni.tbl b/src/chrtrans/cp437_uni.tbl new file mode 100644 index 00000000..ed97a69c --- /dev/null +++ b/src/chrtrans/cp437_uni.tbl @@ -0,0 +1,303 @@ +#Shall this become the "default" translation? +#Meaning of that is currently unclear... It's different +#from the default input or defualt output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Mcp437 + +#Name as a Display Charset (used on Options screen) +OIBM PC character set +# +# Name: cp437_DOSLatinUS to Unicode table +# Unicode version: 1.1 +# Table version: 1.1 +# Table format: Format A +# Date: 03/31/95 +# Authors: Michel Suignard <michelsu@microsoft.com> +# Lori Hoerth <lorih@microsoft.com> +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp1255_WinHebrew code (in hex) +# Column #2 is the Unicode (in hex as U+XXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp437_DOSLatinUS order +# +# some mapppings of greek letters to latin letters added, +# just for fun.. -kw +# +0x00 U+0000 #NULL +0x01 U+0001 #START OF HEADING +0x02 U+0002 #START OF TEXT +0x03 U+0003 #END OF TEXT +0x04 U+0004 #END OF TRANSMISSION +0x05 U+0005 #ENQUIRY +0x06 U+0006 #ACKNOWLEDGE +0x07 U+0007 #BELL +0x08 U+0008 #BACKSPACE +0x09 U+0009 #HORIZONTAL TABULATION +0x0a U+000a #LINE FEED +0x0b U+000b #VERTICAL TABULATION +0x0c U+000c #FORM FEED +0x0d U+000d #CARRIAGE RETURN +0x0e U+000e #SHIFT OUT +0x0f U+000f #SHIFT IN +0x10 U+0010 #DATA LINK ESCAPE +0x11 U+0011 #DEVICE CONTROL ONE +0x12 U+0012 #DEVICE CONTROL TWO +0x13 U+0013 #DEVICE CONTROL THREE +0x14 U+0014 U+03a0 #DEVICE CONTROL FOUR +0x15 U+0015 #NEGATIVE ACKNOWLEDGE +0x16 U+0016 #SYNCHRONOUS IDLE +0x17 U+0017 #END OF TRANSMISSION BLOCK +0x18 U+0018 #CANCEL +0x19 U+0019 #END OF MEDIUM +0x1a U+001a #SUBSTITUTE +0x1b U+001b #ESCAPE +0x1c U+001c #FILE SEPARATOR +0x1d U+001d #GROUP SEPARATOR +0x1e U+001e #RECORD SEPARATOR +0x1f U+001f #UNIT SEPARATOR +0x20 U+0020 #SPACE +0x21 U+0021 #EXCLAMATION MARK +0x22 U+0022 #QUOTATION MARK +0x23 U+0023 #NUMBER SIGN +0x24 U+0024 #DOLLAR SIGN +0x25 U+0025 #PERCENT SIGN +0x26 U+0026 #AMPERSAND +0x27 U+0027 #APOSTROPHE +0x28 U+0028 #LEFT PARENTHESIS +0x29 U+0029 #RIGHT PARENTHESIS +0x2a U+002a #ASTERISK +0x2b U+002b #PLUS SIGN +0x2c U+002c #COMMA +0x2d U+002d #HYPHEN-MINUS +0x2e U+002e #FULL STOP +0x2f U+002f #SOLIDUS +0x30 U+0030 #DIGIT ZERO +0x31 U+0031 #DIGIT ONE +0x32 U+0032 #DIGIT TWO +0x33 U+0033 #DIGIT THREE +0x34 U+0034 #DIGIT FOUR +0x35 U+0035 #DIGIT FIVE +0x36 U+0036 #DIGIT SIX +0x37 U+0037 #DIGIT SEVEN +0x38 U+0038 #DIGIT EIGHT +0x39 U+0039 #DIGIT NINE +0x3a U+003a #COLON +0x3b U+003b #SEMICOLON +0x3c U+003c #LESS-THAN SIGN +0x3d U+003d #EQUALS SIGN +0x3e U+003e #GREATER-THAN SIGN +0x3f U+003f #QUESTION MARK +0x40 U+0040 #COMMERCIAL AT +0x41 U+0041 U+0391 #LATIN CAPITAL LETTER A +0x42 U+0042 U+0392 #LATIN CAPITAL LETTER B +0x43 U+0043 #LATIN CAPITAL LETTER C +0x44 U+0044 #LATIN CAPITAL LETTER D +0x45 U+0045 U+0395 #LATIN CAPITAL LETTER E +0x46 U+0046 #LATIN CAPITAL LETTER F +0x47 U+0047 #LATIN CAPITAL LETTER G +0x48 U+0048 U+0397 #LATIN CAPITAL LETTER H +0x49 U+0049 U+0399 #LATIN CAPITAL LETTER I +0x4a U+004a #LATIN CAPITAL LETTER J +0x4b U+004b U+039a #LATIN CAPITAL LETTER K +0x4c U+004c #LATIN CAPITAL LETTER L +0x4d U+004d U+039c #LATIN CAPITAL LETTER M +0x4e U+004e U+039d #LATIN CAPITAL LETTER N +0x4f U+004f U+039f #LATIN CAPITAL LETTER O +0x50 U+0050 U+03a1 #LATIN CAPITAL LETTER P +0x51 U+0051 #LATIN CAPITAL LETTER Q +0x52 U+0052 #LATIN CAPITAL LETTER R +0x53 U+0053 #LATIN CAPITAL LETTER S +0x54 U+0054 U+03a4 #LATIN CAPITAL LETTER T +0x55 U+0055 #LATIN CAPITAL LETTER U +0x56 U+0056 #LATIN CAPITAL LETTER V +0x57 U+0057 #LATIN CAPITAL LETTER W +0x58 U+0058 U+03a7 #LATIN CAPITAL LETTER X +0x59 U+0059 U+03a5 #LATIN CAPITAL LETTER Y +0x5a U+005a U+0396 #LATIN CAPITAL LETTER Z +0x5b U+005b #LEFT SQUARE BRACKET +0x5c U+005c #REVERSE SOLIDUS +0x5d U+005d #RIGHT SQUARE BRACKET +0x5e U+005e #CIRCUMFLEX ACCENT +0x5f U+005f #LOW LINE +0x60 U+0060 #GRAVE ACCENT +0x61 U+0061 #LATIN SMALL LETTER A +0x62 U+0062 #LATIN SMALL LETTER B +0x63 U+0063 #LATIN SMALL LETTER C +0x64 U+0064 #LATIN SMALL LETTER D +0x65 U+0065 #LATIN SMALL LETTER E +0x66 U+0066 #LATIN SMALL LETTER F +0x67 U+0067 U+03b3 #LATIN SMALL LETTER G +0x68 U+0068 U+03b7 #LATIN SMALL LETTER H +0x69 U+0069 U+03b9 #LATIN SMALL LETTER I +0x6a U+006a #LATIN SMALL LETTER J +0x6b U+006b U+03ba #LATIN SMALL LETTER K +0x6c U+006c U+03bb #LATIN SMALL LETTER L +0x6d U+006d #LATIN SMALL LETTER M +0x6e U+006e #LATIN SMALL LETTER N +0x6f U+006f U+03bf #LATIN SMALL LETTER O +0x70 U+0070 U+03c1 #LATIN SMALL LETTER P +0x71 U+0071 #LATIN SMALL LETTER Q +0x72 U+0072 #LATIN SMALL LETTER R +0x73 U+0073 U+03c2 #LATIN SMALL LETTER S +0x74 U+0074 #LATIN SMALL LETTER T +0x75 U+0075 U+03c5 #LATIN SMALL LETTER U +0x76 U+0076 U+03bd #LATIN SMALL LETTER V +0x77 U+0077 U+03c9 #LATIN SMALL LETTER W +0x78 U+0078 U+03c7 #LATIN SMALL LETTER X +0x79 U+0079 #LATIN SMALL LETTER Y +0x7a U+007a U+03b6 #LATIN SMALL LETTER Z +0x7b U+007b #LEFT CURLY BRACKET +0x7c U+007c #VERTICAL LINE +0x7d U+007d #RIGHT CURLY BRACKET +0x7e U+007e #TILDE +0x7f U+007f #DELETE +0x80 U+00c7 #LATIN CAPITAL LETTER C WITH CEDILLA +0x81 U+00fc U+03cb #LATIN SMALL LETTER U WITH DIAERESIS +0x82 U+00e9 #LATIN SMALL LETTER E WITH ACUTE +0x83 U+00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0x84 U+00e4 #LATIN SMALL LETTER A WITH DIAERESIS +0x85 U+00e0 #LATIN SMALL LETTER A WITH GRAVE +0x86 U+00e5 #LATIN SMALL LETTER A WITH RING ABOVE +0x87 U+00e7 #LATIN SMALL LETTER C WITH CEDILLA +0x88 U+00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX +0x89 U+00eb #LATIN SMALL LETTER E WITH DIAERESIS +0x8a U+00e8 #LATIN SMALL LETTER E WITH GRAVE +0x8b U+00ef U+03ca #LATIN SMALL LETTER I WITH DIAERESIS +0x8c U+00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX +0x8d U+00ec #LATIN SMALL LETTER I WITH GRAVE +0x8e U+00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS +0x8f U+00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE +0x90 U+00c9 #LATIN CAPITAL LETTER E WITH ACUTE +0x91 U+00e6 #LATIN SMALL LIGATURE AE +0x92 U+00c6 #LATIN CAPITAL LIGATURE AE +0x93 U+00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0x94 U+00f6 #LATIN SMALL LETTER O WITH DIAERESIS +0x95 U+00f2 #LATIN SMALL LETTER O WITH GRAVE +0x96 U+00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX +0x97 U+00f9 #LATIN SMALL LETTER U WITH GRAVE +0x98 U+00ff #LATIN SMALL LETTER Y WITH DIAERESIS +0x99 U+00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS +0x9a U+00dc #LATIN CAPITAL LETTER U WITH DIAERESIS +0x9b U+00a2 #CENT SIGN +0x9c U+00a3 #POUND SIGN +0x9d U+00a5 #YEN SIGN +0x9e U+20a7 #PESETA SIGN +0x9f U+0192 #LATIN SMALL LETTER F WITH HOOK +0xa0 U+00e1 U+03ac #LATIN SMALL LETTER A WITH ACUTE +0xa1 U+00ed U+03af #LATIN SMALL LETTER I WITH ACUTE +0xa2 U+00f3 U+03cc #LATIN SMALL LETTER O WITH ACUTE +0xa3 U+00fa U+03cd #LATIN SMALL LETTER U WITH ACUTE +0xa4 U+00f1 #LATIN SMALL LETTER N WITH TILDE +0xa5 U+00d1 #LATIN CAPITAL LETTER N WITH TILDE +0xa6 U+00aa #FEMININE ORDINAL INDICATOR +0xa7 U+00ba #MASCULINE ORDINAL INDICATOR +0xa8 U+00bf #INVERTED QUESTION MARK +0xa9 U+2310 #REVERSED NOT SIGN +0xaa U+00ac #NOT SIGN +0xab U+00bd #VULGAR FRACTION ONE HALF +0xac U+00bc #VULGAR FRACTION ONE QUARTER +0xad U+00a1 #INVERTED EXCLAMATION MARK +0xae U+00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0xaf U+00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xb0 U+2591 #LIGHT SHADE +0xb1 U+2592 #MEDIUM SHADE +0xb2 U+2593 #DARK SHADE +0xb3 U+2502 #BOX DRAWINGS LIGHT VERTICAL +0xb4 U+2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT +0xb5 U+2561 #BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE +0xb6 U+2562 #BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE +0xb7 U+2556 #BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE +0xb8 U+2555 #BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE +0xb9 U+2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT +0xba U+2551 #BOX DRAWINGS DOUBLE VERTICAL +0xbb U+2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT +0xbc U+255d #BOX DRAWINGS DOUBLE UP AND LEFT +0xbd U+255c #BOX DRAWINGS UP DOUBLE AND LEFT SINGLE +0xbe U+255b #BOX DRAWINGS UP SINGLE AND LEFT DOUBLE +0xbf U+2510 #BOX DRAWINGS LIGHT DOWN AND LEFT +0xc0 U+2514 #BOX DRAWINGS LIGHT UP AND RIGHT +0xc1 U+2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL +0xc2 U+252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL +0xc3 U+251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT +0xc4 U+2500 #BOX DRAWINGS LIGHT HORIZONTAL +0xc5 U+253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL +0xc6 U+255e #BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE +0xc7 U+255f #BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE +0xc8 U+255a #BOX DRAWINGS DOUBLE UP AND RIGHT +0xc9 U+2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT +0xca U+2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL +0xcb U+2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL +0xcc U+2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT +0xcd U+2550 #BOX DRAWINGS DOUBLE HORIZONTAL +0xce U+256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL +0xcf U+2567 #BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE +0xd0 U+2568 #BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE +0xd1 U+2564 #BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE +0xd2 U+2565 #BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE +0xd3 U+2559 #BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE +0xd4 U+2558 #BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE +0xd5 U+2552 #BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE +0xd6 U+2553 #BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE +0xd7 U+256b #BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE +0xd8 U+256a #BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE +0xd9 U+2518 #BOX DRAWINGS LIGHT UP AND LEFT +0xda U+250c #BOX DRAWINGS LIGHT DOWN AND RIGHT +0xdb U+2588 #FULL BLOCK +0xdc U+2584 #LOWER HALF BLOCK +0xdd U+258c #LEFT HALF BLOCK +0xde U+2590 #RIGHT HALF BLOCK +0xdf U+2580 #UPPER HALF BLOCK +0xe0 U+03b1 #GREEK SMALL LETTER ALPHA +0xe1 U+00df U+03b2 #LATIN SMALL LETTER SHARP S +0xe2 U+0393 #GREEK CAPITAL LETTER GAMMA +0xe3 U+03c0 #GREEK SMALL LETTER PI +0xe4 U+03a3 #GREEK CAPITAL LETTER SIGMA +0xe5 U+03c3 #GREEK SMALL LETTER SIGMA +0xe6 U+00b5 U+03bc #MICRO SIGN +0xe7 U+03c4 #GREEK SMALL LETTER TAU +0xe8 U+03a6 #GREEK CAPITAL LETTER PHI +0xe9 U+0398 U+03b8 #GREEK CAPITAL LETTER THETA +0xea U+03a9 #GREEK CAPITAL LETTER OMEGA +0xeb U+03b4 #GREEK SMALL LETTER DELTA +0xec U+221e #INFINITY +0xed U+03c6 #GREEK SMALL LETTER PHI +0xee U+03b5 #GREEK SMALL LETTER EPSILON +0xef U+2229 #INTERSECTION +0xf0 U+2261 #IDENTICAL TO +0xf1 U+00b1 #PLUS-MINUS SIGN +0xf2 U+2265 #GREATER-THAN OR EQUAL TO +0xf3 U+2264 #LESS-THAN OR EQUAL TO +0xf4 U+2320 #TOP HALF INTEGRAL +0xf5 U+2321 #BOTTOM HALF INTEGRAL +0xf6 U+00f7 #DIVISION SIGN +0xf7 U+2248 #ALMOST EQUAL TO +0xf8 U+00b0 #DEGREE SIGN +0xf9 U+2219 #BULLET OPERATOR +0xfa U+00b7 #MIDDLE DOT +0xfb U+221a #SQUARE ROOT +0xfc U+207f #SUPERSCRIPT LATIN SMALL LETTER N +0xfd U+00b2 #SUPERSCRIPT TWO +0xfe U+25a0 #BLACK SQUARE +0xff U+00a0 #NO-BREAK SPACE + +U+03ac:a' +U+03ad:î' +U+03ae:h' +U+03af:i' +U+03cc:o' +U+03cd:u' +U+03ce:w' + + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks diff --git a/src/chrtrans/cp850_uni.tbl b/src/chrtrans/cp850_uni.tbl new file mode 100644 index 00000000..96de277b --- /dev/null +++ b/src/chrtrans/cp850_uni.tbl @@ -0,0 +1,292 @@ +#Shall this become the "default" translation? +#Meaning of that is currently unclear... It's different +#from the default input or defualt output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Mcp850 + +#Name as a Display Charset (used on Options screen) +OIBM PC codepage 850 +# +# Name: cp850_DOSLatin1 to Unicode table +# Unicode version: 1.1 +# Table version: 1.1 +# Table format: Format A +# Date: 03/31/95 +# Authors: Michel Suignard <michelsu@microsoft.com> +# Lori Hoerth <lorih@microsoft.com> +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp1255_WinHebrew code (in hex) +# Column #2 is the Unicode (in hex as U+XXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp850_DOSLatin1 order +# +0x00 U+0000 #NULL +0x01 U+0001 #START OF HEADING +0x02 U+0002 #START OF TEXT +0x03 U+0003 #END OF TEXT +0x04 U+0004 #END OF TRANSMISSION +0x05 U+0005 #ENQUIRY +0x06 U+0006 #ACKNOWLEDGE +0x07 U+0007 #BELL +0x08 U+0008 #BACKSPACE +0x09 U+0009 #HORIZONTAL TABULATION +0x0a U+000a #LINE FEED +0x0b U+000b #VERTICAL TABULATION +0x0c U+000c #FORM FEED +0x0d U+000d #CARRIAGE RETURN +0x0e U+000e #SHIFT OUT +0x0f U+000f #SHIFT IN +0x10 U+0010 #DATA LINK ESCAPE +0x11 U+0011 #DEVICE CONTROL ONE +0x12 U+0012 #DEVICE CONTROL TWO +0x13 U+0013 #DEVICE CONTROL THREE +0x14 U+0014 #DEVICE CONTROL FOUR +0x15 U+0015 #NEGATIVE ACKNOWLEDGE +0x16 U+0016 #SYNCHRONOUS IDLE +0x17 U+0017 #END OF TRANSMISSION BLOCK +0x18 U+0018 #CANCEL +0x19 U+0019 #END OF MEDIUM +0x1a U+001a #SUBSTITUTE +0x1b U+001b #ESCAPE +0x1c U+001c #FILE SEPARATOR +0x1d U+001d #GROUP SEPARATOR +0x1e U+001e #RECORD SEPARATOR +0x1f U+001f #UNIT SEPARATOR +0x20 U+0020 #SPACE +0x21 U+0021 #EXCLAMATION MARK +0x22 U+0022 #QUOTATION MARK +0x23 U+0023 #NUMBER SIGN +0x24 U+0024 #DOLLAR SIGN +0x25 U+0025 #PERCENT SIGN +0x26 U+0026 #AMPERSAND +0x27 U+0027 #APOSTROPHE +0x28 U+0028 #LEFT PARENTHESIS +0x29 U+0029 #RIGHT PARENTHESIS +0x2a U+002a #ASTERISK +0x2b U+002b #PLUS SIGN +0x2c U+002c #COMMA +0x2d U+002d #HYPHEN-MINUS +0x2e U+002e #FULL STOP +0x2f U+002f #SOLIDUS +0x30 U+0030 #DIGIT ZERO +0x31 U+0031 #DIGIT ONE +0x32 U+0032 #DIGIT TWO +0x33 U+0033 #DIGIT THREE +0x34 U+0034 #DIGIT FOUR +0x35 U+0035 #DIGIT FIVE +0x36 U+0036 #DIGIT SIX +0x37 U+0037 #DIGIT SEVEN +0x38 U+0038 #DIGIT EIGHT +0x39 U+0039 #DIGIT NINE +0x3a U+003a #COLON +0x3b U+003b #SEMICOLON +0x3c U+003c #LESS-THAN SIGN +0x3d U+003d #EQUALS SIGN +0x3e U+003e #GREATER-THAN SIGN +0x3f U+003f #QUESTION MARK +0x40 U+0040 #COMMERCIAL AT +0x41 U+0041 #LATIN CAPITAL LETTER A +0x42 U+0042 #LATIN CAPITAL LETTER B +0x43 U+0043 #LATIN CAPITAL LETTER C +0x44 U+0044 #LATIN CAPITAL LETTER D +0x45 U+0045 #LATIN CAPITAL LETTER E +0x46 U+0046 #LATIN CAPITAL LETTER F +0x47 U+0047 #LATIN CAPITAL LETTER G +0x48 U+0048 #LATIN CAPITAL LETTER H +0x49 U+0049 #LATIN CAPITAL LETTER I +0x4a U+004a #LATIN CAPITAL LETTER J +0x4b U+004b #LATIN CAPITAL LETTER K +0x4c U+004c #LATIN CAPITAL LETTER L +0x4d U+004d #LATIN CAPITAL LETTER M +0x4e U+004e #LATIN CAPITAL LETTER N +0x4f U+004f #LATIN CAPITAL LETTER O +0x50 U+0050 #LATIN CAPITAL LETTER P +0x51 U+0051 #LATIN CAPITAL LETTER Q +0x52 U+0052 #LATIN CAPITAL LETTER R +0x53 U+0053 #LATIN CAPITAL LETTER S +0x54 U+0054 #LATIN CAPITAL LETTER T +0x55 U+0055 #LATIN CAPITAL LETTER U +0x56 U+0056 #LATIN CAPITAL LETTER V +0x57 U+0057 #LATIN CAPITAL LETTER W +0x58 U+0058 #LATIN CAPITAL LETTER X +0x59 U+0059 #LATIN CAPITAL LETTER Y +0x5a U+005a #LATIN CAPITAL LETTER Z +0x5b U+005b #LEFT SQUARE BRACKET +0x5c U+005c #REVERSE SOLIDUS +0x5d U+005d #RIGHT SQUARE BRACKET +0x5e U+005e #CIRCUMFLEX ACCENT +0x5f U+005f #LOW LINE +0x60 U+0060 #GRAVE ACCENT +0x61 U+0061 #LATIN SMALL LETTER A +0x62 U+0062 #LATIN SMALL LETTER B +0x63 U+0063 #LATIN SMALL LETTER C +0x64 U+0064 #LATIN SMALL LETTER D +0x65 U+0065 #LATIN SMALL LETTER E +0x66 U+0066 #LATIN SMALL LETTER F +0x67 U+0067 #LATIN SMALL LETTER G +0x68 U+0068 #LATIN SMALL LETTER H +0x69 U+0069 #LATIN SMALL LETTER I +0x6a U+006a #LATIN SMALL LETTER J +0x6b U+006b #LATIN SMALL LETTER K +0x6c U+006c #LATIN SMALL LETTER L +0x6d U+006d #LATIN SMALL LETTER M +0x6e U+006e #LATIN SMALL LETTER N +0x6f U+006f #LATIN SMALL LETTER O +0x70 U+0070 #LATIN SMALL LETTER P +0x71 U+0071 #LATIN SMALL LETTER Q +0x72 U+0072 #LATIN SMALL LETTER R +0x73 U+0073 #LATIN SMALL LETTER S +0x74 U+0074 #LATIN SMALL LETTER T +0x75 U+0075 #LATIN SMALL LETTER U +0x76 U+0076 #LATIN SMALL LETTER V +0x77 U+0077 #LATIN SMALL LETTER W +0x78 U+0078 #LATIN SMALL LETTER X +0x79 U+0079 #LATIN SMALL LETTER Y +0x7a U+007a #LATIN SMALL LETTER Z +0x7b U+007b #LEFT CURLY BRACKET +0x7c U+007c #VERTICAL LINE +0x7d U+007d #RIGHT CURLY BRACKET +0x7e U+007e #TILDE +0x7f U+007f #DELETE +0x80 U+00c7 #LATIN CAPITAL LETTER C WITH CEDILLA +0x81 U+00fc #LATIN SMALL LETTER U WITH DIAERESIS +0x82 U+00e9 #LATIN SMALL LETTER E WITH ACUTE +0x83 U+00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0x84 U+00e4 #LATIN SMALL LETTER A WITH DIAERESIS +0x85 U+00e0 #LATIN SMALL LETTER A WITH GRAVE +0x86 U+00e5 #LATIN SMALL LETTER A WITH RING ABOVE +0x87 U+00e7 #LATIN SMALL LETTER C WITH CEDILLA +0x88 U+00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX +0x89 U+00eb #LATIN SMALL LETTER E WITH DIAERESIS +0x8a U+00e8 #LATIN SMALL LETTER E WITH GRAVE +0x8b U+00ef #LATIN SMALL LETTER I WITH DIAERESIS +0x8c U+00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX +0x8d U+00ec #LATIN SMALL LETTER I WITH GRAVE +0x8e U+00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS +0x8f U+00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE +0x90 U+00c9 #LATIN CAPITAL LETTER E WITH ACUTE +0x91 U+00e6 #LATIN SMALL LIGATURE AE +0x92 U+00c6 #LATIN CAPITAL LIGATURE AE +0x93 U+00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0x94 U+00f6 #LATIN SMALL LETTER O WITH DIAERESIS +0x95 U+00f2 #LATIN SMALL LETTER O WITH GRAVE +0x96 U+00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX +0x97 U+00f9 #LATIN SMALL LETTER U WITH GRAVE +0x98 U+00ff #LATIN SMALL LETTER Y WITH DIAERESIS +0x99 U+00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS +0x9a U+00dc #LATIN CAPITAL LETTER U WITH DIAERESIS +0x9b U+00f8 #LATIN SMALL LETTER O WITH STROKE +0x9c U+00a3 #POUND SIGN +0x9d U+00d8 #LATIN CAPITAL LETTER O WITH STROKE +0x9e U+00d7 #MULTIPLICATION SIGN +0x9f U+0192 #LATIN SMALL LETTER F WITH HOOK +0xa0 U+00e1 #LATIN SMALL LETTER A WITH ACUTE +0xa1 U+00ed #LATIN SMALL LETTER I WITH ACUTE +0xa2 U+00f3 #LATIN SMALL LETTER O WITH ACUTE +0xa3 U+00fa #LATIN SMALL LETTER U WITH ACUTE +0xa4 U+00f1 #LATIN SMALL LETTER N WITH TILDE +0xa5 U+00d1 #LATIN CAPITAL LETTER N WITH TILDE +0xa6 U+00aa #FEMININE ORDINAL INDICATOR +0xa7 U+00ba #MASCULINE ORDINAL INDICATOR +0xa8 U+00bf #INVERTED QUESTION MARK +0xa9 U+00ae #REGISTERED SIGN +0xaa U+00ac #NOT SIGN +0xab U+00bd #VULGAR FRACTION ONE HALF +0xac U+00bc #VULGAR FRACTION ONE QUARTER +0xad U+00a1 #INVERTED EXCLAMATION MARK +0xae U+00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0xaf U+00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xb0 U+2591 #LIGHT SHADE +0xb1 U+2592 #MEDIUM SHADE +0xb2 U+2593 #DARK SHADE +0xb3 U+2502 #BOX DRAWINGS LIGHT VERTICAL +0xb4 U+2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT +0xb5 U+00c1 #LATIN CAPITAL LETTER A WITH ACUTE +0xb6 U+00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX +0xb7 U+00c0 #LATIN CAPITAL LETTER A WITH GRAVE +0xb8 U+00a9 #COPYRIGHT SIGN +0xb9 U+2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT +0xba U+2551 #BOX DRAWINGS DOUBLE VERTICAL +0xbb U+2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT +0xbc U+255d #BOX DRAWINGS DOUBLE UP AND LEFT +0xbd U+00a2 #CENT SIGN +0xbe U+00a5 #YEN SIGN +0xbf U+2510 #BOX DRAWINGS LIGHT DOWN AND LEFT +0xc0 U+2514 #BOX DRAWINGS LIGHT UP AND RIGHT +0xc1 U+2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL +0xc2 U+252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL +0xc3 U+251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT +0xc4 U+2500 #BOX DRAWINGS LIGHT HORIZONTAL +0xc5 U+253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL +0xc6 U+00e3 #LATIN SMALL LETTER A WITH TILDE +0xc7 U+00c3 #LATIN CAPITAL LETTER A WITH TILDE +0xc8 U+255a #BOX DRAWINGS DOUBLE UP AND RIGHT +0xc9 U+2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT +0xca U+2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL +0xcb U+2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL +0xcc U+2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT +0xcd U+2550 #BOX DRAWINGS DOUBLE HORIZONTAL +0xce U+256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL +0xcf U+00a4 #CURRENCY SIGN +0xd0 U+00f0 #LATIN SMALL LETTER ETH +0xd1 U+00d0 #LATIN CAPITAL LETTER ETH +0xd2 U+00ca #LATIN CAPITAL LETTER E WITH CIRCUMFLEX +0xd3 U+00cb #LATIN CAPITAL LETTER E WITH DIAERESIS +0xd4 U+00c8 #LATIN CAPITAL LETTER E WITH GRAVE +0xd5 U+0131 #LATIN SMALL LETTER DOTLESS I +0xd6 U+00cd #LATIN CAPITAL LETTER I WITH ACUTE +0xd7 U+00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX +0xd8 U+00cf #LATIN CAPITAL LETTER I WITH DIAERESIS +0xd9 U+2518 #BOX DRAWINGS LIGHT UP AND LEFT +0xda U+250c #BOX DRAWINGS LIGHT DOWN AND RIGHT +0xdb U+2588 #FULL BLOCK +0xdc U+2584 #LOWER HALF BLOCK +0xdd U+00a6 #BROKEN BAR +0xde U+00cc #LATIN CAPITAL LETTER I WITH GRAVE +0xdf U+2580 #UPPER HALF BLOCK +0xe0 U+00d3 #LATIN CAPITAL LETTER O WITH ACUTE +0xe1 U+00df #LATIN SMALL LETTER SHARP S +0xe2 U+00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0xe3 U+00d2 #LATIN CAPITAL LETTER O WITH GRAVE +0xe4 U+00f5 #LATIN SMALL LETTER O WITH TILDE +0xe5 U+00d5 #LATIN CAPITAL LETTER O WITH TILDE +0xe6 U+00b5 #MICRO SIGN +0xe7 U+00fe #LATIN SMALL LETTER THORN +0xe8 U+00de #LATIN CAPITAL LETTER THORN +0xe9 U+00da #LATIN CAPITAL LETTER U WITH ACUTE +0xea U+00db #LATIN CAPITAL LETTER U WITH CIRCUMFLEX +0xeb U+00d9 #LATIN CAPITAL LETTER U WITH GRAVE +0xec U+00fd #LATIN SMALL LETTER Y WITH ACUTE +0xed U+00dd #LATIN CAPITAL LETTER Y WITH ACUTE +0xee U+00af #MACRON +0xef U+00b4 #ACUTE ACCENT +0xf0 U+00ad #SOFT HYPHEN +0xf1 U+00b1 #PLUS-MINUS SIGN +0xf2 U+2017 #DOUBLE LOW LINE +0xf3 U+00be #VULGAR FRACTION THREE QUARTERS +0xf4 U+00b6 #PILCROW SIGN +0xf5 U+00a7 #SECTION SIGN +0xf6 U+00f7 #DIVISION SIGN +0xf7 U+00b8 #CEDILLA +0xf8 U+00b0 #DEGREE SIGN +0xf9 U+00a8 #DIAERESIS +0xfa U+00b7 #MIDDLE DOT +0xfb U+00b9 #SUPERSCRIPT ONE +0xfc U+00b3 #SUPERSCRIPT THREE +0xfd U+00b2 #SUPERSCRIPT TWO +0xfe U+25a0 #BLACK SQUARE +0xff U+00a0 #NO-BREAK SPACE + + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks diff --git a/src/chrtrans/cp852_uni.tbl b/src/chrtrans/cp852_uni.tbl new file mode 100644 index 00000000..e84454a8 --- /dev/null +++ b/src/chrtrans/cp852_uni.tbl @@ -0,0 +1,287 @@ +#The MIME name of this charset. +Mcp852 + +#Name as a Display Charset (used on Options screen) +O PC Latin2 CP 852 + +# +# Name: cp852_DOSLatin2 to Unicode table +# Unicode version: 2.0 +# Table version: 2.00 +# Table format: Format A +# Date: 04/24/96 +# Authors: Lori Brownell <loribr@microsoft.com> +# K.D. Chang <a-kchang@microsoft.com> +# General notes: none +# +# Format: Three tab-separated columns +# Column #1 is the cp852_DOSLatin2 code (in hex) +# Column #2 is the Unicode (in hex as 0xXXXX) +# Column #3 is the Unicode name (follows a comment sign, '#') +# +# The entries are in cp852_DOSLatin2 order +# +#0x00 U+0000 #NULL +#0x01 U+0001 #START OF HEADING +#0x02 U+0002 #START OF TEXT +#0x03 U+0003 #END OF TEXT +#0x04 U+0004 #END OF TRANSMISSION +#0x05 U+0005 #ENQUIRY +#0x06 U+0006 #ACKNOWLEDGE +#0x07 U+0007 #BELL +#0x08 U+0008 #BACKSPACE +#0x09 U+0009 #HORIZONTAL TABULATION +#0x0a U+000a #LINE FEED +#0x0b U+000b #VERTICAL TABULATION +#0x0c U+000c #FORM FEED +#0x0d U+000d #CARRIAGE RETURN +#0x0e U+000e #SHIFT OUT +#0x0f U+000f #SHIFT IN +#0x10 U+0010 #DATA LINK ESCAPE +#0x11 U+0011 #DEVICE CONTROL ONE +#0x12 U+0012 #DEVICE CONTROL TWO +#0x13 U+0013 #DEVICE CONTROL THREE +#0x14 U+0014 #DEVICE CONTROL FOUR +#0x15 U+0015 #NEGATIVE ACKNOWLEDGE +#0x16 U+0016 #SYNCHRONOUS IDLE +#0x17 U+0017 #END OF TRANSMISSION BLOCK +#0x18 U+0018 #CANCEL +#0x19 U+0019 #END OF MEDIUM +#0x1a U+001a #SUBSTITUTE +#0x1b U+001b #ESCAPE +#0x1c U+001c #FILE SEPARATOR +#0x1d U+001d #GROUP SEPARATOR +#0x1e U+001e #RECORD SEPARATOR +#0x1f U+001f #UNIT SEPARATOR +0x20 U+0020 #SPACE +0x21 U+0021 #EXCLAMATION MARK +0x22 U+0022 #QUOTATION MARK +0x23 U+0023 #NUMBER SIGN +0x24 U+0024 #DOLLAR SIGN +0x25 U+0025 #PERCENT SIGN +0x26 U+0026 #AMPERSAND +0x27 U+0027 #APOSTROPHE +0x28 U+0028 #LEFT PARENTHESIS +0x29 U+0029 #RIGHT PARENTHESIS +0x2a U+002a #ASTERISK +0x2b U+002b #PLUS SIGN +0x2c U+002c #COMMA +0x2d U+002d #HYPHEN-MINUS +0x2e U+002e #FULL STOP +0x2f U+002f #SOLIDUS +0x30 U+0030 #DIGIT ZERO +0x31 U+0031 #DIGIT ONE +0x32 U+0032 #DIGIT TWO +0x33 U+0033 #DIGIT THREE +0x34 U+0034 #DIGIT FOUR +0x35 U+0035 #DIGIT FIVE +0x36 U+0036 #DIGIT SIX +0x37 U+0037 #DIGIT SEVEN +0x38 U+0038 #DIGIT EIGHT +0x39 U+0039 #DIGIT NINE +0x3a U+003a #COLON +0x3b U+003b #SEMICOLON +0x3c U+003c #LESS-THAN SIGN +0x3d U+003d #EQUALS SIGN +0x3e U+003e #GREATER-THAN SIGN +0x3f U+003f #QUESTION MARK +0x40 U+0040 #COMMERCIAL AT +0x41 U+0041 #LATIN CAPITAL LETTER A +0x42 U+0042 #LATIN CAPITAL LETTER B +0x43 U+0043 #LATIN CAPITAL LETTER C +0x44 U+0044 #LATIN CAPITAL LETTER D +0x45 U+0045 #LATIN CAPITAL LETTER E +0x46 U+0046 #LATIN CAPITAL LETTER F +0x47 U+0047 #LATIN CAPITAL LETTER G +0x48 U+0048 #LATIN CAPITAL LETTER H +0x49 U+0049 #LATIN CAPITAL LETTER I +0x4a U+004a #LATIN CAPITAL LETTER J +0x4b U+004b #LATIN CAPITAL LETTER K +0x4c U+004c #LATIN CAPITAL LETTER L +0x4d U+004d #LATIN CAPITAL LETTER M +0x4e U+004e #LATIN CAPITAL LETTER N +0x4f U+004f #LATIN CAPITAL LETTER O +0x50 U+0050 #LATIN CAPITAL LETTER P +0x51 U+0051 #LATIN CAPITAL LETTER Q +0x52 U+0052 #LATIN CAPITAL LETTER R +0x53 U+0053 #LATIN CAPITAL LETTER S +0x54 U+0054 #LATIN CAPITAL LETTER T +0x55 U+0055 #LATIN CAPITAL LETTER U +0x56 U+0056 #LATIN CAPITAL LETTER V +0x57 U+0057 #LATIN CAPITAL LETTER W +0x58 U+0058 #LATIN CAPITAL LETTER X +0x59 U+0059 #LATIN CAPITAL LETTER Y +0x5a U+005a #LATIN CAPITAL LETTER Z +0x5b U+005b #LEFT SQUARE BRACKET +0x5c U+005c #REVERSE SOLIDUS +0x5d U+005d #RIGHT SQUARE BRACKET +0x5e U+005e #CIRCUMFLEX ACCENT +0x5f U+005f #LOW LINE +0x60 U+0060 #GRAVE ACCENT +0x61 U+0061 #LATIN SMALL LETTER A +0x62 U+0062 #LATIN SMALL LETTER B +0x63 U+0063 #LATIN SMALL LETTER C +0x64 U+0064 #LATIN SMALL LETTER D +0x65 U+0065 #LATIN SMALL LETTER E +0x66 U+0066 #LATIN SMALL LETTER F +0x67 U+0067 #LATIN SMALL LETTER G +0x68 U+0068 #LATIN SMALL LETTER H +0x69 U+0069 #LATIN SMALL LETTER I +0x6a U+006a #LATIN SMALL LETTER J +0x6b U+006b #LATIN SMALL LETTER K +0x6c U+006c #LATIN SMALL LETTER L +0x6d U+006d #LATIN SMALL LETTER M +0x6e U+006e #LATIN SMALL LETTER N +0x6f U+006f #LATIN SMALL LETTER O +0x70 U+0070 #LATIN SMALL LETTER P +0x71 U+0071 #LATIN SMALL LETTER Q +0x72 U+0072 #LATIN SMALL LETTER R +0x73 U+0073 #LATIN SMALL LETTER S +0x74 U+0074 #LATIN SMALL LETTER T +0x75 U+0075 #LATIN SMALL LETTER U +0x76 U+0076 #LATIN SMALL LETTER V +0x77 U+0077 #LATIN SMALL LETTER W +0x78 U+0078 #LATIN SMALL LETTER X +0x79 U+0079 #LATIN SMALL LETTER Y +0x7a U+007a #LATIN SMALL LETTER Z +0x7b U+007b #LEFT CURLY BRACKET +0x7c U+007c #VERTICAL LINE +0x7d U+007d #RIGHT CURLY BRACKET +0x7e U+007e #TILDE +#0x7f U+007f #DELETE +0x80 U+00c7 #LATIN CAPITAL LETTER C WITH CEDILLA +0x81 U+00fc #LATIN SMALL LETTER U WITH DIAERESIS +0x82 U+00e9 #LATIN SMALL LETTER E WITH ACUTE +0x83 U+00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0x84 U+00e4 #LATIN SMALL LETTER A WITH DIAERESIS +0x85 U+016f #LATIN SMALL LETTER U WITH RING ABOVE +0x86 U+0107 #LATIN SMALL LETTER C WITH ACUTE +0x87 U+00e7 #LATIN SMALL LETTER C WITH CEDILLA +0x88 U+0142 #LATIN SMALL LETTER L WITH STROKE +0x89 U+00eb #LATIN SMALL LETTER E WITH DIAERESIS +0x8a U+0150 #LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +0x8b U+0151 #LATIN SMALL LETTER O WITH DOUBLE ACUTE +0x8c U+00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX +0x8d U+0179 #LATIN CAPITAL LETTER Z WITH ACUTE +0x8e U+00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS +0x8f U+0106 #LATIN CAPITAL LETTER C WITH ACUTE +0x90 U+00c9 #LATIN CAPITAL LETTER E WITH ACUTE +0x91 U+0139 #LATIN CAPITAL LETTER L WITH ACUTE +0x92 U+013a #LATIN SMALL LETTER L WITH ACUTE +0x93 U+00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0x94 U+00f6 #LATIN SMALL LETTER O WITH DIAERESIS +0x95 U+013d #LATIN CAPITAL LETTER L WITH CARON +0x96 U+013e #LATIN SMALL LETTER L WITH CARON +0x97 U+015a #LATIN CAPITAL LETTER S WITH ACUTE +0x98 U+015b #LATIN SMALL LETTER S WITH ACUTE +0x99 U+00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS +0x9a U+00dc #LATIN CAPITAL LETTER U WITH DIAERESIS +0x9b U+0164 #LATIN CAPITAL LETTER T WITH CARON +0x9c U+0165 #LATIN SMALL LETTER T WITH CARON +0x9d U+0141 #LATIN CAPITAL LETTER L WITH STROKE +0x9e U+00d7 #MULTIPLICATION SIGN +0x9f U+010d #LATIN SMALL LETTER C WITH CARON +0xa0 U+00e1 #LATIN SMALL LETTER A WITH ACUTE +0xa1 U+00ed #LATIN SMALL LETTER I WITH ACUTE +0xa2 U+00f3 #LATIN SMALL LETTER O WITH ACUTE +0xa3 U+00fa #LATIN SMALL LETTER U WITH ACUTE +0xa4 U+0104 #LATIN CAPITAL LETTER A WITH OGONEK +0xa5 U+0105 #LATIN SMALL LETTER A WITH OGONEK +0xa6 U+017d #LATIN CAPITAL LETTER Z WITH CARON +0xa7 U+017e #LATIN SMALL LETTER Z WITH CARON +0xa8 U+0118 #LATIN CAPITAL LETTER E WITH OGONEK +0xa9 U+0119 #LATIN SMALL LETTER E WITH OGONEK +0xaa U+00ac #NOT SIGN +0xab U+017a #LATIN SMALL LETTER Z WITH ACUTE +0xac U+010c #LATIN CAPITAL LETTER C WITH CARON +0xad U+015f #LATIN SMALL LETTER S WITH CEDILLA +0xae U+00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0xaf U+00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0xb0 U+2591 #LIGHT SHADE +0xb1 U+2592 #MEDIUM SHADE +0xb2 U+2593 #DARK SHADE +0xb3 U+2502 #BOX DRAWINGS LIGHT VERTICAL +0xb4 U+2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT +0xb5 U+00c1 #LATIN CAPITAL LETTER A WITH ACUTE +0xb6 U+00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX +0xb7 U+011a #LATIN CAPITAL LETTER E WITH CARON +0xb8 U+015e #LATIN CAPITAL LETTER S WITH CEDILLA +0xb9 U+2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT +0xba U+2551 #BOX DRAWINGS DOUBLE VERTICAL +0xbb U+2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT +0xbc U+255d #BOX DRAWINGS DOUBLE UP AND LEFT +0xbd U+017b #LATIN CAPITAL LETTER Z WITH DOT ABOVE +0xbe U+017c #LATIN SMALL LETTER Z WITH DOT ABOVE +0xbf U+2510 #BOX DRAWINGS LIGHT DOWN AND LEFT +0xc0 U+2514 #BOX DRAWINGS LIGHT UP AND RIGHT +0xc1 U+2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL +0xc2 U+252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL +0xc3 U+251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT +0xc4 U+2500 #BOX DRAWINGS LIGHT HORIZONTAL +0xc5 U+253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL +0xc6 U+0102 #LATIN CAPITAL LETTER A WITH BREVE +0xc7 U+0103 #LATIN SMALL LETTER A WITH BREVE +0xc8 U+255a #BOX DRAWINGS DOUBLE UP AND RIGHT +0xc9 U+2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT +0xca U+2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL +0xcb U+2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL +0xcc U+2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT +0xcd U+2550 #BOX DRAWINGS DOUBLE HORIZONTAL +0xce U+256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL +0xcf U+00a4 #CURRENCY SIGN +0xd0 U+0111 #LATIN SMALL LETTER D WITH STROKE +0xd1 U+0110 #LATIN CAPITAL LETTER D WITH STROKE +0xd2 U+010e #LATIN CAPITAL LETTER D WITH CARON +0xd3 U+00cb #LATIN CAPITAL LETTER E WITH DIAERESIS +0xd4 U+010f #LATIN SMALL LETTER D WITH CARON +0xd5 U+0147 #LATIN CAPITAL LETTER N WITH CARON +0xd6 U+00cd #LATIN CAPITAL LETTER I WITH ACUTE +0xd7 U+00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX +0xd8 U+011b #LATIN SMALL LETTER E WITH CARON +0xd9 U+2518 #BOX DRAWINGS LIGHT UP AND LEFT +0xda U+250c #BOX DRAWINGS LIGHT DOWN AND RIGHT +0xdb U+2588 #FULL BLOCK +0xdc U+2584 #LOWER HALF BLOCK +0xdd U+0162 #LATIN CAPITAL LETTER T WITH CEDILLA +0xde U+016e #LATIN CAPITAL LETTER U WITH RING ABOVE +0xdf U+2580 #UPPER HALF BLOCK +0xe0 U+00d3 #LATIN CAPITAL LETTER O WITH ACUTE +0xe1 U+00df #LATIN SMALL LETTER SHARP S +0xe2 U+00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0xe3 U+0143 #LATIN CAPITAL LETTER N WITH ACUTE +0xe4 U+0144 #LATIN SMALL LETTER N WITH ACUTE +0xe5 U+0148 #LATIN SMALL LETTER N WITH CARON +0xe6 U+0160 #LATIN CAPITAL LETTER S WITH CARON +0xe7 U+0161 #LATIN SMALL LETTER S WITH CARON +0xe8 U+0154 #LATIN CAPITAL LETTER R WITH ACUTE +0xe9 U+00da #LATIN CAPITAL LETTER U WITH ACUTE +0xea U+0155 #LATIN SMALL LETTER R WITH ACUTE +0xeb U+0170 #LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +0xec U+00fd #LATIN SMALL LETTER Y WITH ACUTE +0xed U+00dd #LATIN CAPITAL LETTER Y WITH ACUTE +0xee U+0163 #LATIN SMALL LETTER T WITH CEDILLA +0xef U+00b4 #ACUTE ACCENT +0xf0 U+00ad #SOFT HYPHEN +0xf1 U+02dd #DOUBLE ACUTE ACCENT +0xf2 U+02db #OGONEK +0xf3 U+02c7 #CARON +0xf4 U+02d8 #BREVE +0xf5 U+00a7 #SECTION SIGN +0xf6 U+00f7 #DIVISION SIGN +0xf7 U+00b8 #CEDILLA +0xf8 U+00b0 #DEGREE SIGN +0xf9 U+00a8 #DIAERESIS +0xfa U+02d9 #DOT ABOVE +0xfb U+0171 #LATIN SMALL LETTER U WITH DOUBLE ACUTE +0xfc U+0158 #LATIN CAPITAL LETTER R WITH CARON +0xfd U+0159 #LATIN SMALL LETTER R WITH CARON +0xfe U+25a0 #BLACK SQUARE +0xff U+00a0 #NO-BREAK SPACE + + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks diff --git a/src/chrtrans/def7_uni.tbl b/src/chrtrans/def7_uni.tbl new file mode 100644 index 00000000..ab7fd4de --- /dev/null +++ b/src/chrtrans/def7_uni.tbl @@ -0,0 +1,2150 @@ +# Default 7bit replacements. If the MIME name is set to us-ascii, +# this will be identified with the "7 bit approximations" Display +# character set. + +#The MIME name of this charset. +M us-ascii + +# Shall this become the "default" translation table? YES! +# There has to be exactly one table marked as "default". +D1 + +0x20-0x2f idem +0x3a idem +0x3f-0x7e idem + +#U+00a0:NS +U+00a1:! +U+00a2:Ct +U+00a3:Pd +U+00a4:Cu +U+00a5:Ye +U+00a6:| +U+00a7:SE +U+00a8:" +U+00a9:(C) +U+00aa:-a +U+00ab:<< +U+00ac:NO +U+00ad:-- +U+00ae:(R) +U+00af:'m +U+00b0:DG +U+00b1:+- +U+00b2:^2 +U+00b3:^3 +U+00b4:' +U+00b5:My +U+00b6:PI +U+00b7:.M +U+00b8:, +U+00b9:^1 +U+00ba:-o +U+00bb:>> +U+00bc: 1/4 +U+00bd: 1/2 +U+00be: 3/4 +U+00bf:? +0x41 U+00c0-U+00c3 +U+00c4:A: +U+00c5:AA +U+00c6:AE +U+00c7:C, +0x45 U+00c8-U+00cb +0x49 U+00cc-U+00cf +U+00d0:D- +0x4e U+00d1 +0x4f U+00d2-U+00d5 +U+00d6:O: +0x2a U+00d7 +U+00d8:O/ +0x55 U+00d9-U+00db +U+00dc:U: +0x59 U+00dd +U+00de:TH +U+00df:ss +U+00e0:`a +0x61 U+00e1-U+00e3 +U+00e4:a: +U+00e5:aa +U+00e6:ae +U+00e7:c, +0x65 U+00e8-U+00eb +U+00ec:`i +0x69 U+00ed-U+00ef +U+00f0:d- +0x6e U+00f1 +0x6f U+00f2-U+00f5 +U+00f6:o: +U+00f7:-: +U+00f8:o/ +0x75 U+00f9-U+00fb +U+00fc:u: +0x79 U+00fd +U+00fe:th +0x79 U+00ff +0x41 U+0100 U+0102 U+0104 +0x61 U+0101 U+0103 U+0105 +0x43 U+0106 U+0108 U+010a U+010c +0x63 U+0107 U+0109 U+010b U+010d +0x44 U+010e +0x64 U+010f +U+0110:D/ +U+0111:d/ +0x45 U+0112 U+0114 U+0116 U+0118 U+011a +0x65 U+0113 U+0115 U+0117 U+0119 U+011b +0x47 U+011c U+011e U+0120 U+0122 +0x67 U+011d U+011f U+0121 U+0123 +0x48 U+0124 +0x68 U+0125 +U+0126:H/ +0x48 U+0127 # LATIN SMALL LETTER H BAR -> H +0x49 U+0128 U+012a U+012c U+012e U+0130 +0x69 U+0129 U+012b U+012d U+012f U+0131 +U+0132:IJ +U+0133:ij +0x4a U+0134 +0x6a U+0135 +0x4b U+0136 +0x4b U+0137 +U+0138:kk +0x4c U+0139 U+013b U+013d +0x6c U+013a U+013c U+013e +U+013f:L. +U+0140:l. +U+0141:L/ +U+0142:l/ +0x4e U+0143 U+0145 U+0147 +0x6e U+0144 U+0146 U+0148 +U+0149:'n +U+014a:NG +0x4e U+014B # LATIN SMALL LETTER ENG -> N +0x4f U+014c U+014e +0x6f U+014e U+014f +U+0150:O" +U+0151:o" +U+0152:OE +U+0153:oe +0x52 U+0154 U+0156 U+0158 +0x72 U+0155 U+0157 U+0159 +0x53 U+015a U+015c U+015e U+0160 +0x73 U+015b U+015d U+015f U+0161 +0x54 U+0162 U+0164 +0x74 U+0163 U+0165 +U+0166:T/ +U+0167:t/ +0x55 U+0168 U+016a U+016c U+016e U+0172 +0x75 U+0169 U+016b U+016d U+016f U+0173 +U+0170:U" +U+0171:u" +0x57 U+0174 +0x77 U+0175 +0x59 U+0176 U+0178 +0x79 U+0177 +0x5a U+0179 U+017b U+017d +0x7a U+017a U+017c U+017e +U+017f:s1 +U+0187:C2 +U+0188:c2 +U+0191:F2 +U+0192:f2 +U+0198:K2 +U+0199:k2 +U+01a0:O9 +U+01a1:o9 +U+01a2:OI +U+01a3:oi +U+01a6:yr +U+01af:U9 +U+01b0:u9 +U+01b5:Z/ +U+01b6:z/ +U+01b7:ED +0x41 U+01cd +0x61 U+01ce +0x49 U+01cf +0x69 U+01d0 +0x4f U+01d1 +0x6f U+01d2 +0x55 U+01d3 +0x75 U+01d4 +U+01d5:U:- +U+01d6:u:- +U+01d7:U:' +U+01d8:u:' +U+01d9:U:< +U+01da:u:< +U+01db:U:! +U+01dc:u:! +U+01de:A1 +U+01df:a1 +U+01e0:A7 +U+01e1:a7 +U+01e2:A3 +U+01e3:a3 +U+01e4:G/ +U+01e5:g/ +0x47 U+01e6 +0x67 U+01e7 +0x4b U+01e8 +0x6b U+01e9 +0x4f U+01ea +0x6f U+01eb +U+01ec:O1 +U+01ed:o1 +U+01ee:EZ +U+01ef:ez +0x6a U+01f0 +0x47 U+01f4 +0x67 U+01f5 +U+01fa:AA' +U+01fb:aa' +U+01fc:AE' +U+01fd:ae' +U+01fe:O/' +U+01ff:o/' +U+0200:A!! +U+0201:a!! +U+0202:A) +U+0203:a) +U+0204:E!! +U+0205:e!! +U+0206:E) +U+0207:e) +U+0208:I!! +U+0209:i!! +U+020a:I) +U+020b:i) +U+020c:O!! +U+020d:o!! +U+020e:O) +U+020f:o) +U+0210:R!! +U+0211:r!! +U+0212:R) +U+0213:r) +U+0214:U!! +U+0215:u!! +U+0216:U) +U+0217:u) + +# IPA symbols, from +# Linkname: FAQ: Representing IPA Phonetics in ASCII +# URL: http://www.hpl.hp.com/personal/Evan_Kirshenbaum/IPA/faq.html +# +0x41 U+0251 # LATIN SMALL LETTER SCRIPT A -> A +U+0252:A. +U+0253:b` +0x4f U+0254 # LATIN SMALL LETTER OPEN O -> O +U+0256:d. +U+0257:d` +U+0258:@<umd> +0x40 U+0259 # LATIN SMALL LETTER SCHWA -> @ +0x52 U+025A # LATIN SMALL LETTER SCHWA HOOK -> R +0x45 U+025B # LATIN SMALL LETTER EPSILON -> E +U+025c:V" +U+025d:R<umd> +U+025e:O" +0x4a U+025F # LATIN SMALL LETTER DOTLESS J BAR -> J +U+0260:g` +0x67 U+0261 # LATIN SMALL LETTER SCRIPT G +0x47 U+0262 # LATIN LETTER SMALL CAPITAL G +0x51 U+0263 # LATIN SMALL LETTER GAMMA -> Q +U+0264:o- +U+0265:j<rnd> +U+0266:h<?> +U+0268:i" +0x49 U+026A U+0269 # LATIN LETTER SMALL CAPITAL I, LATIN SMALL LETTER IOTA +0x4c U+026B # LATIN SMALL LETTER L WITH MIDDLE TILDE +0x4c U+026C # LATIN SMALL LETTER L BELT +U+026d:l. +U+026e:z<lat> +U+026f:u- +U+0270:j<vel> +0x4d U+0271 # LATIN SMALL LETTER M HOOK +U+0273:n. +U+0274:n" +U+0275:@. +U+0276:&. +0x55 U+0277 # LATIN SMALL LETTER CLOSED OMEGA -> U +0x72 U+0279 # LATIN SMALL LETTER TURNED R -> r +U+027a:*<lat> +U+027b:r. +U+027d:*. +0x2a U+027E # LATIN SMALL LETTER FISHHOOK R -> * +U+0280:r" +0x52 U+0280 # LATIN LETTER SMALL CAPITAL R -> R +U+0281:g" +U+0282:s. +0x53 U+0283 # LATIN SMALL LETTER ESH -> S +U+0284:J` +U+0287:t! +U+0288:t. +U+0289:u" +0x55 U+028A # LATIN SMALL LETTER UPSILON -> U +U+028b:r<lbd> +0x56 U+028C # LATIN SMALL LETTER TURNED V -> V +U+028d:w<vls> +U+028e:l^ +U+028f:I. +U+0290:z. +U+0292:ed +0x3f U+0294 # LATIN SMALL LETTER GLOTTAL STOP -> ? +U+0295:H<vcd> +U+0296:l! +U+0297:c! +U+0298:p! +U+0299:b<trl> +U+029b:G` +0x6a U+029d # LATIN SMALL LETTER CROSSED-TAIL J +U+029e:k! +0x4c U+029F # LATIN LETTER SMALL CAPITAL L +U+02a0:q` +U+02b0:<h> +U+02b1:<?> +0x3b U+02b2 U+0321 +U+02b3:<r> +U+02b7:<w> +U+02bb:;S +0x60 U+02bc +U+02c6:1> +U+02c7:'< +U+02c9:1- +U+02cb:1! +0x3a U+02d0 +U+02d8:'( +U+02d9:'. +U+02da:'0 +U+02db:'; +U+02dc:1? +U+02dd:'" +0x7e U+0303 U+0334 +0x2e U+0322 U+0323 +U+0324:<?> +U+0325:<o> +0x2d U+0329 +0x5b U+032a +U+032b:<w> +U+0334:<H> +U+0374:' +U+0375:, +U+037a:j3 +U+037e:?% +U+0384:'* +U+0385:'% +U+0386:A% +U+0387:.* +U+0388:E% +U+0389:Y% +U+038a:I% +U+038c:O% +U+038e:U% +U+038f:W% +U+0390:i3 +U+0391:A +U+0392:B +U+0393:G* +U+0394:D* +U+0395:E +U+0396:Z +U+0397:Y* +U+0398:H* +U+0399:I +U+039a:K +U+039b:L* +U+039c:M +U+039d:N +U+039e:C* +U+039f:O +U+03a0:P* +U+03a1:R* +U+03a3:S* +U+03a4:T +U+03a5:U* +U+03a6:F* +U+03a7:X* +U+03a8:Q* +U+03a9:W* +U+03aa:J* +U+03ab:V* +U+03ac:a% +U+03ad:e% +U+03ae:y% +U+03af:i% +U+03b0:u3 +U+03b1:a* +U+03b2:b* +U+03b3:g* +U+03b4:d* +U+03b5:e* +U+03b6:z* +U+03b7:y* +U+03b8:h* +U+03b9:i* +U+03ba:k* +U+03bb:l* +U+03bc:m* +U+03bd:n* +U+03be:c* +U+03bf:o +U+03c0:p* +U+03c1:r* +U+03c2:*s +U+03c3:s* +U+03c4:t* +U+03c5:u* +U+03c6:f* +U+03c7:x* +U+03c8:q* +U+03c9:w* +U+03ca:j* +U+03cb:v* +U+03cc:o% +U+03cd:u% +U+03ce:w% +U+03d0:b3 +U+03da:T3 +U+03db:t3 +U+03dc:M3 +U+03dd:m3 +U+03de:K3 +U+03df:k3 +U+03e0:P3 +U+03e1:p3 +U+03f4:'% +U+03f5:j3 +# Cyrillic capital letters +0x6e U+0401 +U+0402:D% +U+0403:G% +U+0404:IE +U+0405:DS +U+0406:II +U+0407:YI +U+0408:J% +U+0409:LJ +U+040a:NJ +U+040b:Ts +U+040c:KJ +U+040e:V% +U+040f:DZ +0x61-0x62 U+0410-U+0411 +0x77 U+0412 +0x67 U+0413 +0x64-0x65 U+0414-U+0415 +0x76 U+0416 +0x7a U+0417 +0x69-0x70 U+0418-U+041f +0x72-0x75 U+0420-U+0423 +0x66 U+0424 +0x68 U+0425 +0x63 U+0426 +0x7e U+0427 +0x7b U+0428 +0x7d U+0429 +0x27 U+042a +0x79 U+042b +0x78 U+042c +0x7c U+042d +0x60 U+042e +0x71 U+042f + +# Cyrillic small letters +0x41-0x42 U+0430-U+0431 +0x57 U+0432 +0x47 U+0433 +0x44-0x45 U+0434-U+0435 +0x56 U+0436 +0x5a U+0437 +0x49-0x50 U+0438-U+043f +0x52-0x55 U+0440-U+0443 +0x46 U+0444 +0x48 U+0445 +0x43 U+0446 +0x5e U+0447 +0x5b U+0448 +0x5d U+0449 +0x27 U+044a +0x59 U+044b +0x58 U+044c +0x5c U+044d +0x40 U+044e +0x51 U+044f + +0x65 U+0451 #:io +U+0452:d% +U+0453:g% +U+0454:ie +U+0455:ds +U+0456:ii +U+0457:yi +U+0458:j% +U+0459:lj +U+045a:nj +U+045b:ts +U+045c:kj +U+045e:v% +U+045f:dz +U+0462:Y3 +U+0463:y3 +U+046a:O3 +U+046b:o3 +U+0472:F3 +U+0473:f3 +U+0474:V3 +U+0475:v3 +U+0480:C3 +U+0481:c3 +U+0490:G3 +U+0491:g3 +U+05d0:A+ +U+05d1:B+ +U+05d2:G+ +U+05d3:D+ +U+05d4:H+ +U+05d5:W+ +U+05d6:Z+ +U+05d7:X+ +U+05d8:Tj +U+05d9:J+ +U+05da:K% +U+05db:K+ +U+05dc:L+ +U+05dd:M% +U+05de:M+ +U+05df:N% +U+05e0:N+ +U+05e1:S+ +U+05e2:E+ +U+05e3:P% +U+05e4:P+ +U+05e5:Zj +U+05e6:ZJ +U+05e7:Q+ +U+05e8:R+ +U+05e9:Sh +U+05ea:T+ +U+060c:,+ +U+061b:;+ +U+061f:?+ +U+0621:H' +U+0622:aM +U+0623:aH +U+0624:wH +U+0625:ah +U+0626:yH +U+0627:a+ +U+0628:b+ +U+0629:tm +U+062a:t+ +U+062b:tk +U+062c:g+ +U+062d:hk +U+062e:x+ +U+062f:d+ +U+0630:dk +U+0631:r+ +U+0632:z+ +U+0633:s+ +U+0634:sn +U+0635:c+ +U+0636:dd +U+0637:tj +U+0638:zH +U+0639:e+ +U+063a:i+ +U+0640:++ +U+0641:f+ +U+0642:q+ +U+0643:k+ +U+0644:l+ +U+0645:m+ +U+0646:n+ +U+0647:h+ +U+0648:w+ +U+0649:j+ +U+064a:y+ +U+064b::+ +U+064c:"+ +U+064d:=+ +U+064e:/+ +U+064f:'+ +U+0650:1+ +U+0651:3+ +U+0652:0+ +U+0660:0a +U+0661:1a +U+0662:2a +U+0663:3a +U+0664:4a +U+0665:5a +U+0666:6a +U+0667:7a +U+0668:8a +U+0669:9a +U+0670:aS +U+067e:p+ +U+0681:hH +U+0686:tc +U+0698:zj +U+06a4:v+ +U+06af:gf +U+06f0:0a +U+06f1:1a +U+06f2:2a +U+06f3:3a +U+06f4:4a +U+06f5:5a +U+06f6:6a +U+06f7:7a +U+06f8:8a +U+06f9:9a + +# Replacement strings for Ethiopic characters +U+1200:he +U+1201:hu +U+1202:hi +U+1203:ha +U+1204:hE +0x68 U+1205 #:h +U+1206:ho +U+1208:le +U+1209:lu +U+120A:li +U+120B:la +U+120C:lE +0x6c U+120D #:l +U+120E:lo +U+120F:lWa +U+1210:He +U+1211:Hu +U+1212:Hi +U+1213:Ha +U+1214:HE +0x48 U+1215 #:H +U+1216:Ho +U+1217:HWa +U+1218:me +U+1219:mu +U+121A:mi +U+121B:ma +U+121C:mE +0x6d U+121D #:m +U+121E:mo +U+121F:mWa +U+1220:`se +U+1221:`su +U+1222:`si +U+1223:`sa +U+1224:`sE +U+1225:`s +U+1226:`so +U+1227:`sWa +U+1228:re +U+1229:ru +U+122A:ri +U+122B:ra +U+122C:rE +0x72 U+122D #:r +U+122E:ro +U+122F:rWa +U+1230:se +U+1231:su +U+1232:si +U+1233:sa +U+1234:sE +0x73 U+1235 #:s +U+1236:so +U+1237:sWa +U+1238:xe +U+1239:xu +U+123A:xi +U+123B:xa +U+123C:xE +U+123D:xa +U+123E:xo +U+123F:xWa +U+1240:qe +U+1241:qu +U+1242:qi +U+1243:qa +U+1244:qE +0x71 U+1245 #:q +U+1246:qo +U+1248:qWe +U+124A:qWi +U+124B:qWa +U+124C:qWE +U+124D:qW +U+1250:Qe +U+1251:Qu +U+1252:Qi +U+1253:Qa +U+1254:QE +0x51 U+1255 #:Q +U+1256:Qo +U+1258:QWe +U+125A:QWi +U+125B:QWa +U+125C:QWE +U+125D:QW +U+1260:be +U+1261:bu +U+1262:bi +U+1263:ba +U+1264:bE +0x62 U+1265 #:b +U+1266:bo +U+1267:bWa +U+1268:ve +U+1269:vu +U+126A:vi +U+126B:va +U+126C:vE +0x76 U+126D #:v +U+126E:vo +U+126F:vWa +U+1270:te +U+1271:tu +U+1272:ti +U+1273:ta +U+1274:tE +0x74 U+1275 #:t +U+1276:to +U+1277:tWa +U+1278:ce +U+1279:cu +U+127A:ci +U+127B:ca +U+127C:cE +0x63 U+127D #:c +U+127E:co +U+127F:cWa +U+1280:`he +U+1281:`hu +U+1282:`hi +U+1283:`ha +U+1284:`hE +U+1285:`h +U+1286:`ho +U+1288:hWe +U+128A:hWi +U+128B:hWa +U+128C:hWE +U+128D:hW +U+1290:na +U+1291:nu +U+1292:ni +U+1293:na +U+1294:nE +0x6e U+1295 #:n +U+1296:no +U+1297:nWa +U+1298:Ne +U+1299:Nu +U+129A:Ni +U+129B:Na +U+129C:NE +0x4e U+129D #:N +U+129E:No +U+129F:NWa +0x65 U+12A0 #:e +0x75 U+12A1 #:u +0x69 U+12A2 #:i +0x61 U+12A3 #:a +0x45 U+12A4 #:E +0x49 U+12A5 #:I +0x6f U+12A6 #:o +U+12A7:e3 +U+12A8:ke +U+12A9:ku +U+12AA:ki +U+12AB:ka +U+12AC:kE +0x6b U+12AD #:k +U+12AE:ko +U+12B0:kWe +U+12B2:kWi +U+12B3:kWa +U+12B4:kWE +U+12B5:kW +U+12B8:Ke +U+12B9:Ku +U+12BA:Ki +U+12BB:Ka +U+12BC:KE +0x4b U+12BD #:K +U+12BE:Ko +U+12C0:KWe +U+12C2:KWi +U+12C3:KWa +U+12C4:KWE +U+12C5:KW +U+12C8:we +U+12C9:wu +U+12CA:wi +U+12CB:wa +U+12CC:wE +0x77 U+12CD #:w +U+12CE:wo +U+12D0:`e +U+12D1:`u +U+12D2:`i +U+12D3:`a +U+12D4:`E +U+12D5:`I +U+12D6:`o +U+12D8:ze +U+12D9:zu +U+12DA:zi +U+12DB:za +U+12DC:zE +0x7a U+12DD #:z +U+12DE:zo +U+12DF:zWa +U+12E0:Ze +U+12E1:Zu +U+12E2:Zi +U+12E3:Za +U+12E4:ZE +0x5a U+12E5 #:Z +U+12E6:Zo +U+12E7:ZWa +U+12E8:ye +U+12E9:yu +U+12EA:yi +U+12EB:ya +U+12EC:yE +0x79 U+12ED #:y +U+12EE:yo +U+12EF:yWa +U+12F0:de +U+12F1:du +U+12F2:di +U+12F3:da +U+12F4:dE +0x64 U+12F5 #:d +U+12F6:do +U+12F7:dWa +U+12F8:De +U+12F9:Du +U+12FA:Di +U+12FB:Da +U+12FC:DE +0x44 U+12FD #:D +U+12FE:Do +U+12FF:DWa +U+1300:je +U+1301:ju +U+1302:ji +U+1303:ja +U+1304:jE +0x6a U+1305 #:j +U+1306:jo +U+1307:jWa +U+1308:ga +U+1309:gu +U+130A:gi +U+130B:ga +U+130C:gE +0x67 U+130D #:g +U+130E:go +U+1310:gWu +U+1312:gWi +U+1313:gWa +U+1314:gWE +U+1315:gW +U+1318:Ge +U+1319:Gu +U+131A:Gi +U+131B:Ga +U+131C:GE +0x47 U+131D #:G +U+131E:Go +U+131F:GWa +U+1320:Te +U+1321:Tu +U+1322:Ti +U+1323:Ta +U+1324:TE +0x54 U+1325 #:T +U+1326:To +U+1327:TWa +U+1328:Ce +U+1329:Ca +U+132A:Cu +U+132B:Ca +U+132C:CE +0x43 U+132D #:C +U+132E:Co +U+132F:CWa +U+1330:Pe +U+1331:Pu +U+1332:Pi +U+1333:Pa +U+1334:PE +0x50 U+1335 #:P +U+1336:Po +U+1337:PWa +U+1338:SWe +U+1339:SWu +U+133A:SWi +U+133B:SWa +U+133C:SWE +U+133D:SW +U+133E:SWo +U+133F:SWa +U+1340:`Sa +U+1341:`Su +U+1342:`Si +U+1343:`Sa +U+1344:`SE +U+1345:`S +U+1346:`So +U+1348:fa +U+1349:fu +U+134A:fi +U+134B:fa +U+134C:fE +0x46 U+134D #:f +U+134E:fo +U+134F:fWa +U+1350:pe +U+1351:pu +U+1352:pi +U+1353:pa +U+1354:pE +0x70 U+1355 #:p +U+1356:po +U+1357:pWa +U+1358:mYa +U+1359:rYa +U+135A:fYa +# ETHIOPIC SPACE U+1360 mapped to ASCII space above +0x3a U+1361 #:: +U+1362::: +0x2c U+1363 #:, +U+1364:; +U+1365:-: +U+1366::- +U+1367:`? +U+1368::|: +U+1369:`1 +U+136A:`2 +U+136B:`3 +U+136C:`4 +U+136D:`5 +U+136E:`6 +U+136F:`7 +U+1370:`8 +U+1371:`9 +U+1372:`10 +U+1373:`20 +U+1374:`30 +U+1375:`40 +U+1376:`50 +U+1377:`60 +U+1378:`70 +U+1379:`80 +U+137A:`90 +U+137B:`100 +U+137C:`10000 + + +U+1e00:A-0 +U+1e01:a-0 +U+1e02:B. +U+1e03:b. +U+1e04:B-. +U+1e05:b-. +U+1e06:B_ +U+1e07:b_ +U+1e08:C,' +U+1e09:c,' +U+1e0a:D. +U+1e0b:d. +U+1e0c:D-. +U+1e0d:d-. +U+1e0e:D_ +U+1e0f:d_ +U+1e10:D, +U+1e11:d, +U+1e12:D-> +U+1e13:d-> +U+1e14:E-! +U+1e15:e-! +U+1e16:E-' +U+1e17:e-' +U+1e18:E-> +U+1e19:e-> +U+1e1a:E-? +U+1e1b:e-? +U+1e1c:E,( +U+1e1d:e,( +U+1e1e:F. +U+1e1f:f. +U+1e20:G- +U+1e21:g- +U+1e22:H. +U+1e23:h. +U+1e24:H-. +U+1e25:h-. +U+1e26:H: +U+1e27:h: +U+1e28:H, +U+1e29:h, +U+1e2a:H-( +U+1e2b:h-( +U+1e2c:I-? +U+1e2d:i-? +U+1e2e:I:' +U+1e2f:i:' +U+1e30:K' +U+1e31:k' +U+1e32:K-. +U+1e33:k-. +U+1e34:K_ +U+1e35:k_ +U+1e36:L-. +U+1e37:l-. +U+1e38:L--. +U+1e39:l--. +U+1e3a:L_ +U+1e3b:l_ +U+1e3c:L-> +U+1e3d:l-> +U+1e3e:M' +U+1e3f:m' +U+1e40:M. +U+1e41:m. +U+1e42:M-. +U+1e43:m-. +U+1e44:N. +U+1e45:n. +U+1e46:N-. +U+1e47:n-. +U+1e48:N_ +U+1e49:n_ +U+1e4a:N-> +U+1e4b:n-> +U+1e4c:O?' +U+1e4d:o?' +U+1e4e:O?: +U+1e4f:o?: +U+1e50:O-! +U+1e51:o-! +U+1e52:O-' +U+1e53:o-' +U+1e54:P' +U+1e55:p' +U+1e56:P. +U+1e57:p. +U+1e58:R. +U+1e59:r. +U+1e5a:R-. +U+1e5b:r-. +U+1e5c:R--. +U+1e5d:r--. +U+1e5e:R_ +U+1e5f:r_ +U+1e60:S. +U+1e61:s. +U+1e62:S-. +U+1e63:s-. +U+1e64:S'. +U+1e65:s'. +U+1e66:S<. +U+1e67:s<. +U+1e68:S.-. +U+1e69:s.-. +U+1e6a:T. +U+1e6b:t. +U+1e6c:T-. +U+1e6d:t-. +U+1e6e:T_ +U+1e6f:t_ +U+1e70:T-> +U+1e71:t-> +U+1e72:U--: +U+1e73:u--: +U+1e74:U-? +U+1e75:u-? +U+1e76:U-> +U+1e77:u-> +U+1e78:U?' +U+1e79:u?' +U+1e7a:U-: +U+1e7b:u-: +U+1e7c:V? +U+1e7d:v? +U+1e7e:V-. +U+1e7f:v-. +U+1e80:W! +U+1e81:w! +U+1e82:W' +U+1e83:w' +U+1e84:W: +U+1e85:w: +U+1e86:W. +U+1e87:w. +U+1e88:W-. +U+1e89:w-. +U+1e8a:X. +U+1e8b:x. +U+1e8c:X: +U+1e8d:x: +U+1e8e:Y. +U+1e8f:y. +U+1e90:Z> +U+1e91:z> +U+1e92:Z-. +U+1e93:z-. +U+1e94:Z_ +U+1e95:z_ +U+1e96:h_ +U+1e97:t: +U+1e98:w0 +U+1e99:y0 +U+1ea0:A-. +U+1ea1:a-. +U+1ea2:A2 +U+1ea3:a2 +U+1ea4:A>' +U+1ea5:a>' +U+1ea6:A>! +U+1ea7:a>! +U+1ea8:A>2 +U+1ea9:a>2 +U+1eaa:A>? +U+1eab:a>? +U+1eac:A>-. +U+1ead:a>-. +U+1eae:A(' +U+1eaf:a(' +U+1eb0:A(! +U+1eb1:a(! +U+1eb2:A(2 +U+1eb3:a(2 +U+1eb4:A(? +U+1eb5:a(? +U+1eb6:A(-. +U+1eb7:a(-. +U+1eb8:E-. +U+1eb9:e-. +U+1eba:E2 +U+1ebb:e2 +U+1ebc:E? +U+1ebd:e? +U+1ebe:E>' +U+1ebf:e>' +U+1ec0:E>! +U+1ec1:e>! +U+1ec2:E>2 +U+1ec3:e>2 +U+1ec4:E>? +U+1ec5:e>? +U+1ec6:E>-. +U+1ec7:e>-. +U+1ec8:I2 +U+1ec9:i2 +U+1eca:I-. +U+1ecb:i-. +U+1ecc:O-. +U+1ecd:o-. +U+1ece:O2 +U+1ecf:o2 +U+1ed0:O>' +U+1ed1:o>' +U+1ed2:O>! +U+1ed3:o>! +U+1ed4:O>2 +U+1ed5:o>2 +U+1ed6:O>? +U+1ed7:o>? +U+1ed8:O>-. +U+1ed9:o>-. +U+1eda:O9' +U+1edb:o9' +U+1edc:O9! +U+1edd:o9! +U+1ede:O92 +U+1edf:o92 +U+1ee0:O9? +U+1ee1:o9? +U+1ee2:O9-. +U+1ee3:o9-. +U+1ee4:U-. +U+1ee5:u-. +U+1ee6:U2 +U+1ee7:u2 +U+1ee8:U9' +U+1ee9:u9' +U+1eea:U9! +U+1eeb:u9! +U+1eec:U92 +U+1eed:u92 +U+1eee:U9? +U+1eef:u9? +U+1ef0:U9-. +U+1ef1:u9-. +U+1ef2:Y! +U+1ef3:y! +U+1ef4:Y-. +U+1ef5:y-. +U+1ef6:Y2 +U+1ef7:y2 +U+1ef8:Y? +U+1ef9:y? +U+1f00:;' +U+1f01:,' +U+1f02:;! +U+1f03:,! +U+1f04:?; +U+1f05:?, +U+1f06:!: +U+1f07:?: +U+1fbf:,, +U+1fc0:?* +U+1fc1:?: +U+1fcd:,! +U+1fce:,' +U+1fcf:?, +U+1fdd:;! +U+1fde:;' +U+1fdf:?; +U+1fed:!: +U+1fef:!* +U+1ffe:;; +0x20 U+2002 U+2004-U+2006 U+2009 # spaces +U+2003: +U+200e:(->) +U+200f:(<-) +U+200a: +0x2d U+2010 U+2013-U+2015 # hyphen-like +U+2016:|| +U+2017:=2 +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks +U+2020:/- +U+2021:/= +U+2022: o +U+2025:.. +U+2025:... + +# Dont wanna see these: +# POP DIRECTIONAL FORMATTING 202C +U+202c: +# LEFT-TO-RIGHT OVERRIDE 202D +U+202d: + +U+2030: 0/00 +U+2032:' +U+2033:'' +U+2034:''' +U+2035:` +U+2036:`` +U+2037:``` +U+2038:Ca +U+2039:< +U+203a:> +U+203b::X +U+203c:!! +U+203e:'- +U+2044:/ +U+2070:^0 +U+2074:^4 +U+2075:^5 +U+2076:^6 +U+2077:^7 +U+2078:^8 +U+2079:^9 +U+207a:^+ +U+207b:^- +U+207c:^= +U+207d:^( +U+207e:^) +U+207f:^n +U+2080:_0 +U+2081:_1 +U+2082:_2 +U+2083:_3 +U+2084:_4 +U+2085:_5 +U+2086:_6 +U+2087:_7 +U+2088:_8 +U+2089:_9 +U+208a:_+ +U+208b:_- +U+208c:_= +U+208d:( +U+208e:) +U+20a3:Ff +U+20a4:Li +U+20a7:Pt +U+20a9:W= +U+2103:oC +U+2105:c/o +U+2109:oF +U+2116:No. +U+2117:PO +U+211e:Rx +U+2120:(SM) +U+2122:(TM) +U+2126:Ohm +U+212b:Ang. +U+2153: 1/3 +U+2154: 2/3 +U+2155: 1/5 +U+2156: 2/5 +U+2157: 3/5 +U+2158: 4/5 +U+2159: 1/6 +U+215a: 5/6 +U+215b: 1/8 +U+215c: 3/8 +U+215d: 5/8 +U+215e: 7/8 +U+2160:I +U+2161:II +U+2162:III +U+2163:IV +U+2164:V +U+2165:VI +U+2166:VII +U+2167:VIII +U+2168:IX +U+2169:X +U+216a:XI +U+216b:XII +U+216c:L +U+216d:C +U+216e:D +U+216f:M +U+2170:i +U+2171:ii +U+2172:iii +U+2173:iv +U+2174:v +U+2175:vi +U+2176:vii +U+2177:viii +U+2178:ix +U+2179:x +U+217a:xi +U+217b:xii +U+217c:l +U+217d:c +U+217e:d +U+217f:m +U+2180:1000RCD +U+2181:5000R +U+2182:10000R +U+2190:<- +U+2191:-! +U+2192:-> +U+2193:-v +U+2194:<> +U+2195:UD +U+2196:<!! +U+2197://> +U+2198:!!> +U+2199:<// +U+21a8:UD- +U+21c0:>V +U+21d0:<= +U+21d2:=> +U+21d4:== +U+2200:FA +U+2202:d +U+2203:TE +U+2205:{} +U+2206:decr. +U+2207:Nabla +U+2208:(- +U+220b:-) +U+220f:*P +U+2211:+Z +U+2212: - +U+2213:-/+ +U+2214:.+ +U+2217:* +U+2218:Ob +U+2219:sb +U+221a:RT +U+221d:0( +U+221e:00 +U+221f:-L +U+2220:-V +U+2225:PP +U+2227:AND +U+2228:OR +U+2229:(U +U+222a:)U +U+222b:In +U+222c:DI +U+222e:Io +U+2234:.: +U+2235::. +U+2236::R +U+2237::: +U+223c:?1 +U+223e:CG +U+2243:?- +U+2245:?= +U+2248:?2 +U+224c:=? +U+2253:HI +U+2260:!= +U+2261:=3 +U+2264:=< +U+2265:>= +U+226a:<< +U+226b:>> +U+226e:!< +U+226f:!> +U+2282:(C +U+2283:)C +U+2286:(_ +U+2287:)_ +U+2299:0. +U+229a:02 +U+22a5:-T +U+22c5:.P +U+22ee::3 +U+22ef:.3 +U+2302:Eh +U+2308:<7 +U+2309:>7 +U+230a:7< +U+230b:7> +U+2310:NI +U+2312:(A +U+2315:TR +U+2318:88 +U+2320:Iu +U+2321:Il +U+2329:</ +U+232a:/> +U+2423:Vs +U+2440:1h +U+2441:3h +U+2442:2h +U+2443:4h +U+2446:1j +U+2447:2j +U+2448:3j +U+2449:4j +U+2460:1-o +U+2461:2-o +U+2462:3-o +U+2463:4-o +U+2464:5-o +U+2465:6-o +U+2466:7-o +U+2467:8-o +U+2468:9-o +U+2469:10-o +U+246a:11-o +U+246b:12-o +U+246c:13-o +U+246d:14-o +U+246e:15-o +U+246f:16-o +U+2470:17-o +U+2471:18-o +U+2472:19-o +U+2473:20-o +U+2474:(1) +U+2475:(2) +U+2476:(3) +U+2477:(4) +U+2478:(5) +U+2479:(6) +U+247a:(7) +U+247b:(8) +U+247c:(9) +U+247d:(10) +U+247e:(11) +U+247f:(12) +U+2480:(13) +U+2481:(14) +U+2482:(15) +U+2483:(16) +U+2484:(17) +U+2485:(18) +U+2486:(19) +U+2487:(20) +U+2488:1. +U+2489:2. +U+248a:3. +U+248b:4. +U+248c:5. +U+248d:6. +U+248e:7. +U+248f:8. +U+2490:9. +U+2491:10. +U+2492:11. +U+2493:12. +U+2494:13. +U+2495:14. +U+2496:15. +U+2497:16. +U+2498:17. +U+2499:18. +U+249a:19. +U+249b:20. +U+249c:(a) +U+249d:(b) +U+249e:(c) +U+249f:(d) +U+24a0:(e) +U+24a1:(f) +U+24a2:(g) +U+24a3:(h) +U+24a4:(i) +U+24a5:(j) +U+24a6:(k) +U+24a7:(l) +U+24a8:(m) +U+24a9:(n) +U+24aa:(o) +U+24ab:(p) +U+24ac:(q) +U+24ad:(r) +U+24ae:(s) +U+24af:(t) +U+24b0:(u) +U+24b1:(v) +U+24b2:(w) +U+24b3:(x) +U+24b4:(y) +U+24b5:(z) +U+24b6:A-o +U+24b7:B-o +U+24b8:C-o +U+24b9:D-o +U+24ba:E-o +U+24bb:F-o +U+24bc:G-o +U+24bd:H-o +U+24be:I-o +U+24bf:J-o +U+24c0:K-o +U+24c1:L-o +U+24c2:M-o +U+24c3:N-o +U+24c4:O-o +U+24c5:P-o +U+24c6:Q-o +U+24c7:R-o +U+24c8:S-o +U+24c9:T-o +U+24ca:U-o +U+24cb:V-o +U+24cc:W-o +U+24cd:X-o +U+24ce:Y-o +U+24cf:Z-o +U+24d0:a-o +U+24d1:b-o +U+24d2:c-o +U+24d3:d-o +U+24d4:e-o +U+24d5:f-o +U+24d6:g-o +U+24d7:h-o +U+24d8:i-o +U+24d9:j-o +U+24da:k-o +U+24db:l-o +U+24dc:m-o +U+24dd:n-o +U+24de:o-o +U+24df:p-o +U+24e0:q-o +U+24e1:r-o +U+24e2:s-o +U+24e3:t-o +U+24e4:u-o +U+24e5:v-o +U+24e6:w-o +U+24e7:x-o +U+24e8:y-o +U+24e9:z-o +U+24ea:0-o +U+2500:- +U+2501:= +U+2502:| +U+2503:| +U+2504:- +U+2505:= +U+2506:| +U+2507:| +U+2508:- +U+2509:= +U+250a:| +U+250b:| +0x2b U+250c-U+256c # box drawings, use + +U+2571:/ +U+2572:\ +U+2580:TB +U+2584:LB +U+2588:FB +U+258c:lB +U+2590:RB +U+2591:.S +U+2592::S +U+2593:?S +U+25a0:fS +U+25a1:OS +U+25a2:RO +U+25a3:Rr +U+25a4:RF +U+25a5:RY +U+25a6:RH +U+25a7:RZ +U+25a8:RK +U+25a9:RX +U+25aa:sB +U+25ac:SR +U+25ad:Or +U+25b2:UT +U+25b3:uT +U+25b6:PR +U+25b7:Tr +U+25ba:PR +U+25bc:Dt +U+25bd:dT +U+25c0:PL +U+25c1:Tl +U+25c4:PL +U+25c6:Db +U+25c7:Dw +U+25ca:LZ +U+25cb:0m +U+25ce:0o +U+25cf:0M +U+25d0:0L +U+25d1:0R +U+25d8:Sn +U+25d9:Ic +U+25e2:Fd +U+25e3:Bd +U+25ef:Ci +U+2605:*2 +U+2606:*1 +U+260e:TEL +U+260f:tel +U+261c:<-- +U+261e:--> +U+263a::-) +U+263b:(-: +U+263c:SU +U+2640:f. +U+2642:m. +U+2660:cS +U+2661:cH +U+2662:cD +U+2663:cC +U+2664:cS- +U+2665:cH- +U+2666:cD- +U+2667:cC- +U+2669:Md +U+266a:M8 +U+266b:M2 +U+266c:M16 +U+266d:b +U+266e:Mx +U+266f:# +0x58 U+2713 U+2717 # check marks +U+2720:-X +0x20 U+3000 # ideographic space +U+3001:,_ +U+3002:._ +U+3003:+" +U+3004:JIS +U+3005:*_ +U+3006:;_ +U+3007:0_ +U+300a:<+ +U+300b:>+ +U+300c:<' +U+300d:>' +U+300e:<" +U+300f:>" +U+3010:(" +U+3011:)" +U+3012:=T +U+3013:=_ +U+3014:(' +U+3015:)' +U+3016:(I +U+3017:)I +U+301c:-? +U+3020:=T:) +U+3041:A5 +U+3042:a5 +U+3043:I5 +U+3044:i5 +U+3045:U5 +U+3046:u5 +U+3047:E5 +U+3048:e5 +U+3049:O5 +U+304a:o5 +U+304b:ka +U+304c:ga +U+304d:ki +U+304e:gi +U+304f:ku +U+3050:gu +U+3051:ke +U+3052:ge +U+3053:ko +U+3054:go +U+3055:sa +U+3056:za +U+3057:si +U+3058:zi +U+3059:su +U+305a:zu +U+305b:se +U+305c:ze +U+305d:so +U+305e:zo +U+305f:ta +U+3060:da +U+3061:ti +U+3062:di +U+3063:tU +U+3064:tu +U+3065:du +U+3066:te +U+3067:de +U+3068:to +U+3069:do +U+306a:na +U+306b:ni +U+306c:nu +U+306d:ne +U+306e:no +U+306f:ha +U+3070:ba +U+3071:pa +U+3072:hi +U+3073:bi +U+3074:pi +U+3075:hu +U+3076:bu +U+3077:pu +U+3078:he +U+3079:be +U+307a:pe +U+307b:ho +U+307c:bo +U+307d:po +U+307e:ma +U+307f:mi +U+3080:mu +U+3081:me +U+3082:mo +U+3083:yA +U+3084:ya +U+3085:yU +U+3086:yu +U+3087:yO +U+3088:yo +U+3089:ra +U+308a:ri +U+308b:ru +U+308c:re +U+308d:ro +U+308e:wA +U+308f:wa +U+3090:wi +U+3091:we +U+3092:wo +U+3093:n5 +U+3094:vu +U+309b:"5 +U+309c:05 +U+309d:*5 +U+309e:+5 +U+30a1:a6 +U+30a2:A6 +U+30a3:i6 +U+30a4:I6 +U+30a5:u6 +U+30a6:U6 +U+30a7:e6 +U+30a8:E6 +U+30a9:o6 +U+30aa:O6 +U+30ab:Ka +U+30ac:Ga +U+30ad:Ki +U+30ae:Gi +U+30af:Ku +U+30b0:Gu +U+30b1:Ke +U+30b2:Ge +U+30b3:Ko +U+30b4:Go +U+30b5:Sa +U+30b6:Za +U+30b7:Si +U+30b8:Zi +U+30b9:Su +U+30ba:Zu +U+30bb:Se +U+30bc:Ze +U+30bd:So +U+30be:Zo +U+30bf:Ta +U+30c0:Da +U+30c1:Ti +U+30c2:Di +U+30c3:TU +U+30c4:Tu +U+30c5:Du +U+30c6:Te +U+30c7:De +U+30c8:To +U+30c9:Do +U+30ca:Na +U+30cb:Ni +U+30cc:Nu +U+30cd:Ne +U+30ce:No +U+30cf:Ha +U+30d0:Ba +U+30d1:Pa +U+30d2:Hi +U+30d3:Bi +U+30d4:Pi +U+30d5:Hu +U+30d6:Bu +U+30d7:Pu +U+30d8:He +U+30d9:Be +U+30da:Pe +U+30db:Ho +U+30dc:Bo +U+30dd:Po +U+30de:Ma +U+30df:Mi +U+30e0:Mu +U+30e1:Me +U+30e2:Mo +U+30e3:YA +U+30e4:Ya +U+30e5:YU +U+30e6:Yu +U+30e7:YO +U+30e8:Yo +U+30e9:Ra +U+30ea:Ri +U+30eb:Ru +U+30ec:Re +U+30ed:Ro +U+30ee:WA +U+30ef:Wa +U+30f0:Wi +U+30f1:We +U+30f2:Wo +U+30f3:N6 +U+30f4:Vu +U+30f5:KA +U+30f6:KE +U+30f7:Va +U+30f8:Vi +U+30f9:Ve +U+30fa:Vo +U+30fb:.6 +U+30fc:-6 +U+30fd:*6 +U+30fe:+6 +U+3105:b4 +U+3106:p4 +U+3107:m4 +U+3108:f4 +U+3109:d4 +U+310a:t4 +U+310b:n4 +U+310c:l4 +U+310d:g4 +U+310e:k4 +U+310f:h4 +U+3110:j4 +U+3111:q4 +U+3112:x4 +U+3113:zh +U+3114:ch +U+3115:sh +U+3116:r4 +U+3117:z4 +U+3118:c4 +U+3119:s4 +U+311a:a4 +U+311b:o4 +U+311c:e4 +U+311d:eh4 +U+311e:ai +U+311f:ei +U+3120:au +U+3121:ou +U+3122:an +U+3123:en +U+3124:aN +U+3125:eN +U+3126:er +U+3127:i4 +U+3128:u4 +U+3129:iu +U+312a:v4 +U+312b:nG +U+312c:gn +U+321c:(JU) +U+3220:1c +U+3221:2c +U+3222:3c +U+3223:4c +U+3224:5c +U+3225:6c +U+3226:7c +U+3227:8c +U+3228:9c +U+3229:10c +U+327f:KSC +U+33c2:am +U+33d8:pm +U+fb00:ff +U+fb01:fi +U+fb02:fl +U+fb03:ffi +U+fb04:ffl +U+fb05:St +U+fb06:st +U+fe7d:3+; +U+fe82:aM. +U+fe84:aH. +U+fe88:ah. +U+fe8d:a+- +U+fe8e:a+. +U+fe8f:b+- +U+fe90:b+. +U+fe91:b+, +U+fe92:b+; +U+fe93:tm- +U+fe94:tm. +U+fe95:t+- +U+fe96:t+. +U+fe97:t+, +U+fe98:t+; +U+fe99:tk- +U+fe9a:tk. +U+fe9b:tk, +U+fe9c:tk; +U+fe9d:g+- +U+fe9e:g+. +U+fe9f:g+, +U+fea0:g+; +U+fea1:hk- +U+fea2:hk. +U+fea3:hk, +U+fea4:hk; +U+fea5:x+- +U+fea6:x+. +U+fea7:x+, +U+fea8:x+; +U+fea9:d+- +U+feaa:d+. +U+feab:dk- +U+feac:dk. +U+fead:r+- +U+feae:r+. +U+feaf:z+- +U+feb0:z+. +U+feb1:s+- +U+feb2:s+. +U+feb3:s+, +U+feb4:s+; +U+feb5:sn- +U+feb6:sn. +U+feb7:sn, +U+feb8:sn; +U+feb9:c+- +U+feba:c+. +U+febb:c+, +U+febc:c+; +U+febd:dd- +U+febe:dd. +U+febf:dd, +U+fec0:dd; +U+fec1:tj- +U+fec2:tj. +U+fec3:tj, +U+fec4:tj; +U+fec5:zH- +U+fec6:zH. +U+fec7:zH, +U+fec8:zH; +U+fec9:e+- +U+feca:e+. +U+fecb:e+, +U+fecc:e+; +U+fecd:i+- +U+fece:i+. +U+fecf:i+, +U+fed0:i+; +U+fed1:f+- +U+fed2:f+. +U+fed3:f+, +U+fed4:f+; +U+fed5:q+- +U+fed6:q+. +U+fed7:q+, +U+fed8:q+; +U+fed9:k+- +U+feda:k+. +U+fedb:k+, +U+fedc:k+; +U+fedd:l+- +U+fede:l+. +U+fedf:l+, +U+fee0:l+; +U+fee1:m+- +U+fee2:m+. +U+fee3:m+, +U+fee4:m+; +U+fee5:n+- +U+fee6:n+. +U+fee7:n+, +U+fee8:n+; +U+fee9:h+- +U+feea:h+. +U+feeb:h+, +U+feec:h+; +U+feed:w+- +U+feee:w+. +U+feef:j+- +U+fef0:j+. +U+fef1:y+- +U+fef2:y+. +U+fef3:y+, +U+fef4:y+; +U+fef5:lM- +U+fef6:lM. +U+fef7:lH- +U+fef8:lH. +U+fef9:lh- +U+fefa:lh. +U+fefb:la- +U+fefc:la. +U+0000:NU +U+0001:SH +U+0002:SX +U+0003:EX +U+0004:ET +U+0005:EQ +U+0006:AK +U+0007:BL +U+0008:BS +U+0009:HT +U+000a:LF +U+000b:VT +U+000c:FF +U+000d:CR +U+000e:SO +U+000f:SI +U+0010:DL +U+0011:D1 +U+0012:D2 +U+0013:D3 +U+0014:D4 +U+0015:NK +U+0016:SY +U+0017:EB +U+0018:CN +U+0019:EM +U+001a:SB +U+001b:EC +U+001c:FS +U+001d:GS +U+001e:RS +U+001f:US +U+007f:DT +U+0080:PA +U+0081:HO +U+0082:BH +U+0083:NH +U+0084:IN +U+0085:NL +U+0086:SA +U+0087:ES +U+0088:HS +U+0089:HJ +U+008a:VS +U+008b:PD +U+008c:PU +U+008d:RI +U+008e:S2 +U+008f:S3 +U+0090:DC +U+0091:P1 +U+0092:P2 +U+0093:TS +U+0094:CC +U+0095:MW +U+0096:SG +U+0097:EG +U+0098:SS +U+0099:GC +U+009a:SC +U+009b:CI +U+009c:ST +U+009d:OC +U+009e:PM +U+009f:AC +U+e000:"3 +U+e001:"1 +U+e002:"! +U+e003:"' +U+e004:"> +U+e005:"? +U+e006:"- +U+e007:"( +U+e008:". +U+e009:": +U+e00a:"0 +U+e00b:", +U+e00c:"_ +U+e00d:"" +U+e00e:"; +U+e00f:"< +U+e010:"= +U+e011:"/ +U+e012:"p +U+e013:"d +U+e014:"i +U+e015:+_ +U+e016:a+: +U+e017:Tel +U+e018:UA +U+e019:UB +U+e01e:Mc +U+e01f:Fl + +U+e020:pm +U+e021:Tel +U+e022:a+: +U+e023:Fl +U+e024:GF +U+e025:>V +U+e026:!* +U+e027:?* +U+e028:J< diff --git a/src/chrtrans/iso01_uni.tbl b/src/chrtrans/iso01_uni.tbl new file mode 100644 index 00000000..15dc6f6a --- /dev/null +++ b/src/chrtrans/iso01_uni.tbl @@ -0,0 +1,427 @@ +# +# Unicode mapping table for ISO 8859-1 fonts iso01.* +# [use: unicode_start iso01.f16 iso01] +# +#Shall this become the "default" translation? +#Meaning of that is currently not well defined. It is different +#from the default input or default output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Miso-8859-1 + +#Name as a Display Charset (used on Options screen) +OISO Latin 1 + +0x20 U+0020 U+1360 +0x21-0x62 idem +# The following line is an example for mapping several accented versions +# of small letter 'c' to 'c': +0x63 U+0063 U+0107 U+0109 U+010B U+010D +0x64-0x7e idem +0x7f U+2302 +0xa0-0xff idem +#0x00 U+fffd # don't let failed char lookups return '\0' +# Mappings of cntrl chars, left in from original, just to see what happens... +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC + +0xd0 U+0110 # Dstrok and ETH are nearly the same... + +# Dont wanna see these: +# POP DIRECTIONAL FORMATTING 202C +U+202c: +# LEFT-TO-RIGHT OVERRIDE 202D +U+202d: + +# Replacement strings for Ethiopic characters +U+1200:he +U+1201:hu +U+1202:hi +U+1203:ha +U+1204:hE +U+1205:h +U+1206:ho +U+1208:le +U+1209:lu +U+120A:li +U+120B:la +U+120C:lE +U+120D:l +U+120E:lo +U+120F:lWa +U+1210:He +U+1211:Hu +U+1212:Hi +U+1213:Ha +U+1214:HE +U+1215:H +U+1216:Ho +U+1217:HWa +U+1218:me +U+1219:mu +U+121A:mi +U+121B:ma +U+121C:mE +U+121D:m +U+121E:mo +U+121F:mWa +U+1220:`se +U+1221:`su +U+1222:`si +U+1223:`sa +U+1224:`sE +U+1225:`s +U+1226:`so +U+1227:`sWa +U+1228:re +U+1229:ru +U+122A:ri +U+122B:ra +U+122C:rE +U+122D:r +U+122E:ro +U+122F:rWa +U+1230:se +U+1231:su +U+1232:si +U+1233:sa +U+1234:sE +U+1235:s +U+1236:so +U+1237:sWa +U+1238:xe +U+1239:xu +U+123A:xi +U+123B:xa +U+123C:xE +U+123D:xa +U+123E:xo +U+123F:xWa +U+1240:qe +U+1241:qu +U+1242:qi +U+1243:qa +U+1244:qE +U+1245:q +U+1246:qo +U+1248:qWe +U+124A:qWi +U+124B:qWa +U+124C:qWE +U+124D:qW +U+1250:Qe +U+1251:Qu +U+1252:Qi +U+1253:Qa +U+1254:QE +U+1255:Q +U+1256:Qo +U+1258:QWe +U+125A:QWi +U+125B:QWa +U+125C:QWE +U+125D:QW +U+1260:be +U+1261:bu +U+1262:bi +U+1263:ba +U+1264:bE +U+1265:b +U+1266:bo +U+1267:bWa +U+1268:ve +U+1269:vu +U+126A:vi +U+126B:va +U+126C:vE +U+126D:v +U+126E:vo +U+126F:vWa +U+1270:te +U+1271:tu +U+1272:ti +U+1273:ta +U+1274:tE +U+1275:t +U+1276:to +U+1277:tWa +U+1278:ce +U+1279:cu +U+127A:ci +U+127B:ca +U+127C:cE +U+127D:c +U+127E:co +U+127F:cWa +U+1280:`he +U+1281:`hu +U+1282:`hi +U+1283:`ha +U+1284:`hE +U+1285:`h +U+1286:`ho +U+1288:hWe +U+128A:hWi +U+128B:hWa +U+128C:hWE +U+128D:hW +U+1290:na +U+1291:nu +U+1292:ni +U+1293:na +U+1294:nE +U+1295:n +U+1296:no +U+1297:nWa +U+1298:Ne +U+1299:Nu +U+129A:Ni +U+129B:Na +U+129C:NE +U+129D:N +U+129E:No +U+129F:NWa +U+12A0:e +U+12A1:u +U+12A2:i +U+12A3:a +U+12A4:E +U+12A5:I +U+12A6:o +U+12A7:e3 +U+12A8:ke +U+12A9:ku +U+12AA:ki +U+12AB:ka +U+12AC:kE +U+12AD:k +U+12AE:ko +U+12B0:kWe +U+12B2:kWi +U+12B3:kWa +U+12B4:kWE +U+12B5:kW +U+12B8:Ke +U+12B9:Ku +U+12BA:Ki +U+12BB:Ka +U+12BC:KE +U+12BD:K +U+12BE:Ko +U+12C0:KWe +U+12C2:KWi +U+12C3:KWa +U+12C4:KWE +U+12C5:KW +U+12C8:we +U+12C9:wu +U+12CA:wi +U+12CB:wa +U+12CC:wE +U+12CD:w +U+12CE:wo +U+12D0:`e +U+12D1:`u +U+12D2:`i +U+12D3:`a +U+12D4:`E +U+12D5:`I +U+12D6:`o +U+12D8:ze +U+12D9:zu +U+12DA:zi +U+12DB:za +U+12DC:zE +U+12DD:z +U+12DE:zo +U+12DF:zWa +U+12E0:Ze +U+12E1:Zu +U+12E2:Zi +U+12E3:Za +U+12E4:ZE +U+12E5:Z +U+12E6:Zo +U+12E7:ZWa +U+12E8:ye +U+12E9:yu +U+12EA:yi +U+12EB:ya +U+12EC:yE +U+12ED:y +U+12EE:yo +U+12EF:yWa +U+12F0:de +U+12F1:du +U+12F2:di +U+12F3:da +U+12F4:dE +U+12F5:d +U+12F6:do +U+12F7:dWa +U+12F8:De +U+12F9:Du +U+12FA:Di +U+12FB:Da +U+12FC:DE +U+12FD:D +U+12FE:Do +U+12FF:DWa +U+1300:je +U+1301:ju +U+1302:ji +U+1303:ja +U+1304:jE +U+1305:j +U+1306:jo +U+1307:jWa +U+1308:ga +U+1309:gu +U+130A:gi +U+130B:ga +U+130C:gE +U+130D:g +U+130E:go +U+1310:gWu +U+1312:gWi +U+1313:gWa +U+1314:gWE +U+1315:gW +U+1318:Ge +U+1319:Gu +U+131A:Gi +U+131B:Ga +U+131C:GE +U+131D:G +U+131E:Go +U+131F:GWa +U+1320:Te +U+1321:Tu +U+1322:Ti +U+1323:Ta +U+1324:TE +U+1325:T +U+1326:To +U+1327:TWa +U+1328:Ce +U+1329:Ca +U+132A:Cu +U+132B:Ca +U+132C:CE +U+132D:C +U+132E:Co +U+132F:CWa +U+1330:Pe +U+1331:Pu +U+1332:Pi +U+1333:Pa +U+1334:PE +U+1335:P +U+1336:Po +U+1337:PWa +U+1338:SWe +U+1339:SWu +U+133A:SWi +U+133B:SWa +U+133C:SWE +U+133D:SW +U+133E:SWo +U+133F:SWa +U+1340:`Sa +U+1341:`Su +U+1342:`Si +U+1343:`Sa +U+1344:`SE +U+1345:`S +U+1346:`So +U+1348:fa +U+1349:fu +U+134A:fi +U+134B:fa +U+134C:fE +U+134D:f +U+134E:fo +U+134F:fWa +U+1350:pe +U+1351:pu +U+1352:pi +U+1353:pa +U+1354:pE +U+1355:p +U+1356:po +U+1357:pWa +U+1358:mYa +U+1359:rYa +U+135A:fYa +# ETHIOPIC SPACE U+1360 mapped to ASCII space above +U+1361:: +U+1362::: +U+1363:, +U+1364:; +U+1365:-: +U+1366::- +U+1367:`? +U+1368::|: +U+1369:`1 +U+136A:`2 +U+136B:`3 +U+136C:`4 +U+136D:`5 +U+136E:`6 +U+136F:`7 +U+1370:`8 +U+1371:`9 +U+1372:`10 +U+1373:`20 +U+1374:`30 +U+1375:`40 +U+1376:`50 +U+1377:`60 +U+1378:`70 +U+1379:`80 +U+137A:`90 +U+137B:`100 +U+137C:`10000 + + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks diff --git a/src/chrtrans/iso02_uni.tbl b/src/chrtrans/iso02_uni.tbl new file mode 100644 index 00000000..dec4d843 --- /dev/null +++ b/src/chrtrans/iso02_uni.tbl @@ -0,0 +1,155 @@ +# +# Unicode mapping table for ISO 8859-2 fonts iso02.* +# [use: unicode_start iso02.f16 iso02] +# +0x20-0x7e idem +0x7f U+2302 + +#The MIME name of this charset. +Miso-8859-2 + +#Name as a Display Charset (used on Options screen) +OISO Latin 2 + +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0104 +0xa2 U+02d8 +0xa3 U+0141 +0xa4 U+00a4 +0xa5 U+013d +0xa6 U+015a +0xa7 U+00a7 +0xa8 U+00a8 +0xa9 U+0160 +0xaa U+015e +0xab U+0164 +0xac U+0179 +0xad U+00ad +0xae U+017d +0xaf U+017b +0xb0 U+00b0 +0xb1 U+0105 +0xb2 U+02db +0xb3 U+0142 +0xb4 U+00b4 +0xb5 U+013e +0xb6 U+015b +0xb7 U+02c7 +0xb8 U+00b8 +0xb9 U+0161 +0xba U+015f +0xbb U+0165 +0xbc U+017a +0xbd U+02dd +0xbe U+017e +0xbf U+017c +0xc0 U+0154 +0xc1 U+00c1 +0xc2 U+00c2 +0xc3 U+0102 +0xc4 U+00c4 +0xc5 U+0139 +0xc6 U+0106 +0xc7 U+00c7 +0xc8 U+010c +0xc9 U+00c9 +0xca U+0118 +0xcb U+00cb +0xcc U+011a +0xcd U+00cd +0xce U+00ce +0xcf U+010e +0xd0 U+0110 U+00d0 +0xd1 U+0143 +0xd2 U+0147 +0xd3 U+00d3 +0xd4 U+00d4 +0xd5 U+0150 +0xd6 U+00d6 +0xd7 U+00d7 +0xd8 U+0158 +0xd9 U+016e +0xda U+00da +0xdb U+0170 +0xdc U+00dc +0xdd U+00dd +0xde U+0162 +0xdf U+00df +0xe0 U+0155 +0xe1 U+00e1 +0xe2 U+00e2 +0xe3 U+0103 +0xe4 U+00e4 +0xe5 U+013a +0xe6 U+0107 +0xe7 U+00e7 +0xe8 U+010d +0xe9 U+00e9 +0xea U+0119 +0xeb U+00eb +0xec U+011b +0xed U+00ed +0xee U+00ee +0xef U+010f +0xf0 U+0111 +0xf1 U+0144 +0xf2 U+0148 +0xf3 U+00f3 +0xf4 U+00f4 +0xf5 U+0151 +0xf6 U+00f6 +0xf7 U+00f7 +0xf8 U+0159 +0xf9 U+016f +0xfa U+00fa +0xfb U+0171 +0xfc U+00fc +0xfd U+00fd +0xfe U+0163 +0xff U+02d9 + + +# TRADE MARK SIGN: +U+2122:(TM) + +0x60 U+2018 # left single quotation mark +0x27 U+2019-U+201b # various single quotation marks +0x22 U+201c-U+201f # various double quotation marks diff --git a/src/chrtrans/iso03_uni.tbl b/src/chrtrans/iso03_uni.tbl new file mode 100644 index 00000000..875f4d41 --- /dev/null +++ b/src/chrtrans/iso03_uni.tbl @@ -0,0 +1,149 @@ +# +# Unicode mapping table for ISO 8859-3 fonts iso03.* +# [use: unicode_start iso03.f16 iso03] +# +#The MIME name of this charset. +Miso-8859-3 + +#Name as a Display Charset (used on Options screen) +OISO Latin 3 + +0x20-0x7e idem +0x7f U+2302 +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0126 +0xa2 U+02d8 +0xa3 U+00a3 +0xa4 U+00a4 +# 0xa5 unused +0xa6 U+0124 +0xa7 U+00a7 +0xa8 U+00a8 +0xa9 U+0130 +0xaa U+015e +0xab U+011e +0xac U+0134 +0xad U+00ad +# 0xae unused +0xaf U+017b +0xb0 U+00b0 +0xb1 U+0127 +0xb2 U+00b2 +0xb3 U+00b3 +0xb4 U+00b4 +0xb5 U+00b5 +0xb6 U+0125 +0xb7 U+00b7 +0xb8 U+00b8 +0xb9 U+0131 +0xba U+015f +0xbb U+011f +0xbc U+0135 +0xbd U+00bd +# 0xbe unused +0xbf U+017c +0xc0 U+00c0 +0xc1 U+00c1 +0xc2 U+00c2 +# 0xc3 unused +0xc4 U+00c4 +0xc5 U+010a +0xc6 U+0108 +0xc7 U+00c7 +0xc8 U+00c8 +0xc9 U+00c9 +0xca U+00ca +0xcb U+00cb +0xcc U+00cc +0xcd U+00cd +0xce U+00ce +0xcf U+00cf +# 0xd0 unused +0xd1 U+00d1 +0xd2 U+00d2 +0xd3 U+00d3 +0xd4 U+00d4 +0xd5 U+0120 +0xd6 U+00d6 +0xd7 U+00d7 +0xd8 U+011c +0xd9 U+00d9 +0xda U+00da +0xdb U+00db +0xdc U+00dc +0xdd U+016c +0xde U+015c +0xdf U+00df +0xe0 U+00e0 +0xe1 U+00e1 +0xe2 U+00e2 +# 0xe3 unused +0xe4 U+00e4 +0xe5 U+010b +0xe6 U+0109 +0xe7 U+00e7 +0xe8 U+00e8 +0xe9 U+00e9 +0xea U+00ea +0xeb U+00eb +0xec U+00ec +0xed U+00ed +0xee U+00ee +0xef U+00ef +# 0xf0 unused +0xf1 U+00f1 +0xf2 U+00f2 +0xf3 U+00f3 +0xf4 U+00f4 +0xf5 U+0121 +0xf6 U+00f6 +0xf7 U+00f7 +0xf8 U+011d +0xf9 U+00f9 +0xfa U+00fa +0xfb U+00fb +0xfc U+00fc +0xfd U+016d +0xfe U+015d +0xff U+02d9 + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso04_uni.tbl b/src/chrtrans/iso04_uni.tbl new file mode 100644 index 00000000..d0e6f8e2 --- /dev/null +++ b/src/chrtrans/iso04_uni.tbl @@ -0,0 +1,149 @@ +# +# Unicode mapping table for ISO 8859-4 fonts iso04.* +# [use: unicode_start iso04.f16 iso04] +# +#The MIME name of this charset. +Miso-8859-4 + +#Name as a Display Charset (used on Options screen) +OISO Latin 4 + +0x20-0x7e idem +0x7f U+2302 +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0104 +0xa2 U+0138 +0xa3 U+0156 +0xa4 U+00a4 +0xa5 U+0128 +0xa6 U+013b +0xa7 U+00a7 +0xa8 U+00a8 +0xa9 U+0160 +0xaa U+0112 +0xab U+0122 +0xac U+0166 +0xad U+00ad +0xae U+017d +0xaf U+00af +0xb0 U+00b0 +0xb1 U+0105 +0xb2 U+02db +0xb3 U+0157 +0xb4 U+00b4 +0xb5 U+0129 +0xb6 U+013c +0xb7 U+02c7 +0xb8 U+00b8 +0xb9 U+0161 +0xba U+0113 +0xbb U+0123 +0xbc U+0167 +0xbd U+014a +0xbe U+017e +0xbf U+014b +0xc0 U+0100 +0xc1 U+00c1 +0xc2 U+00c2 +0xc3 U+00c3 +0xc4 U+00c4 +0xc5 U+00c5 +0xc6 U+00c6 +0xc7 U+012e +0xc8 U+010c +0xc9 U+00c9 +0xca U+0118 +0xcb U+00cb +0xcc U+0116 +0xcd U+00cd +0xce U+00ce +0xcf U+012a +0xd0 U+0110 +0xd1 U+0145 +0xd2 U+014c +0xd3 U+0136 +0xd4 U+00d4 +0xd5 U+00d5 +0xd6 U+00d6 +0xd7 U+00d7 +0xd8 U+00d8 +0xd9 U+0172 +0xda U+00da +0xdb U+00db +0xdc U+00dc +0xdd U+0168 +0xde U+016a +0xdf U+00df +0xe0 U+0101 +0xe1 U+00e1 +0xe2 U+00e2 +0xe3 U+00e3 +0xe4 U+00e4 +0xe5 U+00e5 +0xe6 U+00e6 +0xe7 U+012f +0xe8 U+010d +0xe9 U+00e9 +0xea U+0119 +0xeb U+00eb +0xec U+0117 +0xed U+00ed +0xee U+00ee +0xef U+012b +0xf0 U+0111 +0xf1 U+0146 +0xf2 U+014d +0xf3 U+0137 +0xf4 U+00f4 +0xf5 U+00f5 +0xf6 U+00f6 +0xf7 U+00f7 +0xf8 U+00f8 +0xf9 U+0173 +0xfa U+00fa +0xfb U+00fb +0xfc U+00fc +0xfd U+0169 +0xfe U+016b +0xff U+02d9 + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso05_uni.tbl b/src/chrtrans/iso05_uni.tbl new file mode 100644 index 00000000..5179dc8d --- /dev/null +++ b/src/chrtrans/iso05_uni.tbl @@ -0,0 +1,149 @@ +# +# Unicode mapping table for ISO 8859-5 fonts iso05.* +# [use: unicode_start iso05.f16 iso05] +# +#The MIME name of this charset. +Miso-8859-5 + +#Name as a Display Charset (used on Options screen) +OISO 8859-5 Cyrillic + +0x20-0x7e idem +0x7f U+2302 +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0401 +0xa2 U+0402 +0xa3 U+0403 +0xa4 U+0404 +0xa5 U+0405 +0xa6 U+0406 +0xa7 U+0407 +0xa8 U+0408 +0xa9 U+0409 +0xaa U+040a +0xab U+040b +0xac U+040c +0xad U+00ad +0xae U+040e +0xaf U+040f +0xb0 U+0410 +0xb1 U+0411 +0xb2 U+0412 +0xb3 U+0413 +0xb4 U+0414 +0xb5 U+0415 +0xb6 U+0416 +0xb7 U+0417 +0xb8 U+0418 +0xb9 U+0419 +0xba U+041a +0xbb U+041b +0xbc U+041c +0xbd U+041d +0xbe U+041e +0xbf U+041f +0xc0 U+0420 +0xc1 U+0421 +0xc2 U+0422 +0xc3 U+0423 +0xc4 U+0424 +0xc5 U+0425 +0xc6 U+0426 +0xc7 U+0427 +0xc8 U+0428 +0xc9 U+0429 +0xca U+042a +0xcb U+042b +0xcc U+042c +0xcd U+042d +0xce U+042e +0xcf U+042f +0xd0 U+0430 +0xd1 U+0431 +0xd2 U+0432 +0xd3 U+0433 +0xd4 U+0434 +0xd5 U+0435 +0xd6 U+0436 +0xd7 U+0437 +0xd8 U+0438 +0xd9 U+0439 +0xda U+043a +0xdb U+043b +0xdc U+043c +0xdd U+043d +0xde U+043e +0xdf U+043f +0xe0 U+0440 +0xe1 U+0441 +0xe2 U+0442 +0xe3 U+0443 +0xe4 U+0444 +0xe5 U+0445 +0xe6 U+0446 +0xe7 U+0447 +0xe8 U+0448 +0xe9 U+0449 +0xea U+044a +0xeb U+044b +0xec U+044c +0xed U+044d +0xee U+044e +0xef U+044f +0xf0 U+2116 +0xf1 U+0451 +0xf2 U+0452 +0xf3 U+0453 +0xf4 U+0454 +0xf5 U+0455 +0xf6 U+0456 +0xf7 U+0457 +0xf8 U+0458 +0xf9 U+0459 +0xfa U+045a +0xfb U+045b +0xfc U+045c +0xfd U+00a7 +0xfe U+045e +0xff U+045f + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso06_uni.tbl b/src/chrtrans/iso06_uni.tbl new file mode 100644 index 00000000..61630521 --- /dev/null +++ b/src/chrtrans/iso06_uni.tbl @@ -0,0 +1,98 @@ +# +# Unicode mapping table for ISO 8859-6 fonts iso06.* +# [use: unicode_start iso06.f16 iso06] +# +0x20-0x7e idem +0x7f U+2302 +# +0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa4 U+00a4 +0xac U+060c +0xad U+00ad +0xbb U+061b +0xbf U+061f +0xc1 U+0621 +0xc2 U+0622 +0xc3 U+0623 +0xc4 U+0624 +0xc5 U+0625 +0xc6 U+0626 +0xc7 U+0627 +0xc8 U+0628 +0xc9 U+0629 +0xca U+062a +0xcb U+062b +0xcc U+062c +0xcd U+062d +0xce U+062e +0xcf U+062f +0xd0 U+0630 +0xd1 U+0631 +0xd2 U+0632 +0xd3 U+0633 +0xd4 U+0634 +0xd5 U+0635 +0xd6 U+0636 +0xd7 U+0637 +0xd8 U+0638 +0xd9 U+0639 +0xda U+063a +0xe0 U+0640 +0xe1 U+0641 +0xe2 U+0642 +0xe3 U+0643 +0xe4 U+0644 +0xe5 U+0645 +0xe6 U+0646 +0xe7 U+0647 +0xe8 U+0648 +0xe9 U+0649 +0xea U+064a +0xeb U+064b +0xec U+064c +0xed U+064d +0xee U+064e +0xef U+064f +0xf0 U+0650 +0xf1 U+0651 +0xf2 U+0652 + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso07_uni.tbl b/src/chrtrans/iso07_uni.tbl new file mode 100644 index 00000000..4698888a --- /dev/null +++ b/src/chrtrans/iso07_uni.tbl @@ -0,0 +1,143 @@ +# +# Unicode mapping table for ISO 8859-7 fonts iso07.* +# [use: unicode_start iso07.f16 iso07] +# +#The MIME name of this charset. +Miso-8859-7 + +#Name as a Display Charset (used on Options screen) +OISO 8859-7 Greek + +0x20-0x7e idem +0x7f U+2302 +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0371 +0xa2 U+0372 +0xa3 U+00a3 +0xa6 U+00a6 +0xa7 U+00a7 +0xa8 U+00a8 +0xa9 U+00a9 +0xab U+00ab +0xac U+00ac +0xad U+00ad +0xaf U+2015 +0xb0 U+00b0 +0xb1 U+00b1 +0xb2 U+00b2 +0xb3 U+00b3 +0xb4 U+03f3 +0xb5 U+03f4 +0xb6 U+0386 +0xb7 U+00b7 +0xb8 U+0388 +0xb9 U+0389 +0xba U+038a +0xbb U+00bb +0xbc U+038c +0xbd U+00bd +0xbe U+038e +0xbf U+038f +0xc0 U+0390 +0xc1 U+0391 +0xc2 U+0392 +0xc3 U+0393 +0xc4 U+0394 +0xc5 U+0395 +0xc6 U+0396 +0xc7 U+0397 +0xc8 U+0398 +0xc9 U+0399 +0xca U+039a +0xcb U+039b +0xcc U+039c +0xcd U+039d +0xce U+039e +0xcf U+039f +0xd0 U+03a0 +0xd1 U+03a1 +0xd3 U+03a3 +0xd4 U+03a4 +0xd5 U+03a5 +0xd6 U+03a6 +0xd7 U+03a7 +0xd8 U+03a8 +0xd9 U+03a9 +0xda U+03aa +0xdb U+03ab +0xdc U+03ac +0xdd U+03ad +0xde U+03ae +0xdf U+03af +0xe0 U+03b0 +0xe1 U+03b1 +0xe2 U+03b2 +0xe3 U+03b3 +0xe4 U+03b4 +0xe5 U+03b5 +0xe6 U+03b6 +0xe7 U+03b7 +0xe8 U+03b8 +0xe9 U+03b9 +0xea U+03ba +0xeb U+03bb +0xec U+03bc +0xed U+03bd +0xee U+03be +0xef U+03bf +0xf0 U+03c0 +0xf1 U+03c1 +0xf2 U+03c2 +0xf3 U+03c3 +0xf4 U+03c4 +0xf5 U+03c5 +0xf6 U+03c6 +0xf7 U+03c7 +0xf8 U+03c8 +0xf9 U+03c9 +0xfa U+03ca +0xfb U+03cb +0xfc U+03cc +0xfd U+03cd +0xfe U+03ce + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso08_uni.tbl b/src/chrtrans/iso08_uni.tbl new file mode 100644 index 00000000..20ae4ac7 --- /dev/null +++ b/src/chrtrans/iso08_uni.tbl @@ -0,0 +1,84 @@ +# +# Unicode mapping table for ISO 8859-8 fonts iso08.* +# [use: unicode_start iso08.f16 iso08] +# +0x20-0x7e idem +0x7f U+2302 +# +0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa2-0xa9 idem +0xaa U+00d7 +0xab-0xae idem +0xaf U+203e +0xb0-0xb9 idem +0xba U+00f7 +0xbb-0xbe idem +0xbf U+051f +0xdf U+2017 +0xe0 U+05d0 +0xe1 U+05d1 +0xe2 U+05d2 +0xe3 U+05d3 +0xe4 U+05d4 +0xe5 U+05d5 +0xe6 U+05d6 +0xe7 U+05d7 +0xe8 U+05d8 +0xe9 U+05d9 +0xea U+05da +0xeb U+05db +0xec U+05dc +0xed U+05dd +0xee U+05de +0xef U+05df +0xf0 U+05e0 +0xf1 U+05e1 +0xf2 U+05e2 +0xf3 U+05e3 +0xf4 U+05e4 +0xf5 U+05e5 +0xf6 U+05e6 +0xf7 U+05e7 +0xf8 U+05e8 +0xf9 U+05e9 +0xfa U+05ea + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso09_uni.tbl b/src/chrtrans/iso09_uni.tbl new file mode 100644 index 00000000..224cc26c --- /dev/null +++ b/src/chrtrans/iso09_uni.tbl @@ -0,0 +1,63 @@ +# +# Unicode mapping table for ISO 8859-9 fonts iso09.* +# [use: unicode_start iso09.f16 iso09] +# +#The MIME name of this charset. +Miso-8859-9 + +#Name as a Display Charset (used on Options screen) +OISO 8859-9 (Latin 5) + +0x20-0x7e idem +0x7f U+2302 +0xa0-0xcf idem +0xd0 U+011e +0xd1-0xdc idem +0xdd U+0130 +0xde U+015e +0xdf-0xef idem +0xf0 U+011f +0xf1-0xfc idem +0xfd U+0131 +0xfe U+015f +0xff U+00ff +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/iso10_uni.tbl b/src/chrtrans/iso10_uni.tbl new file mode 100644 index 00000000..f1123e3d --- /dev/null +++ b/src/chrtrans/iso10_uni.tbl @@ -0,0 +1,123 @@ +# +# Unicode mapping table for the fonts iso10.* +# [use: unicode_start iso10.f16 iso10] +# +#This is not default font! +D0 + +#The MIME name of this charset. + +Miso-8859-10 + +#Name as a Display Charset (used on Options screen) +OISO 8859-10 + +0x20-0x7e idem +0x7f U+2302 +# +#0x00 U+fffd +0x01 U+263A +0x02 U+263B +0x03 U+2665 +0x04 U+2666 +0x05 U+2663 +0x06 U+2660 +0x07 U+2022 +0x08 U+25D8 +0x09 U+25CB +0x0A U+25D9 +0x0B U+2642 +0x0C U+2640 +0x0D U+266A +0x0E U+266B +0x0E U+266C +0x0F U+263C +0x10 U+25B6 +0x10 U+25BA +0x11 U+25C0 +0x11 U+25C4 +0x12 U+2195 +0x13 U+203C +0x14 U+00B6 +0x15 U+00A7 +0x16 U+25AC +0x17 U+21A8 +0x18 U+2191 +0x19 U+2193 +0x1A U+2192 +0x1B U+2190 +0x1C U+221F +0x1C U+2319 +0x1D U+2194 +0x1E U+25B2 +0x1F U+25BC +# +0xa0 U+00a0 +0xa1 U+0104 +0xa2 U+0112 +0xa3 U+0122 +0xa4 U+012a +0xa5 U+0128 +0xa6 U+0136 +0xa7 U+013b +0xa8 U+0143 +0xa9 U+0156 +0xaa U+0160 +0xab U+0166 +0xac U+017d +0xad U+00ad +0xae U+0138 +0xaf U+014a +0xb0 U+0111 +0xb1 U+0105 +0xb2 U+0113 +0xb3 U+0123 +0xb4 U+012b +0xb5 U+0129 +0xb6 U+0137 +0xb7 U+013c +0xb8 U+0144 +0xb9 U+0157 +0xba U+0161 +0xbb U+0167 +0xbc U+017e +0xbd U+2015 # HORIZONTAL BAR +0xbe U+00df +0xbf U+014b +0xc0 U+0100 +0xc1-0xc6 idem +0xc7 U+012e +0xc8 U+010c +0xc9 U+00c9 +0xca U+0118 +0xcb U+00cb +0xcc U+0116 +0xcd-0xd0 idem +0xd1 U+0145 +0xd2 U+014c +0xd3-0xd6 idem +0xd7 U+0168 +0xd8 U+00d8 +0xd9 U+0172 +0xda-0xde idem +0xdf U+016a +0xe0 U+0101 +0xe1-0xe6 idem +0xe7 U+012f +0xe8 U+010d +0xe9 U+00e9 +0xea U+0119 +0xeb U+00eb +0xec U+0117 +0xed-0xf0 idem +0xf1 U+0146 +0xf2 U+014d +0xf3-0xf6 idem +0xf7 U+0169 +0xf8 U+00f8 +0xf9 U+0173 +0xfa-0xfe idem +0xff U+016b + +# TRADE MARK SIGN: +U+2122:(TM) diff --git a/src/chrtrans/koi8r_uni.tbl b/src/chrtrans/koi8r_uni.tbl new file mode 100644 index 00000000..99b5e28d --- /dev/null +++ b/src/chrtrans/koi8r_uni.tbl @@ -0,0 +1,139 @@ + + +# Options screen name for this character set +O KOI8-R character set + +# MIME name for this charset +M koi8-r + +# Based on a table received from "Glenn E. Thobe" <thobe@lafn.org> +#hex unicode # description +#--- U+---- # --------------- +0x80 U+2500 # FORMS LIGHT HORIZONTAL +0x81 U+2502 # FORMS LIGHT VERTICAL +0x82 U+250C # FORMS LIGHT DOWN AND RIGHT +0x83 U+2510 # FORMS LIGHT DOWN AND LEFT +0x84 U+2514 # FORMS LIGHT UP AND RIGHT +0x85 U+2518 # FORMS LIGHT UP AND LEFT +0x86 U+251C # FORMS LIGHT VERTICAL AND RIGHT +0x87 U+2524 # FORMS LIGHT VERTICAL AND LEFT +0x88 U+252C # FORMS LIGHT DOWN AND HORIZONTAL +0x89 U+2534 # FORMS LIGHT UP AND HORIZONTAL +0x8A U+253C # FORMS LIGHT VERTICAL AND HORIZONTAL +0x8B U+2580 # UPPER HALF BLOCK +0x8C U+2584 # LOWER HALF BLOCK +0x8D U+2588 # FULL BLOCK +0x8E U+258C # LEFT HALF BLOCK +0x8F U+2590 # RIGHT HALF BLOCK +0x90 U+2591 # LIGHT SHADE +0x91 U+2592 # MEDIUM SHADE +0x92 U+2593 # DARK SHADE +0x93 U+2320 # TOP HALF INTEGRAL +0x94 U+25A0 # BLACK SMALL SQUARE +0x95 U+2219 # BULLET OPERATOR +0x96 U+221A # SQUARE ROOT +0x97 U+2248 # ALMOST EQUAL TO +0x98 U+2264 # LESS THAN OR EQUAL TO +0x99 U+2265 # GREATER THAN OR EQUAL TO +0x9A U+00A0 # NON-BREAKING SPACE +0x9B U+2321 # BOTTOM HALF INTEGRAL +0x9C U+00B0 # DEGREE SIGN +0x9D U+00B2 # SUPERSCRIPT DIGIT TWO +0x9E U+00B7 # MIDDLE DOT +0x9F U+00F7 # DIVISION SIGN +0xA0 U+2550 # FORMS DOUBLE HORIZONTAL +0xA1 U+2551 # FORMS DOUBLE VERTICAL +0xA2 U+2552 # FORMS DOWN SINGLE AND RIGHT DOUBLE +0xA3 U+0451 # SMA IO +0xA4 U+2553 # FORMS DOWN DOUBLE AND RIGHT SINGLE +0xA5 U+2554 # FORMS DOUBLE DOWN AND RIGHT +0xA6 U+2555 # FORMS DOWN SINGLE AND LEFT DOUBLE +0xA7 U+2556 # FORMS DOWN DOUBLE AND LEFT SINGLE +0xA8 U+2557 # FORMS DOUBLE DOWN AND LEFT +0xA9 U+2558 # FORMS UP SINGLE AND RIGHT DOUBLE +0xAA U+2559 # FORMS UP DOUBLE AND RIGHT SINGLE +0xAB U+255A # FORMS DOUBLE UP AND RIGHT +0xAC U+255B # FORMS UP SINGLE AND LEFT DOUBLE +0xAD U+255C # FORMS UP DOUBLE AND LEFT SINGLE +0xAE U+255D # FORMS DOUBLE UP AND LEFT +0xAF U+255E # FORMS VERTICAL SINGLE AND RIGHT DOUBLE +0xB0 U+255F # FORMS VERTICAL DOUBLE AND RIGHT SINGLE +0xB1 U+2560 # FORMS DOUBLE VERTICAL AND RIGHT +0xB2 U+2561 # FORMS VERTICAL SINGLE AND LEFT DOUBLE +0xB3 U+0401 # CAP IO +0xB4 U+2562 # FORMS VERTICAL DOUBLE AND LEFT SINGLE +0xB5 U+2563 # FORMS DOUBLE VERTICAL AND LEFT +0xB6 U+2564 # FORMS DOWN SINGLE AND HORIZONTAL DOUBLE +0xB7 U+2565 # FORMS DOWN DOUBLE AND HORIZONTAL SINGLE +0xB8 U+2566 # FORMS DOUBLE DOWN AND HORIZONTAL +0xB9 U+2567 # FORMS UP SINGLE AND HORIZONTAL DOUBLE +0xBA U+2568 # FORMS UP DOUBLE AND HORIZONTAL SINGLE +0xBB U+2569 # FORMS DOUBLE UP AND HORIZONTAL +0xBC U+256A # FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE +0xBD U+256B # FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE +0xBE U+256C # FORMS DOUBLE VERTICAL AND HORIZONTAL +0xBF U+00A9 # COPYRIGHT SIGN +0xC0 U+044E # SMA IU +0xC1 U+0430 # SMA A +0xC2 U+0431 # SMA BE +0xC3 U+0446 # SMA TSE +0xC4 U+0434 # SMA DE +0xC5 U+0435 # SMA IE +0xC6 U+0444 # SMA EF +0xC7 U+0433 # SMA GE +0xC8 U+0445 # SMA KHA +0xC9 U+0438 # SMA II +0xCA U+0439 # SMA SHORT II +0xCB U+043A # SMA KA +0xCC U+043B # SMA EL +0xCD U+043C # SMA EM +0xCE U+043D # SMA EN +0xCF U+043E # SMA O +0xD0 U+043F # SMA PE +0xD1 U+044F # SMA IA +0xD2 U+0440 # SMA ER +0xD3 U+0441 # SMA ES +0xD4 U+0442 # SMA TE +0xD5 U+0443 # SMA U +0xD6 U+0436 # SMA ZHE +0xD7 U+0432 # SMA VE +0xD8 U+044C # SMA SOFT SIGN +0xD9 U+044B # SMA YERI +0xDA U+0437 # SMA ZE +0xDB U+0448 # SMA SHA +0xDC U+044D # SMA REVERSED E +0xDD U+0449 # SMA SHCHA +0xDE U+0447 # SMA CHE +0xDF U+044A # SMA HARD SIGN +0xE0 U+042E # CAP IU +0xE1 U+0410 # CAP A +0xE2 U+0411 # CAP BE +0xE3 U+0426 # CAP TSE +0xE4 U+0414 # CAP DE +0xE5 U+0415 # CAP IE +0xE6 U+0424 # CAP EF +0xE7 U+0413 # CAP GE +0xE8 U+0425 # CAP KHA +0xE9 U+0418 # CAP II +0xEA U+0419 # CAP SHORT II +0xEB U+041A # CAP KA +0xEC U+041B # CAP EL +0xED U+041C # CAP EM +0xEE U+041D # CAP EN +0xEF U+041E # CAP O +0xF0 U+041F # CAP PE +0xF1 U+042F # CAP IA +0xF2 U+0420 # CAP ER +0xF3 U+0421 # CAP ES +0xF4 U+0422 # CAP TE +0xF5 U+0423 # CAP U +0xF6 U+0416 # CAP ZHE +0xF7 U+0412 # CAP VE +0xF8 U+042C # CAP SOFT SIGN +0xF9 U+042B # CAP YERI +0xFA U+0417 # CAP ZE +0xFB U+0428 # CAP SHA +0xFC U+042D # CAP REVERSED E +0xFD U+0429 # CAP SHCHA +0xFE U+0427 # CAP CHE +0xFF U+042A # CAP HARD SIGN diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in new file mode 100644 index 00000000..8d5da41f --- /dev/null +++ b/src/chrtrans/makefile.in @@ -0,0 +1,100 @@ +# +# Makefile for the makeuctb and unicode tables. +# +# This may not yet work for the general case. +# Only some dependencies included. +# +# +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +srcdir = @srcdir@ +VPATH = $(srcdir) + +WWWINC = WWW/Library/Implementation +SITE_DEFS = # FIXME: set in parent makefile +MCFLAGS = # FIXME: set in parent makefile + +CC = @CC@ +CPPOPTS = @DEFS@ @CPPFLAGS@ -I.. -I../.. -I../../$(WWWINC) $(MCFLAGS) +CFLAGS = $(CPPOPTS) @CFLAGS@ + +# +# This file contains the font map for the default (hardware) font +# + +FONTMAP_INC = iso01_uni.h# default, if not set by recursive call + +### #include $(TOPDIR)/Rules.make ??? + +### fastdep: $(FONTMAP_INC) + +### MCFLAGS=-g -DUNIX -DLINUX -DNO_KEYPAD -DNO_TTYTYPE -DEXP_CHARTRANS -I.. -I../../WWW/Library/Implementation -I../.. + +CHRTR= + +TABLES= $(CHRTR)iso02_uni.h \ + $(CHRTR)iso01_uni.h \ + $(CHRTR)def7_uni.h \ + $(CHRTR)iso03_uni.h \ + $(CHRTR)iso04_uni.h \ + $(CHRTR)iso05_uni.h \ + $(CHRTR)iso07_uni.h \ + $(CHRTR)iso09_uni.h \ + $(CHRTR)iso10_uni.h \ + $(CHRTR)koi8r_uni.h \ + $(CHRTR)cp437_uni.h \ + $(CHRTR)cp850_uni.h \ + $(CHRTR)cp852_uni.h \ + $(CHRTR)cp1250_uni.h \ + $(CHRTR)cp1252_uni.h \ + $(CHRTR)utf8_uni.h \ + $(CHRTR)rfc_suni.h \ + $(CHRTR)mnemonic_suni.h \ + $(CHRTR)mnem_suni.h + +default: $(FONTMAP_INC) + +tables: $(TABLES) + +makeuctb: makeuctb.c UCkd.h + $(CC) $(CFLAGS) -o makeuctb makeuctb.c + +.SUFFIXES : .tbl .i + +.c.o: +@SHOW_CC@ + @ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c + +.c.i: +@SHOW_CC@ + @ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@ + +.tbl.h: + ./makeuctb $*.tbl > $@ + +iso01_uni.h: iso01_uni.tbl makeuctb +iso02_uni.h: iso02_uni.tbl makeuctb +iso03_uni.h: iso03_uni.tbl makeuctb +iso04_uni.h: iso04_uni.tbl makeuctb +iso05_uni.h: iso05_uni.tbl makeuctb +iso07_uni.h: iso07_uni.tbl makeuctb +iso09_uni.h: iso09_uni.tbl makeuctb +iso10_uni.h: iso10_uni.tbl makeuctb +cp437_uni.h: cp437_uni.tbl makeuctb +cp850_uni.h: cp850_uni.tbl makeuctb +cp852_uni.h: cp852_uni.tbl makeuctb +cp1250_uni.h: cp1250_uni.tbl makeuctb +cp1252_uni.h: cp1252_uni.tbl makeuctb +utf8_uni.h: utf8_uni.tbl makeuctb +mnemonic_suni.h: mnemonic_suni.tbl makeuctb +mnem_suni.h: mnem_suni.tbl makeuctb +rfc_suni.h: rfc_suni.tbl makeuctb + +clean: + rm -f makeuctb *.o *uni.h + +distclean: clean + -rm -rf obsolete + rm -f core *.bak *.sav *~ *.h_old diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c new file mode 100644 index 00000000..aeb1a0e9 --- /dev/null +++ b/src/chrtrans/makeuctb.c @@ -0,0 +1,564 @@ +/* + * makeuctb.c, derived from conmakehash.c + * + * [ original comments: - kw ] + * Create arrays for initializing the kernel folded tables (using a hash + * table turned out to be to limiting...) Unfortunately we can't simply + * preinitialize the tables at compile time since kfree() cannot accept + * memory not allocated by kmalloc(), and doing our own memory management + * just for this seems like massive overkill. + * + * Copyright (C) 1995 H. Peter Anvin + * + * This program is a part of the Linux kernel, and may be freely + * copied under the terms of the GNU General Public License (GPL), + * version 2, or at your option any later version. + */ + +#ifdef NOTDEFINED +#include <stdio.h> +#include <stdlib.h> +#include <sysexits.h> +#include <string.h> +#include <ctype.h> +#else +#include "tcp.h" +#undef exit /* don't try to use LYexit() */ +#endif + +#ifndef TOLOWER +#define TOLOWER(c) (isupper((unsigned char)c) ? tolower((unsigned char)c) : (c)) +#endif /* ndef TOLOWER */ + +#include "UCkd.h" +#include "UCDefs.h" + +#define MAX_FONTLEN 256 + +/* We don't deal with UCS4 here... -kw */ +typedef u16 unicode; + +PRIVATE void usage ARGS1(char *, argv0) +{ + fprintf(stderr, "Usage: \n"); + fprintf(stderr, " %s chartable [charsetmimename] [charsetdisplayname]\n", argv0); + fprintf(stderr, "Utility to convert .tbl into .h files for Lynx compilation.\n"); + exit(EX_USAGE); +} + +PRIVATE int getunicode ARGS1(char **, p0) +{ + char *p = *p0; + + while (*p == ' ' || *p == '\t') + p++; + if (*p == '-') + return -2; + else if (*p != 'U' || p[1] != '+' || + !isxdigit(p[2]) || !isxdigit(p[3]) || !isxdigit(p[4]) || + !isxdigit(p[5]) || isxdigit(p[6])) + return -1; + *p0 = p+6; + return strtol(p+2,0,16); +} + +unicode unitable[MAX_FONTLEN][255]; + /* Massive overkill, but who cares? */ +int unicount[MAX_FONTLEN]; + +struct unimapdesc_str themap_str = {0, NULL}; + +char *tblname; + +PRIVATE void addpair_str ARGS2(char *, str, int, un) +{ + int i; + + + if ( un <= 0xfffe ) + { + /* Initialize the map for replacement strings */ + + if (!themap_str.entry_ct) { + themap_str.entries = + (struct unipair_str *) malloc (2000 * sizeof (struct unipair_str)); + if (! themap_str.entries) + { + fprintf(stderr, + "%s: Out of memory\n", tblname); + exit(EX_DATAERR); + } + } + + /* Check it isn't a duplicate */ + + else for ( i = 0 ; i < themap_str.entry_ct ; i++ ) + if ( themap_str.entries[i].unicode == un ) { + themap_str.entries[i].replace_str = str; + return; + } + + /* Add to list */ + + if ( themap_str.entry_ct > 1999 ) + { + fprintf(stderr, "ERROR: Only 2000 unicode replacement strings permitted!\n"); + exit(EX_DATAERR); + } + + themap_str.entries[themap_str.entry_ct].unicode = un; + themap_str.entries[themap_str.entry_ct].replace_str = str; + themap_str.entry_ct++; + } + + /* otherwise: ignore */ +} + +PRIVATE void addpair ARGS2(int, fp, int, un) +{ + int i; + + if ( un <= 0xfffe ) + { + /* Check it isn't a duplicate */ + + for ( i = 0 ; i < unicount[fp] ; i++ ) + if ( unitable[fp][i] == un ) + return; + + /* Add to list */ + + if ( unicount[fp] > 254 ) + { + fprintf(stderr, "ERROR: Only 255 unicodes/glyph permitted!\n"); + exit(EX_DATAERR); + } + + unitable[fp][unicount[fp]] = un; + unicount[fp]++; + } + + /* otherwise: ignore */ +} + +char this_MIMEcharset[UC_MAXLEN_MIMECSNAME +1]; +char this_LYNXcharset[UC_MAXLEN_LYNXCSNAME +1]; +char id_append[UC_MAXLEN_ID_APPEND +1] = "_"; +int this_isDefaultMap = -1; +int RawUni = 0; +int lowest_eight = 999; + +int main ARGS2(int, argc, char **, argv) +{ + FILE *ctbl; + char buffer[65536]; + int fontlen; + int i, nuni, nent; + int fp0, fp1, un0, un1; + char *p, *p1; + char *tbuf, ch; + + if ( argc < 2 || argc > 4 ) + usage(argv[0]); + + if ( !strcmp(argv[1],"-") ) + { + ctbl = stdin; + tblname = "stdin"; + } + else + { + ctbl = fopen(tblname = argv[1], "r"); + if ( !ctbl ) + { + perror(tblname); + exit(EX_NOINPUT); + } + } + + /* For now we assume the default font is always 256 characters. */ + fontlen = 256; + + /* Initialize table */ + + for ( i = 0 ; i < fontlen ; i++ ) + unicount[i] = 0; + + /* Now we come to the tricky part. Parse the input table. */ + + while ( fgets(buffer, sizeof(buffer), ctbl) != NULL ) + { + if ( (p = strchr(buffer, '\n')) != NULL ) + *p = '\0'; + else + fprintf(stderr, "%s: Warning: line too long\n", tblname); + + p = buffer; + +/* + * Syntax accepted: + * <fontpos> <unicode> <unicode> ... + * <fontpos> <unicode range> <unicode range> ... + * <fontpos> idem + * <range> idem + * <range> <unicode range> + * <unicode> :<replace> + * <unicode range> :<replace> + * + * where <range> ::= <fontpos>-<fontpos> + * and <unicode> ::= U+<h><h><h><h> + * and <h> ::= <hexadecimal digit> + * and <replace> any string not containing '\n' or '\0' + */ + + while (*p == ' ' || *p == '\t') + p++; + if (!*p || *p == '#') + continue; /* skip comment or blank line */ + + switch (*p) { + case 'R': /* Raw Unicode? I.e. needs some special + processing. One digit code. */ + p++; + while (*p == ' ' || *p == '\t') + p++; + RawUni = strtol(p,0,10); + continue; + + case 'D': /* Is this the default display font? */ + p++; + while (*p == ' ' || *p == '\t') + p++; + this_isDefaultMap = (*p == '1'); + continue; + case 'M': + p++; + while (*p == ' ' || *p == '\t') + p++; + sscanf(p,"%40s",this_MIMEcharset); + continue; + case 'O': /* Display charset name for options screen */ + p++; + while (*p == ' ' || *p == '\t') + p++; + for (i=0; *p && i<UC_MAXLEN_LYNXCSNAME; p++,i++) + this_LYNXcharset[i] = *p; + this_LYNXcharset[i] = '\0'; + continue; + } + + if(*p == 'U') + { + un0 = getunicode(&p); + if (un0 < 0) + { + fprintf(stderr, "Bad input line: %s\n", buffer); + exit(EX_DATAERR); + fprintf(stderr, + "%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n", + tblname, fp0, fp1); + exit(EX_DATAERR); + } + un1 = un0; + while (*p == ' ' || *p == '\t') + p++; + if (*p == '-') + { + p++; + while (*p == ' ' || *p == '\t') + p++; + un1 = getunicode(&p); + if (un1 < 0 || un1 < un0) + { + fprintf(stderr, + "%s: Bad Unicode range U+%x-U+%x\n", + tblname, un0, un1); + fprintf(stderr, "Bad input line: %s\n", buffer); + exit(EX_DATAERR); + } + while (*p == ' ' || *p == '\t') + p++; + } + if (*p != ':') + { + fprintf(stderr, "No ':' where expected: %s\n", buffer); + continue; + } + + tbuf = (char *) malloc (4*strlen(++p) + 1); + if (!(p1 = tbuf)) + { + fprintf(stderr, + "%s: Out of memory\n", tblname); + exit(EX_DATAERR); + } + for(ch = *p; (ch = *p) != '\0'; p++,p1++) + { + if ((unsigned char)ch < 32 || ch == '\\' || ch == '\"' || + (unsigned char)ch >= 127) + { + sprintf(p1,"\\%.3o",(unsigned char)ch); +/* fprintf(stderr,"%s\n",tbuf); */ + p1 += 3; + } + else + *p1 = ch; + } + *p1 = '\0'; + for(i=un0; i<=un1; i++) +/* printf("U+0x%x:%s\n",i,tbuf); */ + addpair_str(tbuf,i); + continue; + } + + fp0 = strtol(p, &p1, 0); + if (p1 == p) + { + fprintf(stderr, "Bad input line: %s\n", buffer); + exit(EX_DATAERR); + } + p = p1; + + while (*p == ' ' || *p == '\t') + p++; + if (*p == '-') + { + p++; + fp1 = strtol(p, &p1, 0); + if (p1 == p) + { + fprintf(stderr, "Bad input line: %s\n", buffer); + exit(EX_DATAERR); + } + p = p1; + } + else + fp1 = 0; + + if ( fp0 < 0 || fp0 >= fontlen ) + { + fprintf(stderr, + "%s: Glyph number (0x%x) larger than font length\n", + tblname, fp0); + exit(EX_DATAERR); + } + if ( fp1 && (fp1 < fp0 || fp1 >= fontlen) ) + { + fprintf(stderr, + "%s: Bad end of range (0x%x)\n", + tblname, fp1); + exit(EX_DATAERR); + } + + if (fp1) + { + /* we have a range; expect the word "idem" or a Unicode range of the + same length */ + while (*p == ' ' || *p == '\t') + p++; + if (!strncmp(p, "idem", 4)) + { + for (i=fp0; i<=fp1; i++) + addpair(i,i); + p += 4; + } + else + { + un0 = getunicode(&p); + while (*p == ' ' || *p == '\t') + p++; + if (*p != '-') + { + fprintf(stderr, +"%s: Corresponding to a range of font positions, there should be a Unicode range\n", + tblname); + exit(EX_DATAERR); + } + p++; + un1 = getunicode(&p); + if (un0 < 0 || un1 < 0) + { + fprintf(stderr, +"%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n", + tblname, fp0, fp1); + exit(EX_DATAERR); + } + if (un1 - un0 != fp1 - fp0) + { + fprintf(stderr, +"%s: Unicode range U+%x-U+%x not of the same length as font position range 0x%x-0x%x\n", + tblname, un0, un1, fp0, fp1); + exit(EX_DATAERR); + } + for(i=fp0; i<=fp1; i++) + addpair(i,un0-fp0+i); + } + } + else + { + /* no range; expect a list of unicode values or unicode ranges + for a single font position, or the word "idem" */ + + while (*p == ' ' || *p == '\t') + p++; + if (!strncmp(p, "idem", 4)) + { + addpair(fp0,fp0); + p += 4; + } + while ( (un0 = getunicode(&p)) >= 0 ) { + addpair(fp0, un0); + while (*p == ' ' || *p == '\t') + p++; + if (*p == '-') { + p++; + un1 = getunicode(&p); + if (un1 < un0) + { + fprintf(stderr, + "%s: Bad Unicode range 0x%x-0x%x\n", + tblname, un0, un1); + exit(EX_DATAERR); + } + for(un0++; un0 <= un1; un0++) + addpair(fp0, un0); + } + } + } + while (*p == ' ' || *p == '\t') + p++; + if (*p && *p != '#') + fprintf(stderr, "%s: trailing junk (%s) ignored\n", tblname, p); + } + + /* Okay, we hit EOF, now output hash table */ + + fclose(ctbl); + + + /* Compute total size of Unicode list */ + nuni = 0; + for ( i = 0 ; i < fontlen ; i++ ) + nuni += unicount[i]; + + if (argc >=3 ) + strncpy(this_MIMEcharset,argv[2],UC_MAXLEN_MIMECSNAME); + else if (!this_MIMEcharset || ! *this_MIMEcharset) { + strncpy(this_MIMEcharset,tblname,UC_MAXLEN_MIMECSNAME); + if ((p = strchr(this_MIMEcharset,'.')) != 0) + *p = '\0'; + } + for (p=this_MIMEcharset; *p; p++) + *p = TOLOWER(*p); + if (argc >=4 ) + strncpy(this_LYNXcharset,argv[3],UC_MAXLEN_LYNXCSNAME); + else if (!this_LYNXcharset || ! *this_LYNXcharset) { + strncpy(this_LYNXcharset,this_MIMEcharset,UC_MAXLEN_LYNXCSNAME); + } + if ((i=strlen(this_LYNXcharset)) < UC_LEN_LYNXCSNAME) { + for (;i<UC_LEN_LYNXCSNAME;i++) + this_LYNXcharset[i] = ' '; + this_LYNXcharset[i] = '\0'; + } +/* + fprintf(stderr,"this_MIMEcharset: %s.\n",this_MIMEcharset); + fprintf(stderr,"this_LYNXcharset: %s.\n",this_LYNXcharset); +*/ + if (this_isDefaultMap == -1) + this_isDefaultMap = !strncmp(this_MIMEcharset,"iso-8859-1",10); + fprintf(stderr,"makeuctb: %s: %stranslation map", + this_MIMEcharset, (this_isDefaultMap ? "default " : "")); + if (this_isDefaultMap == 1) + *id_append = '\0'; + else + for (i=0,p=this_MIMEcharset; *p && (i < UC_MAXLEN_ID_APPEND-1); p++,i++) + id_append[i+1] = isalnum(*p) ? *p : '_'; + id_append[i+1] = '\0'; + fprintf(stderr," (%s).\n", id_append); + + + printf("\ +/*\n\ + * uni_hash.tbl\n\ + *\n\ + * Do not edit this file; it was automatically generated by\n\ + *\n\ + * %s %s\n\ + *\n\ + */\n\ +\n\ +static u8 dfont_unicount%s[%d] = \n\ +{\n\t", argv[0], argv[1], id_append, fontlen); + + for ( i = 0 ; i < fontlen ; i++ ) + { + if (i >= 128 && unicount[i] > 0 && i < lowest_eight) + lowest_eight = i; + printf("%3d", unicount[i]); + if ( i == fontlen-1 ) + printf("\n};\n"); + else if ( i % 8 == 7 ) + printf(",\n\t"); + else + printf(", "); + } + + if (nuni) + printf("\nstatic u16 dfont_unitable%s[%d] = \n{\n\t", id_append, nuni); + else + printf("\nstatic u16 dfont_unitable%s[1]; /* dummy */\n", id_append); + + fp0 = 0; + nent = 0; + for ( i = 0 ; i < nuni ; i++ ) + { + while ( nent >= unicount[fp0] ) + { + fp0++; + nent = 0; + } + printf("0x%04x", unitable[fp0][nent++]); + if ( i == nuni-1 ) + printf("\n};\n"); + else if ( i % 8 == 7 ) + printf(",\n\t"); + else + printf(", "); + } + + if (themap_str.entry_ct) + printf("\n\ +static struct unipair_str repl_map%s[%d] = \n\ +{\n\t", id_append, themap_str.entry_ct); + else +printf("\n\ +/* static struct unipair_str repl_map%s[]; */\n", id_append); + + for ( i = 0 ; i < themap_str.entry_ct ; i++ ) + { + printf("{0x%x,\"%s\"}", themap_str.entries[i].unicode, + themap_str.entries[i].replace_str); + if ( i == themap_str.entry_ct-1 ) + printf("\n};\n"); + else if ( i % 4 == 3 ) + printf(",\n\t"); + else + printf(", "); + } + if (themap_str.entry_ct) + printf("\n\ +static struct unimapdesc_str dfont_replacedesc%s = {%d,repl_map%s};\n", +id_append, themap_str.entry_ct, id_append); + else + printf("\n\ +static struct unimapdesc_str dfont_replacedesc%s = {0,NULL};\n",id_append); + + printf("#define UC_CHARSET_SETUP%s UC_Charset_Setup(\ +\"%s\",\\\n\"%s\",\\\n\ +dfont_unicount%s,dfont_unitable%s,%i,\\\n\ +dfont_replacedesc%s,%i,%i)\n", +id_append, this_MIMEcharset, this_LYNXcharset, +id_append, id_append, nuni, id_append, lowest_eight, RawUni); + + exit(EX_OK); +} diff --git a/src/chrtrans/mnem_suni.tbl b/src/chrtrans/mnem_suni.tbl new file mode 100644 index 00000000..43c4f707 --- /dev/null +++ b/src/chrtrans/mnem_suni.tbl @@ -0,0 +1,1899 @@ +#The MIME name of this charset. +Mmnem + +#Name as a Display Charset (used on Options screen) +ORFC1345 Mnem + +# U+0020: SP +U+0021:! +U+0022:" +U+0023: Nb +U+0024: DO +U+0025:% +U+0026:&& +U+0027:' +U+0028:( +U+0029:) +U+002a:* +U+002b:+ +U+002c:, +U+002d:- +U+002e:. +U+002f:/ +U+0030:0 +U+0031:1 +U+0032:2 +U+0033:3 +U+0034:4 +U+0035:5 +U+0036:6 +U+0037:7 +U+0038:8 +U+0039:9 +U+003a:: +U+003b:; +U+003c:< +U+003d:= +U+003e:> +U+003f:? +U+0040: At +U+0041:A +U+0042:B +U+0043:C +U+0044:D +U+0045:E +U+0046:F +U+0047:G +U+0048:H +U+0049:I +U+004a:J +U+004b:K +U+004c:L +U+004d:M +U+004e:N +U+004f:O +U+0050:P +U+0051:Q +U+0052:R +U+0053:S +U+0054:T +U+0055:U +U+0056:V +U+0057:W +U+0058:X +U+0059:Y +U+005a:Z +U+005b: <( +U+005c: // +U+005d: )> +U+005e: '> +U+005f:_ +U+0060: '! +U+0061:a +U+0062:b +U+0063:c +U+0064:d +U+0065:e +U+0066:f +U+0067:g +U+0068:h +U+0069:i +U+006a:j +U+006b:k +U+006c:l +U+006d:m +U+006e:n +U+006f:o +U+0070:p +U+0071:q +U+0072:r +U+0073:s +U+0074:t +U+0075:u +U+0076:v +U+0077:w +U+0078:x +U+0079:y +U+007a:z +U+007b: (! +U+007c: !! +U+007d: !) +U+007e: '? +U+00a0: NS +U+00a1: !I +U+00a2: Ct +U+00a3: Pd +U+00a4: Cu +U+00a5: Ye +U+00a6: BB +U+00a7: SE +U+00a8: ': +U+00a9: Co +U+00aa: -a +U+00ab: << +U+00ac: NO +U+00ad: -- +U+00ae: Rg +U+00af: 'm +U+00b0: DG +U+00b1: +- +U+00b2: 2S +U+00b3: 3S +U+00b4: '' +U+00b5: My +U+00b6: PI +U+00b7: .M +U+00b8: ', +U+00b9: 1S +U+00ba: -o +U+00bb: >> +U+00bc: 14 +U+00bd: 12 +U+00be: 34 +U+00bf: ?I +U+00c0: A! +U+00c1: A' +U+00c2: A> +U+00c3: A? +U+00c4: A: +U+00c5: AA +U+00c6: AE +U+00c7: C, +U+00c8: E! +U+00c9: E' +U+00ca: E> +U+00cb: E: +U+00cc: I! +U+00cd: I' +U+00ce: I> +U+00cf: I: +U+00d0: D- +U+00d1: N? +U+00d2: O! +U+00d3: O' +U+00d4: O> +U+00d5: O? +U+00d6: O: +U+00d7: *X +U+00d8: O/ +U+00d9: U! +U+00da: U' +U+00db: U> +U+00dc: U: +U+00dd: Y' +U+00de: TH +U+00df: ss +U+00e0: a! +U+00e1: a' +U+00e2: a> +U+00e3: a? +U+00e4: a: +U+00e5: aa +U+00e6: ae +U+00e7: c, +U+00e8: e! +U+00e9: e' +U+00ea: e> +U+00eb: e: +U+00ec: i! +U+00ed: i' +U+00ee: i> +U+00ef: i: +U+00f0: d- +U+00f1: n? +U+00f2: o! +U+00f3: o' +U+00f4: o> +U+00f5: o? +U+00f6: o: +U+00f7: -: +U+00f8: o/ +U+00f9: u! +U+00fa: u' +U+00fb: u> +U+00fc: u: +U+00fd: y' +U+00fe: th +U+00ff: y: +U+0100: A- +U+0101: a- +U+0102: A( +U+0103: a( +U+0104: A; +U+0105: a; +U+0106: C' +U+0107: c' +U+0108: C> +U+0109: c> +U+010a: C. +U+010b: c. +U+010c: C< +U+010d: c< +U+010e: D< +U+010f: d< +U+0110: D/ +U+0111: d/ +U+0112: E- +U+0113: e- +U+0114: E( +U+0115: e( +U+0116: E. +U+0117: e. +U+0118: E; +U+0119: e; +U+011a: E< +U+011b: e< +U+011c: G> +U+011d: g> +U+011e: G( +U+011f: g( +U+0120: G. +U+0121: g. +U+0122: G, +U+0123: g, +U+0124: H> +U+0125: h> +U+0126: H/ +U+0127: h/ +U+0128: I? +U+0129: i? +U+012a: I- +U+012b: i- +U+012c: I( +U+012d: i( +U+012e: I; +U+012f: i; +U+0130: I. +U+0131: i. +U+0132: IJ +U+0133: ij +U+0134: J> +U+0135: j> +U+0136: K, +U+0137: k, +U+0138: kk +U+0139: L' +U+013a: l' +U+013b: L, +U+013c: l, +U+013d: L< +U+013e: l< +U+013f: L. +U+0140: l. +U+0141: L/ +U+0142: l/ +U+0143: N' +U+0144: n' +U+0145: N, +U+0146: n, +U+0147: N< +U+0148: n< +U+0149: 'n +U+014a: NG +U+014b: ng +U+014c: O- +U+014d: o- +U+014e: O( +U+014f: o( +U+0150: O" +U+0151: o" +U+0152: OE +U+0153: oe +U+0154: R' +U+0155: r' +U+0156: R, +U+0157: r, +U+0158: R< +U+0159: r< +U+015a: S' +U+015b: s' +U+015c: S> +U+015d: s> +U+015e: S, +U+015f: s, +U+0160: S< +U+0161: s< +U+0162: T, +U+0163: t, +U+0164: T< +U+0165: t< +U+0166: T/ +U+0167: t/ +U+0168: U? +U+0169: u? +U+016a: U- +U+016b: u- +U+016c: U( +U+016d: u( +U+016e: U0 +U+016f: u0 +U+0170: U" +U+0171: u" +U+0172: U; +U+0173: u; +U+0174: W> +U+0175: w> +U+0176: Y> +U+0177: y> +U+0178: Y: +U+0179: Z' +U+017a: z' +U+017b: Z. +U+017c: z. +U+017d: Z< +U+017e: z< +U+01a0: O9 +U+01a1: o9 +U+01a2: OI +U+01a3: oi +U+01a6: yr +U+01af: U9 +U+01b0: u9 +U+01b5: Z/ +U+01b6: z/ +U+01b7: ED +U+01cd: A< +U+01ce: a< +U+01cf: I< +U+01d0: i< +U+01d1: O< +U+01d2: o< +U+01d3: U< +U+01d4: u< +U+01d5: _U:-_ +U+01d6: _u:-_ +U+01d7: _U:'_ +U+01d8: _u:'_ +U+01d9: _U:<_ +U+01da: _u:<_ +U+01db: _U:!_ +U+01dc: _u:!_ +U+01de: A1 +U+01df: a1 +U+01e0: A7 +U+01e1: a7 +U+01e2: A3 +U+01e3: a3 +U+01e4: G/ +U+01e5: g/ +U+01e6: G< +U+01e7: g< +U+01e8: K< +U+01e9: k< +U+01ea: O; +U+01eb: o; +U+01ec: O1 +U+01ed: o1 +U+01ee: EZ +U+01ef: ez +U+01f0: j< +U+01f4: G' +U+01f5: g' +U+01fa: _AA'_ +U+01fb: _aa'_ +U+01fc: _AE'_ +U+01fd: _ae'_ +U+01fe: _O/'_ +U+01ff: _o/'_ +U+02bf: ;S +U+02c7: '< +U+02d8: '( +U+02d9: '. +U+02da: '0 +U+02db: '; +U+02dd: '" +U+0386: A% +U+0388: E% +U+0389: Y% +U+038a: I% +U+038c: O% +U+038e: U% +U+038f: W% +U+0390: i3 +U+0391: A* +U+0392: B* +U+0393: G* +U+0394: D* +U+0395: E* +U+0396: Z* +U+0397: Y* +U+0398: H* +U+0399: I* +U+039a: K* +U+039b: L* +U+039c: M* +U+039d: N* +U+039e: C* +U+039f: O* +U+03a0: P* +U+03a1: R* +U+03a3: S* +U+03a4: T* +U+03a5: U* +U+03a6: F* +U+03a7: X* +U+03a8: Q* +U+03a9: W* +U+03aa: J* +U+03ab: V* +U+03ac: a% +U+03ad: e% +U+03ae: y% +U+03af: i% +U+03b0: u3 +U+03b1: a* +U+03b2: b* +U+03b3: g* +U+03b4: d* +U+03b5: e* +U+03b6: z* +U+03b7: y* +U+03b8: h* +U+03b9: i* +U+03ba: k* +U+03bb: l* +U+03bc: m* +U+03bd: n* +U+03be: c* +U+03bf: o* +U+03c0: p* +U+03c1: r* +U+03c2: *s +U+03c3: s* +U+03c4: t* +U+03c5: u* +U+03c6: f* +U+03c7: x* +U+03c8: q* +U+03c9: w* +U+03ca: j* +U+03cb: v* +U+03cc: o% +U+03cd: u% +U+03ce: w% +U+03d8: 'G +U+03d9: ,G +U+03da: T3 +U+03db: t3 +U+03dc: M3 +U+03dd: m3 +U+03de: K3 +U+03df: k3 +U+03e0: P3 +U+03e1: p3 +U+03f4: '% +U+03f5: j3 +U+0401: IO +U+0402: D% +U+0403: G% +U+0404: IE +U+0405: DS +U+0406: II +U+0407: YI +U+0408: J% +U+0409: LJ +U+040a: NJ +U+040b: Ts +U+040c: KJ +U+040e: V% +U+040f: DZ +U+0410: A= +U+0411: B= +U+0412: V= +U+0413: G= +U+0414: D= +U+0415: E= +U+0416: Z% +U+0417: Z= +U+0418: I= +U+0419: J= +U+041a: K= +U+041b: L= +U+041c: M= +U+041d: N= +U+041e: O= +U+041f: P= +U+0420: R= +U+0421: S= +U+0422: T= +U+0423: U= +U+0424: F= +U+0425: H= +U+0426: C= +U+0427: C% +U+0428: S% +U+0429: Sc +U+042a: =" +U+042b: Y= +U+042c: %" +U+042d: JE +U+042e: JU +U+042f: JA +U+0430: a= +U+0431: b= +U+0432: v= +U+0433: g= +U+0434: d= +U+0435: e= +U+0436: z% +U+0437: z= +U+0438: i= +U+0439: j= +U+043a: k= +U+043b: l= +U+043c: m= +U+043d: n= +U+043e: o= +U+043f: p= +U+0440: r= +U+0441: s= +U+0442: t= +U+0443: u= +U+0444: f= +U+0445: h= +U+0446: c= +U+0447: c% +U+0448: s% +U+0449: sc +U+044a: =' +U+044b: y= +U+044c: %' +U+044d: je +U+044e: ju +U+044f: ja +U+0451: io +U+0452: d% +U+0453: g% +U+0454: ie +U+0455: ds +U+0456: ii +U+0457: yi +U+0458: j% +U+0459: lj +U+045a: nj +U+045b: ts +U+045c: kj +U+045e: v% +U+045f: dz +U+0462: Y3 +U+0463: y3 +U+046a: O3 +U+046b: o3 +U+0472: F3 +U+0473: f3 +U+0474: V3 +U+0475: v3 +U+0480: C3 +U+0481: c3 +U+0490: G3 +U+0491: g3 +U+05d0: A+ +U+05d1: B+ +U+05d2: G+ +U+05d3: D+ +U+05d4: H+ +U+05d5: W+ +U+05d6: Z+ +U+05d7: X+ +U+05d8: Tj +U+05d9: J+ +U+05da: K% +U+05db: K+ +U+05dc: L+ +U+05dd: M% +U+05de: M+ +U+05df: N% +U+05e0: N+ +U+05e1: S+ +U+05e2: E+ +U+05e3: P% +U+05e4: P+ +U+05e5: Zj +U+05e6: ZJ +U+05e7: Q+ +U+05e8: R+ +U+05e9: Sh +U+05ea: T+ +U+060c: ,+ +U+061b: ;+ +U+061f: ?+ +U+0621: H' +U+0622: aM +U+0623: aH +U+0624: wH +U+0625: ah +U+0626: yH +U+0627: a+ +U+0628: b+ +U+0629: tm +U+062a: t+ +U+062b: tk +U+062c: g+ +U+062d: hk +U+062e: x+ +U+062f: d+ +U+0630: dk +U+0631: r+ +U+0632: z+ +U+0633: s+ +U+0634: sn +U+0635: c+ +U+0636: dd +U+0637: tj +U+0638: zH +U+0639: e+ +U+063a: i+ +U+0640: ++ +U+0641: f+ +U+0642: q+ +U+0643: k+ +U+0644: l+ +U+0645: m+ +U+0646: n+ +U+0647: h+ +U+0648: w+ +U+0649: j+ +U+064a: y+ +U+064b: :+ +U+064c: "+ +U+064d: =+ +U+064e: /+ +U+064f: '+ +U+0650: 1+ +U+0651: 3+ +U+0652: 0+ +U+0670: aS +U+067e: p+ +U+06a4: v+ +U+06af: gf +U+06f0: 0a +U+06f1: 1a +U+06f2: 2a +U+06f3: 3a +U+06f4: 4a +U+06f5: 5a +U+06f6: 6a +U+06f7: 7a +U+06f8: 8a +U+06f9: 9a +U+1e00: _A-0_ +U+1e01: _a-0_ +U+1e02: B. +U+1e03: b. +U+1e04: _B-._ +U+1e05: _b-._ +U+1e06: B_ +U+1e07: b_ +U+1e08: _C,'_ +U+1e09: _c,'_ +U+1e0a: D. +U+1e0b: d. +U+1e0c: _D-._ +U+1e0d: _d-._ +U+1e0e: D_ +U+1e0f: d_ +U+1e10: D, +U+1e11: d, +U+1e12: _D->_ +U+1e13: _d->_ +U+1e14: _E-!_ +U+1e15: _e-!_ +U+1e16: _E-'_ +U+1e17: _e-'_ +U+1e18: _E->_ +U+1e19: _e->_ +U+1e1a: _E-?_ +U+1e1b: _e-?_ +U+1e1c: _E,(_ +U+1e1d: _e,(_ +U+1e1e: F. +U+1e1f: f. +U+1e20: G- +U+1e21: g- +U+1e22: H. +U+1e23: h. +U+1e24: _H-._ +U+1e25: _h-._ +U+1e26: H: +U+1e27: h: +U+1e28: H, +U+1e29: h, +U+1e2a: _H-(_ +U+1e2b: _h-(_ +U+1e2c: _I-?_ +U+1e2d: _i-?_ +U+1e2e: _I:'_ +U+1e2f: _i:'_ +U+1e30: K' +U+1e31: k' +U+1e32: _K-._ +U+1e33: _k-._ +U+1e34: K_ +U+1e35: k_ +U+1e36: _L-._ +U+1e37: _l-._ +U+1e38: _L--._ +U+1e39: _l--._ +U+1e3a: L_ +U+1e3b: l_ +U+1e3c: _L->_ +U+1e3d: _l->_ +U+1e3e: M' +U+1e3f: m' +U+1e40: M. +U+1e41: m. +U+1e42: _M-._ +U+1e43: _m-._ +U+1e44: N. +U+1e45: n. +U+1e46: _N-._ +U+1e47: _n-._ +U+1e48: N_ +U+1e49: n_ +U+1e4a: _N->_ +U+1e4b: _N->_ +U+1e4c: _O?'_ +U+1e4d: _o?'_ +U+1e4e: _O?:_ +U+1e4f: _o?:_ +U+1e50: _O-!_ +U+1e51: _o-!_ +U+1e52: _O-'_ +U+1e53: _o-'_ +U+1e54: P' +U+1e55: p' +U+1e56: P. +U+1e57: p. +U+1e58: R. +U+1e59: r. +U+1e5a: _R-._ +U+1e5b: _r-._ +U+1e5c: _R--._ +U+1e5d: _r--._ +U+1e5e: R_ +U+1e5f: r_ +U+1e60: S. +U+1e61: s. +U+1e62: _S-._ +U+1e63: _s-._ +U+1e64: _S'._ +U+1e65: _s'._ +U+1e66: _S<._ +U+1e67: _s<._ +U+1e68: _S.-._ +U+1e69: _S.-._ +U+1e6a: T. +U+1e6b: t. +U+1e6c: _T-._ +U+1e6d: _t-._ +U+1e6e: T_ +U+1e6f: t_ +U+1e70: _T->_ +U+1e71: _t->_ +U+1e72: _U--:_ +U+1e73: _u--:_ +U+1e74: _U-?_ +U+1e75: _u-?_ +U+1e76: _U->_ +U+1e77: _u->_ +U+1e78: _U?'_ +U+1e79: _u?'_ +U+1e7a: _U-:_ +U+1e7b: _u-:_ +U+1e7c: V? +U+1e7d: v? +U+1e7e: _V-._ +U+1e7f: _v-._ +U+1e80: W! +U+1e81: w! +U+1e82: W' +U+1e83: w' +U+1e84: W: +U+1e85: w: +U+1e86: W. +U+1e87: w. +U+1e88: _W-._ +U+1e89: _w-._ +U+1e8a: X. +U+1e8b: x. +U+1e8c: X: +U+1e8d: x: +U+1e8e: Y. +U+1e8f: y. +U+1e90: Z> +U+1e91: z> +U+1e92: _Z-._ +U+1e93: _z-._ +U+1e94: Z_ +U+1e95: z_ +U+1e96: h_ +U+1e97: t: +U+1e98: w0 +U+1e99: y0 +U+1ea0: _A-._ +U+1ea1: _a-._ +U+1ea2: A2 +U+1ea3: a2 +U+1ea4: _A>'_ +U+1ea5: _a>'_ +U+1ea6: _A>!_ +U+1ea7: _a>!_ +U+1ea8: _A>2_ +U+1ea9: _a>2_ +U+1eaa: _A>?_ +U+1eab: _a>?_ +U+1eac: _A>-._ +U+1ead: _a>-._ +U+1eae: _A('_ +U+1eaf: _a('_ +U+1eb0: _A(!_ +U+1eb1: _a(!_ +U+1eb2: _A(2_ +U+1eb3: _a(2_ +U+1eb4: _A(?_ +U+1eb5: _a(?_ +U+1eb6: _A(-._ +U+1eb7: _a(-._ +U+1eb8: _E-._ +U+1eb9: _e-._ +U+1eba: E2 +U+1ebb: e2 +U+1ebc: E? +U+1ebd: e? +U+1ebe: _E>'_ +U+1ebf: _e>'_ +U+1ec0: _E>!_ +U+1ec1: _e>!_ +U+1ec2: _E>2_ +U+1ec3: _e>2_ +U+1ec4: _E>?_ +U+1ec5: _e>?_ +U+1ec6: _E>-._ +U+1ec7: _e>-._ +U+1ec8: I2 +U+1ec9: i2 +U+1eca: _I-._ +U+1ecb: _i-._ +U+1ecc: _O-._ +U+1ecd: _o-._ +U+1ece: O2 +U+1ecf: o2 +U+1ed0: _O>'_ +U+1ed1: _o>'_ +U+1ed2: _O>!_ +U+1ed3: _o>!_ +U+1ed4: _O>2_ +U+1ed5: _o>2_ +U+1ed6: _O>?_ +U+1ed7: _o>?_ +U+1ed8: _O>-._ +U+1ed9: _o>-._ +U+1eda: _O9'_ +U+1edb: _o9'_ +U+1edc: _O9!_ +U+1edd: _o9!_ +U+1ede: _O92_ +U+1edf: _o92_ +U+1ee0: _O9?_ +U+1ee1: _o9?_ +U+1ee2: _O9-._ +U+1ee3: _o9-._ +U+1ee4: _U-._ +U+1ee5: _u-._ +U+1ee6: U2 +U+1ee7: u2 +U+1ee8: _U9'_ +U+1ee9: _u9'_ +U+1eea: _U9!_ +U+1eeb: _u9!_ +U+1eec: _U92_ +U+1eed: _u92_ +U+1eee: _U9?_ +U+1eef: _u9?_ +U+1ef0: _U9-._ +U+1ef1: _u9-._ +U+1ef2: Y! +U+1ef3: y! +U+1ef4: _Y-._ +U+1ef5: _y-._ +U+1ef6: Y2 +U+1ef7: y2 +U+1ef8: Y? +U+1ef9: y? +U+1f00: ;' +U+1f01: ,' +U+1f02: ;! +U+1f03: ,! +U+1f04: ?; +U+1f05: ?, +U+1f06: !: +U+1f07: ?: +U+2002: 1N +U+2003: 1M +U+2004: 3M +U+2005: 4M +U+2006: 6M +U+2009: 1T +U+200a: 1H +U+2010: -1 +U+2013: -N +U+2014: -M +U+2015: -3 +U+2016: !2 +U+2017: =2 +U+2018: '6 +U+2019: '9 +U+201a: .9 +U+201b: 9' +U+201c: "6 +U+201d: "9 +U+201e: :9 +U+201f: 9" +U+2020: /- +U+2021: /= +U+2025: .. +U+2030: %0 +U+2032: 1' +U+2033: 2' +U+2034: 3' +U+2035: 1" +U+2036: 2" +U+2037: 3" +U+2038: Ca +U+2039: <1 +U+203a: >1 +U+203b: :X +U+203c: _!*2_ +U+203e: '- +U+2044: /f +U+2070: 0S +U+2074: 4S +U+2075: 5S +U+2076: 6S +U+2077: 7S +U+2078: 8S +U+2079: 9S +U+207a: +S +U+207b: -S +U+207c: =S +U+207d: (S +U+207e: )S +U+207f: nS +U+2080: 0s +U+2081: 1s +U+2082: 2s +U+2083: 3s +U+2084: 4s +U+2085: 5s +U+2086: 6s +U+2087: 7s +U+2088: 8s +U+2089: 9s +U+208a: +s +U+208b: -s +U+208c: =s +U+208d: (s +U+208e: )s +U+20a4: Li +U+20a7: Pt +U+20a9: W= +U+2103: oC +U+2105: co +U+2109: oF +U+2116: N0 +U+2117: PO +U+211e: Rx +U+2120: SM +U+2122: TM +U+2126: Om +U+212b: AO +U+2153: 13 +U+2154: 23 +U+2155: 15 +U+2156: 25 +U+2157: 35 +U+2158: 45 +U+2159: 16 +U+215a: 56 +U+215b: 18 +U+215c: 38 +U+215d: 58 +U+215e: 78 +U+2160: 1R +U+2161: 2R +U+2162: 3R +U+2163: 4R +U+2164: 5R +U+2165: 6R +U+2166: 7R +U+2167: 8R +U+2168: 9R +U+2169: aR +U+216a: bR +U+216b: cR +U+216c: _50R_ +U+216d: _100R_ +U+216e: _500R_ +U+216f: _1000R_ +U+2170: 1r +U+2171: 2r +U+2172: 3r +U+2173: 4r +U+2174: 5r +U+2175: 6r +U+2176: 7r +U+2177: 8r +U+2178: 9r +U+2179: ar +U+217a: br +U+217b: cr +U+217c: _50r_ +U+217d: _100r_ +U+217e: _500r_ +U+217f: _1000r_ +U+2180: _1000RCD_ +U+2181: _5000R_ +U+2182: _10000R_ +U+2190: <- +U+2191: -! +U+2192: -> +U+2193: -v +U+2194: <> +U+2195: UD +U+2196: _<!!_ +U+2197: _//>_ +U+2198: _!!>_ +U+2199: _<//_ +U+21d0: <= +U+21d2: => +U+21d4: == +U+2200: FA +U+2202: dP +U+2203: TE +U+2205: /0 +U+2206: DE +U+2207: NB +U+2208: (- +U+220b: -) +U+220f: *P +U+2211: +Z +U+2212: -2 +U+2213: -+ +U+2217: *- +U+2218: Ob +U+2219: Sb +U+221a: RT +U+221d: 0( +U+221e: 00 +U+221f: -L +U+2220: -V +U+2225: PP +U+2227: AN +U+2228: OR +U+2229: (U +U+222a: )U +U+222b: In +U+222c: DI +U+222e: Io +U+2234: .: +U+2235: :. +U+2236: :R +U+2237: :: +U+223c: ?1 +U+223e: CG +U+2243: ?- +U+2245: ?= +U+2248: ?2 +U+224c: =? +U+2253: HI +U+2260: != +U+2261: =3 +U+2264: =< +U+2265: >= +U+226a: <* +U+226b: *> +U+226e: !< +U+226f: !> +U+2282: (C +U+2283: )C +U+2286: (_ +U+2287: )_ +U+2299: 0. +U+229a: 02 +U+22a5: -T +U+22c5: .P +U+22ee: :3 +U+22ef: .3 +U+2302: Eh +U+2308: <7 +U+2309: >7 +U+230a: 7< +U+230b: 7> +U+2310: NI +U+2312: (A +U+2315: TR +U+2320: Iu +U+2321: Il +U+2329: </ +U+232a: /> +U+2423: Vs +U+2440: 1h +U+2441: 3h +U+2442: 2h +U+2443: 4h +U+2446: 1j +U+2447: 2j +U+2448: 3j +U+2449: 4j +U+2460: _1-o_ +U+2461: _2-o_ +U+2462: _3-o_ +U+2463: _4-o_ +U+2464: _5-o_ +U+2465: _6-o_ +U+2466: _7-o_ +U+2467: _8-o_ +U+2468: _9-o_ +U+2469: _10-o_ +U+246a: _11-o_ +U+246b: _12-o_ +U+246c: _13-o_ +U+246d: _14-o_ +U+246e: _15-o_ +U+246f: _16-o_ +U+2470: _17-o_ +U+2471: _18-o_ +U+2472: _19-o_ +U+2473: _20-o_ +U+2474: _(1)_ +U+2475: _(2)_ +U+2476: _(3)_ +U+2477: _(4)_ +U+2478: _(5)_ +U+2479: _(6)_ +U+247a: _(7)_ +U+247b: _(8)_ +U+247c: _(9)_ +U+247d: _(10)_ +U+247e: _(11)_ +U+247f: _(12)_ +U+2480: _(13)_ +U+2481: _(14)_ +U+2482: _(15)_ +U+2483: _(16)_ +U+2484: _(17)_ +U+2485: _(18)_ +U+2486: _(19)_ +U+2487: _(20)_ +U+2488: 1. +U+2489: 2. +U+248a: 3. +U+248b: 4. +U+248c: 5. +U+248d: 6. +U+248e: 7. +U+248f: 8. +U+2490: 9. +U+2491: _10._ +U+2492: _11._ +U+2493: _12._ +U+2494: _13._ +U+2495: _14._ +U+2496: _15._ +U+2497: _16._ +U+2498: _17._ +U+2499: _18._ +U+249a: _19._ +U+249b: _20._ +U+249c: _(a)_ +U+249d: _(b)_ +U+249e: _(c)_ +U+249f: _(d)_ +U+24a0: _(e)_ +U+24a1: _(f)_ +U+24a2: _(g)_ +U+24a3: _(h)_ +U+24a4: _(i)_ +U+24a5: _(j)_ +U+24a6: _(k)_ +U+24a7: _(l)_ +U+24a8: _(m)_ +U+24a9: _(n)_ +U+24aa: _(o)_ +U+24ab: _(p)_ +U+24ac: _(q)_ +U+24ad: _(r)_ +U+24ae: _(s)_ +U+24af: _(t)_ +U+24b0: _(u)_ +U+24b1: _(v)_ +U+24b2: _(w)_ +U+24b3: _(x)_ +U+24b4: _(y)_ +U+24b5: _(z)_ +U+24b6: _A-o_ +U+24b7: _B-o_ +U+24b8: _C-o_ +U+24b9: _D-o_ +U+24ba: _E-o_ +U+24bb: _F-o_ +U+24bc: _G-o_ +U+24bd: _H-o_ +U+24be: _I-o_ +U+24bf: _J-o_ +U+24c0: _K-o_ +U+24c1: _L-o_ +U+24c2: _M-o_ +U+24c3: _N-o_ +U+24c4: _O-o_ +U+24c5: _P-o_ +U+24c6: _Q-o_ +U+24c7: _R-o_ +U+24c8: _S-o_ +U+24c9: _T-o_ +U+24ca: _U-o_ +U+24cb: _V-o_ +U+24cc: _W-o_ +U+24cd: _X-o_ +U+24ce: _Y-o_ +U+24cf: _Z-o_ +U+24d0: _a-o_ +U+24d1: _b-o_ +U+24d2: _c-o_ +U+24d3: _d-o_ +U+24d4: _e-o_ +U+24d5: _f-o_ +U+24d6: _g-o_ +U+24d7: _h-o_ +U+24d8: _i-o_ +U+24d9: _j-o_ +U+24da: _k-o_ +U+24db: _l-o_ +U+24dc: _m-o_ +U+24dd: _n-o_ +U+24de: _o-o_ +U+24df: _p-o_ +U+24e0: _q-o_ +U+24e1: _r-o_ +U+24e2: _s-o_ +U+24e3: _t-o_ +U+24e4: _u-o_ +U+24e5: _v-o_ +U+24e6: _w-o_ +U+24e7: _x-o_ +U+24e8: _y-o_ +U+24e9: _z-o_ +U+24ea: _0-o_ +U+2500: hh +U+2501: HH +U+2502: vv +U+2503: VV +U+2504: 3- +U+2505: 3_ +U+2506: 3! +U+2507: 3/ +U+2508: 4- +U+2509: 4_ +U+250a: 4! +U+250b: 4/ +U+250c: dr +U+250d: dR +U+250e: Dr +U+250f: DR +U+2510: dl +U+2511: dL +U+2512: Dl +U+2513: LD +U+2514: ur +U+2515: uR +U+2516: Ur +U+2517: UR +U+2518: ul +U+2519: uL +U+251a: Ul +U+251b: UL +U+251c: vr +U+251d: vR +U+251e: _Udr_ +U+251f: _uDr_ +U+2520: Vr +U+2521: _UdR_ +U+2522: _uDR_ +U+2523: VR +U+2524: vl +U+2525: vL +U+2526: _Udl_ +U+2527: _uDl_ +U+2528: Vl +U+2529: _UdL_ +U+252a: _uDL_ +U+252b: VL +U+252c: dh +U+252d: _dLr_ +U+252e: _dlR_ +U+252f: dH +U+2530: Dh +U+2531: _DLr_ +U+2532: _DlR_ +U+2533: DH +U+2534: uh +U+2535: _uLr_ +U+2536: _ulR_ +U+2537: uH +U+2538: Uh +U+2539: _ULr_ +U+253a: _UlR_ +U+253b: UH +U+253c: vh +U+253d: _vLr_ +U+253e: _vlR_ +U+253f: vH +U+2540: _Udh_ +U+2541: _uDh_ +U+2542: Vh +U+2543: _UdLr_ +U+2544: _UdlR_ +U+2545: _uDLr_ +U+2546: _uDlR_ +U+2547: _UdH_ +U+2548: _uDH_ +U+2549: _VLr_ +U+254a: _VlR_ +U+254b: VH +U+2571: FD +U+2572: BD +U+2580: TB +U+2584: LB +U+2588: FB +U+258c: lB +U+2590: RB +U+2591: .S +U+2592: :S +U+2593: ?S +U+25a0: fS +U+25a1: OS +U+25a2: RO +U+25a3: Rr +U+25a4: RF +U+25a5: RY +U+25a6: RH +U+25a7: RZ +U+25a8: RK +U+25a9: RX +U+25aa: sB +U+25ac: SR +U+25ad: Or +U+25b2: UT +U+25b3: uT +U+25b6: PR +U+25b7: Tr +U+25bc: Dt +U+25bd: dT +U+25c0: PL +U+25c1: Tl +U+25c6: Db +U+25c7: Dw +U+25ca: LZ +U+25cb: 0m +U+25ce: 0o +U+25cf: 0M +U+25d0: 0L +U+25d1: 0R +U+25d8: Sn +U+25d9: Ic +U+25e2: Fd +U+25e3: Bd +U+2605: *2 +U+2606: *1 +U+260e: _TEL_ +U+260f: _tel_ +U+261c: <H +U+261e: >H +U+263a: 0u +U+263b: 0U +U+263c: SU +U+2640: Fm +U+2642: Ml +U+2660: cS +U+2661: cH +U+2662: cD +U+2663: cC +U+2664: _cS-_ +U+2665: _cH-_ +U+2666: _cD-_ +U+2667: _cC-_ +U+2669: Md +U+266a: M8 +U+266b: M2 +U+266c: _M16_ +U+266d: Mb +U+266e: Mx +U+266f: MX +U+2713: OK +U+2717: XX +U+2720: -X +U+3000: IS +U+3001: ,_ +U+3002: ._ +U+3003: +" +U+3004: +_ +U+3005: *_ +U+3006: ;_ +U+3007: 0_ +U+300a: <+ +U+300b: >+ +U+300c: <' +U+300d: >' +U+300e: <" +U+300f: >" +U+3010: (" +U+3011: )" +U+3012: =T +U+3013: =_ +U+3014: (' +U+3015: )' +U+3016: (I +U+3017: )I +U+301c: -? +U+3020: _=T:)_ +U+3041: A5 +U+3042: a5 +U+3043: I5 +U+3044: i5 +U+3045: U5 +U+3046: u5 +U+3047: E5 +U+3048: e5 +U+3049: O5 +U+304a: o5 +U+304b: ka +U+304c: ga +U+304d: ki +U+304e: gi +U+304f: ku +U+3050: gu +U+3051: ke +U+3052: ge +U+3053: ko +U+3054: go +U+3055: sa +U+3056: za +U+3057: si +U+3058: zi +U+3059: su +U+305a: zu +U+305b: se +U+305c: ze +U+305d: so +U+305e: zo +U+305f: ta +U+3060: da +U+3061: ti +U+3062: di +U+3063: tU +U+3064: tu +U+3065: du +U+3066: te +U+3067: de +U+3068: to +U+3069: do +U+306a: na +U+306b: ni +U+306c: nu +U+306d: ne +U+306e: no +U+306f: ha +U+3070: ba +U+3071: pa +U+3072: hi +U+3073: bi +U+3074: pi +U+3075: hu +U+3076: bu +U+3077: pu +U+3078: he +U+3079: be +U+307a: pe +U+307b: ho +U+307c: bo +U+307d: po +U+307e: ma +U+307f: mi +U+3080: mu +U+3081: me +U+3082: mo +U+3083: yA +U+3084: ya +U+3085: yU +U+3086: yu +U+3087: yO +U+3088: yo +U+3089: ra +U+308a: ri +U+308b: ru +U+308c: re +U+308d: ro +U+308e: wA +U+308f: wa +U+3090: wi +U+3091: we +U+3092: wo +U+3093: n5 +U+3094: vu +U+309b: "5 +U+309c: 05 +U+309d: *5 +U+309e: +5 +U+30a1: a6 +U+30a2: A6 +U+30a3: i6 +U+30a4: I6 +U+30a5: u6 +U+30a6: U6 +U+30a7: e6 +U+30a8: E6 +U+30a9: o6 +U+30aa: O6 +U+30ab: Ka +U+30ac: Ga +U+30ad: Ki +U+30ae: Gi +U+30af: Ku +U+30b0: Gu +U+30b1: Ke +U+30b2: Ge +U+30b3: Ko +U+30b4: Go +U+30b5: Sa +U+30b6: Za +U+30b7: Si +U+30b8: Zi +U+30b9: Su +U+30ba: Zu +U+30bb: Se +U+30bc: Ze +U+30bd: So +U+30be: Zo +U+30bf: Ta +U+30c0: Da +U+30c1: Ti +U+30c2: Di +U+30c3: TU +U+30c4: Tu +U+30c5: Du +U+30c6: Te +U+30c7: De +U+30c8: To +U+30c9: Do +U+30ca: Na +U+30cb: Ni +U+30cc: Nu +U+30cd: Ne +U+30ce: No +U+30cf: Ha +U+30d0: Ba +U+30d1: Pa +U+30d2: Hi +U+30d3: Bi +U+30d4: Pi +U+30d5: Hu +U+30d6: Bu +U+30d7: Pu +U+30d8: He +U+30d9: Be +U+30da: Pe +U+30db: Ho +U+30dc: Bo +U+30dd: Po +U+30de: Ma +U+30df: Mi +U+30e0: Mu +U+30e1: Me +U+30e2: Mo +U+30e3: YA +U+30e4: Ya +U+30e5: YU +U+30e6: Yu +U+30e7: YO +U+30e8: Yo +U+30e9: Ra +U+30ea: Ri +U+30eb: Ru +U+30ec: Re +U+30ed: Ro +U+30ee: WA +U+30ef: Wa +U+30f0: Wi +U+30f1: We +U+30f2: Wo +U+30f3: N6 +U+30f4: Vu +U+30f5: KA +U+30f6: KE +U+30f7: Va +U+30f8: Vi +U+30f9: Ve +U+30fa: Vo +U+30fb: .6 +U+30fc: -6 +U+30fd: *6 +U+30fe: +6 +U+3105: b4 +U+3106: p4 +U+3107: m4 +U+3108: f4 +U+3109: d4 +U+310a: t4 +U+310b: n4 +U+310c: l4 +U+310d: g4 +U+310e: k4 +U+310f: h4 +U+3110: j4 +U+3111: q4 +U+3112: x4 +U+3113: zh +U+3114: ch +U+3115: sh +U+3116: r4 +U+3117: z4 +U+3118: c4 +U+3119: s4 +U+311a: a4 +U+311b: o4 +U+311c: e4 +U+311d: _eh4_ +U+311e: ai +U+311f: ei +U+3120: au +U+3121: ou +U+3122: an +U+3123: en +U+3124: aN +U+3125: eN +U+3126: er +U+3127: i4 +U+3128: u4 +U+3129: iu +U+312a: v4 +U+312b: nG +U+312c: gn +U+321c: _(JU)_ +U+3220: 1c +U+3221: 2c +U+3222: 3c +U+3223: 4c +U+3224: 5c +U+3225: 6c +U+3226: 7c +U+3227: 8c +U+3228: 9c +U+3229: _10c_ +U+327f: _KSC_ +U+fb00: ff +U+fb01: fi +U+fb02: fl +U+fb03: _ffi_ +U+fb04: _ffl_ +U+fb05: ft +U+fb06: st +U+fe7d: _3+;_ +U+fe82: _aM._ +U+fe84: _aH._ +U+fe8d: _a+-_ +U+fe8e: _a+._ +U+fe8f: _b+-_ +U+fe90: _b+,_ +U+fe91: _b+;_ +U+fe92: _b+._ +U+fe93: _tm-_ +U+fe94: _tm._ +U+fe95: _t+-_ +U+fe96: _t+,_ +U+fe97: _t+;_ +U+fe98: _t+._ +U+fe99: _tk-_ +U+fe9a: _tk,_ +U+fe9b: _tk;_ +U+fe9c: _tk._ +U+fe9d: _g+-_ +U+fe9e: _g+,_ +U+fe9f: _g+;_ +U+fea0: _g+._ +U+fea1: _hk-_ +U+fea2: _hk,_ +U+fea3: _hk;_ +U+fea4: _hk._ +U+fea5: _x+-_ +U+fea6: _x+,_ +U+fea7: _x+;_ +U+fea8: _x+._ +U+fea9: _d+-_ +U+feaa: _d+._ +U+feab: _dk-_ +U+feac: _dk._ +U+fead: _r+-_ +U+feae: _r+._ +U+feaf: _z+-_ +U+feb0: _z+._ +U+feb1: _s+-_ +U+feb2: _s+,_ +U+feb3: _s+;_ +U+feb4: _s+._ +U+feb5: _sn-_ +U+feb6: _sn,_ +U+feb7: _sn;_ +U+feb8: _sn._ +U+feb9: _c+-_ +U+feba: _c+,_ +U+febb: _c+;_ +U+febc: _c+._ +U+febd: _dd-_ +U+febe: _dd,_ +U+febf: _dd;_ +U+fec0: _dd._ +U+fec1: _tj-_ +U+fec2: _tj,_ +U+fec3: _tj;_ +U+fec4: _tj._ +U+fec5: _zH-_ +U+fec6: _zH,_ +U+fec7: _zH;_ +U+fec8: _zH._ +U+fec9: _e+-_ +U+feca: _e+,_ +U+fecb: _e+;_ +U+fecc: _e+._ +U+fecd: _i+-_ +U+fece: _i+,_ +U+fecf: _i+;_ +U+fed0: _i+._ +U+fed1: _f+-_ +U+fed2: _f+,_ +U+fed3: _f+;_ +U+fed4: _f+._ +U+fed5: _q+-_ +U+fed6: _q+,_ +U+fed7: _q+;_ +U+fed8: _q+._ +U+fed9: _k+-_ +U+feda: _k+,_ +U+fedb: _k+;_ +U+fedc: _k+._ +U+fedd: _l+-_ +U+fede: _l+,_ +U+fedf: _l+;_ +U+fee0: _l+._ +U+fee1: _m+-_ +U+fee2: _m+,_ +U+fee3: _m+;_ +U+fee4: _m+._ +U+fee5: _n+-_ +U+fee6: _n+,_ +U+fee7: _n+;_ +U+fee8: _n+._ +U+fee9: _h+-_ +U+feea: _h+,_ +U+feeb: _h+;_ +U+feec: _h+._ +U+feed: _w+-_ +U+feee: _w+._ +U+feef: _j+-_ +U+fef0: _j+._ +U+fef1: _y+-_ +U+fef2: _y+,_ +U+fef3: _y+;_ +U+fef4: _y+._ +U+fef5: _lM-_ +U+fef6: _lM._ +U+fef7: _lH-_ +U+fef8: _lH._ +U+fef9: _lh-_ +U+fefa: _lh._ +U+fefb: _la-_ +U+fefc: _la._ +U+0000: NU +U+0001: SH +U+0002: SX +U+0003: EX +U+0004: ET +U+0005: EQ +U+0006: AK +U+0007: BL +U+0008: BS +U+0009: HT +# U+000a: LF +U+000b: VT +U+000c: FF +U+000d: CR +U+000e: SO +U+000f: SI +U+0010: DL +U+0011: D1 +U+0012: D2 +U+0013: D3 +U+0014: D4 +U+0015: NK +U+0016: SY +U+0017: EB +U+0018: CN +U+0019: EM +U+001a: SB +U+001b: EC +U+001c: FS +U+001d: GS +U+001e: RS +U+001f: US +U+007f: DT +U+0080: PA +U+0081: HO +U+0082: BH +U+0083: NH +U+0084: IN +U+0085: NL +U+0086: SA +U+0087: ES +U+0088: HS +U+0089: HJ +U+008a: VS +U+008b: PD +U+008c: PU +U+008d: RI +U+008e: S2 +U+008f: S3 +U+0090: DC +U+0091: P1 +U+0092: P2 +U+0093: TS +U+0094: CC +U+0095: MW +U+0096: SG +U+0097: EG +U+0098: SS +U+0099: GC +U+009a: SC +U+009b: CI +U+009c: ST +U+009d: OC +U+009e: PM +U+009f: AC +U+e001: /c +U+e002: UA +U+e003: UB +U+e004: "3 +U+e005: "1 +U+e006: "! +U+e007: "' +U+e008: "> +U+e009: "? +U+e00a: "- +U+e00b: "( +U+e00c: ". +U+e00d: ": +U+e00e: "0 +U+e00f: "" +U+e010: "< +U+e011: ", +U+e012: "; +U+e013: "_ +U+e014: "= +U+e015: "/ +U+e016: "i +U+e017: "d +U+e018: "p +U+e019: ;; +U+e01a: ,, +U+e01b: b3 +U+e01c: Ci +U+e01d: f( +U+e01e: ed +U+e01f: am +U+e020: pm +U+e021: _Tel_ +U+e022: _a+:_ +U+e023: Fl +U+e024: GF +U+e025: >V +U+e026: !* +U+e027: ?* +U+e028: J< diff --git a/src/chrtrans/mnemonic_suni.tbl b/src/chrtrans/mnemonic_suni.tbl new file mode 100644 index 00000000..d2f05d89 --- /dev/null +++ b/src/chrtrans/mnemonic_suni.tbl @@ -0,0 +1,1899 @@ +#The MIME name of this charset. +Mmnemonic + +#Name as a Display Charset (used on Options screen) +ORFC1345 Mnemonic + +# U+0020:&SP +U+0021:! +U+0022:" +U+0023:&Nb +U+0024:&DO +U+0025:% +U+0026:&& +U+0027:' +U+0028:( +U+0029:) +U+002a:* +U+002b:+ +U+002c:, +U+002d:- +U+002e:. +U+002f:/ +U+0030:0 +U+0031:1 +U+0032:2 +U+0033:3 +U+0034:4 +U+0035:5 +U+0036:6 +U+0037:7 +U+0038:8 +U+0039:9 +U+003a:: +U+003b:; +U+003c:< +U+003d:= +U+003e:> +U+003f:? +U+0040:&At +U+0041:A +U+0042:B +U+0043:C +U+0044:D +U+0045:E +U+0046:F +U+0047:G +U+0048:H +U+0049:I +U+004a:J +U+004b:K +U+004c:L +U+004d:M +U+004e:N +U+004f:O +U+0050:P +U+0051:Q +U+0052:R +U+0053:S +U+0054:T +U+0055:U +U+0056:V +U+0057:W +U+0058:X +U+0059:Y +U+005a:Z +U+005b:&<( +U+005c:&// +U+005d:&)> +U+005e:&'> +U+005f:_ +U+0060:&'! +U+0061:a +U+0062:b +U+0063:c +U+0064:d +U+0065:e +U+0066:f +U+0067:g +U+0068:h +U+0069:i +U+006a:j +U+006b:k +U+006c:l +U+006d:m +U+006e:n +U+006f:o +U+0070:p +U+0071:q +U+0072:r +U+0073:s +U+0074:t +U+0075:u +U+0076:v +U+0077:w +U+0078:x +U+0079:y +U+007a:z +U+007b:&(! +U+007c:&!! +U+007d:&!) +U+007e:&'? +U+00a0:&NS +U+00a1:&!I +U+00a2:&Ct +U+00a3:&Pd +U+00a4:&Cu +U+00a5:&Ye +U+00a6:&BB +U+00a7:&SE +U+00a8:&': +U+00a9:&Co +U+00aa:&-a +U+00ab:&<< +U+00ac:&NO +U+00ad:&-- +U+00ae:&Rg +U+00af:&'m +U+00b0:&DG +U+00b1:&+- +U+00b2:&2S +U+00b3:&3S +U+00b4:&'' +U+00b5:&My +U+00b6:&PI +U+00b7:&.M +U+00b8:&', +U+00b9:&1S +U+00ba:&-o +U+00bb:&>> +U+00bc:&14 +U+00bd:&12 +U+00be:&34 +U+00bf:&?I +U+00c0:&A! +U+00c1:&A' +U+00c2:&A> +U+00c3:&A? +U+00c4:&A: +U+00c5:&AA +U+00c6:&AE +U+00c7:&C, +U+00c8:&E! +U+00c9:&E' +U+00ca:&E> +U+00cb:&E: +U+00cc:&I! +U+00cd:&I' +U+00ce:&I> +U+00cf:&I: +U+00d0:&D- +U+00d1:&N? +U+00d2:&O! +U+00d3:&O' +U+00d4:&O> +U+00d5:&O? +U+00d6:&O: +U+00d7:&*X +U+00d8:&O/ +U+00d9:&U! +U+00da:&U' +U+00db:&U> +U+00dc:&U: +U+00dd:&Y' +U+00de:&TH +U+00df:&ss +U+00e0:&a! +U+00e1:&a' +U+00e2:&a> +U+00e3:&a? +U+00e4:&a: +U+00e5:&aa +U+00e6:&ae +U+00e7:&c, +U+00e8:&e! +U+00e9:&e' +U+00ea:&e> +U+00eb:&e: +U+00ec:&i! +U+00ed:&i' +U+00ee:&i> +U+00ef:&i: +U+00f0:&d- +U+00f1:&n? +U+00f2:&o! +U+00f3:&o' +U+00f4:&o> +U+00f5:&o? +U+00f6:&o: +U+00f7:&-: +U+00f8:&o/ +U+00f9:&u! +U+00fa:&u' +U+00fb:&u> +U+00fc:&u: +U+00fd:&y' +U+00fe:&th +U+00ff:&y: +U+0100:&A- +U+0101:&a- +U+0102:&A( +U+0103:&a( +U+0104:&A; +U+0105:&a; +U+0106:&C' +U+0107:&c' +U+0108:&C> +U+0109:&c> +U+010a:&C. +U+010b:&c. +U+010c:&C< +U+010d:&c< +U+010e:&D< +U+010f:&d< +U+0110:&D/ +U+0111:&d/ +U+0112:&E- +U+0113:&e- +U+0114:&E( +U+0115:&e( +U+0116:&E. +U+0117:&e. +U+0118:&E; +U+0119:&e; +U+011a:&E< +U+011b:&e< +U+011c:&G> +U+011d:&g> +U+011e:&G( +U+011f:&g( +U+0120:&G. +U+0121:&g. +U+0122:&G, +U+0123:&g, +U+0124:&H> +U+0125:&h> +U+0126:&H/ +U+0127:&h/ +U+0128:&I? +U+0129:&i? +U+012a:&I- +U+012b:&i- +U+012c:&I( +U+012d:&i( +U+012e:&I; +U+012f:&i; +U+0130:&I. +U+0131:&i. +U+0132:&IJ +U+0133:&ij +U+0134:&J> +U+0135:&j> +U+0136:&K, +U+0137:&k, +U+0138:&kk +U+0139:&L' +U+013a:&l' +U+013b:&L, +U+013c:&l, +U+013d:&L< +U+013e:&l< +U+013f:&L. +U+0140:&l. +U+0141:&L/ +U+0142:&l/ +U+0143:&N' +U+0144:&n' +U+0145:&N, +U+0146:&n, +U+0147:&N< +U+0148:&n< +U+0149:&'n +U+014a:&NG +U+014b:&ng +U+014c:&O- +U+014d:&o- +U+014e:&O( +U+014f:&o( +U+0150:&O" +U+0151:&o" +U+0152:&OE +U+0153:&oe +U+0154:&R' +U+0155:&r' +U+0156:&R, +U+0157:&r, +U+0158:&R< +U+0159:&r< +U+015a:&S' +U+015b:&s' +U+015c:&S> +U+015d:&s> +U+015e:&S, +U+015f:&s, +U+0160:&S< +U+0161:&s< +U+0162:&T, +U+0163:&t, +U+0164:&T< +U+0165:&t< +U+0166:&T/ +U+0167:&t/ +U+0168:&U? +U+0169:&u? +U+016a:&U- +U+016b:&u- +U+016c:&U( +U+016d:&u( +U+016e:&U0 +U+016f:&u0 +U+0170:&U" +U+0171:&u" +U+0172:&U; +U+0173:&u; +U+0174:&W> +U+0175:&w> +U+0176:&Y> +U+0177:&y> +U+0178:&Y: +U+0179:&Z' +U+017a:&z' +U+017b:&Z. +U+017c:&z. +U+017d:&Z< +U+017e:&z< +U+01a0:&O9 +U+01a1:&o9 +U+01a2:&OI +U+01a3:&oi +U+01a6:&yr +U+01af:&U9 +U+01b0:&u9 +U+01b5:&Z/ +U+01b6:&z/ +U+01b7:&ED +U+01cd:&A< +U+01ce:&a< +U+01cf:&I< +U+01d0:&i< +U+01d1:&O< +U+01d2:&o< +U+01d3:&U< +U+01d4:&u< +U+01d5:&_U:-_ +U+01d6:&_u:-_ +U+01d7:&_U:'_ +U+01d8:&_u:'_ +U+01d9:&_U:<_ +U+01da:&_u:<_ +U+01db:&_U:!_ +U+01dc:&_u:!_ +U+01de:&A1 +U+01df:&a1 +U+01e0:&A7 +U+01e1:&a7 +U+01e2:&A3 +U+01e3:&a3 +U+01e4:&G/ +U+01e5:&g/ +U+01e6:&G< +U+01e7:&g< +U+01e8:&K< +U+01e9:&k< +U+01ea:&O; +U+01eb:&o; +U+01ec:&O1 +U+01ed:&o1 +U+01ee:&EZ +U+01ef:&ez +U+01f0:&j< +U+01f4:&G' +U+01f5:&g' +U+01fa:&_AA'_ +U+01fb:&_aa'_ +U+01fc:&_AE'_ +U+01fd:&_ae'_ +U+01fe:&_O/'_ +U+01ff:&_o/'_ +U+02bf:&;S +U+02c7:&'< +U+02d8:&'( +U+02d9:&'. +U+02da:&'0 +U+02db:&'; +U+02dd:&'" +U+0386:&A% +U+0388:&E% +U+0389:&Y% +U+038a:&I% +U+038c:&O% +U+038e:&U% +U+038f:&W% +U+0390:&i3 +U+0391:&A* +U+0392:&B* +U+0393:&G* +U+0394:&D* +U+0395:&E* +U+0396:&Z* +U+0397:&Y* +U+0398:&H* +U+0399:&I* +U+039a:&K* +U+039b:&L* +U+039c:&M* +U+039d:&N* +U+039e:&C* +U+039f:&O* +U+03a0:&P* +U+03a1:&R* +U+03a3:&S* +U+03a4:&T* +U+03a5:&U* +U+03a6:&F* +U+03a7:&X* +U+03a8:&Q* +U+03a9:&W* +U+03aa:&J* +U+03ab:&V* +U+03ac:&a% +U+03ad:&e% +U+03ae:&y% +U+03af:&i% +U+03b0:&u3 +U+03b1:&a* +U+03b2:&b* +U+03b3:&g* +U+03b4:&d* +U+03b5:&e* +U+03b6:&z* +U+03b7:&y* +U+03b8:&h* +U+03b9:&i* +U+03ba:&k* +U+03bb:&l* +U+03bc:&m* +U+03bd:&n* +U+03be:&c* +U+03bf:&o* +U+03c0:&p* +U+03c1:&r* +U+03c2:&*s +U+03c3:&s* +U+03c4:&t* +U+03c5:&u* +U+03c6:&f* +U+03c7:&x* +U+03c8:&q* +U+03c9:&w* +U+03ca:&j* +U+03cb:&v* +U+03cc:&o% +U+03cd:&u% +U+03ce:&w% +U+03d8:&'G +U+03d9:&,G +U+03da:&T3 +U+03db:&t3 +U+03dc:&M3 +U+03dd:&m3 +U+03de:&K3 +U+03df:&k3 +U+03e0:&P3 +U+03e1:&p3 +U+03f4:&'% +U+03f5:&j3 +U+0401:&IO +U+0402:&D% +U+0403:&G% +U+0404:&IE +U+0405:&DS +U+0406:&II +U+0407:&YI +U+0408:&J% +U+0409:&LJ +U+040a:&NJ +U+040b:&Ts +U+040c:&KJ +U+040e:&V% +U+040f:&DZ +U+0410:&A= +U+0411:&B= +U+0412:&V= +U+0413:&G= +U+0414:&D= +U+0415:&E= +U+0416:&Z% +U+0417:&Z= +U+0418:&I= +U+0419:&J= +U+041a:&K= +U+041b:&L= +U+041c:&M= +U+041d:&N= +U+041e:&O= +U+041f:&P= +U+0420:&R= +U+0421:&S= +U+0422:&T= +U+0423:&U= +U+0424:&F= +U+0425:&H= +U+0426:&C= +U+0427:&C% +U+0428:&S% +U+0429:&Sc +U+042a:&=" +U+042b:&Y= +U+042c:&%" +U+042d:&JE +U+042e:&JU +U+042f:&JA +U+0430:&a= +U+0431:&b= +U+0432:&v= +U+0433:&g= +U+0434:&d= +U+0435:&e= +U+0436:&z% +U+0437:&z= +U+0438:&i= +U+0439:&j= +U+043a:&k= +U+043b:&l= +U+043c:&m= +U+043d:&n= +U+043e:&o= +U+043f:&p= +U+0440:&r= +U+0441:&s= +U+0442:&t= +U+0443:&u= +U+0444:&f= +U+0445:&h= +U+0446:&c= +U+0447:&c% +U+0448:&s% +U+0449:&sc +U+044a:&=' +U+044b:&y= +U+044c:&%' +U+044d:&je +U+044e:&ju +U+044f:&ja +U+0451:&io +U+0452:&d% +U+0453:&g% +U+0454:&ie +U+0455:&ds +U+0456:&ii +U+0457:&yi +U+0458:&j% +U+0459:&lj +U+045a:&nj +U+045b:&ts +U+045c:&kj +U+045e:&v% +U+045f:&dz +U+0462:&Y3 +U+0463:&y3 +U+046a:&O3 +U+046b:&o3 +U+0472:&F3 +U+0473:&f3 +U+0474:&V3 +U+0475:&v3 +U+0480:&C3 +U+0481:&c3 +U+0490:&G3 +U+0491:&g3 +U+05d0:&A+ +U+05d1:&B+ +U+05d2:&G+ +U+05d3:&D+ +U+05d4:&H+ +U+05d5:&W+ +U+05d6:&Z+ +U+05d7:&X+ +U+05d8:&Tj +U+05d9:&J+ +U+05da:&K% +U+05db:&K+ +U+05dc:&L+ +U+05dd:&M% +U+05de:&M+ +U+05df:&N% +U+05e0:&N+ +U+05e1:&S+ +U+05e2:&E+ +U+05e3:&P% +U+05e4:&P+ +U+05e5:&Zj +U+05e6:&ZJ +U+05e7:&Q+ +U+05e8:&R+ +U+05e9:&Sh +U+05ea:&T+ +U+060c:&,+ +U+061b:&;+ +U+061f:&?+ +U+0621:&H' +U+0622:&aM +U+0623:&aH +U+0624:&wH +U+0625:&ah +U+0626:&yH +U+0627:&a+ +U+0628:&b+ +U+0629:&tm +U+062a:&t+ +U+062b:&tk +U+062c:&g+ +U+062d:&hk +U+062e:&x+ +U+062f:&d+ +U+0630:&dk +U+0631:&r+ +U+0632:&z+ +U+0633:&s+ +U+0634:&sn +U+0635:&c+ +U+0636:&dd +U+0637:&tj +U+0638:&zH +U+0639:&e+ +U+063a:&i+ +U+0640:&++ +U+0641:&f+ +U+0642:&q+ +U+0643:&k+ +U+0644:&l+ +U+0645:&m+ +U+0646:&n+ +U+0647:&h+ +U+0648:&w+ +U+0649:&j+ +U+064a:&y+ +U+064b:&:+ +U+064c:&"+ +U+064d:&=+ +U+064e:&/+ +U+064f:&'+ +U+0650:&1+ +U+0651:&3+ +U+0652:&0+ +U+0670:&aS +U+067e:&p+ +U+06a4:&v+ +U+06af:&gf +U+06f0:&0a +U+06f1:&1a +U+06f2:&2a +U+06f3:&3a +U+06f4:&4a +U+06f5:&5a +U+06f6:&6a +U+06f7:&7a +U+06f8:&8a +U+06f9:&9a +U+1e00:&_A-0_ +U+1e01:&_a-0_ +U+1e02:&B. +U+1e03:&b. +U+1e04:&_B-._ +U+1e05:&_b-._ +U+1e06:&B_ +U+1e07:&b_ +U+1e08:&_C,'_ +U+1e09:&_c,'_ +U+1e0a:&D. +U+1e0b:&d. +U+1e0c:&_D-._ +U+1e0d:&_d-._ +U+1e0e:&D_ +U+1e0f:&d_ +U+1e10:&D, +U+1e11:&d, +U+1e12:&_D->_ +U+1e13:&_d->_ +U+1e14:&_E-!_ +U+1e15:&_e-!_ +U+1e16:&_E-'_ +U+1e17:&_e-'_ +U+1e18:&_E->_ +U+1e19:&_e->_ +U+1e1a:&_E-?_ +U+1e1b:&_e-?_ +U+1e1c:&_E,(_ +U+1e1d:&_e,(_ +U+1e1e:&F. +U+1e1f:&f. +U+1e20:&G- +U+1e21:&g- +U+1e22:&H. +U+1e23:&h. +U+1e24:&_H-._ +U+1e25:&_h-._ +U+1e26:&H: +U+1e27:&h: +U+1e28:&H, +U+1e29:&h, +U+1e2a:&_H-(_ +U+1e2b:&_h-(_ +U+1e2c:&_I-?_ +U+1e2d:&_i-?_ +U+1e2e:&_I:'_ +U+1e2f:&_i:'_ +U+1e30:&K' +U+1e31:&k' +U+1e32:&_K-._ +U+1e33:&_k-._ +U+1e34:&K_ +U+1e35:&k_ +U+1e36:&_L-._ +U+1e37:&_l-._ +U+1e38:&_L--._ +U+1e39:&_l--._ +U+1e3a:&L_ +U+1e3b:&l_ +U+1e3c:&_L->_ +U+1e3d:&_l->_ +U+1e3e:&M' +U+1e3f:&m' +U+1e40:&M. +U+1e41:&m. +U+1e42:&_M-._ +U+1e43:&_m-._ +U+1e44:&N. +U+1e45:&n. +U+1e46:&_N-._ +U+1e47:&_n-._ +U+1e48:&N_ +U+1e49:&n_ +U+1e4a:&_N->_ +U+1e4b:&_N->_ +U+1e4c:&_O?'_ +U+1e4d:&_o?'_ +U+1e4e:&_O?:_ +U+1e4f:&_o?:_ +U+1e50:&_O-!_ +U+1e51:&_o-!_ +U+1e52:&_O-'_ +U+1e53:&_o-'_ +U+1e54:&P' +U+1e55:&p' +U+1e56:&P. +U+1e57:&p. +U+1e58:&R. +U+1e59:&r. +U+1e5a:&_R-._ +U+1e5b:&_r-._ +U+1e5c:&_R--._ +U+1e5d:&_r--._ +U+1e5e:&R_ +U+1e5f:&r_ +U+1e60:&S. +U+1e61:&s. +U+1e62:&_S-._ +U+1e63:&_s-._ +U+1e64:&_S'._ +U+1e65:&_s'._ +U+1e66:&_S<._ +U+1e67:&_s<._ +U+1e68:&_S.-._ +U+1e69:&_S.-._ +U+1e6a:&T. +U+1e6b:&t. +U+1e6c:&_T-._ +U+1e6d:&_t-._ +U+1e6e:&T_ +U+1e6f:&t_ +U+1e70:&_T->_ +U+1e71:&_t->_ +U+1e72:&_U--:_ +U+1e73:&_u--:_ +U+1e74:&_U-?_ +U+1e75:&_u-?_ +U+1e76:&_U->_ +U+1e77:&_u->_ +U+1e78:&_U?'_ +U+1e79:&_u?'_ +U+1e7a:&_U-:_ +U+1e7b:&_u-:_ +U+1e7c:&V? +U+1e7d:&v? +U+1e7e:&_V-._ +U+1e7f:&_v-._ +U+1e80:&W! +U+1e81:&w! +U+1e82:&W' +U+1e83:&w' +U+1e84:&W: +U+1e85:&w: +U+1e86:&W. +U+1e87:&w. +U+1e88:&_W-._ +U+1e89:&_w-._ +U+1e8a:&X. +U+1e8b:&x. +U+1e8c:&X: +U+1e8d:&x: +U+1e8e:&Y. +U+1e8f:&y. +U+1e90:&Z> +U+1e91:&z> +U+1e92:&_Z-._ +U+1e93:&_z-._ +U+1e94:&Z_ +U+1e95:&z_ +U+1e96:&h_ +U+1e97:&t: +U+1e98:&w0 +U+1e99:&y0 +U+1ea0:&_A-._ +U+1ea1:&_a-._ +U+1ea2:&A2 +U+1ea3:&a2 +U+1ea4:&_A>'_ +U+1ea5:&_a>'_ +U+1ea6:&_A>!_ +U+1ea7:&_a>!_ +U+1ea8:&_A>2_ +U+1ea9:&_a>2_ +U+1eaa:&_A>?_ +U+1eab:&_a>?_ +U+1eac:&_A>-._ +U+1ead:&_a>-._ +U+1eae:&_A('_ +U+1eaf:&_a('_ +U+1eb0:&_A(!_ +U+1eb1:&_a(!_ +U+1eb2:&_A(2_ +U+1eb3:&_a(2_ +U+1eb4:&_A(?_ +U+1eb5:&_a(?_ +U+1eb6:&_A(-._ +U+1eb7:&_a(-._ +U+1eb8:&_E-._ +U+1eb9:&_e-._ +U+1eba:&E2 +U+1ebb:&e2 +U+1ebc:&E? +U+1ebd:&e? +U+1ebe:&_E>'_ +U+1ebf:&_e>'_ +U+1ec0:&_E>!_ +U+1ec1:&_e>!_ +U+1ec2:&_E>2_ +U+1ec3:&_e>2_ +U+1ec4:&_E>?_ +U+1ec5:&_e>?_ +U+1ec6:&_E>-._ +U+1ec7:&_e>-._ +U+1ec8:&I2 +U+1ec9:&i2 +U+1eca:&_I-._ +U+1ecb:&_i-._ +U+1ecc:&_O-._ +U+1ecd:&_o-._ +U+1ece:&O2 +U+1ecf:&o2 +U+1ed0:&_O>'_ +U+1ed1:&_o>'_ +U+1ed2:&_O>!_ +U+1ed3:&_o>!_ +U+1ed4:&_O>2_ +U+1ed5:&_o>2_ +U+1ed6:&_O>?_ +U+1ed7:&_o>?_ +U+1ed8:&_O>-._ +U+1ed9:&_o>-._ +U+1eda:&_O9'_ +U+1edb:&_o9'_ +U+1edc:&_O9!_ +U+1edd:&_o9!_ +U+1ede:&_O92_ +U+1edf:&_o92_ +U+1ee0:&_O9?_ +U+1ee1:&_o9?_ +U+1ee2:&_O9-._ +U+1ee3:&_o9-._ +U+1ee4:&_U-._ +U+1ee5:&_u-._ +U+1ee6:&U2 +U+1ee7:&u2 +U+1ee8:&_U9'_ +U+1ee9:&_u9'_ +U+1eea:&_U9!_ +U+1eeb:&_u9!_ +U+1eec:&_U92_ +U+1eed:&_u92_ +U+1eee:&_U9?_ +U+1eef:&_u9?_ +U+1ef0:&_U9-._ +U+1ef1:&_u9-._ +U+1ef2:&Y! +U+1ef3:&y! +U+1ef4:&_Y-._ +U+1ef5:&_y-._ +U+1ef6:&Y2 +U+1ef7:&y2 +U+1ef8:&Y? +U+1ef9:&y? +U+1f00:&;' +U+1f01:&,' +U+1f02:&;! +U+1f03:&,! +U+1f04:&?; +U+1f05:&?, +U+1f06:&!: +U+1f07:&?: +U+2002:&1N +U+2003:&1M +U+2004:&3M +U+2005:&4M +U+2006:&6M +U+2009:&1T +U+200a:&1H +U+2010:&-1 +U+2013:&-N +U+2014:&-M +U+2015:&-3 +U+2016:&!2 +U+2017:&=2 +U+2018:&'6 +U+2019:&'9 +U+201a:&.9 +U+201b:&9' +U+201c:&"6 +U+201d:&"9 +U+201e:&:9 +U+201f:&9" +U+2020:&/- +U+2021:&/= +U+2025:&.. +U+2030:&%0 +U+2032:&1' +U+2033:&2' +U+2034:&3' +U+2035:&1" +U+2036:&2" +U+2037:&3" +U+2038:&Ca +U+2039:&<1 +U+203a:&>1 +U+203b:&:X +U+203c:&_!*2_ +U+203e:&'- +U+2044:&/f +U+2070:&0S +U+2074:&4S +U+2075:&5S +U+2076:&6S +U+2077:&7S +U+2078:&8S +U+2079:&9S +U+207a:&+S +U+207b:&-S +U+207c:&=S +U+207d:&(S +U+207e:&)S +U+207f:&nS +U+2080:&0s +U+2081:&1s +U+2082:&2s +U+2083:&3s +U+2084:&4s +U+2085:&5s +U+2086:&6s +U+2087:&7s +U+2088:&8s +U+2089:&9s +U+208a:&+s +U+208b:&-s +U+208c:&=s +U+208d:&(s +U+208e:&)s +U+20a4:&Li +U+20a7:&Pt +U+20a9:&W= +U+2103:&oC +U+2105:&co +U+2109:&oF +U+2116:&N0 +U+2117:&PO +U+211e:&Rx +U+2120:&SM +U+2122:&TM +U+2126:&Om +U+212b:&AO +U+2153:&13 +U+2154:&23 +U+2155:&15 +U+2156:&25 +U+2157:&35 +U+2158:&45 +U+2159:&16 +U+215a:&56 +U+215b:&18 +U+215c:&38 +U+215d:&58 +U+215e:&78 +U+2160:&1R +U+2161:&2R +U+2162:&3R +U+2163:&4R +U+2164:&5R +U+2165:&6R +U+2166:&7R +U+2167:&8R +U+2168:&9R +U+2169:&aR +U+216a:&bR +U+216b:&cR +U+216c:&_50R_ +U+216d:&_100R_ +U+216e:&_500R_ +U+216f:&_1000R_ +U+2170:&1r +U+2171:&2r +U+2172:&3r +U+2173:&4r +U+2174:&5r +U+2175:&6r +U+2176:&7r +U+2177:&8r +U+2178:&9r +U+2179:&ar +U+217a:&br +U+217b:&cr +U+217c:&_50r_ +U+217d:&_100r_ +U+217e:&_500r_ +U+217f:&_1000r_ +U+2180:&_1000RCD_ +U+2181:&_5000R_ +U+2182:&_10000R_ +U+2190:&<- +U+2191:&-! +U+2192:&-> +U+2193:&-v +U+2194:&<> +U+2195:&UD +U+2196:&_<!!_ +U+2197:&_//>_ +U+2198:&_!!>_ +U+2199:&_<//_ +U+21d0:&<= +U+21d2:&=> +U+21d4:&== +U+2200:&FA +U+2202:&dP +U+2203:&TE +U+2205:&/0 +U+2206:&DE +U+2207:&NB +U+2208:&(- +U+220b:&-) +U+220f:&*P +U+2211:&+Z +U+2212:&-2 +U+2213:&-+ +U+2217:&*- +U+2218:&Ob +U+2219:&Sb +U+221a:&RT +U+221d:&0( +U+221e:&00 +U+221f:&-L +U+2220:&-V +U+2225:&PP +U+2227:&AN +U+2228:&OR +U+2229:&(U +U+222a:&)U +U+222b:&In +U+222c:&DI +U+222e:&Io +U+2234:&.: +U+2235:&:. +U+2236:&:R +U+2237:&:: +U+223c:&?1 +U+223e:&CG +U+2243:&?- +U+2245:&?= +U+2248:&?2 +U+224c:&=? +U+2253:&HI +U+2260:&!= +U+2261:&=3 +U+2264:&=< +U+2265:&>= +U+226a:&<* +U+226b:&*> +U+226e:&!< +U+226f:&!> +U+2282:&(C +U+2283:&)C +U+2286:&(_ +U+2287:&)_ +U+2299:&0. +U+229a:&02 +U+22a5:&-T +U+22c5:&.P +U+22ee:&:3 +U+22ef:&.3 +U+2302:&Eh +U+2308:&<7 +U+2309:&>7 +U+230a:&7< +U+230b:&7> +U+2310:&NI +U+2312:&(A +U+2315:&TR +U+2320:&Iu +U+2321:&Il +U+2329:&</ +U+232a:&/> +U+2423:&Vs +U+2440:&1h +U+2441:&3h +U+2442:&2h +U+2443:&4h +U+2446:&1j +U+2447:&2j +U+2448:&3j +U+2449:&4j +U+2460:&_1-o_ +U+2461:&_2-o_ +U+2462:&_3-o_ +U+2463:&_4-o_ +U+2464:&_5-o_ +U+2465:&_6-o_ +U+2466:&_7-o_ +U+2467:&_8-o_ +U+2468:&_9-o_ +U+2469:&_10-o_ +U+246a:&_11-o_ +U+246b:&_12-o_ +U+246c:&_13-o_ +U+246d:&_14-o_ +U+246e:&_15-o_ +U+246f:&_16-o_ +U+2470:&_17-o_ +U+2471:&_18-o_ +U+2472:&_19-o_ +U+2473:&_20-o_ +U+2474:&_(1)_ +U+2475:&_(2)_ +U+2476:&_(3)_ +U+2477:&_(4)_ +U+2478:&_(5)_ +U+2479:&_(6)_ +U+247a:&_(7)_ +U+247b:&_(8)_ +U+247c:&_(9)_ +U+247d:&_(10)_ +U+247e:&_(11)_ +U+247f:&_(12)_ +U+2480:&_(13)_ +U+2481:&_(14)_ +U+2482:&_(15)_ +U+2483:&_(16)_ +U+2484:&_(17)_ +U+2485:&_(18)_ +U+2486:&_(19)_ +U+2487:&_(20)_ +U+2488:&1. +U+2489:&2. +U+248a:&3. +U+248b:&4. +U+248c:&5. +U+248d:&6. +U+248e:&7. +U+248f:&8. +U+2490:&9. +U+2491:&_10._ +U+2492:&_11._ +U+2493:&_12._ +U+2494:&_13._ +U+2495:&_14._ +U+2496:&_15._ +U+2497:&_16._ +U+2498:&_17._ +U+2499:&_18._ +U+249a:&_19._ +U+249b:&_20._ +U+249c:&_(a)_ +U+249d:&_(b)_ +U+249e:&_(c)_ +U+249f:&_(d)_ +U+24a0:&_(e)_ +U+24a1:&_(f)_ +U+24a2:&_(g)_ +U+24a3:&_(h)_ +U+24a4:&_(i)_ +U+24a5:&_(j)_ +U+24a6:&_(k)_ +U+24a7:&_(l)_ +U+24a8:&_(m)_ +U+24a9:&_(n)_ +U+24aa:&_(o)_ +U+24ab:&_(p)_ +U+24ac:&_(q)_ +U+24ad:&_(r)_ +U+24ae:&_(s)_ +U+24af:&_(t)_ +U+24b0:&_(u)_ +U+24b1:&_(v)_ +U+24b2:&_(w)_ +U+24b3:&_(x)_ +U+24b4:&_(y)_ +U+24b5:&_(z)_ +U+24b6:&_A-o_ +U+24b7:&_B-o_ +U+24b8:&_C-o_ +U+24b9:&_D-o_ +U+24ba:&_E-o_ +U+24bb:&_F-o_ +U+24bc:&_G-o_ +U+24bd:&_H-o_ +U+24be:&_I-o_ +U+24bf:&_J-o_ +U+24c0:&_K-o_ +U+24c1:&_L-o_ +U+24c2:&_M-o_ +U+24c3:&_N-o_ +U+24c4:&_O-o_ +U+24c5:&_P-o_ +U+24c6:&_Q-o_ +U+24c7:&_R-o_ +U+24c8:&_S-o_ +U+24c9:&_T-o_ +U+24ca:&_U-o_ +U+24cb:&_V-o_ +U+24cc:&_W-o_ +U+24cd:&_X-o_ +U+24ce:&_Y-o_ +U+24cf:&_Z-o_ +U+24d0:&_a-o_ +U+24d1:&_b-o_ +U+24d2:&_c-o_ +U+24d3:&_d-o_ +U+24d4:&_e-o_ +U+24d5:&_f-o_ +U+24d6:&_g-o_ +U+24d7:&_h-o_ +U+24d8:&_i-o_ +U+24d9:&_j-o_ +U+24da:&_k-o_ +U+24db:&_l-o_ +U+24dc:&_m-o_ +U+24dd:&_n-o_ +U+24de:&_o-o_ +U+24df:&_p-o_ +U+24e0:&_q-o_ +U+24e1:&_r-o_ +U+24e2:&_s-o_ +U+24e3:&_t-o_ +U+24e4:&_u-o_ +U+24e5:&_v-o_ +U+24e6:&_w-o_ +U+24e7:&_x-o_ +U+24e8:&_y-o_ +U+24e9:&_z-o_ +U+24ea:&_0-o_ +U+2500:&hh +U+2501:&HH +U+2502:&vv +U+2503:&VV +U+2504:&3- +U+2505:&3_ +U+2506:&3! +U+2507:&3/ +U+2508:&4- +U+2509:&4_ +U+250a:&4! +U+250b:&4/ +U+250c:&dr +U+250d:&dR +U+250e:&Dr +U+250f:&DR +U+2510:&dl +U+2511:&dL +U+2512:&Dl +U+2513:&LD +U+2514:&ur +U+2515:&uR +U+2516:&Ur +U+2517:&UR +U+2518:&ul +U+2519:&uL +U+251a:&Ul +U+251b:&UL +U+251c:&vr +U+251d:&vR +U+251e:&_Udr_ +U+251f:&_uDr_ +U+2520:&Vr +U+2521:&_UdR_ +U+2522:&_uDR_ +U+2523:&VR +U+2524:&vl +U+2525:&vL +U+2526:&_Udl_ +U+2527:&_uDl_ +U+2528:&Vl +U+2529:&_UdL_ +U+252a:&_uDL_ +U+252b:&VL +U+252c:&dh +U+252d:&_dLr_ +U+252e:&_dlR_ +U+252f:&dH +U+2530:&Dh +U+2531:&_DLr_ +U+2532:&_DlR_ +U+2533:&DH +U+2534:&uh +U+2535:&_uLr_ +U+2536:&_ulR_ +U+2537:&uH +U+2538:&Uh +U+2539:&_ULr_ +U+253a:&_UlR_ +U+253b:&UH +U+253c:&vh +U+253d:&_vLr_ +U+253e:&_vlR_ +U+253f:&vH +U+2540:&_Udh_ +U+2541:&_uDh_ +U+2542:&Vh +U+2543:&_UdLr_ +U+2544:&_UdlR_ +U+2545:&_uDLr_ +U+2546:&_uDlR_ +U+2547:&_UdH_ +U+2548:&_uDH_ +U+2549:&_VLr_ +U+254a:&_VlR_ +U+254b:&VH +U+2571:&FD +U+2572:&BD +U+2580:&TB +U+2584:&LB +U+2588:&FB +U+258c:&lB +U+2590:&RB +U+2591:&.S +U+2592:&:S +U+2593:&?S +U+25a0:&fS +U+25a1:&OS +U+25a2:&RO +U+25a3:&Rr +U+25a4:&RF +U+25a5:&RY +U+25a6:&RH +U+25a7:&RZ +U+25a8:&RK +U+25a9:&RX +U+25aa:&sB +U+25ac:&SR +U+25ad:&Or +U+25b2:&UT +U+25b3:&uT +U+25b6:&PR +U+25b7:&Tr +U+25bc:&Dt +U+25bd:&dT +U+25c0:&PL +U+25c1:&Tl +U+25c6:&Db +U+25c7:&Dw +U+25ca:&LZ +U+25cb:&0m +U+25ce:&0o +U+25cf:&0M +U+25d0:&0L +U+25d1:&0R +U+25d8:&Sn +U+25d9:&Ic +U+25e2:&Fd +U+25e3:&Bd +U+2605:&*2 +U+2606:&*1 +U+260e:&_TEL_ +U+260f:&_tel_ +U+261c:&<H +U+261e:&>H +U+263a:&0u +U+263b:&0U +U+263c:&SU +U+2640:&Fm +U+2642:&Ml +U+2660:&cS +U+2661:&cH +U+2662:&cD +U+2663:&cC +U+2664:&_cS-_ +U+2665:&_cH-_ +U+2666:&_cD-_ +U+2667:&_cC-_ +U+2669:&Md +U+266a:&M8 +U+266b:&M2 +U+266c:&_M16_ +U+266d:&Mb +U+266e:&Mx +U+266f:&MX +U+2713:&OK +U+2717:&XX +U+2720:&-X +U+3000:&IS +U+3001:&,_ +U+3002:&._ +U+3003:&+" +U+3004:&+_ +U+3005:&*_ +U+3006:&;_ +U+3007:&0_ +U+300a:&<+ +U+300b:&>+ +U+300c:&<' +U+300d:&>' +U+300e:&<" +U+300f:&>" +U+3010:&(" +U+3011:&)" +U+3012:&=T +U+3013:&=_ +U+3014:&(' +U+3015:&)' +U+3016:&(I +U+3017:&)I +U+301c:&-? +U+3020:&_=T:)_ +U+3041:&A5 +U+3042:&a5 +U+3043:&I5 +U+3044:&i5 +U+3045:&U5 +U+3046:&u5 +U+3047:&E5 +U+3048:&e5 +U+3049:&O5 +U+304a:&o5 +U+304b:&ka +U+304c:&ga +U+304d:&ki +U+304e:&gi +U+304f:&ku +U+3050:&gu +U+3051:&ke +U+3052:&ge +U+3053:&ko +U+3054:&go +U+3055:&sa +U+3056:&za +U+3057:&si +U+3058:&zi +U+3059:&su +U+305a:&zu +U+305b:&se +U+305c:&ze +U+305d:&so +U+305e:&zo +U+305f:&ta +U+3060:&da +U+3061:&ti +U+3062:&di +U+3063:&tU +U+3064:&tu +U+3065:&du +U+3066:&te +U+3067:&de +U+3068:&to +U+3069:&do +U+306a:&na +U+306b:&ni +U+306c:&nu +U+306d:&ne +U+306e:&no +U+306f:&ha +U+3070:&ba +U+3071:&pa +U+3072:&hi +U+3073:&bi +U+3074:&pi +U+3075:&hu +U+3076:&bu +U+3077:&pu +U+3078:&he +U+3079:&be +U+307a:&pe +U+307b:&ho +U+307c:&bo +U+307d:&po +U+307e:&ma +U+307f:&mi +U+3080:&mu +U+3081:&me +U+3082:&mo +U+3083:&yA +U+3084:&ya +U+3085:&yU +U+3086:&yu +U+3087:&yO +U+3088:&yo +U+3089:&ra +U+308a:&ri +U+308b:&ru +U+308c:&re +U+308d:&ro +U+308e:&wA +U+308f:&wa +U+3090:&wi +U+3091:&we +U+3092:&wo +U+3093:&n5 +U+3094:&vu +U+309b:&"5 +U+309c:&05 +U+309d:&*5 +U+309e:&+5 +U+30a1:&a6 +U+30a2:&A6 +U+30a3:&i6 +U+30a4:&I6 +U+30a5:&u6 +U+30a6:&U6 +U+30a7:&e6 +U+30a8:&E6 +U+30a9:&o6 +U+30aa:&O6 +U+30ab:&Ka +U+30ac:&Ga +U+30ad:&Ki +U+30ae:&Gi +U+30af:&Ku +U+30b0:&Gu +U+30b1:&Ke +U+30b2:&Ge +U+30b3:&Ko +U+30b4:&Go +U+30b5:&Sa +U+30b6:&Za +U+30b7:&Si +U+30b8:&Zi +U+30b9:&Su +U+30ba:&Zu +U+30bb:&Se +U+30bc:&Ze +U+30bd:&So +U+30be:&Zo +U+30bf:&Ta +U+30c0:&Da +U+30c1:&Ti +U+30c2:&Di +U+30c3:&TU +U+30c4:&Tu +U+30c5:&Du +U+30c6:&Te +U+30c7:&De +U+30c8:&To +U+30c9:&Do +U+30ca:&Na +U+30cb:&Ni +U+30cc:&Nu +U+30cd:&Ne +U+30ce:&No +U+30cf:&Ha +U+30d0:&Ba +U+30d1:&Pa +U+30d2:&Hi +U+30d3:&Bi +U+30d4:&Pi +U+30d5:&Hu +U+30d6:&Bu +U+30d7:&Pu +U+30d8:&He +U+30d9:&Be +U+30da:&Pe +U+30db:&Ho +U+30dc:&Bo +U+30dd:&Po +U+30de:&Ma +U+30df:&Mi +U+30e0:&Mu +U+30e1:&Me +U+30e2:&Mo +U+30e3:&YA +U+30e4:&Ya +U+30e5:&YU +U+30e6:&Yu +U+30e7:&YO +U+30e8:&Yo +U+30e9:&Ra +U+30ea:&Ri +U+30eb:&Ru +U+30ec:&Re +U+30ed:&Ro +U+30ee:&WA +U+30ef:&Wa +U+30f0:&Wi +U+30f1:&We +U+30f2:&Wo +U+30f3:&N6 +U+30f4:&Vu +U+30f5:&KA +U+30f6:&KE +U+30f7:&Va +U+30f8:&Vi +U+30f9:&Ve +U+30fa:&Vo +U+30fb:&.6 +U+30fc:&-6 +U+30fd:&*6 +U+30fe:&+6 +U+3105:&b4 +U+3106:&p4 +U+3107:&m4 +U+3108:&f4 +U+3109:&d4 +U+310a:&t4 +U+310b:&n4 +U+310c:&l4 +U+310d:&g4 +U+310e:&k4 +U+310f:&h4 +U+3110:&j4 +U+3111:&q4 +U+3112:&x4 +U+3113:&zh +U+3114:&ch +U+3115:&sh +U+3116:&r4 +U+3117:&z4 +U+3118:&c4 +U+3119:&s4 +U+311a:&a4 +U+311b:&o4 +U+311c:&e4 +U+311d:&_eh4_ +U+311e:&ai +U+311f:&ei +U+3120:&au +U+3121:&ou +U+3122:&an +U+3123:&en +U+3124:&aN +U+3125:&eN +U+3126:&er +U+3127:&i4 +U+3128:&u4 +U+3129:&iu +U+312a:&v4 +U+312b:&nG +U+312c:&gn +U+321c:&_(JU)_ +U+3220:&1c +U+3221:&2c +U+3222:&3c +U+3223:&4c +U+3224:&5c +U+3225:&6c +U+3226:&7c +U+3227:&8c +U+3228:&9c +U+3229:&_10c_ +U+327f:&_KSC_ +U+fb00:&ff +U+fb01:&fi +U+fb02:&fl +U+fb03:&_ffi_ +U+fb04:&_ffl_ +U+fb05:&ft +U+fb06:&st +U+fe7d:&_3+;_ +U+fe82:&_aM._ +U+fe84:&_aH._ +U+fe8d:&_a+-_ +U+fe8e:&_a+._ +U+fe8f:&_b+-_ +U+fe90:&_b+,_ +U+fe91:&_b+;_ +U+fe92:&_b+._ +U+fe93:&_tm-_ +U+fe94:&_tm._ +U+fe95:&_t+-_ +U+fe96:&_t+,_ +U+fe97:&_t+;_ +U+fe98:&_t+._ +U+fe99:&_tk-_ +U+fe9a:&_tk,_ +U+fe9b:&_tk;_ +U+fe9c:&_tk._ +U+fe9d:&_g+-_ +U+fe9e:&_g+,_ +U+fe9f:&_g+;_ +U+fea0:&_g+._ +U+fea1:&_hk-_ +U+fea2:&_hk,_ +U+fea3:&_hk;_ +U+fea4:&_hk._ +U+fea5:&_x+-_ +U+fea6:&_x+,_ +U+fea7:&_x+;_ +U+fea8:&_x+._ +U+fea9:&_d+-_ +U+feaa:&_d+._ +U+feab:&_dk-_ +U+feac:&_dk._ +U+fead:&_r+-_ +U+feae:&_r+._ +U+feaf:&_z+-_ +U+feb0:&_z+._ +U+feb1:&_s+-_ +U+feb2:&_s+,_ +U+feb3:&_s+;_ +U+feb4:&_s+._ +U+feb5:&_sn-_ +U+feb6:&_sn,_ +U+feb7:&_sn;_ +U+feb8:&_sn._ +U+feb9:&_c+-_ +U+feba:&_c+,_ +U+febb:&_c+;_ +U+febc:&_c+._ +U+febd:&_dd-_ +U+febe:&_dd,_ +U+febf:&_dd;_ +U+fec0:&_dd._ +U+fec1:&_tj-_ +U+fec2:&_tj,_ +U+fec3:&_tj;_ +U+fec4:&_tj._ +U+fec5:&_zH-_ +U+fec6:&_zH,_ +U+fec7:&_zH;_ +U+fec8:&_zH._ +U+fec9:&_e+-_ +U+feca:&_e+,_ +U+fecb:&_e+;_ +U+fecc:&_e+._ +U+fecd:&_i+-_ +U+fece:&_i+,_ +U+fecf:&_i+;_ +U+fed0:&_i+._ +U+fed1:&_f+-_ +U+fed2:&_f+,_ +U+fed3:&_f+;_ +U+fed4:&_f+._ +U+fed5:&_q+-_ +U+fed6:&_q+,_ +U+fed7:&_q+;_ +U+fed8:&_q+._ +U+fed9:&_k+-_ +U+feda:&_k+,_ +U+fedb:&_k+;_ +U+fedc:&_k+._ +U+fedd:&_l+-_ +U+fede:&_l+,_ +U+fedf:&_l+;_ +U+fee0:&_l+._ +U+fee1:&_m+-_ +U+fee2:&_m+,_ +U+fee3:&_m+;_ +U+fee4:&_m+._ +U+fee5:&_n+-_ +U+fee6:&_n+,_ +U+fee7:&_n+;_ +U+fee8:&_n+._ +U+fee9:&_h+-_ +U+feea:&_h+,_ +U+feeb:&_h+;_ +U+feec:&_h+._ +U+feed:&_w+-_ +U+feee:&_w+._ +U+feef:&_j+-_ +U+fef0:&_j+._ +U+fef1:&_y+-_ +U+fef2:&_y+,_ +U+fef3:&_y+;_ +U+fef4:&_y+._ +U+fef5:&_lM-_ +U+fef6:&_lM._ +U+fef7:&_lH-_ +U+fef8:&_lH._ +U+fef9:&_lh-_ +U+fefa:&_lh._ +U+fefb:&_la-_ +U+fefc:&_la._ +U+0000:&NU +U+0001:&SH +U+0002:&SX +U+0003:&EX +U+0004:&ET +U+0005:&EQ +U+0006:&AK +U+0007:&BL +U+0008:&BS +U+0009:&HT +# U+000a:&LF +U+000b:&VT +U+000c:&FF +U+000d:&CR +U+000e:&SO +U+000f:&SI +U+0010:&DL +U+0011:&D1 +U+0012:&D2 +U+0013:&D3 +U+0014:&D4 +U+0015:&NK +U+0016:&SY +U+0017:&EB +U+0018:&CN +U+0019:&EM +U+001a:&SB +U+001b:&EC +U+001c:&FS +U+001d:&GS +U+001e:&RS +U+001f:&US +U+007f:&DT +U+0080:&PA +U+0081:&HO +U+0082:&BH +U+0083:&NH +U+0084:&IN +U+0085:&NL +U+0086:&SA +U+0087:&ES +U+0088:&HS +U+0089:&HJ +U+008a:&VS +U+008b:&PD +U+008c:&PU +U+008d:&RI +U+008e:&S2 +U+008f:&S3 +U+0090:&DC +U+0091:&P1 +U+0092:&P2 +U+0093:&TS +U+0094:&CC +U+0095:&MW +U+0096:&SG +U+0097:&EG +U+0098:&SS +U+0099:&GC +U+009a:&SC +U+009b:&CI +U+009c:&ST +U+009d:&OC +U+009e:&PM +U+009f:&AC +U+e001:&/c +U+e002:&UA +U+e003:&UB +U+e004:&"3 +U+e005:&"1 +U+e006:&"! +U+e007:&"' +U+e008:&"> +U+e009:&"? +U+e00a:&"- +U+e00b:&"( +U+e00c:&". +U+e00d:&": +U+e00e:&"0 +U+e00f:&"" +U+e010:&"< +U+e011:&", +U+e012:&"; +U+e013:&"_ +U+e014:&"= +U+e015:&"/ +U+e016:&"i +U+e017:&"d +U+e018:&"p +U+e019:&;; +U+e01a:&,, +U+e01b:&b3 +U+e01c:&Ci +U+e01d:&f( +U+e01e:&ed +U+e01f:&am +U+e020:&pm +U+e021:&_Tel_ +U+e022:&_a+:_ +U+e023:&Fl +U+e024:&GF +U+e025:&>V +U+e026:&!* +U+e027:&?* +U+e028:&J< diff --git a/src/chrtrans/rfc_suni.tbl b/src/chrtrans/rfc_suni.tbl new file mode 100644 index 00000000..5df75265 --- /dev/null +++ b/src/chrtrans/rfc_suni.tbl @@ -0,0 +1,1981 @@ +# Generated from the mnemonic file found under ftp://dkuug.dk/i18n/ +# then hand-tweaked +# perl -n -e \ +# 'if (s|<([^ \t]+)>\s+<U([\dA-Z]{4})>\s.*$|U+\L\2\E:\1|) {s|/?(.)|\1|g&&print}'\ +# mnemonic,ds + +#The MIME name of this charset. +Mmnemonic+ascii+0 + +#Name as a Display Charset (used on Options screen) +ORFC 1345 w/o Intro + +U+0020:SP +U+0021:! +U+0022:" +U+0023:Nb +U+0024:DO +U+0025:% +U+0026:& +U+0027:' +U+0028:( +U+0029:) +U+002a:* +U+002b:+ +U+002c:, +U+002d:- +U+002e:. +U+002f:/ +U+0030:0 +U+0031:1 +U+0032:2 +U+0033:3 +U+0034:4 +U+0035:5 +U+0036:6 +U+0037:7 +U+0038:8 +U+0039:9 +U+003a:: +U+003b:; +U+003c:< +U+003d:= +U+003e:> +U+003f:? +U+0040:At +U+0041:A +U+0042:B +U+0043:C +U+0044:D +U+0045:E +U+0046:F +U+0047:G +U+0048:H +U+0049:I +U+004a:J +U+004b:K +U+004c:L +U+004d:M +U+004e:N +U+004f:O +U+0050:P +U+0051:Q +U+0052:R +U+0053:S +U+0054:T +U+0055:U +U+0056:V +U+0057:W +U+0058:X +U+0059:Y +U+005a:Z +U+005b:<( +U+005c:// +U+005d:)> +U+005e:'> +U+005f:_ +U+0060:'! +U+0061:a +U+0062:b +U+0063:c +U+0064:d +U+0065:e +U+0066:f +U+0067:g +U+0068:h +U+0069:i +U+006a:j +U+006b:k +U+006c:l +U+006d:m +U+006e:n +U+006f:o +U+0070:p +U+0071:q +U+0072:r +U+0073:s +U+0074:t +U+0075:u +U+0076:v +U+0077:w +U+0078:x +U+0079:y +U+007a:z +U+007b:(! +U+007c:!! +U+007d:!) +U+007e:'? +U+00a0:NS +U+00a1:!I +U+00a2:Ct +U+00a3:Pd +U+00a4:Cu +U+00a5:Ye +U+00a6:BB +U+00a7:SE +U+00a8:': +U+00a9:Co +U+00aa:-a +U+00ab:<< +U+00ac:NO +U+00ad:-- +U+00ae:Rg +U+00af:'m +U+00b0:DG +U+00b1:+- +U+00b2:2S +U+00b3:3S +U+00b4:'' +U+00b5:My +U+00b6:PI +U+00b7:.M +U+00b8:', +U+00b9:1S +U+00ba:-o +U+00bb:>> +U+00bc:14 +U+00bd:12 +U+00be:34 +U+00bf:?I +U+00c0:A! +U+00c1:A' +U+00c2:A> +U+00c3:A? +U+00c4:A: +U+00c5:AA +U+00c6:AE +U+00c7:C, +U+00c8:E! +U+00c9:E' +U+00ca:E> +U+00cb:E: +U+00cc:I! +U+00cd:I' +U+00ce:I> +U+00cf:I: +U+00d0:D- +U+00d1:N? +U+00d2:O! +U+00d3:O' +U+00d4:O> +U+00d5:O? +U+00d6:O: +U+00d7:*X +U+00d8:O/ +U+00d9:U! +U+00da:U' +U+00db:U> +U+00dc:U: +U+00dd:Y' +U+00de:TH +U+00df:ss +U+00e0:a! +U+00e1:a' +U+00e2:a> +U+00e3:a? +U+00e4:a: +U+00e5:aa +U+00e6:ae +U+00e7:c, +U+00e8:e! +U+00e9:e' +U+00ea:e> +U+00eb:e: +U+00ec:i! +U+00ed:i' +U+00ee:i> +U+00ef:i: +U+00f0:d- +U+00f1:n? +U+00f2:o! +U+00f3:o' +U+00f4:o> +U+00f5:o? +U+00f6:o: +U+00f7:-: +U+00f8:o/ +U+00f9:u! +U+00fa:u' +U+00fb:u> +U+00fc:u: +U+00fd:y' +U+00fe:th +U+00ff:y: +U+0100:A- +U+0101:a- +U+0102:A( +U+0103:a( +U+0104:A; +U+0105:a; +U+0106:C' +U+0107:c' +U+0108:C> +U+0109:c> +U+010a:C. +U+010b:c. +U+010c:C< +U+010d:c< +U+010e:D< +U+010f:d< +U+0110:D/ +U+0111:d/ +U+0112:E- +U+0113:e- +U+0114:E( +U+0115:e( +U+0116:E. +U+0117:e. +U+0118:E; +U+0119:e; +U+011a:E< +U+011b:e< +U+011c:G> +U+011d:g> +U+011e:G( +U+011f:g( +U+0120:G. +U+0121:g. +U+0122:G, +U+0123:g, +U+0124:H> +U+0125:h> +U+0126:H/ +U+0127:h/ +U+0128:I? +U+0129:i? +U+012a:I- +U+012b:i- +U+012c:I( +U+012d:i( +U+012e:I; +U+012f:i; +U+0130:I. +U+0131:i. +U+0132:IJ +U+0133:ij +U+0134:J> +U+0135:j> +U+0136:K, +U+0137:k, +U+0138:kk +U+0139:L' +U+013a:l' +U+013b:L, +U+013c:l, +U+013d:L< +U+013e:l< +U+013f:L. +U+0140:l. +U+0141:L/ +U+0142:l/ +U+0143:N' +U+0144:n' +U+0145:N, +U+0146:n, +U+0147:N< +U+0148:n< +U+0149:'n +U+014a:NG +U+014b:ng +U+014c:O- +U+014d:o- +U+014e:O( +U+014f:o( +U+0150:O" +U+0151:o" +U+0152:OE +U+0153:oe +U+0154:R' +U+0155:r' +U+0156:R, +U+0157:r, +U+0158:R< +U+0159:r< +U+015a:S' +U+015b:s' +U+015c:S> +U+015d:s> +U+015e:S, +U+015f:s, +U+0160:S< +U+0161:s< +U+0162:T, +U+0163:t, +U+0164:T< +U+0165:t< +U+0166:T/ +U+0167:t/ +U+0168:U? +U+0169:u? +U+016a:U- +U+016b:u- +U+016c:U( +U+016d:u( +U+016e:U0 +U+016f:u0 +U+0170:U" +U+0171:u" +U+0172:U; +U+0173:u; +U+0174:W> +U+0175:w> +U+0176:Y> +U+0177:y> +U+0178:Y: +U+0179:Z' +U+017a:z' +U+017b:Z. +U+017c:z. +U+017d:Z< +U+017e:z< +U+017f:s1 +U+0187:C2 +U+0188:c2 +U+0191:F2 +U+0192:f2 +U+0198:K2 +U+0199:k2 +U+01a0:O9 +U+01a1:o9 +U+01a2:OI +U+01a3:oi +U+01a6:yr +U+01af:U9 +U+01b0:u9 +U+01b5:Z/ +U+01b6:z/ +U+01b7:ED +U+01cd:A< +U+01ce:a< +U+01cf:I< +U+01d0:i< +U+01d1:O< +U+01d2:o< +U+01d3:U< +U+01d4:u< +U+01d5:U:- +U+01d6:u:- +U+01d7:U:' +U+01d8:u:' +U+01d9:U:< +U+01da:u:< +U+01db:U:! +U+01dc:u:! +U+01de:A1 +U+01df:a1 +U+01e0:A7 +U+01e1:a7 +U+01e2:A3 +U+01e3:a3 +U+01e4:G/ +U+01e5:g/ +U+01e6:G< +U+01e7:g< +U+01e8:K< +U+01e9:k< +U+01ea:O; +U+01eb:o; +U+01ec:O1 +U+01ed:o1 +U+01ee:EZ +U+01ef:ez +U+01f0:j< +U+01f4:G' +U+01f5:g' +U+01fa:AA' +U+01fb:aa' +U+01fc:AE' +U+01fd:ae' +U+01fe:O/' +U+01ff:o/' +U+0200:A!! +U+0201:a!! +U+0202:A) +U+0203:a) +U+0204:E!! +U+0205:e!! +U+0206:E) +U+0207:e) +U+0208:I!! +U+0209:i!! +U+020a:I) +U+020b:i) +U+020c:O!! +U+020d:o!! +U+020e:O) +U+020f:o) +U+0210:R!! +U+0211:r!! +U+0212:R) +U+0213:r) +U+0214:U!! +U+0215:u!! +U+0216:U) +U+0217:u) +U+0292:ed +U+02bb:;S +U+02c6:1> +U+02c7:'< +U+02c9:1- +U+02cb:1! +U+02d8:'( +U+02d9:'. +U+02da:'0 +U+02db:'; +U+02dc:1? +U+02dd:'" +U+0374:'G +U+0375:,G +U+037a:j3 +U+037e:?% +U+0384:'* +U+0385:'% +U+0386:A% +U+0387:.* +U+0388:E% +U+0389:Y% +U+038a:I% +U+038c:O% +U+038e:U% +U+038f:W% +U+0390:i3 +U+0391:A* +U+0392:B* +U+0393:G* +U+0394:D* +U+0395:E* +U+0396:Z* +U+0397:Y* +U+0398:H* +U+0399:I* +U+039a:K* +U+039b:L* +U+039c:M* +U+039d:N* +U+039e:C* +U+039f:O* +U+03a0:P* +U+03a1:R* +U+03a3:S* +U+03a4:T* +U+03a5:U* +U+03a6:F* +U+03a7:X* +U+03a8:Q* +U+03a9:W* +U+03aa:J* +U+03ab:V* +U+03ac:a% +U+03ad:e% +U+03ae:y% +U+03af:i% +U+03b0:u3 +U+03b1:a* +U+03b2:b* +U+03b3:g* +U+03b4:d* +U+03b5:e* +U+03b6:z* +U+03b7:y* +U+03b8:h* +U+03b9:i* +U+03ba:k* +U+03bb:l* +U+03bc:m* +U+03bd:n* +U+03be:c* +U+03bf:o* +U+03c0:p* +U+03c1:r* +U+03c2:*s +U+03c3:s* +U+03c4:t* +U+03c5:u* +U+03c6:f* +U+03c7:x* +U+03c8:q* +U+03c9:w* +U+03ca:j* +U+03cb:v* +U+03cc:o% +U+03cd:u% +U+03ce:w% +U+03d0:b3 +U+03da:T3 +U+03db:t3 +U+03dc:M3 +U+03dd:m3 +U+03de:K3 +U+03df:k3 +U+03e0:P3 +U+03e1:p3 +U+0401:IO +U+0402:D% +U+0403:G% +U+0404:IE +U+0405:DS +U+0406:II +U+0407:YI +U+0408:J% +U+0409:LJ +U+040a:NJ +U+040b:Ts +U+040c:KJ +U+040e:V% +U+040f:DZ +U+0410:A= +U+0411:B= +U+0412:V= +U+0413:G= +U+0414:D= +U+0415:E= +U+0416:Z% +U+0417:Z= +U+0418:I= +U+0419:J= +U+041a:K= +U+041b:L= +U+041c:M= +U+041d:N= +U+041e:O= +U+041f:P= +U+0420:R= +U+0421:S= +U+0422:T= +U+0423:U= +U+0424:F= +U+0425:H= +U+0426:C= +U+0427:C% +U+0428:S% +U+0429:Sc +U+042a:=" +U+042b:Y= +U+042c:%" +U+042d:JE +U+042e:JU +U+042f:JA +U+0430:a= +U+0431:b= +U+0432:v= +U+0433:g= +U+0434:d= +U+0435:e= +U+0436:z% +U+0437:z= +U+0438:i= +U+0439:j= +U+043a:k= +U+043b:l= +U+043c:m= +U+043d:n= +U+043e:o= +U+043f:p= +U+0440:r= +U+0441:s= +U+0442:t= +U+0443:u= +U+0444:f= +U+0445:h= +U+0446:c= +U+0447:c% +U+0448:s% +U+0449:sc +U+044a:=' +U+044b:y= +U+044c:%' +U+044d:je +U+044e:ju +U+044f:ja +U+0451:io +U+0452:d% +U+0453:g% +U+0454:ie +U+0455:ds +U+0456:ii +U+0457:yi +U+0458:j% +U+0459:lj +U+045a:nj +U+045b:ts +U+045c:kj +U+045e:v% +U+045f:dz +U+0462:Y3 +U+0463:y3 +U+046a:O3 +U+046b:o3 +U+0472:F3 +U+0473:f3 +U+0474:V3 +U+0475:v3 +U+0480:C3 +U+0481:c3 +U+0490:G3 +U+0491:g3 +U+05d0:A+ +U+05d1:B+ +U+05d2:G+ +U+05d3:D+ +U+05d4:H+ +U+05d5:W+ +U+05d6:Z+ +U+05d7:X+ +U+05d8:Tj +U+05d9:J+ +U+05da:K% +U+05db:K+ +U+05dc:L+ +U+05dd:M% +U+05de:M+ +U+05df:N% +U+05e0:N+ +U+05e1:S+ +U+05e2:E+ +U+05e3:P% +U+05e4:P+ +U+05e5:Zj +U+05e6:ZJ +U+05e7:Q+ +U+05e8:R+ +U+05e9:Sh +U+05ea:T+ +U+060c:,+ +U+061b:;+ +U+061f:?+ +U+0621:H' +U+0622:aM +U+0623:aH +U+0624:wH +U+0625:ah +U+0626:yH +U+0627:a+ +U+0628:b+ +U+0629:tm +U+062a:t+ +U+062b:tk +U+062c:g+ +U+062d:hk +U+062e:x+ +U+062f:d+ +U+0630:dk +U+0631:r+ +U+0632:z+ +U+0633:s+ +U+0634:sn +U+0635:c+ +U+0636:dd +U+0637:tj +U+0638:zH +U+0639:e+ +U+063a:i+ +U+0640:++ +U+0641:f+ +U+0642:q+ +U+0643:k+ +U+0644:l+ +U+0645:m+ +U+0646:n+ +U+0647:h+ +U+0648:w+ +U+0649:j+ +U+064a:y+ +U+064b::+ +U+064c:"+ +U+064d:=+ +U+064e:/+ +U+064f:'+ +U+0650:1+ +U+0651:3+ +U+0652:0+ +U+0660:0a +U+0661:1a +U+0662:2a +U+0663:3a +U+0664:4a +U+0665:5a +U+0666:6a +U+0667:7a +U+0668:8a +U+0669:9a +U+0670:aS +U+067e:p+ +U+0681:hH +U+0686:tc +U+0698:zj +U+06a4:v+ +U+06af:gf +U+1e00:A-0 +U+1e01:a-0 +U+1e02:B. +U+1e03:b. +U+1e04:B-. +U+1e05:b-. +U+1e06:B_ +U+1e07:b_ +U+1e08:C,' +U+1e09:c,' +U+1e0a:D. +U+1e0b:d. +U+1e0c:D-. +U+1e0d:d-. +U+1e0e:D_ +U+1e0f:d_ +U+1e10:D, +U+1e11:d, +U+1e12:D-> +U+1e13:d-> +U+1e14:E-! +U+1e15:e-! +U+1e16:E-' +U+1e17:e-' +U+1e18:E-> +U+1e19:e-> +U+1e1a:E-? +U+1e1b:e-? +U+1e1c:E,( +U+1e1d:e,( +U+1e1e:F. +U+1e1f:f. +U+1e20:G- +U+1e21:g- +U+1e22:H. +U+1e23:h. +U+1e24:H-. +U+1e25:h-. +U+1e26:H: +U+1e27:h: +U+1e28:H, +U+1e29:h, +U+1e2a:H-( +U+1e2b:h-( +U+1e2c:I-? +U+1e2d:i-? +U+1e2e:I:' +U+1e2f:i:' +U+1e30:K' +U+1e31:k' +U+1e32:K-. +U+1e33:k-. +U+1e34:K_ +U+1e35:k_ +U+1e36:L-. +U+1e37:l-. +U+1e38:L--. +U+1e39:l--. +U+1e3a:L_ +U+1e3b:l_ +U+1e3c:L-> +U+1e3d:l-> +U+1e3e:M' +U+1e3f:m' +U+1e40:M. +U+1e41:m. +U+1e42:M-. +U+1e43:m-. +U+1e44:N. +U+1e45:n. +U+1e46:N-. +U+1e47:n-. +U+1e48:N_ +U+1e49:n_ +U+1e4a:N-> +U+1e4b:n-> +U+1e4c:O?' +U+1e4d:o?' +U+1e4e:O?: +U+1e4f:o?: +U+1e50:O-! +U+1e51:o-! +U+1e52:O-' +U+1e53:o-' +U+1e54:P' +U+1e55:p' +U+1e56:P. +U+1e57:p. +U+1e58:R. +U+1e59:r. +U+1e5a:R-. +U+1e5b:r-. +U+1e5c:R--. +U+1e5d:r--. +U+1e5e:R_ +U+1e5f:r_ +U+1e60:S. +U+1e61:s. +U+1e62:S-. +U+1e63:s-. +U+1e64:S'. +U+1e65:s'. +U+1e66:S<. +U+1e67:s<. +U+1e68:S.-. +U+1e69:s.-. +U+1e6a:T. +U+1e6b:t. +U+1e6c:T-. +U+1e6d:t-. +U+1e6e:T_ +U+1e6f:t_ +U+1e70:T-> +U+1e71:t-> +U+1e72:U--: +U+1e73:u--: +U+1e74:U-? +U+1e75:u-? +U+1e76:U-> +U+1e77:u-> +U+1e78:U?' +U+1e79:u?' +U+1e7a:U-: +U+1e7b:u-: +U+1e7c:V? +U+1e7d:v? +U+1e7e:V-. +U+1e7f:v-. +U+1e80:W! +U+1e81:w! +U+1e82:W' +U+1e83:w' +U+1e84:W: +U+1e85:w: +U+1e86:W. +U+1e87:w. +U+1e88:W-. +U+1e89:w-. +U+1e8a:X. +U+1e8b:x. +U+1e8c:X: +U+1e8d:x: +U+1e8e:Y. +U+1e8f:y. +U+1e90:Z> +U+1e91:z> +U+1e92:Z-. +U+1e93:z-. +U+1e94:Z_ +U+1e95:z_ +U+1e96:h_ +U+1e97:t: +U+1e98:w0 +U+1e99:y0 +U+1ea0:A-. +U+1ea1:a-. +U+1ea2:A2 +U+1ea3:a2 +U+1ea4:A>' +U+1ea5:a>' +U+1ea6:A>! +U+1ea7:a>! +U+1ea8:A>2 +U+1ea9:a>2 +U+1eaa:A>? +U+1eab:a>? +U+1eac:A>-. +U+1ead:a>-. +U+1eae:A(' +U+1eaf:a(' +U+1eb0:A(! +U+1eb1:a(! +U+1eb2:A(2 +U+1eb3:a(2 +U+1eb4:A(? +U+1eb5:a(? +U+1eb6:A(-. +U+1eb7:a(-. +U+1eb8:E-. +U+1eb9:e-. +U+1eba:E2 +U+1ebb:e2 +U+1ebc:E? +U+1ebd:e? +U+1ebe:E>' +U+1ebf:e>' +U+1ec0:E>! +U+1ec1:e>! +U+1ec2:E>2 +U+1ec3:e>2 +U+1ec4:E>? +U+1ec5:e>? +U+1ec6:E>-. +U+1ec7:e>-. +U+1ec8:I2 +U+1ec9:i2 +U+1eca:I-. +U+1ecb:i-. +U+1ecc:O-. +U+1ecd:o-. +U+1ece:O2 +U+1ecf:o2 +U+1ed0:O>' +U+1ed1:o>' +U+1ed2:O>! +U+1ed3:o>! +U+1ed4:O>2 +U+1ed5:o>2 +U+1ed6:O>? +U+1ed7:o>? +U+1ed8:O>-. +U+1ed9:o>-. +U+1eda:O9' +U+1edb:o9' +U+1edc:O9! +U+1edd:o9! +U+1ede:O92 +U+1edf:o92 +U+1ee0:O9? +U+1ee1:o9? +U+1ee2:O9-. +U+1ee3:o9-. +U+1ee4:U-. +U+1ee5:u-. +U+1ee6:U2 +U+1ee7:u2 +U+1ee8:U9' +U+1ee9:u9' +U+1eea:U9! +U+1eeb:u9! +U+1eec:U92 +U+1eed:u92 +U+1eee:U9? +U+1eef:u9? +U+1ef0:U9-. +U+1ef1:u9-. +U+1ef2:Y! +U+1ef3:y! +U+1ef4:Y-. +U+1ef5:y-. +U+1ef6:Y2 +U+1ef7:y2 +U+1ef8:Y? +U+1ef9:y? +U+1fbf:,, +U+1fc0:?* +U+1fc1:?: +U+1fcd:,! +U+1fce:,' +U+1fcf:?, +U+1fdd:;! +U+1fde:;' +U+1fdf:?; +U+1fed:!: +U+1fef:!* +U+1ffe:;; +U+2002:1N +U+2003:1M +U+2004:3M +U+2005:4M +U+2006:6M +U+200e:LR +U+200f:RL +U+2009:1T +U+200a:1H +U+2010:-1 +U+2013:-N +U+2014:-M +U+2015:-3 +U+2016:!2 +U+2017:=2 +U+2018:'6 +U+2019:'9 +U+201a:.9 +U+201b:9' +U+201c:"6 +U+201d:"9 +U+201e::9 +U+201f:9" +U+2020:/- +U+2021:/= +U+2022:Sb +U+2025:.. +U+2026:.3 +U+2030:%0 +U+2032:1' +U+2033:2' +U+2034:3' +U+2035:1" +U+2036:2" +U+2037:3" +U+2038:Ca +U+2039:<1 +U+203a:>1 +U+203b::X +U+203c:!*2 +U+203e:'- +U+2044:/f +U+2070:0S +U+2074:4S +U+2075:5S +U+2076:6S +U+2077:7S +U+2078:8S +U+2079:9S +U+207a:+S +U+207b:-S +U+207c:=S +U+207d:(S +U+207e:)S +U+207f:nS +U+2080:0s +U+2081:1s +U+2082:2s +U+2083:3s +U+2084:4s +U+2085:5s +U+2086:6s +U+2087:7s +U+2088:8s +U+2089:9s +U+208a:+s +U+208b:-s +U+208c:=s +U+208d:(s +U+208e:)s +U+20a3:Ff +U+20a4:Li +U+20a7:Pt +U+20a9:W= +U+2103:oC +U+2105:co +U+2109:oF +U+2116:N0 +U+2117:PO +U+211e:Rx +U+2120:SM +U+2122:TM +U+2126:Om +U+212b:AO +U+2153:13 +U+2154:23 +U+2155:15 +U+2156:25 +U+2157:35 +U+2158:45 +U+2159:16 +U+215a:56 +U+215b:18 +U+215c:38 +U+215d:58 +U+215e:78 +U+2160:1R +U+2161:2R +U+2162:3R +U+2163:4R +U+2164:5R +U+2165:6R +U+2166:7R +U+2167:8R +U+2168:9R +U+2169:aR +U+216a:bR +U+216b:cR +U+216c:50R +U+216d:100R +U+216e:500R +U+216f:1000R +U+2170:1r +U+2171:2r +U+2172:3r +U+2173:4r +U+2174:5r +U+2175:6r +U+2176:7r +U+2177:8r +U+2178:9r +U+2179:ar +U+217a:br +U+217b:cr +U+217c:50r +U+217d:100r +U+217e:500r +U+217f:1000r +U+2180:1000RCD +U+2181:5000R +U+2182:10000R +U+2190:<- +U+2191:-! +U+2192:-> +U+2193:-v +U+2194:<> +U+2195:UD +U+2196:<!! +U+2197://> +U+2198:!!> +U+2199:<// +U+21a8:UD- +U+21c0:>V +U+21d0:<= +U+21d2:=> +U+21d4:== +U+2200:FA +U+2202:dP +U+2203:TE +U+2205:/0 +U+2206:DE +U+2207:NB +U+2208:(- +U+220b:-) +U+220f:*P +U+2211:+Z +U+2212:-2 +U+2213:-+ +U+2214:.+ +U+2217:*- +U+2218:Ob +U+2219:sb +U+221a:RT +U+221d:0( +U+221e:00 +U+221f:-L +U+2220:-V +U+2225:PP +U+2227:AN +U+2228:OR +U+2229:(U +U+222a:)U +U+222b:In +U+222c:DI +U+222e:Io +U+2234:.: +U+2235::. +U+2236::R +U+2237::: +U+223c:?1 +U+223e:CG +U+2243:?- +U+2245:?= +U+2248:?2 +U+224c:=? +U+2253:HI +U+2260:!= +U+2261:=3 +U+2264:=< +U+2265:>= +U+226a:<* +U+226b:*> +U+226e:!< +U+226f:!> +U+2282:(C +U+2283:)C +U+2286:(_ +U+2287:)_ +U+2299:0. +U+229a:02 +U+22a5:-T +U+22c5:.P +U+22ee::3 +U+2302:Eh +U+2308:<7 +U+2309:>7 +U+230a:7< +U+230b:7> +U+2310:NI +U+2312:(A +U+2315:TR +U+2318:88 +U+2320:Iu +U+2321:Il +U+2329:</ +U+232a:/> +U+2423:Vs +U+2440:1h +U+2441:3h +U+2442:2h +U+2443:4h +U+2446:1j +U+2447:2j +U+2448:3j +U+2449:4j +U+2460:1-o +U+2461:2-o +U+2462:3-o +U+2463:4-o +U+2464:5-o +U+2465:6-o +U+2466:7-o +U+2467:8-o +U+2468:9-o +U+2469:10-o +U+246a:11-o +U+246b:12-o +U+246c:13-o +U+246d:14-o +U+246e:15-o +U+246f:16-o +U+2470:17-o +U+2471:18-o +U+2472:19-o +U+2473:20-o +U+2474:(1) +U+2475:(2) +U+2476:(3) +U+2477:(4) +U+2478:(5) +U+2479:(6) +U+247a:(7) +U+247b:(8) +U+247c:(9) +U+247d:(10) +U+247e:(11) +U+247f:(12) +U+2480:(13) +U+2481:(14) +U+2482:(15) +U+2483:(16) +U+2484:(17) +U+2485:(18) +U+2486:(19) +U+2487:(20) +U+2488:1. +U+2489:2. +U+248a:3. +U+248b:4. +U+248c:5. +U+248d:6. +U+248e:7. +U+248f:8. +U+2490:9. +U+2491:10. +U+2492:11. +U+2493:12. +U+2494:13. +U+2495:14. +U+2496:15. +U+2497:16. +U+2498:17. +U+2499:18. +U+249a:19. +U+249b:20. +U+249c:(a) +U+249d:(b) +U+249e:(c) +U+249f:(d) +U+24a0:(e) +U+24a1:(f) +U+24a2:(g) +U+24a3:(h) +U+24a4:(i) +U+24a5:(j) +U+24a6:(k) +U+24a7:(l) +U+24a8:(m) +U+24a9:(n) +U+24aa:(o) +U+24ab:(p) +U+24ac:(q) +U+24ad:(r) +U+24ae:(s) +U+24af:(t) +U+24b0:(u) +U+24b1:(v) +U+24b2:(w) +U+24b3:(x) +U+24b4:(y) +U+24b5:(z) +U+24b6:A-o +U+24b7:B-o +U+24b8:C-o +U+24b9:D-o +U+24ba:E-o +U+24bb:F-o +U+24bc:G-o +U+24bd:H-o +U+24be:I-o +U+24bf:J-o +U+24c0:K-o +U+24c1:L-o +U+24c2:M-o +U+24c3:N-o +U+24c4:O-o +U+24c5:P-o +U+24c6:Q-o +U+24c7:R-o +U+24c8:S-o +U+24c9:T-o +U+24ca:U-o +U+24cb:V-o +U+24cc:W-o +U+24cd:X-o +U+24ce:Y-o +U+24cf:Z-o +U+24d0:a-o +U+24d1:b-o +U+24d2:c-o +U+24d3:d-o +U+24d4:e-o +U+24d5:f-o +U+24d6:g-o +U+24d7:h-o +U+24d8:i-o +U+24d9:j-o +U+24da:k-o +U+24db:l-o +U+24dc:m-o +U+24dd:n-o +U+24de:o-o +U+24df:p-o +U+24e0:q-o +U+24e1:r-o +U+24e2:s-o +U+24e3:t-o +U+24e4:u-o +U+24e5:v-o +U+24e6:w-o +U+24e7:x-o +U+24e8:y-o +U+24e9:z-o +U+24ea:0-o +U+2500:hh +U+2501:HH- +U+2502:vv +U+2503:VV- +U+2504:3- +U+2505:3_ +U+2506:3! +U+2507:3/ +U+2508:4- +U+2509:4_ +U+250a:4! +U+250b:4/ +U+250c:dr +U+250d:dR- +U+250e:Dr- +U+250f:DR- +U+2510:dl +U+2511:dL- +U+2512:Dl- +U+2513:LD- +U+2514:ur +U+2515:uR- +U+2516:Ur- +U+2517:UR- +U+2518:ul +U+2519:uL- +U+251a:Ul- +U+251b:UL- +U+251c:vr +U+251d:vR- +U+251e:Udr +U+251f:uDr +U+2520:Vr- +U+2521:UdR +U+2522:uDR +U+2523:VR- +U+2524:vl +U+2525:vL- +U+2526:Udl +U+2527:uDl +U+2528:Vl- +U+2529:UdL +U+252a:uDL +U+252b:VL- +U+252c:dh +U+252d:dLr +U+252e:dlR +U+252f:dH- +U+2530:Dh- +U+2531:DLr +U+2532:DlR +U+2533:DH- +U+2534:uh +U+2535:uLr +U+2536:ulR +U+2537:uH- +U+2538:Uh- +U+2539:ULr +U+253a:UlR +U+253b:UH- +U+253c:vh +U+253d:vLr +U+253e:vlR +U+253f:vH- +U+2540:Udh +U+2541:uDh +U+2542:Vh- +U+2543:UdLr +U+2544:UdlR +U+2545:uDLr +U+2546:uDlR +U+2547:UdH +U+2548:uDH +U+2549:VLr +U+254a:VlR +U+254b:VH- +U+2550:HH +U+2551:VV +U+2552:dR +U+2553:Dr +U+2554:DR +U+2555:dL +U+2556:Dl +U+2557:LD +U+2558:uR +U+2559:Ur +U+255a:UR +U+255b:uL +U+255c:Ul +U+255d:UL +U+255e:vR +U+255f:Vr +U+2560:VR +U+2561:vL +U+2562:Vl +U+2563:VL +U+2564:dH +U+2565:Dh +U+2566:DH +U+2567:uH +U+2568:Uh +U+2569:UH +U+256a:vH +U+256b:Vh +U+256c:VH +U+2571:FD +U+2572:BD +U+2580:TB +U+2584:LB +U+2588:FB +U+258c:lB +U+2590:RB +U+2591:.S +U+2592::S +U+2593:?S +U+25a0:fS +U+25a1:OS +U+25a2:RO +U+25a3:Rr +U+25a4:RF +U+25a5:RY +U+25a6:RH +U+25a7:RZ +U+25a8:RK +U+25a9:RX +U+25aa:sB +U+25ac:SR +U+25ad:Or +U+25b2:UT +U+25b3:uT +U+25b7:Tr +U+25ba:PR +U+25bc:Dt +U+25bd:dT +U+25c1:Tl +U+25c4:PL +U+25c6:Db +U+25c7:Dw +U+25ca:LZ +U+25cb:0m +U+25ce:0o +U+25cf:0M +U+25d0:0L +U+25d1:0R +U+25d8:Sn +U+25d9:Ic +U+25e2:Fd +U+25e3:Bd +U+25ef:Ci +U+2605:*2 +U+2606:*1 +U+260e:TEL +U+260f:tel +U+261c:<H +U+261e:>H +U+263a:0u +U+263b:0U +U+263c:SU +U+2640:Fm +U+2642:Ml +U+2660:cS +U+2661:cH +U+2662:cD +U+2663:cC +U+2664:cS- +U+2665:cH- +U+2666:cD- +U+2667:cC- +U+2669:Md +U+266a:M8 +U+266b:M2 +U+266c:M16 +U+266d:Mb +U+266e:Mx +U+266f:MX +U+2713:OK +U+2717:XX +U+2720:-X +U+3000:IS +U+3001:,_ +U+3002:._ +U+3003:+" +U+3004:JIS +U+3005:*_ +U+3006:;_ +U+3007:0_ +U+300a:<+ +U+300b:>+ +U+300c:<' +U+300d:>' +U+300e:<" +U+300f:>" +U+3010:(" +U+3011:)" +U+3012:=T +U+3013:=_ +U+3014:(' +U+3015:)' +U+3016:(I +U+3017:)I +U+301c:-? +U+3020:=T:) +U+3041:A5 +U+3042:a5 +U+3043:I5 +U+3044:i5 +U+3045:U5 +U+3046:u5 +U+3047:E5 +U+3048:e5 +U+3049:O5 +U+304a:o5 +U+304b:ka +U+304c:ga +U+304d:ki +U+304e:gi +U+304f:ku +U+3050:gu +U+3051:ke +U+3052:ge +U+3053:ko +U+3054:go +U+3055:sa +U+3056:za +U+3057:si +U+3058:zi +U+3059:su +U+305a:zu +U+305b:se +U+305c:ze +U+305d:so +U+305e:zo +U+305f:ta +U+3060:da +U+3061:ti +U+3062:di +U+3063:tU +U+3064:tu +U+3065:du +U+3066:te +U+3067:de +U+3068:to +U+3069:do +U+306a:na +U+306b:ni +U+306c:nu +U+306d:ne +U+306e:no +U+306f:ha +U+3070:ba +U+3071:pa +U+3072:hi +U+3073:bi +U+3074:pi +U+3075:hu +U+3076:bu +U+3077:pu +U+3078:he +U+3079:be +U+307a:pe +U+307b:ho +U+307c:bo +U+307d:po +U+307e:ma +U+307f:mi +U+3080:mu +U+3081:me +U+3082:mo +U+3083:yA +U+3084:ya +U+3085:yU +U+3086:yu +U+3087:yO +U+3088:yo +U+3089:ra +U+308a:ri +U+308b:ru +U+308c:re +U+308d:ro +U+308e:wA +U+308f:wa +U+3090:wi +U+3091:we +U+3092:wo +U+3093:n5 +U+3094:vu +U+309b:"5 +U+309c:05 +U+309d:*5 +U+309e:+5 +U+30a1:a6 +U+30a2:A6 +U+30a3:i6 +U+30a4:I6 +U+30a5:u6 +U+30a6:U6 +U+30a7:e6 +U+30a8:E6 +U+30a9:o6 +U+30aa:O6 +U+30ab:Ka +U+30ac:Ga +U+30ad:Ki +U+30ae:Gi +U+30af:Ku +U+30b0:Gu +U+30b1:Ke +U+30b2:Ge +U+30b3:Ko +U+30b4:Go +U+30b5:Sa +U+30b6:Za +U+30b7:Si +U+30b8:Zi +U+30b9:Su +U+30ba:Zu +U+30bb:Se +U+30bc:Ze +U+30bd:So +U+30be:Zo +U+30bf:Ta +U+30c0:Da +U+30c1:Ti +U+30c2:Di +U+30c3:TU +U+30c4:Tu +U+30c5:Du +U+30c6:Te +U+30c7:De +U+30c8:To +U+30c9:Do +U+30ca:Na +U+30cb:Ni +U+30cc:Nu +U+30cd:Ne +U+30ce:No +U+30cf:Ha +U+30d0:Ba +U+30d1:Pa +U+30d2:Hi +U+30d3:Bi +U+30d4:Pi +U+30d5:Hu +U+30d6:Bu +U+30d7:Pu +U+30d8:He +U+30d9:Be +U+30da:Pe +U+30db:Ho +U+30dc:Bo +U+30dd:Po +U+30de:Ma +U+30df:Mi +U+30e0:Mu +U+30e1:Me +U+30e2:Mo +U+30e3:YA +U+30e4:Ya +U+30e5:YU +U+30e6:Yu +U+30e7:YO +U+30e8:Yo +U+30e9:Ra +U+30ea:Ri +U+30eb:Ru +U+30ec:Re +U+30ed:Ro +U+30ee:WA +U+30ef:Wa +U+30f0:Wi +U+30f1:We +U+30f2:Wo +U+30f3:N6 +U+30f4:Vu +U+30f5:KA +U+30f6:KE +U+30f7:Va +U+30f8:Vi +U+30f9:Ve +U+30fa:Vo +U+30fb:.6 +U+30fc:-6 +U+30fd:*6 +U+30fe:+6 +U+3105:b4 +U+3106:p4 +U+3107:m4 +U+3108:f4 +U+3109:d4 +U+310a:t4 +U+310b:n4 +U+310c:l4 +U+310d:g4 +U+310e:k4 +U+310f:h4 +U+3110:j4 +U+3111:q4 +U+3112:x4 +U+3113:zh +U+3114:ch +U+3115:sh +U+3116:r4 +U+3117:z4 +U+3118:c4 +U+3119:s4 +U+311a:a4 +U+311b:o4 +U+311c:e4 +U+311d:eh4 +U+311e:ai +U+311f:ei +U+3120:au +U+3121:ou +U+3122:an +U+3123:en +U+3124:aN +U+3125:eN +U+3126:er +U+3127:i4 +U+3128:u4 +U+3129:iu +U+312a:v4 +U+312b:nG +U+312c:gn +U+321c:(JU) +U+3220:1c +U+3221:2c +U+3222:3c +U+3223:4c +U+3224:5c +U+3225:6c +U+3226:7c +U+3227:8c +U+3228:9c +U+3229:10c +U+327f:KSC +U+33c2:am +U+33d8:pm +U+fb00:ff +U+fb01:fi +U+fb02:fl +U+fb03:ffi +U+fb04:ffl +U+fb05:St +U+fb06:st +U+fe7d:3+; +U+fe82:aM. +U+fe84:aH. +U+fe88:ah. +U+fe8d:a+- +U+fe8e:a+. +U+fe8f:b+- +U+fe90:b+. +U+fe91:b+, +U+fe92:b+; +U+fe93:tm- +U+fe94:tm. +U+fe95:t+- +U+fe96:t+. +U+fe97:t+, +U+fe98:t+; +U+fe99:tk- +U+fe9a:tk. +U+fe9b:tk, +U+fe9c:tk; +U+fe9d:g+- +U+fe9e:g+. +U+fe9f:g+, +U+fea0:g+; +U+fea1:hk- +U+fea2:hk. +U+fea3:hk, +U+fea4:hk; +U+fea5:x+- +U+fea6:x+. +U+fea7:x+, +U+fea8:x+; +U+fea9:d+- +U+feaa:d+. +U+feab:dk- +U+feac:dk. +U+fead:r+- +U+feae:r+. +U+feaf:z+- +U+feb0:z+. +U+feb1:s+- +U+feb2:s+. +U+feb3:s+, +U+feb4:s+; +U+feb5:sn- +U+feb6:sn. +U+feb7:sn, +U+feb8:sn; +U+feb9:c+- +U+feba:c+. +U+febb:c+, +U+febc:c+; +U+febd:dd- +U+febe:dd. +U+febf:dd, +U+fec0:dd; +U+fec1:tj- +U+fec2:tj. +U+fec3:tj, +U+fec4:tj; +U+fec5:zH- +U+fec6:zH. +U+fec7:zH, +U+fec8:zH; +U+fec9:e+- +U+feca:e+. +U+fecb:e+, +U+fecc:e+; +U+fecd:i+- +U+fece:i+. +U+fecf:i+, +U+fed0:i+; +U+fed1:f+- +U+fed2:f+. +U+fed3:f+, +U+fed4:f+; +U+fed5:q+- +U+fed6:q+. +U+fed7:q+, +U+fed8:q+; +U+fed9:k+- +U+feda:k+. +U+fedb:k+, +U+fedc:k+; +U+fedd:l+- +U+fede:l+. +U+fedf:l+, +U+fee0:l+; +U+fee1:m+- +U+fee2:m+. +U+fee3:m+, +U+fee4:m+; +U+fee5:n+- +U+fee6:n+. +U+fee7:n+, +U+fee8:n+; +U+fee9:h+- +U+feea:h+. +U+feeb:h+, +U+feec:h+; +U+feed:w+- +U+feee:w+. +U+feef:j+- +U+fef0:j+. +U+fef1:y+- +U+fef2:y+. +U+fef3:y+, +U+fef4:y+; +U+fef5:lM- +U+fef6:lM. +U+fef7:lH- +U+fef8:lH. +U+fef9:lh- +U+fefa:lh. +U+fefb:la- +U+fefc:la. +U+0000:NU +U+0001:SH +U+0002:SX +U+0003:EX +U+0004:ET +U+0005:EQ +U+0006:AK +U+0007:BL +U+0008:BS +U+0009:HT +U+000a:LF +U+000b:VT +U+000c:FF +U+000d:CR +U+000e:SO +U+000f:SI +U+0010:DL +U+0011:D1 +U+0012:D2 +U+0013:D3 +U+0014:D4 +U+0015:NK +U+0016:SY +U+0017:EB +U+0018:CN +U+0019:EM +U+001a:SB +U+001b:EC +U+001c:FS +U+001d:GS +U+001e:RS +U+001f:US +U+007f:DT +U+0080:PA +U+0081:HO +U+0082:BH +U+0083:NH +U+0084:IN +U+0085:NL +U+0086:SA +U+0087:ES +U+0088:HS +U+0089:HJ +U+008a:VS +U+008b:PD +U+008c:PU +U+008d:RI +U+008e:S2 +U+008f:S3 +U+0090:DC +U+0091:P1 +U+0092:P2 +U+0093:TS +U+0094:CC +U+0095:MW +U+0096:SG +U+0097:EG +U+0098:SS +U+0099:GC +U+009a:SC +U+009b:CI +U+009c:ST +U+009d:OC +U+009e:PM +U+009f:AC +U+e000:"3 +U+e001:"1 +U+e002:"! +U+e003:"' +U+e004:"> +U+e005:"? +U+e006:"- +U+e007:"( +U+e008:". +U+e009:": +U+e00a:"0 +U+e00b:", +U+e00c:"_ +U+e00d:"" +U+e00e:"; +U+e00f:"< +U+e010:"= +U+e011:"/ +U+e012:"p +U+e013:"d +U+e014:"i +U+e015:+_ +U+e016:a+: +U+e017:Tel +U+e018:UA +U+e019:UB +U+e01e:Mc +U+e01f:Fl diff --git a/src/chrtrans/utf8_uni.tbl b/src/chrtrans/utf8_uni.tbl new file mode 100644 index 00000000..02e153a5 --- /dev/null +++ b/src/chrtrans/utf8_uni.tbl @@ -0,0 +1,33 @@ +# +# This one is not really much of a "translation table", it mostly just +# tells Lynx that "unicode-1-1-utf-8" is Unicode/UCS2 encoded in UTF8... +# +#Shall this become the "default" translation? +#Meaning of that is currently unclear... It's different +#from the default input or defualt output charset... +#but there has to be exactly one table marked as "default". +D0 +# +#The MIME name of this charset. +Municode-1-1-utf-8 + +#Name as a Display Charset (used on Options screen) +O UNICODE UTF 8 + +# Some kind of raw Unicode? +# Use 6 for for really "raw" 16bit UCS-2, 7 for UTF-8, ... + +# most of these codes currently don't make much sense in a *.uni file, +# but for completeness (from UCDefs.h): +# #define UCT_ENC_7BIT 0 +# #define UCT_ENC_8BIT 1 +# #define UCT_ENC_8859 2 /* ??? */ +# #define UCT_ENC_2022 3 +# #define UCT_ENC_MAYBE2022 4 +# #define UCT_ENC_CJK 5 +# #define UCT_ENC_16BIT 6 +# #define UCT_ENC_UTF8 7 + +R 7 + +0x20-0x7f idem diff --git a/src/makefile.dos b/src/makefile.dos new file mode 100644 index 00000000..8a820ab8 --- /dev/null +++ b/src/makefile.dos @@ -0,0 +1,54 @@ +OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \ +LYMail.o HTAlert.o GridText.o LYGetFile.o \ +LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \ +LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \ +LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.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 HTML.o \ +UCAUTO.o UCAUX.o UCDOMAP.o + +CFLAGS= $(MCFLAGS) -I.. $(SLANGINC) + +CC = gcc +#MCFLAGS = -O -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implementation -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp -I../djgpp/pdcurses/include +MCFLAGS = -DEXP_CHARTRANS -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implementation -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp -I../djgpp/pdcurses/include +WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/pdcurses/lib/libcurso.a ../djgpp/tcplib/obj/libtcp.a + +all: lynx + +lynx: message $(OBJS) $(WWWLIB) + @echo "Linking and creating Lynx executable" + $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS) + @echo "Welcome to Lynx!" + +message: + @echo "Compiling Lynx sources" + +dbg: $(OBJS) $(WWWLIB) + @echo "Making Lynx code" + $(CC) -g $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS) + +lint: + lint *.c > ../lint.out + +clean: + rm -f lynx core *.[ob] + +LYMain.o: ../userdefs.h +LYMainLoop.o: LYMainLoop.c ../userdefs.h +LYReadCFG.o: LYReadCFG.c ../userdefs.h +HTFWriter.o: HTFWriter.c ../userdefs.h +LYGetFile.o: LYGetFile.c ../userdefs.h +LYOptions.o: LYOptions.c ../userdefs.h +LYReadCFG.o: LYReadCFG.c ../userdefs.h +LYTraversal.o: LYTraversal.c ../userdefs.h +LYCharSets.o: LYCharSets.c ../userdefs.h +LYShowInfo.o: LYShowInfo.c ../userdefs.h +LYStrings.o: LYStrings.c ../userdefs.h +LYBookmark.o: LYBookmark.c ../userdefs.h +LYHistory.o: LYHistory.c ../userdefs.h +LYDownload.o: LYDownload.c ../userdefs.h +DefaultStyle.o: DefaultStyle.c ../userdefs.h +LYEditmap.o: LYEditmap.c ../userdefs.h +LYCharUtils.o: LYCharUtils.c ../userdefs.h diff --git a/src/makefile.in b/src/makefile.in new file mode 100644 index 00000000..92977d01 --- /dev/null +++ b/src/makefile.in @@ -0,0 +1,111 @@ +# template-makefile for Lynx src directory + +SHELL = /bin/sh + +@SET_MAKE@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +srcdir = @srcdir@ +VPATH = $(srcdir) + +WWWINC = WWW/Library/Implementation +SITE_DEFS = # FIXME: set in parent makefile +MCFLAGS = # FIXME: set in parent makefile + +CC = @CC@ +CPPOPTS = @DEFS@ @CPPFLAGS@ -I.. -I../$(WWWINC) $(MCFLAGS) $(SITE_DEFS) +CFLAGS = $(CPPOPTS) @CFLAGS@ + +CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o +OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \ +LYMail.o HTAlert.o GridText.o LYGetFile.o \ +LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \ +LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \ +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 \ + $(CHARTRANS_OBJS) + +all: lynx + +.SUFFIXES : .i + +.c.o: +@SHOW_CC@ + @ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c + +.c.i: +@SHOW_CC@ + @ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@ + +lynx: message do_chartrans_stuff $(OBJS) $(WWWLIB) + @echo "Linking and creating Lynx executable" + $(CC) $(CFLAGS) -o lynx $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS) + @echo "Copying Lynx executable into this directory" + cp lynx .. + @echo "Welcome to Lynx!" + +message: + @echo "Compiling Lynx sources" + +do_chartrans_stuff: + -cd chrtrans && $(MAKE) \ + MCFLAGS="$(MCFLAGS)" \ + SITE_DEFS="$(SITE_DEFS)" \ + CC="$(CC)" tables + +lint: + lint $(CPPFLAGS) *.c > ../lint.out + +clean: + rm -f lynx core *.[ob] + cd chrtrans && $(MAKE) clean + +LYMain.o: ../userdefs.h +LYMainLoop.o: ../userdefs.h +LYReadCFG.o: ../userdefs.h +HTFWriter.o: ../userdefs.h +LYGetFile.o: ../userdefs.h +LYOptions.o: ../userdefs.h +LYReadCFG.o: ../userdefs.h +LYrcFile.o: ../userdefs.h +LYMail.o: ../userdefs.h +LYUtils.o: ../userdefs.h +HTInit.o: ../userdefs.h +LYTraversal.o: ../userdefs.h +LYMail.o: ../userdefs.h +LYCharSets.o: ../userdefs.h + +CHRTR= chrtrans/ + +TABLES= $(CHRTR)iso02_uni.h \ + $(CHRTR)iso01_uni.h \ + $(CHRTR)def7_uni.h \ + $(CHRTR)iso03_uni.h \ + $(CHRTR)iso04_uni.h \ + $(CHRTR)iso05_uni.h \ + $(CHRTR)iso07_uni.h \ + $(CHRTR)iso09_uni.h \ + $(CHRTR)iso10_uni.h \ + $(CHRTR)koi8r_uni.h \ + $(CHRTR)cp437_uni.h \ + $(CHRTR)cp850_uni.h \ + $(CHRTR)cp852_uni.h \ + $(CHRTR)cp1250_uni.h \ + $(CHRTR)cp1252_uni.h \ + $(CHRTR)utf8_uni.h \ + $(CHRTR)rfc_suni.h \ + $(CHRTR)mnemonic_suni.h \ + $(CHRTR)mnem_suni.h + +CMN=../WWW/Library/Implementation/ + +$(TABLES): + -cd chrtrans && $(MAKE) tables + +UCdomap.o: UCdomap.c chrtrans/UCkd.h chrtrans/makeuctb chrtrans/makeuctb.c \ + UCdomap.h $(CMN)UCMap.h $(TABLES) ../userdefs.h + +UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h +LYCookie.o: ../userdefs.h |