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

 
 

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

Submitter:  Bill Wohler <wohler>
Submitted:  Fri 18 Jul 2003 10:15:48 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Assigned to:  opk Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>
Group 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>
Group Member
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>
Group Member

 

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

Attach Files:
   
   
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

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-29 opk StatusIn Progress Fixed
    Assigned toNone opk
    Open/ClosedOpen Closed
    Attached File- Added replbug.diff, #3331
2005-10-14 wohler Attached File- Added fmt_scan.c, #3042
2005-10-14 opk StatusNone In Progress

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code