Fixed a bunch of compiler warnings (MSVC) in the f2c code
This commit is contained in:
parent
453576f0ad
commit
e960f715b7
27 changed files with 76 additions and 75 deletions
|
|
@ -51,7 +51,7 @@ integer isamax_(integer *n, real *sx, integer *incx)
|
||||||
/* code for increment not equal to 1 */
|
/* code for increment not equal to 1 */
|
||||||
|
|
||||||
ix = 1;
|
ix = 1;
|
||||||
smax = dabs(sx[1]);
|
smax = (real) dabs(sx[1]);
|
||||||
ix += *incx;
|
ix += *incx;
|
||||||
i__1 = *n;
|
i__1 = *n;
|
||||||
for (i__ = 2; i__ <= i__1; ++i__) {
|
for (i__ = 2; i__ <= i__1; ++i__) {
|
||||||
|
|
@ -59,7 +59,7 @@ integer isamax_(integer *n, real *sx, integer *incx)
|
||||||
goto L5;
|
goto L5;
|
||||||
}
|
}
|
||||||
ret_val = i__;
|
ret_val = i__;
|
||||||
smax = (r__1 = sx[ix], dabs(r__1));
|
smax = (real) (r__1 = sx[ix], dabs(r__1));
|
||||||
L5:
|
L5:
|
||||||
ix += *incx;
|
ix += *incx;
|
||||||
/* L10: */
|
/* L10: */
|
||||||
|
|
@ -69,14 +69,14 @@ L5:
|
||||||
/* code for increment equal to 1 */
|
/* code for increment equal to 1 */
|
||||||
|
|
||||||
L20:
|
L20:
|
||||||
smax = dabs(sx[1]);
|
smax = (real) dabs(sx[1]);
|
||||||
i__1 = *n;
|
i__1 = *n;
|
||||||
for (i__ = 2; i__ <= i__1; ++i__) {
|
for (i__ = 2; i__ <= i__1; ++i__) {
|
||||||
if ((r__1 = sx[i__], dabs(r__1)) <= smax) {
|
if ((r__1 = sx[i__], dabs(r__1)) <= smax) {
|
||||||
goto L30;
|
goto L30;
|
||||||
}
|
}
|
||||||
ret_val = i__;
|
ret_val = i__;
|
||||||
smax = (r__1 = sx[i__], dabs(r__1));
|
smax = (real) (r__1 = sx[i__], dabs(r__1));
|
||||||
L30:
|
L30:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ static integer c__11 = 11;
|
||||||
d__ = 0.;
|
d__ = 0.;
|
||||||
e = 0.;
|
e = 0.;
|
||||||
|
|
||||||
i__1 = *n - 1 << 1;
|
i__1 = (*n - 1) << 1;
|
||||||
for (k = 1; k <= i__1; k += 2) {
|
for (k = 1; k <= i__1; k += 2) {
|
||||||
if (z__[k] < 0.) {
|
if (z__[k] < 0.) {
|
||||||
*info = -(k + 200);
|
*info = -(k + 200);
|
||||||
|
|
@ -266,8 +266,8 @@ static integer c__11 = 11;
|
||||||
/* Reverse the qd-array, if warranted. */
|
/* Reverse the qd-array, if warranted. */
|
||||||
|
|
||||||
if (z__[(i0 << 2) - 3] * 1.5 < z__[(n0 << 2) - 3]) {
|
if (z__[(i0 << 2) - 3] * 1.5 < z__[(n0 << 2) - 3]) {
|
||||||
ipn4 = i0 + n0 << 2;
|
ipn4 = (i0 + n0) << 2;
|
||||||
i__1 = i0 + n0 - 1 << 1;
|
i__1 = (i0 + n0 - 1) << 1;
|
||||||
for (i4 = i0 << 2; i4 <= i__1; i4 += 4) {
|
for (i4 = i0 << 2; i4 <= i__1; i4 += 4) {
|
||||||
temp = z__[i4 - 3];
|
temp = z__[i4 - 3];
|
||||||
z__[i4 - 3] = z__[ipn4 - i4 - 3];
|
z__[i4 - 3] = z__[ipn4 - i4 - 3];
|
||||||
|
|
@ -287,7 +287,7 @@ static integer c__11 = 11;
|
||||||
|
|
||||||
d__ = z__[(n0 << 2) + pp - 3];
|
d__ = z__[(n0 << 2) + pp - 3];
|
||||||
i__1 = (i0 << 2) + pp;
|
i__1 = (i0 << 2) + pp;
|
||||||
for (i4 = (n0 - 1 << 2) + pp; i4 >= i__1; i4 += -4) {
|
for (i4 = ((n0 - 1) << 2) + pp; i4 >= i__1; i4 += -4) {
|
||||||
if (z__[i4 - 1] <= tol2 * d__) {
|
if (z__[i4 - 1] <= tol2 * d__) {
|
||||||
z__[i4 - 1] = 0.;
|
z__[i4 - 1] = 0.;
|
||||||
d__ = z__[i4 - 3];
|
d__ = z__[i4 - 3];
|
||||||
|
|
@ -301,7 +301,7 @@ static integer c__11 = 11;
|
||||||
|
|
||||||
emin = z__[(i0 << 2) + pp + 1];
|
emin = z__[(i0 << 2) + pp + 1];
|
||||||
d__ = z__[(i0 << 2) + pp - 3];
|
d__ = z__[(i0 << 2) + pp - 3];
|
||||||
i__1 = (n0 - 1 << 2) + pp;
|
i__1 = ((n0 - 1) << 2) + pp;
|
||||||
for (i4 = (i0 << 2) + pp; i4 <= i__1; i4 += 4) {
|
for (i4 = (i0 << 2) + pp; i4 <= i__1; i4 += 4) {
|
||||||
z__[i4 - (pp << 1) - 2] = d__ + z__[i4 - 1];
|
z__[i4 - (pp << 1) - 2] = d__ + z__[i4 - 1];
|
||||||
if (z__[i4 - 1] <= tol2 * d__) {
|
if (z__[i4 - 1] <= tol2 * d__) {
|
||||||
|
|
@ -345,7 +345,7 @@ static integer c__11 = 11;
|
||||||
|
|
||||||
iter = 2;
|
iter = 2;
|
||||||
nfail = 0;
|
nfail = 0;
|
||||||
ndiv = n0 - i0 << 1;
|
ndiv = (n0 - i0) << 1;
|
||||||
|
|
||||||
i__1 = *n + 1;
|
i__1 = *n + 1;
|
||||||
for (iwhila = 1; iwhila <= i__1; ++iwhila) {
|
for (iwhila = 1; iwhila <= i__1; ++iwhila) {
|
||||||
|
|
@ -442,7 +442,7 @@ L100:
|
||||||
qmax = z__[(i0 << 2) - 3];
|
qmax = z__[(i0 << 2) - 3];
|
||||||
emin = z__[(i0 << 2) - 1];
|
emin = z__[(i0 << 2) - 1];
|
||||||
oldemn = z__[i0 * 4];
|
oldemn = z__[i0 * 4];
|
||||||
i__3 = n0 - 3 << 2;
|
i__3 = (n0 - 3) << 2;
|
||||||
for (i4 = i0 << 2; i4 <= i__3; i4 += 4) {
|
for (i4 = i0 << 2; i4 <= i__3; i4 += 4) {
|
||||||
if (z__[i4] <= tol2 * z__[i4 - 3] || z__[i4 - 1] <=
|
if (z__[i4] <= tol2 * z__[i4 - 3] || z__[i4 - 1] <=
|
||||||
tol2 * sigma) {
|
tol2 * sigma) {
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,8 @@ L50:
|
||||||
|
|
||||||
if (*dmin__ <= 0. || *n0 < n0in) {
|
if (*dmin__ <= 0. || *n0 < n0in) {
|
||||||
if (z__[(*i0 << 2) + *pp - 3] * 1.5 < z__[(*n0 << 2) + *pp - 3]) {
|
if (z__[(*i0 << 2) + *pp - 3] * 1.5 < z__[(*n0 << 2) + *pp - 3]) {
|
||||||
ipn4 = *i0 + *n0 << 2;
|
ipn4 = (*i0 + *n0) << 2;
|
||||||
i__1 = *i0 + *n0 - 1 << 1;
|
i__1 = (*i0 + *n0 - 1) << 1;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
temp = z__[j4 - 3];
|
temp = z__[j4 - 3];
|
||||||
z__[j4 - 3] = z__[ipn4 - j4 - 3];
|
z__[j4 - 3] = z__[ipn4 - j4 - 3];
|
||||||
|
|
@ -247,12 +247,12 @@ L80:
|
||||||
|
|
||||||
goto L100;
|
goto L100;
|
||||||
|
|
||||||
} else if (*dmin__ < 0. && dmin1 > 0. && z__[(*n0 - 1 << 2) - *pp] <
|
} else if (*dmin__ < 0. && dmin1 > 0. && z__[((*n0 - 1) << 2) - *pp] <
|
||||||
tol * (*sigma + dn1) && abs(dn) < tol * *sigma) {
|
tol * (*sigma + dn1) && abs(dn) < tol * *sigma) {
|
||||||
|
|
||||||
/* Convergence hidden by negative DN. */
|
/* Convergence hidden by negative DN. */
|
||||||
|
|
||||||
z__[(*n0 - 1 << 2) - *pp + 2] = 0.;
|
z__[((*n0 - 1) << 2) - *pp + 2] = 0.;
|
||||||
*dmin__ = 0.;
|
*dmin__ = 0.;
|
||||||
goto L100;
|
goto L100;
|
||||||
} else if (*dmin__ < 0.) {
|
} else if (*dmin__ < 0.) {
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ extern "C" {
|
||||||
/* Code for IEEE arithmetic. */
|
/* Code for IEEE arithmetic. */
|
||||||
|
|
||||||
if (*pp == 0) {
|
if (*pp == 0) {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 2] = d__ + z__[j4 - 1];
|
z__[j4 - 2] = d__ + z__[j4 - 1];
|
||||||
temp = z__[j4 + 1] / z__[j4 - 2];
|
temp = z__[j4 + 1] / z__[j4 - 2];
|
||||||
|
|
@ -103,7 +103,7 @@ extern "C" {
|
||||||
/* L10: */
|
/* L10: */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 3] = d__ + z__[j4];
|
z__[j4 - 3] = d__ + z__[j4];
|
||||||
temp = z__[j4 + 2] / z__[j4 - 3];
|
temp = z__[j4 + 2] / z__[j4 - 3];
|
||||||
|
|
@ -121,7 +121,7 @@ extern "C" {
|
||||||
|
|
||||||
*dnm2 = d__;
|
*dnm2 = d__;
|
||||||
*dmin2 = *dmin__;
|
*dmin2 = *dmin__;
|
||||||
j4 = (*n0 - 2 << 2) - *pp;
|
j4 = ((*n0 - 2) << 2) - *pp;
|
||||||
j4p2 = j4 + (*pp << 1) - 1;
|
j4p2 = j4 + (*pp << 1) - 1;
|
||||||
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
||||||
z__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);
|
z__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);
|
||||||
|
|
@ -141,7 +141,7 @@ extern "C" {
|
||||||
/* Code for non IEEE arithmetic. */
|
/* Code for non IEEE arithmetic. */
|
||||||
|
|
||||||
if (*pp == 0) {
|
if (*pp == 0) {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 2] = d__ + z__[j4 - 1];
|
z__[j4 - 2] = d__ + z__[j4 - 1];
|
||||||
if (d__ < 0.) {
|
if (d__ < 0.) {
|
||||||
|
|
@ -157,7 +157,7 @@ extern "C" {
|
||||||
/* L30: */
|
/* L30: */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 3] = d__ + z__[j4];
|
z__[j4 - 3] = d__ + z__[j4];
|
||||||
if (d__ < 0.) {
|
if (d__ < 0.) {
|
||||||
|
|
@ -178,7 +178,7 @@ extern "C" {
|
||||||
|
|
||||||
*dnm2 = d__;
|
*dnm2 = d__;
|
||||||
*dmin2 = *dmin__;
|
*dmin2 = *dmin__;
|
||||||
j4 = (*n0 - 2 << 2) - *pp;
|
j4 = ((*n0 - 2) << 2) - *pp;
|
||||||
j4p2 = j4 + (*pp << 1) - 1;
|
j4p2 = j4 + (*pp << 1) - 1;
|
||||||
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
||||||
if (*dnm2 < 0.) {
|
if (*dnm2 < 0.) {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ extern "C" {
|
||||||
*dmin__ = d__;
|
*dmin__ = d__;
|
||||||
|
|
||||||
if (*pp == 0) {
|
if (*pp == 0) {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 2] = d__ + z__[j4 - 1];
|
z__[j4 - 2] = d__ + z__[j4 - 1];
|
||||||
if (z__[j4 - 2] == 0.) {
|
if (z__[j4 - 2] == 0.) {
|
||||||
|
|
@ -113,7 +113,7 @@ extern "C" {
|
||||||
/* L10: */
|
/* L10: */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
i__1 = *n0 - 3 << 2;
|
i__1 = (*n0 - 3) << 2;
|
||||||
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {
|
||||||
z__[j4 - 3] = d__ + z__[j4];
|
z__[j4 - 3] = d__ + z__[j4];
|
||||||
if (z__[j4 - 3] == 0.) {
|
if (z__[j4 - 3] == 0.) {
|
||||||
|
|
@ -142,7 +142,7 @@ extern "C" {
|
||||||
|
|
||||||
*dnm2 = d__;
|
*dnm2 = d__;
|
||||||
*dmin2 = *dmin__;
|
*dmin2 = *dmin__;
|
||||||
j4 = (*n0 - 2 << 2) - *pp;
|
j4 = ((*n0 - 2) << 2) - *pp;
|
||||||
j4p2 = j4 + (*pp << 1) - 1;
|
j4p2 = j4 + (*pp << 1) - 1;
|
||||||
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
z__[j4 - 2] = *dnm2 + z__[j4p2];
|
||||||
if (z__[j4 - 2] == 0.) {
|
if (z__[j4 - 2] == 0.) {
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ void c_cos(complex *r, complex *z)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
double zi = z->i, zr = z->r;
|
double zi = z->i, zr = z->r;
|
||||||
r->r = cos(zr) * cosh(zi);
|
r->r = (real) (cos(zr) * cosh(zi));
|
||||||
r->i = - sin(zr) * sinh(zi);
|
r->i = (real) (- sin(zr) * sinh(zi));
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ void c_div(complex *c, complex *a, complex *b)
|
||||||
ratio = (double)b->r / b->i ;
|
ratio = (double)b->r / b->i ;
|
||||||
den = b->i * (1 + ratio*ratio);
|
den = b->i * (1 + ratio*ratio);
|
||||||
cr = (a->r*ratio + a->i) / den;
|
cr = (a->r*ratio + a->i) / den;
|
||||||
c->i = (a->i*ratio - a->r) / den;
|
c->i = (real) ((a->i*ratio - a->r) / den);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -44,9 +44,9 @@ void c_div(complex *c, complex *a, complex *b)
|
||||||
ratio = (double)b->i / b->r ;
|
ratio = (double)b->i / b->r ;
|
||||||
den = b->r * (1 + ratio*ratio);
|
den = b->r * (1 + ratio*ratio);
|
||||||
cr = (a->r + a->i*ratio) / den;
|
cr = (a->r + a->i*ratio) / den;
|
||||||
c->i = (a->i - a->r*ratio) / den;
|
c->i = (real) ((a->i - a->r*ratio) / den);
|
||||||
}
|
}
|
||||||
c->r = cr;
|
c->r = (real) cr;
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ void c_exp(complex *r, complex *z)
|
||||||
double expx, zi = z->i;
|
double expx, zi = z->i;
|
||||||
|
|
||||||
expx = exp(z->r);
|
expx = exp(z->r);
|
||||||
r->r = expx * cos(zi);
|
r->r = (real) (expx * cos(zi));
|
||||||
r->i = expx * sin(zi);
|
r->i = (real) (expx * sin(zi));
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ void c_log(complex *r, complex *z)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
double zi, zr;
|
double zi, zr;
|
||||||
r->i = atan2(zi = z->i, zr = z->r);
|
r->i = (real) atan2(zi = z->i, zr = z->r);
|
||||||
r->r = log( f__cabs(zr, zi) );
|
r->r = (real) log( f__cabs(zr, zi) );
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ void c_sin(complex *r, complex *z)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
double zi = z->i, zr = z->r;
|
double zi = z->i, zr = z->r;
|
||||||
r->r = sin(zr) * cosh(zi);
|
r->r = (real) (sin(zr) * cosh(zi));
|
||||||
r->i = cos(zr) * sinh(zi);
|
r->i = (real) (cos(zr) * sinh(zi));
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,18 +22,19 @@ void c_sqrt(complex *r, complex *z)
|
||||||
r->r = r->i = 0.;
|
r->r = r->i = 0.;
|
||||||
else if(zr > 0)
|
else if(zr > 0)
|
||||||
{
|
{
|
||||||
r->r = t = sqrt(0.5 * (mag + zr) );
|
t = sqrt(0.5 * (mag + zr) );
|
||||||
|
r->r = (real) t;
|
||||||
t = zi / t;
|
t = zi / t;
|
||||||
r->i = 0.5 * t;
|
r->i = (real) (0.5 * t);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = sqrt(0.5 * (mag - zr) );
|
t = sqrt(0.5 * (mag - zr) );
|
||||||
if(zi < 0)
|
if(zi < 0)
|
||||||
t = -t;
|
t = -t;
|
||||||
r->i = t;
|
r->i = (real) t;
|
||||||
t = zi / t;
|
t = zi / t;
|
||||||
r->r = 0.5 * t;
|
r->r = (real) (0.5 * t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ dtime_(float *tarray)
|
||||||
static double t0;
|
static double t0;
|
||||||
double t = clock();
|
double t = clock();
|
||||||
tarray[1] = 0;
|
tarray[1] = 0;
|
||||||
tarray[0] = (t - t0) / CLOCKS_PER_SECOND;
|
tarray[0] = (float) ((t - t0) / CLOCKS_PER_SECOND);
|
||||||
t0 = t;
|
t0 = t;
|
||||||
return tarray[0];
|
return tarray[0];
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ etime_(float *tarray)
|
||||||
#endif
|
#endif
|
||||||
double t = clock();
|
double t = clock();
|
||||||
tarray[1] = 0;
|
tarray[1] = 0;
|
||||||
return tarray[0] = t / CLOCKS_PER_SECOND;
|
return (float) (tarray[0] = t / CLOCKS_PER_SECOND);
|
||||||
#else
|
#else
|
||||||
struct tms t;
|
struct tms t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ char *f__icvt(longint value, int *ndigit, int *sign, int base)
|
||||||
}
|
}
|
||||||
i = MAXINTLENGTH;
|
i = MAXINTLENGTH;
|
||||||
do {
|
do {
|
||||||
buf[--i] = (uvalue%base) + '0';
|
buf[--i] = (char) ((uvalue%base) + '0');
|
||||||
uvalue /= base;
|
uvalue /= base;
|
||||||
}
|
}
|
||||||
while(uvalue > 0);
|
while(uvalue > 0);
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ integer f_inqu(inlist *a)
|
||||||
if(byfile) *a->inopen=(p!=NULL);
|
if(byfile) *a->inopen=(p!=NULL);
|
||||||
else *a->inopen=(p!=NULL && p->ufd!=NULL);
|
else *a->inopen=(p!=NULL && p->ufd!=NULL);
|
||||||
}
|
}
|
||||||
if(a->innum!=NULL) *a->innum= p-f__units;
|
if(a->innum!=NULL) *a->innum= (ftnint) (p-f__units);
|
||||||
if(a->innamed!=NULL) {
|
if(a->innamed!=NULL) {
|
||||||
if(byfile || (p!=NULL && p->ufnm!=NULL))
|
if(byfile || (p!=NULL && p->ufnm!=NULL))
|
||||||
*a->innamed=1;
|
*a->innamed=1;
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ retry:
|
||||||
GETC(ch);
|
GETC(ch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
havenum += sp - sp1;
|
havenum += (int) (sp - sp1);
|
||||||
se = 0;
|
se = 0;
|
||||||
if (issign(ch))
|
if (issign(ch))
|
||||||
goto signonly;
|
goto signonly;
|
||||||
|
|
@ -751,15 +751,15 @@ l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case TYREAL:
|
case TYREAL:
|
||||||
Ptr->flreal=f__lx;
|
Ptr->flreal= (real) f__lx;
|
||||||
break;
|
break;
|
||||||
case TYDREAL:
|
case TYDREAL:
|
||||||
Ptr->fldouble=f__lx;
|
Ptr->fldouble=f__lx;
|
||||||
break;
|
break;
|
||||||
case TYCOMPLEX:
|
case TYCOMPLEX:
|
||||||
xx=(real *)ptr;
|
xx=(real *)ptr;
|
||||||
*xx++ = f__lx;
|
*xx++ = (real) f__lx;
|
||||||
*xx = f__ly;
|
*xx = (real) f__ly;
|
||||||
break;
|
break;
|
||||||
case TYDCOMPLEX:
|
case TYDCOMPLEX:
|
||||||
yy=(doublereal *)ptr;
|
yy=(doublereal *)ptr;
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ l_g(char *buf, double n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f__ret:
|
f__ret:
|
||||||
return b - buf;
|
return (int) (b - buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ fk_open(int seq, int fmt, ftnint n)
|
||||||
a.oerr=1;
|
a.oerr=1;
|
||||||
a.ounit=n;
|
a.ounit=n;
|
||||||
a.ofnm=nbuf;
|
a.ofnm=nbuf;
|
||||||
a.ofnmlen=strlen(nbuf);
|
a.ofnmlen= (ftnlen) strlen(nbuf);
|
||||||
a.osta=NULL;
|
a.osta=NULL;
|
||||||
a.oacc= (char*)(seq==SEQ?"s":"d");
|
a.oacc= (char*)(seq==SEQ?"s":"d");
|
||||||
a.ofm = (char*)(fmt==FMT?"f":"u");
|
a.ofm = (char*)(fmt==FMT?"f":"u");
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ a1.i = a->i;
|
||||||
|
|
||||||
pow_zi(&p1, &a1, b);
|
pow_zi(&p1, &a1, b);
|
||||||
|
|
||||||
p->r = p1.r;
|
p->r = (real) p1.r;
|
||||||
p->i = p1.i;
|
p->i = (real) p1.i;
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ rd_Z(Uint *n, int w, ftnlen len)
|
||||||
if (bad)
|
if (bad)
|
||||||
return errno = 115;
|
return errno = 115;
|
||||||
w = (int)len;
|
w = (int)len;
|
||||||
w1 = s - s0;
|
w1 = (int) (s - s0);
|
||||||
w2 = w1+1 >> 1;
|
w2 = (w1+1) >> 1;
|
||||||
t = (char *)n;
|
t = (char *)n;
|
||||||
if (*(char *)&one) {
|
if (*(char *)&one) {
|
||||||
/* little endian */
|
/* little endian */
|
||||||
|
|
@ -87,7 +87,7 @@ rd_Z(Uint *n, int w, ftnlen len)
|
||||||
t += i;
|
t += i;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
*t = hex[*s0 & 0xff]-1 << 4 | hex[s0[1] & 0xff]-1;
|
*t = (hex[*s0 & 0xff]-1) << 4 | hex[s0[1] & 0xff]-1;
|
||||||
t += i;
|
t += i;
|
||||||
s0 += 2;
|
s0 += 2;
|
||||||
}
|
}
|
||||||
|
|
@ -383,7 +383,7 @@ done:
|
||||||
}
|
}
|
||||||
zero:
|
zero:
|
||||||
if (len == sizeof(real))
|
if (len == sizeof(real))
|
||||||
p->pf = x;
|
p->pf = (real) x;
|
||||||
else
|
else
|
||||||
p->pd = x;
|
p->pd = x;
|
||||||
return(0);
|
return(0);
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ nogood:
|
||||||
case 'N':
|
case 'N':
|
||||||
signspace = 0; /* no sign for NaNs */
|
signspace = 0; /* no sign for NaNs */
|
||||||
}
|
}
|
||||||
delta = w - strlen(buf) - signspace;
|
delta = w - (int) strlen(buf) - signspace;
|
||||||
if (delta < 0)
|
if (delta < 0)
|
||||||
goto nogood;
|
goto nogood;
|
||||||
while(--delta >= 0)
|
while(--delta >= 0)
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ wrt_Z(Uint *n, int w, int minlen, ftnlen len)
|
||||||
for(;; s += i)
|
for(;; s += i)
|
||||||
if (s == se || *s)
|
if (s == se || *s)
|
||||||
break;
|
break;
|
||||||
w1 = (i*(se-s) << 1) + 1;
|
w1 = (int) (i*(se-s) << 1) + 1;
|
||||||
if (*s & 0xf0)
|
if (*s & 0xf0)
|
||||||
w1++;
|
w1++;
|
||||||
if (w1 > w)
|
if (w1 > w)
|
||||||
|
|
|
||||||
|
|
@ -8561,7 +8561,7 @@ L30:
|
||||||
}
|
}
|
||||||
i__2 = km1;
|
i__2 = km1;
|
||||||
for (j = 1; j <= i__2; ++j) {
|
for (j = 1; j <= i__2; ++j) {
|
||||||
i__ = (j - 1 << 1) + 1;
|
i__ = ((j - 1) << 1) + 1;
|
||||||
t1 = a[j + k * a_dim1];
|
t1 = a[j + k * a_dim1];
|
||||||
t2 = a[j + 1 + k * a_dim1];
|
t2 = a[j + 1 + k * a_dim1];
|
||||||
c__ = q[i__];
|
c__ = q[i__];
|
||||||
|
|
@ -8617,7 +8617,7 @@ L70:
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
i__1 = nm1;
|
i__1 = nm1;
|
||||||
for (k = 1; k <= i__1; ++k) {
|
for (k = 1; k <= i__1; ++k) {
|
||||||
i__ = (k - 1 << 1) + 1;
|
i__ = ((k - 1) << 1) + 1;
|
||||||
t1 = a[k + *n * a_dim1];
|
t1 = a[k + *n * a_dim1];
|
||||||
t2 = a[k + 1 + *n * a_dim1];
|
t2 = a[k + 1 + *n * a_dim1];
|
||||||
c__ = q[i__];
|
c__ = q[i__];
|
||||||
|
|
@ -8745,7 +8745,7 @@ L130:
|
||||||
i__1 = *n;
|
i__1 = *n;
|
||||||
for (k = 1; k <= i__1; ++k) {
|
for (k = 1; k <= i__1; ++k) {
|
||||||
kp1 = k + 1;
|
kp1 = k + 1;
|
||||||
iq = (k - 1 << 1) + 1;
|
iq = ((k - 1) << 1) + 1;
|
||||||
c__ = q[iq];
|
c__ = q[iq];
|
||||||
s = q[iq + 1];
|
s = q[iq + 1];
|
||||||
t1 = b[k];
|
t1 = b[k];
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ integer j4save_(integer *iwhich, integer *ivalue, logical *iset)
|
||||||
/* ***END PROLOGUE J4SAVE */
|
/* ***END PROLOGUE J4SAVE */
|
||||||
/* SAVE IPARAM */
|
/* SAVE IPARAM */
|
||||||
/* ***FIRST EXECUTABLE STATEMENT J4SAVE */
|
/* ***FIRST EXECUTABLE STATEMENT J4SAVE */
|
||||||
ret_val = iparam[(0 + (0 + (*iwhich - 1 << 2))) / 4];
|
ret_val = iparam[(0 + (0 + ((*iwhich - 1) << 2))) / 4];
|
||||||
if (*iset) {
|
if (*iset) {
|
||||||
iparam[*iwhich - 1] = *ivalue;
|
iparam[*iwhich - 1] = *ivalue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@
|
||||||
k3 = 0;
|
k3 = 0;
|
||||||
k4 = 0;
|
k4 = 0;
|
||||||
k5 = 0;
|
k5 = 0;
|
||||||
etst = 1.0E-13;
|
etst = 1.0E-13f;
|
||||||
xm = 1.0;
|
xm = 1.0;
|
||||||
|
|
||||||
/* Function Body */
|
/* Function Body */
|
||||||
|
|
@ -230,7 +230,7 @@ L16:
|
||||||
temd1 += (doublereal) x[i__] * (doublereal) w[i__] * temd2 * temd2;
|
temd1 += (doublereal) x[i__] * (doublereal) w[i__] * temd2 * temd2;
|
||||||
/* L18: */
|
/* L18: */
|
||||||
}
|
}
|
||||||
a[jp1] = temd1 / (doublereal) w11;
|
a[jp1] = (real) (temd1 / w11);
|
||||||
|
|
||||||
/* EVALUATE ORTHOGONAL POLYNOMIAL AT DATA POINTS */
|
/* EVALUATE ORTHOGONAL POLYNOMIAL AT DATA POINTS */
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ L16:
|
||||||
temd1 += temd2;
|
temd1 += temd2;
|
||||||
}
|
}
|
||||||
temd1 /= (doublereal) w11;
|
temd1 /= (doublereal) w11;
|
||||||
a[k2pj + 1] = temd1;
|
a[k2pj + 1] = (real) temd1;
|
||||||
|
|
||||||
/* UPDATE POLYNOMIAL EVALUATIONS AT EACH OF THE DATA POINTS, AND */
|
/* UPDATE POLYNOMIAL EVALUATIONS AT EACH OF THE DATA POINTS, AND */
|
||||||
/* ACCUMULATE SUM OF SQUARES OF ERRORS. THE POLYNOMIAL EVALUATIONS ARE */
|
/* ACCUMULATE SUM OF SQUARES OF ERRORS. THE POLYNOMIAL EVALUATIONS ARE */
|
||||||
|
|
@ -278,8 +278,8 @@ L16:
|
||||||
k5pi = k5 + i__;
|
k5pi = k5 + i__;
|
||||||
temd2 = (doublereal) r__[i__] + (doublereal) a[k5pi] + temd1 * (
|
temd2 = (doublereal) r__[i__] + (doublereal) a[k5pi] + temd1 * (
|
||||||
doublereal) a[k4pi];
|
doublereal) a[k4pi];
|
||||||
r__[i__] = temd2;
|
r__[i__] = (real) temd2;
|
||||||
a[k5pi] = temd2 - (doublereal) r__[i__];
|
a[k5pi] = (real) (temd2 - r__[i__]);
|
||||||
/* L21: */
|
/* L21: */
|
||||||
/* Computing 2nd power */
|
/* Computing 2nd power */
|
||||||
r__1 = y[i__] - r__[i__] - a[k5pi];
|
r__1 = y[i__] - r__[i__] - a[k5pi];
|
||||||
|
|
@ -397,7 +397,7 @@ L33:
|
||||||
/* L35: */
|
/* L35: */
|
||||||
}
|
}
|
||||||
L36:
|
L36:
|
||||||
*eps = sqrt(sig / xm);
|
*eps = (real) sqrt(sig / xm);
|
||||||
L37:
|
L37:
|
||||||
return 0;
|
return 0;
|
||||||
} /* polfit_ */
|
} /* polfit_ */
|
||||||
|
|
|
||||||
|
|
@ -87,11 +87,11 @@
|
||||||
}
|
}
|
||||||
ndo = max(*nder,0);
|
ndo = max(*nder,0);
|
||||||
ndo = min(ndo,*l);
|
ndo = min(ndo,*l);
|
||||||
maxord = a[1] + .5f;
|
maxord = (integer) (a[1] + .5f);
|
||||||
k1 = maxord + 1;
|
k1 = maxord + 1;
|
||||||
k2 = k1 + maxord;
|
k2 = k1 + maxord;
|
||||||
k3 = k2 + maxord + 2;
|
k3 = k2 + maxord + 2;
|
||||||
nord = a[k3] + .5f;
|
nord = (integer) (a[k3] + .5f);
|
||||||
if (*l > nord) {
|
if (*l > nord) {
|
||||||
goto L11;
|
goto L11;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,8 +143,8 @@ static integer c__1 = 1;
|
||||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||||
io___9.ciunit = iunit;
|
io___9.ciunit = iunit;
|
||||||
s_wsfe(&io___9);
|
s_wsfe(&io___9);
|
||||||
do_fio(&c__1, libtab + (i__ - 1 << 3), (ftnlen)8);
|
do_fio(&c__1, libtab + ((i__ - 1) << 3), (ftnlen)8);
|
||||||
do_fio(&c__1, subtab + (i__ - 1 << 3), (ftnlen)8);
|
do_fio(&c__1, subtab + ((i__ - 1) << 3), (ftnlen)8);
|
||||||
do_fio(&c__1, mestab + (i__ - 1) * 20, (ftnlen)20);
|
do_fio(&c__1, mestab + (i__ - 1) * 20, (ftnlen)20);
|
||||||
do_fio(&c__1, (char *)&nertab[i__ - 1], (ftnlen)sizeof(
|
do_fio(&c__1, (char *)&nertab[i__ - 1], (ftnlen)sizeof(
|
||||||
integer));
|
integer));
|
||||||
|
|
@ -187,8 +187,8 @@ static integer c__1 = 1;
|
||||||
s_copy(mes, messg, (ftnlen)20, messg_len);
|
s_copy(mes, messg, (ftnlen)20, messg_len);
|
||||||
i__1 = nmsg;
|
i__1 = nmsg;
|
||||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||||
if (s_cmp(lib, libtab + (i__ - 1 << 3), (ftnlen)8, (ftnlen)8) ==
|
if (s_cmp(lib, libtab + ((i__ - 1) << 3), (ftnlen)8, (ftnlen)8) ==
|
||||||
0 && s_cmp(sub, subtab + (i__ - 1 << 3), (ftnlen)8, (
|
0 && s_cmp(sub, subtab + ((i__ - 1) << 3), (ftnlen)8, (
|
||||||
ftnlen)8) == 0 && s_cmp(mes, mestab + (i__ - 1) * 20, (
|
ftnlen)8) == 0 && s_cmp(mes, mestab + (i__ - 1) * 20, (
|
||||||
ftnlen)20, (ftnlen)20) == 0 && *nerr == nertab[i__ - 1] &&
|
ftnlen)20, (ftnlen)20) == 0 && *nerr == nertab[i__ - 1] &&
|
||||||
*level == levtab[i__ - 1]) {
|
*level == levtab[i__ - 1]) {
|
||||||
|
|
@ -204,8 +204,8 @@ static integer c__1 = 1;
|
||||||
/* Empty slot found for new message. */
|
/* Empty slot found for new message. */
|
||||||
|
|
||||||
++nmsg;
|
++nmsg;
|
||||||
s_copy(libtab + (i__ - 1 << 3), lib, (ftnlen)8, (ftnlen)8);
|
s_copy(libtab + ((i__ - 1) << 3), lib, (ftnlen)8, (ftnlen)8);
|
||||||
s_copy(subtab + (i__ - 1 << 3), sub, (ftnlen)8, (ftnlen)8);
|
s_copy(subtab + ((i__ - 1) << 3), sub, (ftnlen)8, (ftnlen)8);
|
||||||
s_copy(mestab + (i__ - 1) * 20, mes, (ftnlen)20, (ftnlen)20);
|
s_copy(mestab + (i__ - 1) * 20, mes, (ftnlen)20, (ftnlen)20);
|
||||||
nertab[i__ - 1] = *nerr;
|
nertab[i__ - 1] = *nerr;
|
||||||
levtab[i__ - 1] = *level;
|
levtab[i__ - 1] = *level;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue