[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

es-0.82



Es list, Paul, Byron:

I just finished building es-0.82.  Below are some patches that show
1) a fix to the `gcc -Wall' `Warning Frenzy (tm)' on initial.c, 2) my
implicit cd hack added to es-0.82's initial.es, 3) a problem between
the author's target readline package and the GNU readline package I have
(the latest version on prep.ai.mit.edu as of one month ago).  Is there
a better readline package that I want to look into?

Only patch 1 should be considered for application to the master es
source tree.

Regards,
Loren

The following patch gets rid of about 1000 warning messages when compiled
under gcc -Wall [v2.3.^(1 2)]:

diff -r es-0.82-orig/dump.c es-0.82/dump.c
116c116
< 				"static const Tree_s %s = { n%s, { (char *) %s } };\n",
---
> 				"static const Tree_s %s = { n%s, { {(char *) %s} } };\n",
124c124
< 				"static const Tree_p %s = { n%s, { (Tree *) %s } };\n",
---
> 				"static const Tree_p %s = { n%s, { {(Tree *) %s} } };\n",
134c134
< 				"static const Tree_pp %s = { n%s, { (Tree *) %s, (Tree *) %s } };\n",
---
> 				"static const Tree_pp %s = { n%s, { {(Tree *) %s}, {(Tree *) %s} } };\n",

--

The following patch is provided for those people that would like to add
implicit cd to their base interactive es shell:

diff -r es-0.82-orig/initial.es es-0.82/initial.es
92c92,111
< 				result = <={$dispatch <={%parse $prompt}}
---
> # original:
> #				result = <={$dispatch <={%parse $prompt}}
> # replacement to support implicit cd by ljr:
> 	let (command = <={%parse $prompt}) {
> 	  if {~ $command \{[!-z]*\}} {
> 	    let (words = `{echo $command | /bin/sed 's/{\([ -z]*\)}/\1/'}) {
> 	      catch @ {
> 		catch @ {} {
> 		  cd $words
> 		  command='{}'
> 		}
> 	      } {
> 		if {~ $#words 1} {
> 		  whatis >/dev/null $words
> 		}
> 	      }
> 	    }
> 	  }
> 	  result = <={$dispatch $command}
> 	}

--

The following patch is provided to show Paul and Byron the nasty hack that
I have to add every time I get a new es [I believe that I have the latest
GNU readline package, but maybe not.  Without commenting out access to
rl_meta_chars, the linker bombs out.  What is rl_meta_chars anyways?]:

diff -r es-0.82-orig/input.c es-0.82/input.c
33c33
< extern int rl_meta_chars;
---
> /* extern int rl_meta_chars; */
476c476
< 	rl_meta_chars = 0;
---
> /*	rl_meta_chars = 0; */