Rev 10 | Rev 5465 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 3718 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | cl=getvar("instex_color"); if(cl!=NULL && *cl!=0) return 0; |
53 | cl=getvar("instex_color"); if(cl!=NULL && *cl!=0) return 0; |
54 | mystrncpy(buf,p,sizeof(buf)); tex_nospace(buf); |
54 | mystrncpy(buf,p,sizeof(buf)); tex_nospace(buf); |
55 | for(i=0;i<oldtexcnt;i++) { |
55 | for(i=0;i<oldtexcnt;i++) { |
56 | if(oldinstex[i].size==current_tex_size && |
56 | if(oldinstex[i].size==current_tex_size && |
57 | strcmp(oldinstex[i].src,buf)==0) { |
57 | strcmp(oldinstex[i].src,buf)==0) { |
58 |
|
58 | ovlstrcpy(n,oldinstex[i].name); return 1; |
59 | } |
59 | } |
60 | } |
60 | } |
61 | if(strlen(n)>=128 || oldtexcnt>=100) return 0; |
61 | if(strlen(n)>=128 || oldtexcnt>=100) return 0; |
62 |
|
62 | ovlstrcpy(oldinstex[oldtexcnt].src,buf); |
63 |
|
63 | ovlstrcpy(oldinstex[oldtexcnt].name,n); |
64 | oldinstex[oldtexcnt].size=current_tex_size; |
64 | oldinstex[oldtexcnt].size=current_tex_size; |
65 | oldtexcnt++; return 0; |
65 | oldtexcnt++; return 0; |
66 | } |
66 | } |
67 | 67 | ||
68 | /* returns NULL if instex can use static */ |
68 | /* returns NULL if instex can use static */ |
Line 84... | Line 84... | ||
84 | void __insmath(char *p) |
84 | void __insmath(char *p) |
85 | { |
85 | { |
86 | char *f, *pp, *pe, *p1, buf[MAX_LINELEN+1], nbuf[256]; |
86 | char *f, *pp, *pe, *p1, buf[MAX_LINELEN+1], nbuf[256]; |
87 | int ts, n, rawmathready; |
87 | int ts, n, rawmathready; |
88 | 88 | ||
89 |
|
89 | ovlstrcpy(buf,p); strip_trailing_spaces(buf); |
90 | p1=getvar("insmath_slashsubst"); |
90 | p1=getvar("insmath_slashsubst"); |
91 | if(p1!=NULL && strstr(p1,"yes")!=NULL) slashsubst(buf); |
91 | if(p1!=NULL && strstr(p1,"yes")!=NULL) slashsubst(buf); |
92 | f=instex_check_static(buf); substit(buf); |
92 | f=instex_check_static(buf); substit(buf); |
93 | for(pp=strstr(buf,".."); pp!=NULL; pp=strstr(pp,"..")) { |
93 | for(pp=strstr(buf,".."); pp!=NULL; pp=strstr(pp,"..")) { |
94 | if(*(pp+2)=='.' || *(pp+2)==',') { |
94 | if(*(pp+2)=='.' || *(pp+2)==',') { |