[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh ChangeLog uip/pick.c
From: |
Eric Gillespie |
Subject: |
[Nmh-commits] nmh ChangeLog uip/pick.c |
Date: |
Thu, 14 Aug 2008 01:28:57 +0000 |
CVSROOT: /sources/nmh
Module name: nmh
Changes by: Eric Gillespie <epg> 08/08/14 01:28:57
Modified files:
. : ChangeLog
uip : pick.c
Log message:
* uip/pick.c: Print matching messages immediately, instead of
waiting until the very end to print anything.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&r1=1.292&r2=1.293
http://cvs.savannah.gnu.org/viewcvs/nmh/uip/pick.c?cvsroot=nmh&r1=1.13&r2=1.14
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/nmh/nmh/ChangeLog,v
retrieving revision 1.292
retrieving revision 1.293
diff -u -b -r1.292 -r1.293
--- ChangeLog 14 Aug 2008 01:11:12 -0000 1.292
+++ ChangeLog 14 Aug 2008 01:28:56 -0000 1.293
@@ -1,5 +1,10 @@
2008-08-13 Eric Gillespie <address@hidden>
+ * uip/pick.c: Print matching messages immediately, instead of
+ waiting until the very end to print anything.
+
+2008-08-13 Eric Gillespie <address@hidden>
+
* uip/Makefile.in, uip/popi.c: Remove popi.c, which has been dead
since PatchSet 257 (2000/06/12 11:07:34 UTC).
Index: uip/pick.c
===================================================================
RCS file: /sources/nmh/nmh/uip/pick.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- uip/pick.c 2 Jun 2008 22:37:02 -0000 1.13
+++ uip/pick.c 14 Aug 2008 01:28:56 -0000 1.14
@@ -2,9 +2,9 @@
/*
* pick.c -- search for messages by content
*
- * $Id: pick.c,v 1.13 2008/06/02 22:37:02 pm215 Exp $
+ * $Id: pick.c,v 1.14 2008/08/14 01:28:56 epg Exp $
*
- * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * This code is Copyright (c) 2002, 2008, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
@@ -233,6 +233,11 @@
lo = mp->lowsel;
hi = mp->hghsel;
+ /* If printing message numbers to standard out, force line buffering on.
+ */
+ if (listsw)
+ setvbuf (stdout, NULL, _IOLBF, 0);
+
/*
* Scan through all the SELECTED messages and check for a
* match. If the message does not match, then unselect it.
@@ -246,6 +251,9 @@
lo = msgnum;
if (msgnum > hi)
hi = msgnum;
+
+ if (listsw)
+ printf ("%s\n", m_name (msgnum));
} else {
/* if it doesn't match, then unselect it */
unset_selected (mp, msgnum);
@@ -272,13 +280,9 @@
done (1);
/*
- * Print the name of all the matches
+ * Print total matched if not printing each matched message number.
*/
- if (listsw) {
- for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++)
- if (is_selected (mp, msgnum))
- printf ("%s\n", m_name (msgnum));
- } else {
+ if (!listsw) {
printf ("%d hit%s\n", mp->numsel, mp->numsel == 1 ? "" : "s");
}
- [Nmh-commits] nmh ChangeLog uip/pick.c,
Eric Gillespie <=