Rev 8185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8185 | Rev 11125 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | } |
35 | } |
36 | if(d<1000000 && d>-1000000 && d==floor(d)) { |
36 | if(d<1000000 && d>-1000000 && d==floor(d)) { |
37 | mystrncpy(p,int2str(d),MAX_LINELEN); return; |
37 | mystrncpy(p,int2str(d),MAX_LINELEN); return; |
38 | } |
38 | } |
39 | i=print_precision; |
39 | i=print_precision; |
- | 40 | if(i<2) i=2; |
|
40 |
|
41 | if(i>32) i=32; /* Simple limitation. */ |
41 | buf[0]='%';buf[1]='.'; |
42 | buf[0]='%';buf[1]='.'; |
42 | if(i>=10) { |
43 | if(i>=10) { |
43 | buf[2]='0'+i/10; buf[3]='0'+i%10; buf[4]='g'; buf[5]=0; |
44 | buf[2]='0'+i/10; buf[3]='0'+i%10; buf[4]='g'; buf[5]=0; |
44 | } |
45 | } |
45 | else { |
46 | else { |
Line 131... | Line 132... | ||
131 | else ovlstrcpy(buf,tbuf); |
132 | else ovlstrcpy(buf,tbuf); |
132 | goto replace; |
133 | goto replace; |
133 | } |
134 | } |
134 | } |
135 | } |
135 | noarray: ev=getvar(buf); ln=getvar_len; |
136 | noarray: ev=getvar(buf); ln=getvar_len; |
- | 137 | if(ev==NULL) ev=""; |
|
136 |
|
138 | if(strchr(ev,'$')==NULL) goto rep2; |
137 | memmove(buf,ev,ln); buf[ln]=0; |
139 | memmove(buf,ev,ln); buf[ln]=0; |
138 | substnest++; substit(buf); substnest--; |
140 | substnest++; substit(buf); substnest--; |
139 | replace: ev=buf; ln=strlen(ev); |
141 | replace: ev=buf; ln=strlen(ev); |
140 | rep2: |
142 | rep2: |
141 | if(pp>oldlast) { |
143 | if(pp>oldlast) { |