var = calc_magvar( SGD_DEGREES_TO_RADIANS * lat_deg, SGD_DEGREES_TO_RADIANS * lon_deg, h,
yymmdd_to_julian_days(yy,mm,dd), field );
-fprintf(stdout,"%6.0lf %6.0lf %6.0lf\n", field[0], field[1], field[2] );
-fprintf(stdout,"%6.0lf %6.0lf %6.0lf\n", field[3], field[4], field[5] );
-fprintf(stdout,"%6.0lf %6.0lf %6.0lf %4.2lf %4.2lf \n",
+fprintf(stdout,"%6.0f %6.0f %6.0f\n", field[0], field[1], field[2] );
+fprintf(stdout,"%6.0f %6.0f %6.0f\n", field[3], field[4], field[5] );
+fprintf(stdout,"%6.0f %6.0f %6.0f %4.2f %4.2f \n",
field[3],field[4],field[5],
SGD_RADIANS_TO_DEGREES * (atan(field[5]/pow(field[3]*field[3]+field[4]*field[4],0.5))),
SGD_RADIANS_TO_DEGREES * var);
case STRING:
case UNSPECIFIED:
return GET_STRING;
+ case NONE:
+ default:
+ return "";
}
-
- return ""; // if NONE
}
case STRING:
case UNSPECIFIED:
return (GET_STRING == "true" || getDoubleValue() != 0.0L);
+ case NONE:
+ default:
+ return false;
}
-
- return false; // if NONE
}
int
case STRING:
case UNSPECIFIED:
return atoi(GET_STRING.c_str());
+ case NONE:
+ default:
+ return 0;
}
-
- return 0; // if NONE
}
long
case STRING:
case UNSPECIFIED:
return strtol(GET_STRING.c_str(), 0, 0);
+ case NONE:
+ default:
+ return 0L;
}
-
- return 0L; // if NONE
}
float
case STRING:
case UNSPECIFIED:
return atof(GET_STRING.c_str());
+ case NONE:
+ default:
+ return 0.0;
}
-
- return 0.0; // if NONE
}
double
case STRING:
case UNSPECIFIED:
return strtod(GET_STRING.c_str(), 0);
+ case NONE:
+ default:
+ return 0.0L;
}
-
- return 0.0L; // if NONE
}
string
result = SET_DOUBLE(double(value));
break;
case STRING:
+ case UNSPECIFIED:
result = SET_STRING(value ? "true" : "false");
break;
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(BOOL);
case DOUBLE:
result = SET_DOUBLE(double(value));
break;
- case STRING: {
+ case STRING:
+ case UNSPECIFIED: {
char buf[128];
sprintf(buf, "%d", value);
result = SET_STRING(buf);
break;
}
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(INT);
case DOUBLE:
result = SET_DOUBLE(double(value));
break;
- case STRING: {
+ case STRING:
+ case UNSPECIFIED: {
char buf[128];
- sprintf(buf, "%d", value);
+ sprintf(buf, "%ld", value);
result = SET_STRING(buf);
break;
}
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(LONG);
case DOUBLE:
result = SET_DOUBLE(double(value));
break;
- case STRING: {
+ case STRING:
+ case UNSPECIFIED: {
char buf[128];
sprintf(buf, "%f", value);
result = SET_STRING(buf);
break;
}
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(FLOAT);
case DOUBLE:
result = SET_DOUBLE(value);
break;
- case STRING: {
+ case STRING:
+ case UNSPECIFIED: {
char buf[128];
- sprintf(buf, "%lf", value);
+ sprintf(buf, "%f", value);
result = SET_STRING(buf);
break;
}
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(DOUBLE);
result = SET_DOUBLE(strtod(value.c_str(), 0));
break;
case STRING:
+ case UNSPECIFIED:
result = SET_STRING(value);
break;
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(STRING);
case UNSPECIFIED:
result = SET_STRING(value);
break;
+ case NONE:
+ default:
+ break;
}
DO_TRACE_WRITE(UNSPECIFIED);
SET_DOUBLE(val);
break;
}
- case STRING: {
+ case STRING:
+ case UNSPECIFIED: {
string val = getStringValue();
clear_value();
_type = STRING;
SET_STRING(val);
break;
}
+ case NONE:
+ default:
+ break;
}
_tied = false;