[tin 1.7.x] online help additions
Urs Janßen <[email protected]>
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
the attached patch is over yesterdays snapshot. it adds a few items to the online 'h'elp/manpage and fixes complaints about keynames/attributes if tin is compiled without a certain feature but the keynames/attributes of that feature are (still) present in the related file. this usualy happens if $TIN_HOMEDIR is located on an shared (e.g. NFS) device and used by different instalations of tin (e.g. one which has ispell or colour or ... and one which doesn't). urs -- "Only whimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" - Linus
tin-1.7.8.snaptotin-1.7.8.diff
(text/plain, 17.2 KB)
-----------------------------------------------------------------------------
doc/TODO | 4
doc/tin.1 | 17
include/extern.h | 3
include/keymap.h | 6
src/attrib.c | 22
src/help.c | 28
src/keymap.c | 46 -
src/lang.c | 3
-----------------------------------------------------------------------------
diff -Nurp tin-1.7.8.snap/doc/TODO tin-1.7.8/doc/TODO
--- tin-1.7.8.snap/doc/TODO 2005-03-15 12:05:51.000000000 +0100
+++ tin-1.7.8/doc/TODO 2005-03-16 13:28:40.000000000 +0100
@@ -515,7 +515,6 @@ o get rid of CURR_GROUP, use t_group in
o clean up $AUTOSUBSCRIBE code (the NNTP code path is a mess)
[20030412 Urs Janssen <[email protected]>]
-
o in page level Up2 ('k') does the same as PageNextUnreadArt ('N'), but
Up ('^P') behaves different. shouldn't 'k' be named PageNextUnreadArt2
here?
@@ -657,9 +656,6 @@ o add installation guide (in html)
o add cross-compilation hints
o better document keymap feature
- -MenuFilterSelect/MenuFilterKill arn't documented (tin.1) for the
- thread-level and it aren't mentioned in the online 'h'elp
- -EditFilter isn't mentioned in the online 'h'elp
o man page always needs work and proof reading
e.g. 'U', 'V' in pager need better documentation, random organization
diff -Nurp tin-1.7.8.snap/doc/tin.1 tin-1.7.8/doc/tin.1
--- tin-1.7.8.snap/doc/tin.1 2005-03-14 15:52:52.000000000 +0100
+++ tin-1.7.8/doc/tin.1 2005-03-16 13:28:53.000000000 +0100
@@ -872,6 +872,14 @@ Mark current thread as unread.
.B 4
Select article 4 within thread.
.TP
+.B MenuFilterSelect '^A'
+Auto select article(s) using a menu. Read the section "FILTERING
+ARTICLES" for more information.
+.TP
+.B MenuFilterKill '^K'
+Kill article(s) using a menu. Read the section "FILTERING ARTICLES"
+for more information.
+.TP
.B SetRange '#'
Choose a range of articles to be affected by the next command. See the
section "RANGES" for more information.
@@ -955,6 +963,11 @@ Mail current article / thread / auto-sel
matching pattern / tagged articles to someone. See the section "MAILING
PIPING PRINTING REPOSTING AND SAVING ARTICLES" for more information.
.TP
+.B Print 'o'
+Send current article / thread / auto-selected (hot) articles / articles
+matching pattern / tagged articles to printer. See the section "MAILING
+PIPING PRINTING REPOSTING AND SAVING ARTICLES" for more information.
+.TP
.B Quit 'q'
Return to previous level.
.TP
diff -Nurp tin-1.7.8.snap/include/extern.h tin-1.7.8/include/extern.h
--- tin-1.7.8.snap/include/extern.h 2005-03-12 01:45:16.000000000 +0100
+++ tin-1.7.8/include/extern.h 2005-03-16 12:00:36.000000000 +0100
@@ -694,6 +694,7 @@ extern constext txt_help_filter_text[];
extern constext txt_help_filter_text_type[];
extern constext txt_help_filter_time[];
extern constext txt_help_global_article_range[];
+extern constext txt_help_global_edit_filter[];
extern constext txt_help_global_esc[];
extern constext txt_help_global_help[];
extern constext txt_help_global_last_art[];
diff -Nurp tin-1.7.8.snap/include/keymap.h tin-1.7.8/include/keymap.h
--- tin-1.7.8.snap/include/keymap.h 2005-03-14 14:30:47.000000000 +0100
+++ tin-1.7.8/include/keymap.h 2005-03-15 19:36:00.000000000 +0100
@@ -374,8 +374,10 @@ extern struct keylist info_keys;
extern struct keylist mark_read_keys;
extern struct keylist option_menu_keys;
extern struct keylist page_keys;
-extern struct keylist pgp_mail_keys;
-extern struct keylist pgp_news_keys;
+#ifdef HAVE_PGP_GPG
+ extern struct keylist pgp_mail_keys;
+ extern struct keylist pgp_news_keys;
+#endif /* HAVE_PGP_GPG */
extern struct keylist post_cancel_keys;
extern struct keylist post_continue_keys;
extern struct keylist post_delete_keys;
diff -Nurp tin-1.7.8.snap/src/attrib.c tin-1.7.8/src/attrib.c
--- tin-1.7.8.snap/src/attrib.c 2004-12-30 14:33:10.000000000 +0100
+++ tin-1.7.8/src/attrib.c 2005-03-15 22:26:50.000000000 +0100
@@ -172,10 +172,6 @@ set_default_attributes(
}
-/*
- * Load global & local attributes into active[].attribute
- */
-
#define MATCH_BOOLEAN(pattern, type) \
if (match_boolean(line, pattern, &flag)) { \
num = (flag != FALSE); \
@@ -203,6 +199,14 @@ set_default_attributes(
break; \
}
#endif /* CHARSET_CONVERSION */
+#if !defined(CHARSET_CONVERSION) || !defined(HAVE_ISPELL)
+# define SKIP_ITEM(pattern) \
+ if (!strncmp(line, pattern, strlen(pattern))) { \
+ found = TRUE; \
+ break; \
+ }
+#endif /* !CHARSET_CONVERSION || !HAVE_ISPELL */
+
/*
* (re)read global/local attributes file
@@ -287,6 +291,8 @@ read_attributes_file(
case 'i':
#ifdef HAVE_ISPELL
MATCH_STRING("ispell=", ATTRIB_ISPELL);
+#else
+ SKIP_ITEM("ispell=");
#endif /* HAVE_ISPELL */
break;
@@ -296,7 +302,9 @@ read_attributes_file(
MATCH_BOOLEAN("mime_forward=", ATTRIB_MIME_FORWARD);
MATCH_STRING("mime_types_to_save=", ATTRIB_MIME_TYPES_TO_SAVE);
#ifdef CHARSET_CONVERSION
- MATCH_LIST("mm_network_charset=", ATTRIB_MM_NETWORK_CHARSET,txt_mime_charsets, NUM_MIME_CHARSETS);
+ MATCH_LIST("mm_network_charset=", ATTRIB_MM_NETWORK_CHARSET, txt_mime_charsets, NUM_MIME_CHARSETS);
+#else
+ SKIP_ITEM("mm_network_charset=");
#endif /* CHARSET_CONVERSION */
break;
@@ -352,6 +360,8 @@ read_attributes_file(
case 'u':
#ifdef CHARSET_CONVERSION
MATCH_STRING("undeclared_charset=", ATTRIB_UNDECLARED_CHARSET);
+#else
+ SKIP_ITEM("undeclared_charset=");
#endif /* CHARSET_CONVERSION */
break;
diff -Nurp tin-1.7.8.snap/src/help.c tin-1.7.8/src/help.c
--- tin-1.7.8.snap/src/help.c 2005-03-14 15:55:54.000000000 +0100
+++ tin-1.7.8/src/help.c 2005-03-16 13:22:11.000000000 +0100
@@ -95,8 +95,10 @@ static t_help_page select_help_page[] =
{ txt_help_title_ops, NOT_ASSIGNED },
{ txt_help_select_read_group, SELECT_ENTER_GROUP },
{ txt_help_select_next_unread_group, SELECT_ENTER_NEXT_UNREAD_GROUP },
+#ifndef NO_POSTING
{ txt_help_global_post, GLOBAL_POST },
{ txt_help_global_post_postponed, GLOBAL_POSTPONED },
+#endif /* NO_POSTING */
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_select_group_range, GLOBAL_SET_RANGE },
{ txt_help_empty_line, NOT_ASSIGNED },
@@ -109,6 +111,8 @@ static t_help_page select_help_page[] =
{ txt_help_select_unsubscribe_pattern, SELECT_UNSUBSCRIBE_PATTERN },
{ txt_help_select_move_group, SELECT_MOVE_GROUP },
{ txt_help_empty_line, NOT_ASSIGNED },
+ { txt_help_global_edit_filter, GLOBAL_EDIT_FILTER},
+ { txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_title_misc, NOT_ASSIGNED },
{ txt_help_select_quit, GLOBAL_QUIT },
{ txt_help_global_quit_tin, GLOBAL_QUIT_TIN },
@@ -175,9 +179,11 @@ static t_help_page group_help_page[] = {
{ txt_help_title_ops, NOT_ASSIGNED },
{ txt_help_thread_read_article, GROUP_READ_BASENOTE },
{ txt_help_article_next_unread, GROUP_NEXT_UNREAD_ARTICLE_OR_GROUP },
+#ifndef NO_POSTING
{ txt_help_global_post, GLOBAL_POST },
{ txt_help_global_post_postponed, GLOBAL_POSTPONED },
{ txt_help_article_repost, GROUP_REPOST },
+#endif /* NO_POSTING */
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_global_article_range, GLOBAL_SET_RANGE },
{ txt_help_empty_line, NOT_ASSIGNED },
@@ -213,6 +219,7 @@ static t_help_page group_help_page[] = {
{ txt_help_article_autokill, GLOBAL_MENU_FILTER_KILL },
{ txt_help_article_quick_select, GLOBAL_QUICK_FILTER_SELECT },
{ txt_help_article_quick_kill, GLOBAL_QUICK_FILTER_KILL },
+ { txt_help_global_edit_filter, GLOBAL_EDIT_FILTER},
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_title_misc, NOT_ASSIGNED },
{ txt_help_global_previous_menu, GLOBAL_QUIT },
@@ -266,14 +273,22 @@ static t_help_page thread_help_page[] =
{ txt_help_title_ops, NOT_ASSIGNED },
{ txt_help_thread_read_article, THREAD_READ_ARTICLE },
{ txt_help_article_next_unread, THREAD_READ_NEXT_ARTICLE_OR_THREAD },
+#ifndef NO_POSTING
{ txt_help_global_post, GLOBAL_POST },
{ txt_help_global_post_postponed, GLOBAL_POSTPONED },
+#endif /* NO_POSTING */
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_global_article_range, GLOBAL_SET_RANGE },
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_global_mail, THREAD_MAIL },
{ txt_help_global_save, THREAD_SAVE },
{ txt_help_global_auto_save, THREAD_AUTOSAVE },
+#ifndef DONT_HAVE_PIPING
+ { txt_help_global_pipe, GLOBAL_PIPE },
+#endif /* !DONT_HAVE_PIPING */
+#ifndef DISABLE_PRINTING
+ { txt_help_global_print, GLOBAL_PRINT },
+#endif /* !DISABLE_PRINTING */
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_global_tag, THREAD_TAG },
{ txt_help_group_untag_thread, THREAD_UNTAG },
@@ -289,6 +304,10 @@ static t_help_page thread_help_page[] =
{ txt_help_group_reverse_thread_selection, THREAD_REVERSE_SELECTIONS },
{ txt_help_group_undo_thread_selection, THREAD_UNDO_SELECTIONS },
{ txt_help_empty_line, NOT_ASSIGNED },
+ { txt_help_article_autoselect, GLOBAL_MENU_FILTER_SELECT },
+ { txt_help_article_autokill, GLOBAL_MENU_FILTER_KILL },
+ { txt_help_global_edit_filter, GLOBAL_EDIT_FILTER },
+ { txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_title_misc, NOT_ASSIGNED },
{ txt_help_global_previous_menu, GLOBAL_QUIT },
{ txt_help_global_quit_tin, GLOBAL_QUIT_TIN },
@@ -356,17 +375,20 @@ static t_help_page page_help_page[] = {
{ txt_help_article_toggle_formfeed, PAGE_REVEAL },
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_title_ops, NOT_ASSIGNED },
+#ifndef NO_POSTING
{ txt_help_global_post, GLOBAL_POST },
{ txt_help_global_post_postponed, GLOBAL_POSTPONED },
{ txt_help_article_followup, PAGE_FOLLOWUP_QUOTE },
{ txt_help_article_followup_no_quote, PAGE_FOLLOWUP },
{ txt_help_article_followup_with_header, PAGE_FOLLOWUP_QUOTE_HEADERS },
{ txt_help_article_repost, PAGE_REPOST },
+ { txt_help_article_cancel, PAGE_CANCEL },
+#endif /* NO_POSTING */
{ txt_help_article_reply, PAGE_REPLY_QUOTE },
{ txt_help_article_reply_no_quote, PAGE_REPLY },
{ txt_help_article_reply_with_header, PAGE_REPLY_QUOTE_HEADERS },
{ txt_help_article_edit, PAGE_EDIT_ARTICLE },
- { txt_help_empty_line, NOT_ASSIGNED },
+ { txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_global_mail, PAGE_MAIL },
{ txt_help_global_save, PAGE_SAVE },
{ txt_help_global_auto_save, PAGE_AUTOSAVE },
@@ -390,7 +412,7 @@ static t_help_page page_help_page[] = {
{ txt_help_article_autokill, GLOBAL_MENU_FILTER_KILL },
{ txt_help_article_quick_select, GLOBAL_QUICK_FILTER_SELECT },
{ txt_help_article_quick_kill, GLOBAL_QUICK_FILTER_KILL },
- { txt_help_article_cancel, PAGE_CANCEL },
+ { txt_help_global_edit_filter, GLOBAL_EDIT_FILTER },
{ txt_help_empty_line, NOT_ASSIGNED },
{ txt_help_title_misc, NOT_ASSIGNED },
{ txt_help_article_browse_urls, PAGE_VIEW_URL },
diff -Nurp tin-1.7.8.snap/src/keymap.c tin-1.7.8/src/keymap.c
--- tin-1.7.8.snap/src/keymap.c 2005-03-14 18:30:36.000000000 +0100
+++ tin-1.7.8/src/keymap.c 2005-03-15 22:35:38.000000000 +0100
@@ -66,8 +66,10 @@ struct keylist info_keys = { NULL, 0, 0
struct keylist mark_read_keys = { NULL, 0, 0 };
struct keylist option_menu_keys = { NULL, 0, 0 };
struct keylist page_keys = { NULL, 0, 0 };
-struct keylist pgp_mail_keys = { NULL, 0, 0 };
-struct keylist pgp_news_keys = { NULL, 0, 0 };
+#ifdef HAVE_PGP_GPG
+ struct keylist pgp_mail_keys = { NULL, 0, 0 };
+ struct keylist pgp_news_keys = { NULL, 0, 0 };
+#endif /* HAVE_PGP_GPG */
struct keylist post_cancel_keys = { NULL, 0, 0 };
struct keylist post_continue_keys = { NULL, 0, 0 };
struct keylist post_delete_keys = { NULL, 0, 0 };
@@ -210,8 +212,10 @@ free_keymaps(
free_keylist(&post_cancel_keys);
free_keylist(&filter_keys);
free_keylist(&mark_read_keys);
+#ifdef HAVE_PGP_GPG
free_keylist(&pgp_mail_keys);
free_keylist(&pgp_news_keys);
+#endif /* HAVE_PGP_GPG */
free_keylist(&save_append_overwrite_keys);
free_keylist(&feed_type_keys);
free_keylist(&feed_post_process_keys);
@@ -950,13 +954,13 @@ process_mapping(
return TRUE;
}
-#ifdef HAVE_PGP_GPG
if (strcmp(keyname, "PagePGPCheckArticle") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(PAGE_PGP_CHECK_ARTICLE, keys, &page_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
-#endif /* HAVE_PGP_GPG */
if (strcmp(keyname, "PagePrevArt") == 0) {
process_keys(PAGE_PREVIOUS_ARTICLE, keys, &page_keys);
@@ -1063,23 +1067,31 @@ process_mapping(
return TRUE;
}
if (strcmp(keyname, "PgpEncrypt") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(PGP_KEY_ENCRYPT, keys, &pgp_mail_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
if (strcmp(keyname, "PgpEncSign") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(PGP_KEY_ENCRYPT_SIGN, keys, &pgp_mail_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
if (strcmp(keyname, "PgpIncludekey") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(PGP_INCLUDE_KEY, keys, &pgp_news_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
if (strcmp(keyname, "PgpSign") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(PGP_KEY_SIGN, keys, &pgp_news_keys);
process_keys(PGP_KEY_SIGN, keys, &pgp_mail_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
@@ -1131,27 +1143,27 @@ process_mapping(
return TRUE;
}
-#ifdef HAVE_ISPELL
if (strcmp(keyname, "PostIspell") == 0) {
+#ifdef HAVE_ISPELL
process_keys(POST_ISPELL, keys, &post_post_keys);
process_keys(POST_ISPELL, keys, &post_send_keys);
+#endif /* HAVE_ISPELL */
return TRUE;
}
-#endif /* HAVE_ISPELL */
if (strcmp(keyname, "PostMail") == 0) {
process_keys(POST_MAIL, keys, &post_mail_fup_keys);
return TRUE;
}
-#ifdef HAVE_PGP_GPG
if (strcmp(keyname, "PostPGP") == 0) {
+#ifdef HAVE_PGP_GPG
process_keys(POST_PGP, keys, &post_post_keys);
process_keys(POST_PGP, keys, &post_send_keys);
+#endif /* HAVE_PGP_GPG */
return TRUE;
}
-#endif /* HAVE_PGP_GPG */
if (strcmp(keyname, "PostponeAll") == 0) {
process_keys(POSTPONE_ALL, keys, &post_postpone_keys);
@@ -1208,15 +1220,15 @@ process_mapping(
return TRUE;
}
-#ifndef DISABLE_PRINTING
if (strcmp(keyname, "Print") == 0) {
+#ifndef DISABLE_PRINTING
process_keys(GLOBAL_PRINT, keys, &group_keys);
process_keys(GLOBAL_PRINT, keys, &page_keys);
process_keys(GLOBAL_PRINT, keys, &thread_keys);
+#endif /* !DISABLE_PRINTING */
return TRUE;
}
-#endif /* !DISABLE_PRINTING */
if (strcmp(keyname, "PromptNo") == 0) {
process_keys(PROMPT_NO, keys, &post_postpone_keys);
process_keys(PROMPT_NO, keys, &prompt_keys);
@@ -1254,8 +1266,10 @@ process_mapping(
process_keys(GLOBAL_QUIT, keys, &mark_read_keys);
process_keys(GLOBAL_QUIT, keys, &option_menu_keys);
process_keys(GLOBAL_QUIT, keys, &page_keys);
+#ifdef HAVE_PGP_GPG
process_keys(GLOBAL_QUIT, keys, &pgp_mail_keys);
process_keys(GLOBAL_QUIT, keys, &pgp_news_keys);
+#endif /* HAVE_PGP_GPG */
process_keys(GLOBAL_QUIT, keys, &post_cancel_keys);
process_keys(GLOBAL_QUIT, keys, &post_delete_keys);
process_keys(GLOBAL_QUIT, keys, &post_edit_keys);
@@ -1479,16 +1493,16 @@ process_mapping(
return TRUE;
}
-#ifndef NO_SHELL_ESCAPE
if (strcmp(keyname, "ShellEscape") == 0) {
+#ifndef NO_SHELL_ESCAPE
process_keys(GLOBAL_SHELL_ESCAPE, keys, &group_keys);
process_keys(GLOBAL_SHELL_ESCAPE, keys, &page_keys);
process_keys(GLOBAL_SHELL_ESCAPE, keys, &select_keys);
process_keys(GLOBAL_SHELL_ESCAPE, keys, &thread_keys);
+#endif /* !NO_SHELL_ESCAPE */
return TRUE;
}
-#endif /* !NO_SHELL_ESCAPE */
break;
case 'T':
@@ -1582,16 +1596,16 @@ process_mapping(
return TRUE;
}
-#ifdef HAVE_COLOR
if (strcmp(keyname, "ToggleColor") == 0) {
+#ifdef HAVE_COLOR
process_keys(GLOBAL_TOGGLE_COLOR, keys, &group_keys);
process_keys(GLOBAL_TOGGLE_COLOR, keys, &page_keys);
process_keys(GLOBAL_TOGGLE_COLOR, keys, &select_keys);
process_keys(GLOBAL_TOGGLE_COLOR, keys, &thread_keys);
+#endif /* HAVE_COLOR */
return TRUE;
}
-#endif /* HAVE_COLOR */
if (strcmp(keyname, "ToggleHelpDisplay") == 0) {
process_keys(GLOBAL_TOGGLE_HELP_DISPLAY, keys, &group_keys);
process_keys(GLOBAL_TOGGLE_HELP_DISPLAY, keys, &info_keys);
@@ -2444,6 +2458,7 @@ setup_default_keys(
add_default_key(&mark_read_keys, 'q', GLOBAL_QUIT);
add_default_key(&mark_read_keys, 't', MARK_READ_TAGGED);
+#ifdef HAVE_PGP_GPG
/* pgp mail */
add_default_key(&pgp_mail_keys, ESC, GLOBAL_ABORT);
add_default_key(&pgp_mail_keys, 'b', PGP_KEY_ENCRYPT_SIGN);
@@ -2458,6 +2473,7 @@ setup_default_keys(
add_default_key(&pgp_news_keys, 'i', PGP_INCLUDE_KEY);
add_default_key(&pgp_news_keys, 'q', GLOBAL_QUIT);
add_default_key(&pgp_news_keys, 's', PGP_KEY_SIGN);
+#endif /* HAVE_PGP_GPG */
/* save */
add_default_key(&save_append_overwrite_keys, ESC, GLOBAL_ABORT);
diff -Nurp tin-1.7.8.snap/src/lang.c tin-1.7.8/src/lang.c
--- tin-1.7.8.snap/src/lang.c 2005-03-12 01:45:35.000000000 +0100
+++ tin-1.7.8/src/lang.c 2005-03-16 12:00:08.000000000 +0100
@@ -317,6 +317,7 @@ constext txt_help_article_view_attachmen
constext txt_help_bug[] = N_("report bug or comment via mail to %s");
constext txt_help_global_article_range[] = N_("choose range of articles to be affected by next command");
constext txt_help_global_esc[] = N_("escape from command prompt");
+constext txt_help_global_edit_filter[] = N_("edit filter file");
constext txt_help_global_help[] = N_("get help");
constext txt_help_global_last_art[] = N_("display last article viewed");
constext txt_help_global_line_down[] = N_("down one line");