Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7359e5b9 authored by David Parsons's avatar David Parsons
Browse files

Cosmetic

parent 2202feeb
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,9 @@
// The input file is produced by the lineage post-treatment, please refer to it
// for e.g. the file format/content
// ============================================================================
// Includes
// ============================================================================
#include <cinttypes>
#include <getopt.h>
#include <cstdlib>
......@@ -44,17 +47,7 @@
using namespace aevol;
// =================================================================
// Command line option variables
// =================================================================
static char* lineage_file_name = nullptr;
static bool verbose = false;
static bool full_check = false;
static bool trace_mutations = false;
// =================================================================
// Function declarations
// =================================================================
// Helper functions
void interpret_cmd_line_options(int argc, char* argv[]);
void print_help(char* prog_path);
FILE* open_environment_stat_file(const char* prefix, const char* postfix);
......@@ -72,6 +65,12 @@ void write_zones_stats(int64_t t,
FILE* open_operons_stat_file(const char* prefix, const char* postfix);
void write_operons_stats(int64_t t, Individual* indiv, FILE* operon_file);
// Command-line option variables
static char* lineage_file_name = nullptr;
static bool verbose = false;
static bool full_check = false;
static bool trace_mutations = false;
int main(int argc, char* argv[]) {
interpret_cmd_line_options(argc, argv);
......@@ -674,7 +673,8 @@ void interpret_cmd_line_options(int argc, char* argv[]) {
};
int option;
while ((option = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
while((option = getopt_long(argc, argv, short_options,
long_options, nullptr)) != -1) {
switch(option) {
case 'h':
print_help(argv[0]);
......@@ -706,10 +706,6 @@ void interpret_cmd_line_options(int argc, char* argv[]) {
sprintf(lineage_file_name, "%s", argv[optind]);
}
/*!
\brief
*/
void print_help(char* prog_path) {
// Get the program file-name in prog_name (strip prog_path of the path)
char* prog_name; // No new, it will point to somewhere inside prog_path
......
......@@ -54,7 +54,7 @@ static int64_t t0 = 0;
static int64_t t_end = -1;
static int32_t final_indiv_index = -1;
static int32_t final_indiv_rank = -1;
static char tree_file_name[50];
static char tree_file_name[255]; // TODO(dpa) remove magic number
int main(int argc, char** argv) {
// The output file (lineage.ae) contains the following information:
......@@ -323,7 +323,7 @@ int main(int argc, char** argv) {
// Do we need to check the genome now?
check_genome_now = t == t_end ||
full_check && Utils::mod(t, exp_manager->backup_step()) == 0;
(full_check && Utils::mod(t, exp_manager->backup_step()) == 0);
// Write the replication report of the ancestor for current generation
if (verbose) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment