diff --git a/README.txt b/README.txt index 0a4ed5e..1c55d84 100644 --- a/README.txt +++ b/README.txt @@ -334,3 +334,4 @@ not planned for a specific release yet, no particular order! - detailed runtime logging https://www.mersenneforum.org/showpost.php?p=662953&postcount=3845 - begink and endk logging https://www.mersenneforum.org/showpost.php?p=662953&postcount=3845 - only log every n seconds https://www.mersenneforum.org/showpost.php?p=662795&postcount=3826 +- catch HUP https://www.mersenneforum.org/showpost.php?p=662777&postcount=3815 \ No newline at end of file diff --git a/src/checkpoint.c b/src/checkpoint.c index 0865e9d..991ce92 100644 --- a/src/checkpoint.c +++ b/src/checkpoint.c @@ -63,9 +63,9 @@ checkpoint_write() writes the checkpoint file. } else { - sprintf(buffer,"%s%u %d %d %d %s: %d %d %s %d", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, cur_class, num_factors, strlen(factors_string) ? factors_string : "0", class_time); + sprintf(buffer,"%s%u %d %d %d %s: %d %d %s %llu", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, cur_class, num_factors, strlen(factors_string) ? factors_string : "0", class_time); i=checkpoint_checksum(buffer,strlen(buffer)); - fprintf(f,"%s%u %d %d %d %s: %d %d %s %d %08X", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, cur_class, num_factors, strlen(factors_string) ? factors_string : "0", class_time, i); + fprintf(f,"%s%u %d %d %d %s: %d %d %s %llu %08X", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, cur_class, num_factors, strlen(factors_string) ? factors_string : "0", class_time, i); fclose(f); } } @@ -75,8 +75,8 @@ int checkpoint_read(unsigned int exp, int bit_min, int bit_max, int *cur_class, /* checkpoint_read() reads the checkpoint file and compares values for exp, bit_min, bit_max, NUM_CLASSES read from file with current values. -If these parameters are equal than it sets cur_class and num_factors to the -values from the checkpoint file. +If these parameters are equal than it sets cur_class, num_factors, +factors_string, and class_time to the values from the checkpoint file. returns 1 on success (valid checkpoint file) returns 0 otherwise @@ -107,17 +107,17 @@ returns 0 otherwise if(i<70) { ptr=&(buffer[i]); - sscanf(ptr,"%d %d %s", cur_class, num_factors, factors_string); - sprintf(buffer2,"%s%u %d %d %d %s: %d %d %s %d", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, *cur_class, *num_factors, factors_string, class_time); + sscanf(ptr,"%d %d %s %llu", cur_class, num_factors, factors_string, class_time); + sprintf(buffer2,"%s%u %d %d %d %s: %d %d %s %llu", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, *cur_class, *num_factors, factors_string, *class_time); chksum=checkpoint_checksum(buffer2,strlen(buffer2)); - sprintf(buffer2,"%s%u %d %d %d %s: %d %d %s %d %08X", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, *cur_class, *num_factors, factors_string, class_time, chksum); + sprintf(buffer2,"%s%u %d %d %d %s: %d %d %s %llu %08X", NAME_NUMBERS, exp, bit_min, bit_max, NUM_CLASSES, MFAKTC_VERSION, *cur_class, *num_factors, factors_string, *class_time, chksum); if(*cur_class >= 0 && \ *cur_class < NUM_CLASSES && \ *num_factors >= 0 && \ strlen(buffer) == strlen(buffer2) && \ strstr(buffer, buffer2) == buffer && \ - (*num_factors == 0 && strlen(factors_string) == 1) || \ - (*num_factors >= 1 && strlen(factors_string) > 1)) + ((*num_factors == 0 && strlen(factors_string) == 1) || \ + (*num_factors >= 1 && strlen(factors_string) > 1))) { ret=1; } diff --git a/src/output.c b/src/output.c index 359e941..5bb83fa 100644 --- a/src/output.c +++ b/src/output.c @@ -45,7 +45,6 @@ void print_help(char *string) printf(" -st run builtin selftest and exit\n"); printf(" -st2 same as -st but extended range for k_min/m_max\n"); printf(" -v set verbosity (min = 0, default = 1, more = 2, max/debug = 3)\n"); - printf(" -nolog don't create/append stdout to mfaktc.log\n"); printf("\n"); printf("options for debuging purposes\n"); printf(" --timertest run test of timer functions and exit\n"); diff --git a/src/params.h b/src/params.h index c37986b..98e97c6 100644 --- a/src/params.h +++ b/src/params.h @@ -86,7 +86,7 @@ code path */ ******************************************************************************* ******************************************************************************/ -#define MFAKTC_VERSION "0.23-beta.3" /* DO NOT CHANGE! */ +#define MFAKTC_VERSION "0.23-beta.4" /* DO NOT CHANGE! */