nmh-commits
[Top][All Lists]
Advanced

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

[Nmh-commits] nmh/sbr context_read.c, 1.2.2.3, 1.2.2.4 fmt_compile.c, 1


From: Ken Hornstein <address@hidden>
Subject: [Nmh-commits] nmh/sbr context_read.c, 1.2.2.3, 1.2.2.4 fmt_compile.c, 1.5, 1.5.2.1 fmt_scan.c, 1.7, 1.7.2.1 lock_file.c, 1.7.2.2, 1.7.2.3 m_draft.c, 1.2, 1.2.2.1 makedir.c, 1.4, 1.4.2.1 mts.c, 1.2, 1.2.2.1 ruserpass.c, 1.4, 1.4.2.1
Date: Fri, 24 Oct 2003 20:14:50 +0000

Update of /cvsroot/nmh/nmh/sbr
In directory subversions:/tmp/cvs-serv30347/sbr

Modified Files:
      Tag: RELEASE_1_1
        context_read.c fmt_compile.c fmt_scan.c lock_file.c m_draft.c 
        makedir.c mts.c ruserpass.c 
Log Message:
Merge in changes that didn't make it onto the release branch.


Index: context_read.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/context_read.c,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -C2 -d -r1.2.2.3 -r1.2.2.4
*** context_read.c      5 Sep 2003 19:06:14 -0000       1.2.2.3
--- context_read.c      24 Oct 2003 20:14:48 -0000      1.2.2.4
***************
*** 29,34 ****
  #include <pwd.h>                              /* structure for getpwuid() 
results */
  
- extern        int     errno;                          /* system call error 
number */
- 
  void
  context_read (void)
--- 29,32 ----

Index: fmt_compile.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/fmt_compile.c,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** fmt_compile.c       2 Jul 2002 22:09:14 -0000       1.5
--- fmt_compile.c       24 Oct 2003 20:14:48 -0000      1.5.2.1
***************
*** 424,434 ****
            CERROR("component used as both date and address");
        }
!       if (! (cm->c_type & CT_DATE)) {
!           cm->c_tws = (struct tws *)
!                               calloc((size_t) 1, sizeof(*cm->c_tws));
!           fp->f_type = preprocess;
!           PUTCOMP(sp);
!           cm->c_type |= CT_DATE;
!       }
        break;
  
--- 424,432 ----
            CERROR("component used as both date and address");
        }
!       cm->c_tws = (struct tws *)
!           calloc((size_t) 1, sizeof(*cm->c_tws));
!       fp->f_type = preprocess;
!       PUTCOMP(sp);
!       cm->c_type |= CT_DATE;
        break;
  
***************
*** 438,442 ****
            primed++;
        }
-       cm->c_type |= CT_MYMBOX;
        /* fall through */
      case FT_PARSEADDR:
--- 436,439 ----
***************
*** 444,453 ****
            CERROR("component used as both date and address");
        }
!       if (! (cm->c_type & CT_ADDRPARSE)) {
!           cm->c_mn = &fmt_mnull;
!           fp->f_type = preprocess;
!           PUTCOMP(sp);
!           cm->c_type |= (CT_ADDR | CT_ADDRPARSE);
!       }
        break;
  
--- 441,448 ----
            CERROR("component used as both date and address");
        }
!       cm->c_mn = &fmt_mnull;
!       fp->f_type = preprocess;
!       PUTCOMP(sp);
!       cm->c_type |= CT_ADDR;
        break;
  

Index: lock_file.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/lock_file.c,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -C2 -d -r1.7.2.2 -r1.7.2.3
*** lock_file.c 5 Sep 2003 18:38:34 -0000       1.7.2.2
--- lock_file.c 24 Oct 2003 20:14:48 -0000      1.7.2.3
***************
*** 57,62 ****
  #endif
  
- extern int errno;
- 
  #ifdef LOCKDIR
  char *lockdir = LOCKDIR;
--- 57,60 ----

Index: makedir.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/makedir.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** makedir.c   2 Jul 2002 22:09:14 -0000       1.4
--- makedir.c   24 Oct 2003 20:14:48 -0000      1.4.2.1
***************
*** 18,23 ****
  #include <sys/param.h>
  #include <sys/file.h>
- 
- extern int errno;
        
  int
--- 18,21 ----

Index: mts.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/mts.c,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** mts.c       2 Jul 2002 22:09:14 -0000       1.2
--- mts.c       24 Oct 2003 20:14:48 -0000      1.2.2.1
***************
*** 28,33 ****
  #define       OK        0
  
- extern int errno;
- 
  /*
   * static prototypes
--- 28,31 ----

Index: fmt_scan.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/fmt_scan.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -d -r1.7 -r1.7.2.1
*** fmt_scan.c  2 Jul 2002 22:09:14 -0000       1.7
--- fmt_scan.c  24 Oct 2003 20:14:48 -0000      1.7.2.1
***************
*** 89,93 ****
   * macros to format data
   */
- 
  #define PUTDF(cp, num, wid, fill)\
        if (cp + wid < ep) {\
--- 89,92 ----
***************
*** 110,133 ****
            }
  
- #define PUTD(cp, num)\
-       if (cp < ep) {\
-           if ((i = (num)) == 0)\
-               *cp++ = '0';\
-           else {\
-               if ((i = (num)) < 0) {\
-                   *cp++ = '-';\
-                   i = -(num);\
-                   }\
-               c = 10;\
-               while (c <= i) \
-                   c *= 10;\
-               while (cp < ep && c > 1) {\
-                   c /= 10;\
-                   *cp++ = (i / c) + '0';\
-                   i %= c;\
-                   }\
-               }\
-           }
- 
  #ifdef LOCALE
  #define PUTSF(cp, str, wid, fill) {\
--- 109,112 ----
***************
*** 287,291 ****
      char *savestr, *str = NULL;
      char buffer[BUFSIZ], buffer2[BUFSIZ];
!     int i, c, ljust;
      int value = 0;
      time_t t;
--- 266,270 ----
      char *savestr, *str = NULL;
      char buffer[BUFSIZ], buffer2[BUFSIZ];
!     int i, c, ljust, n;
      int value = 0;
      time_t t;
***************
*** 297,300 ****
--- 276,288 ----
      cp = scanl;
      ep = scanl + width - 1;
+ 
+     for (fmt = format; fmt->f_type != FT_DONE; fmt++)
+       switch (fmt->f_type) {
+       case FT_PARSEADDR:
+       case FT_PARSEDATE:
+           fmt->f_comp->c_flags &= ~CF_PARSED;
+           break;
+       }
+ 
      fmt = format;
  
***************
*** 338,342 ****
  
        case FT_NUM:
!           PUTD (cp, value);
            break;
        case FT_NUMF:
--- 326,331 ----
  
        case FT_NUM:
!           n = snprintf(cp, ep - cp, "%d", value);
!           if (n >= 0) cp += n;
            break;
        case FT_NUMF:
***************
*** 491,495 ****
  
        case FT_LV_COMPFLAG:
!           value = fmt->f_comp->c_flags;
            break;
        case FT_LV_COMP:
--- 480,484 ----
  
        case FT_LV_COMPFLAG:
!           value = (fmt->f_comp->c_flags & CF_TRUE) != 0;
            break;
        case FT_LV_COMP:
***************
*** 503,507 ****
            break;
        case FT_LV_STRLEN:
!           value = strlen(str);
            break;
        case FT_LV_CHAR_LEFT:
--- 492,499 ----
            break;
        case FT_LV_STRLEN:
!           if (str != NULL)
!                   value = strlen(str);
!           else
!                   value = 0;
            break;
        case FT_LV_CHAR_LEFT:
***************
*** 711,721 ****
        case FT_PARSEDATE:
            comp = fmt->f_comp;
            if ((sp = comp->c_text) && (tws = dparsetime(sp))) {
                *comp->c_tws = *tws;
!               comp->c_flags = 0;
!           } else if (comp->c_flags >= 0) {
                memset ((char *) comp->c_tws, 0, sizeof *comp->c_tws);
!               comp->c_flags = 1;
            }
            break;
  
--- 703,716 ----
        case FT_PARSEDATE:
            comp = fmt->f_comp;
+           if (comp->c_flags & CF_PARSED)
+               break;
            if ((sp = comp->c_text) && (tws = dparsetime(sp))) {
                *comp->c_tws = *tws;
!               comp->c_flags &= ~CF_TRUE;
!           } else if ((comp->c_flags & CF_DATEFAB) == 0) {
                memset ((char *) comp->c_tws, 0, sizeof *comp->c_tws);
!               comp->c_flags = CF_TRUE;
            }
+           comp->c_flags |= CF_PARSED;
            break;
  
***************
*** 780,783 ****
--- 775,780 ----
        case FT_PARSEADDR:
            comp = fmt->f_comp;
+           if (comp->c_flags & CF_PARSED)
+               break;
            if (comp->c_mn != &fmt_mnull)
                mnfree (comp->c_mn);
***************
*** 787,790 ****
--- 784,788 ----
                while (getname(""))
                    ;
+               comp->c_flags |= CF_PARSED;
            } else {
                while (getname(""))             /* XXX */
***************
*** 806,818 ****
                (mn = getm (sp, NULL, 0, AD_NAME, NULL))) {
                comp->c_mn = mn;
!               comp->c_flags = ismymbox(mn);
                while ((sp = getname(sp)))
!                   if (comp->c_flags == 0 &&
                        (mn = getm (sp, NULL, 0, AD_NAME, NULL)))
!                       comp->c_flags |= ismymbox(mn);
            } else {
                while (getname(""))             /* XXX */
                    ;
!               comp->c_flags = (comp->c_text == 0);
                comp->c_mn = &fmt_mnull;
            }
--- 804,823 ----
                (mn = getm (sp, NULL, 0, AD_NAME, NULL))) {
                comp->c_mn = mn;
!               if (ismymbox(mn))
!                   comp->c_flags |= CF_TRUE;
!               else
!                   comp->c_flags &= ~CF_TRUE;
                while ((sp = getname(sp)))
!                   if ((comp->c_flags & CF_TRUE) == 0 &&
                        (mn = getm (sp, NULL, 0, AD_NAME, NULL)))
!                       if (ismymbox(mn))
!                           comp->c_flags |= CF_TRUE;
            } else {
                while (getname(""))             /* XXX */
                    ;
!               if (comp->c_text == 0)
!                   comp->c_flags |= CF_TRUE;
!               else
!                   comp->c_flags &= ~CF_TRUE;
                comp->c_mn = &fmt_mnull;
            }

Index: ruserpass.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/ruserpass.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** ruserpass.c 10 May 2000 00:02:54 -0000      1.4
--- ruserpass.c 24 Oct 2003 20:14:48 -0000      1.4.2.1
***************
*** 67,71 ****
      int t, usedefault = 0;
      struct stat stb;
-     extern int errno;
  
      hdir = getenv("HOME");
--- 67,70 ----

Index: m_draft.c
===================================================================
RCS file: /cvsroot/nmh/nmh/sbr/m_draft.c,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** m_draft.c   2 Jul 2002 22:09:14 -0000       1.2
--- m_draft.c   24 Oct 2003 20:14:48 -0000      1.2.2.1
***************
*** 13,18 ****
  #include <errno.h>
  
- extern int errno;
- 
  
  char *
--- 13,16 ----





reply via email to

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