Translating less to Eiffel
Installing CIL (if not yet done):git clone git://cil.git.sourceforge.net/gitroot/cil/cil; cd cil
./configure
make
export PATH=$PATH:`pwd`/bin
1. CIL preprocessing
-
Downloading it:
wget http://ftp.gnu.org/gnu/less/less-443.tar.gz -
Extracting it:
tar xfz less-443.tar.gz; cd less-443 -
Configuring it:
./configure --disable-largefile -
Removing gcc optimization flags (results in more readable code):
sed -i "s/ -O2/ -D_GNU_SOURCE/" Makefile -
[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 -
Building it:
make CC="cilly --merge --save-temps" -
[less specific] Running CIL again to fix more incompatible declarations:
cilly --merge --save-temps less.cil.c -lncurses