diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2009-05-22 00:47:41 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2009-05-22 00:47:41 -0400 |
commit | 097b356f6a8fa667d38dd10bb3bca016a7cc4f03 (patch) | |
tree | 15595038b1c48a2649417c1293df7185a0fbeb12 /src | |
parent | 01859149e85a589e236b320b01197e79c422a729 (diff) | |
download | lynx-snapshots-097b356f6a8fa667d38dd10bb3bca016a7cc4f03.tar.gz |
snapshot of project "lynx", label v2-8-7pre_2b
Diffstat (limited to 'src')
-rw-r--r-- | src/LYGlobalDefs.h | 3 | ||||
-rw-r--r-- | src/LYMain.c | 3 | ||||
-rw-r--r-- | src/LYOptions.c | 10 | ||||
-rw-r--r-- | src/LYrcFile.c | 3 | ||||
-rw-r--r-- | src/LYrcFile.h | 3 |
5 files changed, 17 insertions, 5 deletions
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 1b5247d2..d4a643fa 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYGlobalDefs.h,v 1.118 2009/04/07 00:11:01 tom Exp $ + * $LynxId: LYGlobalDefs.h,v 1.119 2009/05/22 00:18:05 tom Exp $ * * global variable definitions */ @@ -452,6 +452,7 @@ extern "C" { extern BOOLEAN LYNoRefererHeader; /* Never send Referer header? */ extern BOOLEAN LYNoRefererForThis; /* No Referer header for this URL? */ extern BOOLEAN LYNoFromHeader; /* Never send From header? */ + extern BOOLEAN LYSendUserAgent; /* send Lynx User-Agent header? */ extern BOOLEAN LYListNewsNumbers; extern BOOLEAN LYUseMouse; extern BOOLEAN LYListNewsDates; diff --git a/src/LYMain.c b/src/LYMain.c index 399bc529..1f12fcfe 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.200 2009/04/12 16:57:48 tom Exp $ + * $LynxId: LYMain.c,v 1.201 2009/05/22 00:18:53 tom Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -372,6 +372,7 @@ BOOLEAN LYNoRefererForThis = FALSE; /* No Referer header for this URL? */ BOOLEAN LYNoRefererHeader = FALSE; /* Never send Referer header? */ BOOLEAN LYRawMode; BOOLEAN LYSelectPopups = USE_SELECT_POPUPS; +BOOLEAN LYSendUserAgent = FALSE; /* send Lynx User-Agent header? */ BOOLEAN LYSetCookies = SET_COOKIES; /* Process Set-Cookie headers? */ BOOLEAN LYUseDefSelPop = TRUE; /* Command line -popup toggle */ BOOLEAN LYUseDefaultRawMode = TRUE; diff --git a/src/LYOptions.c b/src/LYOptions.c index 96402e87..6e73d227 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -1,4 +1,4 @@ -/* $LynxId: LYOptions.c,v 1.129 2009/04/07 00:35:49 tom Exp $ */ +/* $LynxId: LYOptions.c,v 1.130 2009/05/22 00:47:15 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <HTTP.h> /* 'reloading' flag */ @@ -2425,11 +2425,17 @@ static OptValues encoding_values[] = */ static const char *preferred_doc_char_string = RC_PREFERRED_CHARSET; static const char *preferred_doc_lang_string = RC_PREFERRED_LANGUAGE; +static const char *send_user_agent_string = RC_SEND_USERAGENT; static const char *user_agent_string = RC_USERAGENT; #define PutHeader(fp, Name) \ fprintf(fp, "\n%s<em>%s</em>\n", MARGIN_STR, LYEntifyTitle(&buffer, Name)); +#define PutCheckBox(fp, Name, Value, disable) \ + fprintf(fp,\ + "<input type=\"checkbox\" name=\"%s\" value=\"%s\" %s>\n",\ + Name, Value ? "true" : "false", disable_all?disabled_string:disable) + #define PutTextInput(fp, Name, Value, Size, disable) \ fprintf(fp,\ "<input size=%d type=\"text\" name=\"%s\" value=\"%s\" %s>\n",\ @@ -3809,6 +3815,8 @@ static int gen_options(char **newfile) /* User Agent: INPUT */ if (!no_useragent) { + PutLabel(fp0, gettext("Send User-Agent header"), send_user_agent_string); + PutCheckBox(fp0, send_user_agent_string, LYSendUserAgent, ""); PutLabel(fp0, gettext("User-Agent header"), user_agent_string); PutTextInput(fp0, user_agent_string, NonNull(LYUserAgent), text_len, ""); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 7954c336..ccffaa16 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -1,4 +1,4 @@ -/* $LynxId: LYrcFile.c,v 1.76 2009/04/07 00:20:14 tom Exp $ */ +/* $LynxId: LYrcFile.c,v 1.77 2009/05/22 00:26:25 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <LYUtils.h> @@ -519,6 +519,7 @@ of checkboxes for the OPTIONs. A value of \"on\" will set popup menus\n\ as the default while a value of \"off\" will set use of radio boxes.\n\ The default can be overridden via the -popup command line toggle.\n\ ")), + MAYBE_SET(RC_SEND_USERAGENT, LYSendUserAgent, MSG_ENABLE_LYNXRC), MAYBE_SET(RC_SET_COOKIES, LYSetCookies, MSG_ENABLE_LYNXRC), PARSE_ENU(RC_SHOW_COLOR, LYrcShowColor, tbl_show_colors, N_("\ show_color specifies how to set the color mode at startup. A value of\n\ diff --git a/src/LYrcFile.h b/src/LYrcFile.h index 07506bba..56f75c68 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYrcFile.h,v 1.30 2009/04/06 23:07:40 tom Exp $ + * $LynxId: LYrcFile.h,v 1.31 2009/05/22 00:19:45 tom Exp $ */ #ifndef LYRCFILE_H #define LYRCFILE_H @@ -201,6 +201,7 @@ #define RC_SEEK_FRAG_AREA_IN_CUR "seek_frag_area_in_cur" #define RC_SEEK_FRAG_MAP_IN_CUR "seek_frag_map_in_cur" #define RC_SELECT_POPUPS "select_popups" +#define RC_SEND_USERAGENT "send_useragent" #define RC_SESSION_FILE "session_file" #define RC_SESSION_LIMIT "session_limit" #define RC_SET_COOKIES "set_cookies" |