| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 70d622d commit 1d7f732
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,19 @@ | |||
| 1 | + 2004-06-12 Ethan Merritt <merritt@u.washington.edu> | ||
| 2 | + | ||
| 3 | + * datafile.h: define DF_MISSING as a return code from df_readline(). | ||
| 4 | + * datatile.c (df_readline): If a data field contains the missing data | ||
| 5 | + string, return DF_MISSING rather than DF_UNDEFINED. | ||
| 6 | + * fit.c (fit_command): Explicitly ignore DF_MISSING data. | ||
| 7 | + * plot2d.c (get_data): Explicitly test for data marked DF_MISSING | ||
| 8 | + but treat it the same as DF_UNDEFINED. | ||
| 9 | + * plot3d.c (get_3ddata): Explicitly test for data marked DF_MISSING | ||
| 10 | + but treat it the same as DF_UNDEFINED. | ||
| 11 | + | ||
| 12 | + These are trivial changes that do not affect the existing behavior of | ||
| 13 | + gnuplot. However, the core routines in plot2d and plot3d now have the | ||
| 14 | + information needed to treat missing data differently depending on the | ||
| 15 | + plot style if desired. | ||
| 16 | + | ||
| 1 | 17 | 2004-06-06 Ethan Merritt <merritt@u.washington.edu> | |
| 2 | 18 | ||
| 3 | 19 | * src/command.c src/command.h src/mouse.c src/gplt_x11.c | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: datafile.c,v 1.49 2004/04/13 17:23:52 broeker Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: datafile.c,v 1.50 2004/06/01 16:20:03 broeker Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - datafile.c */ | |
@@ -263,7 +263,7 @@ static char df_format[MAX_LINE_LEN + 1]; | |||
| 263 | 263 | typedef struct df_column_struct { | |
| 264 | 264 | double datum; | |
| 265 | 265 | enum { | |
| 266 | - DF_MISSING, DF_BAD, DF_GOOD | ||
| 266 | + DF_BAD, DF_GOOD | ||
| 267 | 267 | } good; | |
| 268 | 268 | char *position; | |
| 269 | 269 | } df_column_struct; | |
@@ -1165,7 +1165,7 @@ int max; | |||
| 1165 | 1165 | * noted also, but that would change existing default behavior. | |
| 1166 | 1166 | */ | |
| 1167 | 1167 | else if ((column <= df_no_cols) && (df_column[column - 1].good == DF_MISSING)) | |
| 1168 | - return DF_UNDEFINED; | ||
| 1168 | + return DF_MISSING; | ||
| 1169 | 1169 | else { | |
| 1170 | 1170 | /* line bad only if user explicitly asked for this column */ | |
| 1171 | 1171 | if (df_no_use_specs) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: datafile.h,v 1.10 2003/04/29 07:04:29 mikulik Exp $ | ||
| 2 | + * $Id: datafile.h,v 1.11 2004/04/13 17:23:53 broeker Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - datafile.h */ | |
@@ -49,6 +49,7 @@ | |||
| 49 | 49 | #define DF_UNDEFINED (-2) | |
| 50 | 50 | #define DF_FIRST_BLANK (-3) | |
| 51 | 51 | #define DF_SECOND_BLANK (-4) | |
| 52 | + #define DF_MISSING (-5) | ||
| 52 | 53 | ||
| 53 | 54 | #ifndef MAXINT /* should there be one already defined ? */ | |
| 54 | 55 | # ifdef INT_MAX /* in limits.h ? */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: fit.c,v 1.38 2004/04/10 14:28:02 broeker Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: fit.c,v 1.39 2004/04/13 17:23:53 broeker Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* NOTICE: Change of Copyright Status | |
@@ -1416,6 +1416,7 @@ fit_command() | |||
| 1416 | 1416 | } /* if (need to extend storage space) */ | |
| 1417 | 1417 | ||
| 1418 | 1418 | switch (i) { | |
| 1419 | + case DF_MISSING: | ||
| 1419 | 1420 | case DF_UNDEFINED: | |
| 1420 | 1421 | case DF_FIRST_BLANK: | |
| 1421 | 1422 | case DF_SECOND_BLANK: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: plot2d.c,v 1.65 2004/05/20 14:43:47 broeker Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: plot2d.c,v 1.66 2004/05/20 16:56:43 broeker Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - plot2d.c */ | |
@@ -341,6 +341,10 @@ get_data(current_plot) | |||
| 341 | 341 | df_close(); | |
| 342 | 342 | int_error(c_token, "internal error : df_readline returned %d : datafile line %d", j, df_line_number); | |
| 343 | 343 | } | |
| 344 | + | ||
| 345 | + case DF_MISSING: | ||
| 346 | + /* Plot type specific handling of missing points could go here. */ | ||
| 347 | + /* For now missing data is treated the same as undefined */ | ||
| 344 | 348 | case DF_UNDEFINED: | |
| 345 | 349 | /* bad result from extended using expression */ | |
| 346 | 350 | current_plot->points[i].type = UNDEFINED; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: plot3d.c,v 1.65 2004/02/23 13:29:34 broeker Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: plot3d.c,v 1.66 2004/04/13 17:23:59 broeker Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - plot3d.c */ | |
@@ -707,7 +707,7 @@ get_3ddata(this_plot) | |||
| 707 | 707 | } | |
| 708 | 708 | cp = local_this_iso->points + xdatum; | |
| 709 | 709 | ||
| 710 | - if (j == DF_UNDEFINED) { | ||
| 710 | + if (j == DF_UNDEFINED || j == DF_MISSING) { | ||
| 711 | 711 | cp->type = UNDEFINED; | |
| 712 | 712 | continue; | |
| 713 | 713 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments