aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1999-03-30 17:24:31 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1999-03-30 17:24:31 -0500
commit327b7c16889c9d95ec076d695c970da11dc32a2b (patch)
tree91a9c864c60dfff69efe63d4cca7aab0b4754d6d /src
parent79de405977ac0d7820576b353dde07ce09cedba9 (diff)
downloadlynx-snapshots-327b7c16889c9d95ec076d695c970da11dc32a2b.tar.gz
snapshot of project "lynx", label v2-8-2dev_21
Diffstat (limited to 'src')
-rw-r--r--src/DefaultStyle.c2
-rw-r--r--src/GridText.c303
-rw-r--r--src/GridText.h3
-rw-r--r--src/HTAlert.c16
-rw-r--r--src/HTAlert.h13
-rw-r--r--src/LYCgi.c2
-rw-r--r--src/LYClean.c10
-rw-r--r--src/LYCookie.c2
-rw-r--r--src/LYCurses.c8
-rw-r--r--src/LYCurses.h4
-rw-r--r--src/LYExtern.c7
-rw-r--r--src/LYForms.c7
-rw-r--r--src/LYGetFile.c41
-rw-r--r--src/LYHash.c13
-rw-r--r--src/LYHistory.c2
-rw-r--r--src/LYJump.c2
-rw-r--r--src/LYLocal.c12
-rw-r--r--src/LYMail.c2
-rw-r--r--src/LYMain.c190
-rw-r--r--src/LYMainLoop.c114
-rw-r--r--src/LYMap.c2
-rw-r--r--src/LYOptions.c67
-rw-r--r--src/LYPrint.c35
-rw-r--r--src/LYReadCFG.c106
-rw-r--r--src/LYReadCFG.h1
-rw-r--r--src/LYShowInfo.c13
-rw-r--r--src/LYStyle.c4
-rw-r--r--src/LYUtils.c195
-rw-r--r--src/LYUtils.h6
-rw-r--r--src/LYexit.c111
-rw-r--r--src/UCdomap.c22
-rw-r--r--src/UCdomap.h20
-rw-r--r--src/chrtrans/README.format3
-rw-r--r--src/chrtrans/cp1252_uni.tbl6
-rw-r--r--src/chrtrans/cp1253_uni.tbl2
-rw-r--r--src/chrtrans/cp1257_uni.tbl2
-rw-r--r--src/chrtrans/cp437_uni.tbl2
-rw-r--r--src/chrtrans/cp737_uni.tbl2
-rw-r--r--src/chrtrans/cp775_uni.tbl2
-rw-r--r--src/chrtrans/cp866_uni.tbl4
-rw-r--r--src/chrtrans/cp869_uni.tbl2
-rw-r--r--src/chrtrans/def7_uni.tbl53
-rw-r--r--src/chrtrans/iso01_uni.tbl2
-rw-r--r--src/chrtrans/iso03_uni.tbl4
-rw-r--r--src/chrtrans/iso04_uni.tbl4
-rw-r--r--src/chrtrans/iso05_uni.tbl2
-rw-r--r--src/chrtrans/iso07_uni.tbl4
-rw-r--r--src/chrtrans/iso09_uni.tbl4
-rw-r--r--src/chrtrans/iso10_uni.tbl4
-rw-r--r--src/chrtrans/koi8r_uni.tbl224
-rw-r--r--src/chrtrans/mnem2_suni.tbl4
-rw-r--r--src/chrtrans/mnem_suni.tbl4
-rw-r--r--src/chrtrans/next_uni.tbl2
-rw-r--r--src/chrtrans/rfc_suni.tbl4
-rw-r--r--src/chrtrans/utf8_uni.tbl6
-rw-r--r--src/chrtrans/viscii_uni.tbl2
-rw-r--r--src/descrip.mms8
57 files changed, 1028 insertions, 663 deletions
diff --git a/src/DefaultStyle.c b/src/DefaultStyle.c
index c77f0b8f..7a498700 100644
--- a/src/DefaultStyle.c
+++ b/src/DefaultStyle.c
@@ -366,6 +366,7 @@ PRIVATE HTStyleSheet sheet = { "default.style",
PRIVATE HTStyleSheet *result = NULL;
+#ifdef LY_FIND_LEAKS
PRIVATE void FreeDefaultStyle NOARGS
{
HTStyle * style;
@@ -375,6 +376,7 @@ PRIVATE void FreeDefaultStyle NOARGS
}
FREE(result);
}
+#endif /* LY_FIND_LEAKS */
PUBLIC HTStyleSheet * DefaultStyle NOARGS
{
diff --git a/src/GridText.c b/src/GridText.c
index a5959781..b61ca5e1 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -147,7 +147,7 @@ typedef struct _TextAnchor {
int number; /* For user interface */
int start; /* Characters */
int line_pos; /* Position in text */
- int extent; /* Characters */
+ int extent; /* Characters */
int line_num; /* Place in document */
char * hightext; /* The link text */
char * hightext2; /* A second line*/
@@ -173,7 +173,7 @@ typedef struct _HTTabID {
*/
struct _HText {
HTParentAnchor * node_anchor;
- HTLine * last_line;
+ HTLine * last_line;
int Lines; /* Number of them */
int chars; /* Number of them */
TextAnchor * first_anchor; /* Singly linked list */
@@ -204,21 +204,21 @@ struct _HText {
int last_lineno_last_disp_partial;
#endif
- HTkcode kcode; /* Kanji code? */
+ HTkcode kcode; /* Kanji code? */
enum grid_state { S_text, S_esc, S_dollar, S_paren,
S_nonascii_text, S_dollar_paren,
S_jisx0201_text }
state; /* Escape sequence? */
int kanji_buf; /* Lead multibyte */
int in_sjis; /* SJIS flag */
- int halted; /* emergency halt */
+ int halted; /* emergency halt */
BOOL have_8bit_chars; /* Any non-ASCII chars? */
LYUCcharset * UCI; /* node_anchor UCInfo */
int UCLYhndl; /* charset we are fed */
UCTransParams T;
- HTStream * target; /* Output stream */
+ HTStream * target; /* Output stream */
HTStreamClass targetClass; /* Output routines */
};
@@ -250,7 +250,9 @@ 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 */
+#ifdef LY_FIND_LEAKS
PRIVATE void free_all_texts NOARGS;
+#endif
PRIVATE int HText_TrueLineSize PARAMS((
HTLine * line,
HText * text,
@@ -621,7 +623,7 @@ PUBLIC void HText_free ARGS1(
l = self->last_line = NULL;
break;
}
- };
+ }
while (self->first_anchor) { /* Free off anchor array */
TextAnchor * l = self->first_anchor;
@@ -2353,7 +2355,7 @@ PUBLIC void HText_setStyle ARGS2(
int after, before;
if (!style)
- return; /* Safety */
+ return; /* Safety */
after = text->style->spaceAfter;
before = style->spaceBefore;
@@ -6066,7 +6068,7 @@ PUBLIC void www_user_search ARGS3(
break;
} else if (count > start_line) { /* next line */
HTUserMsg2(STRING_NOT_FOUND, target);
- return; /* end */
+ return; /* end */
} else {
line = line->next;
count++;
@@ -8762,6 +8764,7 @@ PUBLIC void HText_activateRadioButton ARGS1(
form->num_value = 1;
}
+#ifdef LY_FIND_LEAKS
/*
* Purpose: Free all currently loaded HText objects in memory.
* Arguments: void
@@ -8811,6 +8814,7 @@ PRIVATE void free_all_texts NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
/*
** stub_HTAnchor_address is like HTAnchor_address, but it returns the
@@ -9346,16 +9350,16 @@ PRIVATE int increment_tagged_htline ARGS6(
* We use lxbuf[] to deal with the two lines involved.
*/
if (plx) {
- strcpy (lx, p); /* <- 1st part of a possible lx'ing tag */
- pre_n = strlen (p); /* count of 1st part chars in this line */
- strcat (lx, ht->next->data); /* tack on NEXT line */
+ strcpy (lx, p); /* <- 1st part of a possible lx'ing tag */
+ pre_n = strlen (p); /* count of 1st part chars in this line */
+ strcat (lx, ht->next->data); /* tack on NEXT line */
t = lx;
n = 0;
valid = TRUE;
/*
- * Go hunting again for just digits, followed by a tag end ']'.
+ * Go hunting again for just digits, followed by tag end ']'.
*/
while (*t != ']') {
if (isdigit (*t++) != 0) {
@@ -9576,8 +9580,8 @@ PRIVATE void update_subsequent_anchors ARGS4(
*
* [We bypass bumping ->number if it has a value of 0, which takes care
* of the ->input_field->type == F_HIDDEN_TYPE (as well as any other
- * "hidden" anchors (if such things exist). Seems like the "right
- * thing" to do. I think.
+ * "hidden" anchors, if such things exist). Seems like the "right
+ * thing" to do. I think.]
*/
anchor = start_anchor->next; /* begin updating with the NEXT anchor */
while (anchor) {
@@ -9596,8 +9600,8 @@ PRIVATE void update_subsequent_anchors ARGS4(
* boundary, this fixup only partially works. While the tag
* numbering is done properly across the pair of lines, the
* horizontal positioning on *either* side of the split, can get
- * out of sync by a char or two when it gets selected. See [com
- * ments] in increment_tagged_htline() for some more detail.
+ * out of sync by a char or two when it gets selected. See the
+ * [comments] in increment_tagged_htline() for some more detail.
*
* I suppose THE fix is to prevent such tag-breaking in the first
* place (dunno where yet, though). Ah well ... at least the tag
@@ -9719,15 +9723,15 @@ PUBLIC int HText_ExtEditForm ARGS1(
BOOLEAN firstanchor = TRUE;
char ed_offset[10];
- int start_line = 0;
- int entry_line = form_link->anchor_line_num;
- int exit_line = 0;
- int orig_cnt = 0;
- int line_cnt = 1;
+ int start_line = 0;
+ int entry_line = form_link->anchor_line_num;
+ int exit_line = 0;
+ int orig_cnt = 0;
+ int line_cnt = 1;
FormInfo *form = form_link->form;
char *areaname = form->name;
- int form_num = form->number;
+ int form_num = form->number;
HTLine *htline = NULL;
@@ -9737,9 +9741,11 @@ PUBLIC int HText_ExtEditForm ARGS1(
char *lp;
char *cp;
int match_tag = 0;
- int newlines = 0;
- int len;
+ int newlines = 0;
+ int len;
+
+ ed_offset[0] = 0; /* pre-ANSI compilers don't initialize aggregates - TD */
CTRACE(tfp, "GridText: entered HText_ExtEditForm()\n");
@@ -10068,7 +10074,7 @@ PUBLIC int HText_InsertFile ARGS1(
FormInfo *form = form_link->form;
char *areaname = form->name;
- int form_num = form->number;
+ int form_num = form->number;
HTLine *htline = NULL;
@@ -10080,11 +10086,11 @@ PUBLIC int HText_InsertFile ARGS1(
char *line;
char *lp;
char *cp;
- int entry_line = form_link->anchor_line_num;
- int match_tag = 0;
- int newlines = 0;
- int len;
- int i;
+ int entry_line = form_link->anchor_line_num;
+ int match_tag = 0;
+ int newlines = 0;
+ int len;
+ int i;
CTRACE(tfp, "GridText: entered HText_InsertFile()\n");
@@ -10162,7 +10168,7 @@ PUBLIC int HText_InsertFile ARGS1(
* along with a flag to indicate "insert before" as we do here,
* or the "normal" mode of operation (add after "current" anchor/
* line). Beware of the differences ... some are a bit subtle to
- * notice.
+ * notice.]
*/
for (htline = HTMainText->last_line->next, i = 0;
anchor_ptr->line_num != i; i++) {
@@ -10319,3 +10325,238 @@ PUBLIC int HText_InsertFile ARGS1(
return (newlines);
}
+
+/*
+ * This function draws the part of line 'line', pointed by 'str' (which can be
+ * non terminated with null - i.e., is line->data+N) drawing 'len' bytes (not
+ * characters) of it. It doesn't check whether the 'len' bytes crosses a
+ * character boundary (if multibyte chars are in string). Assumes that the
+ * cursor is positioned in the place where the 1st char of string should be
+ * drawn. Currently used only in redraw_lines_of_link when
+ * defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ * This code is based on display_line. This code was tested with ncurses only
+ * (since no support for lss is availble for Slang) and with
+ * defined(USE_COLOR_STYLE).
+ * -HV.
+ */
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+PRIVATE void redraw_part_of_line ARGS4(
+ HTLine *, line,
+ char*, str,
+ int, len,
+ HText *, text)
+{
+ register int i;
+ char buffer[7];
+ char *data,*end_of_data;
+ size_t utf_extra = 0;
+#ifdef USE_COLOR_STYLE
+ int current_style = 0;
+#endif
+ char LastDisplayChar = ' ';
+ int YP,XP;
+
+ LYGetYX(YP,XP);
+
+ i = XP;
+
+ /* Set up the multibyte character buffer */
+ buffer[0] = buffer[1] = buffer[2] = '\0';
+
+ data = str;
+ end_of_data = data + len;
+ i++;
+
+ /* this assumes that the part of line to be drawn fits in the screen*/
+ while ( data < end_of_data ) {
+ buffer[0] = *data;
+ data++;
+
+#if defined(USE_COLOR_STYLE) || defined(SLSC)
+#define CStyle line->styles[current_style]
+
+ while (current_style < line->numstyles &&
+ i >= (int) (CStyle.horizpos + line->offset + 1))
+ {
+ LynxChangeStyle (CStyle.style,CStyle.direction,CStyle.previous);
+ current_style++;
+ }
+#endif
+ switch (buffer[0]) {
+
+#ifndef USE_COLOR_STYLE
+ case LY_UNDERLINE_START_CHAR:
+ if (dump_output_immediately && use_underscore) {
+ addch('_');
+ i++;
+ } else {
+ start_underline();
+ }
+ break;
+
+ case LY_UNDERLINE_END_CHAR:
+ if (dump_output_immediately && use_underscore) {
+ addch('_');
+ i++;
+ } else {
+ stop_underline();
+ }
+ break;
+
+ case LY_BOLD_START_CHAR:
+ start_bold();
+ break;
+
+ case LY_BOLD_END_CHAR:
+ stop_bold ();
+ break;
+
+#endif
+ case LY_SOFT_NEWLINE:
+ if (!dump_output_immediately)
+ addch('+');
+ break;
+
+ case LY_SOFT_HYPHEN:
+ if (*data != '\0' ||
+ isspace((unsigned char)LastDisplayChar) ||
+ LastDisplayChar == '-') {
+ /*
+ * Ignore the soft hyphen if it is not the last
+ * character in the line. Also ignore it if it
+ * first character following the margin, or if it
+ * is preceded by a white character (we loaded 'M'
+ * into LastDisplayChar if it was a multibyte
+ * character) or hyphen, though it should have
+ * been excluded by HText_appendCharacter() or by
+ * split_line() in those cases. - FM
+ */
+ break;
+ } else {
+ /*
+ * Make it a hard hyphen and fall through. - FM
+ */
+ buffer[0] = '-';
+ i++;
+ }
+
+ default:
+ i++;
+ 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) {
+ /*
+ * Shouldn't happen.
+ */
+ utf_extra = 0;
+ }
+ LastDisplayChar = 'M';
+ }
+ 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 if (HTCJK != NOCJK && !isascii(buffer[0])) {
+ /*
+ * For CJK strings, by Masanobu Kimura.
+ */
+ buffer[1] = *data;
+ data++;
+ addstr(buffer);
+ buffer[1] = '\0';
+ /*
+ * For now, load 'M' into LastDisplayChar,
+ * but we should check whether it's white
+ * and if so, use ' '. I don't know if
+ * there actually are white CJK characters,
+ * and we're loading ' ' for multibyte
+ * spacing characters in this code set,
+ * but this will become an issue when
+ * the development code set's multibyte
+ * character handling is used. - FM
+ */
+ LastDisplayChar = 'M';
+ } else {
+ addstr(buffer);
+ LastDisplayChar = buffer[0];
+ }
+ } /* end of switch */
+ } /* end of while */
+
+#ifndef USE_COLOR_STYLE
+ stop_underline();
+ stop_bold();
+#else
+
+ while (current_style < line->numstyles)
+ {
+ LynxChangeStyle (CStyle.style, CStyle.direction, CStyle.previous);
+ current_style++;
+ }
+
+#undef CStyle
+#endif
+ return;
+}
+#endif /* defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) */
+
+/*
+ This is used only if compiled with lss support. It's called to draw
+ regular link (1st two lines of link) when it's being unhighlighted in
+ highlight:LYUtils.
+*/
+
+PUBLIC void redraw_lines_of_link ARGS1(
+ int, cur GCC_UNUSED)
+{
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+#define pvtTITLE_HEIGHT 1
+ HTLine* todr1, *todr2;
+ int lines_back;
+
+ if (HTMainText->next_line == HTMainText->last_line) {
+ /* we are at the last page - that is partially filled */
+ lines_back = HTMainText->Lines - ( links[cur].ly-pvtTITLE_HEIGHT+
+ HTMainText->top_of_screen);
+ } else {
+ lines_back = display_lines - (links[cur].ly-pvtTITLE_HEIGHT);
+ }
+ todr1 = HTMainText->next_line;
+ while (lines_back--)
+ todr1 = todr1->prev;
+ todr2 = (links[cur].hightext2 && links[cur].ly < display_lines) ?
+ todr1->next : 0;
+
+ move(links[cur].ly, links[cur].lx);
+ redraw_part_of_line (todr1, links[cur].hightext,
+ strlen(links[cur].hightext), HTMainText);
+ if (todr2) {
+ move(links[cur].ly+1,links[cur].hightext2_offset);
+ redraw_part_of_line (todr2, links[cur].hightext2,
+ strlen(links[cur].hightext2), HTMainText);
+ }
+
+#undef pvtTITLE_HEIGHT
+#else
+ /* no dead code !*/
+#endif
+ return;
+}
diff --git a/src/GridText.h b/src/GridText.h
index b431d422..c328202e 100644
--- a/src/GridText.h
+++ b/src/GridText.h
@@ -271,4 +271,7 @@ extern void HText_ExpandTextarea PARAMS((
extern int HText_InsertFile PARAMS((
struct link * form_link));
+extern void redraw_lines_of_link PARAMS((int cur));
+extern void HTMark_asSource NOPARAMS;
+
#endif /* LYGRIDTEXT_H */
diff --git a/src/HTAlert.c b/src/HTAlert.c
index 8c041f40..c386bb5e 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -192,10 +192,12 @@ PUBLIC BOOL HTLastConfirmCancelled NOARGS
}
}
+#define DFT_CONFIRM ~(YES|NO)
+
/* Seek confirmation. HTConfirm()
** ------------------
*/
-PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
+PUBLIC BOOL HTConfirmDefault ARGS2(CONST char *, Msg, int, Dft)
{
char *msg_yes = gettext("yes");
char *msg_no = gettext("no");
@@ -207,7 +209,10 @@ PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
} else {
char *msg = NULL;
- HTSprintf0(&msg, "%s (%c/%c) ", Msg, *msg_yes, *msg_no);
+ if (Dft == DFT_CONFIRM)
+ HTSprintf0(&msg, "%s (%c/%c) ", Msg, *msg_yes, *msg_no);
+ else
+ HTSprintf0(&msg, "%s (%c) ", Msg, (Dft == YES) ? *msg_yes : *msg_no);
_statusline(msg);
FREE(msg);
@@ -226,12 +231,19 @@ PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
result = YES;
} else if (TOUPPER(c) == TOUPPER(*msg_no)) {
return(NO);
+ } else if (Dft != DFT_CONFIRM && (c == '\r' || c == '\n')) {
+ return(Dft);
}
}
}
return (result);
}
+PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg)
+{
+ return HTConfirmDefault(Msg, DFT_CONFIRM);
+}
+
/* Prompt for answer and get text back. HTPrompt()
** ------------------------------------
*/
diff --git a/src/HTAlert.h b/src/HTAlert.h
index b3e5c8a9..97026647 100644
--- a/src/HTAlert.h
+++ b/src/HTAlert.h
@@ -50,6 +50,19 @@ extern void HTReadProgress PARAMS((long bytes, long total));
*/
extern BOOL HTLastConfirmCancelled NOPARAMS;
+/* Display a message, then wait for 'yes' or 'no', allowing default
+** response if a return or left-arrow is used.
+**
+** On entry,
+** Takes a list of parameters for printf.
+**
+** On exit,
+** If the user enters 'YES', returns TRUE, returns FALSE
+** otherwise.
+*/
+extern BOOL HTConfirmDefault PARAMS ((CONST char * Msg, int Dft));
+
+
/* Display a message, then wait for 'yes' or 'no'.
**
** On entry,
diff --git a/src/LYCgi.c b/src/LYCgi.c
index aaf69043..2704f6d9 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -71,6 +71,7 @@ PRIVATE void add_environment_value PARAMS((char *env_value));
#define PERROR(msg) CTRACE(tfp, "LYNXCGI: %s: %s\n", msg, LYStrerror(errno))
+#ifdef LY_FIND_LEAKS
PRIVATE void free_alloced_lynxcgi NOARGS
{
void *ptr;
@@ -83,6 +84,7 @@ PRIVATE void free_alloced_lynxcgi NOARGS
FREE(server_software);
#endif
}
+#endif /* LY_FIND_LEAKS */
PRIVATE void remember_alloced ARGS1(
void *, ptr)
diff --git a/src/LYClean.c b/src/LYClean.c
index af30f09a..16231871 100644
--- a/src/LYClean.c
+++ b/src/LYClean.c
@@ -57,17 +57,15 @@ PUBLIC void cleanup_sig ARGS1(
* Ask if exit is intended.
*/
if (LYQuitDefaultYes == TRUE) {
- _statusline(REALLY_EXIT_Y);
+ c = HTConfirmDefault(REALLY_EXIT_Y, YES);
} else {
- _statusline(REALLY_EXIT_N);
+ c = HTConfirmDefault(REALLY_EXIT_N, NO);
}
- c = LYgetch();
if (LYQuitDefaultYes == TRUE) {
- if (TOUPPER(c) == 'N' ||
- c == 7) {
+ if (c == NO) {
return;
}
- } else if (TOUPPER(c) != 'Y') {
+ } else if (c != YES) {
return;
}
}
diff --git a/src/LYCookie.c b/src/LYCookie.c
index 2fd26e6d..3eedd8c2 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -165,6 +165,7 @@ PRIVATE void freeCookie ARGS1(
}
}
+#ifdef LY_FIND_LEAKS
PRIVATE void LYCookieJar_free NOARGS
{
HTList *dl = domain_list;
@@ -195,6 +196,7 @@ PRIVATE void LYCookieJar_free NOARGS
HTList_delete(domain_list);
domain_list = NULL;
}
+#endif /* LY_FIND_LEAKS */
/*
** Compare two hostnames as specified in Section 2 of:
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 52371cea..b850c895 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1331,10 +1331,10 @@ PUBLIC void VMSexit NOARGS
gettext("\nA Fatal error has occurred in %s Ver. %s\n"), LYNX_NAME, LYNX_VERSION);
fprintf(stderr,
gettext("\nPlease notify your system administrator to confirm a bug, and if\n\
-"confirmed, to notify the lynx-dev list. Bug reports should have concise\n\
-"descriptions of the command and/or URL which causes the problem, the\n\
-"operating system name with version number, the TCPIP implementation, the\n\
-"TRACEBACK if it can be captured, and any other relevant information.\n"));
+confirmed, to notify the lynx-dev list. Bug reports should have concise\n\
+descriptions of the command and/or URL which causes the problem, the\n\
+operating system name with version number, the TCPIP implementation, the\n\
+TRACEBACK if it can be captured, and any other relevant information.\n"));
if (LYTraceLogFP == NULL) {
fprintf(stderr,RETURN_TO_CLEANUP);
diff --git a/src/LYCurses.h b/src/LYCurses.h
index cc9f5e42..74b9688c 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -147,10 +147,6 @@ extern void LYbox PARAMS((WINDOW *win, BOOLEAN formfield));
extern int LYlines; /* replaces LINES */
extern int LYcols; /* replaces COLS */
-#ifndef HTUTILS_H
-#include <HTUtils.h>
-#endif /* HTUTILS_H */
-
extern void start_curses NOPARAMS;
extern void stop_curses NOPARAMS;
extern BOOLEAN setup PARAMS((char *terminal));
diff --git a/src/LYExtern.c b/src/LYExtern.c
index 8d22d54b..5fb37840 100644
--- a/src/LYExtern.c
+++ b/src/LYExtern.c
@@ -16,14 +16,15 @@
*/
#include <LYUtils.h>
+
+#ifdef USE_EXTERNALS
+
#include <HTAlert.h>
#include <LYGlobalDefs.h>
#include <LYExtern.h>
-#include <LYCurses.h>
-
#include <LYLeaks.h>
+#include <LYCurses.h>
-#ifdef USE_EXTERNALS
void run_external ARGS1(char *, cmd)
{
char *the_command = 0;
diff --git a/src/LYForms.c b/src/LYForms.c
index 677671ae..60150823 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -419,12 +419,11 @@ again:
*/
case LTARROW:
if (MyEdit.pos == 0 && repeat == -1) {
- int c = 'Y'; /* Go back immediately if no changes */
+ int c = YES; /* Go back immediately if no changes */
if (strcmp(MyEdit.buffer, value)) {
- _statusline(PREV_DOC_QUERY);
- c = LYgetch();
+ c = HTConfirmDefault(PREV_DOC_QUERY, NO);
}
- if (TOUPPER(c) == 'Y') {
+ if (c == YES) {
return(ch);
} else {
if (form->disabled == YES)
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index 6e7f90d3..010c4a92 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -27,6 +27,7 @@
#ifdef DIRED_SUPPORT
#include <LYLocal.h>
#endif /* DIRED_SUPPORT */
+#include <LYReadCFG.h>
#include <LYexit.h>
#include <LYLeaks.h>
@@ -178,6 +179,8 @@ Try_Redirected_URL:
url_type == LYNXCOOKIE_URL_TYPE ||
url_type == LYNXPRINT_URL_TYPE ||
url_type == LYNXOPTIONS_URL_TYPE ||
+ url_type == LYNXCFG_URL_TYPE ||
+ url_type == LYNXCOMPILE_OPTS_URL_TYPE ||
url_type == LYNXDOWNLOAD_URL_TYPE ||
url_type == MAILTO_URL_TYPE ||
url_type == NEWSPOST_URL_TYPE ||
@@ -242,10 +245,40 @@ Try_Redirected_URL:
#ifndef NO_OPTION_FORMS
} else if (url_type == LYNXOPTIONS_URL_TYPE) {
- /* forms-based options menu */
+ /* proceed forms-based options menu */
return(postoptions(doc));
#endif
+ } else if (url_type == LYNXCFG_URL_TYPE) {
+ /* show lynx.cfg settings */
+ StrAllocCopy(doc->address, lynx_cfg_infopage());
+ WWWDoc.address = doc->address;
+ WWWDoc.post_data = doc->post_data;
+ WWWDoc.post_content_type = doc->post_content_type;
+ WWWDoc.bookmark = doc->bookmark;
+ WWWDoc.isHEAD = doc->isHEAD;
+ WWWDoc.safe = doc->safe;
+
+ if (!HTLoadAbsolute(&WWWDoc))
+ return(NOT_FOUND);
+ return(NORMAL);
+
+#ifdef HAVE_CFG_DEFS_H
+ } else if (url_type == LYNXCOMPILE_OPTS_URL_TYPE) {
+ /* show compile-time settings */
+ StrAllocCopy(doc->address, (char *)lynx_compile_opts());
+ WWWDoc.address = doc->address;
+ WWWDoc.post_data = doc->post_data;
+ WWWDoc.post_content_type = doc->post_content_type;
+ WWWDoc.bookmark = doc->bookmark;
+ WWWDoc.isHEAD = doc->isHEAD;
+ WWWDoc.safe = doc->safe;
+
+ if (!HTLoadAbsolute(&WWWDoc))
+ return(NOT_FOUND);
+ return(NORMAL);
+#endif
+
#ifndef DISABLE_NEWS
} else if (url_type == NEWSPOST_URL_TYPE ||
url_type == NEWSREPLY_URL_TYPE ||
@@ -711,6 +744,8 @@ Try_Redirected_URL:
#endif /* DIRED_SUPPORT */
url_type == LYNXPRINT_URL_TYPE ||
url_type == LYNXOPTIONS_URL_TYPE ||
+ url_type == LYNXCFG_URL_TYPE ||
+ url_type == LYNXCOMPILE_OPTS_URL_TYPE ||
url_type == LYNXHIST_URL_TYPE ||
url_type == LYNXCOOKIE_URL_TYPE ||
(LYValidate &&
@@ -1086,6 +1121,7 @@ static struct trust *trusted_exec = &trusted_exec_default;
static struct trust *always_trusted_exec = &always_trusted_exec_default;
static struct trust *trusted_cgi = &trusted_cgi_default;
+#ifdef LY_FIND_LEAKS
PRIVATE void LYTrusted_free NOARGS
{
struct trust *cur;
@@ -1126,9 +1162,10 @@ PRIVATE void LYTrusted_free NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
PUBLIC void add_trusted ARGS2(
- char *, str,
+ char *, str,
int, type)
{
struct trust *tp;
diff --git a/src/LYHash.c b/src/LYHash.c
index 265814cd..3410603a 100644
--- a/src/LYHash.c
+++ b/src/LYHash.c
@@ -1,13 +1,6 @@
/* A hash table for the (fake) CSS support in Lynx-rp
** (c) 1996 Rob Partington
*/
-
-#include <LYStructs.h>
-#include <LYCurses.h>
-#include <AttrList.h>
-#include <SGML.h>
-#include <HTMLDTD.h>
-
#include <LYHash.h>
#ifdef NOT_USED
@@ -29,8 +22,8 @@ PUBLIC int hash_code_rp ARGS1(char*,string)
#endif
/*
- * This is the same function as the private HASH_FUNCTION() in HTAnchor.c,
- * but with a different value for HASH_SIZE.
+ * This is the same function as the private HASH_FUNCTION() in HTAnchor.c,
+ * but with a different value for HASH_SIZE.
*/
#ifdef NOT_USED
@@ -45,7 +38,7 @@ PUBLIC int hash_code ARGS1 (char*, string)
unsigned char *p;
for (p = (unsigned char *)string, hash = 0; *p; p++)
- hash = (int) (hash * 3 + (*(unsigned char *)p)) % HASH_SIZE;
+ hash = (int) (hash * 3 + (*(unsigned char *)p)) % HASH_SIZE;
return hash;
}
diff --git a/src/LYHistory.c b/src/LYHistory.c
index a71f8f05..b0a2b827 100644
--- a/src/LYHistory.c
+++ b/src/LYHistory.c
@@ -25,6 +25,7 @@
PUBLIC HTList * Visited_Links = NULL; /* List of safe popped docs. */
+#ifdef LY_FIND_LEAKS
/*
* Utility for freeing the list of visited links. - FM
*/
@@ -45,6 +46,7 @@ PRIVATE void Visited_Links_free NOARGS
Visited_Links = NULL;
return;
}
+#endif /* LY_FIND_LEAKS */
/*
* Utility for listing visited links, making any repeated
diff --git a/src/LYJump.c b/src/LYJump.c
index e1a4e0c9..534e9c21 100644
--- a/src/LYJump.c
+++ b/src/LYJump.c
@@ -110,8 +110,10 @@ PUBLIC BOOL LYJumpInit ARGS1 (char *, config)
return FALSE;
}
StrAllocCopy(jtp->file, cp);
+#ifdef LY_FIND_LEAKS
if (!JThead)
atexit(LYJumpTable_free);
+#endif /* LY_FIND_LEAKS */
/*
* Get the key, if present.
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 9626919c..9a590758 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -348,7 +348,7 @@ PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat *, info, int, owner)
*/
PRIVATE BOOLEAN remove_tagged NOARGS
{
- int c, ans;
+ int ans;
BOOL will_clear = TRUE;
char *cp;
char *tmpbuf = NULL;
@@ -361,13 +361,11 @@ PRIVATE BOOLEAN remove_tagged NOARGS
if (HTList_isEmpty(tagged)) /* should never happen */
return 0;
- _statusline(gettext("Remove all tagged files and directories (y or n): "));
- c = LYgetch();
- ans = TOUPPER(c);
+ ans = HTConfirm(gettext("Remove all tagged files and directories "));
count = 0;
tag = tagged;
- while (ans == 'Y' && (cp = (char *)HTList_nextObject(tag)) != NULL) {
+ while (ans == YES && (cp = (char *)HTList_nextObject(tag)) != NULL) {
if (is_url(cp) == FILE_URL_TYPE) { /* unnecessary check */
testpath = HTfullURL_toFile(cp);
LYTrimPathSep(testpath);
@@ -2058,7 +2056,11 @@ PRIVATE int LYExecv ARGS3(
rc = 0;
break; /* don't fall thru! - KW */
case 0: /* child */
+#ifdef USE_EXECVP
+ execvp(path, argv); /* this uses our $PATH */
+#else
execv(path, argv);
+#endif
exit(-1); /* execv failed, give wait() something to look at */
default: /* parent */
#if !HAVE_WAITPID
diff --git a/src/LYMail.c b/src/LYMail.c
index c2b13b49..3250ccbf 100644
--- a/src/LYMail.c
+++ b/src/LYMail.c
@@ -552,7 +552,7 @@ PUBLIC void mailform ARGS4(
}
stop_curses();
- printf("%s\n\n$ %s\n\n%s"), SENDING_FORM_CONTENT, command, PLEASE_WAIT);
+ printf("%s\n\n$ %s\n\n%s", SENDING_FORM_CONTENT, command, PLEASE_WAIT);
LYSystem(command);
FREE(command);
sleep(AlertSecs);
diff --git a/src/LYMain.c b/src/LYMain.c
index d0009b7c..9e03d659 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -77,7 +77,7 @@ PUBLIC BOOLEAN UseFixedRecords = USE_FIXED_RECORDS;
PRIVATE char *lynx_version_putenv_command = NULL;
PUBLIC char *list_format = NULL; /* LONG_LIST formatting mask */
#ifdef SYSLOG_REQUESTED_URLS
-PUBLIC char *syslog_txt = NULL; /* syslog arb text for session */
+PUBLIC char *syslog_txt = NULL; /* syslog arb text for session */
#endif /* SYSLOG_REQUESTED_URLS */
#endif /* !VMS */
@@ -255,13 +255,13 @@ PUBLIC BOOLEAN local_host_only = FALSE;
PUBLIC BOOLEAN override_no_download = FALSE;
PUBLIC BOOLEAN show_dotfiles = FALSE; /* From rcfile if no_dotfiles is false */
PUBLIC BOOLEAN LYforce_HTML_mode = FALSE;
-PUBLIC char *homepage = NULL; /* home page or main screen */
PUBLIC char *editor = NULL; /* the name of the current editor */
PUBLIC char *jumpfile = NULL; /* the name of the default jumps file */
PUBLIC char *jumpprompt = NULL; /* the default jumps prompt */
PUBLIC char *bookmark_page = NULL; /* the name of the default bookmark page */
PUBLIC char *BookmarkPage = NULL; /* the name of the current bookmark page */
PUBLIC char *LynxHome = NULL; /* the default Home HREF. */
+PUBLIC char *homepage = NULL; /* home page or main screen */
PUBLIC char *startfile = NULL; /* the first file */
PUBLIC char *helpfile = NULL; /* the main help file */
PUBLIC char *helpfilepath = NULL; /* the path to the help file set */
@@ -286,7 +286,7 @@ PUBLIC char *system_mail_flags = NULL; /* Flags for sending mail */
PUBLIC char *lynx_cfg_file = NULL; /* location of active lynx.cfg */
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 */
+PUBLIC char *LYHostName = NULL; /* treat as a local host name */
PUBLIC char *LYLocalDomain = NULL; /* treat as a local domain tail */
PUBLIC BOOLEAN clickable_images = MAKE_LINKS_FOR_ALL_IMAGES;
PUBLIC BOOLEAN pseudo_inline_alts = MAKE_PSEUDO_ALTS_FOR_INLINES;
@@ -449,6 +449,7 @@ PRIVATE void reset_break(void)
}
#endif /* __DJGPP__ */
+#ifdef LY_FIND_LEAKS
PRIVATE void free_lynx_globals NOARGS
{
int i;
@@ -471,8 +472,10 @@ PRIVATE void free_lynx_globals NOARGS
#endif /* VMS */
FREE(LynxHome);
+ FREE(homepage);
FREE(startfile);
FREE(helpfile);
+ FREE(helpfilepath);
FREE(jumpprompt);
#ifdef JUMPFILE
FREE(jumpfile);
@@ -501,8 +504,6 @@ PRIVATE void free_lynx_globals NOARGS
FREE(LYHostName);
FREE(LYLocalDomain);
FREE(lynx_save_space);
- FREE(homepage);
- FREE(helpfilepath);
FREE(bookmark_page);
FREE(BookmarkPage);
for (i = 0; i <= MBM_V_MAXFILES; i++) {
@@ -520,7 +521,9 @@ PRIVATE void free_lynx_globals NOARGS
FREE(URLDomainPrefixes);
FREE(URLDomainSuffixes);
FREE(XLoadImageCommand);
+#ifndef VMS
FREE(lynx_version_putenv_command);
+#endif
FREE(lynx_temp_space);
FREE(LYTraceLogPath);
FREE(lynx_cfg_file);
@@ -542,6 +545,7 @@ PRIVATE void free_lynx_globals NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
/*
* This function frees the LYStdinArgs list. - FM
@@ -1335,9 +1339,81 @@ PUBLIC int main ARGS2(
*/
read_rc();
+ /*
+ * Get WWW_HOME environment variable if it exists.
+ */
+ if ((cp = getenv("WWW_HOME")) != NULL) {
+ StrAllocCopy(startfile, cp);
+ LYTrimStartfile(startfile);
+ }
+
+ /*
+ * Set the LynxHome URL. If it's a file URL and the
+ * host is defaulted, force in "//localhost", and if
+ * it's not an absolute URL, make it one. - FM
+ */
+ StrAllocCopy(LynxHome, startfile);
+ LYFillLocalFileURL((char **)&LynxHome, "file://localhost");
+ LYEnsureAbsoluteURL((char **)&LynxHome, "LynxHome");
+
+ /*
+ * Process any command line arguments not already handled. - FM
+ */
+ for (i = 1; i < argc; i++) {
+ parse_arg(&argv[i], &i);
+ }
+
+ /*
+ * Process any stdin-derived arguments for a lone "-" which we've
+ * loaded into LYStdinArgs. - FM
+ */
+ if (LYStdinArgs != NULL) {
+ char *my_args[2];
+ HTList *cur = LYStdinArgs;
+
+ my_args[1] = NULL;
+ while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) {
+ parse_arg(my_args, (int *)0);
+ }
+ LYStdinArgs_free();
+ }
+
+ /*
+ * Set the rest of variables when the configuration have read.
+ */
+
HTSwitchDTD(!Old_DTD);
/*
+ * Set up the proper character set with the desired
+ * startup raw 8-bit or CJK mode handling. - FM
+ */
+ HTMLUseCharacterSet(current_char_set);
+
+#ifdef EXP_PERSISTENT_COOKIES
+ /*
+ * Sod it, this looks like a reasonable place to load the
+ * cookies file, probably. - RP
+ */
+ if (persistent_cookies) {
+ if(LYCookieFile == NULL) {
+ LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, COOKIE_FILE);
+ } else {
+ if ((cp = strchr(LYCookieFile, '~'))) {
+ temp = NULL;
+ *(cp++) = '\0';
+ StrAllocCopy(temp, cp);
+ LYTrimPathSep(temp);
+ StrAllocCopy(LYCookieFile, wwwName(Home_Dir()));
+ StrAllocCat(LYCookieFile, temp);
+ FREE(temp);
+ }
+ }
+ LYLoadCookies(LYCookieFile);
+ }
+#endif
+
+ /*
* Check for a save space path in the environment.
* If one was set in the configuration file, that
* one will be overridden. - FM
@@ -1392,45 +1468,6 @@ PUBLIC int main ARGS2(
HTFormatInit();
HTFileInit();
- /*
- * Get WWW_HOME environment variable if it exists.
- */
- if ((cp = getenv("WWW_HOME")) != NULL) {
- StrAllocCopy(startfile, cp);
- LYTrimStartfile(startfile);
- }
-
- /*
- * Set the LynxHome URL. If it's a file URL and the
- * host is defaulted, force in "//localhost", and if
- * it's not an absolute URL, make it one. - FM
- */
- StrAllocCopy(LynxHome, startfile);
- LYFillLocalFileURL((char **)&LynxHome, "file://localhost");
- LYEnsureAbsoluteURL((char **)&LynxHome, "LynxHome");
-
- /*
- * Process any command line arguments not already handled. - FM
- */
- for (i = 1; i < argc; i++) {
- parse_arg(&argv[i], &i);
- }
-
- /*
- * Process any stdin-derived arguments for a lone "-" which we've
- * loaded into LYStdinArgs. - FM
- */
- if (LYStdinArgs != NULL) {
- char *my_args[2];
- HTList *cur = LYStdinArgs;
-
- my_args[1] = NULL;
- while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) {
- parse_arg(my_args, (int *)0);
- }
- LYStdinArgs_free();
- }
-
#ifndef VMS
#ifdef SYSLOG_REQUESTED_URLS
if (syslog_txt) {
@@ -1557,35 +1594,6 @@ PUBLIC int main ARGS2(
}
#endif /* !VMS */
- /*
- * Set up the proper character set with the desired
- * startup raw 8-bit or CJK mode handling. - FM
- */
- HTMLUseCharacterSet(current_char_set);
-
-#ifdef EXP_PERSISTENT_COOKIES
- /*
- * Sod it, this looks like a reasonable place to load the
- * cookies file, probably. - RP
- */
- if (persistent_cookies) {
- if(LYCookieFile == NULL) {
- LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, COOKIE_FILE);
- } else {
- if ((cp = strchr(LYCookieFile, '~'))) {
- temp = NULL;
- *(cp++) = '\0';
- StrAllocCopy(temp, cp);
- LYTrimPathSep(temp);
- StrAllocCopy(LYCookieFile, wwwName(Home_Dir()));
- StrAllocCat(LYCookieFile, temp);
- FREE(temp);
- }
- }
- LYLoadCookies(LYCookieFile);
- }
-#endif
-
#ifdef SIGTSTP
/*
* Block Control-Z suspending if requested. - FM
@@ -1797,7 +1805,7 @@ PUBLIC void LYRegisterLynxProtocols NOARGS
/* There are different ways of setting arguments on the command line, and
* there are different types of arguments. These include:
*
- * -set_some_variable ==> some_variable = TRUE
+ * -set_some_variable ==> some_variable = TRUE
* -toggle_some_variable ==> some_variable = !some_variable
* -some_variable=value ==> some_variable = value
*
@@ -1842,11 +1850,11 @@ typedef struct parse_args_type
int type;
#define IGNORE_ARG 0x000
#define TOGGLE_ARG 0x001
-#define SET_ARG 0x002
+#define SET_ARG 0x002
#define UNSET_ARG 0x003
#define FUNCTION_ARG 0x004
#define LYSTRING_ARG 0x005
-#define INT_ARG 0x006
+#define INT_ARG 0x006
#define STRING_ARG 0x007
#define ARG_TYPE_MASK 0x0FF
#define NEED_NEXT_ARG 0x100
@@ -2470,16 +2478,6 @@ static int source_fun ARGS3(
return 0;
}
-/* -tagsoup */
-static int tagsoup_fun ARGS3(
- Parse_Args_Type *, p GCC_UNUSED,
- char **, argv GCC_UNUSED,
- char *, next_arg GCC_UNUSED)
-{
- HTSwitchDTD(!(Old_DTD = YES));
- return 0;
-}
-
/* -traversal */
static int traversal_fun ARGS3(
Parse_Args_Type *, p GCC_UNUSED,
@@ -2644,7 +2642,7 @@ with -dump, format output as with -traversal, but to stdout"
"dump the first file to stdout and exit"
),
PARSE_FUN(
- "editor", NEED_FUNCTION_ARG, editor_fun,
+ "editor", NEED_FUNCTION_ARG, editor_fun,
"=EDITOR\nenable edit mode with specified editor"
),
PARSE_SET(
@@ -2672,7 +2670,7 @@ keys (may be incompatible with some curses packages)"
"enable local program execution from local files only"
),
PARSE_SET(
- "noexec", UNSET_ARG, &local_exec,
+ "noexec", UNSET_ARG, &local_exec,
"disable local program execution (DEFAULT)"
),
#endif /* EXEC_LINKS || EXEC_SCRIPTS */
@@ -2789,7 +2787,7 @@ keys (may be incompatible with some curses packages)"
"disable transmissions of Referer headers for file URLs"
),
PARSE_SET(
- "nolist", SET_ARG, &nolist,
+ "nolist", SET_ARG, &nolist,
"disable the link list feature in dumps"
),
PARSE_SET(
@@ -2871,7 +2869,7 @@ with partial-display logic"
"restricts access to URLs in the starting realm"
),
PARSE_SET(
- "reload", SET_ARG, &reloading,
+ "reload", SET_ARG, &reloading,
"flushes the cache on a proxy server\n(only the first document affected)"
),
PARSE_FUN(
@@ -2885,7 +2883,7 @@ method POST when the documents they returned are sought\n\
with the PREV_DOC command or from the History List"
),
PARSE_SET(
- "rlogin", UNSET_ARG, &rlogin_ok,
+ "rlogin", UNSET_ARG, &rlogin_ok,
"disable rlogins"
),
PARSE_FUN(
@@ -2902,7 +2900,7 @@ with the PREV_DOC command or from the History List"
treated '>' as a co-terminator for double-quotes and tags"
),
PARSE_FUN(
- "source", FUNCTION_ARG, source_fun,
+ "source", FUNCTION_ARG, source_fun,
"dump the source of the first file to stdout and exit"
),
PARSE_SET(
@@ -2916,17 +2914,17 @@ treated '>' as a co-terminator for double-quotes and tags"
#ifndef VMS
#ifdef SYSLOG_REQUESTED_URLS
PARSE_STR(
- "syslog", NEED_LYSTRING_ARG, &syslog_txt,
+ "syslog", NEED_LYSTRING_ARG, &syslog_txt,
"=text\ninformation for syslog call"
),
#endif
#endif
PARSE_FUN(
- "tagsoup", FUNCTION_ARG, tagsoup_fun,
+ "tagsoup", SET_ARG, &Old_DTD,
"use TagSoup rather than SortaSGML parser"
),
PARSE_SET(
- "telnet", UNSET_ARG, &telnet_ok,
+ "telnet", UNSET_ARG, &telnet_ok,
"disable telnets"
),
PARSE_STR(
@@ -2972,7 +2970,7 @@ treated '>' as a co-terminator for double-quotes and tags"
"print Lynx version information"
),
PARSE_SET(
- "vikeys", SET_ARG, &vi_keys,
+ "vikeys", SET_ARG, &vi_keys,
"enable vi-like key movement"
),
PARSE_FUN(
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 645b4f6b..8b0b824b 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -54,10 +54,10 @@
#include <LYLeaks.h>
PRIVATE BOOL confirm_post_resub PARAMS((
- CONST char* address,
- CONST char* title,
- int if_imgmap,
- int if_file));
+ CONST char* address,
+ CONST char* title,
+ int if_imgmap,
+ int if_file));
PRIVATE int are_different PARAMS((document *doc1, document *doc2));
PUBLIC void HTGotoURLs_free NOPARAMS;
PUBLIC void HTAddGotoURL PARAMS((char *url));
@@ -69,8 +69,8 @@ PRIVATE int are_phys_different PARAMS((document *doc1, document *doc2));
#define FASTTAB
PRIVATE int sametext ARGS2(
- char *, een,
- char *, twee)
+ char *, een,
+ char *, twee)
{
if (een && twee)
return (strcmp(een, twee) == 0);
@@ -94,6 +94,7 @@ PRIVATE char *CurrentUserAgent = NULL;
PRIVATE char *CurrentNegoLanguage = NULL;
PRIVATE char *CurrentNegoCharset = NULL;
+#ifdef LY_FIND_LEAKS
/*
* Function for freeing allocated mainloop() variables. - FM
*/
@@ -124,6 +125,7 @@ PRIVATE void free_mainloop_variables NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
PUBLIC FILE *TraceFP NOARGS
{
@@ -620,7 +622,7 @@ try_again:
* Do any error logging, if appropriate.
*/
LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */
- popped_doc = FALSE; /* Was TRUE if popped. - FM */
+ popped_doc = FALSE; /* Was TRUE if popped. - FM */
LYinternal_flag = FALSE; /* Reset to default. - kw */
if (trace_mode_flag == TRUE) {
WWW_TraceFlag = TRUE;
@@ -695,7 +697,7 @@ try_again:
* Not supposed to return any file.
*/
LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */
- popped_doc = FALSE; /* Was TRUE if popped. - FM */
+ popped_doc = FALSE; /* Was TRUE if popped. - FM */
LYinternal_flag = FALSE; /* Reset to default. - kw */
if (trace_mode_flag == TRUE) {
WWW_TraceFlag = TRUE;
@@ -724,15 +726,15 @@ try_again:
FREE(traversal_link_to_add);
}
}
- /*
- * Make sure the first file was found and
- * has not gone missing.
- */
- if (!nhist) {
- /*
- * If nhist = 0 then it must be the first file.
- */
- if (first_file && homepage &&
+ /*
+ * Make sure the first file was found and
+ * has not gone missing.
+ */
+ if (!nhist) {
+ /*
+ * If nhist = 0 then it must be the first file.
+ */
+ if (first_file && homepage &&
#ifdef VMS
strcasecomp(homepage, startfile) != 0
#else
@@ -758,7 +760,7 @@ try_again:
newdoc.safe = FALSE;
newdoc.internal_link = FALSE;
goto try_again;
- } else {
+ } else {
if (!dump_output_immediately)
cleanup();
#ifdef UNIX
@@ -781,7 +783,7 @@ try_again:
exit_immediately(-1);
}
return(-1);
- }
+ }
}
/*
@@ -1080,7 +1082,7 @@ try_again:
LYNoRefererForThis = FALSE; /* always reset on return here */
reloading = FALSE; /* only set for RELOAD and RESUBMIT */
HEAD_request = FALSE; /* only set for HEAD requests */
- LYPermitURL = FALSE; /* only set for LYValidate */
+ LYPermitURL = FALSE; /* only set for LYValidate */
ForcePush = FALSE; /* only set for some PRINT requests. */
LYforce_HTML_mode = FALSE;
popped_doc = FALSE;
@@ -2245,26 +2247,24 @@ new_cmd: /*
case LYK_QUIT: /* quit */
if (LYQuitDefaultYes == TRUE) {
- _statusline(REALLY_QUIT_Y);
+ c = HTConfirmDefault(REALLY_QUIT_Y, YES);
} else {
- _statusline(REALLY_QUIT_N);
+ c = HTConfirmDefault(REALLY_QUIT_N, NO);
}
- c = LYgetch();
if (LYQuitDefaultYes == TRUE) {
- if (TOUPPER(c) != 'N' &&
- c != 7) {
+ if (c != NO) {
return(0);
} else {
HTInfoMsg(NO_CANCEL);
}
- } else if (TOUPPER(c) == 'Y') {
+ } else if (c == YES) {
return(0);
} else {
HTInfoMsg(NO_CANCEL);
}
break;
- case LYK_ABORT: /* don't ask the user about quitting */
+ case LYK_ABORT: /* don't ask the user about quitting */
return(0);
case LYK_NEXT_PAGE: /* next page */
@@ -3217,7 +3217,7 @@ new_cmd: /*
* List Page is about. - kw
*/
if ( 0==strcmp(curdoc.address, LYlist_temp_url()) &&
- (LIsListpageTitle(curdoc.title ? curdoc.title : ""))) {
+ (LYIsListpageTitle(curdoc.title ? curdoc.title : ""))) {
if (!curdoc.post_data ||
/*
* Normal case - List Page is not associated
@@ -3770,6 +3770,8 @@ check_goto_URL:
!strncmp(user_input_buffer, "LYNXDIRED:", 10) ||
!strncmp(user_input_buffer, "LYNXDOWNLOAD:", 13) ||
!strncmp(user_input_buffer, "LYNXOPTIONS:", 12) ||
+ !strncmp(user_input_buffer, "LYNXCFG:", 8) ||
+ !strncmp(user_input_buffer, "LYNXCOMPILEOPTS:", 16) ||
!strncmp(user_input_buffer, "LYNXPRINT:", 10)) {
HTUserMsg(GOTO_SPECIAL_DISALLOWED);
@@ -3851,9 +3853,7 @@ check_goto_URL:
*/
if (!STREQ(curdoc.address,homepage)) {
- _statusline(CONFIRM_MAIN_SCREEN);
- c = LYgetch();
- if (TOUPPER(c)=='Y') {
+ if (HTConfirmDefault(CONFIRM_MAIN_SCREEN, NO) == YES) {
StrAllocCopy(newdoc.address, homepage);
StrAllocCopy(newdoc.title, gettext("Entry into main screen"));
FREE(newdoc.post_data);
@@ -3868,10 +3868,6 @@ check_goto_URL:
HTuncache_current_document();
#endif /* DIRED_SUPPORT */
}
-#ifdef VMS
- if (HadVMSInterrupt)
- HadVMSInterrupt = FALSE;
-#endif /* VMS */
} else {
if (old_c != real_c) {
old_c = real_c;
@@ -4012,7 +4008,7 @@ if (!LYUseFormsOptions) {
* before the 'options menu' only when (few) important options
* were changed.
*/
-/* HTuncache_current_document(); */
+/* HTuncache_current_document(); */
}
#endif /* !NO_OPTION_FORMS */
break;
@@ -4174,9 +4170,7 @@ if (!LYUseFormsOptions) {
HTUserMsg(MAIL_DISALLOWED);
}
} else {
- _statusline(CONFIRM_COMMENT);
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (HTConfirmDefault(CONFIRM_COMMENT, NO)) {
if (!owner_address) {
/*
* No owner defined, so make a guess and
@@ -4206,10 +4200,10 @@ if (!LYUseFormsOptions) {
StrAllocCopy(address, "mailto:WebMaster@");
temp = HTParse(curdoc.address, "", PARSE_HOST);
StrAllocCat(address, temp);
+ HTSprintf0(&temp, NO_OWNER_USE, address);
+ c = HTConfirmDefault(temp, NO);
FREE(temp);
- _user_message(NO_OWNER_USE, address);
- c = LYgetch();
- if (TOUPPER(c) == 'Y') {
+ if (c == YES) {
StrAllocCopy(owner_address, address);
FREE(address);
} else {
@@ -4254,10 +4248,10 @@ if (!LYUseFormsOptions) {
FREE(tmptitle);
refresh_screen = TRUE; /* to force a showpage */
- }
- }
- }
- break;
+ }
+ }
+ }
+ break;
#ifdef DIRED_SUPPORT
case LYK_TAG_LINK: /* tag or untag the current link */
@@ -4366,8 +4360,8 @@ if (!LYUseFormsOptions) {
*/
if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
- cmd = LYK_EDIT_TEXTAREA;
- goto new_cmd;
+ cmd = LYK_EDIT_TEXTAREA;
+ goto new_cmd;
}
/*
@@ -4469,16 +4463,14 @@ if (!LYUseFormsOptions) {
case LYK_DEL_BOOKMARK: /* remove a bookmark file link */
#ifdef DIRED_SUPPORT
case LYK_REMOVE: /* remove files and directories */
- c = 'N';
+ c = NO;
if (lynx_edit_mode && nlinks > 0 && !no_dired_support) {
local_remove(&curdoc);
- c = 'Y';
+ c = YES;
} else
#endif /* DIRED_SUPPORT */
if (curdoc.bookmark != NULL) {
- _statusline(CONFIRM_BOOKMARK_DELETE);
- c = LYgetch();
- if (TOUPPER(c) != 'Y')
+ if ((c = HTConfirmDefault(CONFIRM_BOOKMARK_DELETE,NO)) != YES)
break;
remove_bookmark_link(links[curdoc.link].anchor_number-1,
curdoc.bookmark);
@@ -4490,7 +4482,7 @@ if (!LYUseFormsOptions) {
}
break;
}
- if (TOUPPER(c) == 'Y') {
+ if (c == YES) {
HTuncache_current_document();
StrAllocCopy(newdoc.address, curdoc.address);
FREE(curdoc.address);
@@ -4791,7 +4783,7 @@ if (!LYUseFormsOptions) {
break;
#if defined(DIRED_SUPPORT) || defined(VMS)
- case LYK_DIRED_MENU: /* provide full file management menu */
+ case LYK_DIRED_MENU: /* provide full file management menu */
#ifdef VMS
/*
* Check if the CSwing Directory/File Manager is available.
@@ -4927,8 +4919,8 @@ if (!LYUseFormsOptions) {
case LYK_EXTERN: /* use external program on url */
if ((nlinks > 0) && (links[curdoc.link].lname != NULL))
{
- run_external(links[curdoc.link].lname);
- refresh_screen = TRUE;
+ run_external(links[curdoc.link].lname);
+ refresh_screen = TRUE;
}
break;
#endif /* USE_EXTERNALS */
@@ -5298,6 +5290,10 @@ check_add_bookmark_to_self:
!strncmp(links[curdoc.link].lname,
"LYNXOPTIONS:", 12) ||
!strncmp(links[curdoc.link].lname,
+ "LYNXCFG:", 8) ||
+ !strncmp(links[curdoc.link].lname,
+ "LYNXCOMPILEOPTS:", 16) ||
+ !strncmp(links[curdoc.link].lname,
"lynxexec:", 9) ||
!strncmp(links[curdoc.link].lname,
"lynxprog:", 9)) {
@@ -5716,7 +5712,9 @@ check_add_bookmark_to_self:
#ifndef DISABLE_NEWS
HTClearNNTPAuthInfo();
#endif
+#ifndef DISABLE_FTP
HTClearFTPPassword();
+#endif
HTUserMsg(AUTH_INFO_CLEARED);
} else {
HTUserMsg(CANCELLED);
@@ -5989,7 +5987,7 @@ PUBLIC void HTGotoURLs_free NOARGS
* repeated URLs the most current in the list. - FM
*/
PUBLIC void HTAddGotoURL ARGS1(
- char *, url)
+ char *, url)
{
char *new;
char *old;
diff --git a/src/LYMap.c b/src/LYMap.c
index d28cff2f..56d3f51d 100644
--- a/src/LYMap.c
+++ b/src/LYMap.c
@@ -86,6 +86,7 @@ PUBLIC void ImageMapList_free ARGS1(
return;
}
+#ifdef LY_FIND_LEAKS
/*
* Utility for freeing the global list of MAPs. - kw
*/
@@ -95,6 +96,7 @@ PRIVATE void LYLynxMaps_free NOARGS
LynxMaps = NULL;
return;
}
+#endif /* LY_FIND_LEAKS */
/*
* We keep two kinds of lists:
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 6079cd9d..b128dfb5 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -33,7 +33,7 @@ PRIVATE int boolean_choice PARAMS((
int status,
int line,
int column,
- char ** choices));
+ char ** choices));
#define MAXCHOICES 10
@@ -3230,8 +3230,8 @@ static CONST char off_string[] = "OFF";
static CONST char never_string[] = "NEVER";
static CONST char always_string[] = "ALWAYS";
static OptValues bool_values[] = {
- { FALSE, "OFF", "OFF" },
- { TRUE, "ON", "ON" },
+ { FALSE, "OFF", "OFF" },
+ { TRUE, "ON", "ON" },
{ 0, 0, 0 }};
static char * secure_string = "secure";
@@ -3247,13 +3247,13 @@ static char * cookies_up_to_user_string = "ask user";
static char * cookies_accept_all_string = "accept all";
static char * x_display_string = "display";
static char * editor_string = "editor";
-static char * emacs_keys_string = "emacs_keys";
+static char * emacs_keys_string = "emacs_keys";
#ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS
#define EXEC_ALWAYS 2
#define EXEC_LOCAL 1
#define EXEC_NEVER 0
-static char * exec_links_string = "exec_options";
+static char * exec_links_string = "exec_options";
static OptValues exec_links_values[] = {
{ EXEC_NEVER, "ALWAYS OFF", "ALWAYS OFF" },
{ EXEC_LOCAL, "FOR LOCAL FILES ONLY", "FOR LOCAL FILES ONLY" },
@@ -3279,15 +3279,15 @@ static char * mail_address_string = "mail_address";
static char * search_type_string = "search_type";
static OptValues search_type_values[] = {
{ FALSE, "Case insensitive", "case_insensitive" },
- { TRUE, "Case sensitive", "case_sensitive" },
+ { TRUE, "Case sensitive", "case_sensitive" },
{ 0, 0, 0 }};
#if defined(USE_SLANG) || defined(COLOR_CURSES)
static char * show_color_string = "show_color";
static OptValues show_color_values[] = {
- { SHOW_COLOR_NEVER, never_string, never_string },
- { SHOW_COLOR_OFF, off_string, off_string },
- { SHOW_COLOR_ON, on_string, on_string },
- { SHOW_COLOR_ALWAYS, always_string, always_string },
+ { SHOW_COLOR_NEVER, never_string, never_string },
+ { SHOW_COLOR_OFF, off_string, off_string },
+ { SHOW_COLOR_ON, on_string, on_string },
+ { SHOW_COLOR_ALWAYS, always_string, always_string },
{ 0, 0, 0 }};
#endif
static char * show_cursor_string = "show_cursor";
@@ -3305,8 +3305,8 @@ static char * vi_keys_string = "vi_keys";
static char * DTD_recovery_string = "DTD";
static OptValues DTD_type_values[] = {
/* Old_DTD variable */
- { TRUE, "relaxed (TagSoup mode)", "tagsoup" },
- { FALSE, "strict (SortaSGML mode)", "sortasgml" },
+ { TRUE, "relaxed (TagSoup mode)", "tagsoup" },
+ { FALSE, "strict (SortaSGML mode)", "sortasgml" },
{ 0, 0, 0 }};
static char * select_popups_string = "select_popups";
static char * images_string = "images";
@@ -3317,7 +3317,7 @@ static char * verbose_images_string = "verbose_images";
static OptValues verbose_images_type_values[] = {
/* verbose_img variable */
{ FALSE, "OFF", "OFF" },
- { TRUE, "show filename", "ON" },
+ { TRUE, "show filename", "ON" },
{ 0, 0, 0 }};
/*
@@ -3341,7 +3341,7 @@ static char * raw_mode_string = "raw_mode";
*/
static char * show_dotfiles_string = "show_dotfiles";
#ifdef DIRED_SUPPORT
-static char * dired_sort_string = "dired_sort";
+static char * dired_sort_string = "dired_sort";
static OptValues dired_values[] = {
{ 0, "Directories first", "dired_dir" },
{ FILES_FIRST, "Files first", "dired_files" },
@@ -3350,10 +3350,10 @@ static OptValues dired_values[] = {
#endif /* DIRED_SUPPORT */
static char * ftp_sort_string = "ftp_sort";
static OptValues ftp_sort_values[] = {
- { FILE_BY_NAME, "By Name", "ftp_by_name" },
- { FILE_BY_TYPE, "By Type", "ftp_by_type" },
- { FILE_BY_SIZE, "By Size", "ftp_by_size" },
- { FILE_BY_DATE, "By Date", "ftp_by_date" },
+ { FILE_BY_NAME, "By Name", "ftp_by_name" },
+ { FILE_BY_TYPE, "By Type", "ftp_by_type" },
+ { FILE_BY_SIZE, "By Size", "ftp_by_size" },
+ { FILE_BY_DATE, "By Date", "ftp_by_date" },
{ 0, 0, 0 }};
/*
@@ -3384,7 +3384,7 @@ static char * user_agent_string = "user_agent";
fprintf(fp,"</select>\n")
PRIVATE void PutOptValues ARGS3(
- FILE *, fp,
+ FILE *, fp,
int, value,
OptValues *, table)
{
@@ -3399,7 +3399,7 @@ PRIVATE void PutOptValues ARGS3(
PRIVATE BOOLEAN GetOptValues ARGS3(
OptValues *, table,
- char *, value,
+ char *, value,
int *, result)
{
while (table->LongName != 0) {
@@ -3525,7 +3525,7 @@ PRIVATE PostPair * break_data ARGS1(
*/
PUBLIC int postoptions ARGS1(
- document *, newdoc)
+ document *, newdoc)
{
PostPair *data = 0;
DocAddress WWWDoc; /* need on exit */
@@ -3922,12 +3922,19 @@ PUBLIC int postoptions ARGS1(
WWWDoc.bookmark = newdoc->bookmark;
WWWDoc.isHEAD = newdoc->isHEAD;
WWWDoc.safe = newdoc->safe;
+ LYforce_no_cache = FALSE; /* ! */
+ LYoverride_no_cache = TRUE; /* ! */
+ /*
+ * Working out of getfile() cycle we reset *no_cache manually here so
+ * HTLoadAbsolute() will return "Document already in memory": it was
+ * forced reloading Options Menu again without this (overhead).
+ *
+ * Probably *no_cache was set in a wrong position because of
+ * the internal page...
+ */
if (!HTLoadAbsolute(&WWWDoc))
return(NOT_FOUND);
- /*** two HTLoadAbsolute() here allow things work correctly,
- *** sorry for overhead (probably only seen in trace log).
- ***/
/*
* Return to previous doc, not to options menu!
@@ -3941,6 +3948,15 @@ PUBLIC int postoptions ARGS1(
WWWDoc.bookmark = newdoc->bookmark;
WWWDoc.isHEAD = newdoc->isHEAD;
WWWDoc.safe = newdoc->safe;
+ LYforce_no_cache = FALSE; /* see below */
+ LYoverride_no_cache = TRUE; /* see below */
+ /*
+ * Re-setting of *no_cache is probably not required here but this is a
+ * guarantee against _double_ reloading over the net in case prev document
+ * has its own "no cache" attribute and options menu set "need_reload"
+ * also. Force this HTLoadAbsolute() to return "Document already in
+ * memory".
+ */
if (!HTLoadAbsolute(&WWWDoc))
return(NOT_FOUND);
@@ -4389,8 +4405,7 @@ PUBLIC int gen_options ARGS1(
if (!LYRestricted) {
fprintf(fp0,
- "\n Check your <a href=\"%s\">lynx.cfg</a> here\n",
- lynx_cfg_infopage());
+ "\n Check your <a href=\"LYNXCFG:\">lynx.cfg</a> here\n");
}
fprintf(fp0,"\n</pre>\n");
diff --git a/src/LYPrint.c b/src/LYPrint.c
index 045a8b6b..5c73a70f 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -287,18 +287,10 @@ PRIVATE BOOLEAN confirm_by_pages ARGS3(
char *msg = 0;
HTSprintf0(&msg, prompt, pages);
- _statusline(msg);
+ c = HTConfirmDefault(msg, YES);
FREE(msg);
- c = LYgetch();
-#ifdef VMS
- if (HadVMSInterrupt) {
- HadVMSInterrupt = FALSE;
- HTInfoMsg(PRINT_REQUEST_CANCELLED);
- return FALSE;
- }
-#endif /* VMS */
- if (c == RTARROW || c == 'y' || c== 'Y' || c == '\n' || c == '\r') {
+ if (c == YES) {
addstr(" Ok...");
} else {
HTInfoMsg(PRINT_REQUEST_CANCELLED);
@@ -495,21 +487,10 @@ PRIVATE void send_file_to_mail ARGS3(
char *buffer = NULL;
char *subject = NULL;
char user_response[LINESIZE];
- int c;
if (LYPreparsedSource && first_mail_preparsed &&
HTisDocumentSource()) {
- _statusline(CONFIRM_MAIL_SOURCE_PREPARSED);
- c = 0;
- while (TOUPPER(c)!='Y' && TOUPPER(c)!='N' && c != 7 && c != 3)
- c = LYgetch();
-#ifdef VMS
- if (HadVMSInterrupt) {
- HadVMSInterrupt = FALSE;
- CancelPrint(MAIL_REQUEST_CANCELLED);
- }
-#endif /* VMS */
- if (c == RTARROW || c == 'y' || c== 'Y' || c == '\n' || c == '\r') {
+ if (HTConfirmDefault(CONFIRM_MAIL_SOURCE_PREPARSED, NO) == YES) {
addstr(" Ok...");
first_mail_preparsed = FALSE;
} else {
@@ -1169,7 +1150,7 @@ PUBLIC int printfile ARGS1(
#ifdef VMS
PRIVATE int remove_quotes ARGS1(
- char *, string)
+ char *, string)
{
int i;
@@ -1191,7 +1172,10 @@ PRIVATE int remove_quotes ARGS1(
* MIME define "quoted-printable" which holds charset info
* but most mailers still don't support it, on the other hand
* many mailers send open 8-bit subjects without charset info
- * and use local assumption for certain countries.
+ * and use local assumption for certain countries. Besides that,
+ * obsolete SMTP software is not 8bit clean but still in use,
+ * it strips the characters in 128-160 range from subjects
+ * which may be a fault outside iso-8859-XX.
*
* We translate subject to "outgoing_mail_charset" (defined in lynx.cfg)
* it may correspond to US-ASCII as the safest value or any other
@@ -1211,7 +1195,8 @@ PRIVATE char* subject_translate8bit ARGS1(char *, source)
int i = outgoing_mail_charset; /* from lynx.cfg, -1 by default */
if (i < 0
- || LYHaveCJKCharacterSet
+ || i == current_char_set
+ || LYCharSet_UC[current_char_set].enc == UCT_ENC_CJK
|| LYCharSet_UC[i].enc == UCT_ENC_CJK) {
StrAllocCopy(target, source);
return(target); /* OK */
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 9c22508f..6e6960e1 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -74,6 +74,7 @@ PRIVATE char *find_colon ARGS1(
return NULL;
}
+#ifdef LY_FIND_LEAKS
/*
* Function for freeing the DOWNLOADER and UPLOADER menus list. - FM
*/
@@ -118,12 +119,13 @@ PRIVATE void free_item_list NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
/*
* Process string buffer fields for DOWNLOADER or UPLOADER menus.
*/
PRIVATE void add_item_to_list ARGS2(
- char *, buffer,
+ char *, buffer,
lynx_html_item_type **, list_ptr)
{
char *colon, *next_colon;
@@ -195,6 +197,7 @@ PRIVATE void add_item_to_list ARGS2(
}
+#ifdef LY_FIND_LEAKS
/*
* Function for freeing the PRINTER menus list. - FM
*/
@@ -214,12 +217,13 @@ PRIVATE void free_printer_item_list NOARGS
return;
}
+#endif /* LY_FIND_LEAKS */
/*
* Process string buffer fields for PRINTER menus.
*/
PRIVATE void add_printer_to_list ARGS2(
- char *, buffer,
+ char *, buffer,
lynx_printer_item_type **, list_ptr)
{
char *colon, *next_colon;
@@ -370,7 +374,7 @@ PUBLIC int check_color ARGS2(
* Exit routine for failed COLOR parsing.
*/
PRIVATE void exit_with_color_syntax ARGS1(
- char *, error_line)
+ char *, error_line)
{
unsigned int i;
fprintf (stderr, gettext("\
@@ -493,7 +497,7 @@ typedef struct
Config_Type;
static int assume_charset_fun ARGS1(
- char *, value)
+ char *, value)
{
UCLYhndl_for_unspec = safeUCGetLYhndl_byMIME(value);
StrAllocCopy(UCAssume_MIMEcharset,
@@ -506,21 +510,21 @@ static int assume_charset_fun ARGS1(
}
static int assume_local_charset_fun ARGS1(
- char *, value)
+ char *, value)
{
UCLYhndl_HTFile_for_unspec = safeUCGetLYhndl_byMIME(value);
return 0;
}
static int assume_unrec_charset_fun ARGS1(
- char *, value)
+ char *, value)
{
UCLYhndl_for_unrec = safeUCGetLYhndl_byMIME(value);
return 0;
}
static int character_set_fun ARGS1(
- char *, value)
+ char *, value)
{
int i = UCGetLYhndl_byAnyName(value); /* by MIME or full name */
if (i < 0)
@@ -532,7 +536,7 @@ static int character_set_fun ARGS1(
}
static int outgoing_mail_charset_fun ARGS1(
- char *, value)
+ char *, value)
{
outgoing_mail_charset = UCGetLYhndl_byMIME(value);
/* -1 if NULL or not recognized value: no translation (compatibility) */
@@ -543,7 +547,7 @@ static int outgoing_mail_charset_fun ARGS1(
#ifdef USE_COLOR_TABLE
static int color_fun ARGS1(
- char *, value)
+ char *, value)
{
parse_color (value);
return 0;
@@ -551,7 +555,7 @@ static int color_fun ARGS1(
#endif
static int default_bookmark_file_fun ARGS1(
- char *, value)
+ char *, value)
{
StrAllocCopy(bookmark_page, value);
StrAllocCopy(BookmarkPage, bookmark_page);
@@ -561,7 +565,7 @@ static int default_bookmark_file_fun ARGS1(
}
static int default_cache_size_fun ARGS1(
- char *, value)
+ char *, value)
{
HTCacheSize = atoi(value);
if (HTCacheSize < 2) HTCacheSize = 2;
@@ -569,14 +573,14 @@ static int default_cache_size_fun ARGS1(
}
static int default_editor_fun ARGS1(
- char *, value)
+ char *, value)
{
if (!system_editor) StrAllocCopy(editor, value);
return 0;
}
static int numbers_as_arrows_fun ARGS1(
- char *, value)
+ char *, value)
{
if (is_true(value))
keypad_mode = NUMBERS_AS_ARROWS;
@@ -587,7 +591,7 @@ static int numbers_as_arrows_fun ARGS1(
}
static int default_user_mode_fun ARGS1(
- char *, value)
+ char *, value)
{
if (!strncasecomp(value, "NOVICE", 6))
user_mode = NOVICE_MODE;
@@ -601,7 +605,7 @@ static int default_user_mode_fun ARGS1(
#ifdef DIRED_SUPPORT
static int dired_menu_fun ARGS1(
- char *, value)
+ char *, value)
{
add_menu_item(value);
return 0;
@@ -609,7 +613,7 @@ static int dired_menu_fun ARGS1(
#endif
static int jumpfile_fun ARGS1(
- char *, value)
+ char *, value)
{
char buffer [MAX_LINE_BUFFER_LEN];
@@ -622,7 +626,7 @@ static int jumpfile_fun ARGS1(
#ifdef EXP_KEYBOARD_LAYOUT
static int keyboard_layout_fun ARGS1(
- char *, key)
+ char *, key)
{
if (!LYSetKbLayout(key))
CTRACE(tfp, "Failed to set keyboard layout %s\n", key);
@@ -631,7 +635,7 @@ static int keyboard_layout_fun ARGS1(
#endif /* EXP_KEYBOARD_LAYOUT */
static int keymap_fun ARGS1(
- char *, key)
+ char *, key)
{
char *func;
@@ -650,7 +654,7 @@ static int keymap_fun ARGS1(
}
static int localhost_alias_fun ARGS1(
- char *, value)
+ char *, value)
{
LYAddLocalhostAlias(value);
return 0;
@@ -658,7 +662,7 @@ static int localhost_alias_fun ARGS1(
#ifdef LYNXCGI_LINKS
static int lynxcgi_environment_fun ARGS1(
- char *, value)
+ char *, value)
{
add_lynxcgi_environment(value);
return 0;
@@ -666,7 +670,7 @@ static int lynxcgi_environment_fun ARGS1(
#endif
static int lynx_sig_file_fun ARGS1(
- char *, value)
+ char *, value)
{
char temp[LY_MAXPATH];
LYstrncpy(temp, value, sizeof(temp)-1);
@@ -683,7 +687,7 @@ static int lynx_sig_file_fun ARGS1(
#ifndef DISABLE_NEWS
static int news_chunk_size_fun ARGS1(
- char *, value)
+ char *, value)
{
HTNewsChunkSize = atoi(value);
/*
@@ -696,7 +700,7 @@ static int news_chunk_size_fun ARGS1(
}
static int news_max_chunk_fun ARGS1(
- char *, value)
+ char *, value)
{
HTNewsMaxChunk = atoi(value);
/*
@@ -709,7 +713,7 @@ static int news_max_chunk_fun ARGS1(
}
static int news_posting_fun ARGS1(
- char *, value)
+ char *, value)
{
LYNewsPosting = is_true(value);
no_newspost = (LYNewsPosting == FALSE);
@@ -719,7 +723,7 @@ static int news_posting_fun ARGS1(
#ifndef NO_RULES
static int cern_rulesfile_fun ARGS1(
- char *, value)
+ char *, value)
{
char *rulesfile1 = NULL;
char *rulesfile2 = NULL;
@@ -753,14 +757,14 @@ static int cern_rulesfile_fun ARGS1(
#endif /* NO_RULES */
static int printer_fun ARGS1(
- char *, value)
+ char *, value)
{
add_printer_to_list(value, &printers);
return 0;
}
static int suffix_fun ARGS1(
- char *, value)
+ char *, value)
{
char *mime_type;
@@ -786,7 +790,7 @@ static int suffix_fun ARGS1(
}
static int system_editor_fun ARGS1(
- char *, value)
+ char *, value)
{
StrAllocCopy(editor, value);
system_editor = TRUE;
@@ -794,7 +798,7 @@ static int system_editor_fun ARGS1(
}
static int viewer_fun ARGS1(
- char *, value)
+ char *, value)
{
char *mime_type;
char *viewer;
@@ -1235,8 +1239,11 @@ PUBLIC void read_cfg ARGS4(
/* include another file */
#ifndef NO_CONFIG_INFO
if (fp0 != 0) {
- fprintf(fp0, "%s:%s\n\n", name, value);
+ char *url = 0;
+ LYLocalFileToURL(&url, value);
+ fprintf(fp0, "%s:<a href=\"%s\">%s</a>\n\n", name, url, value);
fprintf(fp0, " #&lt;begin %s&gt;\n", value);
+ FREE(url);
}
#endif
read_cfg (value, cfg_filename, nesting_level + 1, fp0);
@@ -1370,20 +1377,36 @@ PUBLIC char *lynx_cfg_infopage NOARGS
fprintf(fp0, "<pre>\n");
#ifndef NO_CONFIG_INFO
- fprintf(fp0, "<em>%s\n", gettext("This is read from your lynx.cfg file,"));
#if defined(HAVE_CONFIG_H) || defined(VMS)
- StrAllocCopy(temp, LYNX_CFG_FILE);
-#else
- StrAllocCopy(temp, helpfilepath); /* no absolute path... */
- StrAllocCat(temp, LYNXCFG_HELP); /* for lynx.cfg on DOS/Win32 */
+ if (strcmp(lynx_cfg_file, LYNX_CFG_FILE)) {
+ StrAllocCopy(temp, LYNX_CFG_FILE);
+ fprintf(fp0, "<em>%s\n%s",
+ gettext("This is read from your lynx.cfg file,"),
+ gettext("please \"read\" distribution's"));
+ fprintf(fp0, " <a href=\"%s\">lynx.cfg</a> ",
+ temp);
+ FREE(temp);
+ fprintf(fp0, "%s</em>\n\n",
+ gettext("for more comments."));
+ } else
#endif /* HAVE_CONFIG_H */
- fprintf(fp0, "%s <a href=\"%s\">lynx.cfg",
- gettext("please \"read\" distribution's"),
- temp);
- fprintf(fp0, "</a> %s</em>\n\n", gettext("for more comments."));
+ {
+ /* no absolute path... for lynx.cfg on DOS/Win32 */
+ fprintf(fp0, "<em>%s\n%s",
+ gettext("This is read from your lynx.cfg file,"),
+ gettext("please \"read\" distribution's"));
+ fprintf(fp0, " </em>lynx.cfg<em> ");
+ fprintf(fp0, "%s</em>\n\n",
+ gettext("for more comments."));
+ }
+
+ LYLocalFileToURL(&temp, lynx_cfg_file);
+ fprintf(fp0, " #<em>%s <a href=\"%s\">%s</a></em>\n",
+ gettext("Your primary configuration"),
+ temp,
+ lynx_cfg_file);
+ FREE(temp);
- fprintf(fp0, " #<em>%s %s</em>\n", gettext("Your primary configuration"),
- lynx_cfg_file);
#else
fprintf(fp0, "<em>%s</em>\n\n", gettext("This is read from your lynx.cfg file:"));
#endif /* NO_CONFIG_INFO */
@@ -1393,7 +1416,6 @@ PUBLIC char *lynx_cfg_infopage NOARGS
*/
read_cfg(lynx_cfg_file, "main program", 1, fp0);
- FREE(temp);
fprintf(fp0, "</pre>\n");
EndInternalPage(fp0);
LYCloseTempFP(fp0);
diff --git a/src/LYReadCFG.h b/src/LYReadCFG.h
index acbbd276..2526ab17 100644
--- a/src/LYReadCFG.h
+++ b/src/LYReadCFG.h
@@ -48,5 +48,6 @@ extern void free_lynx_cfg NOPARAMS;
extern BOOLEAN have_read_cfg;
extern char *lynx_cfg_infopage NOPARAMS;
+extern char *lynx_compile_opts NOPARAMS;
#endif /* LYREADCFG_H */
diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c
index 25725d05..6f068304 100644
--- a/src/LYShowInfo.c
+++ b/src/LYShowInfo.c
@@ -32,7 +32,7 @@
/*
* Compile-time definitions info, returns local url
*/
-PRIVATE char *lynx_compile_opts NOARGS
+PUBLIC char *lynx_compile_opts NOARGS
{
char tempfile[LY_MAXPATH];
#include <cfg_defs.h>
@@ -50,10 +50,9 @@ PRIVATE char *lynx_compile_opts NOARGS
BeginInternalPage (fp0, CONFIG_DEF_TITLE, NULL);
fprintf(fp0, "<pre>\n");
- fprintf(fp0, "%s %s<a href=\"%s\"> lynx.cfg</a> %s\n\n",
+ fprintf(fp0, "%s %s<a href=\"LYNXCFG:\"> lynx.cfg</a> %s\n\n",
SEE_ALSO,
YOUR_SEGMENT,
- lynx_cfg_infopage(),
RUNTIME_OPT_SEGMENT);
fprintf(fp0, "\n%s<br>\n<em>config.cache</em>\n", AUTOCONF_CONFIG_CACHE);
@@ -137,12 +136,10 @@ PUBLIC int showinfo ARGS4(
if (!LYRestricted) {
#ifdef HAVE_CFG_DEFS_H
- fprintf(fp0, " - <a href=\"%s\">%s</a>\n",
- lynx_compile_opts(),
- COMPILE_OPT_SEGMENT);
+ fprintf(fp0, " - <a href=\"LYNXCOMPILEOPTS:\">%s</a>\n",
+ COMPILE_OPT_SEGMENT);
#else
- fprintf(fp0, " - <a href=\"%s\">%s lynx.cfg</a>\n",
- lynx_cfg_infopage(),
+ fprintf(fp0, " - <a href=\"LYNXCFG:\">%s lynx.cfg</a>\n",
YOUR_SEGMENT);
#endif
}
diff --git a/src/LYStyle.c b/src/LYStyle.c
index ecc1d027..7de53c65 100644
--- a/src/LYStyle.c
+++ b/src/LYStyle.c
@@ -1,6 +1,6 @@
/* character level styles for Lynx
* (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-)
- * @Id: LYStyle.c 1.22 Wed, 17 Mar 1999 20:17:11 -0700 dickey @
+ * @Id: LYStyle.c 1.23 Tue, 30 Mar 1999 10:10:37 -0700 dickey @
*/
#include <HTUtils.h>
#include <HTML.h>
@@ -275,11 +275,13 @@ where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n\n"), buffer);
}
}
+#ifdef LY_FIND_LEAKS
PRIVATE void free_colorstylestuff NOARGS
{
style_initialiseHashTable();
style_deleteStyleList();
}
+#endif
/*
* initialise the default style sheet
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 226f7793..319a4192 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -15,15 +15,12 @@
#include <LYCharSets.h>
#include <LYCharUtils.h>
#include <LYMainLoop.h>
+#include <LYKeymap.h>
#ifdef DJGPP_KEYHANDLER
#include <bios.h>
#endif /* DJGPP_KEYHANDLER */
-#ifdef DISP_PARTIAL
-#include <LYKeymap.h>
-#endif /* DISP_PARTIAL */
-
#ifdef VMS
#include <descrip.h>
#include <libclidef.h>
@@ -91,11 +88,7 @@ extern int BSDselect PARAMS((int nfds, fd_set * readfds, fd_set * writefds,
#endif /* __FreeBSD__ || __bsdi__ */
#endif /* !UTMP_FILE */
-#ifdef VMS
-#define COPY_COMMAND "copy/nolog/noconf %s %s"
-#else
#define COPY_COMMAND "%s %s %s"
-#endif /* VMS */
extern HTkcode kanji_code;
extern BOOLEAN LYHaveCJKCharacterSet;
@@ -111,7 +104,7 @@ PUBLIC HTList * sug_filenames = NULL; /* Suggested filenames */
PUBLIC void highlight ARGS3(
int, flag,
int, cur,
- char *, target)
+ char *, target)
{
char buffer[200];
int i;
@@ -125,7 +118,10 @@ PUBLIC void highlight ARGS3(
BOOL TargetEmphasisON = FALSE;
#endif
BOOL utf_flag = (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8);
-
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ BOOL hl2_drawn=FALSE; /* whether links[cur].hightext2 is already drawn
+ properly */
+#endif
tmp[0] = tmp[1] = tmp[2] = '\0';
/*
@@ -138,6 +134,11 @@ PUBLIC void highlight ARGS3(
cur = 0;
if (nlinks > 0) {
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ if (flag == ON || links[cur].type == WWW_FORM_LINK_TYPE)
+#endif
+ {
+
#ifdef USE_COLOR_STYLE
#define LXP (links[cur].lx)
#define LYP (links[cur].ly)
@@ -179,6 +180,8 @@ PUBLIC void highlight ARGS3(
LynxChangeStyle(s, STACK_ON, 0);
}
#endif
+ }
+
if (links[cur].type == WWW_FORM_LINK_TYPE) {
int len;
@@ -196,6 +199,13 @@ PUBLIC void highlight ARGS3(
addch('_');
} else {
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ if (flag == OFF) {
+ hl2_drawn = TRUE;
+ redraw_lines_of_link(cur);
+ } else
+#endif
+ {
/*
* Copy into the buffer only what will fit
* within the width of the screen.
@@ -207,12 +217,17 @@ PUBLIC void highlight ARGS3(
((LYcols - 1) - links[cur].lx),
utf_flag);
addstr(buffer);
+ }
}
/*
* Display a second line as well.
*/
- if (links[cur].hightext2 && links[cur].ly < display_lines) {
+ if ( links[cur].hightext2 && links[cur].ly < display_lines
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ && hl2_drawn == FALSE
+#endif
+ ) {
lynx_stop_link_color (flag == ON, links[cur].inUnderline);
move((links[cur].ly + 1), links[cur].hightext2_offset);
#ifndef USE_COLOR_STYLE
@@ -237,6 +252,9 @@ PUBLIC void highlight ARGS3(
}
}
}
+#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX)
+ if ( hl2_drawn == FALSE )
+#endif
lynx_stop_link_color (flag == ON, links[cur].inUnderline);
#if defined(FANCY_CURSES) || defined(USE_SLANG)
@@ -1754,7 +1772,7 @@ PUBLIC void free_and_clear ARGS1(
* or tabs to one space. - FM
*/
PUBLIC void convert_to_spaces ARGS2(
- char *, string,
+ char *, string,
BOOL, condense)
{
char *s = string;
@@ -1796,7 +1814,7 @@ PUBLIC void convert_to_spaces ARGS2(
* Strip trailing slashes from directory paths.
*/
PUBLIC char * strip_trailing_slash ARGS1(
- char *, dirname)
+ char *, dirname)
{
int i;
@@ -1966,7 +1984,7 @@ PUBLIC void statusline ARGS1(
}
PRIVATE char *novice_lines ARGS1(
- int, lineno)
+ int, lineno)
{
switch (lineno) {
case 0:
@@ -2223,38 +2241,38 @@ PUBLIC int HTCheckForInterrupt NOARGS
default :
#ifdef DISP_PARTIAL
- if (display_partial && (NumOfLines_partial > 2))
- /* OK, we got several lines from new document and want to scroll... */
- {
+ if (display_partial && (NumOfLines_partial > 2))
+ /* OK, we got several lines from new document and want to scroll... */
+ {
int res;
switch (keymap[c+1])
{
case LYK_FASTBACKW_LINK :
- if (Newline_partial <= (display_lines)+1) {
+ if (Newline_partial <= (display_lines)+1) {
Newline_partial -= display_lines ;
- } else if ((res =
+ } else if ((res =
HTGetLinkOrFieldStart(-1,
- &Newline_partial, NULL,
- -1, TRUE)) == LINK_LINE_FOUND) {
+ &Newline_partial, NULL,
+ -1, TRUE)) == LINK_LINE_FOUND) {
Newline_partial++;
- } else if (res == LINK_DO_ARROWUP) {
+ } else if (res == LINK_DO_ARROWUP) {
Newline_partial -= display_lines ;
- }
- break;
+ }
+ break;
case LYK_FASTFORW_LINK :
- if (HText_canScrollDown()) {
+ if (HText_canScrollDown()) {
/* This is not an exact science... - kw */
if ((res =
- HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
- Newline_partial,
- display_lines)
+ HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
+ Newline_partial,
+ display_lines)
- 1,
&Newline_partial, NULL,
1, TRUE)) == LINK_LINE_FOUND) {
- Newline_partial++;
+ Newline_partial++;
}
- }
- break;
+ }
+ break;
case LYK_PREV_PAGE :
if (Newline_partial > 1)
Newline_partial -= display_lines ;
@@ -2291,7 +2309,7 @@ PUBLIC int HTCheckForInterrupt NOARGS
case LYK_REFRESH :
break ;
default :
- /** Other or no keystrokes **/
+ /** Other or no keystrokes **/
return ((int)FALSE) ;
} /* end switch */
if (Newline_partial < 1)
@@ -2310,7 +2328,7 @@ PUBLIC int HTCheckForInterrupt NOARGS
* Return YES only if we're certain it's a local file. - FM
*/
PUBLIC BOOLEAN LYisLocalFile ARGS1(
- char *, filename)
+ char *, filename)
{
char *host = NULL;
char *acc_method = NULL;
@@ -2353,7 +2371,7 @@ PUBLIC BOOLEAN LYisLocalFile ARGS1(
* Return YES only if we're certain it's the local host. - FM
*/
PUBLIC BOOLEAN LYisLocalHost ARGS1(
- char *, filename)
+ char *, filename)
{
char *host = NULL;
char *cp;
@@ -2411,7 +2429,7 @@ PUBLIC void LYLocalhostAliases_free NOARGS
* Utility for listing hosts to be treated as local aliases. - FM
*/
PUBLIC void LYAddLocalhostAlias ARGS1(
- char *, alias)
+ char *, alias)
{
char *LocalAlias;
@@ -2436,7 +2454,7 @@ PUBLIC void LYAddLocalhostAlias ARGS1(
* Return YES only if we've listed the host as a local alias. - FM
*/
PUBLIC BOOLEAN LYisLocalAlias ARGS1(
- char *, filename)
+ char *, filename)
{
char *host = NULL;
char *alias;
@@ -2483,7 +2501,7 @@ PUBLIC BOOLEAN LYisLocalAlias ARGS1(
** 0 (not a URL). - FM
*/
PUBLIC int LYCheckForProxyURL ARGS1(
- char *, filename)
+ char *, filename)
{
char *cp = filename;
char *cp1;
@@ -2537,9 +2555,9 @@ PUBLIC int LYCheckForProxyURL ARGS1(
* matches (and return true in that case).
*/
static BOOLEAN compare_type ARGS3(
- char *, tst,
- CONST char *, cmp,
- size_t, len)
+ char *, tst,
+ CONST char *, cmp,
+ size_t, len)
{
if (!strncasecomp(tst, cmp, len)) {
if (strncmp(tst, cmp, len)) {
@@ -2565,7 +2583,7 @@ static BOOLEAN compare_type ARGS3(
** is present but the type is not recognized.
*/
PUBLIC int is_url ARGS1(
- char *, filename)
+ char *, filename)
{
char *cp = filename;
char *cp1;
@@ -2679,6 +2697,18 @@ PUBLIC int is_url ARGS1(
*/
return(LYNXOPTIONS_URL_TYPE);
+ } else if (compare_type(cp, "LYNXCFG:", 8)) {
+ /*
+ * Special Internal Lynx type.
+ */
+ return(LYNXCFG_URL_TYPE);
+
+ } else if (compare_type(cp, "LYNXCOMPILEOPTS:", 16)) {
+ /*
+ * Special Internal Lynx type.
+ */
+ return(LYNXCOMPILE_OPTS_URL_TYPE);
+
} else if (compare_type(cp, "LYNXDOWNLOAD:", 13)) {
/*
* Special Internal Lynx type.
@@ -2829,7 +2859,7 @@ PUBLIC BOOLEAN LYCanDoHEAD ARGS1(
* Remove backslashes from any string.
*/
PUBLIC void remove_backslashes ARGS1(
- char *, buf)
+ char *, buf)
{
char *cp;
@@ -3019,7 +3049,7 @@ PUBLIC void HTSugFilenames_free NOARGS
* repeated filenames the most current in the list. - FM
*/
PUBLIC void HTAddSugFilename ARGS1(
- char *, fname)
+ char *, fname)
{
char *new;
char *old;
@@ -3057,7 +3087,7 @@ PUBLIC void HTAddSugFilename ARGS1(
* Upgraded for use with Lynx2.2 - FM 17-Jan-1994
*/
PUBLIC void change_sug_filename ARGS1(
- char *, fname)
+ char *, fname)
{
char *temp, *cp, *cp1, *end;
#ifdef VMS
@@ -3340,8 +3370,8 @@ PUBLIC void change_sug_filename ARGS1(
* Construct a temporary-filename. Assumes result is LY_MAXPATH chars long.
*/
PRIVATE int fmt_tempname ARGS3(
- char *, result,
- CONST char *, prefix,
+ char *, result,
+ CONST char *, prefix,
CONST char *, suffix)
{
static unsigned counter;
@@ -3521,7 +3551,7 @@ PRIVATE BOOLEAN *restrict_flag[] = {
(BOOLEAN *) 0 };
PUBLIC void parse_restrictions ARGS1(
- CONST char *, s)
+ CONST char *, s)
{
CONST char *p;
CONST char *word;
@@ -3752,7 +3782,7 @@ PUBLIC void LYCheckMail NOARGS
*/
PUBLIC void LYEnsureAbsoluteURL ARGS2(
char **, href,
- CONST char *, name)
+ CONST char *, name)
{
char *temp = NULL;
@@ -4062,7 +4092,7 @@ have_VMS_URL:
if ((fragment = strchr(cp, '#')) != NULL)
*fragment = '\0'; /* keep as pointer into cp string */
HTUnEscape(cp); /* unescape given path without fragment */
- StrAllocCat(temp2, cp); /* append to current dir */
+ StrAllocCat(temp2, cp); /* append to current dir */
StrAllocCopy(cp2, temp2); /* keep a copy in cp2 */
LYTrimRelFromAbsPath(temp2);
@@ -4249,8 +4279,8 @@ have_VMS_URL:
*/
PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
char **, AllocatedString,
- char *, prefix_list,
- char *, suffix_list)
+ char *, prefix_list,
+ char *, suffix_list)
{
char DomainPrefix[80], *StartP, *EndP;
char DomainSuffix[80], *StartS, *EndS;
@@ -4404,7 +4434,7 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
}
EndP = StartP;
while (*EndP && !WHITE(*EndP) && *EndP != ',') {
- EndP++; /* Find separator */
+ EndP++; /* Find separator */
}
LYstrncpy(DomainPrefix, StartP, (EndP - StartP));
@@ -4563,7 +4593,7 @@ PUBLIC BOOLEAN LYExpandHostForURL ARGS3(
*/
PUBLIC BOOLEAN LYAddSchemeForURL ARGS2(
char **, AllocatedString,
- char *, default_scheme)
+ char *, default_scheme)
{
char *Str = NULL;
BOOLEAN GotScheme = FALSE;
@@ -4666,7 +4696,7 @@ PUBLIC BOOLEAN LYAddSchemeForURL ARGS2(
* links when a terminal slash is present. - FM
*/
PUBLIC void LYTrimRelFromAbsPath ARGS1(
- char *, path)
+ char *, path)
{
char *cp;
int i;
@@ -4742,7 +4772,7 @@ PUBLIC void LYTrimRelFromAbsPath ARGS1(
* kind of thing seriously, someday. - FM
*/
PUBLIC void LYDoCSI ARGS3(
- char *, url,
+ char *, url,
CONST char *, comment,
char **, csi)
{
@@ -4770,8 +4800,8 @@ PUBLIC void LYDoCSI ARGS3(
* Define VMS logicals in the process table.
*/
PUBLIC void Define_VMSLogical ARGS2(
- char *, LogicalName,
- char *, LogicalValue)
+ char *, LogicalName,
+ char *, LogicalValue)
{
$DESCRIPTOR(lname, "");
$DESCRIPTOR(lvalue, "");
@@ -4795,10 +4825,12 @@ PUBLIC void Define_VMSLogical ARGS2(
}
#endif /* VMS */
+#ifdef LY_FIND_LEAKS
PRIVATE void LYHomeDir_free NOARGS
{
FREE(HomeDir);
}
+#endif /* LY_FIND_LEAKS */
PUBLIC CONST char * Home_Dir NOARGS
{
@@ -4906,8 +4938,8 @@ PUBLIC char *LYPathLeaf ARGS1(char *, pathname)
* with "./", that is prefixed to make the situation clear. - FM
*/
PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
- char *, fbuffer,
- size_t, fbuffer_size)
+ char *, fbuffer,
+ size_t, fbuffer_size)
{
char *file = NULL;
char *cp, *cp1;
@@ -5082,9 +5114,9 @@ PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
* and filename are converted to VMS syntax. - FM
*/
PUBLIC void LYAddPathToHome ARGS3(
- char *, fbuffer,
- size_t, fbuffer_size,
- char *, fname)
+ char *, fbuffer,
+ size_t, fbuffer_size,
+ char *, fname)
{
char *home = NULL;
char *file = fname;
@@ -5193,7 +5225,7 @@ PUBLIC void LYAddPathToHome ARGS3(
* when parsing the expected patterns, we still return 0. - FM
*/
PUBLIC time_t LYmktime ARGS2(
- char *, string,
+ char *, string,
BOOL, absolute)
{
char *s;
@@ -5723,8 +5755,8 @@ PUBLIC void LYRelaxFilePermissions ARGS1(CONST char *, name)
* Check if the given anchor has an associated file-cache.
*/
PUBLIC BOOLEAN LYCachedTemp ARGS2(
- char *, result,
- char **, cached)
+ char *, result,
+ char **, cached)
{
FILE *fp;
@@ -5759,7 +5791,7 @@ static LY_TEMP *ly_temp;
* The mode can be one of: "w", "a", "wb".
*/
PUBLIC FILE *LYOpenTemp ARGS3(
- char *, result,
+ char *, result,
CONST char *, suffix,
CONST char *, mode)
{
@@ -5770,7 +5802,7 @@ PUBLIC FILE *LYOpenTemp ARGS3(
CTRACE(tfp, "LYOpenTemp(,%s,%s)\n", suffix, mode);
if (result == 0)
- return 0;
+ return 0;
while (*mode != '\0') {
switch (*mode++) {
@@ -5829,7 +5861,7 @@ PUBLIC FILE *LYOpenTemp ARGS3(
* Reopen a temporary file
*/
PUBLIC FILE *LYReopenTemp ARGS1(
- char *, name)
+ char *, name)
{
LY_TEMP *p;
FILE *fp = 0;
@@ -5849,7 +5881,7 @@ PUBLIC FILE *LYReopenTemp ARGS1(
* renaming.
*/
PUBLIC FILE *LYOpenScratch ARGS2(
- char *, result,
+ char *, result,
CONST char *, prefix)
{
FILE *fp;
@@ -5983,7 +6015,7 @@ PUBLIC char * wwwName ARGS1(
* allow pipes if the user can spawn shell commands.
*/
PUBLIC BOOLEAN LYValidateFilename ARGS2(
- char *, result,
+ char *, result,
char *, given)
{
char *cp;
@@ -6068,7 +6100,7 @@ PUBLIC BOOLEAN LYValidateFilename ARGS2(
* 3 (cancel)
*/
PUBLIC int LYValidateOutput ARGS1(
- char *, filename)
+ char *, filename)
{
FILE *fp;
int c;
@@ -6094,25 +6126,14 @@ PUBLIC int LYValidateOutput ARGS1(
if ((fp = fopen(filename, "r")) != NULL) {
fclose(fp);
#ifdef VMS
- _statusline(FILE_EXISTS_HPROMPT);
+ c = HTConfirm(FILE_EXISTS_HPROMPT);
#else
- _statusline(FILE_EXISTS_OPROMPT);
+ c = HTConfirm(FILE_EXISTS_OPROMPT);
#endif /* VMS */
- c = 0;
- while (TOUPPER(c)!='Y' && TOUPPER(c)!='N' &&
- TOUPPER(c)!='A' && c != 7 && c != 3)
- c = LYgetch();
-#ifdef VMS
- if (HadVMSInterrupt) {
- HadVMSInterrupt = FALSE;
- c = 3;
- }
-#endif /* VMS */
- if (c == 7 || c == 3) { /* Control-G or Control-C */
+ if (HTLastConfirmCancelled()) {
HTInfoMsg(SAVE_REQUEST_CANCELLED);
return 3;
- }
- if (TOUPPER(c) == 'N') {
+ } else if (c == NO) {
return 'N';
}
}
@@ -6432,7 +6453,7 @@ PUBLIC char *LYgetXDisplay NOARGS
{
char *cp;
if ((cp = getenv(DISPLAY)) == NULL || *cp == '\0')
- cp = 0;
+ cp = 0;
return cp;
}
diff --git a/src/LYUtils.h b/src/LYUtils.h
index 87b8006f..c5057307 100644
--- a/src/LYUtils.h
+++ b/src/LYUtils.h
@@ -184,10 +184,12 @@ extern BOOLEAN mustshow;
#define LYNXCOOKIE_URL_TYPE 34
#define LYNXDIRED_URL_TYPE 35
#define LYNXOPTIONS_URL_TYPE 36
+#define LYNXCFG_URL_TYPE 37
+#define LYNXCOMPILE_OPTS_URL_TYPE 38
-#define PROXY_URL_TYPE 37
+#define PROXY_URL_TYPE 39
-#define UNKNOWN_URL_TYPE 38
+#define UNKNOWN_URL_TYPE 40
/*
* For change_sug_filename().
diff --git a/src/LYexit.c b/src/LYexit.c
index 4bcda3c5..67549ae4 100644
--- a/src/LYexit.c
+++ b/src/LYexit.c
@@ -15,20 +15,72 @@
#endif /* !VMS */
/*
+ * Flag for outofmem macro. - FM
+ */
+PUBLIC BOOL LYOutOfMemory = FALSE;
+
+#ifdef LY_FIND_LEAKS
+
+/*
* Stack of functions to call upon exit.
*/
PRIVATE void (*callstack[ATEXITSIZE]) NOPARAMS;
PRIVATE int topOfStack = 0;
/*
- * Flag for outofmem macro. - FM
+ * Purpose: Registers termination function.
+ * Arguments: function The function to register.
+ * Return Value: int 0 registered
+ * !0 no more space to register
+ * Remarks/Portability/Dependencies/Restrictions:
+ * Revision History:
+ * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe
*/
-PUBLIC BOOL LYOutOfMemory = FALSE;
+
+#ifdef __STDC__
+PUBLIC int LYatexit(void (*function)(void))
+#else /* Not ANSI, ugh! */
+PUBLIC int LYatexit(function)
+void (*function)();
+#endif /* __STDC__ */
+{
+ /*
+ * Check for available space.
+ */
+ if (topOfStack == ATEXITSIZE) {
+ CTRACE(tfp, "(LY)atexit: Too many functions, ignoring one!\n");
+ return(-1);
+ }
+
+ /*
+ * Register the function.
+ */
+ callstack[topOfStack] = function;
+ topOfStack++;
+ return(0);
+}
/*
- * Forward declarations.
+ * Purpose: Call the functions registered with LYatexit
+ * Arguments: void
+ * Return Value: void
+ * Remarks/Portability/Dependencies/Restrictions:
+ * Revision History:
+ * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe
*/
-PRIVATE void LYCompleteExit NOPARAMS;
+PRIVATE void LYCompleteExit NOPARAMS
+{
+ /*
+ * Just loop through registered functions.
+ * This is reentrant if more exits occur in the registered functions.
+ */
+ while (--topOfStack >= 0) {
+ callstack[topOfStack]();
+ }
+}
+#else
+#define LYCompleteExit() /*nothing*/
+#endif /* LY_FIND_LEAKS */
/*
* Purpose: Terminates program.
@@ -116,57 +168,6 @@ PUBLIC void LYexit ARGS1(
exit(status);
}
-/*
- * Purpose: Registers termination function.
- * Arguments: function The function to register.
- * Return Value: int 0 registered
- * !0 no more space to register
- * Remarks/Portability/Dependencies/Restrictions:
- * Revision History:
- * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe
- */
-#ifdef __STDC__
-PUBLIC int LYatexit(void (*function)(void))
-#else /* Not ANSI, ugh! */
-PUBLIC int LYatexit(function)
-void (*function)();
-#endif /* __STDC__ */
-{
- /*
- * Check for available space.
- */
- if (topOfStack == ATEXITSIZE) {
- CTRACE(tfp, "(LY)atexit: Too many functions, ignoring one!\n");
- return(-1);
- }
-
- /*
- * Register the function.
- */
- callstack[topOfStack] = function;
- topOfStack++;
- return(0);
-}
-
-/*
- * Purpose: Call the functions registered with LYatexit
- * Arguments: void
- * Return Value: void
- * Remarks/Portability/Dependencies/Restrictions:
- * Revision History:
- * 06-15-94 created Lynx 2-3-1 Garrett Arch Blythe
- */
-PRIVATE void LYCompleteExit NOPARAMS
-{
- /*
- * Just loop through registered functions.
- * This is reentrant if more exits occur in the registered functions.
- */
- while (--topOfStack >= 0) {
- callstack[topOfStack]();
- }
-}
-
PUBLIC void outofmem ARGS2(
CONST char *, fname,
CONST char *, func)
diff --git a/src/UCdomap.c b/src/UCdomap.c
index 91f473f9..e777dcca 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -311,7 +311,6 @@ PRIVATE int UC_MapGN PARAMS((
PRIVATE int UC_FindGN_byMIME PARAMS((
CONST char * UC_MIMEcharset));
PRIVATE void UCreset_allocated_LYCharSets NOPARAMS;
-PRIVATE void UCfree_allocated_LYCharSets NOPARAMS;
PRIVATE CONST char ** UC_setup_LYCharSets_repl PARAMS((
int UC_charset_in_hndl,
unsigned lowest8));
@@ -320,7 +319,10 @@ PRIVATE int UC_Register_with_LYCharSets PARAMS((
CONST char * UC_MIMEcharset,
CONST char * UC_LYNXcharset,
int lowest_eightbit));
+#ifdef LY_FIND_LEAKS
+PRIVATE void UCfree_allocated_LYCharSets NOPARAMS;
PRIVATE void UCcleanup_mem NOPARAMS;
+#endif
PRIVATE int default_UChndl = -1;
@@ -474,9 +476,9 @@ PRIVATE void UC_con_set_trans ARGS3(
int, Gn,
int, update_flag)
{
- int i, j;
- CONST u16 *p;
- u16 *ptrans;
+ int i, j;
+ CONST u16 *p;
+ u16 *ptrans;
if (!UC_valid_UC_charset(UC_charset_in_hndl)) {
CTRACE(tfp, "UC_con_set_trans: Invalid charset handle %d.\n",
@@ -486,15 +488,15 @@ PRIVATE void UC_con_set_trans ARGS3(
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 */
- }
+ if (p == UC_current_unitable) { /* test whether pointers are equal */
+ return; /* nothing to be done */
+ }
/*
* The font is always 256 characters - so far.
* (this function preserved by num_uni==0 so unicount=NULL for built-in
* charsets like CJK or x-transparent should not be a problem?)
*/
- con_clear_unimap();
+ con_clear_unimap();
#endif
for (i = 0; i < 256; i++) {
if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) {
@@ -1680,6 +1682,7 @@ PRIVATE void UCreset_allocated_LYCharSets NOARGS
}
}
+#ifdef LY_FIND_LEAKS
PRIVATE void UCfree_allocated_LYCharSets NOARGS
{
int i = 0;
@@ -1690,6 +1693,7 @@ PRIVATE void UCfree_allocated_LYCharSets NOARGS
}
}
}
+#endif
PRIVATE CONST char ** UC_setup_LYCharSets_repl ARGS2(
int, UC_charset_in_hndl,
@@ -2000,6 +2004,7 @@ PUBLIC void UC_Charset_Setup ARGS9(
return;
}
+#ifdef LY_FIND_LEAKS
PRIVATE void UCcleanup_mem NOARGS
{
int i;
@@ -2013,6 +2018,7 @@ PRIVATE void UCcleanup_mem NOARGS
FREE(inverse_translations[i]);
}
}
+#endif /* LY_FIND_LEAKS */
PUBLIC void UCInit NOARGS
{
diff --git a/src/UCdomap.h b/src/UCdomap.h
index 7f45ee6d..0b501f42 100644
--- a/src/UCdomap.h
+++ b/src/UCdomap.h
@@ -76,34 +76,34 @@ extern void UCInit NOARGS;
* from Unicode mechanism). For now we use the MIME name that describes
* what is output to the terminal. - KW
*/
-static CONST struct unimapdesc_str dfont_replacedesc_Asian = {0,NULL,0,1};
+static CONST struct unimapdesc_str dfont_replacedesc_fallback = {0,NULL,0,1};
#define UC_CHARSET_SETUP_euc_cn UC_Charset_Setup("euc-cn","Chinese",\
- NULL,NULL,0,dfont_replacedesc_Asian,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_euc_jp UC_Charset_Setup("euc-jp","Japanese (EUC-JP)",\
- NULL,NULL,0,dfont_replacedesc_Asian,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_shift_jis UC_Charset_Setup("shift_jis","Japanese (Shift_JIS)",\
- NULL,NULL,0,dfont_replacedesc_Asian,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_euc_kr UC_Charset_Setup("euc-kr","Korean",\
- NULL,NULL,0,dfont_replacedesc_Asian,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,UCT_ENC_CJK,0)
#define UC_CHARSET_SETUP_big5 UC_Charset_Setup("big5","Taipei (Big5)",\
- NULL,NULL,0,dfont_replacedesc_Asian,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,UCT_ENC_CJK,0)
/*
* Placeholder for non-translation mode. - FM
*/
-static CONST struct unimapdesc_str dfont_replacedesc_trans = {0,NULL,0,0};
-
#define UC_CHARSET_SETUP_x_transparent UC_Charset_Setup("x-transparent","Transparent",\
- NULL,NULL,0,dfont_replacedesc_trans,\
+ NULL,NULL,0,dfont_replacedesc_fallback,\
128,1,0)
+static CONST struct unimapdesc_str dfont_replacedesc_NO_fallback = {0,NULL,0,0};
+
#define UC_CHARSET_SETUP_utf_8 UC_Charset_Setup("utf-8","UNICODE (UTF-8)",\
- NULL,NULL,0,dfont_replacedesc_trans,\
+ NULL,NULL,0,dfont_replacedesc_NO_fallback,\
128,UCT_ENC_UTF8,0)
diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format
index 3d269c57..df7d335e 100644
--- a/src/chrtrans/README.format
+++ b/src/chrtrans/README.format
@@ -102,7 +102,8 @@ d) string replacement definitions:
in certain charset table will override ones from the Default table.
Note that everything after the ':' is currently taken VERBATIM, so
- careful with trailing blanks etc.
+ careful with trailing blanks etc. Please use <C replace> syntax below
+ when you need trailing spaces.
* Syntax accepted:
* <unicode> :<replace>
diff --git a/src/chrtrans/cp1252_uni.tbl b/src/chrtrans/cp1252_uni.tbl
index 73d91e57..7a9e149f 100644
--- a/src/chrtrans/cp1252_uni.tbl
+++ b/src/chrtrans/cp1252_uni.tbl
@@ -2,14 +2,14 @@
#There has to be exactly one table marked as "default".
D0
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Mwindows-1252
#Name as a Display Charset (used on Options screen)
OWestern (windows-1252)
-#Codepage number
-C1252
+#Codepage number
+C1252
#
# Name: cp1252 to Unicode table
diff --git a/src/chrtrans/cp1253_uni.tbl b/src/chrtrans/cp1253_uni.tbl
index 59cf46fe..6a08baef 100644
--- a/src/chrtrans/cp1253_uni.tbl
+++ b/src/chrtrans/cp1253_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Mwindows-1253
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/cp1257_uni.tbl b/src/chrtrans/cp1257_uni.tbl
index f5f9a926..49d3e307 100644
--- a/src/chrtrans/cp1257_uni.tbl
+++ b/src/chrtrans/cp1257_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Mwindows-1257
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/cp437_uni.tbl b/src/chrtrans/cp437_uni.tbl
index aa02cee3..818cbab3 100644
--- a/src/chrtrans/cp437_uni.tbl
+++ b/src/chrtrans/cp437_uni.tbl
@@ -2,7 +2,7 @@
#There has to be exactly one table marked as "default".
D0
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp437
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/cp737_uni.tbl b/src/chrtrans/cp737_uni.tbl
index 80e33531..6beee2c4 100644
--- a/src/chrtrans/cp737_uni.tbl
+++ b/src/chrtrans/cp737_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp737
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/cp775_uni.tbl b/src/chrtrans/cp775_uni.tbl
index 5b0e0149..26a29912 100644
--- a/src/chrtrans/cp775_uni.tbl
+++ b/src/chrtrans/cp775_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp775
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/cp866_uni.tbl b/src/chrtrans/cp866_uni.tbl
index 87ebbfcc..f88e17f8 100644
--- a/src/chrtrans/cp866_uni.tbl
+++ b/src/chrtrans/cp866_uni.tbl
@@ -1,10 +1,10 @@
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp866
#Name as a Display Charset (used on Options screen)
OCyrillic (cp866)
-
+
#Codepage number
C866
diff --git a/src/chrtrans/cp869_uni.tbl b/src/chrtrans/cp869_uni.tbl
index 2e75ae39..a706d2a8 100644
--- a/src/chrtrans/cp869_uni.tbl
+++ b/src/chrtrans/cp869_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Mcp869
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/def7_uni.tbl b/src/chrtrans/def7_uni.tbl
index 47f133ce..39dc165d 100644
--- a/src/chrtrans/def7_uni.tbl
+++ b/src/chrtrans/def7_uni.tbl
@@ -1,10 +1,19 @@
-# Default 7bit replacements. If the MIME name is set to us-ascii,
-# this will be identified with the "7 bit approximations (US-ASCII)" Display
-# character set.
+# Default 7bit replacements.
+#
+# This table is very important and should not be excluded from the distribution
+# since this is a default fallback for any 8bit user's "display character set"
+# which (nearly) of 256 chars and could not map a rich Unicode repertoire.
+#
+# Note: there are a few rare replacement strings with trailing spaces
+# which should be enclosed as C strings like "... " to make things obvious
+# (and doing that we should escape \ as \134 and escape " as \" or \042
+# but this is really rare).
+#
#The MIME name of this charset.
Mus-ascii
-
+
+# Like any other charset this may be selected as "display character set":
#Name as a Display Charset (used on Options screen)
O7 bit approximations (US-ASCII)
@@ -14,7 +23,7 @@ D1
# us-ascii characters should not normally pass here,
-# they are always processed directly but let declare it here:
+# they are always processed directly but let declare them here:
0x20-0x7e idem
@@ -421,11 +430,11 @@ U+03cc:o%
U+03cd:u%
U+03ce:w%
# Greek symbols
-U+03d0:beta
-U+03d1:theta
-U+03d2:upsi
-U+03d5:phi
-U+03d6:pi
+U+03d0 "beta "
+U+03d1 "theta "
+U+03d2 "upsi "
+U+03d5 "phi "
+U+03d6 "pi "
U+03da:T3
U+03db:t3
U+03dc:M3
@@ -434,8 +443,8 @@ U+03de:K3
U+03df:k3
U+03e0:P3
U+03e1:p3
-U+03f0:kappa
-U+03f1:rho
+U+03f0 "kappa "
+U+03f1 "rho "
U+03f4:'%
U+03f5:j3
# Cyrillic capital letters
@@ -1291,7 +1300,7 @@ U+200e:(->)
U+200f:(<-)
U+200a:
0x2d U+2010 U+2013 U+2015 # hyphen-like
-U+2014:--
+U+2014 "--"
U+2016:||
U+2017:=2
0x60 U+2018 # left single quotation mark <`>
@@ -1299,7 +1308,7 @@ U+2017:=2
0x22 U+201c-U+201f # various double quotation marks <">
U+2020:/-
U+2021:/=
-U+2022: o
+U+2022 " o "
U+2025:..
U+2026:...
@@ -1377,10 +1386,10 @@ U+2126:Ohm
0x4b U+212A # Kelvin sign - K
U+212b:Ang.
U+212E:est.
-U+2135:Aleph
-U+2136:Bet
-U+2137:Gimel
-U+2138:Dalet
+U+2135 "Aleph "
+U+2136 "Bet "
+U+2137 "Gimel "
+U+2138 "Dalet "
U+2153: 1/3
U+2154: 2/3
U+2155: 1/5
@@ -1463,7 +1472,7 @@ U+2214:.+
U+2217:*
U+2218:Ob
U+2219:sb
-U+221a: SQRT
+U+221a " SQRT "
U+221d:0(
U+221e:infty
U+221f:-L
@@ -1473,7 +1482,7 @@ U+2227:AND
U+2228:OR
U+2229:(U
U+222a:)U
-U+222b:\int
+U+222b "\134int "
U+222c:DI
U+222e:Io
U+2234:.:
@@ -1758,7 +1767,7 @@ U+266e:Mx
U+266f:#
0x58 U+2713 U+2717 # check marks -> x
U+2720:-X
-# CJK area:
+# CJK area:
0x20 U+3000 # ideographic space
U+3001:,_
U+3002:._
@@ -2029,7 +2038,7 @@ U+33d8:pm
# The Surrogates Area (U+D800 - U+DFFF)
# The Private Use Area (U+E000 - U+F8FF)
#
-#
+#
U+fb00:ff
U+fb01:fi
U+fb02:fl
diff --git a/src/chrtrans/iso01_uni.tbl b/src/chrtrans/iso01_uni.tbl
index a00be71d..2d138ec2 100644
--- a/src/chrtrans/iso01_uni.tbl
+++ b/src/chrtrans/iso01_uni.tbl
@@ -4,7 +4,7 @@
#but there has to be exactly one table marked as "default".
D0
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-1
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/iso03_uni.tbl b/src/chrtrans/iso03_uni.tbl
index de91afa3..565bbf46 100644
--- a/src/chrtrans/iso03_uni.tbl
+++ b/src/chrtrans/iso03_uni.tbl
@@ -1,9 +1,9 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-3
#Name as a Display Charset (used on Options screen)
OLatin 3 (ISO-8859-3)
-
+
#Codepage number
C913
diff --git a/src/chrtrans/iso04_uni.tbl b/src/chrtrans/iso04_uni.tbl
index 11383922..99bcaec7 100644
--- a/src/chrtrans/iso04_uni.tbl
+++ b/src/chrtrans/iso04_uni.tbl
@@ -1,9 +1,9 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-4
#Name as a Display Charset (used on Options screen)
OLatin 4 (ISO-8859-4)
-
+
#Codepage number
C914
diff --git a/src/chrtrans/iso05_uni.tbl b/src/chrtrans/iso05_uni.tbl
index a7ed8555..1436a687 100644
--- a/src/chrtrans/iso05_uni.tbl
+++ b/src/chrtrans/iso05_uni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-5
#Name as a Display Charset (used on Options screen)
diff --git a/src/chrtrans/iso07_uni.tbl b/src/chrtrans/iso07_uni.tbl
index f629e6bc..7e9063ec 100644
--- a/src/chrtrans/iso07_uni.tbl
+++ b/src/chrtrans/iso07_uni.tbl
@@ -1,9 +1,9 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-7
#Name as a Display Charset (used on Options screen)
OGreek (ISO-8859-7)
-
+
#Codepage number
C813
diff --git a/src/chrtrans/iso09_uni.tbl b/src/chrtrans/iso09_uni.tbl
index f0e1f608..0b93209c 100644
--- a/src/chrtrans/iso09_uni.tbl
+++ b/src/chrtrans/iso09_uni.tbl
@@ -1,9 +1,9 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
Miso-8859-9
#Name as a Display Charset (used on Options screen)
OTurkish (ISO-8859-9)
-
+
#Codepage number
C920
diff --git a/src/chrtrans/iso10_uni.tbl b/src/chrtrans/iso10_uni.tbl
index ab8128f0..28c3dd3b 100644
--- a/src/chrtrans/iso10_uni.tbl
+++ b/src/chrtrans/iso10_uni.tbl
@@ -5,13 +5,13 @@
#This is not default font!
D0
-#The MIME name of this charset.
+#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
#
diff --git a/src/chrtrans/koi8r_uni.tbl b/src/chrtrans/koi8r_uni.tbl
index dfb61be0..1378eed9 100644
--- a/src/chrtrans/koi8r_uni.tbl
+++ b/src/chrtrans/koi8r_uni.tbl
@@ -11,134 +11,134 @@ C878
# Based on a table received from "Glenn E. Thobe" <thobe@lafn.org>
# (verified against RFC1489).
#
-#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
+#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
+0xA3 U+0451 # SMA IO
0xA4 U+2553 # FORMS DOWN DOUBLE AND RIGHT SINGLE
-0xA5 U+2554 # FORMS DOUBLE DOWN AND RIGHT
+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
+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
+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
+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
+0xB1 U+2560 # FORMS DOUBLE VERTICAL AND RIGHT
0xB2 U+2561 # FORMS VERTICAL SINGLE AND LEFT DOUBLE
-0xB3 U+0401 # CAP IO
+0xB3 U+0401 # CAP IO
0xB4 U+2562 # FORMS VERTICAL DOUBLE AND LEFT SINGLE
-0xB5 U+2563 # FORMS DOUBLE VERTICAL AND LEFT
+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
+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
+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
+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/mnem2_suni.tbl b/src/chrtrans/mnem2_suni.tbl
index cdcd7628..ca7abc11 100644
--- a/src/chrtrans/mnem2_suni.tbl
+++ b/src/chrtrans/mnem2_suni.tbl
@@ -1,4 +1,4 @@
-#The MIME name of this charset.
+#The MIME name of this charset.
# (this file was renamed from mnemonic_suni.tbl)
M mnemonic
@@ -7,7 +7,7 @@ O RFC 1345 Mnemonic
# Don't fall back to default table for unicode -> 8bit
Fallback NO
-
+
# U+0020:&SP
U+0021:!
U+0022:"
diff --git a/src/chrtrans/mnem_suni.tbl b/src/chrtrans/mnem_suni.tbl
index ddf8600d..02bd8ea8 100644
--- a/src/chrtrans/mnem_suni.tbl
+++ b/src/chrtrans/mnem_suni.tbl
@@ -1,9 +1,9 @@
-#The MIME name of this charset.
+#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:"
diff --git a/src/chrtrans/next_uni.tbl b/src/chrtrans/next_uni.tbl
index d2bc974f..2aa665f8 100644
--- a/src/chrtrans/next_uni.tbl
+++ b/src/chrtrans/next_uni.tbl
@@ -75,7 +75,7 @@ ONeXT character set
0x9a U+00dc # LATIN CAPITAL LETTER U WITH DIAERESIS
0x9b U+00dd # LATIN CAPITAL LETTER Y WITH ACUTE
0x9c U+00de # LATIN CAPITAL LETTER THORN
-0x9d U+00b5 # MICRO SIGN
+0x9d U+00b5 # MICRO SIGN
0x9e U+00d7 # MULTIPLICATION SIGN
0x9f U+00f7 # DIVISION SIGN
0xa0 U+00a9 # COPYRIGHT SIGN
diff --git a/src/chrtrans/rfc_suni.tbl b/src/chrtrans/rfc_suni.tbl
index 8ad8d54d..65fa17ed 100644
--- a/src/chrtrans/rfc_suni.tbl
+++ b/src/chrtrans/rfc_suni.tbl
@@ -4,7 +4,7 @@
# '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.
+#The MIME name of this charset.
Mmnemonic+ascii+0
#Name as a Display Charset (used on Options screen)
@@ -12,7 +12,7 @@ ORFC 1345 w/o Intro
# Don't fall back to default table for unicode -> 8bit
Fallback NO
-
+
U+0020:SP
U+0021:!
U+0022:"
diff --git a/src/chrtrans/utf8_uni.tbl b/src/chrtrans/utf8_uni.tbl
index 9fc470ad..88ad4925 100644
--- a/src/chrtrans/utf8_uni.tbl
+++ b/src/chrtrans/utf8_uni.tbl
@@ -3,7 +3,7 @@
# tells Lynx that "utf-8" is Unicode/UCS2 encoded in UTF8. Note that
# "unicode-1-1-utf-8" and "utf8" are treated as synonyms.
#
-#The MIME name of this charset.
+#The MIME name of this charset.
Mutf-8
#Name as a Display Charset (used on Options screen)
@@ -24,12 +24,12 @@ OUNICODE (UTF-8)
# #define UCT_ENC_UTF8 7
R 7
-
+
#Shall this become the "default" translation?
#There has to be exactly one table marked as "default".
Default NO
# Don't fall back to default table for unicode -> 8bit
Fallback NO
-
+
0x20-0x7f idem
diff --git a/src/chrtrans/viscii_uni.tbl b/src/chrtrans/viscii_uni.tbl
index 5b055856..617f1e1f 100644
--- a/src/chrtrans/viscii_uni.tbl
+++ b/src/chrtrans/viscii_uni.tbl
@@ -41,7 +41,7 @@ R 3
0x0a U+000a
#0x0b U+000b
0x0c U+000c
-U+000c:
+U+000c " "
0x0d U+000d
#0x0e U+000e
#0x0f U+000f
diff --git a/src/descrip.mms b/src/descrip.mms
index 014a3a2b..667f67bb 100644
--- a/src/descrip.mms
+++ b/src/descrip.mms
@@ -133,9 +133,9 @@ CDEF = _DECC_V4_SOURCE,__SOCKET_TYPEDEFS,__VMS_CURSES
.ifdef DEC_C
COMPILER = DECC
.ifdef TCPWARE
-TCPFLAGS = /decc/Prefix=All/NoMember/Define=(DEBUG,ACCESS_AUTH,$(TCP),UCX,$(CDEF))
+TCPFLAGS = /decc/Prefix=All/NoMember/Define=(ACCESS_AUTH,$(TCP),UCX,$(CDEF))
.else
-TCPFLAGS = /decc/Prefix=All/NoMember/Define=(DEBUG,ACCESS_AUTH,$(TCP),$(CDEF))
+TCPFLAGS = /decc/Prefix=All/NoMember/Define=(ACCESS_AUTH,$(TCP),$(CDEF))
.endif
.else
.ifdef GNU_C
@@ -145,9 +145,9 @@ CC = gcc
COMPILER = VAXC
.endif
.ifdef TCPWARE
-TCPFLAGS = /Define = (DEBUG, ACCESS_AUTH, $(TCP), UCX)
+TCPFLAGS = /Define = (ACCESS_AUTH, $(TCP), UCX)
.else
-TCPFLAGS = /Define = (DEBUG, ACCESS_AUTH, $(TCP))
+TCPFLAGS = /Define = (ACCESS_AUTH, $(TCP))
.endif
.endif