Rev 1122 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1122 | Rev 3718 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | if((strlen(p)>2 && strcmp(p,"animstep")!=0) || !isalpha(*p)) return; |
51 | if((strlen(p)>2 && strcmp(p,"animstep")!=0) || !isalpha(*p)) return; |
52 | for(i=0;i<varcnt && strcmp(p,vartab[i].name)!=0;i++); |
52 | for(i=0;i<varcnt && strcmp(p,vartab[i].name)!=0;i++); |
53 | if(i<varcnt) {vartab[i].value=v; return;} |
53 | if(i<varcnt) {vartab[i].value=v; return;} |
54 | else { |
54 | else { |
55 | if(varcnt>=MAX_VARS || varnameptr>=varnamebuf+sizeof(varnamebuf)-1) return; |
55 | if(varcnt>=MAX_VARS || varnameptr>=varnamebuf+sizeof(varnamebuf)-1) return; |
56 |
|
56 | ovlstrcpy(varnameptr,p); |
57 | vartab[varcnt].name=varnameptr; vartab[varcnt].value=v; |
57 | vartab[varcnt].name=varnameptr; vartab[varcnt].value=v; |
58 | varnameptr+=strlen(varnameptr)+1; (varcnt)++; |
58 | varnameptr+=strlen(varnameptr)+1; (varcnt)++; |
59 | } |
59 | } |
60 | } |
60 | } |
61 | 61 | ||
Line 80... | Line 80... | ||
80 | int i; |
80 | int i; |
81 | char *pp; |
81 | char *pp; |
82 | if(n<1) return; |
82 | if(n<1) return; |
83 | for(i=1,pp=strchr(p,','); i<n && pp!=NULL; i++,pp=strchr(pp+1,',')); |
83 | for(i=1,pp=strchr(p,','); i<n && pp!=NULL; i++,pp=strchr(pp+1,',')); |
84 | if(pp==NULL) *p=0; |
84 | if(pp==NULL) *p=0; |
85 | else |
85 | else ovlstrcpy(p,pp+1); |
86 | } |
86 | } |
87 | 87 | ||
88 | int getcolor(int r, int g, int b) |
88 | int getcolor(int r, int g, int b) |
89 | { |
89 | { |
90 | int col; |
90 | int col; |