Subject: bin/485: m4 bug
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: None <jarle@idt.unit.no>
List: netbsd-bugs
Date: 09/18/1994 10:35:03
>Number: 485
>Category: bin
>Synopsis: m4 bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 18 10:35:02 1994
>Originator: Jarle Greipsland
>Organization:
Free Hardware Foundation, UnLtd.
>Release: 1.0_BETA
>Environment:
System: NetBSD honey.idt.unit.no 1.0_BETA NetBSD 1.0_BETA (HONEY) #0: Sat Sep 10 01:46:25 MET DST 1994 jarle@honey.idt.unit.no:/local/src/sys/arch/i386/compile/HONEY i386
Phase of the moon: The Moon is Waxing Gibbous (99% of Full)
>Description:
According to the manual page, the m4 command 'changecom' shall accept multi
character strings as comment delimiters (max 5 chars). This doesn't work,
because of the comment delimiter type being a single char. Also, if the
input file ends within a comment, m4 will spew 'EOF-chars' until stopped by
some external cause.
>How-To-Repeat:
Run m4 with a input file containing the following line:
changecom(`/*',`*/')/
>Fix:
Alternative 1: Fix the manual page (i.e. allow only one char for comment
delimiters). This alternative make us a bit 'incompatible'.....
Alternative 2: Change the scommt/ecommt datatype to char *, and modify
the loop in main.c to take this into account. Also handle EOF within
comments....
>Audit-Trail:
>Unformatted:
m4 doesn't handle multicharacter comment delimiters at all