Release calc version 2.12.5.6

This commit is contained in:
Landon Curt Noll
2017-05-21 15:03:29 -07:00
parent 8dd7a3cd2a
commit 40fc854006
8 changed files with 50 additions and 11 deletions

View File

@@ -259,9 +259,40 @@ libcalc_call_me_first(void)
* initialize old and new configuration values
*/
newstd.epsilon = &_qonesqbase_; /* magic to fake early str2q() */
if (program == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"program is NULL\n");
exit(80);
}
newstd.program = strdup(program);
if (newstd.program == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"cannot strdup program string\n");
exit(81);
}
if (base_name == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"base_name is NULL\n");
exit(82);
}
newstd.base_name = strdup(base_name);
newstd.version = strdup(version());
if (newstd.base_name == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"cannot strdup base_name string\n");
exit(83);
}
p = version();
if (p == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"version() returned NULL\n");
exit(84);
}
newstd.version = strdup(p);
if (newstd.version == NULL) {
fprintf(stderr, "libcalc_call_me_first: FATAL: "
"cannot strdup return from version()\n");
exit(85);
}
conf = config_copy(&newstd); /* more magic to fake early str2q() */
conf->tab_ok = FALSE;
newstd.epsilon = str2q(EPSILON_DEFAULT);