bugThe nmh Mail Handling System - Bugs: bug #4360, repl appends spaces after Subject...

 
 

bug #4360: repl appends spaces after Subject and References fields

Submitted by:  Bill Wohler <wohler>
Submitted on:  Fri 18 Jul 2003 10:15:48 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Oliver Kiddle <opk>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 29 Jan 2006 07:27:31 PM UTC, comment #4:

I've attached a patch which I believe is the correct fix to the problem. I'll also apply it to CVS. In replout() when the value of the field is initially stored, it now removes a trailing newline.

Oliver Kiddle <opk>
Project MemberIn charge of this item.
Mon 17 Oct 2005 10:34:06 AM UTC, comment #3:

Glenn's patch works by explicitly trimming any trailing whitespace when printing any value. That might break something but I need to experiment more to be sure. There is an explicit trim function. I suspect that it would be better to avoid including the trailing newline to begin with. I don't really want to commit any changes to CVS before Jon gets the next release out so I'll leave Glenn's patch for now. Thanks for sending it to me, though.

Oliver Kiddle <opk>
Project MemberIn charge of this item.
Fri 14 Oct 2005 06:46:16 PM UTC, comment #2:

Thanks, Oliver. Some time ago, Glenn Burkhardt <glenn@aoi-industries.com> sent me a version of fmt_scan.c which was supposed to fix this problem. Unfortunately, I don't use CVS nmh and lacked the time to download, patch, and test it.

I believe Glenn's change was based upon a pre-RC1 version. Can you please merge his change into the current codebase and test? That might wrap things up more quickly for you.

Bill Wohler <wohler>
Project Member
Fri 14 Oct 2005 06:37:04 PM UTC, comment #1:

The PUTS macro in fmt_scan.c is outputting a space for any control characters. When invoked the string includes a trailing newline:

(gdb) print *fmt->f_un.f_u_comp
$43 = {c_name = 0x80a369f "subject",
c_text = 0x80a3f30 " (fwd) Re: do we have any open access ldap in groupinfra?\n", c_next = 0x0,
c_flags = 0, c_type = 0, c_un = {c_u_tws = 0x0, c_u_mn = 0x0}}

The problem is perhaps the inclusion of the newline in the array of format structures in the first place. Or perhaps it just needs to be stripped in PUTS.

Hopefully I'll find some more time to look into this.

Oliver Kiddle <opk>
Project MemberIn charge of this item.
Fri 18 Jul 2003 10:15:48 PM UTC, original submission:

repl appends a space to Subject and References lines in replies. Not only is this wrong, I've received reports that this also appears to mess up some mailers. I'm guessing that the formatting function to replace ${field} is doing this.

Bill Wohler <wohler>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2088:  replbug.diff added by opk (431B - text/plain - patch to fix the problem)
file #2912:  fmt_scan.c added by wohler (18KiB - text/x-csrc - Modified, pre-RC1 version of fmt_scan.c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 29 Jan 2006 07:27:31 PM UTCopkStatusIn Progress=>Fixed
  Assigned toNone=>opk
  Open/ClosedOpen=>Closed
  Attached File-=>Added replbug.diff, #3331
Fri 14 Oct 2005 06:46:16 PM UTCwohlerAttached File-=>Added fmt_scan.c, #3042
Fri 14 Oct 2005 06:37:04 PM UTCopkStatusNone=>In Progress

Back to the top


Powered by Savane 3.1-cleanup1