diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-03-18 03:40:20 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-03-18 03:40:20 -0500 |
commit | 79de405977ac0d7820576b353dde07ce09cedba9 (patch) | |
tree | d9c4fe55a871bb65fc0e1448764604b47083100e /src/LYShowInfo.c | |
parent | 2d9e91f9543486865c65bf1b2837b2a7a1e3d1b9 (diff) | |
download | lynx-snapshots-79de405977ac0d7820576b353dde07ce09cedba9.tar.gz |
snapshot of project "lynx", label v2-8-2dev_20
Diffstat (limited to 'src/LYShowInfo.c')
-rw-r--r-- | src/LYShowInfo.c | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index bfc0c85a..25725d05 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -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 @@ PUBLIC int showinfo ARGS4( 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 @@ PUBLIC int showinfo ARGS4( 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 @@ PUBLIC int showinfo ARGS4( 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>", |