more characts for real number params
This commit is contained in:
parent
4eb6e85519
commit
005dae2462
|
|
@ -1,3 +1,7 @@
|
||||||
|
2010-01-29 Holger Vogt
|
||||||
|
* commands.c: gnuplot need two args minimum
|
||||||
|
* xpressn.c: more characters for real number insertion (up to 15)
|
||||||
|
|
||||||
2010-01-27 Dietmar Warning
|
2010-01-27 Dietmar Warning
|
||||||
* cpl_ibm1.sp: fix the c matrix unsymmetry
|
* cpl_ibm1.sp: fix the c matrix unsymmetry
|
||||||
* swec.h: set maximum cpl lines to eight
|
* swec.h: set maximum cpl lines to eight
|
||||||
|
|
@ -15,7 +19,7 @@
|
||||||
various files: patches by Robert (Neval, Nintegrate) from Jan 3 2010 and
|
various files: patches by Robert (Neval, Nintegrate) from Jan 3 2010 and
|
||||||
10 patches from Jan 16, 2010
|
10 patches from Jan 16, 2010
|
||||||
* com_hardcopy.c: switching graphics context correctly for postscript output
|
* com_hardcopy.c: switching graphics context correctly for postscript output
|
||||||
* winmaun.c: parameter 4 to SystemParametersInfo() corrected
|
* winmain.c: parameter 4 to SystemParametersInfo() corrected
|
||||||
|
|
||||||
2010-01-16 Dietmar Warning
|
2010-01-16 Dietmar Warning
|
||||||
* tests/transmission: Only few tests should be easier, more examples under
|
* tests/transmission: Only few tests should be easier, more examples under
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,7 @@
|
||||||
/* gtri - end - wbk - add include files */
|
/* gtri - end - wbk - add include files */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FIXME: Integrate spcp_coms and nutcp_coms into one variable. */
|
/* for the definition and decription of struct comm see cpdef.h */
|
||||||
|
|
||||||
|
|
||||||
/* Bool fields: stringargs, spiceonly, major */
|
/* Bool fields: stringargs, spiceonly, major */
|
||||||
|
|
||||||
|
|
@ -162,7 +161,7 @@ struct comm spcp_coms[] = {
|
||||||
(void (*)()) NULL,
|
(void (*)()) NULL,
|
||||||
"file plotargs : Send plot to Xgraph-11." } ,
|
"file plotargs : Send plot to Xgraph-11." } ,
|
||||||
{ "gnuplot", com_gnuplot, FALSE, FALSE, TRUE,
|
{ "gnuplot", com_gnuplot, FALSE, FALSE, TRUE,
|
||||||
{ 1, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS,
|
{ 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS,
|
||||||
(void (*)()) NULL,
|
(void (*)()) NULL,
|
||||||
"file plotargs : Send plot to gnuplot." } ,
|
"file plotargs : Send plot to gnuplot." } ,
|
||||||
{ "hardcopy", com_hardcopy, FALSE, FALSE, TRUE,
|
{ "hardcopy", com_hardcopy, FALSE, FALSE, TRUE,
|
||||||
|
|
@ -574,7 +573,7 @@ struct comm nutcp_coms[] = {
|
||||||
(void (*)()) NULL,
|
(void (*)()) NULL,
|
||||||
"file plotargs : Send plot to Xgraph-11." } ,
|
"file plotargs : Send plot to Xgraph-11." } ,
|
||||||
{ "gnuplot", com_gnuplot, FALSE, FALSE, TRUE,
|
{ "gnuplot", com_gnuplot, FALSE, FALSE, TRUE,
|
||||||
{ 1, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS,
|
{ 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS,
|
||||||
(void (*)()) NULL,
|
(void (*)()) NULL,
|
||||||
"file plotargs : Send plot to gnuplot." } ,
|
"file plotargs : Send plot to gnuplot." } ,
|
||||||
{ "hardcopy", com_hardcopy, FALSE, FALSE, TRUE,
|
{ "hardcopy", com_hardcopy, FALSE, FALSE, TRUE,
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ extern char *nupa_inst_name; /* see spicenum.c */
|
||||||
extern long dynsubst; /* see inpcom.c */
|
extern long dynsubst; /* see inpcom.c */
|
||||||
extern unsigned int dynLlen;
|
extern unsigned int dynLlen;
|
||||||
|
|
||||||
|
#define MAX_STRING_INSERT 17 /* max. string length to be inserted and replaced */
|
||||||
|
#define ACT_CHARACTS 15 /* actual string length to be inserted and replaced */
|
||||||
|
/* was 10, needs to be less or equal to MAX_STRING_INSERT - 2 */
|
||||||
|
|
||||||
static double
|
static double
|
||||||
ternary_fcn (int conditional, double if_value, double else_value)
|
ternary_fcn (int conditional, double if_value, double else_value)
|
||||||
{
|
{
|
||||||
|
|
@ -1389,7 +1393,7 @@ evaluate (tdico * dico, char *q, char *t, unsigned char mode)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strf (u, 17, 10, q);
|
strf (u, 17, 10, q);
|
||||||
} /* strf() arg 2 doesnt work: always >10 significant digits ! */ ;
|
}
|
||||||
}
|
}
|
||||||
Strrem(v);
|
Strrem(v);
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -1570,7 +1574,7 @@ scanline (tdico * dico, char *s, char *r, unsigned char err)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
compactfloatnb (char *v)
|
compactfloatnb (char *v)
|
||||||
/* try to squeeze a floating pt format to 10 characters */
|
/* try to squeeze a floating pt format to MAXCHARACTS characters */
|
||||||
/* erase superfluous 000 digit streams before E */
|
/* erase superfluous 000 digit streams before E */
|
||||||
/* bug: truncating, no rounding */
|
/* bug: truncating, no rounding */
|
||||||
{
|
{
|
||||||
|
|
@ -1594,7 +1598,7 @@ compactfloatnb (char *v)
|
||||||
}
|
}
|
||||||
k = n - 1; /* mantissa is 0...k */
|
k = n - 1; /* mantissa is 0...k */
|
||||||
|
|
||||||
m = 17;
|
m = MAX_STRING_INSERT;
|
||||||
while (v[m] != ' ')
|
while (v[m] != ' ')
|
||||||
m--;
|
m--;
|
||||||
m++;
|
m++;
|
||||||
|
|
@ -1603,19 +1607,19 @@ compactfloatnb (char *v)
|
||||||
|
|
||||||
lem = k - m;
|
lem = k - m;
|
||||||
|
|
||||||
if ((lem + lex) > 10)
|
if ((lem + lex) > ACT_CHARACTS)
|
||||||
lem = 10 - lex;
|
lem = ACT_CHARACTS - lex;
|
||||||
|
|
||||||
pscopy (v, v, m+1, lem);
|
pscopy (v, v, m+1, lem);
|
||||||
if (cpos('.', v) > 0) {
|
if (cpos('.', v) > 0) {
|
||||||
while (lem < 6) {
|
while (lem < ACT_CHARACTS - 4) {
|
||||||
cadd(v, '0');
|
cadd(v, '0');
|
||||||
lem++;
|
lem++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cadd(v, '.');
|
cadd(v, '.');
|
||||||
lem++;
|
lem++;
|
||||||
while (lem < 6) {
|
while (lem < ACT_CHARACTS - 4) {
|
||||||
cadd(v, '0');
|
cadd(v, '0');
|
||||||
lem++;
|
lem++;
|
||||||
}
|
}
|
||||||
|
|
@ -1627,7 +1631,7 @@ compactfloatnb (char *v)
|
||||||
m++;
|
m++;
|
||||||
|
|
||||||
lem = length(v) - m;
|
lem = length(v) - m;
|
||||||
if (lem > 10) lem = 10;
|
if (lem > ACT_CHARACTS) lem = ACT_CHARACTS;
|
||||||
pscopy (v, v, m+1, lem);
|
pscopy (v, v, m+1, lem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1646,10 +1650,10 @@ insertnumber (tdico * dico, int i, char *s, char *u)
|
||||||
scopy (v, u);
|
scopy (v, u);
|
||||||
compactfloatnb (v);
|
compactfloatnb (v);
|
||||||
|
|
||||||
while (length (v) < 17)
|
while (length (v) < MAX_STRING_INSERT)
|
||||||
cadd (v, ' ');
|
cadd (v, ' ');
|
||||||
|
|
||||||
if (length (v) > 17)
|
if (length (v) > MAX_STRING_INSERT)
|
||||||
{
|
{
|
||||||
scopy (msg, " insertnumber fails: ");
|
scopy (msg, " insertnumber fails: ");
|
||||||
sadd (msg, u);
|
sadd (msg, u);
|
||||||
|
|
@ -1683,12 +1687,12 @@ insertnumber (tdico * dico, int i, char *s, char *u)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{ /* substitute at i-1 */
|
{ /* substitute at i-1-ACT_CHARACTS+11 */
|
||||||
i--;
|
for (k = 0; k < ACT_CHARACTS - 10; k++) i--;
|
||||||
for (k = 0; k < 11; k++)
|
for (k = 0; k < ACT_CHARACTS; k++)
|
||||||
s[i + k] = v[k];
|
s[i + k] = v[k];
|
||||||
|
|
||||||
i = i + 17;
|
i = i + MAX_STRING_INSERT;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue