00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef dbl_READ_LP_STATE_H
00025 #define dbl_READ_LP_STATE_H
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include "dbl_iqsutil.h"
00040 #include "dbl_readline.h"
00041
00042 typedef struct dbl_ILLread_lp_state
00043 {
00044 dbl_qsline_reader *file;
00045 const char *file_name;
00046 char *p;
00047 double bound_val;
00048 int dbl_interactive;
00049 int line_num;
00050 int column_index;
00051 char realline[ILL_namebufsize];
00052 char line[ILL_namebufsize];
00053 char field[ILL_namebufsize + 1];
00054 char fieldOnFirstCol;
00055 char eof;
00056 char sense_val;
00057 }
00058 dbl_ILLread_lp_state;
00059
00060 extern int dbl_ILLread_lp_state_init (
00061 dbl_ILLread_lp_state * state,
00062 dbl_qsline_reader * file,
00063 const char *dbl_fname,
00064 int interactve);
00065 extern int dbl_ILLread_lp_state_next_line (
00066 dbl_ILLread_lp_state * state);
00067 extern int dbl_ILLread_lp_state_next_var (
00068 dbl_ILLread_lp_state * state);
00069 extern int dbl_ILLread_lp_state_keyword (
00070 dbl_ILLread_lp_state * state,
00071 const char **kwd);
00072 extern int dbl_ILLread_lp_state_bad_keyword (
00073 dbl_ILLread_lp_state * state);
00074 extern int dbl_ILLtest_lp_state_keyword (
00075 dbl_ILLread_lp_state * state,
00076 const char *kwd[]);
00077 extern int dbl_ILLread_lp_state_next_field (
00078 dbl_ILLread_lp_state * state);
00079 extern int dbl_ILLread_lp_state_next_field_on_line (
00080 dbl_ILLread_lp_state * state);
00081 extern void dbl_ILLread_lp_state_prev_field (
00082 dbl_ILLread_lp_state * state);
00083 extern int dbl_ILLread_lp_state_sign (
00084 dbl_ILLread_lp_state * state,
00085 double * sign);
00086 extern int dbl_ILLread_lp_state_possible_coef (
00087 dbl_ILLread_lp_state * state,
00088 double * coef,
00089 const double defValue);
00090
00091
00092
00093 extern int dbl_ILLread_lp_state_possible_bound_value (
00094 dbl_ILLread_lp_state * state);
00095
00096
00097
00098 extern int dbl_ILLread_lp_state_colon (
00099 dbl_ILLread_lp_state * state);
00100 extern int dbl_ILLread_lp_state_has_colon (
00101 dbl_ILLread_lp_state * state);
00102 extern int dbl_ILLread_lp_statxe_has_colon (
00103 dbl_ILLread_lp_state * state);
00104 extern int dbl_ILLread_lp_state_next_constraint (
00105 dbl_ILLread_lp_state * state);
00106 extern int dbl_ILLread_lp_state_sense (
00107 dbl_ILLread_lp_state * state);
00108 extern int dbl_ILLtest_lp_state_sense (
00109 dbl_ILLread_lp_state * state,
00110 int all);
00111 extern void dbl_ILLtest_lp_state_bound_sense (
00112 dbl_ILLread_lp_state * state);
00113 extern int dbl_ILLread_lp_state_value (
00114 dbl_ILLread_lp_state * state,
00115 double * d);
00116 extern int dbl_ILLtest_lp_state_next_is (
00117 dbl_ILLread_lp_state * state,
00118 const char *str);
00119 extern int dbl_ILLread_lp_state_skip_blanks (
00120 dbl_ILLread_lp_state * state,
00121 int wrapLines);
00122
00123 extern int dbl_ILLcheck_subject_to (
00124 dbl_ILLread_lp_state * state);
00125
00126
00127
00128
00129 extern int dbl_ILLlp_error (
00130 dbl_ILLread_lp_state * state,
00131 const char *format,
00132 ...);
00133 extern void dbl_ILLlp_warn (
00134 dbl_ILLread_lp_state * state,
00135 const char *format,
00136 ...);
00137
00138
00139
00140
00141 extern int dbl_ILLget_value (
00142 char *line,
00143 double * coef);
00144
00145 #endif