octave-maintainers
[Top][All Lists]
Advanced

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

R: M4 Macro OCTAVE_EVAL


From: Marco Atzeri
Subject: R: M4 Macro OCTAVE_EVAL
Date: Mon, 9 Feb 2009 06:04:47 +0000 (GMT)

--- Lun 9/2/09, Erik de Castro Lopo  ha scritto:

> Da: Erik de Castro Lopo 
> Oggetto: M4 Macro OCTAVE_EVAL
> A: address@hidden
> Data: Lunedì 9 febbraio 2009, 00:31
> Hi all,
> 
> I'm not sure where I got it, but I'm using the
> OCATVE_EVAL M4 macro
> in my configure script. The macro looks like this:
> 
>     AC_DEFUN([OCTAVE_EVAL],
>     [
>     AC_MSG_CHECKING([for $1 in $OCTAVE])
>     $2=`echo "PS1 (\"\");
> disp($1)" | $OCTAVE -qfH`
>     AC_MSG_RESULT($$2)
>     AC_SUBST($2)
>     ]) # OCTAVE_EVAL
> 
> and I'm using it to grab the octave version like this:
> 
>     OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION)
> 
> This works fine up to and including octave 3.0.1, but for
> version
> 3.0.3, "disp (OCTAVE_VERSION)" has some extra
> escape characters
> so that I get this:
> 
>     echo "disp(OCTAVE_VERSION)" | octave -qfH |
> hexdump -C
> 
>     00000000  1b 5b 3f 31 30 33 34 68  33 2e 30 2e 33 0a   
>     |.[?1034h3.0.3.|
> 
> Is there anyway I can turn off those extra escape
> characters? I
> tried setting PS1, but that didn't help. I know I could
> use
> "octave -v" for this, but there are potentially
> other values
> I would like to grab in this way.
> 
> Cheers,
> Erik
> -- 

the additional escape characters can be caused by a wrong 
TERM setting

for example if you are using rxvt and TERM=xterm

Regards
Marco


      Passa a Yahoo! Mail.

La webmail che ti offre GRATIS spazio illimitato, 
antispam e messenger integrato.
http://it.mail.yahoo.com/              



reply via email to

[Prev in Thread] Current Thread [Next in Thread]