X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fyaz-comp;h=ff5286a75de6bf1f014ffbeb12143ba15239ad28;hb=66ebb9d692735cc0b3b903c999dd225af2e2a08c;hp=5e1199f908b0a61ba5ad23b5e8173e0a8a3f6d69;hpb=d90d31f39aba4c7256d5b83eaf4192630b18ae02;p=yaz-moved-to-github.git diff --git a/util/yaz-comp b/util/yaz-comp index 5e1199f..ff5286a 100755 --- a/util/yaz-comp +++ b/util/yaz-comp @@ -7,7 +7,13 @@ 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.3 2003-04-14 16:57:58 adam +# Add include of string.h +# +# 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 +262,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 +571,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\{" @@ -756,6 +764,7 @@ proc asnOf {name tag implicit tagtype isset} { lappend l "\t\treturn opt && odr_ok(o);" if {[string length $tag]} { if {$implicit} { + lappend l "\t/* ---- IMPLICIT ---- */" lappend l "\todr_implicit_settag (o, $tagtype, $tag);" } else { asnWarning "Constructed SEQUENCE/SET OF not handled"