nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] nmh ./ChangeLog h/utils.h sbr/utils.c uip/flist...


From: Josh Bressers
Subject: [Nmh-commits] nmh ./ChangeLog h/utils.h sbr/utils.c uip/flist...
Date: Tue, 21 Feb 2006 01:11:51 +0000

CVSROOT:        /sources/nmh
Module name:    nmh
Branch:         
Changes by:     Josh Bressers <address@hidden>  06/02/21 01:11:51

Modified files:
        .              : ChangeLog 
        h              : utils.h 
        sbr            : utils.c 
        uip            : flist.c folder.c 

Log message:
        * h/utils.h, sbr/utils.c, uip/flist.c, uip/folder.c: Move duplicate
        function num_digits into utils.c

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/ChangeLog.diff?tr1=1.235&tr2=1.236&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/h/utils.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/sbr/utils.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/uip/flist.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/uip/folder.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: nmh/ChangeLog
diff -u nmh/ChangeLog:1.235 nmh/ChangeLog:1.236
--- nmh/ChangeLog:1.235 Mon Feb 20 03:09:07 2006
+++ nmh/ChangeLog       Tue Feb 21 01:11:51 2006
@@ -1,3 +1,8 @@
+2006-02-20  Josh Bressers <address@hidden>
+
+       * h/utils.h, sbr/utils.c, uip/flist.c, uip/folder.c: Move duplicate
+       function num_digits into utils.c
+
 2006-02-19  Josh Bressers <address@hidden>
 
        * sbr/m_draft.c, sbr/utils.c, uip/folder.c, uip/inc.c,
Index: nmh/h/utils.h
diff -u nmh/h/utils.h:1.5 nmh/h/utils.h:1.6
--- nmh/h/utils.h:1.5   Tue Feb 21 01:05:24 2006
+++ nmh/h/utils.h       Tue Feb 21 01:11:51 2006
@@ -2,7 +2,7 @@
 /*
  * utils.h -- utility prototypes
  *
- * $Id: utils.h,v 1.5 2006/02/21 01:05:24 bress Exp $
+ * $Id: utils.h,v 1.6 2006/02/21 01:11:51 bress Exp $
  */
 
 void *mh_xmalloc(size_t);
@@ -10,3 +10,4 @@
 char *pwd(void);
 char *add(char *, char *);
 void create_folder(char *, int, void (*)());
+int num_digits(int);
Index: nmh/sbr/utils.c
diff -u nmh/sbr/utils.c:1.6 nmh/sbr/utils.c:1.7
--- nmh/sbr/utils.c:1.6 Mon Feb 20 03:09:08 2006
+++ nmh/sbr/utils.c     Tue Feb 21 01:11:51 2006
@@ -2,7 +2,7 @@
 /*
  * utils.c -- various utility routines
  *
- * $Id: utils.c,v 1.6 2006/02/20 03:09:08 bress Exp $
+ * $Id: utils.c,v 1.7 2006/02/21 01:11:51 bress Exp $
  *
  * This code is Copyright (c) 2006, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -141,3 +141,27 @@
             adios (NULL, "unable to create folder %s", folder);
     }
 }
+
+/*
+ * num_digits
+ *      Return the number of digits in a nonnegative integer.
+ */
+int
+num_digits (int n)
+{
+    int ndigits = 0;
+
+    /* Sanity check */
+    if (n < 0)
+        adios (NULL, "oops, num_digits called with negative value");
+
+    if (n == 0)
+        return 1;
+
+    while (n) {
+        n /= 10;
+        ndigits++;
+    }
+
+    return ndigits;
+}
Index: nmh/uip/flist.c
diff -u nmh/uip/flist.c:1.8 nmh/uip/flist.c:1.9
--- nmh/uip/flist.c:1.8 Mon Jan  2 03:25:18 2006
+++ nmh/uip/flist.c     Tue Feb 21 01:11:51 2006
@@ -13,7 +13,7 @@
  * makes no warranty about the software, its performance or its conformity to
  * any specification.
  *
- *  $Id: flist.c,v 1.8 2006/01/02 03:25:18 bress Exp $
+ *  $Id: flist.c,v 1.9 2006/02/21 01:11:51 bress Exp $
  */
 
 #include <h/mh.h>
@@ -114,7 +114,6 @@
 void BuildFolderList(char *, int);
 void BuildFolderListRecurse(char *, struct stat *, int);
 void PrintFolders(void);
-static int num_digits (int);
 void AllocFolders(struct Folder **, int *, int);
 int AssignPriority(char *);
 static void do_readonly_folders(void);
@@ -605,29 +604,6 @@
 }
 
 /*
- * Calculate the number of digits in a nonnegative integer
- */
-static int
-num_digits (int n)
-{
-    int ndigits = 0;
-
-    /* Sanity check */
-    if (n < 0)
-       adios (NULL, "oops, num_digits called with negative value");
-
-    if (n == 0)
-       return 1;
-
-    while (n) {
-       n /= 10;
-       ndigits++;
-    }
-
-    return ndigits;
-}
-
-/*
  * Put them in priority order.
  */
 
Index: nmh/uip/folder.c
diff -u nmh/uip/folder.c:1.9 nmh/uip/folder.c:1.10
--- nmh/uip/folder.c:1.9        Mon Feb 20 03:09:08 2006
+++ nmh/uip/folder.c    Tue Feb 21 01:11:51 2006
@@ -4,7 +4,7 @@
  *             -- push/pop a folder onto/from the folder stack
  *             -- list the folder stack
  *
- * $Id: folder.c,v 1.9 2006/02/20 03:09:08 bress Exp $
+ * $Id: folder.c,v 1.10 2006/02/21 01:11:51 bress Exp $
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -121,7 +121,6 @@
 static void dodir (char *);
 static int get_folder_info (char *, char *);
 static void print_folders (void);
-static int num_digits (int);
 static int sfold (struct msgs *, char *);
 static void addir (char *);
 static void addfold (char *);
@@ -641,29 +640,6 @@
 }
 
 /*
- * Calculate the number of digits in a nonnegative integer
- */
-int
-num_digits (int n)
-{
-    int ndigits = 0;
-
-    /* Sanity check */
-    if (n < 0)
-       adios (NULL, "oops, num_digits called with negative value");
-
-    if (n == 0)
-       return 1;
-
-    while (n) {
-       n /= 10;
-       ndigits++;
-    }
-
-    return ndigits;
-}
-
-/*
  * Set the current message and sychronize sequences
  */
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]