X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fyaz-comp;h=644b18786748d5a814b4890a8ea89fec67431399;hp=5e1199f908b0a61ba5ad23b5e8173e0a8a3f6d69;hb=59526fbbf2e3b54ce94b3e79e6c7fef9e4f456fb;hpb=d90d31f39aba4c7256d5b83eaf4192630b18ae02 diff --git a/util/yaz-comp b/util/yaz-comp index 5e1199f..644b187 100755 --- a/util/yaz-comp +++ b/util/yaz-comp @@ -7,7 +7,10 @@ exec tclsh "$0" "$@" # See the file LICENSE for details. # # $Log: yaz-comp,v $ -# Revision 1.1 2000-03-02 08:48:20 adam +# Revision 1.2 2001-02-21 13:46:54 adam +# C++ fixes. +# +# Revision 1.1 2000/03/02 08:48:20 adam # Renamed ASN.1 compiler to yaz-comp (used to be yc.tcl). # # Revision 1.6 2000/02/10 13:44:02 adam @@ -256,7 +259,9 @@ proc asnName {name} { if {$inf(verbose)} { puts " mapping member $name,$val to $nval" } - lex + if {![string match {[A-Z]*} $val]} { + lex + } } else { set nval $val if {![string match {[A-Z]*} $val]} { @@ -563,7 +568,7 @@ proc asnSequence {name tag implicit tagtype} { lappend l "\tif (!odr_constructed_begin (o, p, $tagtype, $tag, name))" lappend l "\t\treturn opt && odr_ok(o);" lappend l "\tif (o->direction == ODR_DECODE)" - lappend l "\t\t*p = odr_malloc (o, sizeof(**p));" + lappend l "\t\t*p = ($inf(vprefix)$name *) odr_malloc (o, sizeof(**p));" lappend l "\tif (!odr_sequence_begin (o, p, sizeof(**p), 0))" lappend l "\t\{"