Back to index

wims  3.65+svn20090927
Functions
evalue.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void float2str (double d, char *p)
char * substit (char *p)
double evalue (char *p)

Function Documentation

double evalue ( char *  p)

Definition at line 59 of file evalue.c.

{
    return strevalue(p);
}

Here is the call graph for this function:

void float2str ( double  d,
char *  p 
)

Definition at line 19 of file evalue.c.

{
    char buf[64], *pp;
    int i;
    if(d==0) {
       strcpy(p,"0"); return;
    }
    i=10; /* simple precision cookup */
    snprintf(buf,sizeof(buf),"%%.%dg",i);
    snprintf(p,MAX_LINELEN,buf,(double) d);
    pp=p;while(isspace(*pp)) pp++;
    if(pp>p) strcpy(p,pp);
}
char* substit ( char *  p)

Definition at line 36 of file evalue.c.

{
    char *pp, *pe;
    char namebuf[MAX_NAMELEN+1];
    int i, l;

    pe=strchr(p,'"'); if(pe!=NULL) l=pe-p; else l=MAX_LINELEN;
    for(pp=find_name_start(p); *pp!=0 && pp-p<l;
       pp=find_name_start(pe)) {
       pe=find_name_end(pp);
       if((pp>p && !isspace(*(pp-1)) && *(pp-1)!=',') ||
          (*pe!=0 && !isspace(*pe) && *pe!=',')) continue;
       memmove(namebuf,pp,pe-pp); namebuf[pe-pp]=0;
       i=search_list(nametab,nametab_no,sizeof(nametab[0]),namebuf);
       if(i<0) continue;
       if(nametab[i].type==t_prep && preptab[nametab[i].serial].typ==p_font) 
         break;
       if(nametab[i].type==t_color) 
         string_modify(p,pp,pe,colortab[nametab[i].serial].def);
    }
    return p;
}

Here is the call graph for this function: