#include #include #include #include #include "../globals.h" #include "../functions.h" /* checks to see if the current token is a known defined function */ /* int isfunction_j(char *token) { int t=0; for (t=0; t> %d: (%d),%s\n",l,paramptr[l],&molecule[paramptr[l]]); } #endif strcat(params,"\n"); t=strlen(params); s[0]=0; pflag=0; m=0; if ((suppress&16)==16) { strcat(newtoken,"["); } else if ((suppress&1)==0) { strcat(newtoken,"("); } extra[0]=0; for(l=0; lparam_count) { break; } if (params[l]=='-' || params[l]=='+' || params[l]=='@') { k=0; while(params[l]!=',' && params[l]!='\n') { extra[k++]=params[l++]; } extra[k]=0; #ifdef DEBUG printf("atoi extra=%d\n",atoi(extra)); #endif if (extra[0]=='@') { if (pflag!=0) { if ((suppress&2)==0) { strcat(newtoken,","); } else { strcat(newtoken,"."); } } strcat(newtoken,&extra[1]); s[0]=0; extra[0]=0; pflag++; m=0; if (params[l]=='\n') break; continue; } } if (params[l]==',' || params[l]=='\n') { s[m]=0; m=atoi(s); if (m!=0) { if (pflag!=0) { if ((suppress&16)==16) { strcat(newtoken,"]["); } else if ((suppress&2)==0) { strcat(newtoken,","); } else { strcat(newtoken,"."); } } m--; if (m<=param_count) { if (isnum(&molecule[paramptr[m]])==1 && atoi(extra)!=0) { n=atoi(&molecule[paramptr[m]])+atoi(extra); sprintf(extra,"%d",n); #ifdef DEBUG printf("extra to append: %s\n",extra); #endif strcat(newtoken,extra); } else { strcat(newtoken,&molecule[paramptr[m]]); strcat(newtoken,extra); } } s[0]=0; extra[0]=0; pflag++; m=0; } if (params[l]=='\n') break; } else { s[m++]=params[l]; } } if ((suppress&16)==16) { strcat(newtoken,"]"); } else if ((suppress&1)==0) { strcat(newtoken,")"); } }