fp20_read_lp.c File Reference

#include "qs_config.h"
#include "fp20_iqsutil.h"
#include "fp20_read_lp.h"
#include "fp20_lp.h"
#include "fp20_rawlp.h"
#include "fp20_lpdefs.h"
#include "fp20_format.h"

Include dependency graph for fp20_read_lp.c:

Go to the source code of this file.

Defines

#define fp20_END_LINE(p)   (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Functions

int fp20_ILLcheck_subject_to (fp20_ILLread_lp_state *state)
int fp20_ILLget_value (char *line, EGfp20_t *coef)
int fp20_ILLlp_error (fp20_ILLread_lp_state *state, const char *format,...)
void fp20_ILLlp_warn (fp20_ILLread_lp_state *state, const char *format,...)
int fp20_ILLread_lp_state_bad_keyword (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_colon (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_has_colon (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_init (fp20_ILLread_lp_state *state, fp20_qsline_reader *file, const char *fp20_fname, int inter)
int fp20_ILLread_lp_state_keyword (fp20_ILLread_lp_state *state, const char *kwd[])
int fp20_ILLread_lp_state_next_constraint (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_next_field (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_next_field_on_line (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_next_line (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_next_var (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_possible_bound_value (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_possible_coef (fp20_ILLread_lp_state *state, EGfp20_t *coef, const EGfp20_t defValue)
void fp20_ILLread_lp_state_prev_field (fp20_ILLread_lp_state *state)
static void fp20_ILLread_lp_state_print_at (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_sense (fp20_ILLread_lp_state *state)
int fp20_ILLread_lp_state_sign (fp20_ILLread_lp_state *state, EGfp20_t *sign)
int fp20_ILLread_lp_state_skip_blanks (fp20_ILLread_lp_state *state, int wrapLines)
int fp20_ILLread_lp_state_value (fp20_ILLread_lp_state *state, EGfp20_t *coef)
void fp20_ILLtest_lp_state_bound_sense (fp20_ILLread_lp_state *state)
int fp20_ILLtest_lp_state_keyword (fp20_ILLread_lp_state *state, const char *kwd[])
int fp20_ILLtest_lp_state_next_is (fp20_ILLread_lp_state *state, const char *str)
int fp20_ILLtest_lp_state_sense (fp20_ILLread_lp_state *state, int all)
static void fp20_lp_err (fp20_ILLread_lp_state *state, int isError, const char *format, va_list args)
static int fp20_next_field (fp20_ILLread_lp_state *state, int acrossLines)

Variables

static const char * fp20_all_keyword []
static int fp20_all_keyword_len []
static int TRACE = 0


Define Documentation

#define fp20_END_LINE (  )     (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Definition at line 49 of file fp20_read_lp.c.

Referenced by fp20_ILLmps_check_end_of_line(), fp20_ILLmps_next_bound(), fp20_ILLread_lp_state_next_line(), fp20_ILLread_lp_state_possible_bound_value(), fp20_ILLread_lp_state_print_at(), fp20_ILLread_lp_state_sense(), and fp20_ILLread_lp_state_skip_blanks().


Function Documentation

int fp20_ILLcheck_subject_to ( fp20_ILLread_lp_state state  ) 

Definition at line 781 of file fp20_read_lp.c.

References fp20_ILL_ISBLANK, fp20_ILLread_lp_state_bad_keyword(), fp20_ILLread_lp_state_next_field(), fp20_ILLread_lp_state_prev_field(), fp20_ILLread_lp_state_skip_blanks(), and ILL_RESULT.

Here is the call graph for this function:

int fp20_ILLget_value ( char *  line,
EGfp20_t *  coef 
)

Definition at line 695 of file fp20_read_lp.c.

References ILL_IFTRACE, ILL_namebufsize, and ILL_RESULT.

int fp20_ILLlp_error ( fp20_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 668 of file fp20_read_lp.c.

References fp20_lp_err(), and fp20_TRUE.

Here is the call graph for this function:

void fp20_ILLlp_warn ( fp20_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 680 of file fp20_read_lp.c.

References fp20_FALSE, fp20_lp_err(), and NULL.

Here is the call graph for this function:

int fp20_ILLread_lp_state_bad_keyword ( fp20_ILLread_lp_state state  ) 

Definition at line 268 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, and fp20_ILLlp_error().

Here is the call graph for this function:

int fp20_ILLread_lp_state_colon ( fp20_ILLread_lp_state state  ) 

Definition at line 311 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks().

Here is the call graph for this function:

int fp20_ILLread_lp_state_has_colon ( fp20_ILLread_lp_state state  ) 

Definition at line 322 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks(), and fp20_ILLread_lp_state::p.

Here is the call graph for this function:

int fp20_ILLread_lp_state_init ( fp20_ILLread_lp_state state,
fp20_qsline_reader file,
const char *  fp20_fname,
int  inter 
)

Definition at line 64 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::bound_val, fp20_ILLread_lp_state::eof, fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, fp20_ILLread_lp_state::file, fp20_ILLread_lp_state::file_name, fp20_ILLread_lp_state_skip_blanks(), fp20_ILLread_lp_state::fp20_interactive, ILL_FAILtrue, ILL_RETURN, fp20_ILLread_lp_state::line, fp20_ILLread_lp_state::line_num, NULL, fp20_ILLread_lp_state::p, and fp20_ILLread_lp_state::realline.

Here is the call graph for this function:

int fp20_ILLread_lp_state_keyword ( fp20_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 299 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::eof, fp20_ILLread_lp_state_bad_keyword(), and fp20_ILLtest_lp_state_keyword().

Here is the call graph for this function:

int fp20_ILLread_lp_state_next_constraint ( fp20_ILLread_lp_state state  ) 

Definition at line 338 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::eof, fp20_all_keyword, fp20_ILLlp_error(), fp20_ILLread_lp_state_next_field(), fp20_ILLread_lp_state_prev_field(), fp20_ILLread_lp_state_skip_blanks(), fp20_ILLtest_lp_state_keyword(), and fp20_ILLread_lp_state::line_num.

Here is the call graph for this function:

int fp20_ILLread_lp_state_next_field ( fp20_ILLread_lp_state state  ) 

Definition at line 196 of file fp20_read_lp.c.

References fp20_next_field().

Here is the call graph for this function:

int fp20_ILLread_lp_state_next_field_on_line ( fp20_ILLread_lp_state state  ) 

Definition at line 190 of file fp20_read_lp.c.

References fp20_next_field().

Here is the call graph for this function:

int fp20_ILLread_lp_state_next_line ( fp20_ILLread_lp_state state  ) 

Definition at line 89 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::eof, fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, fp20_ILLread_lp_state::file, fp20_ILLread_lp_state::file_name, fp20_END_LINE, fp20_ILL_ISBLANK, fp20_ILLline_reader_get, fp20_ILLread_lp_state::fp20_interactive, ILL_IFTRACE, ILL_namebufsize, fp20_ILLread_lp_state::line, fp20_ILLread_lp_state::line_num, NULL, fp20_ILLread_lp_state::p, and fp20_ILLread_lp_state::realline.

int fp20_ILLread_lp_state_next_var ( fp20_ILLread_lp_state state  ) 

Definition at line 220 of file fp20_read_lp.c.

References fp20_all_keyword, fp20_all_keyword_len, fp20_ILLis_lp_name_char(), fp20_ILLread_lp_state_skip_blanks(), and NULL.

Here is the call graph for this function:

int fp20_ILLread_lp_state_possible_bound_value ( fp20_ILLread_lp_state state  ) 

Definition at line 429 of file fp20_read_lp.c.

References fp20_END_LINE, fp20_ILL_MAXDOUBLE, fp20_ILL_MINDOUBLE, fp20_ILLread_lp_state_sign(), fp20_ILLread_lp_state_skip_blanks(), fp20_ILLread_lp_state_value(), and NULL.

Here is the call graph for this function:

int fp20_ILLread_lp_state_possible_coef ( fp20_ILLread_lp_state state,
EGfp20_t *  coef,
const EGfp20_t  defValue 
)

Definition at line 419 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_value().

Here is the call graph for this function:

void fp20_ILLread_lp_state_prev_field ( fp20_ILLread_lp_state state  ) 

Definition at line 202 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::fieldOnFirstCol, fp20_ILL_ISBLANK, fp20_ILLread_lp_state::line, and fp20_ILLread_lp_state::p.

static void fp20_ILLread_lp_state_print_at ( fp20_ILLread_lp_state state  )  [static]

Definition at line 582 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::eof, fp20_END_LINE, fp20_ILL_ISBLANK, and fp20_ILLread_lp_state::p.

Referenced by fp20_lp_err().

int fp20_ILLread_lp_state_sense ( fp20_ILLread_lp_state state  ) 

Definition at line 554 of file fp20_read_lp.c.

References fp20_END_LINE, fp20_ILLlp_error(), and fp20_ILLtest_lp_state_sense().

Here is the call graph for this function:

int fp20_ILLread_lp_state_sign ( fp20_ILLread_lp_state state,
EGfp20_t *  sign 
)

Definition at line 363 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks().

Here is the call graph for this function:

int fp20_ILLread_lp_state_skip_blanks ( fp20_ILLread_lp_state state,
int  wrapLines 
)

Definition at line 141 of file fp20_read_lp.c.

References fp20_END_LINE, fp20_ILL_ISBLANK, fp20_ILLread_lp_state_next_line(), and fp20_ILLread_lp_state::p.

Here is the call graph for this function:

int fp20_ILLread_lp_state_value ( fp20_ILLread_lp_state state,
EGfp20_t *  coef 
)

Definition at line 396 of file fp20_read_lp.c.

References fp20_ILLget_value(), fp20_ILLread_lp_state_skip_blanks(), and ILL_RESULT.

Here is the call graph for this function:

void fp20_ILLtest_lp_state_bound_sense ( fp20_ILLread_lp_state state  ) 

Definition at line 548 of file fp20_read_lp.c.

References fp20_ILLtest_lp_state_sense().

Here is the call graph for this function:

int fp20_ILLtest_lp_state_keyword ( fp20_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 280 of file fp20_read_lp.c.

References fp20_ILLread_lp_state::eof, fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, and NULL.

int fp20_ILLtest_lp_state_next_is ( fp20_ILLread_lp_state state,
const char *  str 
)

Definition at line 383 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks(), and fp20_ILLread_lp_state::p.

Here is the call graph for this function:

int fp20_ILLtest_lp_state_sense ( fp20_ILLread_lp_state state,
int  all 
)

Definition at line 487 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks(), and fp20_ILLread_lp_state::sense_val.

Here is the call graph for this function:

static void fp20_lp_err ( fp20_ILLread_lp_state state,
int  isError,
const char *  format,
va_list  args 
) [static]

Definition at line 614 of file fp20_read_lp.c.

References fp20_qsline_reader::error_collector, fp20_ILLread_lp_state::file, fp20_ILLread_lp_state::file_name, fp20_ILLformat_error, fp20_ILLformat_error_create(), fp20_ILLformat_error_delete(), fp20_ILLread_lp_state_print_at(), fp20_ILLread_lp_state_skip_blanks(), fp20_ILLread_lp_state::fp20_interactive, ILL_FAILfalse, fp20_ILLread_lp_state::line, fp20_ILLread_lp_state::line_num, NULL, fp20_ILLread_lp_state::p, QS_LP_FORMAT_ERROR, QS_LP_FORMAT_WARN, and fp20_ILLread_lp_state::realline.

Referenced by fp20_ILLlp_error(), and fp20_ILLlp_warn().

Here is the call graph for this function:

static int fp20_next_field ( fp20_ILLread_lp_state state,
int  acrossLines 
) [static]

Definition at line 172 of file fp20_read_lp.c.

References fp20_ILLread_lp_state_skip_blanks().

Referenced by fp20_ILLread_lp_state_next_field(), and fp20_ILLread_lp_state_next_field_on_line().

Here is the call graph for this function:


Variable Documentation

const char* fp20_all_keyword[] [static]

Initial value:

 {
  "MIN", "MINIMUM", "MINIMIZE",
  "MAX", "MAXIMUM", "MAXIMIZE",
  "SUBJECT", "ST", "PROBLEM", "PROB",
  "BOUNDS", "BOUND", "INTEGER", "END", NULL
}

Definition at line 51 of file fp20_read_lp.c.

Referenced by fp20_ILLread_lp_state_next_constraint(), and fp20_ILLread_lp_state_next_var().

int fp20_all_keyword_len[] [static]

Initial value:

 {
  3, 7, 8,
  3, 7, 8,
  7, 2, 7, 4,
  6, 5, 7, 3, -1
}

Definition at line 57 of file fp20_read_lp.c.

Referenced by fp20_ILLread_lp_state_next_var().

int TRACE = 0 [static]

Definition at line 47 of file fp20_read_lp.c.


Generated on Thu Mar 29 09:39:01 2012 for QSopt_ex by  doxygen 1.4.7