From b2a8e439c957590dab57bcc0de14d860d4c03cb4 Mon Sep 17 00:00:00 2001 From: gerber Date: Sat, 26 Feb 2005 09:43:30 +0000 Subject: [PATCH] parameter flags (parameter_logic) defined as gboolean --- src/console.c | 53 ++++++++++++++++++++++++++++------------------------- src/dac.c | 30 +++++++++++++++--------------- src/imgh.c | 21 ++++++++++++--------- src/main.c | 33 ++++++++++++++++++--------------- src/piveval.c | 7 +++++-- src/pivpost.c | 29 ++++++++++++++++------------- src/pivvalid.c | 20 ++++++++++++-------- src/utils.c | 17 ++++++++++------- 8 files changed, 116 insertions(+), 94 deletions(-) diff --git a/src/console.c b/src/console.c index abb674a..e91039b 100644 --- a/src/console.c +++ b/src/console.c @@ -28,7 +28,10 @@ /* * (Callback) functions for console * $Log: console.c,v $ - * Revision 1.18 2005-02-26 09:17:13 gerber + * Revision 1.19 2005-02-26 09:43:30 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.18 2005/02/26 09:17:13 gerber * structured of interrogate function by using gpiv_piv_isiadapt * * Revision 1.17 2005/02/12 13:09:21 gerber @@ -154,17 +157,17 @@ open_img(char *fname_in, /* * parameter initializing of image */ - img->image_par.depth_logic = 0; - img->image_par.ncolumns_logic = 0; - img->image_par.nrows_logic = 0; - img->image_par.x_corr_logic = 0; - img->image_par.s_scale_logic = 0; - img->image_par.t_scale_logic = 0; - img->image_par.z_off_logic = 0; - img->image_par.project_logic = 0; - img->image_par.creation_date_logic = 0; - img->image_par.location_logic = 0; - img->image_par.comment_logic = 0; + img->image_par.depth_logic = FALSE; + img->image_par.ncolumns_logic = FALSE; + img->image_par.nrows_logic = FALSE; + img->image_par.x_corr_logic = FALSE; + img->image_par.s_scale_logic = FALSE; + img->image_par.t_scale_logic = FALSE; + img->image_par.z_off_logic = FALSE; + img->image_par.project_logic = FALSE; + img->image_par.creation_date_logic = FALSE; + img->image_par.location_logic = FALSE; + img->image_par.comment_logic = FALSE; /* @@ -336,19 +339,19 @@ open_piv(char *fname_in, * parameter initializing of piv data */ gpd->piv_eval_par.autokey = 1; - gpd->piv_eval_par.int_size_1_logic = 0; - gpd->piv_eval_par.int_size_2_logic = 0; - gpd->piv_eval_par.int_shift_logic = 0; - gpd->piv_eval_par.pre_shift_col_logic = 0; - gpd->piv_eval_par.pre_shift_row_logic = 0; - gpd->piv_eval_par.ad_int_logic = 0; - gpd->piv_eval_par.ifit_logic = 0; - gpd->piv_eval_par.weight_logic = 0; - gpd->piv_eval_par.peak_logic = 0; - gpd->piv_eval_par.zero_off_logic = 0; - gpd->piv_eval_par.central_diff_logic = 0; - gpd->piv_eval_par.print_piv_logic = 0; - gpd->piv_eval_par.old_piv_logic = 0; + gpd->piv_eval_par.int_size_1_logic = FALSE; + gpd->piv_eval_par.int_size_2_logic = FALSE; + gpd->piv_eval_par.int_shift_logic = FALSE; + gpd->piv_eval_par.pre_shift_col_logic = FALSE; + gpd->piv_eval_par.pre_shift_row_logic = FALSE; + gpd->piv_eval_par.ad_int_logic = FALSE; + gpd->piv_eval_par.ifit_logic = FALSE; + gpd->piv_eval_par.weight_logic = FALSE; + gpd->piv_eval_par.peak_logic = FALSE; + gpd->piv_eval_par.zero_off_logic = FALSE; + gpd->piv_eval_par.central_diff_logic = FALSE; + gpd->piv_eval_par.print_piv_logic = FALSE; + gpd->piv_eval_par.old_piv_logic = FALSE; /* * Reads hdf format diff --git a/src/dac.c b/src/dac.c index 2152e33..9dc5a8e 100644 --- a/src/dac.c +++ b/src/dac.c @@ -28,7 +28,7 @@ /* * Dac callbacks - * $Id: dac.c,v 1.4 2005-02-26 09:17:13 gerber Exp $ + * $Id: dac.c,v 1.5 2005-02-26 09:43:30 gerber Exp $ */ @@ -115,24 +115,24 @@ open_dac_img(GpivCamVar *cam_var, /* * parameter initializing of image */ - img->image_par.depth_logic = 0; - img->image_par.ncolumns_logic = 0; - img->image_par.nrows_logic = 0; - img->image_par.x_corr_logic = 0; - img->image_par.s_scale_logic = 0; - img->image_par.t_scale_logic = 0; - img->image_par.z_off_logic = 0; - img->image_par.project_logic = 0; - img->image_par.creation_date_logic = 0; - img->image_par.location_logic = 0; - img->image_par.comment_logic = 0; + img->image_par.depth_logic = FALSE; + img->image_par.ncolumns_logic = FALSE; + img->image_par.nrows_logic = FALSE; + img->image_par.x_corr_logic = FALSE; + img->image_par.s_scale_logic = FALSE; + img->image_par.t_scale_logic = FALSE; + img->image_par.z_off_logic = FALSE; + img->image_par.project_logic = FALSE; + img->image_par.creation_date_logic = FALSE; + img->image_par.location_logic = FALSE; + img->image_par.comment_logic = FALSE; img->image_par.ncolumns = cam_var->capture[0].frame_width; img->image_par.nrows = cam_var->capture[0].frame_height; img->image_par.x_corr = gpiv_par.x_corr; - img->image_par.ncolumns_logic = 1; - img->image_par.nrows_logic = 1; - img->image_par.x_corr_logic = 1; + img->image_par.ncolumns_logic = TRUE; + img->image_par.nrows_logic = TRUE; + img->image_par.x_corr_logic = TRUE; diff --git a/src/imgh.c b/src/imgh.c index 729f5ca..928037b 100644 --- a/src/imgh.c +++ b/src/imgh.c @@ -28,7 +28,10 @@ /* * Image header window/tabulator callbacks * $Log: imgh.c,v $ - * Revision 1.6 2005-01-19 15:53:41 gerber + * Revision 1.7 2005-02-26 09:43:30 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.6 2005/01/19 15:53:41 gerber * Initiation of Data Acquisition (DAC); trigerring of lasers and camera * by using RTAI and Realtime Linux, recording images from IEEE1394 * (Firewire) IIDC compliant camera's @@ -191,12 +194,12 @@ on_entry_imgh_project(GtkSpinButton *widget, /* GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv"); */ snprintf(image_par.project, GPIV_MAX_CHARS,"%s", gtk_entry_get_text(GTK_ENTRY(imgh->entry_project))); - image_par.project_logic = 1; + image_par.project_logic = TRUE; if (display_act != NULL) { snprintf(display_act->img.image_par.project, GPIV_MAX_CHARS,"%s", image_par.project); - display_act->img.image_par.project_logic = 1; + display_act->img.image_par.project_logic = TRUE; } } @@ -212,12 +215,12 @@ on_entry_imgh_crdate(GtkSpinButton *widget, /* GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv"); */ snprintf(image_par.creation_date, GPIV_MAX_CHARS,"%s", gtk_entry_get_text(GTK_ENTRY(imgh->entry_crdate))); - image_par.creation_date_logic = 1; + image_par.creation_date_logic = TRUE; if (display_act != NULL) { snprintf(display_act->img.image_par.creation_date, GPIV_MAX_CHARS,"%s", image_par.creation_date); - display_act->img.image_par.creation_date_logic = 1; + display_act->img.image_par.creation_date_logic = TRUE; } } @@ -233,12 +236,12 @@ on_entry_imgh_location(GtkSpinButton *widget, /* GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv"); */ snprintf(image_par.location, GPIV_MAX_CHARS,"%s", gtk_entry_get_text(GTK_ENTRY(imgh->entry_location))); - image_par.location_logic = 1; + image_par.location_logic = TRUE; if (display_act != NULL) { snprintf(display_act->img.image_par.location, GPIV_MAX_CHARS,"%s", image_par.location); - display_act->img.image_par.location_logic = 1; + display_act->img.image_par.location_logic = TRUE; } } @@ -254,12 +257,12 @@ on_entry_imgh_comment(GtkSpinButton *widget, /* GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv"); */ snprintf(image_par.comment, GPIV_MAX_CHARS,"%s", gtk_entry_get_text(GTK_ENTRY(imgh->entry_comment))); - image_par.comment_logic = 1; + image_par.comment_logic = TRUE; if (display_act != NULL) { snprintf(display_act->img.image_par.comment, GPIV_MAX_CHARS,"%s", image_par.comment); - display_act->img.image_par.comment_logic = 1; + display_act->img.image_par.comment_logic = TRUE; } } diff --git a/src/main.c b/src/main.c index 48ce439..88307c1 100644 --- a/src/main.c +++ b/src/main.c @@ -28,7 +28,10 @@ /* * main routines of gpiv * $Log: main.c,v $ - * Revision 1.14 2005-02-26 09:17:13 gerber + * Revision 1.15 2005-02-26 09:43:30 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.14 2005/02/26 09:17:13 gerber * structured of interrogate function by using gpiv_piv_isiadapt * * Revision 1.13 2005/01/19 15:53:42 gerber @@ -696,17 +699,17 @@ setlocale (LC_ALL, ""); /* * parameter initializing of image */ - image_par.depth_logic = 0; - image_par.ncolumns_logic = 0; - image_par.nrows_logic = 0; - image_par.x_corr_logic = 0; - image_par.s_scale_logic = 0; - image_par.t_scale_logic = 0; - image_par.z_off_logic = 0; - image_par.project_logic = 0; - image_par.creation_date_logic = 0; - image_par.location_logic = 0; - image_par.comment_logic = 0; + image_par.depth_logic = FALSE; + image_par.ncolumns_logic = FALSE; + image_par.nrows_logic = FALSE; + image_par.x_corr_logic = FALSE; + image_par.s_scale_logic = FALSE; + image_par.t_scale_logic = FALSE; + image_par.z_off_logic = FALSE; + image_par.project_logic = FALSE; + image_par.creation_date_logic = FALSE; + image_par.location_logic = FALSE; + image_par.comment_logic = FALSE; @@ -822,11 +825,11 @@ and differ from camera. Disabling camera")); && gpiv_par.img_depth <= IMAGE_DEPTH_MAX ) { image_par.ncolumns = gpiv_par.img_width; - image_par.ncolumns_logic = 1; + image_par.ncolumns_logic = TRUE; image_par.nrows = gpiv_par.img_height; - image_par.nrows_logic = 1; + image_par.nrows_logic = TRUE; image_par.depth = gpiv_par.img_depth; - image_par.depth_logic = 1; + image_par.depth_logic = TRUE; if (verbose) g_warning(_("image width = %d\n image height = %d\n\ diff --git a/src/piveval.c b/src/piveval.c index 32197fc..734a8e4 100644 --- a/src/piveval.c +++ b/src/piveval.c @@ -28,7 +28,10 @@ /* * (callback) functions for Piv evaluation window/tabulator * $Log: piveval.c,v $ - * Revision 1.12 2005-02-26 09:17:14 gerber + * Revision 1.13 2005-02-26 09:43:30 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.12 2005/02/26 09:17:14 gerber * structured of interrogate function by using gpiv_piv_isiadapt * * Revision 1.11 2005/01/19 15:53:42 gerber @@ -469,7 +472,7 @@ interrogate(GpivPivData * piv_data, char *err_msg = NULL; /* #define GPIV_EXT_PIV ".piv" */ - int index_x = 0, index_y = 0, int_size_0, fname_logic = 1; + int index_x = 0, index_y = 0, int_size_0, fname_logic = TRUE; GpivImagePar image_par_ACT; GpivEvalPar piv_eval_par_ACT; diff --git a/src/pivpost.c b/src/pivpost.c index dc0762f..4e8d208 100644 --- a/src/pivpost.c +++ b/src/pivpost.c @@ -28,7 +28,10 @@ /* * (callback) functions for Piv post processing window/tabulator * $Log: pivpost.c,v $ - * Revision 1.10 2004-10-15 19:24:05 gerber + * Revision 1.11 2005-02-26 09:43:30 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.10 2004/10/15 19:24:05 gerber * GPIV_ and Gpiv prefix to defines and structure names of libgpiv * * Revision 1.9 2004/06/14 21:19:23 gerber @@ -359,7 +362,7 @@ exec_addavg(PivPost * pivpost gpiv_free_pivdata(&out_data); } - display_act->gpd.piv_post_par.z_off_d_logic = 1; + display_act->gpd.piv_post_par.z_off_d_logic = TRUE; exec_process = FALSE; } else { @@ -506,7 +509,7 @@ exec_subavg(PivPost * pivpost gpiv_free_pivdata(&out_data); } - display_act->gpd.piv_post_par.z_off_d_logic = 1; + display_act->gpd.piv_post_par.z_off_d_logic = TRUE; exec_process = FALSE; } else { @@ -710,8 +713,8 @@ exec_vorstra(void display_act->gpd.piv_post_par.operator_vorstra = piv_post_par.operator_vorstra; - display_act->gpd.piv_post_par.diff_type_logic = 1; - display_act->gpd.piv_post_par.operator_vorstra_logic = 1; + display_act->gpd.piv_post_par.diff_type_logic = TRUE; + display_act->gpd.piv_post_par.operator_vorstra_logic = TRUE; gpiv_post_print_parameters(display_act->gpd.piv_post_par); } @@ -748,34 +751,34 @@ on_spinbutton_post_scale(GtkSpinButton * widget, if (var_type == COL_POS) { image_par.z_off_x = gtk_spin_button_get_value_as_float(widget); - image_par.z_off_logic = 1; + image_par.z_off_logic = TRUE; if (display_act != NULL) { display_act->img.image_par.z_off_x = image_par.z_off_x; - display_act->img.image_par.z_off_logic = 1; + display_act->img.image_par.z_off_logic = TRUE; } } else if (var_type == ROW_POS) { image_par.z_off_y = gtk_spin_button_get_value_as_float(widget); - image_par.z_off_logic = 1; + image_par.z_off_logic = TRUE; if (display_act != NULL) { display_act->img.image_par.z_off_y = image_par.z_off_y; - display_act->img.image_par.z_off_logic = 1; + display_act->img.image_par.z_off_logic = TRUE; } } else if (var_type == S_SCALE) { image_par.s_scale = gtk_spin_button_get_value_as_float(widget); - image_par.s_scale_logic = 1; + image_par.s_scale_logic = TRUE; if (display_act != NULL) { display_act->img.image_par.s_scale = image_par.s_scale; - display_act->img.image_par.s_scale_logic = 1; + display_act->img.image_par.s_scale_logic = TRUE; } } else if (var_type == T_SCALE) { image_par.t_scale = gtk_spin_button_get_value_as_float(widget); - image_par.t_scale_logic = 1; + image_par.t_scale_logic = TRUE; if (display_act != NULL) { display_act->img.image_par.t_scale = image_par.t_scale; - display_act->img.image_par.t_scale_logic = 1; + display_act->img.image_par.t_scale_logic = TRUE; } } else { diff --git a/src/pivvalid.c b/src/pivvalid.c index 48d1c8c..21da734 100644 --- a/src/pivvalid.c +++ b/src/pivvalid.c @@ -28,7 +28,10 @@ /* * (callback) functions for Piv validation window/tabulator * $Log: pivvalid.c,v $ - * Revision 1.7 2004-10-15 19:24:05 gerber + * Revision 1.8 2005-02-26 09:43:31 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.7 2004/10/15 19:24:05 gerber * GPIV_ and Gpiv prefix to defines and structure names of libgpiv * * Revision 1.6 2004/06/14 21:19:23 gerber @@ -288,13 +291,14 @@ exec_errvec(PivValid * valid display_act->gpd.piv_valid_par.subst_type = piv_valid_par.subst_type; display_act->gpd.piv_valid_par.histo_type = piv_valid_par.histo_type; - display_act->gpd.piv_valid_par.auto_thresh_logic = 1; - display_act->gpd.piv_valid_par.residu_max_logic = 1; - display_act->gpd.piv_valid_par.res_stats_logic = 1; - display_act->gpd.piv_valid_par.data_yield_logic = piv_valid_par.data_yield_logic; - display_act->gpd.piv_valid_par.residu_type_logic = 1; - display_act->gpd.piv_valid_par.subst_type_logic = 1; - display_act->gpd.piv_valid_par.histo_type_logic = 1; + display_act->gpd.piv_valid_par.auto_thresh_logic = TRUE; + display_act->gpd.piv_valid_par.residu_max_logic = TRUE; + display_act->gpd.piv_valid_par.res_stats_logic = TRUE; + display_act->gpd.piv_valid_par.data_yield_logic = + piv_valid_par.data_yield_logic; + display_act->gpd.piv_valid_par.residu_type_logic = TRUE; + display_act->gpd.piv_valid_par.subst_type_logic = TRUE; + display_act->gpd.piv_valid_par.histo_type_logic = TRUE; exec_process = FALSE; } else { diff --git a/src/utils.c b/src/utils.c index a270bfb..0c66e45 100644 --- a/src/utils.c +++ b/src/utils.c @@ -28,7 +28,10 @@ /* * utility functions for gpiv * $Log: utils.c,v $ - * Revision 1.11 2005-02-26 09:17:14 gerber + * Revision 1.12 2005-02-26 09:43:31 gerber + * parameter flags (parameter_logic) defined as gboolean + * + * Revision 1.11 2005/02/26 09:17:14 gerber * structured of interrogate function by using gpiv_piv_isiadapt * * Revision 1.10 2005/01/19 15:53:43 gerber @@ -270,8 +273,8 @@ free_post_bufmems(Display * disp) destroy_all_scalars(disp/* ->gpd.vor_data */, GPIV_VORTICITY); gpiv_free_scdata(&disp->gpd.vor_data); disp->gpd.exist_vor = FALSE; - disp->gpd.piv_post_par.diff_type_logic = 0; - disp->gpd.piv_post_par.operator_vorstra_logic = 0; + disp->gpd.piv_post_par.diff_type_logic = FALSE; + disp->gpd.piv_post_par.operator_vorstra_logic = FALSE; } if (disp->gpd.exist_vor_scaled) { @@ -283,8 +286,8 @@ free_post_bufmems(Display * disp) destroy_all_scalars(/* & */disp/* ->gpd.sstrain_data */, GPIV_S_STRAIN); gpiv_free_scdata (&disp->gpd.sstrain_data); disp->gpd.exist_sstrain = FALSE; - disp->gpd.piv_post_par.diff_type_logic = 0; - disp->gpd.piv_post_par.operator_vorstra_logic = 0; + disp->gpd.piv_post_par.diff_type_logic = FALSE; + disp->gpd.piv_post_par.operator_vorstra_logic = FALSE; } if (disp->gpd.exist_sstrain_scaled) { @@ -296,8 +299,8 @@ free_post_bufmems(Display * disp) destroy_all_scalars(/* & */disp/* ->gpd.nstrain_data */, GPIV_N_STRAIN); gpiv_free_scdata (&disp->gpd.nstrain_data); disp->gpd.exist_nstrain = FALSE; - disp->gpd.piv_post_par.diff_type_logic = 0; - disp->gpd.piv_post_par.operator_vorstra_logic = 0; + disp->gpd.piv_post_par.diff_type_logic = FALSE; + disp->gpd.piv_post_par.operator_vorstra_logic = FALSE; } if (disp->gpd.exist_nstrain_scaled) { -- 2.11.4.GIT