Subversion Repositories wimsdev

Rev

Rev 8148 | Rev 8367 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8148 Rev 8195
Line 62... Line 62...
62
/* process math formula inside \( ) or \( \) */
62
/* process math formula inside \( ) or \( \) */
63
void process_formula(char *p)
63
void process_formula(char *p)
64
{
64
{
65
    char *p3, bf[MAX_LINELEN+1];
65
    char *p3, bf[MAX_LINELEN+1];
66
 
66
 
67
    if(strlen(p)>=MAX_LINELEN) error("formula too long");
67
    if(strlen(p)>=MAX_LINELEN) oef_error("formula too long");
68
    while((p3=strstr(p,"&lt;"))!=NULL) memmove(p3," <  ",4);
68
    while((p3=strstr(p,"&lt;"))!=NULL) memmove(p3," <  ",4);
69
    while((p3=strstr(p,"&gt;"))!=NULL) memmove(p3," >  ",4);
69
    while((p3=strstr(p,"&gt;"))!=NULL) memmove(p3," >  ",4);
70
    for(p3=strchr(p,'\n'); p3!=NULL; p3=strchr(p3,'\n')) *p3=' ';
70
    for(p3=strchr(p,'\n'); p3!=NULL; p3=strchr(p3,'\n')) *p3=' ';
71
    snprintf(bf,sizeof(bf),"%s",p);
71
    snprintf(bf,sizeof(bf),"%s",p);
72
    if(strchr(bf,'\\')==NULL && strchr(bf,'}')==NULL && strlen(bf)>2) {
72
    if(strchr(bf,'\\')==NULL && strchr(bf,'}')==NULL && strlen(bf)>2) {