Update of /cvsroot/pure-data/externals/k_cext In directory sc8-pr-cvs1:/tmp/cvs-serv27925
Modified Files: k_cext_generatecode.c Log Message: fix INT_func(INT_func( problems
Index: k_cext_generatecode.c =================================================================== RCS file: /cvsroot/pure-data/externals/k_cext/k_cext_generatecode.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** k_cext_generatecode.c 8 Jan 2004 14:55:24 -0000 1.1 --- k_cext_generatecode.c 11 Jan 2004 15:25:09 -0000 1.2 *************** *** 19,34 ****
! static bool has_intfunc(char *string){ ! if(strstr(string,"INT_(")) return false; ! if(strstr(string,"INT_")) return true; ! return false; }
! static bool has_floatfunc(char *string){ ! if(strstr(string,"FLOAT_(")) return false; ! if(strstr(string,"FLOAT_")) return true; ! return false; }
static void k_cext_fixfuncs(struct k_cext_init *k,char *string){ char newstring[500]; --- 19,37 ----
! static char *has_intfunc(char *string){ ! char *s=strstr(string,"INT_"); ! if(s==NULL) return NULL; ! if(s[4]=='(') return has_intfunc(s+4); ! return s; }
! static char *has_floatfunc(char *string){ ! char *s=strstr(string,"FLOAT_"); ! if(s==NULL) return NULL; ! if(s[4]=='(') return has_floatfunc(s+4); ! return s; }
+ static void k_cext_fixfuncs(struct k_cext_init *k,char *string){ char newstring[500]; *************** *** 38,42 **** if(has_intfunc(newstring)){ char name[500]={0}; ! char *f_intstart=strstr(newstring,"INT_"); char *f_namestart=f_intstart+4; char *f_nameend=strstr(f_namestart+1,"("); --- 41,45 ---- if(has_intfunc(newstring)){ char name[500]={0}; ! char *f_intstart=has_intfunc(newstring); char *f_namestart=f_intstart+4; char *f_nameend=strstr(f_namestart+1,"("); *************** *** 70,74 **** if(has_floatfunc(newstring)){ char name[500]={0}; ! char *f_floatstart=strstr(newstring,"FLOAT_"); char *f_namestart=f_floatstart+6; char *f_nameend=strstr(f_namestart+1,"("); --- 73,77 ---- if(has_floatfunc(newstring)){ char name[500]={0}; ! char *f_floatstart=has_floatfunc(newstring); char *f_namestart=f_floatstart+6; char *f_nameend=strstr(f_namestart+1,"("); *************** *** 211,215 **** }else{ ! if(strstr(string,"INT_") || strstr(string,"FLOAT_")){ k_cext_fixfuncs(k,string); } --- 214,218 ---- }else{ ! if(has_intfunc(string) || has_floatfunc(string)){ k_cext_fixfuncs(k,string); }