From ce157a97b1d68677249b3ea3afb248cea40af0e2 Mon Sep 17 00:00:00 2001 From: crouzet Date: Thu, 24 Sep 2009 09:02:16 +0000 Subject: [PATCH] Bug fix for types int& et bool& (confusion avec int et bool) --- scripts/parse3.awk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/parse3.awk b/scripts/parse3.awk index dcbe559..ea59997 100644 --- a/scripts/parse3.awk +++ b/scripts/parse3.awk @@ -319,8 +319,16 @@ BEGIN { ok2=0 split($i,tab,"=") # get rid of default value item=tab[1] + sub("/[ \t]*&[ \t]*/", "&", item) # supress spaces around * and $ + sub("/[ \t]**[ \t]*/", "*", item) for (cpptype in idl_arg_type) { - if ( substr(item,1,length(cpptype)) == cpptype ) { + l = length(cpptype) + s0 = substr(item,1,l) # to discriminate between int and int&, ... + s1 = " " + if (length(item) > l) + s1 = substr(item, l+1, 1) + + if ( (s0 == cpptype) && (s1 == " ") ) { # if compatible, store argument type and name type[i]=cpptype name[i]=substr(item,length(cpptype)+1) -- 2.39.2