[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev 2.8.2dev.17 patch 3 - more info
From: |
Klaus Weide |
Subject: |
lynx-dev 2.8.2dev.17 patch 3 - more info |
Date: |
Thu, 4 Mar 1999 05:03:10 -0600 (CST) |
I had done this already in my copy anyway, and since Larry asked for
more info to be shown, here it is. Doesn't include Content-type,
though. For that, HEAD should still be used.
The added bits can be easily disabled by removing #define ADVANCED_INFO
(and it could be made ./configure-able, if someone really thinks that's
worth the trouble). Or if a more-advanced-than-ADVANCED_MODE user mode
is introduced, the additional info could depend on that.
Formatting of the new info may be a bit ugly, does anyone want to improve
it?
Note that header information on the '=' screen can sometimes differ from
what HEAD shows, because
1. '=' info has gone through some processing by lynx already,
2. '=' info can come from META tags,
2. the server may not react correcty to HEAD requests.
Klaus
* Add some more pieces of info (if available) to '=' page in advanced
user mode. Also show mode as "source" instead of "normal" if viewing
SOURCE, in all user modes.
--- lynx2-8-2.old/src/LYShowInfo.c Wed Feb 17 08:29:32 1999
+++ lynx2-8-2/src/LYShowInfo.c Thu Mar 4 04:45:15 1999
@@ -22,6 +22,8 @@
#include <LYLocal.h>
#endif /* DIRED_SUPPORT */
+#define ADVANCED_INFO 1 /* to get more info in advanced mode */
+
#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
#define HAVE_CFG_DEFS_H
@@ -89,6 +91,9 @@
char *Address = NULL, *Title = NULL;
char *name;
CONST char *cp;
+#ifdef ADVANCED_INFO
+ BOOLEAN LYInfoAdvanced = (user_mode == ADVANCED_MODE);
+#endif
#ifdef DIRED_SUPPORT
char temp[LY_MAXPATH];
@@ -324,6 +329,28 @@
if ((cp = HText_getLastModified()) != NULL && *cp != '\0')
fprintf(fp0, "<dt><em>%s</em> %s\n", gettext("Last Mod:"), cp);
+#ifdef ADVANCED_INFO
+ if (LYInfoAdvanced) {
+ if (HTMainAnchor && HTMainAnchor->expires) {
+ fprintf(fp0, "<dt><em>%s</em> %s\n",
+ gettext(" Expires:"), HTMainAnchor->expires);
+ }
+ if (HTMainAnchor && HTMainAnchor->cache_control) {
+ fprintf(fp0, "<dt><em>%s</em> %s\n",
+ gettext("Cache-Control:"), HTMainAnchor->cache_control);
+ }
+ if (HTMainAnchor && HTMainAnchor->content_length > 0) {
+ fprintf(fp0, "<dt><em>%s</em> %d %s\n",
+ gettext("Content-Length:"),
+ HTMainAnchor->content_length, gettext("bytes"));
+ }
+ if (HTMainAnchor && HTMainAnchor->content_language) {
+ fprintf(fp0, "<dt><em>%s</em> %s\n",
+ gettext("Language:"), HTMainAnchor->content_language);
+ }
+ }
+#endif /* ADVANCED_INFO */
+
if (doc->post_data) {
fprintf(fp0, "<dt><em>%s</em> <xmp>%s</xmp>\n",
gettext("Post Data:"), doc->post_data);
@@ -342,15 +369,29 @@
fprintf(fp0, "<dt> <em>%s</em> %d %s\n",
gettext("size:"), size_of_file, gettext("lines"));
- fprintf(fp0, "<dt> <em>%s</em> %s%s%s\n",
+ fprintf(fp0, "<dt> <em>%s</em> %s%s%s",
gettext("mode:"),
(lynx_mode == FORMS_LYNX_MODE ?
- gettext("forms mode") : gettext("normal")),
+ gettext("forms mode") :
+ HTisDocumentSource() ?
+ gettext("source") : gettext("normal")),
(doc->safe ? gettext(", safe") : ""),
(doc->internal_link ? gettext(", internal link") : "")
);
+#ifdef ADVANCED_INFO
+ if (LYInfoAdvanced) {
+ fprintf(fp0, "%s%s%s\n",
+ (HText_hasNoCacheSet(HTMainText) ?
+ gettext(", no-cache") : ""),
+ (HTAnchor_isISMAPScript((HTAnchor *)HTMainAnchor) ?
+ gettext(", ISMAP script") : ""),
+ (doc->bookmark ?
+ gettext(", bookmark file") : "")
+ );
+ }
+#endif /* ADVANCED_INFO */
- fprintf(fp0, "</dl>\n"); /* end of list */
+ fprintf(fp0, "\n</dl>\n"); /* end of list */
if (nlinks > 0) {
fprintf(fp0, "<h2>%s</h2>\n<dl compact>",
- lynx-dev 2.8.2dev.17 patch 3 - more info,
Klaus Weide <=