bugvile, a vi-compatible text editor - Bugs: bug #29488, Flex alternative, reflex has a bug...


bug #29488: Flex alternative, reflex has a bug and a problem

Submitted by:  None
Submitted on:  Fri 09 Apr 2010 03:18:45 AM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

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


Fri 09 Apr 2010 08:46:08 AM UTC, comment #1:

I made the first change last September, so that's
already in the most recent snapshot from October.

The other change - either you're running from an older
source of vile (before a change in September), or you've
a new bug.

There's a current source for vile here:


Thomas Dickey <dickey>
Project Administrator
Fri 09 Apr 2010 03:18:45 AM UTC, original submission:

Hi Tom,
I have been a happy user of vile/winvile/Xvile for many years now and trying to build it from source on;
Cygwin + Windows 7

Building Cygwin failed as the flex version was too new so I used your flex alternative, reflex, and set the LEX variable. Here I found 2 showstoppers and changed my copy of your source to fix them.

1. There is a bug on line 5 in skel.c where I needed to add in the const pointer as defined in flexdef.h to make it compile.

const char *skel[] =
TO -
const char *const skel[] =

2. The version number reported by reflex on line 766 in main.c needs to have the flex_version last and unadorned.
printf(_("%s version %s (%s)\n"),
program_name, flex_version, flex_patched);

TO -
printf(_("%s version (%s) %s\n"),
program_name, flex_patched, flex_version);
Vile's configure script checks the version of flex/reflex by using sed to strip all the leading characters to the LAST space as sed uses a "greedy" pattern matching paradigm.
After sed has run the version number is lost. Changing it as above allows configure to parse the string correctly.

-cheers David



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

Attach File(s):

Attached Files
file #20167:  skel.c added by None (43KiB - application/octet-stream)
file #20168:  flexdef.h added by None (34KiB - application/octet-stream)
file #20169:  main.c added by None (28KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by dickey (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


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



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Jan 2014 03:32:53 PM UTCdickeyStatusNeed Info=>Works For Me
    Wed 28 Sep 2011 11:41:43 PM UTCdickeyStatusNone=>Need Info
    Fri 09 Apr 2010 03:18:45 AM UTCNoneAttached File-=>Added skel.c, #20167
      Attached File-=>Added flexdef.h, #20168
      Attached File-=>Added main.c, #20169

    Back to the top

    Powered by Savane 3.1-cleanup1