[comp.mail.mh] Xmh incorporate bug under sos4.1?

snyder@alphard.cs.utk.edu (Kim Snyder) (07/13/90)

Situation: sun3/60 running sos4.1 and X11R4
	   compiled with gcc.

Using Xmh to incorporate mail, the table of
contents adds an extra digit to the message
number.  For example;

 176  07/12 To:snyder          tesing <<>>
 177  07/12 To:snyder          testing <<>>
 178  07/12 To:snyder          testing <<>>
9179  07/12 To:snyder          <<>>
0180  07/12 To:snyder          testing mail<<mail from wham-o >>
1181  07/12 To:snyder          testing mail<<mail from wham-o >>
2182  07/12 To:snyder          testing mail<<mail from wham-o >>

A rescan will fix it.  I tried deleting .xmhcache, and 
that didn't do it.  .xmhcache reflects the bug.  However,
doing a "scan last:7" shows;

 176  07/12 To:snyder          tesing xmh<<>>
 177  07/12 To:snyder          testing inc<<>>
 178  07/12 To:snyder          testing inc<<>>
 179  07/12 To:snyder          <<>>
 180  07/12 To:snyder          testing mail<<mail from wham-o >>
 181  07/12 To:snyder          testing mail<<mail from wham-o >>
 182  07/12 To:snyder          testing mail<<mail from wham-o >>

The following are the compile options (using /bin/cc)
given to mh;

version: MH 6.7 #3[UCI] (cetus6a) of Wed Jul 11 18:28:12 EDT 1990
options: [BSD42] [BSD43] [TTYD] [SUN40] [TYPESIG=void] [MHE] [MHRC]
         [BIND] [SBACKUP='"#"'] [FOLDPROT='"0770"'] [NFS] [ATZ]
         [OVERHEAD] [SENDMTS] [SMTP]
 
Any help appreciated!

kim snyder

 

mgc@myshkin.udev.cdc.com (Mark G Christenson) (07/16/90)

In article <1990Jul12.192746.15832@cs.utk.edu>,
snyder@alphard.cs.utk.edu (Kim Snyder) writes:
|>Situation: sun3/60 running sos4.1 and X11R4
|>	   compiled with gcc.
|>
|>Using Xmh to incorporate mail, the table of
|>contents adds an extra digit to the message
|>number.  For example;
|>
|>  [example deleted]

This was reported on comp.windows.x as a bug in gcc 1.37.  The following
workaround for Xmh was posted by mark@comp.vuw.ac.nz (Mark Davies):

*** tocutil.c~  Fri Dec 15 15:20:04 1989
--- tocutil.c   Tue Apr  3 17:40:22 1990
***************
*** 576,582 ****
      msg->toc = toc;
      msg->buf = XtNewString(ptr);
      (void)sprintf(str, "%4d", msgid);
!     for (i=0; i<4 ; i++) msg->buf[i] = str[i];
      msg->buf[MARKPOS] = ' ';
      msg->msgid = msgid;
      msg->position = toc->lastPos;
--- 576,582 ----
      msg->toc = toc;
      msg->buf = XtNewString(ptr);
      (void)sprintf(str, "%4d", msgid);
!     for (i=4; i-- > 0 ;) msg->buf[i] = str[i];
      msg->buf[MARKPOS] = ' ';
      msg->msgid = msgid;
      msg->position = toc->lastPos;

Mark
                                        
Mark Christenson <mgc@myshkin.udev.cdc.com>
Control Data Corporation
Arden Hills, Minnesota