diff options
59 files changed, 1710 insertions, 1267 deletions
diff --git a/CHANGES b/CHANGES index 52179561..98f0992f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,98 @@ Changes since Lynx 2.8.1 release ================================================================================ +1998-12-03 (2.8.2dev.8) +* use HTSprintf/HTSprintf0 in LYCookie.c, LYLocal.c - TD +* correct logic in OpenHiddenFile, which did not check if a failure to open a + file for append was due to the file's not existing and hence causing + IsOurFile to return failure. This caused the -traversal option to fail + (reported by Francis Irving <francis@ncgraphics.co.uk>, applies to + 2.8.1rel.2) - TD +* fixed line number removal code in HText_endAnchor in several places, it was + modifying the wrong line which could lead to memory corruption - KW +* tweaks in HText_startAnchor and HText_endAnchor for handling link numbers: + don't swallow space after number if line was split, find link number on + previous line even it it is at the very end, adjust line split position after + number removal. Generate TRACE output in interesting cases - KW +* Prevent havoc (access to already freed memory etc.) caused by multiple + recursive invocations of HTAnchor_delete on the same HTParentAnchor. This + does not seem to actually happen normally during a session, but can occur + when the HTAnchor structures are cleaned up while handling a terminating + signal or outofmem condition - KW +* Reset the HTAnchor "underway" flag during final cleanup, so structures are + not prevented from being freed. This also should only make a difference when + handling a terminating signal or outofmem condition - KW +* show sticky-bit in directory listings - LW +* correct options-message on Print page - IC +* update installation note about freewais library (reported by Chris Maden + <crism@oreilly.com>) - TD +* improvements to mouse code, ncurses-based, from Ilya Zakharevich + a) Mouse navigation inside text entry fields; + b) Mouse navigation to a text entry field (including an empty one) + c) Mouse navigation to a specific position of a text field (since I do not + know which fields are text fields, I implemented "b" and "c" for + F_TEXTAREA_TYPE and F_TEXT_TYPE only, search for these symbols in the + patch); + d) Mouse navigation in menus: To scroll, one can click on top/bottom border + (single=byline, double=bypage, triple=beg/end), or above/below menu + (single=bypage, double=beg/end)) mouse-3 ==> quit; + e) Double-click-1 on the first and last row are interpreted as goto- + start/end/main-window (depending on the location of the click). + Other Changes: + a) Ask ncurses for all mouse events, but increase mouseinterval() to simulate + current behavior (which is effectively an infinite mouseinterval() + + masking of repeated clicks); + b) Earlier clicking to the left of a link would activate the link. I see no + use for this, so consider this a bug. +* HText_trimHightext (GridText.c): don't apply final adjustment repeatedly to + an anchor that has already been handled by this function; the function may be + called repeatedly if partial display is enabled. Some other changes in this + function, to interact better with the other GridText.c functions, especially + for partial display mode. We don't have to handle all anchors if the new + parameter "final" is not set. + Also empty anchors should now generally not any more move down over empty + lines, if they happen at a line end. Made some trace messages give more + information - KW, LP +* color styles: reset screen style cache to avoid random coloring when a link + is unhighlighted - KW, LP +* Tweak in HText_setLastOptionValue: if an OPTION tag was directly followed by + several newlines, characters could be dropped - KW, LP +* modify havevisible() function in LYBookmark.c to compare against Unicode + value rather than ASCII. Optimize title_convert8bit() by moving character + translation out of loop - LP +* ifdef user/group function caching calls so that this builds with djgpp, which + doesn't need/support this (patch by Gisle Vanem) +* documentation updates for NLS - HN +* separate some html from gettext in LYCgi.c, LYHistory.c, LYLocal.c - JS +* avoid setting recent_sizechange during the very first start_curses call for + ncurses. This would result in an unnecessary refresh after loading the first + document - KW +* added logic to display_page to avoid repainting the full screen contents in a + specific situation: if it has been called before (for the same lines in the + same document) during partial display, and is now being called normally (not + during partial display). If this applies, the normal line content is not + redrawn, but the title line and form fields are still repainted, and updating + of the links structures is always done. There are additional checks for + recent_sizechange and a text->stale flag (which was already implemented but + unused) to do the full redraw if that may be needed. This should avoid + unnecessary screen 'blinking' with curses when partial display is used (which + didn't seem to happen with slang) - KW +* modify SGML.c to check for SGML_ELEMENT tag contents, fixing a case where an + entity that appears within a TABLE but outside of any table row TR will be + displayed by Lynx _without_ its entities being interpreted (analysis by Alan + J Flavell <flavell@a5.ph.gla.ac.uk>, applies to 2.8.1rel.2) - KW +* check that stdin is really a tty before trying to select from it in the + NSL-FORK logic in HTParseInet(), file HTTCP.c (reported by Kim DeVaughn, for + someone who was unable to run lynx -dump in a cron job, applies to + 2.8.1rel.2) - TD, BL +* updates for lynx_help_main.html (JS, IC). +* change fopen for write in LYCookie.c to LYNewTxtFile so that the resulting + file will be readable by only the owner (Bill Nottingham <wen2@po.cwru.edu> + suggested using umask, but that may not be portable enough) - TD +* use CONST in some places in UCdomap.c and makeuctb, to make more tables + sharable (suggested by LP) - TD +* fixes for SunOS K&R compiler with/without unproto wrapper, i.e., definition + of 'const' - TD 1998-11-23 (2.8.2dev.7) * convert KEY_ENTER to newline in LYgetch() to make Lynx work with IRIX's iris-ansi terminfo description, which equates the kent capability with @@ -98,7 +190,7 @@ Changes since Lynx 2.8.1 release using only va_alist in the parameter list - TD * correct html expression in LYShowInfo.c of dev.3 which did not allow the temp file with the lynx.cfg settings to be accessed from the Configuration - Definitions page (patch by Ismael Cordeiro). + Definitions page (patch by IC - Ismael Cordeiro). * correct "Exiting" message format in cleanup_sig(), which had unexpanded %d (reported by BJP) - TD * add to config.hin the definitions set by AM_GNU_GETTEXT macro (PG pointed diff --git a/INSTALLATION b/INSTALLATION index fe670d07..d9f02ba9 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -24,9 +24,9 @@ Step 1. (define compile-time variables -- See the userdefs.h file.) you may set them at run-time if you wish. If you compile using auto- configure, you would not absolutely need to edit "userdefs.h". Check LYMessages_en.h for tailoring the Lynx statusline prompts, messages and - warnings to the requirements of your site. The strings in LYMessages_en.h - may be translated into a language of your choice. If you rename the file, - be sure to change the definition in "userdefs.h". + warnings to the requirements of your site. Lynx implements Native + Language Support. Read "ABOUT-NLS" if you are interested in building an + international version of Lynx. Step 2. (define run-time variables -- See the lynx.cfg file for details.) Set up local printers, downloaders, assumed character set, key mapping, @@ -62,10 +62,10 @@ Step 4. (optional -- news for UNIX and VMS) Step 5. (optional -- UNIX only) To add direct WAIS support, get the freeWAIS distribution from - "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The compile - process will create the libraries you will need, wais.a and client.a. Edit - the Makefile in the top level directory and add the library locations under - the DIRECT WAIS ACCESS heading. Edit the Makefile for the WWW Library in + "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The + compile process will create the libraries you will need, wais.a and + client.a. Edit the generated makefile in the top level directory and + add the library locations under the DIRECT WAIS ACCESS heading. Edit "WWW/Library/Implementation/CommonMakefile" to point to the include directory for the freewais distribution. Precompiled libraries are available for many platforms if you don't wish to compile one yourself. @@ -137,6 +137,7 @@ II. Compile instructions -- UNIX OS/2 EMX 0.9b (ncurses) SCO (cc w/ curses) Solaris 2.5 & 2.6 (cc & gcc w/ curses, ncurses & slang) SunOS 4.1 (cc w/ curses, gcc w/ ncurses & slang) + OS390 and BS2000. NOTES: diff --git a/LYMessages_en.h b/LYMessages_en.h index dc9ebc60..60f06992 100644 --- a/LYMessages_en.h +++ b/LYMessages_en.h @@ -27,6 +27,8 @@ #define REALLY_EXIT_Y gettext("Really exit from Lynx? [Y] ") #define REALLY_EXIT_N gettext("Really exit from Lynx? [N] ") #endif /* VMS */ +#define CONNECTION_INTERRUPTED gettext("Connection interrupted.") +#define TRANSFER_INTERRUPTED gettext("Data transfer interrupted.") #define CANCELLED gettext("Cancelled!!!") #define CANCELLING gettext("Cancelling!") #define NO_CANCEL gettext("Excellent!!!") @@ -387,6 +389,8 @@ #define BAD_OPTION_NUM_ENTERED gettext("You have entered an invalid option number.") #define BAD_CHOICE_NUM_ENTERED gettext("You have entered an invalid choice number.") #define BAD_HTML_USE_TRACE gettext("** Bad HTML!! Use -trace to diagnose. **") +#define GIVE_FILENAME gettext("Give name of file to save in") +#define CANNOT_SAVE_REMOTE gettext("Can't save data to file -- please run WWW locally") #define CANNOT_OPEN_TEMP gettext("Can't open temporary file!") #define CANNOT_OPEN_OUTPUT gettext("Can't open output file! Cancelling!") #define EXECUTION_DISABLED gettext("Execution is disabled.") @@ -427,6 +431,7 @@ #define PASSWORD_REQUIRED gettext("lynx: Password required!!!") #define CLEAR_ALL_AUTH_INFO gettext("Clear all authorization info for this session?") #define AUTH_INFO_CLEARED gettext("Authorization info cleared.") +#define AUTH_FAILED_PROMPT gettext("Authorization failed. Retry?") #define CGI_DISABLED gettext("cgi support has been disabled by system administrator.") #define CGI_NOT_COMPILED \ gettext("Lynxcgi capabilities are not compiled into this version.") @@ -489,6 +494,7 @@ #define PRINTING_FILE gettext("Printing file. Please wait...") #define MAIL_ADDRESS_PROMPT gettext("Please enter a valid internet mail address: ") #define PRINTER_MISCONF_ERROR gettext("ERROR! - printer is misconfigured!") +#define FAILED_MAP_POST_REQUEST gettext("Image map from POST response not available!") #define MISDIRECTED_MAP_REQUEST gettext("Misdirected client-side image MAP request!") #define MAP_NOT_ACCESSIBLE gettext("Client-side image MAP is not accessible!") #define MAPS_NOT_AVAILABLE gettext("No client-side image MAPs are available!") @@ -502,6 +508,7 @@ gettext("Screen height must be at least 22 lines for the Options menu!") #endif /* !NO_OPTION_MENU */ #define NEED_ADVANCED_USER_MODE gettext("That key requires Advanced User mode.") +#define CONTENT_TYPE_MSG gettext("Content-type: %s") #define COMMAND_PROMPT gettext("Command: ") #define VERSION_SEGMENT gettext(" Version ") #define FIRST_SEGMENT gettext(" first.") @@ -568,6 +575,7 @@ #define CONFIRM_POST_LINK_HEAD \ gettext("Form submit action is POST, HEAD may not be understood. Proceed?") #define CONFIRM_PROCEED gettext("Proceed (%s)?") +#define CANNOT_POST gettext("Cannot POST to this host.") #define DISCARDING_POST_DATA gettext("Discarding POST data...") #define WILL_NOT_RELOAD_DOC gettext("Document will not be reloaded!") #define LOCATION_HEADER gettext("Location: ") diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c index bbb8794e..4208bfea 100644 --- a/WWW/Library/Implementation/HTAABrow.c +++ b/WWW/Library/Implementation/HTAABrow.c @@ -1168,7 +1168,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( */ HTAASetup_updateSpecifics(proxy_setup, scheme_specifics); - if (NO == HTConfirm(gettext("Authorization failed. Retry?"))) { + if (NO == HTConfirm(AUTH_FAILED_PROMPT)) { proxy_setup = NULL; return NO; } else { @@ -1227,7 +1227,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( */ HTAASetup_updateSpecifics(current_setup, scheme_specifics); - if (NO == HTConfirm(gettext("Authorization failed. Retry?"))) { + if (NO == HTConfirm(AUTH_FAILED_PROMPT)) { current_setup = NULL; return NO; } else { diff --git a/WWW/Library/Implementation/HTAAProt.c b/WWW/Library/Implementation/HTAAProt.c index 0ad16671..9112b856 100644 --- a/WWW/Library/Implementation/HTAAProt.c +++ b/WWW/Library/Implementation/HTAAProt.c @@ -300,8 +300,7 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, fprintf(tfp, "HTAA_parseProtFile: Mask group:\n"); HTAA_printGroupDef(prot->mask_group); - } else fprintf(tfp, "HTAA_parseProtFile: %s\n", - gettext("Mask group syntax error")); + } else fprintf(tfp, "HTAA_parseProtFile: Mask group syntax error\n"); } } /* if "Mask" */ @@ -609,6 +608,7 @@ PRIVATE void save_uid_info ARGS2(char *, name, int, user) */ PUBLIC char * HTAA_UidToName ARGS1(int, uid) { +#ifndef NOUSERS struct passwd *pw; HTList *me = known_pwd; @@ -627,6 +627,7 @@ PUBLIC char * HTAA_UidToName ARGS1(int, uid) save_uid_info(pw->pw_name, pw->pw_uid); return pw->pw_name; } +#endif return ""; } @@ -640,6 +641,7 @@ PUBLIC char * HTAA_UidToName ARGS1(int, uid) */ PUBLIC int HTAA_NameToUid ARGS1(char *, name) { +#ifndef NOUSERS struct passwd *pw; HTList *me = known_pwd; @@ -657,6 +659,7 @@ PUBLIC int HTAA_NameToUid ARGS1(char *, name) save_uid_info(pw->pw_name, pw->pw_uid); return pw->pw_uid; } +#endif return NONESUCH; } @@ -670,6 +673,7 @@ PUBLIC int HTAA_NameToUid ARGS1(char *, name) */ PUBLIC char * HTAA_GidToName ARGS1(int, gid) { +#ifndef NOUSERS struct group *gr; HTList *me = known_grp; @@ -688,6 +692,7 @@ PUBLIC char * HTAA_GidToName ARGS1(int, gid) save_gid_info(gr->gr_name, gr->gr_gid); return gr->gr_name; } +#endif return ""; } @@ -701,6 +706,7 @@ PUBLIC char * HTAA_GidToName ARGS1(int, gid) */ PUBLIC int HTAA_NameToGid ARGS1(char *, name) { +#ifndef NOUSERS struct group *gr; HTList *me = known_grp; @@ -718,5 +724,6 @@ PUBLIC int HTAA_NameToGid ARGS1(char *, name) save_gid_info(gr->gr_name, gr->gr_gid); return gr->gr_gid; } +#endif return NONESUCH; } diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index a141213c..3e0c4375 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -302,6 +302,7 @@ PRIVATE void free_adult_table NOARGS adult_table[i_counter] = HTAp_freeme->next; if (HTAp_freeme->object) { parent = (HTParentAnchor *)HTAp_freeme->object; + parent->underway = FALSE; HTAnchor_delete(parent); } FREE(HTAp_freeme); @@ -447,6 +448,14 @@ PRIVATE void deleteLinks ARGS1( HTParentAnchor *parent = me->mainLink.dest->parent; /* + * Set the mainLink pointer to zero NOW. If we don't, + * and we get somehow called recursively again for this + * same old me during the HTAnchor_delete below, weird + * things can occasionally happen. - kw + */ + me->mainLink.dest = NULL; + + /* * Remove me from the parent's sources so that the * parent knows one less anchor is it's dest. */ @@ -478,7 +487,6 @@ PRIVATE void deleteLinks ARGS1( * Leave the HTAtom pointed to by type up to other code to * handle (reusable, near static). */ - me->mainLink.dest = NULL; me->mainLink.type = NULL; } @@ -571,6 +579,12 @@ PUBLIC BOOL HTAnchor_delete ARGS1( } /* + * Mark ourselves busy, so that recursive calls of this function + * on this HTParentAnchor will not free it from under our feet. - kw + */ + me->underway = TRUE; + + /* * Recursively try to delete destination anchors of this parent. * In any event, this will tell all destination anchors that we * no longer consider them a destination. @@ -596,6 +610,7 @@ PUBLIC BOOL HTAnchor_delete ARGS1( } } } + me->underway = FALSE; /* * Can't delete parent, still have sources. @@ -619,6 +634,7 @@ PUBLIC BOOL HTAnchor_delete ARGS1( } } } + me->underway = FALSE; /* * Delete our empty list of children. diff --git a/WWW/Library/Implementation/HTChunk.h b/WWW/Library/Implementation/HTChunk.h index 2afcdd9d..6818acec 100644 --- a/WWW/Library/Implementation/HTChunk.h +++ b/WWW/Library/Implementation/HTChunk.h @@ -1,11 +1,11 @@ -/* HTChunk: Flexible array handling for libwww - CHUNK HANDLING: - FLEXIBLE ARRAYS - - This module implements a flexible array. It is a general utility module. A chunk is a - structure which may be extended. These routines create and append data to chunks, - automatically reallocating them as necessary. - +/* HTChunk: Flexible array handling for libwww + * CHUNK HANDLING: + * FLEXIBLE ARRAYS + * + * This module implements a flexible array. It is a general utility module. A + * chunk is a structure which may be extended. These routines create and + * append data to chunks, automatically reallocating them as necessary. + * */ #ifndef HTCHUNK_H #define HTCHUNK_H 1 @@ -14,37 +14,37 @@ #include <UCMap.h> typedef struct { - int size; /* In bytes */ - int growby; /* Allocation unit in bytes */ - int allocated; /* Current size of *data */ - char * data; /* Pointer to malloced area or 0 */ + int size; /* In bytes */ + int growby; /* Allocation unit in bytes */ + int allocated; /* Current size of *data */ + char * data; /* Pointer to malloced area or 0 */ } HTChunk; #ifdef SHORT_NAMES -#define HTChunkClear HTChClea -#define HTChunkPutc HTChPutc -#define HTChunkPuts HTChPuts -#define HTChunkCreate HTChCrea -#define HTChunkTerminate HTChTerm -#define HTChunkEnsure HtChEnsu +#define HTChunkClear HTChClea +#define HTChunkPutc HTChPutc +#define HTChunkPuts HTChPuts +#define HTChunkCreate HTChCrea +#define HTChunkTerminate HTChTerm +#define HTChunkEnsure HtChEnsu #endif /* - -Create new chunk - - ON ENTRY, - - growby The number of bytes to allocate at a time when the chunk is - later extended. Arbitrary but normally a trade-off time vs. - memory - - ON EXIT, - - returns A chunk pointer to the new chunk, - + * + * Create new chunk + * + * ON ENTRY, + * + * growby The number of bytes to allocate at a time when the chunk + * is later extended. Arbitrary but normally a trade-off + * of time vs memory. + * + * ON EXIT, + * + * returns A chunk pointer to the new chunk, + * */ extern HTChunk * HTChunkCreate PARAMS((int growby)); @@ -57,72 +57,72 @@ extern HTChunk * HTChunkCreate2 PARAMS((int growby, size_t needed)); /* - -Free a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - ch is invalid and may not be used. - + * + * Free a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * ch is invalid and may not be used. + * */ extern void HTChunkFree PARAMS((HTChunk * ch)); /* - -Clear a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - *ch The size of the chunk is zero. - + * + * Clear a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * *ch The size of the chunk is zero. + * */ extern void HTChunkClear PARAMS((HTChunk * ch)); /* - -Ensure a chunk has a certain space in - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - s The size required - - ON EXIT, - - *ch Has size at least s - + * + * Ensure a chunk has a certain space in + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * s The size required + * + * ON EXIT, + * + * *ch Has size at least s + * */ extern void HTChunkEnsure PARAMS((HTChunk * ch, int s)); /* - -Append a character to a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - c The character to be appended - - ON EXIT, - - *ch Is one character bigger - + * + * Append a character to a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * c The character to be appended + * + * ON EXIT, + * + * *ch Is one character bigger + * */ extern void HTChunkPutc PARAMS((HTChunk * ch, char c)); @@ -131,40 +131,40 @@ extern void HTChunkPutb PARAMS((HTChunk * ch, CONST char *b, int l)); extern void HTChunkPutUtf8Char PARAMS((HTChunk * ch, UCode_t code)); /* -Append a string to a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - str Tpoints to a zero-terminated string to be appended - - ON EXIT, - - *ch Is bigger by strlen(str) - + * Append a string to a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * str Tpoints to a zero-terminated string to be appended + * + * ON EXIT, + * + * *ch Is bigger by strlen(str) + * */ -extern void HTChunkPuts PARAMS((HTChunk * ch, const char *str)); +extern void HTChunkPuts PARAMS((HTChunk * ch, CONST char *str)); /* - -Append a zero character to a chunk - + * + * Append a zero character to a chunk + * */ /* - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - *ch Is one character bigger - + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * *ch Is one character bigger + * */ diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 5b405b5b..179de6fd 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -701,7 +701,7 @@ PRIVATE int get_connection ARGS2( arg); } if (status == HT_INTERRUPTED) { - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); status = HT_NOT_LOADED; } else { HTAlert(gettext("Unable to connect to FTP host.")); @@ -733,7 +733,7 @@ PRIVATE int get_connection ARGS2( if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTFTP: Interrupted at beginning of login.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; return HT_INTERRUPTED; @@ -771,7 +771,7 @@ PRIVATE int get_connection ARGS2( FREE(command); if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTFTP: Interrupted while sending username.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; return HT_INTERRUPTED; @@ -835,7 +835,7 @@ PRIVATE int get_connection ARGS2( if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTFTP: Interrupted while sending password.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; return HT_INTERRUPTED; @@ -849,7 +849,7 @@ PRIVATE int get_connection ARGS2( status = response(temp); if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTFTP: Interrupted while sending password.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE(control->socket); control->socket = -1; return HT_INTERRUPTED; @@ -2531,7 +2531,7 @@ unload_btree: if (WasInterrupted || HTCheckForInterrupt()) { if (server_type != CMS_SERVER) response(NIL); - _HTProgress(gettext("Data transfer interrupted.")); + _HTProgress(TRANSFER_INTERRUPTED); return HT_LOADED; } if (server_type != CMS_SERVER) @@ -2594,7 +2594,7 @@ PUBLIC int HTFTPLoad ARGS4( status = response(port_command); if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTFTP: Interrupted in response (port_command)\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); NETCLOSE (control->socket); control->socket = -1; close_master_socket (); @@ -3231,7 +3231,7 @@ listen: rv = HTParseSocket(format, format_out, anchor, data_soc, sink); if (rv == HT_INTERRUPTED) - _HTProgress(gettext("Data transfer interrupted.")); + _HTProgress(TRANSFER_INTERRUPTED); HTInitInput(control->socket); /* Reset buffering to control connection DD 921208 */ diff --git a/WWW/Library/Implementation/HTFWriter.c b/WWW/Library/Implementation/HTFWriter.c index 5ce2bfab..6e4f8e42 100644 --- a/WWW/Library/Implementation/HTFWriter.c +++ b/WWW/Library/Implementation/HTFWriter.c @@ -238,7 +238,7 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3( HTStream* me; if (HTClientHost) { - HTAlert(gettext("Can't save data to file -- please run WWW locally")); + HTAlert(CANNOT_SAVE_REMOTE); return HTBlackHole(); } @@ -256,7 +256,7 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3( me->fp = fopen (fnam, "w"); if (!me->fp) { - HTAlert(gettext("Can't open temporary file!")); + HTAlert(CANNOT_OPEN_TEMP); FREE(fnam); FREE(me); return NULL; @@ -313,7 +313,7 @@ PUBLIC HTStream* HTSaveLocally ARGS3( HTStream* me; if (HTClientHost) { - HTAlert(gettext("Can't save data to file -- please run WWW locally")); + HTAlert(CANNOT_SAVE_REMOTE); return HTBlackHole(); } @@ -333,13 +333,13 @@ PUBLIC HTStream* HTSaveLocally ARGS3( if (suffix) strcat(fnam, suffix); /* Save Panel */ - answer = HTPrompt(gettext("Give name of file to save in", fnam)); + answer = HTPrompt(GIVE_FILENAME, fnam); FREE(fnam); me->fp = fopen (answer, "w"); if (!me->fp) { - HTAlert(gettext("Can't open local file to write into.")); + HTAlert(CANNOT_OPEN_OUTPUT); FREE(answer); FREE(me); return NULL; diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index a4f35b1a..4dd8960a 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -178,6 +178,13 @@ PRIVATE void LYListFmtParse ARGS5( "r-S", "r-s", "rwS", "rws", 0 }; #define PBIT(a, n, s) (s) ? psbits[((a) >> (n)) & 0x7] : \ pbits[((a) >> (n)) & 0x7] +#ifdef S_ISVTX + static char *ptbits[] = { "--T", "--t", "-wT", "-wt", + "r-T", "r-t", "rwT", "rwt", 0 }; +#define PTBIT(a, s) (s) ? ptbits[(a) & 0x7] : pbits[(a) & 0x7] +#else +#define PTBIT(a, s) (a, 0, 0) +#endif if (lstat(file, &st) < 0) fmtstr = "%a"; /* can't stat so just do anchor */ @@ -294,7 +301,7 @@ PRIVATE void LYListFmtParse ARGS5( sprintf(buf, "%c%s%s%s", type, PBIT(st.st_mode, 6, st.st_mode & S_ISUID), PBIT(st.st_mode, 3, st.st_mode & S_ISGID), - PBIT(st.st_mode, 0, 0)); + PTBIT(st.st_mode, st.st_mode & S_ISVTX)); sprintf(fmt, "%%%ss", start); sprintf(buf, fmt, buf); break; diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h index 9c7686f1..a88b1285 100644 --- a/WWW/Library/Implementation/HTFile.h +++ b/WWW/Library/Implementation/HTFile.h @@ -50,7 +50,7 @@ extern char * HTnameOfFile_WWW PARAMS((CONST char * name, BOOL WWW_prefix, BOOL /* ** Make a WWW name from a full local path name */ -extern char * WWW_nameOfFile PARAMS((const char * name)); +extern char * WWW_nameOfFile PARAMS((CONST char * name)); /* ** Generate the name of a cache file diff --git a/WWW/Library/Implementation/HTFinger.c b/WWW/Library/Implementation/HTFinger.c index f7cc893d..5485e0af 100644 --- a/WWW/Library/Implementation/HTFinger.c +++ b/WWW/Library/Implementation/HTFinger.c @@ -183,7 +183,7 @@ PRIVATE int response ARGS5( if (interrupted_in_htgetcharacter) { CTRACE(tfp, "HTFinger: Interrupted in HTGetCharacter, apparently.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); goto end_html; } @@ -385,7 +385,7 @@ PUBLIC int HTLoadFinger ARGS4( if (status == HT_INTERRUPTED) { /* Interrupt cleanly */ CTRACE(tfp, "HTFinger: Interrupted on connect; recovering cleanly.\n"); - HTProgress (gettext("Connection interrupted.")); + HTProgress (CONNECTION_INTERRUPTED); FREE(str); FREE(command); return HT_NOT_LOADED; diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index bdad295d..46892a98 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -561,7 +561,7 @@ PUBLIC int HTCopy ARGS4( } if (HTCheckForInterrupt()) { - _HTProgress (gettext("Data transfer interrupted.")); + _HTProgress (TRANSFER_INTERRUPTED); (*targetClass._abort)(sink, NULL); if (bytes) rv = HT_INTERRUPTED; @@ -576,7 +576,7 @@ PUBLIC int HTCopy ARGS4( if (status == 0) { break; } else if (status == HT_INTERRUPTED) { - _HTProgress (gettext("Data transfer interrupted.")); + _HTProgress (TRANSFER_INTERRUPTED); (*targetClass._abort)(sink, NULL); if (bytes) rv = HT_INTERRUPTED; @@ -680,7 +680,7 @@ PUBLIC int HTFileCopy ARGS2( HTDisplayPartial(); if (HTCheckForInterrupt()) { - _HTProgress (gettext("Data transfer interrupted.")); + _HTProgress (TRANSFER_INTERRUPTED); if (bytes) { rv = HT_INTERRUPTED; } else { @@ -747,7 +747,7 @@ PRIVATE int HTGzFileCopy ARGS2( HTDisplayPartial(); if (HTCheckForInterrupt()) { - _HTProgress (gettext("Data transfer interrupted.")); + _HTProgress (TRANSFER_INTERRUPTED); if (bytes) { rv = HT_INTERRUPTED; } else { diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index 9066dafc..ba239db4 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -1240,7 +1240,7 @@ PRIVATE int generate_cso_report ARGS2( if (interrupted_in_htgetcharacter) { buf[0] = '\0'; CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); goto end_CSOreport; } @@ -1492,7 +1492,7 @@ PRIVATE int HTLoadCSO ARGS4( ** Interrupt cleanly. */ CTRACE(tfp, "HTLoadCSO: Interrupted on connect; recovering cleanly.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); return HT_NOT_LOADED; } if (status < 0) { @@ -1524,7 +1524,7 @@ PRIVATE int HTLoadCSO ARGS4( if (status) { NETCLOSE(s); if (status == HT_INTERRUPTED) { - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); } else if (buf[0] != '\0') { HTAlert(buf); } else { @@ -1540,7 +1540,7 @@ PRIVATE int HTLoadCSO ARGS4( if (!temp) { outofmem(__FILE__, "HTLoadCSO"); } - sprintf(temp, gettext("Sorry, no known way of converting %s to %s."), + sprintf(temp, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); HTAlert(temp); FREE(temp); @@ -1853,7 +1853,7 @@ PRIVATE int HTLoadGopher ARGS4( ** Interrupt cleanly. */ CTRACE(tfp, "HTGopher: Interrupted on connect; recovering cleanly.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); FREE(command); return HT_NOT_LOADED; } diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index a7417f78..81226f66 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -2112,7 +2112,7 @@ PUBLIC int main ARGS2( fp = stdin; } else { if ((fp = fopen(av[i], "r")) == NULL) { - fprintf(stderr, gettext("%s: cannot open %s\n"), av[0], av[i]); + fprintf(stderr, "%s: cannot open %s\n", av[0], av[i]); exit(1); } } diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index d9185caf..ed14d41f 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -358,7 +358,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( sprintf(buffer, "AUTHINFO USER %.*s%c%c", 495, UserName, CR, LF); if ((status = response(buffer)) < 0) { if (status == HT_INTERRUPTED) - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); else HTAlert(gettext("Connection closed ???")); if (auth) { @@ -442,7 +442,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( sprintf(buffer, "AUTHINFO PASS %.*s%c%c", 495, PassWord, CR, LF); if ((status = response(buffer)) < 0) { if (status == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); } else { HTAlert(gettext("Connection closed ???")); } @@ -2039,7 +2039,7 @@ PRIVATE int HTLoadNews ARGS4( p1++; } if (!(p1 && *p1)) { - HTAlert(gettext("Invalid URL!")); + HTAlert(WWW_ILLEGAL_URL_MESSAGE); return(HT_NO_DATA); } if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') { @@ -2335,7 +2335,7 @@ PRIVATE int HTLoadNews ARGS4( ** Interrupt cleanly. */ CTRACE(tfp, "HTNews: Interrupted on connect; recovering cleanly.\n"); - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { ABORT_TARGET; @@ -2383,7 +2383,7 @@ PRIVATE int HTLoadNews ARGS4( NEWS_NETCLOSE(s); s = -1; if (status == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { ABORT_TARGET; @@ -2412,7 +2412,7 @@ PRIVATE int HTLoadNews ARGS4( HTCanPost = FALSE; if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) { - HTAlert(gettext("Cannot POST to this host.")); + HTAlert(CANNOT_POST); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2433,7 +2433,7 @@ PRIVATE int HTLoadNews ARGS4( if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) { if (!HTCanPost) { - HTAlert(gettext("Cannot POST to this host.")); + HTAlert(CANNOT_POST); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2451,7 +2451,7 @@ PRIVATE int HTLoadNews ARGS4( postfile = LYNewsPost(ListArg, (reply_wanted || sreply_wanted)); } if (postfile == NULL) { - HTProgress(gettext("Cancelled!")); + HTProgress(CANCELLED); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2473,7 +2473,7 @@ PRIVATE int HTLoadNews ARGS4( sprintf(buffer, "mode reader%c%c", CR, LF); if ((status = response(buffer)) == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); break; } if (status == 480) { @@ -2488,7 +2488,7 @@ PRIVATE int HTLoadNews ARGS4( break; } if ((status = response(buffer)) == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); break; } } @@ -2496,7 +2496,7 @@ PRIVATE int HTLoadNews ARGS4( Send_NNTP_command: if ((status = response(command)) == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); break; } if (status < 0) { @@ -2585,7 +2585,7 @@ Send_NNTP_command: ** Handle posting of an article. - FM */ if (status != 340) { - HTAlert(gettext("Cannot POST to this host.")); + HTAlert(CANNOT_POST); if (postfile) { HTSYS_remove(postfile); } @@ -2630,7 +2630,7 @@ Send_NNTP_command: status = read_article(); } if (status == HT_INTERRUPTED) { - _HTProgress(gettext("Connection interrupted.")); + _HTProgress(CONNECTION_INTERRUPTED); status = HT_LOADED; } if (!(post_wanted || reply_wanted || diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c index c8f48c33..29235921 100644 --- a/WWW/Library/Implementation/HTRules.c +++ b/WWW/Library/Implementation/HTRules.c @@ -67,14 +67,10 @@ PRIVATE rule * rule_tail = 0; /* Pointer to last on list */ ** returns 0 if success, -1 if error. */ -#ifdef __STDC__ -PUBLIC int HTAddRule (HTRuleOp op, const char * pattern, const char * equiv) -#else -int HTAddRule(op, pattern, equiv) - HTRuleOp op; - char * pattern; - char * equiv; -#endif +PUBLIC int HTAddRule ARGS3( + HTRuleOp, op, + CONST char *, pattern, + CONST char *, equiv) { /* BYTE_ADDRESSING removed and memory check - AS - 1 Sep 93 */ rule * temp; char * pPattern; @@ -129,11 +125,7 @@ int HTAddRule(op, pattern, equiv) ** See also ** HTAddRule() */ -#ifdef __STDC__ -int HTClearRules(void) -#else -int HTClearRules() -#endif +int HTClearRules NOARGS { while (rules) { rule * temp = rules; @@ -169,12 +161,8 @@ int HTClearRules() ** protected, and so it knows how to handle it. ** -- AL */ -#ifdef __STDC__ -char * HTTranslate(const char * required) -#else -char * HTTranslate(required) - char * required; -#endif +char * HTTranslate ARGS1( + CONST char *, required) { rule * r; char *current = NULL; @@ -299,7 +287,8 @@ char * HTTranslate(required) ** ** returns 0 OK, < 0 syntax error. */ -PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) +PUBLIC int HTSetConfiguration ARGS1( + CONST char *, config) { HTRuleOp op; char * line = NULL; @@ -392,7 +381,8 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) ** The strings may not contain spaces. */ -int HTLoadRules ARGS1(CONST char *, filename) +int HTLoadRules ARGS1( + CONST char *, filename) { FILE * fp = fopen(filename, "r"); char line[LINE_LENGTH+1]; diff --git a/WWW/Library/Implementation/HTRules.h b/WWW/Library/Implementation/HTRules.h index 3eb37169..2bbe6def 100644 --- a/WWW/Library/Implementation/HTRules.h +++ b/WWW/Library/Implementation/HTRules.h @@ -1,17 +1,19 @@ -/* Configuration Manager for libwww - CONFIGURATION MANAGER - - Author Tim Berners-Lee/CERN. Public domain. Please mail changes to timbl@info.cern.ch. - - The configuration information loaded includes tables (file suffixes, presentation - methods) in other modules. The most likely routines needed by developers will be: - - HTSetConfiguration to load configuration information. - - HTLoadRules to load a whole file of configuration information - - HTTranslate to translate a URL using the rule table. - +/* Configuration Manager for libwww + * CONFIGURATION MANAGER + * + * Author Tim Berners-Lee/CERN. Public domain. Please mail changes to + * timbl@info.cern.ch. + * + * The configuration information loaded includes tables (file suffixes, + * presentation methods) in other modules. The most likely routines needed by + * developers will be: + * + * HTSetConfiguration to load configuration information. + * + * HTLoadRules to load a whole file of configuration information + * + * HTTranslate to translate a URL using the rule table. + * */ #ifndef HTRULE_H #define HTRULE_H @@ -66,7 +68,7 @@ HTAddRule: Add rule to the list large. */ -extern int HTAddRule PARAMS((HTRuleOp op, const char * pattern, const char * equiv)); +extern int HTAddRule PARAMS((HTRuleOp op, CONST char * pattern, CONST char * equiv)); /* @@ -82,12 +84,7 @@ HTClearRules: Clear all rules */ -#ifdef __STDC__ -extern int HTClearRules(void); -#else -extern int HTClearRules(); -#endif - +extern int HTClearRules PARAMS((void)); /* @@ -108,12 +105,7 @@ HTTranslate: Translate by rules a copy of the original. */ -#ifdef __STDC__ -extern char * HTTranslate(const char * required); -#else -extern char * HTTranslate(); -#endif - +extern char * HTTranslate PARAMS((CONST char * required)); /* @@ -147,17 +139,10 @@ HtLoadRules: Load the rules from a file */ -#ifdef __STDC__ -extern int HTLoadRules(const char * filename); -#else -extern int HTLoadRules(); -#endif +extern int HTLoadRules PARAMS((CONST char * filename)); /* */ #endif /* HTUtils.h */ -/* - - end */ diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c index d8698633..b5ed973a 100644 --- a/WWW/Library/Implementation/HTString.c +++ b/WWW/Library/Implementation/HTString.c @@ -233,8 +233,8 @@ PUBLIC char * HTNextField ARGS1( */ PUBLIC char * HTNextTok ARGS4( char **, pstr, - const char *, delims, - const char *, bracks, + CONST char *, delims, + CONST char *, bracks, char *, found) { char * p = *pstr; diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 6abde5f5..1f201aea 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -454,7 +454,6 @@ PUBLIC int HTParseInet ARGS2( struct timeval timeout; int dns_patience = 30; /* how many seconds will we wait for DNS? */ int child_exited = 0; - int ok_to_select_stdin = -1; /* ** Reap any children that have terminated since last time @@ -539,16 +538,7 @@ PUBLIC int HTParseInet ARGS2( ** selectable! /dev/null isn't, on some systems, which ** makes some useful Lynx invocations fail. -BL */ - if (ok_to_select_stdin == -1) { - timeout.tv_sec = 0; - timeout.tv_usec = 0; - FD_SET(0, &readfds); /* stdin -BL */ - selret = select(1, &readfds, NULL, NULL, &timeout); - if (selret >= 0) ok_to_select_stdin = 1; - else ok_to_select_stdin = 0; - FD_ZERO(&readfds); - } - if (ok_to_select_stdin) FD_SET(0, &readfds); + if (isatty(fileno(stdin))) FD_SET(fileno(stdin), &readfds); #endif /* USE_SLANG */ timeout.tv_sec = 1; timeout.tv_usec = 0; diff --git a/WWW/Library/Implementation/HTTCP.h b/WWW/Library/Implementation/HTTCP.h index 05e8278f..a1a428c9 100644 --- a/WWW/Library/Implementation/HTTCP.h +++ b/WWW/Library/Implementation/HTTCP.h @@ -24,11 +24,7 @@ ** it is to be kept. */ #ifndef _WINDOWS -#ifdef __STDC__ - extern const char * HTInetString(struct sockaddr_in* mysin); -#else - extern char * HTInetString(); -#endif +extern CONST char * HTInetString PARAMS((struct sockaddr_in* mysin)); #endif diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 4ee74ace..2f2e4c45 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -130,12 +130,12 @@ PRIVATE int HTLoadHTTP ARGS4 ( if (!url) { status = -3; - _HTProgress (gettext("Bad request.")); + _HTProgress (BAD_REQUEST); goto done; } if (!*url) { status = -2; - _HTProgress (gettext("Bad request.")); + _HTProgress (BAD_REQUEST); goto done; } @@ -173,7 +173,7 @@ try_again: ** Interrupt cleanly. */ CTRACE (tfp, "HTTP: Interrupted on connect; recovering cleanly.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); status = HT_NOT_LOADED; goto done; } @@ -655,7 +655,7 @@ try_again: */ if (status == HT_INTERRUPTED) { CTRACE (tfp, "HTTP: Interrupted initial read.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; @@ -1093,7 +1093,7 @@ try_again: * Impatient user. - FM */ CTRACE (tfp, "HTTP: Interrupted followup read.\n"); - _HTProgress (gettext("Connection interrupted.")); + _HTProgress (CONNECTION_INTERRUPTED); status = HT_INTERRUPTED; goto clean_up; } @@ -1685,7 +1685,7 @@ Cookie2_continuation: char buffer[1024]; /* @@@@@@@@ */ HTTP_NETCLOSE(s, handle); - sprintf(buffer, gettext("Sorry, no known way of converting %s to %s."), + sprintf(buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); _HTProgress (buffer); status = -1; diff --git a/WWW/Library/Implementation/HTTelnet.c b/WWW/Library/Implementation/HTTelnet.c index 51096e3a..cc366cf7 100644 --- a/WWW/Library/Implementation/HTTelnet.c +++ b/WWW/Library/Implementation/HTTelnet.c @@ -30,8 +30,6 @@ #include <HTAccess.h> #include <HTAlert.h> -#include <userdefs.h> /* for TELNET_COMMAND and RLOGIN_COMMAND */ - #include <LYStrings.h> #include <LYLeaks.h> diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 0d2f1f6c..7e90dc8e 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -432,4 +432,6 @@ extern FILE *TraceFP NOPARAMS; #define SHORTENED_RBIND /* FIXME: do this in configure-script */ +#include <userdefs.h> + #endif /* HTUTILS_H */ diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c index 1440a5f8..b21aafd7 100644 --- a/WWW/Library/Implementation/HTWAIS.c +++ b/WWW/Library/Implementation/HTWAIS.c @@ -164,7 +164,7 @@ PRIVATE int mosaic_connect_to_server ARGS3( HTAlert (gettext("Could not connect to WAIS server.")); return 0; } else if (rv == -1) { - HTAlert (gettext("Connection interrupted.")); + HTAlert (CONNECTION_INTERRUPTED); return -1; } @@ -949,7 +949,7 @@ PUBLIC int HTLoadWAIS ARGS4( CTRACE(tfp, "HTWAIS: Slice number %ld\n", count); if (HTCheckForInterrupt()) { - HTAlert (gettext("Data transfer interrupted.")); + HTAlert (TRANSFER_INTERRUPTED); (*target->isa->_abort)(target, NULL); #ifdef VMS FREE(type); @@ -993,7 +993,7 @@ PUBLIC int HTLoadWAIS ARGS4( false /* true verbose */ ); if (rv == HT_INTERRUPTED) { - HTAlert (gettext("Data transfer interrupted.")); + HTAlert (TRANSFER_INTERRUPTED); return_status = HT_INTERRUPTED; FREE_TARGET; FREE(type); diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 53005d65..d55c74fb 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1386,6 +1386,7 @@ top1: (!context->element_stack || (context->element_stack->tag && (context->element_stack->tag->contents == SGML_MIXED || + context->element_stack->tag->contents == SGML_ELEMENT || context->element_stack->tag->contents == SGML_PCDATA || context->element_stack->tag->contents == SGML_RCDATA)))) { /* diff --git a/config.hin b/config.hin index db636add..64c6003f 100644 --- a/config.hin +++ b/config.hin @@ -155,7 +155,6 @@ #undef ZCAT_PATH /* CF_PATH_PROG(zcat) */ #undef ZIP_PATH /* CF_PATH_PROG(zip) */ #undef _ALL_SOURCE /* AC_AIX */ -#undef const /* defined by AC_C_CONST */ #undef inline /* defined by AC_C_INLINE */ #undef mode_t /* defined by AC_TYPE_MODE_T */ #undef off_t /* defined by AC_TYPE_OFF_T */ @@ -163,6 +162,11 @@ #undef uid_t /* defined by AC_TYPE_UID_T */ #undef vfork /* defined by AC_FUNC_FORK */ +/* 'const' may be defined externally by the compiler-wrapper, as in 'unproto' */ +#ifndef const +#undef const /* defined by AC_C_CONST */ +#endif + /* FIXME:ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS */ /* FIXME:DECLARE_WAIS_LOGFILES */ /* FIXME:DGUX */ diff --git a/lynx_help/lynx_help_main.html b/lynx_help/lynx_help_main.html index 3af49161..0084a574 100644 --- a/lynx_help/lynx_help_main.html +++ b/lynx_help/lynx_help_main.html @@ -76,10 +76,10 @@ SSL & security, and more <H2>Search engines:</H2> <ul> -<li><a href="http://www.altavista.digital.com/">Alta Vista</a> +<li><a href="http://www.altavista.com/">AltaVista</a> <li><a href="http://www.excite.com/">Excite</a> <li><a href="http://www.infind.com/">Inference Find</a> -<li><a href="http://guide.Infoseek.com/">Infoseek</a> +<li><a href="http://www.Infoseek.com/">Infoseek</a> <li><a href="http://www.lycos.com/">Lycos</a> <li><a href="http://www.metacrawler.com/">MetaCrawler</a> <li><a href="http://guaraldi.cs.colostate.edu:2000/">Savvy Search</a> diff --git a/po/POTFILES.in b/po/POTFILES.in index e5629651..cad00075 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,15 +5,12 @@ LYMessages.c WWW/Library/Implementation/HTAABrow.c -WWW/Library/Implementation/HTAAProt.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c -WWW/Library/Implementation/HTFWriter.c WWW/Library/Implementation/HTFile.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTFormat.c WWW/Library/Implementation/HTGopher.c -WWW/Library/Implementation/HTMIME.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTRules.c WWW/Library/Implementation/HTStyle.c @@ -24,7 +21,6 @@ WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c src/GridText.c src/HTAlert.c -src/HTFWriter.c src/HTML.c src/LYBookmark.c src/LYCgi.c @@ -41,7 +37,6 @@ src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c -src/LYMap.c src/LYNews.c src/LYOptions.c src/LYPrint.c diff --git a/po/lynx.pot b/po/lynx.pot index 8ce51bd7..dba15ff6 100644 --- a/po/lynx.pot +++ b/po/lynx.pot @@ -1,11 +1,11 @@ msgid "" msgstr "" -"Date: 1998-11-20 22:38:39-0500\n" +"Date: 1998-12-03 06:42:44-0500\n" "From: Thomas Dickey,,, <tom@dickey-ppp>\n" "Content-Type: text/plain; charset=\n" "Xgettext-Options: --default-domain=lynx --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" -"Files: LYMessages.c WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAAProt.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c WWW/Library/Implementation/HTFWriter.c WWW/Library/Implementation/HTFile.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTFormat.c WWW/Library/Implementation/HTGopher.c WWW/Library/Implementation/HTMIME.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTRules.c WWW/Library/Implementation/HTStyle.c WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c WWW/Library/Implementation/HTVMSUtils.c WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c src/GridText.c src/HTAlert.c src/HTFWriter.c src/HTML.c src/LYBookmark.c src/LYCgi.c src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYGetFile.c src/LYHistory.c src/LYJump.c src/LYLeaks.c src/LYList.c src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c src/LYMap.c src/LYNews.c " -"src/LYOptions.c src/LYPrint.c src/LYReadCFG.c src/LYShowInfo.c src/LYStrings.c src/LYStyle.c src/LYTraversal.c src/LYUpload.c src/LYUtils.c src/LYrcFile.c\n" +"Files: LYMessages.c WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c WWW/Library/Implementation/HTFile.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTFormat.c WWW/Library/Implementation/HTGopher.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTRules.c WWW/Library/Implementation/HTStyle.c WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c WWW/Library/Implementation/HTVMSUtils.c WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c src/GridText.c src/HTAlert.c src/HTML.c src/LYBookmark.c src/LYCgi.c src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYGetFile.c src/LYHistory.c src/LYJump.c src/LYLeaks.c src/LYList.c src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c src/LYNews.c src/LYOptions.c src/LYPrint.c src/LYReadCFG.c src/LYShowInfo.c src/LYStrings.c src/LYStyle.c src/LYTraversal.c src/LYUpload.c src/LYUtils.c " +"src/LYrcFile.c\n" #: LYMessages.c:24 msgid "Are you sure you want to quit? [Y] " @@ -25,1421 +25,1449 @@ msgstr "" #. VMS #: LYMessages.c:30 -msgid "Cancelled!!!" +msgid "Connection interrupted." msgstr "" #: LYMessages.c:31 -msgid "Cancelling!" +msgid "Data transfer interrupted." msgstr "" #: LYMessages.c:32 -msgid "Excellent!!!" +msgid "Cancelled!!!" msgstr "" #: LYMessages.c:33 -msgid "Done!" +msgid "Cancelling!" msgstr "" #: LYMessages.c:34 -msgid "Bad request!" +msgid "Excellent!!!" msgstr "" #: LYMessages.c:35 -msgid "previous" +msgid "Done!" msgstr "" #: LYMessages.c:36 -msgid "next screen" +msgid "Bad request!" msgstr "" #: LYMessages.c:37 -msgid "HELP!" +msgid "previous" msgstr "" #: LYMessages.c:38 +msgid "next screen" +msgstr "" + +#: LYMessages.c:39 +msgid "HELP!" +msgstr "" + +#: LYMessages.c:40 msgid ", help on " msgstr "" -#: LYMessages.c:43 +#: LYMessages.c:45 msgid "-- press space for next page --" msgstr "" -#. Forms messages -#: LYMessages.c:100 +#: LYMessages.c:102 msgid "Submitting form..." msgstr "" -#: LYMessages.c:101 +#: LYMessages.c:103 msgid "Resetting form..." msgstr "" -#: LYMessages.c:104 +#: LYMessages.c:106 msgid "Warning: Cannot transcode form data to charset %s!" msgstr "" -#: LYMessages.c:108 +#: LYMessages.c:110 msgid "The resource requested is not available at this time." msgstr "" -#: LYMessages.c:109 +#: LYMessages.c:111 msgid "Enter Lynx keystroke command: " msgstr "" -#: LYMessages.c:110 +#: LYMessages.c:112 msgid "Looking up " msgstr "" -#: LYMessages.c:111 +#: LYMessages.c:113 msgid "Getting %s" msgstr "" -#: LYMessages.c:112 +#: LYMessages.c:114 msgid "Skipping %s" msgstr "" -#: LYMessages.c:113 +#: LYMessages.c:115 msgid "Using %s" msgstr "" -#: LYMessages.c:114 +#: LYMessages.c:116 msgid "Illegal URL: %s" msgstr "" -#: LYMessages.c:115 +#: LYMessages.c:117 msgid "Badly formed address %s" msgstr "" -#: LYMessages.c:116 +#: LYMessages.c:118 msgid "URL: %s" msgstr "" -#: LYMessages.c:117 +#: LYMessages.c:119 msgid "Unable to access WWW file!!!" msgstr "" -#: LYMessages.c:118 +#: LYMessages.c:120 msgid "This is a searchable index. Use %s to search." msgstr "" -#: LYMessages.c:121 +#: LYMessages.c:123 msgid "You have entered an invalid link number." msgstr "" -#. mailto -#: LYMessages.c:140 +#: LYMessages.c:142 msgid "Malformed mailto form submission! Cancelled!" msgstr "" -#: LYMessages.c:141 +#: LYMessages.c:143 msgid "Warning! Control codes in mail address replaced by ?" msgstr "" -#: LYMessages.c:142 +#: LYMessages.c:144 msgid "Mail disallowed! Cannot submit." msgstr "" -#: LYMessages.c:143 +#: LYMessages.c:145 msgid "Mailto form submission failed!" msgstr "" -#: LYMessages.c:144 +#: LYMessages.c:146 msgid "Mailto form submission Cancelled!!!" msgstr "" -#: LYMessages.c:145 +#: LYMessages.c:147 msgid "Sending form content..." msgstr "" -#: LYMessages.c:146 +#: LYMessages.c:148 msgid "No email address is present in mailto URL!" msgstr "" -#: LYMessages.c:149 +#: LYMessages.c:151 msgid "Comment request cancelled!!!" msgstr "" -#: LYMessages.c:158 +#: LYMessages.c:160 msgid "Send this comment? (y/n) " msgstr "" -#: LYMessages.c:159 +#: LYMessages.c:161 msgid "Send this message? (y/n) " msgstr "" -#: LYMessages.c:160 +#: LYMessages.c:162 msgid "Sending your message..." msgstr "" -#: LYMessages.c:161 +#: LYMessages.c:163 msgid "Sending your comment:" msgstr "" -#: LYMessages.c:163 +#: LYMessages.c:165 msgid "file: ACTIONs are disallowed!" msgstr "" -#: LYMessages.c:166 +#: LYMessages.c:168 msgid "file: URLs via bookmarks are disallowed!" msgstr "" -#: LYMessages.c:169 +#: LYMessages.c:171 msgid "Press <return> to return to Lynx." msgstr "" #. UNIX #. VMS -#: LYMessages.c:182 +#: LYMessages.c:184 msgid "Spawning is currently disabled." msgstr "" -#: LYMessages.c:183 +#: LYMessages.c:185 msgid "The 'd'ownload command is currently disabled." msgstr "" -#: LYMessages.c:184 +#: LYMessages.c:186 msgid "You cannot download an input field." msgstr "" -#: LYMessages.c:185 +#: LYMessages.c:187 msgid "Form has a mailto action! Cannot download." msgstr "" -#: LYMessages.c:186 +#: LYMessages.c:188 msgid "You cannot download a mailto: link." msgstr "" -#: LYMessages.c:187 +#: LYMessages.c:189 msgid "You cannot download cookies." msgstr "" -#: LYMessages.c:188 +#: LYMessages.c:190 msgid "You cannot download a printing option." msgstr "" -#: LYMessages.c:189 +#: LYMessages.c:191 msgid "You cannot download an upload option." msgstr "" -#: LYMessages.c:190 +#: LYMessages.c:192 msgid "You cannot download an permit option." msgstr "" -#: LYMessages.c:191 +#: LYMessages.c:193 msgid "This special URL cannot be downloaded!" msgstr "" -#: LYMessages.c:192 +#: LYMessages.c:194 msgid "Nothing to download." msgstr "" -#: LYMessages.c:193 +#: LYMessages.c:195 msgid "Trace ON!" msgstr "" -#: LYMessages.c:194 +#: LYMessages.c:196 msgid "Trace OFF!" msgstr "" -#: LYMessages.c:203 +#: LYMessages.c:205 msgid "Raw 8-bit or CJK mode toggled OFF! Reloading..." msgstr "" -#: LYMessages.c:204 +#: LYMessages.c:206 msgid "Raw 8-bit or CJK mode toggled ON! Reloading..." msgstr "" -#: LYMessages.c:209 +#: LYMessages.c:211 msgid "Sorry, the document is not an http URL." msgstr "" -#: LYMessages.c:210 +#: LYMessages.c:212 msgid "Sorry, the link is not an http URL." msgstr "" -#: LYMessages.c:211 +#: LYMessages.c:213 msgid "Sorry, the ACTION for this form is disabled." msgstr "" -#: LYMessages.c:214 +#: LYMessages.c:216 msgid "Not an http URL or form ACTION!" msgstr "" -#: LYMessages.c:215 +#: LYMessages.c:217 msgid "This special URL cannot be a form ACTION!" msgstr "" -#: LYMessages.c:216 +#: LYMessages.c:218 msgid "URL is not in starting realm!" msgstr "" -#: LYMessages.c:217 +#: LYMessages.c:219 msgid "News posting is disabled!" msgstr "" -#: LYMessages.c:218 +#: LYMessages.c:220 msgid "File management support is disabled!" msgstr "" -#: LYMessages.c:219 +#: LYMessages.c:221 msgid "No jump file is currently available." msgstr "" -#: LYMessages.c:220 +#: LYMessages.c:222 msgid "Jump to (use '?' for list): " msgstr "" -#: LYMessages.c:221 +#: LYMessages.c:223 msgid "Jumping to a shortcut URL is disallowed!" msgstr "" -#: LYMessages.c:222 +#: LYMessages.c:224 msgid "Random URL is disallowed! Use a shortcut." msgstr "" -#: LYMessages.c:223 +#: LYMessages.c:225 msgid "No random URLs have been used thus far." msgstr "" -#: LYMessages.c:224 +#: LYMessages.c:226 msgid "Bookmark features are currently disabled." msgstr "" -#: LYMessages.c:225 +#: LYMessages.c:227 msgid "Execution via bookmarks is disabled." msgstr "" -#: LYMessages.c:230 +#: LYMessages.c:232 msgid "ERROR - unable to open bookmark file." msgstr "" -#: LYMessages.c:236 +#: LYMessages.c:238 msgid "Error renaming scratch file." msgstr "" -#: LYMessages.c:238 +#: LYMessages.c:240 msgid "Error renaming temporary file." msgstr "" #. VMS -#: LYMessages.c:246 +#: LYMessages.c:248 msgid "Bookmark deletion failed." msgstr "" -#: LYMessages.c:251 +#: LYMessages.c:253 msgid "There are no links in this bookmark file!" msgstr "" -#: LYMessages.c:254 +#: LYMessages.c:256 msgid "Save D)ocument to bookmark file or C)ancel? (d,c): " msgstr "" -#: LYMessages.c:255 +#: LYMessages.c:257 msgid "Save L)ink to bookmark file or C)ancel? (l,c): " msgstr "" -#: LYMessages.c:258 +#: LYMessages.c:260 msgid "Cannot save form fields/links" msgstr "" -#: LYMessages.c:263 +#: LYMessages.c:265 msgid "Malformed address." msgstr "" -#: LYMessages.c:280 +#: LYMessages.c:282 msgid "Soft double-quote parsing ON!" msgstr "" -#: LYMessages.c:281 +#: LYMessages.c:283 msgid "Soft double-quote parsing OFF!" msgstr "" -#: LYMessages.c:282 +#: LYMessages.c:284 msgid "Now using TagSoup parsing of HTML." msgstr "" -#: LYMessages.c:283 +#: LYMessages.c:285 msgid "Now using SortaSGML parsing of HTML!" msgstr "" -#: LYMessages.c:284 +#: LYMessages.c:286 msgid "You are already at the end of this document." msgstr "" -#: LYMessages.c:285 +#: LYMessages.c:287 msgid "You are already at the beginning of this document." msgstr "" -#: LYMessages.c:286 +#: LYMessages.c:288 msgid "You are already at page %d of this document." msgstr "" -#: LYMessages.c:287 +#: LYMessages.c:289 msgid "Link number %d already is current." msgstr "" -#: LYMessages.c:288 +#: LYMessages.c:290 msgid "You are already at the first document" msgstr "" -#: LYMessages.c:289 +#: LYMessages.c:291 msgid "There are no links above this line of the document." msgstr "" -#: LYMessages.c:290 +#: LYMessages.c:292 msgid "There are no links below this line of the document." msgstr "" -#: LYMessages.c:297 +#: LYMessages.c:299 msgid "Do you want to go back to the previous document? [N]" msgstr "" -#: LYMessages.c:298 +#: LYMessages.c:300 msgid "Use arrows or tab to move off of field." msgstr "" -#: LYMessages.c:301 +#: LYMessages.c:303 msgid "** Bad HTML!! No form action defined. **" msgstr "" -#: LYMessages.c:302 +#: LYMessages.c:304 msgid "Bad HTML!! Unable to create popup window!" msgstr "" -#: LYMessages.c:303 +#: LYMessages.c:305 msgid "Unable to create popup window!" msgstr "" -#: LYMessages.c:304 +#: LYMessages.c:306 msgid "Goto a random URL is disallowed!" msgstr "" -#: LYMessages.c:305 +#: LYMessages.c:307 msgid "Goto a non-http URL is disallowed!" msgstr "" -#: LYMessages.c:306 +#: LYMessages.c:308 msgid "You are not allowed to goto \"cso:\" URLs" msgstr "" -#: LYMessages.c:307 +#: LYMessages.c:309 msgid "You are not allowed to goto \"file:\" URLs" msgstr "" -#: LYMessages.c:308 +#: LYMessages.c:310 msgid "You are not allowed to goto \"finger:\" URLs" msgstr "" -#: LYMessages.c:309 +#: LYMessages.c:311 msgid "You are not allowed to goto \"ftp:\" URLs" msgstr "" -#: LYMessages.c:310 +#: LYMessages.c:312 msgid "You are not allowed to goto \"gopher:\" URLs" msgstr "" -#: LYMessages.c:311 +#: LYMessages.c:313 msgid "You are not allowed to goto \"http:\" URLs" msgstr "" -#: LYMessages.c:312 +#: LYMessages.c:314 msgid "You are not allowed to goto \"https:\" URLs" msgstr "" -#: LYMessages.c:313 +#: LYMessages.c:315 msgid "You are not allowed to goto \"lynxcgi:\" URLs" msgstr "" -#: LYMessages.c:314 +#: LYMessages.c:316 msgid "You are not allowed to goto \"lynxexec:\" URLs" msgstr "" -#: LYMessages.c:315 +#: LYMessages.c:317 msgid "You are not allowed to goto \"lynxprog:\" URLs" msgstr "" -#: LYMessages.c:316 +#: LYMessages.c:318 msgid "You are not allowed to goto \"mailto:\" URLs" msgstr "" -#: LYMessages.c:317 +#: LYMessages.c:319 msgid "You are not allowed to goto \"news:\" URLs" msgstr "" -#: LYMessages.c:318 +#: LYMessages.c:320 msgid "You are not allowed to goto \"nntp:\" URLs" msgstr "" -#: LYMessages.c:319 +#: LYMessages.c:321 msgid "You are not allowed to goto \"rlogin:\" URLs" msgstr "" -#: LYMessages.c:320 +#: LYMessages.c:322 msgid "You are not allowed to goto \"snews:\" URLs" msgstr "" -#: LYMessages.c:321 +#: LYMessages.c:323 msgid "You are not allowed to goto \"telnet:\" URLs" msgstr "" -#: LYMessages.c:322 +#: LYMessages.c:324 msgid "You are not allowed to goto \"tn3270:\" URLs" msgstr "" -#: LYMessages.c:323 +#: LYMessages.c:325 msgid "You are not allowed to goto \"wais:\" URLs" msgstr "" -#: LYMessages.c:324 +#: LYMessages.c:326 msgid "This special URL is not allowed as a goto!" msgstr "" -#: LYMessages.c:325 +#: LYMessages.c:327 msgid "URL to open: " msgstr "" -#: LYMessages.c:326 +#: LYMessages.c:328 msgid "Edit the current Goto URL: " msgstr "" -#: LYMessages.c:327 +#: LYMessages.c:329 msgid "Edit the previous Goto URL: " msgstr "" -#: LYMessages.c:328 +#: LYMessages.c:330 msgid "Edit a previous Goto URL: " msgstr "" -#: LYMessages.c:329 +#: LYMessages.c:331 msgid "Current document has POST data." msgstr "" -#: LYMessages.c:330 +#: LYMessages.c:332 msgid "Edit this document's URL: " msgstr "" -#: LYMessages.c:331 +#: LYMessages.c:333 msgid "Edit the current link's URL: " msgstr "" -#: LYMessages.c:332 +#: LYMessages.c:334 msgid "You cannot edit File Management URLs" msgstr "" -#: LYMessages.c:333 +#: LYMessages.c:335 msgid "Enter a database query: " msgstr "" -#: LYMessages.c:334 +#: LYMessages.c:336 msgid "Enter a whereis query: " msgstr "" -#: LYMessages.c:335 +#: LYMessages.c:337 msgid "Edit the current query: " msgstr "" -#: LYMessages.c:336 +#: LYMessages.c:338 msgid "Edit the previous query: " msgstr "" -#: LYMessages.c:337 +#: LYMessages.c:339 msgid "Edit a previous query: " msgstr "" -#: LYMessages.c:340 +#: LYMessages.c:342 msgid "Edit the current shortcut: " msgstr "" -#: LYMessages.c:341 +#: LYMessages.c:343 msgid "Edit the previous shortcut: " msgstr "" -#: LYMessages.c:342 +#: LYMessages.c:344 msgid "Edit a previous shortcut: " msgstr "" -#: LYMessages.c:343 +#: LYMessages.c:345 msgid "Key '%c' is not mapped to a jump file!" msgstr "" -#: LYMessages.c:344 +#: LYMessages.c:346 msgid "Cannot locate jump file!" msgstr "" -#: LYMessages.c:345 +#: LYMessages.c:347 msgid "Cannot open jump file!" msgstr "" -#: LYMessages.c:346 +#: LYMessages.c:348 msgid "Error reading jump file!" msgstr "" -#: LYMessages.c:347 +#: LYMessages.c:349 msgid "Out of memory reading jump file!" msgstr "" -#: LYMessages.c:348 +#: LYMessages.c:350 msgid "Out of memory reading jump table!" msgstr "" -#: LYMessages.c:349 +#: LYMessages.c:351 msgid "No index is currently available." msgstr "" -#: LYMessages.c:352 +#: LYMessages.c:354 msgid "You are already at main screen!" msgstr "" -#: LYMessages.c:357 +#: LYMessages.c:359 msgid "No owner is defined. Use %s? [N] " msgstr "" -#: LYMessages.c:358 +#: LYMessages.c:360 msgid "Do you wish to send a comment? [N]" msgstr "" -#: LYMessages.c:359 +#: LYMessages.c:361 msgid "Mail is disallowed so you cannot send a comment" msgstr "" -#: LYMessages.c:360 +#: LYMessages.c:362 msgid "The 'e'dit command is currently disabled." msgstr "" -#: LYMessages.c:361 +#: LYMessages.c:363 msgid "System error - failure to get status." msgstr "" -#: LYMessages.c:362 +#: LYMessages.c:364 msgid "No editor is defined!" msgstr "" -#: LYMessages.c:363 +#: LYMessages.c:365 msgid "The 'p'rint command is currently disabled." msgstr "" -#: LYMessages.c:364 +#: LYMessages.c:366 msgid "Document has no Toolbar links or Banner." msgstr "" -#: LYMessages.c:365 +#: LYMessages.c:367 msgid "Unable to open traversal file." msgstr "" -#: LYMessages.c:366 +#: LYMessages.c:368 msgid "Unable to open traversal found file." msgstr "" -#: LYMessages.c:367 +#: LYMessages.c:369 msgid "Unable to open reject file." msgstr "" -#: LYMessages.c:368 +#: LYMessages.c:370 msgid "Unable to open traversal errors output file" msgstr "" -#: LYMessages.c:369 +#: LYMessages.c:371 msgid "TRAVERSAL WAS INTERRUPTED" msgstr "" -#: LYMessages.c:370 +#: LYMessages.c:372 msgid "Follow link (or goto link or page) number: " msgstr "" -#: LYMessages.c:371 +#: LYMessages.c:373 msgid "Select option (or page) number: " msgstr "" -#: LYMessages.c:372 +#: LYMessages.c:374 msgid "Option choice (or page) number: " msgstr "" -#: LYMessages.c:373 +#: LYMessages.c:375 msgid "Option number %d already is current." msgstr "" -#: LYMessages.c:374 +#: LYMessages.c:376 msgid "Choice number %d already is current." msgstr "" -#: LYMessages.c:387 +#: LYMessages.c:389 msgid "You have entered an invalid option number." msgstr "" -#: LYMessages.c:388 +#: LYMessages.c:390 msgid "You have entered an invalid choice number." msgstr "" -#: LYMessages.c:389 +#: LYMessages.c:391 msgid "** Bad HTML!! Use -trace to diagnose. **" msgstr "" -#: LYMessages.c:390 WWW/Library/Implementation/HTFWriter.c:259 +#: LYMessages.c:392 +msgid "Give name of file to save in" +msgstr "" + +#: LYMessages.c:393 +msgid "Can't save data to file -- please run WWW locally" +msgstr "" + +#: LYMessages.c:394 msgid "Can't open temporary file!" msgstr "" -#: LYMessages.c:391 +#: LYMessages.c:395 msgid "Can't open output file! Cancelling!" msgstr "" -#: LYMessages.c:392 +#: LYMessages.c:396 msgid "Execution is disabled." msgstr "" -#: LYMessages.c:397 +#: LYMessages.c:401 msgid "This file cannot be displayed on this terminal." msgstr "" -#: LYMessages.c:400 LYMessages.c:401 +#: LYMessages.c:404 LYMessages.c:405 msgid "%s D)ownload, or C)ancel" msgstr "" -#: LYMessages.c:402 +#: LYMessages.c:406 msgid "Cancelling file." msgstr "" -#: LYMessages.c:403 +#: LYMessages.c:407 msgid "Retrieving file. - PLEASE WAIT -" msgstr "" -#: LYMessages.c:404 +#: LYMessages.c:408 msgid "Enter a filename: " msgstr "" -#: LYMessages.c:405 +#: LYMessages.c:409 msgid "Edit the previous filename: " msgstr "" -#: LYMessages.c:406 +#: LYMessages.c:410 msgid "Edit a previous filename: " msgstr "" -#: LYMessages.c:407 +#: LYMessages.c:411 msgid "Enter a new filename: " msgstr "" -#: LYMessages.c:408 +#: LYMessages.c:412 msgid "File name may not begin with a dot." msgstr "" -#: LYMessages.c:410 +#: LYMessages.c:414 msgid "File exists. Create higher version? (y/n)" msgstr "" -#: LYMessages.c:412 +#: LYMessages.c:416 msgid "File exists. Overwrite? (y/n)" msgstr "" #. VMS -#: LYMessages.c:414 +#: LYMessages.c:418 msgid "Cannot write to file." msgstr "" -#: LYMessages.c:415 +#: LYMessages.c:419 msgid "ERROR! - download command is misconfigured." msgstr "" -#: LYMessages.c:416 +#: LYMessages.c:420 msgid "Unable to download file." msgstr "" -#: LYMessages.c:417 +#: LYMessages.c:421 msgid "Saving..." msgstr "" -#: LYMessages.c:418 +#: LYMessages.c:422 msgid "Could not access file." msgstr "" -#: LYMessages.c:421 +#: LYMessages.c:425 msgid "You are not authorized to edit this file." msgstr "" -#: LYMessages.c:422 +#: LYMessages.c:426 msgid "Title: " msgstr "" -#: LYMessages.c:423 src/LYMail.c:1423 +#: LYMessages.c:427 msgid "Subject: " msgstr "" -#: LYMessages.c:424 +#: LYMessages.c:428 msgid "Username: " msgstr "" -#: LYMessages.c:425 +#: LYMessages.c:429 msgid "Password: " msgstr "" -#: LYMessages.c:426 +#: LYMessages.c:430 msgid "lynx: Username and Password required!!!" msgstr "" -#: LYMessages.c:427 +#: LYMessages.c:431 msgid "lynx: Password required!!!" msgstr "" -#: LYMessages.c:428 +#: LYMessages.c:432 msgid "Clear all authorization info for this session?" msgstr "" -#: LYMessages.c:429 +#: LYMessages.c:433 msgid "Authorization info cleared." msgstr "" -#: LYMessages.c:430 +#: LYMessages.c:434 +msgid "Authorization failed. Retry?" +msgstr "" + +#: LYMessages.c:435 msgid "cgi support has been disabled by system administrator." msgstr "" -#: LYMessages.c:433 WWW/Library/Implementation/HTGopher.c:1543 WWW/Library/Implementation/HTTP.c:1688 +#: LYMessages.c:438 msgid "Sorry, no known way of converting %s to %s." msgstr "" -#: LYMessages.c:434 +#: LYMessages.c:439 msgid "Unable to set up connection." msgstr "" -#: LYMessages.c:435 +#: LYMessages.c:440 msgid "Unable to make connection" msgstr "" -#: LYMessages.c:444 +#: LYMessages.c:449 msgid "Mail access is disabled!" msgstr "" -#: LYMessages.c:447 +#: LYMessages.c:452 msgid "Telnet access is disabled!" msgstr "" -#: LYMessages.c:450 +#: LYMessages.c:455 msgid "USENET news access is disabled!" msgstr "" -#: LYMessages.c:451 +#: LYMessages.c:456 msgid "Rlogin access is disabled!" msgstr "" -#: LYMessages.c:452 +#: LYMessages.c:457 msgid "Ftp access is disabled!" msgstr "" -#: LYMessages.c:453 +#: LYMessages.c:458 msgid "There are no references from this document." msgstr "" -#: LYMessages.c:454 +#: LYMessages.c:459 msgid "There are only hidden links from this document." msgstr "" -#: LYMessages.c:456 +#: LYMessages.c:461 msgid "Unable to open command file." msgstr "" #. VMS -#: LYMessages.c:458 +#: LYMessages.c:463 msgid "News Post Cancelled!!!" msgstr "" -#: LYMessages.c:461 +#: LYMessages.c:466 msgid "Post this message? (y/n) " msgstr "" -#: LYMessages.c:462 +#: LYMessages.c:467 msgid "Append '%s'? (y/n) " msgstr "" -#: LYMessages.c:463 +#: LYMessages.c:468 msgid "Posting to newsgroup(s)..." msgstr "" -#: LYMessages.c:465 +#: LYMessages.c:470 msgid "*** You have unread mail. ***" msgstr "" -#: LYMessages.c:467 +#: LYMessages.c:472 msgid "*** You have mail. ***" msgstr "" #. VMS -#: LYMessages.c:469 +#: LYMessages.c:474 msgid "*** You have new mail. ***" msgstr "" -#: LYMessages.c:470 +#: LYMessages.c:475 msgid "Save request cancelled!!!" msgstr "" -#: LYMessages.c:471 +#: LYMessages.c:476 msgid "Mail request cancelled!!!" msgstr "" -#: LYMessages.c:474 src/LYPrint.c:841 +#: LYMessages.c:479 msgid "Please wait..." msgstr "" -#: LYMessages.c:475 +#: LYMessages.c:480 msgid "Mailing file. Please wait..." msgstr "" -#: LYMessages.c:476 +#: LYMessages.c:481 msgid "ERROR - Unable to mail file" msgstr "" -#: LYMessages.c:479 +#: LYMessages.c:484 msgid "Print request cancelled!!!" msgstr "" -#: LYMessages.c:480 +#: LYMessages.c:485 msgid "Press <return> to begin: " msgstr "" -#: LYMessages.c:481 +#: LYMessages.c:486 msgid "Press <return> to finish: " msgstr "" -#: LYMessages.c:486 +#: LYMessages.c:491 msgid "ERROR - Unable to allocate file space!!!" msgstr "" -#: LYMessages.c:487 +#: LYMessages.c:492 msgid "Unable to open tempfile" msgstr "" -#: LYMessages.c:488 +#: LYMessages.c:493 msgid "Unable to open print options file" msgstr "" -#: LYMessages.c:489 +#: LYMessages.c:494 msgid "Printing file. Please wait..." msgstr "" -#: LYMessages.c:490 +#: LYMessages.c:495 msgid "Please enter a valid internet mail address: " msgstr "" -#: LYMessages.c:491 +#: LYMessages.c:496 msgid "ERROR! - printer is misconfigured!" msgstr "" -#: LYMessages.c:492 +#: LYMessages.c:497 +msgid "Image map from POST response not available!" +msgstr "" + +#: LYMessages.c:498 msgid "Misdirected client-side image MAP request!" msgstr "" -#: LYMessages.c:493 +#: LYMessages.c:499 msgid "Client-side image MAP is not accessible!" msgstr "" -#: LYMessages.c:494 +#: LYMessages.c:500 msgid "No client-side image MAPs are available!" msgstr "" -#: LYMessages.c:495 +#: LYMessages.c:501 msgid "Client-side image MAP is not available!" msgstr "" #. !NO_OPTION_MENU -#: LYMessages.c:504 +#: LYMessages.c:510 msgid "That key requires Advanced User mode." msgstr "" -#: LYMessages.c:505 +#: LYMessages.c:511 +msgid "Content-type: %s" +msgstr "" + +#: LYMessages.c:512 msgid "Command: " msgstr "" -#: LYMessages.c:506 +#: LYMessages.c:513 msgid " Version " msgstr "" -#: LYMessages.c:507 +#: LYMessages.c:514 msgid " first." msgstr "" -#: LYMessages.c:508 +#: LYMessages.c:515 msgid ", guessing..." msgstr "" -#: LYMessages.c:509 +#: LYMessages.c:516 msgid "Permissions for " msgstr "" -#: LYMessages.c:510 +#: LYMessages.c:517 msgid "Select " msgstr "" -#: LYMessages.c:511 +#: LYMessages.c:518 msgid "capital letter" msgstr "" -#: LYMessages.c:512 +#: LYMessages.c:519 msgid " of option line," msgstr "" -#: LYMessages.c:513 +#: LYMessages.c:520 msgid " to save," msgstr "" -#: LYMessages.c:514 +#: LYMessages.c:521 msgid " to " msgstr "" -#: LYMessages.c:515 +#: LYMessages.c:522 msgid " or " msgstr "" -#: LYMessages.c:516 +#: LYMessages.c:523 msgid " to return to Lynx." msgstr "" -#: LYMessages.c:517 +#: LYMessages.c:524 msgid "Accept Changes" msgstr "" -#: LYMessages.c:518 +#: LYMessages.c:525 msgid "Reset Changes" msgstr "" -#: LYMessages.c:519 +#: LYMessages.c:526 msgid "Left Arrow cancels changes" msgstr "" -#: LYMessages.c:520 +#: LYMessages.c:527 msgid "Save options to disk" msgstr "" -#: LYMessages.c:521 +#: LYMessages.c:528 msgid "Hit RETURN to accept entered data." msgstr "" -#: LYMessages.c:524 +#: LYMessages.c:531 msgid "Value accepted!" msgstr "" -#: LYMessages.c:529 +#: LYMessages.c:536 msgid "You are not allowed to change which editor to use!" msgstr "" -#: LYMessages.c:530 +#: LYMessages.c:537 msgid "Failed to set DISPLAY variable!" msgstr "" -#: LYMessages.c:531 +#: LYMessages.c:538 msgid "Failed to clear DISPLAY variable!" msgstr "" -#: LYMessages.c:534 +#: LYMessages.c:541 msgid "Terminal does not support color" msgstr "" -#: LYMessages.c:535 +#: LYMessages.c:542 msgid "Your '%s' terminal does not support color." msgstr "" -#: LYMessages.c:536 +#: LYMessages.c:543 msgid "Access to dot files is disabled!" msgstr "" -#: LYMessages.c:541 +#: LYMessages.c:548 msgid "Saving Options..." msgstr "" -#: LYMessages.c:542 +#: LYMessages.c:549 msgid "Options saved!" msgstr "" -#: LYMessages.c:543 +#: LYMessages.c:550 msgid "Unable to save Options!" msgstr "" -#: LYMessages.c:544 +#: LYMessages.c:551 msgid " 'r' to return to Lynx " msgstr "" -#: LYMessages.c:545 +#: LYMessages.c:552 msgid " '>' to save, or 'r' to return to Lynx " msgstr "" -#: LYMessages.c:548 +#: LYMessages.c:555 msgid "Error uncompressing temporary file!" msgstr "" -#: LYMessages.c:549 +#: LYMessages.c:556 msgid "Unsupported URL scheme!" msgstr "" -#: LYMessages.c:550 +#: LYMessages.c:557 msgid "Unsupported data: URL! Use SHOWINFO, for now." msgstr "" -#: LYMessages.c:551 +#: LYMessages.c:558 msgid "Illegal redirection URL received from server!" msgstr "" -#: LYMessages.c:554 +#: LYMessages.c:561 msgid "P)roceed, use G)ET or C)ancel " msgstr "" -#: LYMessages.c:555 +#: LYMessages.c:562 msgid "P)roceed, or C)ancel " msgstr "" -#: LYMessages.c:570 +#: LYMessages.c:577 msgid "Proceed (%s)?" msgstr "" -#: LYMessages.c:571 +#: LYMessages.c:578 +msgid "Cannot POST to this host." +msgstr "" + +#: LYMessages.c:579 msgid "Discarding POST data..." msgstr "" -#: LYMessages.c:572 +#: LYMessages.c:580 msgid "Document will not be reloaded!" msgstr "" -#: LYMessages.c:573 +#: LYMessages.c:581 msgid "Location: " msgstr "" -#: LYMessages.c:574 +#: LYMessages.c:582 msgid "'%s' not found!" msgstr "" -#: LYMessages.c:575 +#: LYMessages.c:583 msgid "Default Bookmark File" msgstr "" -#: LYMessages.c:576 +#: LYMessages.c:584 msgid "Screen too small! (8x35 min)" msgstr "" -#: LYMessages.c:577 +#: LYMessages.c:585 msgid "Select destination or ^G to Cancel: " msgstr "" -#: LYMessages.c:582 +#: LYMessages.c:590 msgid "Multiple bookmark support is not available." msgstr "" -#: LYMessages.c:583 +#: LYMessages.c:591 msgid " Select Bookmark (screen %d of %d)" msgstr "" -#: LYMessages.c:584 +#: LYMessages.c:592 msgid " Select Bookmark" msgstr "" -#: LYMessages.c:589 +#: LYMessages.c:597 msgid "Letter: " msgstr "" -#: LYMessages.c:594 +#: LYMessages.c:602 msgid "Use a filepath off your home directory!" msgstr "" #. VMS -#: LYMessages.c:600 +#: LYMessages.c:608 msgid "No previously visited links available!" msgstr "" -#: LYMessages.c:601 +#: LYMessages.c:609 msgid "Memory exhausted! Program aborted!" msgstr "" -#: LYMessages.c:602 +#: LYMessages.c:610 msgid "Memory exhausted! Aborting..." msgstr "" -#: LYMessages.c:603 +#: LYMessages.c:611 msgid "Directory/File Manager not available" msgstr "" -#: LYMessages.c:604 +#: LYMessages.c:612 msgid "HREF in BASE tag is not an absolute URL." msgstr "" -#: LYMessages.c:605 +#: LYMessages.c:613 msgid "Location URL is not absolute." msgstr "" -#: LYMessages.c:606 +#: LYMessages.c:614 msgid "Refresh URL is not absolute." msgstr "" -#: LYMessages.c:609 +#: LYMessages.c:617 msgid "" "You are sending a comment to:\n" " " msgstr "" -#: LYMessages.c:610 +#: LYMessages.c:618 msgid "" "\n" " With copy to:\n" " " msgstr "" -#: LYMessages.c:611 +#: LYMessages.c:619 msgid "" "\n" " With copies to:\n" " " msgstr "" -#: LYMessages.c:620 +#: LYMessages.c:628 msgid "" "\n" " Please enter a subject line.\n" msgstr "" -#: LYMessages.c:623 +#: LYMessages.c:631 msgid " (Leave blank if you don't want a copy.)\n" msgstr "" -#: LYMessages.c:624 +#: LYMessages.c:632 msgid "" "\n" " Please review the message body:\n" "\n" msgstr "" -#: LYMessages.c:625 +#: LYMessages.c:633 msgid "" "\n" "Press RETURN to continue: " msgstr "" -#: LYMessages.c:626 +#: LYMessages.c:634 msgid "" "\n" "Press RETURN to clean up: " msgstr "" -#: LYMessages.c:627 +#: LYMessages.c:635 msgid " Use Control-U to erase the default.\n" msgstr "" -#: LYMessages.c:628 +#: LYMessages.c:636 msgid "" "\n" " Please enter your message below." msgstr "" #. Cookies messages -#: LYMessages.c:639 +#: LYMessages.c:647 msgid "Allowing this cookie." msgstr "" -#: LYMessages.c:640 +#: LYMessages.c:648 msgid "Rejecting this cookie." msgstr "" -#: LYMessages.c:641 +#: LYMessages.c:649 msgid "The Cookie Jar is empty." msgstr "" -#: LYMessages.c:644 +#: LYMessages.c:652 msgid "or to change a domain's 'allow' setting." msgstr "" -#: LYMessages.c:645 +#: LYMessages.c:653 msgid "(Cookies never allowed.)" msgstr "" -#: LYMessages.c:646 +#: LYMessages.c:654 msgid "(Cookies always allowed.)" msgstr "" -#: LYMessages.c:647 +#: LYMessages.c:655 msgid "(Cookies allowed via prompt.)" msgstr "" -#: LYMessages.c:648 +#: LYMessages.c:656 msgid "(Persistent Cookies.)" msgstr "" -#: LYMessages.c:649 +#: LYMessages.c:657 msgid "(No name.)" msgstr "" -#: LYMessages.c:650 +#: LYMessages.c:658 msgid "(No value.)" msgstr "" -#: LYMessages.c:651 +#: LYMessages.c:659 msgid "(End of session.)" msgstr "" -#: LYMessages.c:652 +#: LYMessages.c:660 msgid "Delete this cookie?" msgstr "" -#: LYMessages.c:653 +#: LYMessages.c:661 msgid "The cookie has been eaten!" msgstr "" -#: LYMessages.c:654 +#: LYMessages.c:662 msgid "Delete this empty domain?" msgstr "" -#: LYMessages.c:655 +#: LYMessages.c:663 msgid "The domain has been eaten!" msgstr "" -#: LYMessages.c:660 +#: LYMessages.c:668 msgid "All cookies in the domain have been eaten!" msgstr "" -#: LYMessages.c:661 +#: LYMessages.c:669 msgid "'A'lways allowing from domain '%s'." msgstr "" -#: LYMessages.c:662 +#: LYMessages.c:670 msgid "ne'V'er allowing from domain '%s'." msgstr "" -#: LYMessages.c:663 +#: LYMessages.c:671 msgid "'P'rompting to allow from domain '%s'." msgstr "" -#: LYMessages.c:664 +#: LYMessages.c:672 msgid "Delete all cookies in this domain?" msgstr "" -#: LYMessages.c:665 +#: LYMessages.c:673 msgid "All of the cookies in the jar have been eaten!" msgstr "" -#: LYMessages.c:667 +#: LYMessages.c:675 msgid "Port 19 not permitted in URLs." msgstr "" -#: LYMessages.c:668 +#: LYMessages.c:676 msgid "Port 25 not permitted in URLs." msgstr "" -#: LYMessages.c:669 +#: LYMessages.c:677 msgid "Port %lu not permitted in URLs." msgstr "" -#: LYMessages.c:670 +#: LYMessages.c:678 msgid "URL has a bad port field." msgstr "" -#: LYMessages.c:671 +#: LYMessages.c:679 msgid "Maximum nesting of HTML elements exceeded." msgstr "" -#: LYMessages.c:672 +#: LYMessages.c:680 msgid "Bad partial reference! Stripping lead dots." msgstr "" -#: LYMessages.c:673 +#: LYMessages.c:681 msgid "Trace Log open failed. Trace off!." msgstr "" -#: LYMessages.c:674 +#: LYMessages.c:682 msgid "Lynx Trace Log" msgstr "" -#: LYMessages.c:675 +#: LYMessages.c:683 msgid "No trace log has been started for this session." msgstr "" #. Lynx internal page titles -#: LYMessages.c:684 +#: LYMessages.c:692 msgid "Configuration Definitions" msgstr "" -#: LYMessages.c:685 +#: LYMessages.c:693 msgid "Cookie Jar" msgstr "" -#: LYMessages.c:686 +#: LYMessages.c:694 msgid "Current Key Map" msgstr "" -#. -#. * File Management Options -#. -#: LYMessages.c:687 src/LYOptions.c:4157 +#: LYMessages.c:695 msgid "File Management Options" msgstr "" -#: LYMessages.c:688 +#: LYMessages.c:696 msgid "Download Options" msgstr "" -#: LYMessages.c:689 +#: LYMessages.c:697 msgid "History Page" msgstr "" -#: LYMessages.c:690 +#: LYMessages.c:698 msgid "List Page" msgstr "" -#: LYMessages.c:691 +#: LYMessages.c:699 msgid "Lynx.cfg Information" msgstr "" -#: LYMessages.c:692 +#: LYMessages.c:700 msgid "Options Menu" msgstr "" -#: LYMessages.c:693 +#: LYMessages.c:701 msgid "File Permission Options" msgstr "" -#: LYMessages.c:694 +#: LYMessages.c:702 msgid "Printing Options" msgstr "" -#: LYMessages.c:695 +#: LYMessages.c:703 msgid "Information about the current document" msgstr "" -#: LYMessages.c:696 +#: LYMessages.c:704 msgid "Upload Options" msgstr "" -#: LYMessages.c:697 +#: LYMessages.c:705 msgid "Visited Links Page" msgstr "" -#: LYMessages.c:698 +#: LYMessages.c:706 msgid "Bookmark file" msgstr "" -#: LYMessages.c:699 +#: LYMessages.c:707 msgid "Converted Mosaic Hotlist" msgstr "" #. CONFIG_DEF_TITLE subtitles -#: LYMessages.c:702 +#: LYMessages.c:710 msgid "See also" msgstr "" -#: LYMessages.c:703 +#: LYMessages.c:711 msgid "your" msgstr "" -#: LYMessages.c:704 +#: LYMessages.c:712 msgid "for runtime options" msgstr "" -#: LYMessages.c:705 +#: LYMessages.c:713 msgid "compile time options" msgstr "" -#: LYMessages.c:706 +#: LYMessages.c:714 msgid "latest release" msgstr "" -#: LYMessages.c:707 +#: LYMessages.c:715 msgid "development version" msgstr "" -#: LYMessages.c:719 +#: LYMessages.c:727 msgid "Failed to obtain status of current link!" msgstr "" -#: LYMessages.c:726 +#. DIRED_SUPPORT +#: LYMessages.c:734 msgid "External support is currently disabled." msgstr "" @@ -1459,10 +1487,6 @@ msgstr "" msgid "Invalid header '%s%s%s%s%s'" msgstr "" -#: WWW/Library/Implementation/HTAABrow.c:1171 WWW/Library/Implementation/HTAABrow.c:1230 -msgid "Authorization failed. Retry?" -msgstr "" - #: WWW/Library/Implementation/HTAABrow.c:1204 msgid "Proxy authorization required -- retrying" msgstr "" @@ -1471,10 +1495,6 @@ msgstr "" msgid "Access without authorization denied -- retrying" msgstr "" -#: WWW/Library/Implementation/HTAAProt.c:336 -msgid "Mask group syntax error" -msgstr "" - #: WWW/Library/Implementation/HTAccess.c:599 msgid "Access forbidden by rule" msgstr "" @@ -1511,13 +1531,6 @@ msgstr "" msgid "Enter password for user %s@%s:" msgstr "" -#. -#. ** Interrupt cleanly. -#. -#: WWW/Library/Implementation/HTFTP.c:704 WWW/Library/Implementation/HTFTP.c:736 WWW/Library/Implementation/HTFTP.c:774 WWW/Library/Implementation/HTFTP.c:838 WWW/Library/Implementation/HTFTP.c:852 WWW/Library/Implementation/HTFTP.c:2597 WWW/Library/Implementation/HTFinger.c:186 WWW/Library/Implementation/HTFinger.c:388 WWW/Library/Implementation/HTGopher.c:1243 WWW/Library/Implementation/HTGopher.c:1495 WWW/Library/Implementation/HTGopher.c:1527 WWW/Library/Implementation/HTGopher.c:1856 WWW/Library/Implementation/HTNews.c:361 WWW/Library/Implementation/HTNews.c:445 WWW/Library/Implementation/HTNews.c:2338 WWW/Library/Implementation/HTNews.c:2386 WWW/Library/Implementation/HTNews.c:2476 WWW/Library/Implementation/HTNews.c:2491 WWW/Library/Implementation/HTNews.c:2499 WWW/Library/Implementation/HTNews.c:2633 WWW/Library/Implementation/HTTP.c:176 WWW/Library/Implementation/HTTP.c:658 WWW/Library/Implementation/HTTP.c:1096 WWW/Library/Implementation/HTWAIS.c:167 -msgid "Connection interrupted." -msgstr "" - #: WWW/Library/Implementation/HTFTP.c:707 msgid "Unable to connect to FTP host." msgstr "" @@ -1538,10 +1551,6 @@ msgstr "" msgid "Transferred %d bytes" msgstr "" -#: WWW/Library/Implementation/HTFTP.c:2534 WWW/Library/Implementation/HTFTP.c:3234 WWW/Library/Implementation/HTFormat.c:564 WWW/Library/Implementation/HTFormat.c:579 WWW/Library/Implementation/HTFormat.c:683 WWW/Library/Implementation/HTFormat.c:750 WWW/Library/Implementation/HTWAIS.c:952 WWW/Library/Implementation/HTWAIS.c:996 -msgid "Data transfer interrupted." -msgstr "" - #: WWW/Library/Implementation/HTFTP.c:2651 msgid "connect for data" msgstr "" @@ -1550,19 +1559,6 @@ msgstr "" msgid "Receiving FTP file." msgstr "" -#: WWW/Library/Implementation/HTFWriter.c:241 WWW/Library/Implementation/HTFWriter.c:316 -msgid "Can't save data to file -- please run WWW locally" -msgstr "" - -#. Save Panel -#: WWW/Library/Implementation/HTFWriter.c:336 -msgid "Give name of file to save in" -msgstr "" - -#: WWW/Library/Implementation/HTFWriter.c:342 -msgid "Can't open local file to write into." -msgstr "" - #: WWW/Library/Implementation/HTFile.c:1251 WWW/Library/Implementation/HTFile.c:1261 WWW/Library/Implementation/HTFile.c:1266 msgid "Welcome" msgstr "" @@ -1579,40 +1575,40 @@ msgstr "" msgid "Up to " msgstr "" -#: WWW/Library/Implementation/HTFile.c:1508 WWW/Library/Implementation/HTFile.c:1894 +#: WWW/Library/Implementation/HTFile.c:1508 WWW/Library/Implementation/HTFile.c:1895 msgid "Directory browsing is not allowed." msgstr "" -#: WWW/Library/Implementation/HTFile.c:1524 WWW/Library/Implementation/HTFile.c:1911 +#: WWW/Library/Implementation/HTFile.c:1524 WWW/Library/Implementation/HTFile.c:1912 msgid "Selective access is not enabled for this directory" msgstr "" -#: WWW/Library/Implementation/HTFile.c:1683 WWW/Library/Implementation/HTFile.c:2331 +#: WWW/Library/Implementation/HTFile.c:1684 WWW/Library/Implementation/HTFile.c:2338 msgid "Could not open file for decompression!" msgstr "" -#: WWW/Library/Implementation/HTFile.c:1748 +#: WWW/Library/Implementation/HTFile.c:1749 msgid "Multiformat: directory scan failed." msgstr "" #. List formats? -#: WWW/Library/Implementation/HTFile.c:1838 +#: WWW/Library/Implementation/HTFile.c:1839 msgid "Could not find suitable representation for transmission." msgstr "" -#: WWW/Library/Implementation/HTFile.c:1920 +#: WWW/Library/Implementation/HTFile.c:1921 msgid "This directory is not readable." msgstr "" -#: WWW/Library/Implementation/HTFile.c:2127 WWW/Library/Implementation/HTFile.c:2149 +#: WWW/Library/Implementation/HTFile.c:2128 WWW/Library/Implementation/HTFile.c:2150 msgid "Subdirectories:" msgstr "" -#: WWW/Library/Implementation/HTFile.c:2128 WWW/Library/Implementation/HTFile.c:2150 +#: WWW/Library/Implementation/HTFile.c:2129 WWW/Library/Implementation/HTFile.c:2151 msgid "Files:" msgstr "" -#: WWW/Library/Implementation/HTFile.c:2380 +#: WWW/Library/Implementation/HTFile.c:2387 msgid "Can't access requested file." msgstr "" @@ -1733,10 +1729,6 @@ msgstr "" msgid "Gopher request sent; waiting for response." msgstr "" -#: WWW/Library/Implementation/HTMIME.c:2115 -msgid "%s: cannot open %s\n" -msgstr "" - #: WWW/Library/Implementation/HTNews.c:350 msgid "Username for news host '%s':" msgstr "" @@ -1815,10 +1807,6 @@ msgstr "" msgid "This client does not contain support for posting to news with SSL." msgstr "" -#: WWW/Library/Implementation/HTNews.c:2042 -msgid "Invalid URL!" -msgstr "" - #: WWW/Library/Implementation/HTNews.c:2119 msgid "This client does not contain support for SNEWS URLs." msgstr "" @@ -1839,14 +1827,6 @@ msgstr "" msgid "Can't read news info. News host %.20s responded: %.200s" msgstr "" -#: WWW/Library/Implementation/HTNews.c:2415 WWW/Library/Implementation/HTNews.c:2436 WWW/Library/Implementation/HTNews.c:2588 -msgid "Cannot POST to this host." -msgstr "" - -#: WWW/Library/Implementation/HTNews.c:2454 -msgid "Cancelled!" -msgstr "" - #. #. ** List available newsgroups. - FM #. @@ -1865,11 +1845,11 @@ msgstr "" msgid "Reading news article." msgstr "" -#: WWW/Library/Implementation/HTRules.c:333 +#: WWW/Library/Implementation/HTRules.c:322 msgid "HTRule: Insufficient operands: %s\n" msgstr "" -#: WWW/Library/Implementation/HTRules.c:371 +#: WWW/Library/Implementation/HTRules.c:360 msgid "HTRule: Bad rule `%s'\n" msgstr "" @@ -1887,44 +1867,39 @@ msgstr "" msgid "\t\tTab kind=%d at %.0f\n" msgstr "" -#: WWW/Library/Implementation/HTTCP.c:859 +#: WWW/Library/Implementation/HTTCP.c:849 msgid "Looking up %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:864 +#: WWW/Library/Implementation/HTTCP.c:854 msgid "Unable to locate remote host %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:873 +#: WWW/Library/Implementation/HTTCP.c:863 msgid "Making %s connection to %s." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:882 +#: WWW/Library/Implementation/HTTCP.c:872 msgid "socket failed." msgstr "" -#. USE_FCNTL -#: WWW/Library/Implementation/HTTCP.c:902 +#: WWW/Library/Implementation/HTTCP.c:892 msgid "Could not make connection non-blocking." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:956 +#: WWW/Library/Implementation/HTTCP.c:946 msgid "Connection failed for 180,000 tries." msgstr "" #. USE_FCNTL -#: WWW/Library/Implementation/HTTCP.c:1091 +#: WWW/Library/Implementation/HTTCP.c:1081 msgid "Could not restore socket to blocking." msgstr "" -#: WWW/Library/Implementation/HTTCP.c:1134 +#: WWW/Library/Implementation/HTTCP.c:1124 msgid "Socket read failed for 180,000 tries." msgstr "" -#: WWW/Library/Implementation/HTTP.c:133 WWW/Library/Implementation/HTTP.c:138 -msgid "Bad request." -msgstr "" - #: WWW/Library/Implementation/HTTP.c:166 msgid "This client does not contain support for HTTPS URLs." msgstr "" @@ -2208,83 +2183,83 @@ msgstr "" msgid "Host" msgstr "" -#: src/GridText.c:334 +#: src/GridText.c:349 msgid "Memory exhausted, display interrupted!" msgstr "" -#: src/GridText.c:339 +#: src/GridText.c:354 msgid "Memory exhausted, will interrupt transfer!" msgstr "" -#: src/GridText.c:2134 +#: src/GridText.c:2202 msgid " *** MEMORY EXHAUSTED ***" msgstr "" -#: src/GridText.c:3509 src/GridText.c:3516 src/LYList.c:246 +#: src/GridText.c:3685 src/GridText.c:3692 src/LYList.c:246 msgid "unknown field or link" msgstr "" -#: src/GridText.c:3525 +#: src/GridText.c:3701 msgid "text entry field" msgstr "" -#: src/GridText.c:3528 +#: src/GridText.c:3704 msgid "password entry field" msgstr "" -#: src/GridText.c:3531 +#: src/GridText.c:3707 msgid "checkbox" msgstr "" -#: src/GridText.c:3534 +#: src/GridText.c:3710 msgid "radio button" msgstr "" -#: src/GridText.c:3537 +#: src/GridText.c:3713 msgid "submit button" msgstr "" -#: src/GridText.c:3540 +#: src/GridText.c:3716 msgid "reset button" msgstr "" -#: src/GridText.c:3543 +#: src/GridText.c:3719 msgid "popup menu" msgstr "" -#: src/GridText.c:3546 +#: src/GridText.c:3722 msgid "hidden form field" msgstr "" -#: src/GridText.c:3549 +#: src/GridText.c:3725 msgid "text entry area" msgstr "" -#: src/GridText.c:3552 +#: src/GridText.c:3728 msgid "range entry field" msgstr "" -#: src/GridText.c:3555 +#: src/GridText.c:3731 msgid "file entry field" msgstr "" -#: src/GridText.c:3558 +#: src/GridText.c:3734 msgid "text-submit field" msgstr "" -#: src/GridText.c:3561 +#: src/GridText.c:3737 msgid "image-submit button" msgstr "" -#: src/GridText.c:3564 +#: src/GridText.c:3740 msgid "keygen field" msgstr "" -#: src/GridText.c:3567 +#: src/GridText.c:3743 msgid "unknown form field" msgstr "" -#: src/GridText.c:7842 +#: src/GridText.c:8028 msgid "Submitting %s" msgstr "" @@ -2317,17 +2292,6 @@ msgstr "" msgid "%s (y/n) " msgstr "" -#. -#. * Any "application/foo" or other non-"text/foo" types that -#. * are actually text but not checked, above, will be treated -#. * as binary, so show the type to help sort that out later. -#. * Unix folks don't need to know this, but we'll show it to -#. * them, too. - FM -#. -#: src/HTFWriter.c:711 -msgid "Content-type: %s" -msgstr "" - #: src/HTML.c:5500 msgid "Description:" msgstr "" @@ -2353,10 +2317,7 @@ msgid "" " This file is an HTML representation of the X Mosaic hotlist file.\n" " Outdated or invalid links may be removed by using the\n" " remove bookmark command, it is usually the 'R' key but may have\n" -" been remapped by you or your system administrator.\n" -"\n" -"<p>\n" -"<ol>\n" +" been remapped by you or your system administrator." msgstr "" #: src/LYBookmark.c:332 @@ -2399,18 +2360,18 @@ msgid "this link" msgstr "" #: src/LYCgi.c:609 -msgid "<p>It provides <b>state of the art</b> CGI script support.\n" +msgid "It provides state of the art CGI script support.\n" msgstr "" #: src/LYClean.c:109 msgid "Exiting via interrupt:" msgstr "" -#: src/LYCookie.c:2046 +#: src/LYCookie.c:2034 msgid "(From Cookie Jar)" msgstr "" -#: src/LYCookie.c:2500 +#: src/LYCookie.c:2491 msgid "Maximum Gobble Date:" msgstr "" @@ -2418,33 +2379,33 @@ msgstr "" msgid "Terminal initialisation failed - unknown terminal type?" msgstr "" -#: src/LYCurses.c:977 +#: src/LYCurses.c:990 msgid "Terminal =" msgstr "" -#: src/LYCurses.c:982 +#: src/LYCurses.c:995 msgid "You must use a vt100, 200, etc. terminal with this program." msgstr "" -#: src/LYCurses.c:1060 +#: src/LYCurses.c:1073 msgid "Your Terminal type is unknown!" msgstr "" -#: src/LYCurses.c:1061 +#: src/LYCurses.c:1074 msgid "Enter a terminal type:" msgstr "" -#: src/LYCurses.c:1072 +#: src/LYCurses.c:1085 msgid "TERMINAL TYPE IS SET TO" msgstr "" -#: src/LYCurses.c:1303 +#: src/LYCurses.c:1316 msgid "" "\n" "A Fatal error has occurred in %s Ver. %s\n" msgstr "" -#: src/LYCurses.c:1305 +#: src/LYCurses.c:1318 msgid "" "\n" "Please notify your system administrator to confirm a bug, and if\n" @@ -2474,7 +2435,7 @@ msgstr "" msgid "Save to disk disabled." msgstr "" -#: src/LYDownload.c:638 src/LYPrint.c:1352 +#: src/LYDownload.c:638 src/LYPrint.c:1354 msgid "Local additions:" msgstr "" @@ -2495,10 +2456,6 @@ msgid "(no title)" msgstr "" #: src/LYHistory.c:388 -msgid "<em>%s</em>\n" -msgstr "" - -#: src/LYHistory.c:388 msgid "You selected:" msgstr "" @@ -2586,15 +2543,15 @@ msgstr "" msgid "Visible links" msgstr "" -#: src/LYLocal.c:245 src/LYLocal.c:259 +#: src/LYLocal.c:244 src/LYLocal.c:258 msgid "Unable to get status of '%s'." msgstr "" -#: src/LYLocal.c:273 src/LYLocal.c:548 +#: src/LYLocal.c:273 src/LYLocal.c:552 msgid "The selected item is not a file or a directory! Request ignored." msgstr "" -#: src/LYLocal.c:311 +#: src/LYLocal.c:312 msgid "Remove all tagged files and directories (y or n): " msgstr "" @@ -2602,259 +2559,244 @@ msgstr "" msgid "remove %s" msgstr "" -#: src/LYLocal.c:375 +#: src/LYLocal.c:378 msgid "Enter new location for tagged items: " msgstr "" -#: src/LYLocal.c:437 +#: src/LYLocal.c:440 msgid "Path too long" msgstr "" -#: src/LYLocal.c:468 +#: src/LYLocal.c:471 msgid "Source and destination are the same location - request ignored!" msgstr "" -#: src/LYLocal.c:490 src/LYLocal.c:575 src/LYLocal.c:683 +#: src/LYLocal.c:492 src/LYLocal.c:582 src/LYLocal.c:692 msgid "move %s to %s" msgstr "" -#: src/LYLocal.c:507 src/LYLocal.c:692 +#: src/LYLocal.c:511 src/LYLocal.c:701 msgid "Destination has different owner! Request denied." msgstr "" -#: src/LYLocal.c:513 src/LYLocal.c:671 +#: src/LYLocal.c:517 src/LYLocal.c:678 msgid "Destination is not a valid directory! Request denied." msgstr "" -#: src/LYLocal.c:544 +#: src/LYLocal.c:548 msgid "Enter new name for directory: " msgstr "" -#: src/LYLocal.c:546 +#: src/LYLocal.c:550 msgid "Enter new name for file: " msgstr "" -#: src/LYLocal.c:558 src/LYUpload.c:109 +#: src/LYLocal.c:562 src/LYUpload.c:109 msgid "Illegal character \"/\" found! Request ignored." msgstr "" -#: src/LYLocal.c:572 src/LYLocal.c:808 src/LYLocal.c:865 src/LYLocal.c:963 +#: src/LYLocal.c:577 src/LYLocal.c:819 src/LYLocal.c:879 src/LYLocal.c:979 msgid "Unable to determine status of '%s'." msgstr "" -#: src/LYLocal.c:585 src/LYLocal.c:820 src/LYLocal.c:877 +#: src/LYLocal.c:592 src/LYLocal.c:832 src/LYLocal.c:892 msgid "There is already a directory with that name! Request ignored." msgstr "" -#: src/LYLocal.c:587 src/LYLocal.c:822 src/LYLocal.c:879 +#: src/LYLocal.c:594 src/LYLocal.c:834 src/LYLocal.c:894 msgid "There is already a file with that name! Request ignored." msgstr "" -#: src/LYLocal.c:589 src/LYLocal.c:824 src/LYLocal.c:881 +#: src/LYLocal.c:596 src/LYLocal.c:836 src/LYLocal.c:896 msgid "The specified name is already in use! Request ignored." msgstr "" -#: src/LYLocal.c:626 +#: src/LYLocal.c:633 msgid "Enter new location for directory: " msgstr "" -#: src/LYLocal.c:628 +#: src/LYLocal.c:635 msgid "Enter new location for file: " msgstr "" -#: src/LYLocal.c:630 +#: src/LYLocal.c:637 msgid "The specified item is not a file or a directory - request ignored." msgstr "" -#: src/LYLocal.c:653 +#: src/LYLocal.c:660 msgid "Unexpected failure - unable to find trailing \"/\"" msgstr "" -#. -#. * Make sure the source and target are not the same location. -#. -#: src/LYLocal.c:679 +#: src/LYLocal.c:686 msgid "Source and destination are the same location! Request ignored!" msgstr "" -#: src/LYLocal.c:736 +#: src/LYLocal.c:745 msgid "Modify name, location, or permission (n, l, or p): " msgstr "" -#: src/LYLocal.c:738 +#: src/LYLocal.c:747 msgid "Modify name, or location (n or l): " msgstr "" #. #. * Code for changing ownership needed here. #. -#: src/LYLocal.c:764 +#: src/LYLocal.c:773 msgid "This feature not yet implemented!" msgstr "" -#: src/LYLocal.c:782 +#: src/LYLocal.c:791 msgid "Enter name of file to create: " msgstr "" -#: src/LYLocal.c:792 src/LYLocal.c:852 +#: src/LYLocal.c:801 src/LYLocal.c:864 msgid "Illegal redirection \"//\" found! Request ignored." msgstr "" -#: src/LYLocal.c:812 +#: src/LYLocal.c:823 msgid "create %s" msgstr "" -#: src/LYLocal.c:842 +#: src/LYLocal.c:854 msgid "Enter name for new directory: " msgstr "" -#: src/LYLocal.c:897 +#: src/LYLocal.c:912 msgid "Create file or directory (f or d): " msgstr "" -#: src/LYLocal.c:943 +#: src/LYLocal.c:959 msgid "Remove '%s' and all of its contents (y or n): " msgstr "" -#: src/LYLocal.c:946 +#: src/LYLocal.c:962 msgid "Remove directory and all of its contents (y or n): " msgstr "" -#: src/LYLocal.c:950 +#: src/LYLocal.c:966 msgid "Remove file '%s' (y or n): " msgstr "" -#: src/LYLocal.c:952 +#: src/LYLocal.c:968 msgid "Remove file (y or n): " msgstr "" -#: src/LYLocal.c:957 +#: src/LYLocal.c:973 msgid "Remove symbolic link '%s' (y or n): " msgstr "" -#: src/LYLocal.c:959 +#: src/LYLocal.c:975 msgid "Remove symbolic link (y or n): " msgstr "" -#: src/LYLocal.c:1054 +#: src/LYLocal.c:1070 msgid "Sorry, don't know how to permit non-UNIX files yet." msgstr "" -#: src/LYLocal.c:1088 +#: src/LYLocal.c:1103 msgid "Unable to open permit options file" msgstr "" -#: src/LYLocal.c:1111 -msgid "<H1>%s%s</H1>\n" -msgstr "" - -#: src/LYLocal.c:1121 +#: src/LYLocal.c:1130 msgid "Specify permissions below:" msgstr "" -#: src/LYLocal.c:1122 src/LYShowInfo.c:224 +#: src/LYLocal.c:1131 src/LYShowInfo.c:225 msgid "Owner:" msgstr "" -#: src/LYLocal.c:1138 +#: src/LYLocal.c:1147 msgid "Group" msgstr "" -#: src/LYLocal.c:1154 +#: src/LYLocal.c:1163 msgid "Others:" msgstr "" -#: src/LYLocal.c:1171 -msgid "" -"<Br>\n" -"<Li><Input Type=\"submit\" Value=\"Submit\"> %s %s %s.\n" -"</Ol>\n" -"</Form>\n" -msgstr "" - -#: src/LYLocal.c:1172 +#: src/LYLocal.c:1181 msgid "form to permit" msgstr "" -#: src/LYLocal.c:1270 +#: src/LYLocal.c:1279 msgid "Invalid mode format." msgstr "" -#: src/LYLocal.c:1274 +#: src/LYLocal.c:1283 msgid "Invalid syntax format." msgstr "" -#: src/LYLocal.c:1375 +#: src/LYLocal.c:1389 msgid "NULL URL pointer" msgstr "" -#: src/LYLocal.c:1457 +#: src/LYLocal.c:1470 msgid "Warning! UUDecoded file will exist in the directory you started Lynx." msgstr "" -#: src/LYLocal.c:1564 +#: src/LYLocal.c:1577 msgid "Executing %s " msgstr "" -#: src/LYLocal.c:1567 +#: src/LYLocal.c:1580 msgid "Executing system command. This might take a while." msgstr "" -#: src/LYLocal.c:1609 +#: src/LYLocal.c:1623 msgid "Unable to open file management menu file." msgstr "" -#: src/LYLocal.c:1642 +#: src/LYLocal.c:1656 msgid "Current directory:" msgstr "" -#: src/LYLocal.c:1645 src/LYLocal.c:1663 +#: src/LYLocal.c:1659 src/LYLocal.c:1677 msgid "Current selection:" msgstr "" -#: src/LYLocal.c:1649 +#: src/LYLocal.c:1663 msgid "Nothing currently selected." msgstr "" -#: src/LYLocal.c:1664 +#: src/LYLocal.c:1678 msgid "tagged item:" msgstr "" -#: src/LYLocal.c:1664 +#: src/LYLocal.c:1678 msgid "tagged items:" msgstr "" -#: src/LYLocal.c:1761 src/LYLocal.c:1772 +#: src/LYLocal.c:1775 src/LYLocal.c:1786 msgid "Illegal filename; request ignored." msgstr "" -#: src/LYLocal.c:1814 +#: src/LYLocal.c:1828 msgid "The selected item is not a directory! Request ignored." msgstr "" #. directory not writable -#: src/LYLocal.c:1817 +#: src/LYLocal.c:1831 msgid "Install in the selected directory not permitted." msgstr "" -#: src/LYLocal.c:1821 +#: src/LYLocal.c:1835 msgid "Just a moment, ..." msgstr "" -#: src/LYLocal.c:1850 +#: src/LYLocal.c:1865 msgid "Installation complete" msgstr "" -#: src/LYLocal.c:2018 +#: src/LYLocal.c:2033 msgid "Temporary URL or list would be too long." msgstr "" -#: src/LYLocal.c:2061 +#: src/LYLocal.c:2075 msgid "Unable to %s due to system error!" msgstr "" #. error return -#: src/LYLocal.c:2086 +#: src/LYLocal.c:2100 msgid "Probable failure to %s due to system error!" msgstr "" @@ -2903,78 +2845,75 @@ msgstr "" msgid "No Winsock found, sorry." msgstr "" -#: src/LYMain.c:775 +#: src/LYMain.c:776 msgid "You MUST define a valid TMP or TEMP area!\n" msgstr "" -#. -#. * If the configuration file is not available, -#. * inform the user and exit. -#. -#: src/LYMain.c:1198 +#: src/LYMain.c:1199 msgid "" "\n" "Configuration file %s is not available.\n" "\n" msgstr "" -#: src/LYMain.c:1214 +#. +#. * Make sure we have the character sets declared. +#. * This will initialize the CHARTRANS handling. - KW +#. +#: src/LYMain.c:1215 msgid "" "\n" "Lynx character sets not declared.\n" "\n" msgstr "" -#: src/LYMain.c:1273 +#: src/LYMain.c:1274 msgid "" "\n" "Lynx file %s is not available.\n" "\n" msgstr "" -#. -#. * Make sure we have the edit map declared. - FM -#. -#: src/LYMain.c:1287 +#: src/LYMain.c:1288 msgid "" "\n" "Lynx edit map not declared.\n" "\n" msgstr "" -#: src/LYMain.c:2497 +#: src/LYMain.c:2498 msgid "" "\n" "%s Version %s (%.*s)\n" msgstr "" -#: src/LYMain.c:2504 +#: src/LYMain.c:2505 msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" msgstr "" -#: src/LYMain.c:2506 +#: src/LYMain.c:2507 msgid "Distributed under the GNU General Public License.\n" msgstr "" -#: src/LYMain.c:2508 +#: src/LYMain.c:2509 msgid "" "See http://lynx.browser.org/ and the online help for more information.\n" "\n" msgstr "" -#: src/LYMain.c:3027 +#: src/LYMain.c:3028 msgid "USAGE: %s [options] [file]\n" msgstr "" -#: src/LYMain.c:3028 +#: src/LYMain.c:3029 msgid "Options are:\n" msgstr "" -#: src/LYMain.c:3206 +#: src/LYMain.c:3207 msgid "%s: Invalid Option: %s\n" msgstr "" -#: src/LYMainLoop.c:274 src/LYMainLoop.c:3651 +#: src/LYMainLoop.c:274 src/LYMainLoop.c:3653 msgid "Entry into main screen" msgstr "" @@ -2994,61 +2933,56 @@ msgstr "" msgid " Exiting...\n" msgstr "" -#: src/LYMainLoop.c:1093 src/LYMainLoop.c:1147 src/LYMainLoop.c:1154 src/LYShowInfo.c:340 +#: src/LYMainLoop.c:1095 src/LYMainLoop.c:1149 src/LYMainLoop.c:1156 src/LYShowInfo.c:341 msgid "None" msgstr "" -#: src/LYMainLoop.c:1506 src/LYMainLoop.c:1510 +#: src/LYMainLoop.c:1508 src/LYMainLoop.c:1512 msgid "Fatal error - could not open output file %s\n" msgstr "" -#: src/LYMainLoop.c:2801 +#: src/LYMainLoop.c:2803 msgid "Enctype multipart/form-data not yet supported! Cannot submit." msgstr "" -#: src/LYMainLoop.c:3536 +#. +#. * Make a name for this new URL. +#. +#: src/LYMainLoop.c:3538 msgid "A URL specified by the user" msgstr "" #. #. * Make a name for this help file. #. -#: src/LYMainLoop.c:3562 +#: src/LYMainLoop.c:3564 msgid "Help Screen" msgstr "" -#: src/LYMainLoop.c:3586 +#: src/LYMainLoop.c:3588 msgid "System Index" msgstr "" -#: src/LYMainLoop.c:3616 +#: src/LYMainLoop.c:3618 msgid "'X' can only toggle a form link" msgstr "" -#: src/LYMainLoop.c:3619 +#: src/LYMainLoop.c:3621 msgid "'X' only toggles in forms mode" msgstr "" -#: src/LYMainLoop.c:3633 +#: src/LYMainLoop.c:3635 msgid "'Z' can only toggle a form link" msgstr "" -#: src/LYMainLoop.c:3636 +#: src/LYMainLoop.c:3638 msgid "'Z' only toggles in forms mode" msgstr "" -#: src/LYMainLoop.c:5383 +#: src/LYMainLoop.c:5385 msgid "*** %s Version %s ***" msgstr "" -#: src/LYMap.c:196 -msgid "Out of memory in LYAddImageMap" -msgstr "" - -#: src/LYMap.c:437 src/LYMap.c:474 -msgid "Image map from POST response not available!" -msgstr "" - #. Enable scrolling. #: src/LYNews.c:108 msgid "You will be posting to:" @@ -3114,110 +3048,110 @@ msgstr "" msgid "B)ookmark file: " msgstr "" -#: src/LYOptions.c:3897 +#: src/LYOptions.c:3903 msgid "Personal Preferences" msgstr "" #. Cookies: SELECT -#: src/LYOptions.c:3900 +#: src/LYOptions.c:3906 msgid "Cookies" msgstr "" -#: src/LYOptions.c:3914 +#: src/LYOptions.c:3920 msgid "Editor" msgstr "" #. Emacs keys: ON/OFF -#: src/LYOptions.c:3919 +#: src/LYOptions.c:3925 msgid "Emacs keys" msgstr "" #. Execution links: SELECT -#: src/LYOptions.c:3926 +#: src/LYOptions.c:3932 msgid "Execution links" msgstr "" #. ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS #. Keypad Mode: SELECT -#: src/LYOptions.c:3945 +#: src/LYOptions.c:3951 msgid "Keypad mode" msgstr "" #. Mail Address: INPUT -#: src/LYOptions.c:3973 +#: src/LYOptions.c:3979 msgid "Personal mail address" msgstr "" -#: src/LYOptions.c:3978 +#: src/LYOptions.c:3984 msgid "Popups for select fields" msgstr "" -#: src/LYOptions.c:3984 +#: src/LYOptions.c:3990 msgid "Searching type" msgstr "" -#: src/LYOptions.c:3995 +#: src/LYOptions.c:4001 msgid "Show color" msgstr "" #. Show cursor: ON/OFF -#: src/LYOptions.c:4034 +#: src/LYOptions.c:4040 msgid "Show cursor" msgstr "" #. User Mode: SELECT -#: src/LYOptions.c:4040 +#: src/LYOptions.c:4046 msgid "User mode" msgstr "" #. Verbose Images: ON/OFF -#: src/LYOptions.c:4046 +#: src/LYOptions.c:4052 msgid "Verbose images" msgstr "" #. VI Keys: ON/OFF -#: src/LYOptions.c:4052 +#: src/LYOptions.c:4058 msgid "VI keys" msgstr "" #. X Display: INPUT -#: src/LYOptions.c:4059 +#: src/LYOptions.c:4065 msgid "X Display" msgstr "" -#: src/LYOptions.c:4065 +#: src/LYOptions.c:4071 msgid "Bookmark Options" msgstr "" -#: src/LYOptions.c:4069 +#: src/LYOptions.c:4075 msgid "Multi-bookmarks" msgstr "" -#: src/LYOptions.c:4086 +#: src/LYOptions.c:4092 msgid "Review/edit Bookmarks files" msgstr "" -#: src/LYOptions.c:4088 +#: src/LYOptions.c:4094 msgid "Goto multi-bookmark menu" msgstr "" -#: src/LYOptions.c:4091 +#: src/LYOptions.c:4097 msgid "Bookmarks file" msgstr "" #. #. * Character Set Options #. -#: src/LYOptions.c:4099 +#: src/LYOptions.c:4105 msgid "Character Set Options" msgstr "" -#: src/LYOptions.c:4116 +#: src/LYOptions.c:4122 msgid "Assumed document character set" msgstr "" #. Display Character Set: SELECT -#: src/LYOptions.c:4127 +#: src/LYOptions.c:4133 msgid "Display character set" msgstr "" @@ -3226,45 +3160,45 @@ msgstr "" #. * we split the header to make it more readable: #. * "CJK mode" for CJK display charsets, and "Raw 8-bit" for others. #. -#: src/LYOptions.c:4146 +#: src/LYOptions.c:4152 msgid "CJK mode" msgstr "" -#: src/LYOptions.c:4148 +#: src/LYOptions.c:4154 msgid "Raw 8-bit" msgstr "" #. FTP sort: SELECT -#: src/LYOptions.c:4160 +#: src/LYOptions.c:4166 msgid "FTP sort criteria" msgstr "" #. Local Directory Sort: SELECT -#: src/LYOptions.c:4167 +#: src/LYOptions.c:4173 msgid "Local directory sort criteria" msgstr "" -#: src/LYOptions.c:4175 +#: src/LYOptions.c:4181 msgid "Show dot files" msgstr "" #. #. * Headers transferred to remote server #. -#: src/LYOptions.c:4184 +#: src/LYOptions.c:4190 msgid "Headers transferred to remote server" msgstr "" #. Preferred Document Character Set: INPUT -#: src/LYOptions.c:4187 +#: src/LYOptions.c:4193 msgid "Preferred document character set" msgstr "" -#: src/LYOptions.c:4192 +#: src/LYOptions.c:4198 msgid "Preferred document language" msgstr "" -#: src/LYOptions.c:4198 +#: src/LYOptions.c:4204 msgid "User-Agent header" msgstr "" @@ -3300,35 +3234,31 @@ msgstr "" msgid "Some print functions have been disabled!" msgstr "" -#: src/LYPrint.c:1323 -msgid "options:" +#: src/LYPrint.c:1325 +msgid "Standard print options:" msgstr "" -#: src/LYPrint.c:1324 -msgid "Standard print" +#: src/LYPrint.c:1326 +msgid "Print options:" msgstr "" -#: src/LYPrint.c:1324 -msgid "Print" -msgstr "" - -#: src/LYPrint.c:1330 +#: src/LYPrint.c:1332 msgid "Save to a local file" msgstr "" -#: src/LYPrint.c:1332 +#: src/LYPrint.c:1334 msgid "Save to disk disabled" msgstr "" -#: src/LYPrint.c:1338 +#: src/LYPrint.c:1340 msgid "Mail the file" msgstr "" -#: src/LYPrint.c:1344 +#: src/LYPrint.c:1346 msgid "Print to the screen" msgstr "" -#: src/LYPrint.c:1348 +#: src/LYPrint.c:1350 msgid "Print out on a printer attached to your vt100 terminal" msgstr "" @@ -3388,160 +3318,159 @@ msgstr "" msgid "This is read from your lynx.cfg file:" msgstr "" -#: src/LYShowInfo.c:154 +#: src/LYShowInfo.c:155 msgid "Directory that you are currently viewing" msgstr "" -#: src/LYShowInfo.c:160 +#: src/LYShowInfo.c:161 msgid "Name:" msgstr "" -#: src/LYShowInfo.c:161 +#: src/LYShowInfo.c:162 msgid "URL:" msgstr "" -#: src/LYShowInfo.c:174 +#: src/LYShowInfo.c:175 msgid "Directory that you have currently selected" msgstr "" -#: src/LYShowInfo.c:177 +#: src/LYShowInfo.c:178 msgid "File that you have currently selected" msgstr "" -#: src/LYShowInfo.c:181 +#: src/LYShowInfo.c:182 msgid "Symbolic link that you have currently selected" msgstr "" -#: src/LYShowInfo.c:185 +#: src/LYShowInfo.c:186 msgid "Item that you have currently selected" msgstr "" -#: src/LYShowInfo.c:187 +#: src/LYShowInfo.c:188 msgid "Full name:" msgstr "" -#: src/LYShowInfo.c:196 +#: src/LYShowInfo.c:197 msgid "Unable to follow link" msgstr "" -#: src/LYShowInfo.c:198 +#: src/LYShowInfo.c:199 msgid "Points to file:" msgstr "" -#: src/LYShowInfo.c:203 +#: src/LYShowInfo.c:204 msgid "Name of owner" msgstr "" -#: src/LYShowInfo.c:206 +#: src/LYShowInfo.c:207 msgid "Group name:" msgstr "" -#: src/LYShowInfo.c:209 +#: src/LYShowInfo.c:210 msgid "File size:" msgstr "" -#: src/LYShowInfo.c:215 +#: src/LYShowInfo.c:216 msgid "Creation date:" msgstr "" -#: src/LYShowInfo.c:218 +#: src/LYShowInfo.c:219 msgid "Last modified:" msgstr "" -#: src/LYShowInfo.c:221 +#: src/LYShowInfo.c:222 msgid "Last accessed:" msgstr "" -#: src/LYShowInfo.c:223 +#: src/LYShowInfo.c:224 msgid "Access Permissions" msgstr "" -#. DIRED_SUPPORT -#: src/LYShowInfo.c:288 +#: src/LYShowInfo.c:289 msgid "File that you are currently viewing" msgstr "" -#: src/LYShowInfo.c:293 src/LYShowInfo.c:363 +#: src/LYShowInfo.c:294 src/LYShowInfo.c:364 msgid "Linkname:" msgstr "" -#: src/LYShowInfo.c:303 src/LYShowInfo.c:315 +#: src/LYShowInfo.c:304 src/LYShowInfo.c:316 msgid "Charset:" msgstr "" -#: src/LYShowInfo.c:321 +#: src/LYShowInfo.c:322 msgid "Server:" msgstr "" -#: src/LYShowInfo.c:324 +#: src/LYShowInfo.c:325 msgid "Date:" msgstr "" -#: src/LYShowInfo.c:327 +#: src/LYShowInfo.c:328 msgid "Last Mod:" msgstr "" -#: src/LYShowInfo.c:331 +#: src/LYShowInfo.c:332 msgid "Post Data:" msgstr "" -#: src/LYShowInfo.c:333 +#: src/LYShowInfo.c:334 msgid "Post Content Type:" msgstr "" -#: src/LYShowInfo.c:342 +#: src/LYShowInfo.c:343 msgid "Owner(s):" msgstr "" -#: src/LYShowInfo.c:345 +#: src/LYShowInfo.c:346 msgid "size:" msgstr "" -#: src/LYShowInfo.c:345 +#: src/LYShowInfo.c:346 msgid "lines" msgstr "" -#: src/LYShowInfo.c:348 +#: src/LYShowInfo.c:349 msgid "mode:" msgstr "" -#: src/LYShowInfo.c:350 +#: src/LYShowInfo.c:351 msgid "forms mode" msgstr "" -#: src/LYShowInfo.c:350 +#: src/LYShowInfo.c:351 msgid "normal" msgstr "" -#: src/LYShowInfo.c:351 +#: src/LYShowInfo.c:352 msgid ", safe" msgstr "" -#: src/LYShowInfo.c:352 +#: src/LYShowInfo.c:353 msgid ", internal link" msgstr "" -#: src/LYShowInfo.c:359 +#: src/LYShowInfo.c:360 msgid "Link that you currently have selected" msgstr "" -#: src/LYShowInfo.c:372 +#: src/LYShowInfo.c:373 msgid "Method:" msgstr "" -#: src/LYShowInfo.c:377 +#: src/LYShowInfo.c:378 msgid "Enctype:" msgstr "" -#: src/LYShowInfo.c:389 +#: src/LYShowInfo.c:390 msgid "(Form field)" msgstr "" -#: src/LYShowInfo.c:404 +#: src/LYShowInfo.c:405 msgid "No Links on the current page" msgstr "" -#: src/LYStrings.c:717 +#: src/LYStrings.c:843 msgid "Error processing line %d of %s\n" msgstr "" diff --git a/src/GridText.c b/src/GridText.c index 500210f7..dea8155f 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -61,6 +61,17 @@ void LynxClearScreenCache NOARGS for (j=0;j<CACHEW;j++) cached_styles[i][j]=s_a; } +#endif +#ifdef USE_COLOR_STYLE +PRIVATE void LynxResetScreenCache NOARGS +{ + int i,j; + + for (i=1; (i<CACHEH && i <= display_lines); i++) { + for (j=0;j<CACHEW;j++) + cached_styles[i][j]=0; + } +} #endif /* USE_COLOR_STYLE */ struct _HTStream { /* only know it as object */ @@ -183,6 +194,10 @@ struct _HText { BOOL in_line_1; /* of paragraph */ BOOL stale; /* Must refresh */ BOOL page_has_target; /* has target on screen */ +#ifdef DISP_PARTIAL + int first_lineno_last_disp_partial; + int last_lineno_last_disp_partial; +#endif HTkcode kcode; /* Kanji code? */ enum grid_state { S_text, S_esc, S_dollar, S_paren, @@ -539,6 +554,15 @@ PUBLIC HText * HText_new ARGS1( */ if (display_partial) NumOfLines_partial = 0; /* enable HTDisplayPartial() */ + + /* + * These two fields should only be set to valid line numbers + * by calls of display_page during partial displaying. This + * is just so that the FIRST display_page AFTER that can avoid + * repainting the same lines on the screen. - kw + */ + self->first_lineno_last_disp_partial = + self->last_lineno_last_disp_partial = -1; #endif CTRACE(tfp, "GridText: start HText_new\n"); @@ -589,7 +613,7 @@ PUBLIC void HText_free ARGS1( } } if (l == self->last_line) { /* empty */ - l = NULL; + l = self->last_line = NULL; break; } }; @@ -1053,6 +1077,9 @@ PRIVATE void display_page ARGS3( HTAnchor *link_dest_intl = NULL; static int last_nlinks = 0; static int charset_last_displayed = -1; +#ifdef DISP_PARTIAL + int last_disp_partial = -1; +#endif lynx_mode = NORMAL_LYNX_MODE; @@ -1073,6 +1100,14 @@ PRIVATE void display_page ARGS3( return; } +#ifdef DISP_PARTIAL + if (display_partial || recent_sizechange || text->stale) { + /* Reset them, will be set near end if all is okay. - kw */ + text->first_lineno_last_disp_partial = + text->last_lineno_last_disp_partial = -1; + } +#endif /* DISP_PARTIAL */ + tmp[0] = tmp[1] = tmp[2] = '\0'; text->page_has_target = NO; last_screen = text->Lines - (display_lines - 2); @@ -1143,6 +1178,10 @@ PRIVATE void display_page ARGS3( clear(); } +#ifdef USE_COLOR_STYLE + LynxResetScreenCache(); +#endif + text->top_of_screen = line_number; display_title(text); /* will move cursor to top of screen */ display_flag=TRUE; @@ -1176,6 +1215,14 @@ PRIVATE void display_page ARGS3( #else assert(line != NULL); #endif /* !VMS */ + +#ifdef DISP_PARTIAL + if (!display_partial && + line_number == text->first_lineno_last_disp_partial && + i + line_number <= text->last_lineno_last_disp_partial) + move((i + 2), 0); + else +#endif display_line(line, text); #if defined(FANCY_CURSES) || defined(USE_SLANG) @@ -1357,6 +1404,15 @@ PRIVATE void display_page ARGS3( } break; } +#ifdef DISP_PARTIAL + if (display_partial) { + /* + * Remember as fully shown during last partial display, + * if it was not the last text line. - kw + */ + last_disp_partial = i + line_number; + } +#endif /* DISP_PARTIAL */ display_flag = TRUE; line = line->next; } /* end of "Verify and display each line." loop */ @@ -1550,6 +1606,18 @@ PRIVATE void display_page ARGS3( addstr("\n Document is empty"); } +#ifdef DISP_PARTIAL + if (display_partial && display_flag && + last_disp_partial >= text->top_of_screen && + !recent_sizechange) { /* really remember them if ok - kw */ + text->first_lineno_last_disp_partial = text->top_of_screen; + text->last_lineno_last_disp_partial = last_disp_partial; + } else { + text->first_lineno_last_disp_partial = + text->last_lineno_last_disp_partial = -1; + } +#endif /* DISP_PARTIAL */ + if (HTCJK != NOCJK || text->T.output_utf8) { /* * For non-multibyte curses. @@ -2748,8 +2816,12 @@ PUBLIC int HText_beginAnchor ARGS3( if ((a->number > 0) && (keypad_mode == LINKS_ARE_NUMBERED || keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) { + char saved_lastchar = text->LastChar; + int saved_linenum = text->Lines; sprintf(marker,"[%d]", a->number); HText_appendText(text, marker); + if (saved_linenum && text->Lines && saved_lastchar != ' ') + text->LastChar = ']'; /* if marker not after space caused split */ a->start = text->chars + text->last_line->size; a->line_num = text->Lines; a->line_pos = text->last_line->size; @@ -2818,6 +2890,7 @@ PUBLIC void HText_endAnchor ARGS2( HTAnchor_followMainLink((HTAnchor *)a->anchor))))); HTLine *last = text->last_line; HTLine *prev = text->last_line->prev; + HTLine *start = last; int CurBlankExtent = 0; int BlankExtent = 0; @@ -2877,7 +2950,13 @@ PUBLIC void HText_endAnchor ARGS2( * immediately preceding line also has only * white and special characters. - FM */ - while (i == 0 && a->extent > CurBlankExtent) { + while (i == 0 && + (a->extent > CurBlankExtent || + (a->extent == CurBlankExtent && + prev != text->last_line && + (prev->size == 0 || + prev->data[prev->size - 1] == ']')))) { + start = prev; j = prev->size - a->extent + CurBlankExtent; if (j < 0) { /* @@ -2902,7 +2981,11 @@ PUBLIC void HText_endAnchor ARGS2( j++; } if (i == 0) { - if (a->extent > (CurBlankExtent + prev->size)) { + if (a->extent > (CurBlankExtent + prev->size) || + (a->extent == CurBlankExtent + prev->size && + prev->prev != text->last_line && + (prev->prev->size == 0 || + prev->prev->data[prev->prev->size - 1] == ']'))) { /* * This line has only white and special * characters, so treat its entire extent @@ -2931,6 +3014,11 @@ PUBLIC void HText_endAnchor ARGS2( */ a->show_anchor = NO; + CTRACE(tfp, + "HText_endAnchor: hidden (line,start,pos,ext,BlankExtent):(%d,%d,%d,%d,%d)", + a->line_num,a->start,a->line_pos,a->extent, + BlankExtent); + /* * If links are numbered, then try to get rid of the * numbered bracket and adjust the anchor count. - FM @@ -2944,7 +3032,6 @@ PUBLIC void HText_endAnchor ARGS2( * possibly caused by HTML errors. - kw */ if (remove_numbers_on_empty) { - HTLine *start; int NumSize = 0; TextAnchor *anc; @@ -2953,18 +3040,16 @@ PUBLIC void HText_endAnchor ARGS2( * or to the beginning of the line on which the * anchor start. - FM */ - if (prev == last->prev) { + if (start == last) { /* * The anchor starts on the last line. - FM */ - start = last; j = (last->size - a->extent - 1); } else { /* * The anchor starts on a previous line. - FM */ - start = prev; - prev = prev->prev; + prev = start->prev; j = (start->size - a->extent + CurBlankExtent - 1); } if (j < 0) @@ -2997,6 +3082,12 @@ PUBLIC void HText_endAnchor ARGS2( * on this line. - FM */ NumSize++; + if (start==last && (int)text->permissible_split > j) { + if ((int)text->permissible_split - NumSize < j) + text->permissible_split = j; + else + text->permissible_split -= NumSize; + } k = j + NumSize; while (k < start->size) start->data[j++] = start->data[k++]; @@ -3004,7 +3095,10 @@ PUBLIC void HText_endAnchor ARGS2( text->chars -= NumSize; for (anc = a; anc; anc = anc->next) { anc->start -= NumSize; + if (anc->line_num == a->line_num && + anc->line_pos >= NumSize) { anc->line_pos -= NumSize; + } } start->size = j; start->data[j++] = '\0'; @@ -3034,7 +3128,7 @@ PUBLIC void HText_endAnchor ARGS2( NumSize++; l = (i - j); while (i < prev->size) - start->data[j++] = start->data[i++]; + prev->data[j++] = prev->data[i++]; text->chars -= l; for (anc = a; anc; anc = anc->next) { anc->start -= l; @@ -3042,7 +3136,13 @@ PUBLIC void HText_endAnchor ARGS2( prev->size = j; prev->data[j] = '\0'; while (j < i) - start->data[j++] = '\0'; + prev->data[j++] = '\0'; + if (start == last && text->permissible_split > 0) { + if ((int)text->permissible_split < k) + text->permissible_split = 0; + else + text->permissible_split -= k; + } j = 0; i = k; while (k < start->size) @@ -3051,7 +3151,10 @@ PUBLIC void HText_endAnchor ARGS2( text->chars -= i; for (anc = a; anc; anc = anc->next) { anc->start -= i; - anc->line_pos -= i; + if (anc->line_num == a->line_num && + anc->line_pos >= i) { + anc->line_pos -= i; + } } start->size = j; start->data[j++] = '\0'; @@ -3078,7 +3181,7 @@ PUBLIC void HText_endAnchor ARGS2( if (j < 0) j = 0; i = (j + 1); - if ((j > 2) && + if ((j >= 2) && (prev->data[j] == ']' && isdigit((unsigned char)prev->data[j - 1]))) { j--; @@ -3110,7 +3213,7 @@ PUBLIC void HText_endAnchor ARGS2( prev->size = j; prev->data[j++] = '\0'; while (j < k) - start->data[j++] = '\0'; + prev->data[j++] = '\0'; } else { /* * Shucks! We didn't find the @@ -3140,6 +3243,12 @@ PUBLIC void HText_endAnchor ARGS2( * as a link. - FM */ a->show_anchor = YES; + if (BlankExtent) { + CTRACE(tfp, + "HText_endAnchor: blanks (line,start,pos,ext,BlankExtent):(%d,%d,%d,%d,%d)", + a->line_num,a->start,a->line_pos,a->extent, + BlankExtent); + } } if (a->show_anchor == NO) { /* @@ -3165,6 +3274,13 @@ PUBLIC void HText_endAnchor ARGS2( a->extent -= ((BlankExtent < a->extent) ? BlankExtent : 0); } + if (BlankExtent || a->extent <= 0 || a->number <= 0) { + CTRACE(tfp, + "->[%d](%d,%d,%d,%d,%d)\n", + a->number, + a->line_num,a->start,a->line_pos,a->extent, + BlankExtent); + } } else { /* * It's a named anchor without an HREF, so it @@ -3274,7 +3390,7 @@ PUBLIC void HText_endAppend ARGS1( * Fix up the anchor structure values and * create the hightext strings. - FM */ - HText_trimHightext(text, FALSE); + HText_trimHightext(text, TRUE); } @@ -3286,25 +3402,37 @@ PUBLIC void HText_endAppend ARGS1( ** `Forms input' fields cannot be displayed properly without this function ** to be invoked (detected in display_partial mode). ** -** (BOOLEAN value allow us to disable annoying repeated trace messages -** for display_partial mode). +** If final is set, this is the final fixup; if not set, we don't have +** to do everything because there should be another call later. +** +** BEFORE this function has treated a TextAnchor, its line_pos and +** extent fields are counting bytes in the HTLine data, including +** invisible special attribute chars and counting UTF-8 multibyte +** characters as multiple bytes. +** AFTER the adjustment, the anchor line_pos (and hightext2offset +** if applicable) fields indicate x positions in terms of displayed +** character cells, and the extent field apparently is unimportant; +** the anchor text has been copied to the hightext (and possibly +** hightext2) fields (which should be NULL up to this point), with +** special attribute chars removed. +** This needs to be done so that display_page finds the anchors in the +** form it expects when it sets the links[] elements. */ PUBLIC void HText_trimHightext ARGS2( HText *, text, - BOOLEAN, disable_trace) + BOOLEAN, final) { int cur_line, cur_char, cur_shift; TextAnchor *anchor_ptr; + TextAnchor *prev_a = NULL; HTLine *line_ptr; unsigned char ch; if (!text) return; - CTRACE(tfp,"Gridtext: Entering HText_trimHightext\n"); - - if (disable_trace) - CTRACE(tfp,"HText_trimHightext: trace disabled in display_partial mode\n"); + CTRACE(tfp,"Gridtext: Entering HText_trimHightext %s\n", + final ? "(final)" : "(partial)"); /* * Get the first line. @@ -3312,37 +3440,71 @@ PUBLIC void HText_trimHightext ARGS2( line_ptr = text->last_line->next; cur_char = line_ptr->size; cur_line = 0; - cur_shift = 0; /* * Fix up the anchor structure values and * create the hightext strings. - FM */ for (anchor_ptr = text->first_anchor; - anchor_ptr; anchor_ptr=anchor_ptr->next) { + anchor_ptr; + prev_a = anchor_ptr, anchor_ptr=anchor_ptr->next) { re_parse: /* * Find the right line. */ - for (; anchor_ptr->start >= cur_char; + for (; anchor_ptr->start > cur_char; line_ptr = line_ptr->next, cur_char += line_ptr->size+1, cur_line++) { ; /* null body */ } + + if (!final) { + /* + * If this is not the final call, stop when we have reached + * the last line, or the very end of preceding line. + * The last line is probably still not finished. - kw + */ + if (cur_line >= text->Lines) + break; + if (anchor_ptr->start >= text->chars - 1) + break; + /* + * Also skip this anchor if it looks like HText_endAnchor + * is not yet done with it. - kw + */ + if (!anchor_ptr->extent && anchor_ptr->number && + (anchor_ptr->link_type & HYPERTEXT_ANCHOR) && + !anchor_ptr->show_anchor && + anchor_ptr->number == text->last_anchor_number) + continue; + } + + /* + * If hightext has already been set, then we must have already + * done the trimming & adjusting for this anchor, so avoid + * doing it a second time. - kw + */ + if (anchor_ptr->hightext) + continue; + if (anchor_ptr->start == cur_char) { anchor_ptr->line_pos = line_ptr->size; } else { anchor_ptr->line_pos = anchor_ptr->start - (cur_char - line_ptr->size); } - if (anchor_ptr->line_pos < 0) + if (anchor_ptr->line_pos < 0) { + anchor_ptr->start -= anchor_ptr->line_pos; anchor_ptr->line_pos = 0; + anchor_ptr->line_num = cur_line; + } + CTRACE(tfp, + "Gridtext: Anchor found on line:%d col:%d [%d] ext:%d\n", + cur_line, anchor_ptr->line_pos, + anchor_ptr->number, anchor_ptr->extent); - if (!disable_trace) - CTRACE(tfp, "Gridtext: Anchor found on line:%d col:%d\n", - cur_line, anchor_ptr->line_pos); - + cur_shift = 0; /* * Strip off any spaces or SpecialAttrChars at the beginning, * if they exist, but only on HYPERTEXT_ANCHORS. @@ -3360,22 +3522,29 @@ re_parse: if (anchor_ptr->extent < 0) { anchor_ptr->extent = 0; } + anchor_ptr->start += cur_shift; - if (!disable_trace) CTRACE(tfp, "anchor text: '%s'\n", line_ptr->data); /* * If the link begins with an end of line and we have more * lines, then start the highlighting on the next line. - FM + * But if an empty anchor is at the end of line and empty, + * keep it where it is, unless the previous anchor in the list + * (if any) already starts later. - kw */ - if ((unsigned)anchor_ptr->line_pos >= strlen(line_ptr->data) && - cur_line < text->Lines) { - anchor_ptr->start += (cur_shift + 1); - cur_shift = 0; - CTRACE(tfp, "found anchor at end of line\n"); - goto re_parse; + if ((unsigned)anchor_ptr->line_pos >= strlen(line_ptr->data)) { + if (cur_line < text->Lines && + (anchor_ptr->extent || + anchor_ptr->line_pos != (int)line_ptr->size || + (prev_a && prev_a->start > anchor_ptr->start))) { + anchor_ptr->start++; + CTRACE(tfp, "found anchor at end of line\n"); + goto re_parse; + } else { + CTRACE(tfp, "found anchor at end of line, leaving it there\n"); + } } - cur_shift = 0; /* * Copy the link name into the data structure. @@ -3395,6 +3564,13 @@ re_parse: */ if ((unsigned)anchor_ptr->extent > strlen(anchor_ptr->hightext)) { HTLine *line_ptr2 = line_ptr->next; + + if (!final) { + if (cur_line + 1 >= text->Lines) { + FREE(anchor_ptr->hightext); /* bail out */ + break; + } + } /* * Double check that we have a line pointer, * and if so, copy into hightext2. @@ -3439,9 +3615,9 @@ re_parse: anchor_ptr->line_pos += line_ptr->offset; anchor_ptr->line_num = cur_line; - if (!disable_trace) - CTRACE(tfp, "GridText: add link on line %d col %d in HText_trimHightext\n", - cur_line, anchor_ptr->line_pos); + CTRACE(tfp, "GridText: add link on line %d col %d [%d] %s\n", + cur_line, anchor_ptr->line_pos, + anchor_ptr->number, "in HText_trimHightext"); /* * If this is the last anchor, we're done! @@ -4101,11 +4277,11 @@ PUBLIC void HText_pageDisplay ARGS2( ** So we start HText_trimHightext() to forget this side effect. ** This function was split-out from HText_endAppend(). ** It may not be the best solution but it works. - LP - ** (TRUE = to disable annoying repeated trace messages) ** - ** Side effect is reported from multiply call of HText_trimHightext. + ** (FALSE = indicate that we are in partial mode) + ** Multiple calls of HText_trimHightext works without problem now. */ - HText_trimHightext(HTMainText, TRUE); + HText_trimHightext(HTMainText, FALSE); } detected_forms_input_partial = FALSE; #endif @@ -6216,6 +6392,14 @@ PUBLIC char * HText_setLastOptionValue ARGS7( new_ptr->name = NULL; new_ptr->cp_submit_value = NULL; new_ptr->next = NULL; + /* + * Find first non-space again, convert_to_spaces above may have + * changed the string. - kw + */ + cp = value; + while (isspace((unsigned char)*cp) || + IsSpecialAttrChar((unsigned char)*cp)) + cp++; for (i = 0, j = 0; cp[i]; i++) { if (cp[i] == HT_NON_BREAK_SPACE || cp[i] == HT_EM_SPACE) { @@ -8019,6 +8203,8 @@ PRIVATE void free_all_texts NOARGS */ while (loaded_texts && !HTList_isEmpty(loaded_texts)) { if ((cur = (HText *)HTList_removeLastObject(loaded_texts)) != NULL) { + if (cur->node_anchor && cur->node_anchor->underway) + cur->node_anchor->underway = FALSE; HText_free(cur); } } diff --git a/src/GridText.h b/src/GridText.h index a99f66da..679e6fa6 100644 --- a/src/GridText.h +++ b/src/GridText.h @@ -23,7 +23,7 @@ #ifndef LY_SOFT_HYPHEN #define LY_SOFT_HYPHEN ((char)7) #endif /* !LY_SOFT_HYPHEN */ -#define LY_SOFT_NEWLINE ((char)8) +#define LY_SOFT_NEWLINE ((char)8) #define IsSpecialAttrChar(a) ((a > '\002') && (a <= '\010')) @@ -202,7 +202,7 @@ extern int HText_beginInput PARAMS(( InputFieldData *I)); extern void HText_trimHightext PARAMS(( HText * text, - BOOLEAN disable_trace)); + BOOLEAN final)); extern void HText_SubmitForm PARAMS(( FormInfo * submit_item, document * doc, diff --git a/src/HTFWriter.c b/src/HTFWriter.c index 8b1e8805..9e0b03b6 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -708,7 +708,7 @@ PUBLIC HTStream* HTSaveToFile ARGS3( * Unix folks don't need to know this, but we'll show it to * them, too. - FM */ - HTUserMsg2(gettext("Content-type: %s"), pres->rep->name); + HTUserMsg2(CONTENT_TYPE_MSG, pres->rep->name); StrAllocCopy(WWW_Download_File,fnam); diff --git a/src/HTInit.c b/src/HTInit.c index 21a0dc4e..74403779 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -21,7 +21,6 @@ #include <HTWSRC.h> #include <HTSaveToFile.h> /* LJM */ -#include <userdefs.h> #include <LYStrings.h> #include <LYUtils.h> #include <LYGlobalDefs.h> diff --git a/src/LYBookmark.c b/src/LYBookmark.c index 7f103f11..a05fb6aa 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -144,11 +144,11 @@ PRIVATE char * convert_mosaic_bookmark_file ARGS1( return (""); /* should always open */ fprintf(nfp,"<head>\n<title>%s</title>\n</head>\n",MOSAIC_BOOKMARK_TITLE); - fprintf(nfp,gettext("\ + fprintf(nfp, "%s\n\n<p>\n<ol>\n", gettext("\ This file is an HTML representation of the X Mosaic hotlist file.\n\ Outdated or invalid links may be removed by using the\n\ remove bookmark command, it is usually the 'R' key but may have\n\ - been remapped by you or your system administrator.\n\n<p>\n<ol>\n")); + been remapped by you or your system administrator.")); while (fgets(buf, sizeof(buf), fp) != NULL) { if(line >= 0) { @@ -740,7 +740,7 @@ draw_bookmark_choices: addstr(MULTIBOOKMARKS_SHEAD); } - lynx_stop_h1_color (); + lynx_stop_h1_color (); MBM_tmp_count = 0; for (c = MBM_from; c <= MBM_to; c++) { @@ -903,7 +903,7 @@ PRIVATE BOOLEAN havevisible ARGS1(CONST char *, Title) unicode = UCTransToUni(*p, current_char_set); if (unicode > 32 && unicode < 127) return(TRUE); - if (c <= 32 || (c >= 127 && c <= 160) || c == 0xad) + if (unicode <= 32 || unicode == 0xa0 || unicode == 0xad) continue; if (unicode >= 0x2000 && unicode < 0x200f) continue; @@ -955,7 +955,7 @@ PRIVATE char* title_convert8bit ARGS1(CONST char *, Title) char *ncr = NULL; char *buf = NULL; int charset_in = current_char_set; - int charset_out = -1; + int charset_out = UCGetLYhndl_byMIME("us-ascii"); for ( ; *p; p++) { LYstrncpy(q, p, 1); @@ -963,24 +963,21 @@ PRIVATE char* title_convert8bit ARGS1(CONST char *, Title) StrAllocCat(comment, q); StrAllocCat(ncr, q); } else { - int uck; - long unicode; - char replace_buf [10], replace_buf2 [10]; + int uck; + long unicode; + char replace_buf [10], replace_buf2 [10]; - if (charset_out < 0) - charset_out = UCGetLYhndl_byMIME("us-ascii"); + uck = UCTransCharStr(replace_buf, sizeof(replace_buf), *q, + charset_in, charset_out, YES); + if (uck >0) + StrAllocCat(comment, replace_buf); - uck = UCTransCharStr(replace_buf, sizeof(replace_buf), *q, - charset_in, charset_out, YES); - if (uck >0) - StrAllocCat(comment, replace_buf); + unicode = UCTransToUni( *q, charset_in); - unicode = UCTransToUni( *q, charset_in); - - StrAllocCat(ncr, "&#"); - sprintf(replace_buf2, "%ld", unicode); - StrAllocCat(ncr, replace_buf2); - StrAllocCat(ncr, ";"); + StrAllocCat(ncr, "&#"); + sprintf(replace_buf2, "%ld", unicode); + StrAllocCat(ncr, replace_buf2); + StrAllocCat(ncr, ";"); } } diff --git a/src/LYCgi.c b/src/LYCgi.c index 3c27a113..7843ad58 100644 --- a/src/LYCgi.c +++ b/src/LYCgi.c @@ -21,7 +21,7 @@ ** ** Should try and parse for a HTTP 1.1 header in case we are "calling" a ** nph- script. -*/ +*/ #include <HTUtils.h> #include <HTTP.h> @@ -50,7 +50,7 @@ #include <sys/wait.h> #endif -struct _HTStream +struct _HTStream { HTStreamClass * isa; }; @@ -90,7 +90,7 @@ PRIVATE void add_environment_value ARGS1( env[envc++] = env_value; env[envc] = NULL; /* Make sure it is always properly terminated */ } - + /* * Add the value of an existing environment variable to those passed on to the * lynxcgi script. @@ -184,7 +184,7 @@ PRIVATE int LYLoadCGI ARGS4( if (statrv < 0) { /* Did not find PATH_INFO data */ - if (TRACE) + if (TRACE) perror("LYNXCGI: stat() of pgm_buff failed"); } else { /* Found PATH_INFO data. Strip it off of pgm and into path_info. */ @@ -229,7 +229,7 @@ PRIVATE int LYLoadCGI ARGS4( status = -4; return(status); } - + LYLocalFileToURL (&new_arg, orig_pgm); CTRACE(tfp, "%s is not an executable file, passing the buck.\n", arg); @@ -301,15 +301,15 @@ PRIVATE int LYLoadCGI ARGS4( /* Show output as plain text */ format_in = WWW_PLAINTEXT; } else { - + /* Decode full HTTP response */ format_in = HTAtom_for("www/mime"); } - + target = HTStreamStack(format_in, format_out, sink, anAnchor); - + if (!target || target == NULL) { sprintf(buf, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); @@ -322,7 +322,7 @@ PRIVATE int LYLoadCGI ARGS4( perror("LYNXCGI: pipe() failed"); } status = -3; - + } else if (pipe(fd2) < 0) { HTAlert(CONNECT_SET_FAILED); if (TRACE) { @@ -331,30 +331,30 @@ PRIVATE int LYLoadCGI ARGS4( close(fd1[0]); close(fd1[1]); status = -3; - - } else { + + } else { static BOOL first_time = TRUE; /* One time setup flag */ if (first_time) { /* Set up static environment variables */ first_time = FALSE; /* Only once */ - + add_environment_value("REMOTE_HOST=localhost"); add_environment_value("REMOTE_ADDR=127.0.0.1"); - + sprintf(user_agent, "HTTP_USER_AGENT=%s/%s libwww/%s", LYNX_NAME, LYNX_VERSION, HTLibraryVersion); add_environment_value(user_agent); - + sprintf(server_software, "SERVER_SOFTWARE=%s/%s", LYNX_NAME, LYNX_VERSION); add_environment_value(server_software); } - + if ((pid = fork()) > 0) { /* The good, */ int chars, total_chars; - + close(fd2[1]); - + if (anAnchor->post_data) { int written, remaining, total_written = 0; close(fd1[0]); @@ -363,7 +363,7 @@ PRIVATE int LYLoadCGI ARGS4( CTRACE(tfp, "LYNXCGI: Doing post, content-type '%s'\n", anAnchor->post_content_type); CTRACE(tfp, "LYNXCGI: Writing:\n%s----------------------------------\n", - anAnchor->post_data); + anAnchor->post_data); remaining = strlen(anAnchor->post_data); while ((written = write(fd1[1], anAnchor->post_data + total_written, @@ -395,11 +395,11 @@ PRIVATE int LYLoadCGI ARGS4( } close(fd1[1]); } - + HTReadProgress(total_chars = 0, 0); while((chars = read(fd2[0], buf, sizeof(buf))) > 0) { HTReadProgress(total_chars += chars, 0); - CTRACE(tfp, "LYNXCGI: Rx: %.*s\n", chars, buf); + CTRACE(tfp, "LYNXCGI: Rx: %.*s\n", chars, buf); (*target->isa->put_block)(target, buf, chars); } #if !HAVE_WAITPID @@ -420,7 +420,7 @@ PRIVATE int LYLoadCGI ARGS4( #endif /* !HAVE_WAITPID */ close(fd2[0]); status = HT_LOADED; - + } else if (pid == 0) { /* The Bad, */ char **argv = NULL; char post_len[32]; @@ -474,7 +474,7 @@ PRIVATE int LYLoadCGI ARGS4( } } - /* + /* * Set up argument line, mainly for <index> scripts */ if (pgm_args != NULL) { @@ -490,7 +490,7 @@ PRIVATE int LYLoadCGI ARGS4( outofmem(__FILE__, "LYCgi"); } cur_argv = argv + 1; /* For argv[0] */ - if (pgm_args != NULL) { + if (pgm_args != NULL) { char *cr; /* Data for a get/search form */ @@ -499,7 +499,7 @@ PRIVATE int LYLoadCGI ARGS4( } else if (!anAnchor->isHEAD) { add_environment_value("REQUEST_METHOD=GET"); } - + cp = NULL; StrAllocCopy(cp, "QUERY_STRING="); StrAllocCat(cp, pgm_args); @@ -514,7 +514,7 @@ PRIVATE int LYLoadCGI ARGS4( if (*cp == '\0') { *(cur_argv++) = HTUnEscape(cr); break; - + } else if (*cp == '+') { *cp++ = '\0'; *(cur_argv++) = HTUnEscape(cr); @@ -523,10 +523,10 @@ PRIVATE int LYLoadCGI ARGS4( cp++; } } - *cur_argv = NULL; /* Terminate argv */ + *cur_argv = NULL; /* Terminate argv */ argv[0] = pgm; - /* Begin WebSter Mods -jkt */ + /* Begin WebSter Mods -jkt */ if (LYCgiDocumentRoot != NULL) { /* Add DOCUMENT_ROOT to env */ cp = NULL; @@ -559,7 +559,7 @@ PRIVATE int LYLoadCGI ARGS4( if (TRACE) { perror("LYNXCGI: execve failed"); } - + } else { /* and the Ugly */ HTAlert(CONNECT_FAILED); if (TRACE) { @@ -585,13 +585,13 @@ PRIVATE int LYLoadCGI ARGS4( HTStream *target; char buf[256]; - target = HTStreamStack(WWW_HTML, + target = HTStreamStack(WWW_HTML, format_out, sink, anAnchor); sprintf(buf, "<head>\n<title>%s</title>\n</head>\n<body>\n", gettext("Good Advice")); (*target->isa->put_block)(target, buf, strlen(buf)); - + sprintf(buf, "<h1>%s</h1>\n", gettext("Good Advice")); (*target->isa->put_block)(target, buf, strlen(buf)); @@ -605,8 +605,8 @@ PRIVATE int LYLoadCGI ARGS4( sprintf(buf, ">%s</a>.\n", gettext("this link")); (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, - gettext("<p>It provides <b>state of the art</b> CGI script support.\n")); + sprintf(buf, "<p>%s\n", + gettext("It provides state of the art CGI script support.\n")); (*target->isa->put_block)(target, buf, strlen(buf)); sprintf(buf,"</body>\n"); diff --git a/src/LYCookie.c b/src/LYCookie.c index 0ef68296..73d9049e 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -131,12 +131,10 @@ PRIVATE void MemAllocCopy ARGS3( PRIVATE cookie * newCookie NOARGS { cookie *p = (cookie *)calloc(1, sizeof(cookie)); - char lynxID[64]; if (p == NULL) outofmem(__FILE__, "newCookie"); - sprintf(lynxID, "%p", p); - StrAllocCopy(p->lynxID, lynxID); + HTSprintf0(&(p->lynxID), "%p", p); p->port = 80; return p; } @@ -350,16 +348,9 @@ PRIVATE void store_cookie ARGS3( */ ptr = ((hostname + strlen(hostname)) - strlen(co->domain)); if (strchr(hostname, '.') < ptr) { - char *msg = calloc(1, - (strlen(co->domain) + - strlen(hostname) + - strlen(INVALID_COOKIE_DOMAIN_CONFIRMATION) + - 1)); - - if (msg == 0) - outofmem(__FILE__, "store_cookie"); if (!LYAcceptAllCookies) { - sprintf(msg, + char *msg = 0; + HTSprintf0(&msg, INVALID_COOKIE_DOMAIN_CONFIRMATION, co->domain, hostname); @@ -372,8 +363,8 @@ PRIVATE void store_cookie ARGS3( FREE(msg); return; } + FREE(msg); } - FREE(msg); } } } @@ -624,9 +615,7 @@ PRIVATE char * scan_cookie_sublist ARGS6( * the version number goes before the * first cookie. */ - char version[16]; - sprintf(version, "$Version=\"%d\"; ", co->version); - StrAllocCopy(header, version); + HTSprintf0(&header, "$Version=\"%d\"; ", co->version); len += strlen(header); } } else { @@ -1093,9 +1082,7 @@ PRIVATE void LYProcessSetCookies ARGS6( * Don't process a repeat port. - FM */ if (cur_cookie->PortList == NULL) { - char temp[256]; - sprintf(temp, "%d", port); - StrAllocCopy(cur_cookie->PortList, temp); + HTSprintf0(&(cur_cookie->PortList), "%d", port); length += strlen(cur_cookie->PortList); } known_attr = YES; @@ -1579,9 +1566,7 @@ PRIVATE void LYProcessSetCookies ARGS6( * Don't process a repeat port. - FM */ if (cur_cookie->PortList == NULL) { - char temp[256]; - sprintf(temp, "%d", port); - StrAllocCopy(cur_cookie->PortList, temp); + HTSprintf0(&(cur_cookie->PortList), "%d", port); length += strlen(cur_cookie->PortList); } known_attr = YES; @@ -2003,9 +1988,11 @@ PUBLIC void LYLoadCookies ARGS1 ( /* rjp - experimental persistent cookie support */ PUBLIC void LYStoreCookies ARGS1 ( - CONST char *, cookie_file) + char *, cookie_file) { - char buf[1024]; +#if 0 + char *buf = NULL; +#endif HTList *dl, *cl; domain_entry *de; cookie *co; @@ -2023,7 +2010,7 @@ PUBLIC void LYStoreCookies ARGS1 ( return; } - cookie_handle = fopen(cookie_file, "w+"); + cookie_handle = LYNewTxtFile (cookie_file); for (dl = domain_list; dl != NULL; dl = dl->next) { de = dl->object; if (de == NULL) @@ -2032,20 +2019,23 @@ PUBLIC void LYStoreCookies ARGS1 ( */ continue; +#if 0 switch (de->bv) { case (ACCEPT_ALWAYS): - sprintf(buf, COOKIES_ALWAYS_ALLOWED); + HTSprintf0(&buf, COOKIES_ALWAYS_ALLOWED); break; case (REJECT_ALWAYS): - sprintf(buf, COOKIES_NEVER_ALLOWED); + HTSprintf0(&buf, COOKIES_NEVER_ALLOWED); break; case (QUERY_USER): - sprintf(buf, COOKIES_ALLOWED_VIA_PROMPT); + HTSprintf0(&buf, COOKIES_ALLOWED_VIA_PROMPT); break; case (FROM_FILE): - sprintf(buf, gettext("(From Cookie Jar)")); + HTSprintf0(&buf, gettext("(From Cookie Jar)")); break; } + /* FIXME: buf unused */ +#endif /* * Show the domain's cookies. - FM @@ -2097,7 +2087,7 @@ PRIVATE int LYHandleCookies ARGS4 ( { HTFormat format_in = WWW_HTML; HTStream *target = NULL; - char buf[1024]; + char *buf = NULL; char *domain = NULL; char *lynxID = NULL; HTList *dl, *cl, *next; @@ -2352,9 +2342,10 @@ Delete_all_cookies_in_domain: format_out, sink, anAnchor); if (!target || target == NULL) { - sprintf(buf, CANNOT_CONVERT_I_TO_O, + HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); HTAlert(buf); + FREE(buf); return(HT_NOT_LOADED); } @@ -2362,21 +2353,21 @@ Delete_all_cookies_in_domain: * Load HTML strings into buf and pass buf * to the target for parsing and rendering. - FM */ - sprintf(buf, "<HEAD>\n<TITLE>%s</title>\n</HEAD>\n<BODY>\n", + HTSprintf0(&buf, "<HEAD>\n<TITLE>%s</title>\n</HEAD>\n<BODY>\n", COOKIE_JAR_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "<h1>%s (%s)%s<a href=\"%s%s\">%s</a></h1>\n", + HTSprintf0(&buf, "<h1>%s (%s)%s<a href=\"%s%s\">%s</a></h1>\n", LYNX_NAME, LYNX_VERSION, HELP_ON_SEGMENT, helpfilepath, COOKIE_JAR_HELP, COOKIE_JAR_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "<NOTE>%s\n", ACTIVATE_TO_GOBBLE); + HTSprintf0(&buf, "<NOTE>%s\n", ACTIVATE_TO_GOBBLE); (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "%s</NOTE>\n", OR_CHANGE_ALLOW); + HTSprintf0(&buf, "%s</NOTE>\n", OR_CHANGE_ALLOW); (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "<DL COMPACT>\n"); + HTSprintf0(&buf, "<DL COMPACT>\n"); (*target->isa->put_block)(target, buf, strlen(buf)); for (dl = domain_list; dl != NULL; dl = dl->next) { de = dl->object; @@ -2389,25 +2380,25 @@ Delete_all_cookies_in_domain: /* * Show the domain link and 'allow' setting. - FM */ - sprintf(buf, "<DT>%s<DD><A HREF=\"LYNXCOOKIE://%s/\">Domain=%s</A>\n", + HTSprintf0(&buf, "<DT>%s<DD><A HREF=\"LYNXCOOKIE://%s/\">Domain=%s</A>\n", de->domain, de->domain, de->domain); (*target->isa->put_block)(target, buf, strlen(buf)); switch (de->bv) { case (ACCEPT_ALWAYS): - sprintf(buf, COOKIES_ALWAYS_ALLOWED); + HTSprintf0(&buf, COOKIES_ALWAYS_ALLOWED); break; case (REJECT_ALWAYS): - sprintf(buf, COOKIES_NEVER_ALLOWED); + HTSprintf0(&buf, COOKIES_NEVER_ALLOWED); break; case (QUERY_USER): - sprintf(buf, COOKIES_ALLOWED_VIA_PROMPT); + HTSprintf0(&buf, COOKIES_ALLOWED_VIA_PROMPT); break; case (FROM_FILE): - sprintf(buf, COOKIES_READ_FROM_FILE); + HTSprintf0(&buf, COOKIES_READ_FROM_FILE); break; } (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "\n"); + HTSprintf0(&buf, "\n"); (*target->isa->put_block)(target, buf, strlen(buf)); /* @@ -2435,7 +2426,7 @@ Delete_all_cookies_in_domain: } else { StrAllocCopy(value, NO_VALUE); } - sprintf(buf, "<DD><A HREF=\"LYNXCOOKIE://%s/%s\">%s=%s</A>\n", + HTSprintf0(&buf, "<DD><A HREF=\"LYNXCOOKIE://%s/%s\">%s=%s</A>\n", de->domain, co->lynxID, name, value); FREE(name); FREE(value); @@ -2450,7 +2441,7 @@ Delete_all_cookies_in_domain: } else { StrAllocCopy(path, "/"); } - sprintf(buf, "<DD>Path=%s\n<DD>Port: %d Secure: %s Discard: %s\n", + HTSprintf0(&buf, "<DD>Path=%s\n<DD>Port: %d Secure: %s Discard: %s\n", path, co->port, ((co->flags & COOKIE_FLAG_SECURE) ? "YES" : "NO"), ((co->flags & COOKIE_FLAG_DISCARD) ? "YES" : "NO")); @@ -2461,7 +2452,7 @@ Delete_all_cookies_in_domain: * Show the list of acceptable ports, if present. - FM */ if (co->PortList) { - sprintf(buf, "<DD>PortList=\"%s\"\n", co->PortList); + HTSprintf0(&buf, "<DD>PortList=\"%s\"\n", co->PortList); (*target->isa->put_block)(target, buf, strlen(buf)); } @@ -2473,7 +2464,7 @@ Delete_all_cookies_in_domain: LYEntify(&Address, FALSE); StrAllocCopy(Title, co->commentURL); LYEntify(&Title, TRUE); - sprintf(buf, + HTSprintf0(&buf, "<DD>CommentURL: <A href=\"%s\">%s</A>\n", Address, Title); @@ -2488,7 +2479,7 @@ Delete_all_cookies_in_domain: if (co->comment) { StrAllocCopy(comment, co->comment); LYEntify(&comment, TRUE); - sprintf(buf, "<DD>Comment: %s\n", comment); + HTSprintf0(&buf, "<DD>Comment: %s\n", comment); FREE(comment); (*target->isa->put_block)(target, buf, strlen(buf)); } @@ -2496,7 +2487,7 @@ Delete_all_cookies_in_domain: /* * Show the Maximum Gobble Date. - FM */ - sprintf(buf, "<DD><EM>%s</EM> %s%s", + HTSprintf0(&buf, "<DD><EM>%s</EM> %s%s", gettext("Maximum Gobble Date:"), ((co->expires > 0 && !(co->flags & COOKIE_FLAG_DISCARD)) @@ -2508,10 +2499,10 @@ Delete_all_cookies_in_domain: "" : "\n")); (*target->isa->put_block)(target, buf, strlen(buf)); } - sprintf(buf, "</DT>\n"); + HTSprintf0(&buf, "</DT>\n"); (*target->isa->put_block)(target, buf, strlen(buf)); } - sprintf(buf, "</DL>\n</BODY>\n"); + HTSprintf0(&buf, "</DL>\n</BODY>\n"); (*target->isa->put_block)(target, buf, strlen(buf)); /* @@ -2519,6 +2510,7 @@ Delete_all_cookies_in_domain: * Cookie Jar Page, and report a successful load. - FM */ (*target->isa->_free)(target); + FREE(buf); return(HT_LOADED); } diff --git a/src/LYCookie.h b/src/LYCookie.h index f54518bf..62caa88a 100644 --- a/src/LYCookie.h +++ b/src/LYCookie.h @@ -14,7 +14,7 @@ extern char *LYCookie PARAMS(( int port, BOOL secure)); extern void LYStoreCookies PARAMS(( - CONST char * cookie_file)); + char * cookie_file)); extern void LYLoadCookies PARAMS(( char * cookie_file)); extern void cookie_add_acceptlist PARAMS(( diff --git a/src/LYCurses.c b/src/LYCurses.c index 42b10477..b103d4de 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -754,6 +754,7 @@ PUBLIC void start_curses NOARGS } #if defined(SIGWINCH) && defined(NCURSES_VERSION) size_change(0); + recent_sizechange = FALSE; /* prevent mainloop drawing 1st doc twice */ #endif /* SIGWINCH */ #if defined(USE_KEYMAPS) && defined(NCURSES_VERSION) if (-1 == lynx_initialize_keymaps ()) @@ -873,10 +874,22 @@ PUBLIC void lynx_enable_mouse ARGS1(int,state) } #else /* Inform ncurses that we're interested in knowing when mouse - * button 1 is clicked */ - if (state) - mousemask(BUTTON1_CLICKED | BUTTON3_CLICKED, NULL); - else + * button 1 is clicked. We cannot just specify + * BUTTON1_CLICKED | BUTTON3_CLICKED, since ncurses will try hard + * to translate other events to single-clicks. + * Compensate for small value of maxclick in ncurses. */ + if (state) { + static was = 0; + + if (!was) { + int old = mouseinterval(-1); + + was++; + if (old < 200) /* Default 166 */ + mouseinterval(300); + } + mousemask(ALL_MOUSE_EVENTS, NULL); + } else mousemask(0, NULL); #endif /* __BORLANDC__ and __PDCURSES__ */ #endif /* NCURSES_MOUSE_VERSION */ diff --git a/src/LYCurses.h b/src/LYCurses.h index 1a857341..eb63fea2 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -2,7 +2,6 @@ #define LYCURSES_H #include <HTUtils.h> -#include <userdefs.h> /* * The simple color scheme maps the 8 combinations of bold/underline/reverse @@ -27,9 +26,6 @@ #if defined(UNIX) && !defined(unix) #define unix #endif /* UNIX && !unix */ -#ifdef va_start -#undef va_start /* not used, undef to avoid warnings on some systems */ -#endif /* va_start */ #include <slang.h> #else /* Using curses: */ @@ -218,6 +214,9 @@ extern unsigned int Lynx_Color_Flags; /* * Map some curses functions to slang functions. */ +#ifndef WINDOW +#define WINDOW void +#endif #define stdscr NULL #ifdef SLANG_MBCS_HACK extern int PHYSICAL_SLtt_Screen_Cols; diff --git a/src/LYEditmap.c b/src/LYEditmap.c index 1a1dcebd..8ba0d65c 100644 --- a/src/LYEditmap.c +++ b/src/LYEditmap.c @@ -99,7 +99,7 @@ LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, -/* 100..10E function key definitions in LYStrings.h */ +/* 100..10F function key definitions in LYStrings.h */ LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK, /* UPARROW DNARROW RTARROW LTARROW */ @@ -110,7 +110,7 @@ LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL, /* F1 Do key Find key Select key */ LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP, -/* Insert key Remove key DO_NOTHING ... */ +/* Insert key Remove key MOUSE_KEY DO_NOTHING */ }; /* diff --git a/src/LYForms.c b/src/LYForms.c index ff64cb2d..2de3e9e3 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -263,7 +263,7 @@ PRIVATE int form_getstr ARGS1( int max_length; int startcol, startline; BOOL HaveMaxlength = FALSE; - int action; + int action, repeat, non_first = 0; #ifdef VMS extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ @@ -288,7 +288,7 @@ PRIVATE int form_getstr ARGS1( form->maxlength < sizeof(MyEdit.buffer)) ? form->maxlength : (sizeof(MyEdit.buffer) - 1)); - if (strlen(form->value) > max_length) { + if (strlen(form->value) > (size_t)max_length) { /* * We can't fit the entire value into the editing buffer, * so enter as much of the tail as fits. - FM @@ -337,14 +337,38 @@ PRIVATE int form_getstr ARGS1( */ for (;;) { again: - ch = LYgetch(); + repeat = -1; + get_mouse_link(); /* Reset mouse_link. */ + /* Try to set position basing on the last mouse event */ + if (!non_first++) + peek_mouse_levent(); + + ch = LYgetch_for(FOR_INPUT); #ifdef VMS if (HadVMSInterrupt) { HadVMSInterrupt = FALSE; ch = 7; } #endif /* VMS */ - +# ifdef NCURSES_MOUSE_VERSION + if (ch == MOUSE_KEY) { /* Need to process ourselves */ + MEVENT event; + int curx, cury; + + getmouse(&event); + LYGetYX(cury, curx); + if (event.y == cury) { + repeat = event.x - curx; + if (repeat < 0) { + ch = LTARROW; + repeat = - repeat; + } else + ch = RTARROW; + } + } +# endif /* defined NCURSES_MOUSE_VERSION */ + if (peek_mouse_link() != -1) + break; /* * Filter out global navigation keys that should not be passed * to line editor, and LYK_REFRESH. @@ -393,7 +417,7 @@ again: * else you can get trapped in a form without submit button! */ case LTARROW: - if (MyEdit.pos == 0) { + if (MyEdit.pos == 0 && repeat == -1) { int c = 'Y'; /* Go back immediately if no changes */ if (strcmp(MyEdit.buffer, value)) { _statusline(PREV_DOC_QUERY); @@ -416,7 +440,10 @@ again: /* * Make sure the statusline uses editmode help. */ - LYLineEdit(&MyEdit, ch, TRUE); + if (repeat < 0) + repeat = 1; + while (repeat--) + LYLineEdit(&MyEdit, ch, TRUE); if (MyEdit.strlen >= max_length) { HaveMaxlength = TRUE; } else if (HaveMaxlength && @@ -824,11 +851,19 @@ redraw: wrefresh(form_window); #endif /* USE_SLANG */ - c = LYgetch(); - if (c == 3 || c == 7) /* Control-C or Control-G */ + c = LYgetch_for(FOR_CHOICE); + if (c == 3 || c == 7) { /* Control-C or Control-G */ cmd = LYK_QUIT; - else +#ifndef USE_SLANG + } else if (c == MOUSE_KEY) { + if ((cmd = fancy_mouse(form_window, i + 1 + window_offset, &cur_selection)) < 0) + goto redraw; + if (cmd == LYK_ACTIVATE) + break; +#endif + } else { cmd = keymap[c+1]; + } #ifdef VMS if (HadVMSInterrupt) { HadVMSInterrupt = FALSE; diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 663c968f..3028e143 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -3,10 +3,6 @@ #ifndef LYGLOBALDEFS_H #define LYGLOBALDEFS_H -#ifndef USERDEFS_H -#include <userdefs.h> -#endif /* USERDEFS_H */ - #ifndef HTUTILS_H #include <HTUtils.h> #endif /* HTUTILS_H */ diff --git a/src/LYHistory.c b/src/LYHistory.c index 6ba11db6..9c94786f 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -385,7 +385,7 @@ PUBLIC int showhistory ARGS1( BeginInternalPage(fp0, HISTORY_PAGE_TITLE, HISTORY_PAGE_HELP); fprintf(fp0, "<pre>\n"); - fprintf(fp0, gettext("<em>%s</em>\n"), gettext("You selected:")); + fprintf(fp0, "<em>%s</em>\n", gettext("You selected:")); for (x = nhist-1; x >= 0; x--) { /* * The number of the document in the hist stack, diff --git a/src/LYLocal.c b/src/LYLocal.c index 6d12f738..37c63cb3 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -238,12 +238,12 @@ struct dired_menu { PRIVATE BOOLEAN ok_stat ARGS2(char *, name, struct stat*, sb) { - char tmpbuf[LY_MAXPATH+80]; - CTRACE(tfp, "testing ok_stat(%s)\n", name); if (stat(name, sb) < 0) { - sprintf(tmpbuf, gettext("Unable to get status of '%s'."), name); + char *tmpbuf = 0; + HTSprintf(&tmpbuf, gettext("Unable to get status of '%s'."), name); HTAlert(tmpbuf); + FREE(tmpbuf); return FALSE; } return TRUE; @@ -252,12 +252,12 @@ PRIVATE BOOLEAN ok_stat ARGS2(char *, name, struct stat*, sb) #ifdef HAVE_LSTAT PRIVATE BOOLEAN ok_lstat ARGS2(char *, name, struct stat*, sb) { - char tmpbuf[LY_MAXPATH+80]; - CTRACE(tfp, "testing ok_lstat(%s)\n", name); if (lstat(name, sb) < 0) { - sprintf(tmpbuf, gettext("Unable to get status of '%s'."), name); + char *tmpbuf = 0; + HTSprintf(&tmpbuf, gettext("Unable to get status of '%s'."), name); HTAlert(tmpbuf); + FREE(tmpbuf); return FALSE; } return TRUE; @@ -297,8 +297,9 @@ PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, char*, src) PRIVATE BOOLEAN remove_tagged NOARGS { int c, ans; - char *cp, *tp; - char tmpbuf[1024]; + BOOL will_clear = TRUE; + char *cp; + char *tmpbuf = NULL; char *testpath = NULL; struct stat dir_info; int count; @@ -316,33 +317,35 @@ PRIVATE BOOLEAN remove_tagged NOARGS tag = tagged; while (ans == 'Y' && (cp = (char *)HTList_nextObject(tag)) != NULL) { if (is_url(cp) == FILE_URL_TYPE) { /* unnecessary check */ - tp = HTfullURL_toFile(cp); - StrAllocCopy(testpath, tp); - free(tp); - + testpath = HTfullURL_toFile(cp); LYTrimPathSep(testpath); + will_clear = TRUE; /* * Check the current status of the path to be deleted. */ if (!ok_stat(testpath, &dir_info)) { - return count; + will_clear = FALSE; + break; } else { args[0] = "rm"; args[1] = "-rf"; args[2] = testpath; args[3] = (char *) 0; - sprintf(tmpbuf, gettext("remove %s"), testpath); + HTSprintf0(&tmpbuf, gettext("remove %s"), testpath); if (LYExecv(RM_PATH, args, tmpbuf) <= 0) { - FREE(testpath); - return ((count == 0) ? -1 : count); + if (count == 0) count = -1; + will_clear = FALSE; + break; } ++count; } } } FREE(testpath); - clear_tags(); + FREE(tmpbuf); + if (will_clear) + clear_tags(); return count; } @@ -485,18 +488,19 @@ PRIVATE BOOLEAN modify_tagged ARGS1( while ((cp = (char *)HTList_nextObject(tag)) != NULL) { cp = HTfullURL_toFile(cp); StrAllocCopy(srcpath, cp); - free(cp); - sprintf(tmpbuf, gettext("move %s to %s"), srcpath, savepath); + HTSprintf0(&cp, gettext("move %s to %s"), srcpath, savepath); args[0] = "mv"; args[1] = srcpath; args[2] = savepath; args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) { + if (LYExecv(MV_PATH, args, cp) <= 0) { + FREE(cp); if (count == 0) count = -1; break; } + FREE(cp); ++count; } FREE(srcpath); @@ -567,19 +571,22 @@ PRIVATE BOOLEAN modify_name ARGS1( * Make sure the destination does not already exist. */ if (stat(newpath, &dir_info) == -1) { + char *msg = 0; if (errno != ENOENT) { - sprintf(tmpbuf, + HTSprintf(&msg, gettext("Unable to determine status of '%s'."), newpath); - HTAlert(tmpbuf); + HTAlert(msg); + FREE(msg); } else { - sprintf(tmpbuf, gettext("move %s to %s"), savepath, newpath); + int code; + HTSprintf(&msg, gettext("move %s to %s"), savepath, newpath); args[0] = "mv"; args[1] = savepath; args[2] = newpath; args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + code = (LYExecv(MV_PATH, args, msg) <= 0) ? -1 : 1; + FREE(msg); + return code; } } else if (S_ISDIR(dir_info.st_mode)) { HTAlert(gettext("There is already a directory with that name! Request ignored.")); @@ -680,14 +687,16 @@ PRIVATE BOOLEAN modify_location ARGS1( return 0; } if (dir_info.st_uid == owner) { - sprintf(tmpbuf,gettext("move %s to %s"),savepath,newpath); + int code; + char *msg = 0; + HTSprintf(&msg,gettext("move %s to %s"),savepath,newpath); args[0] = "mv"; args[1] = savepath; args[2] = newpath; args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + code = (LYExecv(MV_PATH, args, msg) <= 0) ? -1 : 1; + FREE(msg); + return code; } else { HTAlert(gettext("Destination has different owner! Request denied.")); return 0; @@ -803,19 +812,22 @@ PRIVATE BOOLEAN create_file ARGS1( * Make sure the target does not already exist */ if (stat(testpath, &dir_info) == -1) { + int code; + char *msg = 0; if (errno != ENOENT) { - sprintf(tmpbuf, + HTSprintf(&msg, gettext("Unable to determine status of '%s'."), testpath); - HTAlert(tmpbuf); - return 0; + HTAlert(msg); + code = 0; + } else { + HTSprintf(&msg,gettext("create %s"),testpath); + args[0] = "touch"; + args[1] = testpath; + args[2] = (char *) 0; + code = (LYExecv(TOUCH_PATH, args, msg) <= 0) ? -1 : 1; } - sprintf(tmpbuf,gettext("create %s"),testpath); - args[0] = "touch"; - args[1] = testpath; - args[2] = (char *) 0; - if (LYExecv(TOUCH_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + FREE(msg); + return code; } else if (S_ISDIR(dir_info.st_mode)) { HTAlert(gettext("There is already a directory with that name! Request ignored.")); } else if (S_ISREG(dir_info.st_mode)) { @@ -860,19 +872,22 @@ PRIVATE BOOLEAN create_directory ARGS1( * Make sure the target does not already exist. */ if (stat(testpath, &dir_info) == -1) { + int code; + char *msg = 0; if (errno != ENOENT) { - sprintf(tmpbuf, - gettext("Unable to determine status of '%s'."), testpath); - HTAlert(tmpbuf); - return 0; + HTSprintf(&msg, + gettext("Unable to determine status of '%s'."), testpath); + HTAlert(msg); + code = 0; + } else { + HTSprintf(&msg,"make directory %s",testpath); + args[0] = "mkdir"; + args[1] = testpath; + args[2] = (char *) 0; + code = (LYExecv(MKDIR_PATH, args, msg) <= 0) ? -1 : 1; } - sprintf(tmpbuf,"make directory %s",testpath); - args[0] = "mkdir"; - args[1] = testpath; - args[2] = (char *) 0; - if (LYExecv(MKDIR_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + FREE(msg); + return code; } else if (S_ISDIR(dir_info.st_mode)) { HTAlert(gettext("There is already a directory with that name! Request ignored.")); } else if (S_ISREG(dir_info.st_mode)) { @@ -918,8 +933,9 @@ PRIVATE BOOLEAN remove_single ARGS1( char *, testpath) { int c; + int code = 0; char *cp; - char tmpbuf[1024]; + char *tmpbuf = 0; struct stat dir_info; char *args[5]; @@ -939,45 +955,45 @@ PRIVATE BOOLEAN remove_single ARGS1( /*** This strlen stuff will probably screw up intl translations /jes ***/ /*** Course, it's probably broken for screen sizes other 80, too ***/ if (strlen(cp) < 37) { - sprintf(tmpbuf, - gettext("Remove '%s' and all of its contents (y or n): "), cp); + HTSprintf0(&tmpbuf, + gettext("Remove '%s' and all of its contents (y or n): "), cp); } else { - sprintf(tmpbuf, - gettext("Remove directory and all of its contents (y or n): ")); + HTSprintf0(&tmpbuf, + gettext("Remove directory and all of its contents (y or n): ")); } } else if (S_ISREG(dir_info.st_mode)) { if (strlen(cp) < 60) { - sprintf(tmpbuf, gettext("Remove file '%s' (y or n): "), cp); + HTSprintf0(&tmpbuf, gettext("Remove file '%s' (y or n): "), cp); } else { - sprintf(tmpbuf, gettext("Remove file (y or n): ")); + HTSprintf0(&tmpbuf, gettext("Remove file (y or n): ")); } #ifdef S_IFLNK } else if (S_ISLNK(dir_info.st_mode)) { if (strlen(cp) < 50) { - sprintf(tmpbuf, gettext("Remove symbolic link '%s' (y or n): "), cp); + HTSprintf0(&tmpbuf, gettext("Remove symbolic link '%s' (y or n): "), cp); } else { - sprintf(tmpbuf, gettext("Remove symbolic link (y or n): ")); + HTSprintf0(&tmpbuf, gettext("Remove symbolic link (y or n): ")); } #endif } else { - sprintf(tmpbuf, gettext("Unable to determine status of '%s'."), testpath); + HTSprintf0(&tmpbuf, gettext("Unable to determine status of '%s'."), testpath); HTAlert(tmpbuf); + FREE(tmpbuf); return 0; } _statusline(tmpbuf); c = LYgetch(); if (TOUPPER(c) == 'Y') { - sprintf(tmpbuf,"remove %s",testpath); + HTSprintf0(&tmpbuf,"remove %s",testpath); args[0] = "rm"; args[1] = "-rf"; args[2] = testpath; args[3] = (char *) 0; - if (LYExecv(RM_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + code = (LYExecv(RM_PATH, args, tmpbuf) <= 0) ? -1 : 1; } - return 0; + FREE(tmpbuf); + return code; } /* @@ -1056,7 +1072,7 @@ PRIVATE BOOLEAN permit_location ARGS3( #else static char tempfile[LY_MAXPATH] = "\0"; char *cp; - char tmpbuf[LINESIZE]; + char *tmpbuf = NULL; char tmpdst[LY_MAXPATH]; struct stat dir_info; @@ -1101,7 +1117,7 @@ PRIVATE BOOLEAN permit_location ARGS3( fprintf(fp0, "<Html><Head>\n<Title>%s</Title>\n</Head>\n<Body>\n", PERMIT_OPTIONS_TITLE); - fprintf(fp0,gettext("<H1>%s%s</H1>\n"), PERMISSIONS_SEGMENT, user_filename); + fprintf(fp0,"<H1>%s%s</H1>\n", PERMISSIONS_SEGMENT, user_filename); { /* * Prevent filenames which include '#' or '?' from messing it up. */ @@ -1160,8 +1176,8 @@ PRIVATE BOOLEAN permit_location ARGS3( (dir_info.st_mode & S_IXOTH) ? "checked" : "", S_ISDIR(dir_info.st_mode) ? "Search" : "Execute"); - fprintf(fp0, gettext( -"<Br>\n<Li><Input Type=\"submit\" Value=\"Submit\"> %s %s %s.\n</Ol>\n</Form>\n"), + fprintf(fp0, +"<Br>\n<Li><Input Type=\"submit\" Value=\"Submit\"> %s %s %s.\n</Ol>\n</Form>\n", gettext("form to permit"), S_ISDIR(dir_info.st_mode) ? "directory" : "file", user_filename); @@ -1275,15 +1291,17 @@ PRIVATE BOOLEAN permit_location ARGS3( /* * Call chmod(). */ - sprintf(tmpbuf, "chmod %.4o %s", (unsigned int)new_mode, destpath); + HTSprintf(&tmpbuf, "chmod %.4o %s", (unsigned int)new_mode, destpath); sprintf(amode, "%.4o", (unsigned int)new_mode); args[0] = "chmod"; args[1] = amode; args[2] = destpath; args[3] = (char *) 0; if (LYExecv(CHMOD_PATH, args, tmpbuf) <= 0) { + FREE(tmpbuf); return (-1); } + FREE(tmpbuf); #endif /* UNIX */ LYforce_no_cache = TRUE; /* Force update of dired listing. */ return 1; @@ -1353,14 +1371,17 @@ PUBLIC void showtags ARGS1( * about not escaping parsing '#' "the URL way" built into HTParse, but that * doesn't look like a clean way.) */ +#ifdef VMS + extern BOOLEAN HadVMSInterrupt; +#endif /* VMS */ PUBLIC int local_dired ARGS1( document *, doc) { char *line_url; /* will point to doc's address, which is a URL */ char *line = NULL; /* same as line_url, but HTUnEscaped, will be alloced */ char *cp, *tp, *bp; - char tmpbuf[256]; - char buffer[512]; + char *tmpbuf = NULL; + char *buffer = NULL; line_url = doc->address; CTRACE(tfp, "local_dired: called for <%s>.\n", @@ -1437,16 +1458,15 @@ PUBLIC int local_dired ARGS1( * Construct the appropriate system command taking care to * escape all path references to avoid spoofing the shell. */ - *buffer = '\0'; if (!strncmp(line, "LYNXDIRED://DECOMPRESS", 22)) { tp = quote_pathname(line + 22); - sprintf(buffer,"%s %s", UNCOMPRESS_PATH, tp); + HTSprintf0(&buffer,"%s %s", UNCOMPRESS_PATH, tp); FREE(tp); #if defined(OK_UUDECODE) && !defined(ARCHIVE_ONLY) } else if (!strncmp(line, "LYNXDIRED://UUDECODE", 20)) { tp = quote_pathname(line + 20); - sprintf(buffer,"%s %s", UUDECODE_PATH, tp); + HTSprintf0(&buffer,"%s %s", UUDECODE_PATH, tp); HTAlert(gettext("Warning! UUDecoded file will exist in the directory you started Lynx.")); FREE(tp); #endif /* OK_UUDECODE && !ARCHIVE_ONLY */ @@ -1458,8 +1478,8 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line+20); *cp++ = '\0'; cp = quote_pathname(line + 20); - sprintf(buffer, "%s -qdc %s | (cd %s; %s -xf -)", - GZIP_PATH, tp, cp, TAR_PATH); + HTSprintf0(&buffer, "%s -qdc %s | (cd %s; %s -xf -)", + GZIP_PATH, tp, cp, TAR_PATH); FREE(cp); FREE(tp); # endif /* OK_GZIP */ @@ -1468,8 +1488,8 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line + 19); *cp++ = '\0'; cp = quote_pathname(line + 19); - sprintf(buffer, "%s %s | (cd %s; %s -xf -)", - ZCAT_PATH, tp, cp, TAR_PATH); + HTSprintf0(&buffer, "%s %s | (cd %s; %s -xf -)", + ZCAT_PATH, tp, cp, TAR_PATH); FREE(cp); FREE(tp); @@ -1477,7 +1497,7 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line + 17); *cp++ = '\0'; cp = quote_pathname(line + 17); - sprintf(buffer, "cd %s; %s -xf %s", cp, TAR_PATH, tp); + HTSprintf0(&buffer, "cd %s; %s -xf %s", cp, TAR_PATH, tp); FREE(cp); FREE(tp); # endif /* !ARCHIVE_ONLY */ @@ -1487,8 +1507,8 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line + 18); - sprintf(buffer, "(cd %s; %s -cf - %s) | %s -qc >%s/%s.tar.gz", - tp, TAR_PATH, cp, GZIP_PATH, tp, cp); + HTSprintf0(&buffer, "(cd %s; %s -cf - %s) | %s -qc >%s/%s.tar.gz", + tp, TAR_PATH, cp, GZIP_PATH, tp, cp); FREE(cp); FREE(tp); # endif /* OK_GZIP */ @@ -1497,8 +1517,8 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line + 17); - sprintf(buffer, "(cd %s; %s -cf - %s) | %s >%s/%s.tar.Z", - tp, TAR_PATH, cp, COMPRESS_PATH, tp, cp); + HTSprintf0(&buffer, "(cd %s; %s -cf - %s) | %s >%s/%s.tar.Z", + tp, TAR_PATH, cp, COMPRESS_PATH, tp, cp); FREE(cp); FREE(tp); @@ -1506,7 +1526,7 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; cp = quote_pathname(cp); tp = quote_pathname(line + 15); - sprintf(buffer, "(cd %s; %s -cf %s.tar %s)", + HTSprintf0(&buffer, "(cd %s; %s -cf %s.tar %s)", tp, TAR_PATH, cp, cp); FREE(cp); FREE(tp); @@ -1515,12 +1535,12 @@ PUBLIC int local_dired ARGS1( #ifdef OK_GZIP } else if (!strncmp(line, "LYNXDIRED://GZIP", 16)) { tp = quote_pathname(line + 16); - sprintf(buffer, "%s -q %s", GZIP_PATH, tp); + HTSprintf0(&buffer, "%s -q %s", GZIP_PATH, tp); FREE(tp); #ifndef ARCHIVE_ONLY } else if (!strncmp(line, "LYNXDIRED://UNGZIP", 18)) { tp = quote_pathname(line + 18); - sprintf(buffer, "%s -d %s", GZIP_PATH, tp); + HTSprintf0(&buffer, "%s -d %s", GZIP_PATH, tp); FREE(tp); #endif /* !ARCHIVE_ONLY */ #endif /* OK_GZIP */ @@ -1531,7 +1551,7 @@ PUBLIC int local_dired ARGS1( *cp++ = '\0'; bp = quote_pathname(cp); cp = quote_pathname(line + 15); - sprintf(buffer, "cd %s; %s -rq %s.zip %s", cp, ZIP_PATH, tp, bp); + HTSprintf0(&buffer, "cd %s; %s -rq %s.zip %s", cp, ZIP_PATH, tp, bp); FREE(cp); FREE(bp); FREE(tp); @@ -1540,7 +1560,7 @@ PUBLIC int local_dired ARGS1( tp = quote_pathname(line + 17); *cp = '\0'; cp = quote_pathname(line + 17); - sprintf(buffer, "cd %s; %s -q %s", cp, UNZIP_PATH, tp); + HTSprintf0(&buffer, "cd %s; %s -q %s", cp, UNZIP_PATH, tp); FREE(cp); FREE(tp); # endif /* !ARCHIVE_ONLY */ @@ -1548,23 +1568,22 @@ PUBLIC int local_dired ARGS1( } else if (!strncmp(line, "LYNXDIRED://COMPRESS", 20)) { tp = quote_pathname(line + 20); - sprintf(buffer, "%s %s", COMPRESS_PATH, tp); + HTSprintf0(&buffer, "%s %s", COMPRESS_PATH, tp); FREE(tp); } - if (strlen(buffer)) { + if (buffer != 0) { if (strlen(buffer) < 60) { - sprintf(tmpbuf, gettext("Executing %s "), buffer); + HTSprintf0(&tmpbuf, gettext("Executing %s "), buffer); } else { - sprintf(tmpbuf, - gettext("Executing system command. This might take a while.")); + HTSprintf0(&tmpbuf, + gettext("Executing system command. This might take a while.")); } _statusline(tmpbuf); stop_curses(); printf("%s\n", tmpbuf); LYSystem(buffer); #ifdef VMS - extern BOOLEAN HadVMSInterrupt HadVMSInterrupt = FALSE; #endif /* VMS */ start_curses(); @@ -1572,6 +1591,8 @@ PUBLIC int local_dired ARGS1( } } + FREE(tmpbuf); + FREE(buffer); FREE(line); LYpop(doc); return 0; @@ -1777,7 +1798,7 @@ PUBLIC BOOLEAN local_install ARGS3( char *, srcpath, char **, newpath) { - char tmpbuf[512]; + char *tmpbuf = NULL; static char savepath[512]; /* This will be the link that is to be installed. */ struct stat dir_info; @@ -1819,7 +1840,7 @@ PUBLIC BOOLEAN local_install ARGS3( src = n++; args[n++] = destpath; args[n] = (char *)0; - sprintf(tmpbuf, "install %s", destpath); + HTSprintf(&tmpbuf, "install %s", destpath); tag = tagged; if (HTList_isEmpty(tagged)) { @@ -1840,6 +1861,7 @@ PUBLIC BOOLEAN local_install ARGS3( } clear_tags(); } + FREE(tmpbuf); HTInfoMsg(gettext("Installation complete")); return count; } @@ -2030,7 +2052,7 @@ PRIVATE int LYExecv ARGS3( return(0); #else int rc; - char tmpbuf[512]; + char *tmpbuf = 0; pid_t pid; #if HAVE_TYPE_UNIONWAIT union wait wstatus; @@ -2046,12 +2068,11 @@ PRIVATE int LYExecv ARGS3( } rc = 1; /* It will work */ - tmpbuf[0] = '\0'; /* empty buffer for alert messages */ stop_curses(); pid = fork(); /* fork and execute rm */ switch (pid) { case -1: - sprintf(tmpbuf, gettext("Unable to %s due to system error!"), msg); + HTSprintf(&tmpbuf, gettext("Unable to %s due to system error!"), msg); rc = 0; break; /* don't fall thru! - KW */ case 0: /* child */ @@ -2076,8 +2097,8 @@ PRIVATE int LYExecv ARGS3( #endif /* !HAVE_WAITPID */ if (WEXITSTATUS(wstatus) != 0 || WTERMSIG(wstatus) > 0) { /* error return */ - sprintf(tmpbuf, gettext("Probable failure to %s due to system error!"), - msg); + HTSprintf(&tmpbuf, gettext("Probable failure to %s due to system error!"), + msg); rc = 0; } } @@ -2090,8 +2111,9 @@ PRIVATE int LYExecv ARGS3( sleep(AlertSecs); } start_curses(); - if (tmpbuf[0]) { + if (tmpbuf != 0) { HTAlert(tmpbuf); + FREE(tmpbuf); } return(rc); diff --git a/src/LYMail.c b/src/LYMail.c index dd8a2141..73bf04bd 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -1420,7 +1420,7 @@ PUBLIC void reply_by_mail ARGS3( */ addstr(ENTER_SUBJECT_LINE); addstr(CTRL_U_TO_ERASE); - addstr(gettext("Subject: ")); + addstr(SUBJECT_PROMPT); /* Add the default subject. */ sprintf(user_input, "%.70s%.63s", (subject[0] != '\0') ? diff --git a/src/LYMain.c b/src/LYMain.c index 7d8c8e75..12edc851 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1294,7 +1294,7 @@ PUBLIC int main ARGS2( * Set up default foreground and background colors. */ lynx_setup_colors(); -#endif /* USE_SLANG */ +#endif /* USE_COLOR_TABLE */ /* * Set the compilation default signature file. - FM diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index f9268079..9b601f3c 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -1058,6 +1058,8 @@ try_again: start_curses(); clear(); refresh_screen = TRUE; /* to force a redraw */ + if (HTMainText) /* to REALLY force it... - kw */ + HText_setStale(HTMainText); recent_sizechange = FALSE; if (user_mode == NOVICE_MODE) { display_lines = LYlines-4; diff --git a/src/LYMap.c b/src/LYMap.c index 68845bec..55b44121 100644 --- a/src/LYMap.c +++ b/src/LYMap.c @@ -193,7 +193,7 @@ PUBLIC BOOL LYAddImageMap ARGS3( new = (old != NULL) ? old : (LYImageMap *)calloc(1, sizeof(LYImageMap)); if (new == NULL) { - perror(gettext("Out of memory in LYAddImageMap")); + outofmem(__FILE__, "LYAddImageMap"); return FALSE; } StrAllocCopy(new->address, address); @@ -434,7 +434,7 @@ PRIVATE int LYLoadIMGmap ARGS4 ( if (anAnchor->post_data && !WWWDoc.safe && ((underlying && underlying->document && !LYforce_no_cache) || HTConfirm(CONFIRM_POST_RESUBMISSION) != TRUE)) { - HTAlert(gettext("Image map from POST response not available!")); + HTAlert(FAILED_MAP_POST_REQUEST); return(HT_NOT_LOADED); } LYforce_no_cache = TRUE; @@ -471,7 +471,7 @@ PRIVATE int LYLoadIMGmap ARGS4 ( if (anAnchor->post_data && !WWWDoc.safe && ((underlying && underlying->document && !LYforce_no_cache) || HTConfirm(CONFIRM_POST_RESUBMISSION) != TRUE)) { - HTAlert(gettext("Image map from POST response not available!")); + HTAlert(FAILED_MAP_POST_REQUEST); return(HT_NOT_LOADED); } LYforce_no_cache = TRUE; diff --git a/src/LYOptions.c b/src/LYOptions.c index 073e38d6..848e4a25 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -2528,9 +2528,16 @@ redraw: #endif /* USE_SLANG */ term_options = FALSE; - c = LYgetch(); + c = LYgetch_for(FOR_CHOICE); if (term_options || c == 3 || c == 7) { cmd = LYK_QUIT; +#ifndef USE_SLANG + } else if (c == MOUSE_KEY) { + if ((cmd = fancy_mouse(form_window, i + 1 + window_offset, &cur_choice)) < 0) + goto redraw; + if (cmd == LYK_ACTIVATE) + break; +#endif } else { cmd = keymap[c+1]; } @@ -4154,7 +4161,7 @@ PUBLIC int gen_options ARGS1( /* * File Management Options */ - fprintf(fp0,"\n <em>%s</em>\n", gettext("File Management Options")); + fprintf(fp0,"\n <em>%s</em>\n", DIRED_MENU_TITLE); /* FTP sort: SELECT */ PutLabel(fp0, gettext("FTP sort criteria")); diff --git a/src/LYPrint.c b/src/LYPrint.c index 1b0c7d4b..e7b3e27f 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -838,7 +838,7 @@ PUBLIC int printfile ARGS1( sprintf(buffer, "%s -t \"%s\" -F %s", system_mail, user_response, tempfile); LYCloseTempFP(outfile_fp); /* Close the tmpfile. */ stop_curses(); - printf("%s\n\n$ %s\n\n%s", gettext("Sending"), buffer, gettext("Please wait...")); + printf("%s\n\n$ %s\n\n%s", gettext("Sending"), buffer, PLEASE_WAIT); LYSystem(buffer); sleep(MessageSecs); start_curses(); @@ -1320,8 +1320,10 @@ PUBLIC int print_options ARGS3( if (no_print || no_disk_save || child_lynx || no_mail) fprintf(fp0, " <em>%s</em>\n", gettext("Some print functions have been disabled!")); - fprintf(fp0, "\n%s %s\n", gettext("options:"), - (user_mode == NOVICE_MODE) ? gettext("Standard print") : gettext("Print")); + fprintf(fp0, "\n%s\n", + (user_mode == NOVICE_MODE) + ? gettext("Standard print options:") + : gettext("Print options:")); if (child_lynx == FALSE && no_disk_save == FALSE && no_print == FALSE) { fprintf(fp0, diff --git a/src/LYStrings.c b/src/LYStrings.c index 7505f20e..6f4ac249 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1,6 +1,5 @@ #include <HTUtils.h> #include <HTCJK.h> -#include <LYCurses.h> #include <LYUtils.h> #include <LYStrings.h> #include <LYGlobalDefs.h> @@ -39,13 +38,123 @@ extern HTCJKlang HTCJK; /* The number of the link selected w/ the mouse (-1 if none) */ static int mouse_link = -1; +static int have_levent; + +#ifdef NCURSES_MOUSE_VERSION +static MEVENT levent; +#endif + +/* Return the value of mouse_link */ +PUBLIC int peek_mouse_levent NOARGS +{ +#ifdef NCURSES_MOUSE_VERSION + if (have_levent) { + ungetmouse(&levent); + return 1; + } +#endif + return 0; +} + /* Return the value of mouse_link, erasing it */ PUBLIC int get_mouse_link NOARGS { - int t; - t=mouse_link; - mouse_link = -1; - return t; + int t; + t = mouse_link; + mouse_link = -1; + if (t < 0) + t = -1; /* Backward compatibility. */ + return t; +} + +/* Return the value of mouse_link */ +PUBLIC int peek_mouse_link NOARGS +{ + return mouse_link; +} + +PUBLIC int fancy_mouse ARGS3( + WINDOW *, win, + int, row, + int *, position) +{ + int cmd = LYK_DO_NOTHING; +#ifdef NCURSES_MOUSE_VERSION +#ifndef getbegx +#define getbegx(win) ((win)->_begx) +#endif +#ifndef getbegy +#define getbegy(win) ((win)->_begy) +#endif + MEVENT event; + + getmouse(&event); + if ((event.bstate & (BUTTON1_CLICKED + | BUTTON1_DOUBLE_CLICKED + | BUTTON1_TRIPLE_CLICKED)) + && (event.x >= getbegx(win) + && (event.x < (getbegx(win) + getmaxx(win))))) { + int mypos = event.y - getbegy(win); + int delta = mypos - row; + + if (mypos+1 == getmaxy(win)) { + /* At the decorative border: scroll forward */ + if (event.bstate & BUTTON1_TRIPLE_CLICKED) + cmd = LYK_END; + else if (event.bstate & BUTTON1_DOUBLE_CLICKED) + cmd = LYK_NEXT_PAGE; + else + cmd = LYK_NEXT_LINK; + } else if (mypos >= getmaxy(win)) { + if (event.bstate & (BUTTON1_DOUBLE_CLICKED + | BUTTON1_TRIPLE_CLICKED)) + cmd = LYK_END; + else + cmd = LYK_NEXT_PAGE; + } else if (mypos == 0) { + /* At the decorative border: scroll back */ + if (event.bstate & BUTTON1_TRIPLE_CLICKED) + cmd = LYK_HOME; + else if (event.bstate & BUTTON1_DOUBLE_CLICKED) + cmd = LYK_PREV_PAGE; + else + cmd = LYK_PREV_LINK; + } else if (mypos < 0) { + if (event.bstate & (BUTTON1_DOUBLE_CLICKED + | BUTTON1_TRIPLE_CLICKED)) + cmd = LYK_HOME; + else + cmd = LYK_PREV_PAGE; +#ifdef KNOW_HOW_TO_TOGGLE + } else if (event.bstate & (BUTTON_CTRL)) { + cur_selection += delta; + cmd = LYX_TOGGLE; +#endif + } else if (event.bstate & (BUTTON_ALT | BUTTON_SHIFT | BUTTON_CTRL)) { + /* Probably some unrelated activity, such as selecting some text. + * Select, but do nothing else. + */ + *position += delta; + cmd = -1; + } else { + /* No scrolling or overflow checks necessary. */ + *position += delta; +#if 0 + /* Immediate action looks reasonable since we have no help + * available for individual options. Moreover, one can position + * active element with shift-click-1. (;-) + */ + if (!(event.bstate & (BUTTON1_DOUBLE_CLICKED + | BUTTON1_TRIPLE_CLICKED))) + goto redraw; +#endif + cmd = LYK_ACTIVATE; + } + } else if (event.bstate & (BUTTON3_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED)) { + cmd = LYK_QUIT; + } +#endif + return cmd; } /* Given X and Y coordinates of a mouse event, set mouse_link to the @@ -55,7 +164,7 @@ PUBLIC int get_mouse_link NOARGS ** link. **/ -PRIVATE int set_clicked_link ARGS2(int,x,int,y) +PRIVATE int set_clicked_link ARGS3(int,x,int,y,int,code) { int left = 6; int right = LYcols-6; @@ -64,21 +173,44 @@ PRIVATE int set_clicked_link ARGS2(int,x,int,y) int c = -1; if (y == (LYlines-1)) { + mouse_link = -2; if (x < left) c = LTARROW; else if (x > right) c = '\b'; else c = PGDOWN; } else if (y == 0) { + mouse_link = -2; if (x < left) c = LTARROW; else if (x > right) c = '\b'; else c = PGUP; } else { /* Loop over the links and see if we can get a match */ for (i = 0; i < nlinks; i++) { + int len, lx = links[i].lx, is_text = 0; + + if (links[i].type == WWW_FORM_LINK_TYPE + /* XXXX What else? */ + && (links[i].form->type == F_TEXTAREA_TYPE + || links[i].form->type == F_TEXT_TYPE)) + is_text = 1; + + if (is_text) + len = links[i].form->size; + else + len = strlen(links[i].hightext ); + /* Check the first line of the link */ if ( links[i].hightext != NULL && - links[i].ly == y && - (x - links[i].lx) < (int)strlen(links[i].hightext ) ) { - mouse_link = i; + links[i].ly == y && (x - lx) < len && (x >= lx)) { + int cury, curx; + + if (code != FOR_INPUT + /* Do not pick up the current input field */ + || !(LYGetYX(cury,curx), + (cury == y && (curx >= lx) && ((curx - lx) <= len)))) { + if (is_text) + have_levent = 1; + mouse_link = i; + } break; } /* Check the second line */ @@ -324,7 +456,7 @@ PRIVATE int sl_read_mouse_event NOARGS if (-1 != sl_parse_mouse_event (&mouse_x, &mouse_y, &button)) { if (button == 0) /* left */ - return set_clicked_link (mouse_x, mouse_y); + return set_clicked_link (mouse_x, mouse_y, FOR_PANEL); if (button == 2) /* right */ { @@ -809,6 +941,12 @@ PUBLIC int LYgetch NOARGS return keysym; } +PUBLIC int LYgetch_for ARGS1( + int, code) +{ + return LYgetch(); +} + #else /* !USE_KEYMAPS */ /* @@ -818,8 +956,16 @@ PUBLIC int LYgetch NOARGS PUBLIC int LYgetch NOARGS { + return LYgetch_for(FOR_PANEL); +} + +PUBLIC int LYgetch_for ARGS1( + int, code) +{ int a, b, c, d = -1; + have_levent = 0; + #if defined(IGNORE_CTRL_C) || defined(USE_GETCHAR) || !defined(NCURSES) re_read: #endif /* IGNORE_CTRL_C || USE_GETCHAR */ @@ -1105,7 +1251,9 @@ re_read: #endif /* KEY_DC */ #ifdef NCURSES_MOUSE_VERSION case KEY_MOUSE: - { + if (code == FOR_CHOICE) { + c = MOUSE_KEY; /* Will be processed by the caller */ + } else { #ifndef DOSPATH MEVENT event; int err; @@ -1113,17 +1261,31 @@ re_read: c = -1; mouse_link = -1; err = getmouse(&event); + levent = event; /* Allow setting pos in entry fields */ if (event.bstate & BUTTON1_CLICKED) { - c = set_clicked_link(event.x, event.y); + c = set_clicked_link(event.x, event.y, code); + } else if (event.bstate & BUTTON1_DOUBLE_CLICKED) { + c = set_clicked_link(event.x, event.y, code); + if (c == PGDOWN) + c = END_KEY; + else if (c == PGUP) + c = HOME; + else if (c == LTARROW) + c = LYReverseKeymap(LYK_MAIN_MENU); } else if (event.bstate & BUTTON3_CLICKED) { c = LYReverseKeymap (LYK_PREV_DOC); } + if (code == FOR_INPUT && mouse_link == -1) { + ungetmouse(&event); /* Caller will process this. */ + getch(); /* ungetmouse puts KEY_MOUSE back */ + c = MOUSE_KEY; + } #else /* pdcurses version */ c = -1; mouse_link = -1; request_mouse_pos(); if (BUTTON_STATUS(1) & BUTTON_CLICKED) { - c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS); + c = set_clicked_link(MOUSE_X_POS, MOUSE_Y_POS, FOR_PANEL); } else if (BUTTON_STATUS(3) & BUTTON_CLICKED) { c = LYReverseKeymap (LYK_PREV_DOC); } diff --git a/src/LYStrings.h b/src/LYStrings.h index 8f53178c..7bb6f95b 100644 --- a/src/LYStrings.h +++ b/src/LYStrings.h @@ -1,7 +1,7 @@ #ifndef LYSTRINGS_H #define LYSTRINGS_H -#include <HTUtils.h> +#include <LYCurses.h> /* UPPER8(ch1,ch2) is an extension of (TOUPPER(ch1) - TOUPPER(ch2)) */ extern int UPPER8 PARAMS(( @@ -9,12 +9,18 @@ extern int UPPER8 PARAMS(( int ch2)); extern int get_mouse_link NOPARAMS; +extern int peek_mouse_link NOPARAMS; +extern int peek_mouse_levent NOPARAMS; +extern int fancy_mouse PARAMS((WINDOW *win, int row, int *position)); + extern char * LYstrncpy PARAMS(( char * dst, CONST char * src, int n)); extern void ena_csi PARAMS((BOOLEAN flag)); extern int LYgetch NOPARAMS; +extern int LYgetch_for PARAMS(( + int code)); extern int LYgetstr PARAMS(( char * inputline, int hidden, @@ -84,7 +90,12 @@ extern char * SNACat PARAMS(( #define SELECT_KEY 267 /* 0x10B */ #define INSERT_KEY 268 /* 0x10C */ #define REMOVE_KEY 269 /* 0x10D */ -#define DO_NOTHING 270 /* 0x10E */ +#define MOUSE_KEY 270 /* 0x10E */ +#define DO_NOTHING 271 /* 0x10F */ + +# define FOR_PANEL 0 +# define FOR_CHOICE 1 +# define FOR_INPUT 2 #define VISIBLE 0 #define HIDDEN 1 diff --git a/src/LYStructs.h b/src/LYStructs.h index ff58cd87..78075f48 100644 --- a/src/LYStructs.h +++ b/src/LYStructs.h @@ -1,10 +1,6 @@ #ifndef LYSTRUCTS_H #define LYSTRUCTS_H -#ifndef USERDEFS_H -#include <userdefs.h> -#endif /* USERDEFS_H */ - #ifndef HTANCHOR_H #include <HTAnchor.h> #endif /* HTANCHOR_H */ diff --git a/src/LYUtils.c b/src/LYUtils.c index eb9ed2c5..554914b4 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -2837,7 +2837,7 @@ PUBLIC BOOLEAN inlocaldomain NOARGS #endif /* LINUX */ } else { - CTRACE(tfp,"Could not get ttyname or open UTMP file"); + CTRACE(tfp,"Could not get ttyname or open UTMP file %s\n", UTMP_FILE); } return(FALSE); @@ -5511,6 +5511,7 @@ PRIVATE BOOL IsOurFile ARGS1(char *, name) PRIVATE FILE *OpenHiddenFile ARGS2(char *, name, char *, mode) { FILE *fp = 0; + struct stat data; #if defined(O_CREAT) && defined(O_EXCL) /* we have fcntl.h or kindred? */ /* @@ -5532,10 +5533,12 @@ PRIVATE FILE *OpenHiddenFile ARGS2(char *, name, char *, mode) } else #endif - if (*mode == 'a' - && IsOurFile(name) - && chmod(name, HIDE_CHMOD) == 0) - fp = fopen(name, mode); + if (*mode == 'a') { + if (IsOurFile(name) + && chmod(name, HIDE_CHMOD) == 0) + fp = fopen(name, mode); + else if (lstat(name, &data) != 0) + fp = OpenHiddenFile(name, "w"); /* * This is less stringent, but reasonably portable. For new files, the * umask will suffice; however if the file already exists we'll change @@ -5545,7 +5548,7 @@ PRIVATE FILE *OpenHiddenFile ARGS2(char *, name, char *, mode) * * This won't work properly if the user is root, since the chmod succeeds. */ - else if (*mode != 'a') { + } else if (*mode != 'a') { int save = umask(HIDE_UMASK); if (chmod(name, HIDE_CHMOD) == 0 || errno == ENOENT) fp = fopen(name, mode); diff --git a/src/UCdomap.c b/src/UCdomap.c index 2ce2ac2c..2d49dc26 100644 --- a/src/UCdomap.c +++ b/src/UCdomap.c @@ -471,7 +471,7 @@ PRIVATE void UC_con_set_trans ARGS3( int, update_flag) { int i, j; - u16 *p; + CONST u16 *p; u16 *ptrans; if (!UC_valid_UC_charset(UC_charset_in_hndl)) { @@ -533,7 +533,7 @@ PRIVATE char* **uni_pagedir_str[32] = NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -PRIVATE u16 * UC_current_unitable = NULL; +PRIVATE CONST u16 * UC_current_unitable = NULL; PRIVATE struct unimapdesc_str *UC_current_unitable_str = NULL; /* @@ -558,8 +558,8 @@ static char* **unidefault_pagedir_str[32] = NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -PRIVATE u16 * UC_default_unitable = NULL; -PRIVATE struct unimapdesc_str *UC_default_unitable_str = NULL; +PRIVATE CONST u16 * UC_default_unitable = 0; +PRIVATE CONST struct unimapdesc_str *UC_default_unitable_str = 0; PRIVATE int con_insert_unipair ARGS3( u16, unicode, @@ -745,7 +745,7 @@ PRIVATE int con_set_unimap ARGS2( PRIVATE void con_set_default_unimap NOARGS { int i, j; - u16 *p; + CONST u16 *p; /* * The default font is always 256 characters. @@ -784,7 +784,7 @@ PRIVATE int UC_con_set_unimap ARGS2( int, update_flag) { int i, j; - u16 *p; + CONST u16 *p; if (!UC_valid_UC_charset(UC_charset_out_hndl)) { CTRACE(tfp, "UC_con_set_unimap: Invalid charset handle %d.\n", @@ -1028,7 +1028,7 @@ PUBLIC int UCTransUniChar ARGS2( int rc = 0; int UChndl_out; int isdefault, trydefault = 0; - u16 * ut; + CONST u16 * ut; if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) { if ((UChndl_out = default_UChndl) < 0) @@ -1079,7 +1079,7 @@ PUBLIC int UCTransUniCharStr ARGS5( int UChndl_out; int isdefault, trydefault = 0; struct unimapdesc_str * repl; - u16 * ut; + CONST u16 * ut; if (buflen < 2) return -13; @@ -1204,7 +1204,7 @@ PUBLIC int UCTransChar ARGS3( int rc = -4; int UChndl_in, UChndl_out; int isdefault, trydefault = 0; - u16 * ut; + CONST u16 * ut; int upd = 0; #ifndef UC_NO_SHORTCUTS @@ -1311,7 +1311,7 @@ PUBLIC int UCReverseTransChar ARGS3( int UChndl_in, UChndl_out; int isdefault; int i_ch = (unsigned char)ch_out; - u16 * ut; + CONST u16 * ut; #ifndef UC_NO_SHORTCUTS if (charset_in == charset_out) @@ -1377,7 +1377,7 @@ PUBLIC int UCTransCharStr ARGS6( int UChndl_in, UChndl_out; int isdefault, trydefault = 0; struct unimapdesc_str * repl; - u16 * ut; + CONST u16 * ut; int upd = 0; if (buflen < 2) @@ -1690,7 +1690,7 @@ PRIVATE CONST char ** UC_setup_LYCharSets_repl ARGS2( CONST char **ISO_Latin1 = LYCharSets[0]; CONST char **p; char **prepl; - u16 *pp; + CONST u16 *pp; CONST char **tp; CONST char *s7; CONST char *s8; @@ -1934,8 +1934,8 @@ PRIVATE int UC_Register_with_LYCharSets ARGS4( PUBLIC void UC_Charset_Setup ARGS9( CONST char *, UC_MIMEcharset, CONST char *, UC_LYNXcharset, - u8 *, unicount, - u16 *, unitable, + CONST u8 *, unicount, + CONST u16 *, unitable, int, nnuni, struct unimapdesc_str, replacedesc, int, lowest_eight, diff --git a/src/UCdomap.h b/src/UCdomap.h index 6805b712..16541353 100644 --- a/src/UCdomap.h +++ b/src/UCdomap.h @@ -24,8 +24,8 @@ extern void UC_Charset_Setup PARAMS(( CONST char * UC_MIMEcharset, CONST char * UC_LYNXcharset, - u8 * unicount, - u16 * unitable, + CONST u8 * unicount, + CONST u16 * unitable, int nnuni, struct unimapdesc_str replacedesc, int lowest_eight, @@ -40,8 +40,8 @@ int UC_GNhandles[4] = {-1, -1, -1, -1}; struct UC_charset { CONST char *MIMEname; CONST char *LYNXname; - u8* unicount; - u16* unitable; + CONST u8* unicount; + CONST u16* unitable; int num_uni; struct unimapdesc_str replacedesc; int uc_status; diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c index b9d2c520..1207d3d1 100644 --- a/src/chrtrans/makeuctb.c +++ b/src/chrtrans/makeuctb.c @@ -694,7 +694,7 @@ PUBLIC int main ARGS2( *\n\ */\n\ \n\ -static u8 dfont_unicount%s[%d] = \n\ +static CONST u8 dfont_unicount%s[%d] = \n\ {\n\t", argv[0], argv[1], id_append, fontlen); for (i = 0; i < fontlen; i++) { @@ -720,10 +720,10 @@ static u8 dfont_unicount%s[%d] = \n\ } if (nuni) { - printf("\nstatic u16 dfont_unitable%s[%d] = \n{\n\t", + printf("\nstatic CONST u16 dfont_unitable%s[%d] = \n{\n\t", id_append, nuni); } else { - printf("\nstatic u16 dfont_unitable%s[1]; /* dummy */\n", id_append); + printf("\nstatic CONST u16 dfont_unitable%s[1]; /* dummy */\n", id_append); } fp0 = 0; @@ -766,11 +766,11 @@ static struct unipair_str repl_map%s[%d] = \n\ } if (themap_str.entry_ct) { printf("\n\ -static struct unimapdesc_str dfont_replacedesc%s = {%d,repl_map%s,", +static CONST struct unimapdesc_str dfont_replacedesc%s = {%d,repl_map%s,", id_append, themap_str.entry_ct, id_append); } else { printf("\n\ -static struct unimapdesc_str dfont_replacedesc%s = {0,NULL,",id_append); +static CONST struct unimapdesc_str dfont_replacedesc%s = {0,NULL,",id_append); } printf("%d,%d};\n", this_isDefaultMap ? 1 : 0, diff --git a/userdefs.h b/userdefs.h index 94f44c1c..2245be19 100644 --- a/userdefs.h +++ b/userdefs.h @@ -1201,9 +1201,9 @@ * program execution. See the comments in LYMessages_en.h for * information on translating or customizing them for your site. */ -#ifndef HTTELNET_H -#include "LYMessages_en.h" -#endif /* !HTTELNET_H */ +#ifndef LYMESSAGES_EN_H +#include <LYMessages_en.h> +#endif /* !LYMESSAGES_EN_H */ /**************************************************************** @@ -1216,12 +1216,12 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.2dev.7" +#define LYNX_VERSION "2.8.2dev.8" #define LYNX_WWW_HOME "http://lynx.browser.org/" #define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/" #define LYNX_RELEASE FALSE /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */ -#define LYNX_DATE "Mon, 23 Nov 1998 03:46:03 -0700" +#define LYNX_DATE "Thu, 03 Dec 1998 11:28:20 -0700" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */ #define LYNX_RELEASE_DATE "1998" |