diff --git a/codebase/apps/procmap/src/procmap_unregister/procmap_unregister.hh b/codebase/apps/procmap/src/procmap_unregister/procmap_unregister.hh index b0f1ce6a1d..21b1aa99f0 100644 --- a/codebase/apps/procmap/src/procmap_unregister/procmap_unregister.hh +++ b/codebase/apps/procmap/src/procmap_unregister/procmap_unregister.hh @@ -44,10 +44,9 @@ typedef struct { - char *prog_name; /* program name */ - - char *name; - char *instance; + const char *prog_name; /* program name */ + const char *name; + const char *instance; int pid; int debug; diff --git a/codebase/apps/procmap/src/test_procmap/test_mapper.cc b/codebase/apps/procmap/src/test_procmap/test_mapper.cc index 1d4914d8b2..c2f244d988 100644 --- a/codebase/apps/procmap/src/test_procmap/test_mapper.cc +++ b/codebase/apps/procmap/src/test_procmap/test_mapper.cc @@ -125,9 +125,9 @@ static int get_info(PROCMAP_info_t **return_info_p) memset ((void *) &request, (int) 0, (size_t) sizeof(PROCMAP_request_t)); - strncpy(request.name, Glob->name, PROCMAP_NAME_MAX); + strncpy(request.name, Glob->name, PROCMAP_NAME_MAX - 1); strncpy(request.instance, Glob->instance, - PROCMAP_INSTANCE_MAX); + PROCMAP_INSTANCE_MAX - 1); nprocs = 0; diff --git a/codebase/apps/procmap/src/test_procmap/test_procmap.hh b/codebase/apps/procmap/src/test_procmap/test_procmap.hh index 49d52f05a8..d69abdd331 100644 --- a/codebase/apps/procmap/src/test_procmap/test_procmap.hh +++ b/codebase/apps/procmap/src/test_procmap/test_procmap.hh @@ -48,11 +48,11 @@ typedef struct { - char *prog_name; /* program name */ - char *param_path_name; /* parameters file path */ - char *procmap_host; /* name of server mapper host */ - char *name; - char *instance; + const char *prog_name; /* program name */ + const char *param_path_name; /* parameters file path */ + const char *procmap_host; /* name of server mapper host */ + const char *name; + const char *instance; int do_repeat; int do_register; int do_unregister; diff --git a/codebase/apps/radar/src/Lucid/cidd.h b/codebase/apps/radar/src/Lucid/cidd.h index ee297b31d1..70914fd238 100644 --- a/codebase/apps/radar/src/Lucid/cidd.h +++ b/codebase/apps/radar/src/Lucid/cidd.h @@ -192,6 +192,16 @@ class Global_data { bool redraw_horiz; bool redraw_vert; + bool time_has_changed; + bool field_has_changed; + bool zoom_has_changed; + bool vsect_has_changed; + double ht_has_changed; + + time_t prev_time; + int prev_field; + double prev_min_x, prev_min_y, prev_max_x, prev_max_y; + double prev_ht; // projections diff --git a/codebase/apps/radar/src/Lucid/cidd_init.cc b/codebase/apps/radar/src/Lucid/cidd_init.cc index b34cab64a3..068fb26746 100644 --- a/codebase/apps/radar/src/Lucid/cidd_init.cc +++ b/codebase/apps/radar/src/Lucid/cidd_init.cc @@ -369,8 +369,22 @@ int init_data_space() // global redraw flags - gd.redraw_horiz = false; - gd.redraw_vert = false; + gd.redraw_horiz = true; + gd.redraw_vert = true; + + gd.time_has_changed = true; + gd.field_has_changed = true; + gd.zoom_has_changed = true; + gd.vsect_has_changed = true; + gd.ht_has_changed = true; + + gd.prev_time = -1; + gd.prev_field = -1; + gd.prev_min_x = -9999.0; + gd.prev_min_y = -9999.0; + gd.prev_max_x = -9999.0; + gd.prev_max_y = -9999.0; + gd.prev_ht = -9999.0; // movies diff --git a/codebase/apps/titan/src/verify_grid/get_truth_path.cc b/codebase/apps/titan/src/verify_grid/get_truth_path.cc index a1767c964e..2ae130b29a 100644 --- a/codebase/apps/titan/src/verify_grid/get_truth_path.cc +++ b/codebase/apps/titan/src/verify_grid/get_truth_path.cc @@ -50,7 +50,7 @@ char *get_truth_path (char *detect_file_path) { - static char truth_file_path[MAX_PATH_LEN]; + static char truth_file_path[MAX_PATH_LEN * 2]; char dir_path[MAX_PATH_LEN]; char *name, file_ext[16]; @@ -121,9 +121,9 @@ char *get_truth_path (char *detect_file_path) * the correct subdirectory */ - sprintf(dir_path, "%s/%.4d%.2d%.2d", - Glob->params.truth_data_dir, - this_dt->year, this_dt->month, this_dt->day); + snprintf(dir_path, MAX_PATH_LEN - 1, "%s/%.4d%.2d%.2d", + Glob->params.truth_data_dir, + this_dt->year, this_dt->month, this_dt->day); /* * load file name of the closest scan to the requested time @@ -224,11 +224,10 @@ static int find_best_file (char *dir_path, time_diff = abs ((int) (file_dt.unix_time - search_time)); if (time_diff < *time_error) { - + *time_error = time_diff; - sprintf(file_path, "%s%s%s", - dir_path, PATH_DELIM, - dp->d_name); + snprintf(file_path, MAX_PATH_LEN * 2 - 1, "%s%s%s", + dir_path, PATH_DELIM, dp->d_name); f_count++; } /*if (time_diff < *time_error) */ diff --git a/codebase/apps/titan/src/verify_grid/update_cont.cc b/codebase/apps/titan/src/verify_grid/update_cont.cc index c7eca4fb9d..17a217dc18 100644 --- a/codebase/apps/titan/src/verify_grid/update_cont.cc +++ b/codebase/apps/titan/src/verify_grid/update_cont.cc @@ -243,7 +243,7 @@ static void cont_specified_grid(contingency_t *cont, FILE* scan_cont_file) { - static char *routine_name = "cont_specified_grid"; + static const char *routine_name = "cont_specified_grid"; static int first_call = TRUE; static ui08 *truth_grid, *detect_grid; diff --git a/codebase/apps/titan/src/verify_tracks/debug_print.cc b/codebase/apps/titan/src/verify_tracks/debug_print.cc index 69e50d85ee..be301f96c8 100644 --- a/codebase/apps/titan/src/verify_tracks/debug_print.cc +++ b/codebase/apps/titan/src/verify_tracks/debug_print.cc @@ -37,7 +37,7 @@ #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) -static void print_grid(char *label, +static void print_grid(const char *label, ui08 **forecast_grid, ui08 **verify_grid); @@ -88,7 +88,7 @@ void debug_print(track_file_handle_t *t_handle, * print_grid() */ -static void print_grid(char *label, +static void print_grid(const char *label, ui08 **forecast_grid, ui08 **verify_grid) diff --git a/codebase/apps/titan/src/verify_tracks/parse_args.cc b/codebase/apps/titan/src/verify_tracks/parse_args.cc index cb150033b6..3fd452ef30 100644 --- a/codebase/apps/titan/src/verify_tracks/parse_args.cc +++ b/codebase/apps/titan/src/verify_tracks/parse_args.cc @@ -51,7 +51,7 @@ void parse_args(int argc, char *end_pt; char usage[BUFSIZ]; char *malloc_debug_str; - char *debug_str; + const char *debug_str; /* * set usage string diff --git a/codebase/apps/titan/src/verify_tracks/print_contingency_table.cc b/codebase/apps/titan/src/verify_tracks/print_contingency_table.cc index c06113ff62..3c112cb67e 100644 --- a/codebase/apps/titan/src/verify_tracks/print_contingency_table.cc +++ b/codebase/apps/titan/src/verify_tracks/print_contingency_table.cc @@ -35,7 +35,7 @@ #include "verify_tracks.h" void print_contingency_table(FILE *fout, - char *label, + const char *label, vt_count_t *count) { diff --git a/codebase/apps/titan/src/verify_tracks/print_stats.cc b/codebase/apps/titan/src/verify_tracks/print_stats.cc index 6102554cd0..ba64882e33 100644 --- a/codebase/apps/titan/src/verify_tracks/print_stats.cc +++ b/codebase/apps/titan/src/verify_tracks/print_stats.cc @@ -36,12 +36,13 @@ static vt_stats_t *Stats; static void print_stat(FILE *fout, - char *label, + const char *label, fl32 *bias_p, int print_norm); void print_stats(FILE *fout, - char *heading, vt_stats_t *stats) + const char *heading, + vt_stats_t *stats) { @@ -103,7 +104,7 @@ void print_stats(FILE *fout, */ static void print_stat(FILE *fout, - char *label, + const char *label, fl32 *bias_p, int print_norm) diff --git a/codebase/apps/titan/src/verify_tracks/verify_tracks.h b/codebase/apps/titan/src/verify_tracks/verify_tracks.h index 80d88fa01f..8634f6919c 100644 --- a/codebase/apps/titan/src/verify_tracks/verify_tracks.h +++ b/codebase/apps/titan/src/verify_tracks/verify_tracks.h @@ -359,11 +359,11 @@ extern void perform_verification(storm_file_handle_t *s_handle, vt_stats_t *total_stats); extern void print_contingency_table(FILE *fout, - char *label, + const char *label, vt_count_t *count); extern void print_stats(FILE *fout, - char *label, + const char *label, vt_stats_t *stats); extern void read_params(void); diff --git a/codebase/libs/Mdv/src/include/Mdv/mdv/mdv_dataset.h b/codebase/libs/Mdv/src/include/Mdv/mdv/mdv_dataset.h index adf25bd8f7..1679a70fcf 100644 --- a/codebase/libs/Mdv/src/include/Mdv/mdv/mdv_dataset.h +++ b/codebase/libs/Mdv/src/include/Mdv/mdv/mdv_dataset.h @@ -147,10 +147,10 @@ extern int MDV_write_dataset(FILE *outfile, MDV_dataset_t *dataset, extern int MDV_write_dataset_remote(MDV_dataset_t *dataset, int output_encoding_type, int swap_chunk_data, - char *output_host, - char *output_dir, - char *output_filename, - char *local_tmp_dir); + const char *output_host, + const char *output_dir, + const char *output_filename, + const char *local_tmp_dir); /****************************************************************************** * MDV_SET_CHUNK_HDR_OFFSETS: Set the chunk data offsets in all of the chunk diff --git a/codebase/libs/Mdv/src/oldMdv/mdv_dataset.c b/codebase/libs/Mdv/src/oldMdv/mdv_dataset.c index aa3daf80e9..0183028b9c 100644 --- a/codebase/libs/Mdv/src/oldMdv/mdv_dataset.c +++ b/codebase/libs/Mdv/src/oldMdv/mdv_dataset.c @@ -688,10 +688,10 @@ int MDV_write_dataset(FILE *outfile, MDV_dataset_t *dataset, int MDV_write_dataset_remote(MDV_dataset_t *dataset, int output_encoding_type, int swap_chunk_data, - char *output_host, - char *output_dir, - char *output_filename, - char *local_tmp_dir) + const char *output_host, + const char *output_dir, + const char *output_filename, + const char *local_tmp_dir) { static char *routine_name = "MDV_write_dataset_remote";