Translating less to Eiffel

Installing CIL (if not yet done):
git clone git://; cd cil
export PATH=$PATH:`pwd`/bin

1. CIL preprocessing

  1. Downloading it:
  2. Extracting it:
    tar xfz less-443.tar.gz; cd less-443
  3. Configuring it:
    ./configure --disable-largefile
  4. Removing gcc optimization flags (results in more readable code):
    sed -i "s/ -O2/ -D_GNU_SOURCE/" Makefile
  5. [less specific] Fixing incompatible declarations:
    sed -i "s/extern int jump_sline_fraction;/extern long jump_sline_fraction;/" optfunc.c
    sed -i "s/extern int shift_count_fraction;/extern long shift_count_fraction;/" optfunc.c
  6. Building it:
    make CC="cilly --merge --save-temps"
  7. [less specific] Running CIL again to fix more incompatible declarations:
    cilly --merge --save-temps less.cil.c -lncurses
This created the merged C file less.cil.cil.c.

2. C2Eif

Start C2Eif, select the created less.cil.cil.c, an output directory, -lncurses for the required libraries, and press Compile.

3. EiffelStudio

Start EiffelStudio and open less.ecf from the previously specified output directory. This will already compile it, all you have to do is press Run and enjoy less running in Eiffel :-)