Article View: news.software.readers
Article #18345SLRN - various suggestions
From: Alain Knaff
Date: Tue, 30 Jan 1996 00:00
Date: Tue, 30 Jan 1996 00:00
142 lines
4684 bytes
4684 bytes
I've made a patch to slrn 0.8.4 which adds a few handy features that
are present in tin, but aren't in slrn:
1. The function skip_to_prev_group skips to the previous groups (and
can be mapped to a key using .slrnrc)
2. The function fast_quit quits the newsreader from the article menu
without going through the group menu (as shift-Q does in tin).
3. The prompt before moving to a group via
skip_to_next_group/skip_to_prev_group has been removed.
The patch also fixes a small bug with Ultrix: When running slrn in an
rxvt (doesn't update utmp), it used to generate empty usernames,
instead of falling back on the USER environment variable. This is
because the Ultrix getlogin returns an empty string instead of a Null
pointer when no utmp entry exist.
I've some more suggestions (not covered in the patch):
- The output of the xover nntp command could be dumped to a file,
for later reuse. This would come in handy for high volume groups where
you leave many articles unread. (It can take some time to download the
overview from alt.folklore.urban over a slow link)
- The list of read articles in the .newsrc could be kept even for
unsubscribed groups. This is handy for those groups that you only
subscribe to from time to time.
Cheers,
Alain
diff -ur slrn/art.c slrn-ak/art.c
--- slrn/art.c Mon Dec 18 00:53:59 1995
+++ slrn-ak/art.c Tue Jan 30 11:48:39 1996
@@ -3797,6 +3797,19 @@
Art_Mode_Done = 2;
}
+static void skip_to_prev_group (void)
+{
+ art_quit ();
+ Art_Mode_Done = 3;
+}
+
+static void fast_quit (void)
+{
+ art_quit ();
+ Art_Mode_Done = 10;
+}
+
+
static void art_pagedn (void)
{
if (Article_Visible && (At_End_Of_Article == Current_Header))
@@ -4354,6 +4367,8 @@
A_KEY("get_children_headers", get_children_headers),
A_KEY("get_parent_header", get_parent_header),
A_KEY("skip_to_next_group", skip_to_next_group),
+ A_KEY("skip_to_prev_group", skip_to_prev_group),
+ A_KEY("fast_quit", fast_quit),
A_KEY("catchup_all", catch_up_all),
A_KEY("uncatchup_all", un_catch_up_all),
A_KEY("catchup", catch_up_to_here),
diff -ur slrn/group.c slrn-ak/group.c
--- slrn/group.c Mon Dec 18 00:53:53 1995
+++ slrn-ak/group.c Tue Jan 30 11:48:41 1996
@@ -1176,6 +1176,9 @@
slrn_digit_arg (Slrn_Group_Keymap);
}
+static void group_quit (void);
+
+
static void group_select_group (void)
{
int min, max, n;
@@ -1260,23 +1263,28 @@
Slrn_Winch_Function = NULL;
if (SLang_Error == 0)
- {
+ {
/* slrn_write_newsrc (); */
- if (ret == 2)
- {
- while (group_down_n (1))
+ if(ret == 10)
+ group_quit();
+ if (ret == 2 || ret == 3)
+ {
+ while ( (ret == 2 && group_down_n (1)) ||
+ (ret == 3 && group_up_n(1) ) )
{
if (Current_Group->unread == 0) continue;
-
+
while (1)
{
- slrn_message ("Next group: %s (%d unread)", Current_Group->name, Current_Group->unread);
+#if 0
+ slrn_message ("Next group: %s (%d unread)", Current_Group->name, Current_Group->unread);
slrn_smg_refresh ();
key = SLang_do_key (Slrn_Group_Keymap, (int (*)(void)) SLang_getkey);
if (key == NULL) f = NULL; else f = (void (*)(void)) key->f;
-
+#endif
+ goto top;
if (f == group_select_group) goto top;
else if ((f == group_down)
|| (f == group_up))
@@ -1295,6 +1303,7 @@
SLang_Error = SLKeyBoard_Quit = 0;
}
}
+
break;
}
}
diff -ur slrn/misc.c slrn-ak/misc.c
--- slrn/misc.c Mon Dec 18 00:53:53 1995
+++ slrn-ak/misc.c Tue Jan 30 11:50:18 1996
@@ -716,7 +716,7 @@
Slrn_User_Info.host[MAX_HOST_NAME_LEN - 1] = 0;
}
- if ((name = getlogin()) == NULL)
+ if ((name = getlogin()) == NULL || name[0] == '\0')
{
#ifdef VMS
if (((name = getenv("USER")) == NULL)
--
Linux - Where do you want to fly today ?
Windows 95 - Makes a grown man cry
Alain
Technical Details
Message-ID:
<4elbmq$m08@imag.imag.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <4elbmq$m08@imag.imag.fr> Subject: SLRN - various suggestions Date: Tue, 30 Jan 1996 00:00:00 +0000 From: knaff@ngulu.imag.fr (Alain Knaff) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 137197089 Content-type: text/plain; charset="iso-8859-1" Organization: None Mime-version: 1.0 Reply-to: Alain.Knaff@imag.fr Newsgroups: news.software.readers