diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/LYExtern.c | 11 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 3 | ||||
-rw-r--r-- | src/LYMail.c | 20 | ||||
-rw-r--r-- | src/LYMain.c | 5 | ||||
-rw-r--r-- | src/LYOptions.c | 18 | ||||
-rw-r--r-- | src/LYrcFile.c | 12 | ||||
-rw-r--r-- | src/LYrcFile.h | 3 |
7 files changed, 49 insertions, 23 deletions
diff --git a/src/LYExtern.c b/src/LYExtern.c index 94d2cb58..7809ca5f 100644 --- a/src/LYExtern.c +++ b/src/LYExtern.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYExtern.c,v 1.47 2010/12/09 00:34:51 tom Exp $ + * $LynxId: LYExtern.c,v 1.48 2010/12/11 13:08:13 tom Exp $ * External application support. This feature allows lynx to pass a given URL to an external program. @@ -239,7 +239,7 @@ static char *lookup_external(char *param, int only_overriders) { int pass, num_disabled, num_matched, num_choices, cur_choice; - int length = 0; + size_t length = 0; char *cmdbuf = NULL; char **actions = 0; char **choices = 0; @@ -263,7 +263,8 @@ static char *lookup_external(char *param, cmdbuf = format_command(ptr->command, param); if (length > 1) { actions[num_choices] = cmdbuf; - choices[num_choices] = ptr->menu_name; + choices[num_choices] = + format_command(ptr->menu_name, param); } } num_choices++; @@ -272,8 +273,8 @@ static char *lookup_external(char *param, } if (length > 1) { if (pass == 0) { - actions = typecallocn(char *, (unsigned) length + 1); - choices = typecallocn(char *, (unsigned) length + 1); + actions = typecallocn(char *, length + 1); + choices = typecallocn(char *, length + 1); } else { actions[num_choices] = 0; choices[num_choices] = 0; diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index e7a88dcd..353b18e5 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYGlobalDefs.h,v 1.127 2010/12/10 01:17:05 tom Exp $ + * $LynxId: LYGlobalDefs.h,v 1.128 2010/12/11 14:19:17 tom Exp $ * * global variable definitions */ @@ -377,6 +377,7 @@ extern "C" { extern char *indexfile; extern char *anonftp_password; extern char *personal_mail_address; + extern char *personal_mail_name; extern char *homepage; /* startfile or command line argument */ extern char *editor; /* if non empty it enables edit mode with diff --git a/src/LYMail.c b/src/LYMail.c index 6da72e6f..ba9d3b48 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMail.c,v 1.76 2010/09/25 11:22:16 tom Exp $ + * $LynxId: LYMail.c,v 1.80 2010/12/11 14:52:59 tom Exp $ */ #include <HTUtils.h> #include <HTParse.h> @@ -1095,9 +1095,6 @@ void reply_by_mail(char *mail_address, const char *title, const char *refid) { -#ifndef NO_ANONYMOUS_EMAIL - static char *personal_name = NULL; -#endif char user_input[LINESIZE]; FILE *fd, *fp; const char *label = NULL; @@ -1336,21 +1333,21 @@ void reply_by_mail(char *mail_address, LYaddstr(ENTER_NAME_OR_BLANK); #if USE_VMS_MAILER if (isPMDF) { - label = "Personal_name: "; + label = "Personal_name"; } else { - label = "X-Personal_name: "; + label = "X-Personal_name"; } #else - label = "X-Personal_Name: "; + label = "X-Personal_Name"; #endif /* USE_VMS_MAILER */ - if (!header_prompt(label, &personal_name, LINESIZE)) { + if (!header_prompt(label, &personal_mail_name, LINESIZE)) { goto cancelled; } - if (*personal_name) { + if (*personal_mail_name) { #if USE_VMS_MAILER - fprintf((isPMDF ? hfd : fd), "%s: %s\n", label, personal_name); + fprintf((isPMDF ? hfd : fd), "%s: %s\n", label, personal_mail_name); #else - HTSprintf(&header, "%s: %s\n", label, personal_name); + HTSprintf(&header, "%s: %s\n", label, personal_mail_name); #endif /* VMS */ } @@ -1523,6 +1520,7 @@ void reply_by_mail(char *mail_address, LYaddstr(ENTER_MESSAGE_BELOW); LYaddstr(ENTER_PERIOD_WHEN_DONE_A); LYaddstr(ENTER_PERIOD_WHEN_DONE_B); + LYaddstr(CTRL_G_TO_CANCEL_SEND); LYaddstr("\n\n"); LYrefresh(); *user_input = '\0'; diff --git a/src/LYMain.c b/src/LYMain.c index 902dbbea..afa9eaa9 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.225 2010/12/10 01:17:41 tom Exp $ + * $LynxId: LYMain.c,v 1.226 2010/12/11 14:19:47 tom Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -449,7 +449,8 @@ char *lynxlinksfile = NULL; /* the current visited links file URL */ char *lynxlistfile = NULL; /* the current list file URL */ char *original_dir = NULL; /* the original directory */ char *personal_extension_map = NULL; /* .mime.types */ -char *personal_mail_address = NULL; /* the users mail address */ +char *personal_mail_address = NULL; /* the user's mail address */ +char *personal_mail_name = NULL; /* the user's personal name mail */ char *personal_type_map = NULL; /* .mailcap */ char *pref_charset = NULL; /* preferred character set */ char *proxyauth_info[2] = diff --git a/src/LYOptions.c b/src/LYOptions.c index edfe85b0..d372ac3e 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -1,4 +1,4 @@ -/* $LynxId: LYOptions.c,v 1.142 2010/12/10 01:51:49 tom Exp $ */ +/* $LynxId: LYOptions.c,v 1.143 2010/12/11 14:36:42 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <HTTP.h> /* 'reloading' flag */ @@ -2196,6 +2196,7 @@ static OptValues keypad_mode_values[] = }; static const char *lineedit_mode_string = RC_LINEEDIT_MODE; static const char *mail_address_string = RC_PERSONAL_MAIL_ADDRESS; +static const char *personal_name_string = RC_PERSONAL_MAIL_NAME; static const char *search_type_string = RC_CASE_SENSITIVE_SEARCHING; #ifndef DISABLE_FTP @@ -2848,6 +2849,13 @@ int postoptions(DocInfo *newdoc) FREE(personal_mail_address); StrAllocCopy(personal_mail_address, data[i].value); } +#ifndef NO_ANONYMOUS_EMAIL + /* Personal Name: INPUT */ + if (!strcmp(data[i].tag, personal_name_string)) { + FREE(personal_mail_name); + StrAllocCopy(personal_mail_name, data[i].value); + } +#endif /* Anonymous FTP Password: INPUT */ #ifndef DISABLE_FTP @@ -3838,9 +3846,15 @@ static int gen_options(char **newfile) PutTextInput(fp0, mail_address_string, NonNull(personal_mail_address), text_len, ""); +#ifndef NO_ANONYMOUS_EMAIL + PutLabel(fp0, gettext("Personal name for mail"), personal_name_string); + PutTextInput(fp0, personal_name_string, + NonNull(personal_mail_name), text_len, ""); +#endif + /* Anonymous FTP Address: INPUT */ #ifndef DISABLE_FTP - PutLabel(fp0, gettext("Password for anonymous ftp"), mail_address_string); + PutLabel(fp0, gettext("Password for anonymous ftp"), anonftp_password_string); PutTextInput(fp0, anonftp_password_string, NonNull(anonftp_password), text_len, ""); #endif diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 83cfad79..5b909053 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -1,4 +1,4 @@ -/* $LynxId: LYrcFile.c,v 1.87 2010/12/10 09:45:31 tom Exp $ */ +/* $LynxId: LYrcFile.c,v 1.88 2010/12/11 14:20:53 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <LYUtils.h> @@ -465,6 +465,16 @@ to TRUE in lynx.cfg, or use the -nofrom command line switch. You also\n\ could leave this field blank, but then you won't have it included in\n\ your mailed comments.\n\ ")), + PARSE_STR(RC_PERSONAL_MAIL_NAME, personal_mail_name, N_("\ +personal_mail_name specifies your personal name, for mail. The\n\ +name is sent for mailed comments. Lynx will prompt for this,\n\ +showing the configured value as a default when sending mail.\n\ +This is not necessarily the same as a name provided as part of the\n\ +personal_mail_address.\n\ +Lynx does not save your changes to that default value as a side-effect\n\ +of sending email. To update the default value, you must use the options\n\ +menu, or modify this file directly.\n\ +")), PARSE_STR(RC_PREFERRED_CHARSET, pref_charset, N_("\ preferred_charset specifies the character set in MIME notation (e.g.,\n\ ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests\n\ diff --git a/src/LYrcFile.h b/src/LYrcFile.h index b1defdf4..26a8ffbe 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYrcFile.h,v 1.39 2010/12/10 01:20:54 tom Exp $ + * $LynxId: LYrcFile.h,v 1.40 2010/12/11 14:12:47 tom Exp $ */ #ifndef LYRCFILE_H #define LYRCFILE_H @@ -174,6 +174,7 @@ #define RC_PERSONAL_EXTENSION_MAP "personal_extension_map" #define RC_PERSONAL_MAILCAP "personal_mailcap" #define RC_PERSONAL_MAIL_ADDRESS "personal_mail_address" +#define RC_PERSONAL_MAIL_NAME "personal_mail_name" #define RC_POSITIONABLE_EDITOR "positionable_editor" #define RC_PREFERRED_CHARSET "preferred_charset" #define RC_PREFERRED_ENCODING "preferred_encoding" |