projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r152: *** empty log message ***
[ctsim.git]
/
libctgraphics
/
ezsupport.cpp
diff --git
a/libctgraphics/ezsupport.cpp
b/libctgraphics/ezsupport.cpp
index 89457870060724f13cad342ca59e34c9c218682f..f788b2e75965b218f29fdabeff03021053dd490c 100644
(file)
--- a/
libctgraphics/ezsupport.cpp
+++ b/
libctgraphics/ezsupport.cpp
@@
-2,7
+2,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ezsupport.cpp,v 1.
2 2000/06/19 19:04:05
kevin Exp $
+** $Id: ezsupport.cpp,v 1.
4 2000/07/13 07:03:21
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-119,7
+119,7
@@
trunc (double x)
{
double integer;
{
double integer;
-
double frac =
modf (x, &integer);
+ modf (x, &integer);
return (integer);
}
return (integer);
}
@@
-151,7
+151,7
@@
make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, double maxval
wid = 2 + frac + expon;
if (minval < 0. || maxval < 0.)
++wid;
wid = 2 + frac + expon;
if (minval < 0. || maxval < 0.)
++wid;
- s
nprintf (fmtstr, sizeof(fmtstr), "%%%d.%dle", wid, frac
);
+ s
printf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g"
);
} else { /* use fixed format */
wid = static_cast<int>(trunc(logt)) + 1;
if (wid < 1)
} else { /* use fixed format */
wid = static_cast<int>(trunc(logt)) + 1;
if (wid < 1)
@@
-168,9
+168,9
@@
make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, double maxval
frac = *nfrac;
wid += 1 + frac;
frac = *nfrac;
wid += 1 + frac;
- s
nprintf (fmtstr, sizeof(fmtstr), "%%%d.%dlf", wid, frac
);
+ s
printf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "f"
);
}
}
-
+
*fldwid = wid;
*nfrac = frac;
}
*fldwid = wid;
*nfrac = frac;
}