File: write_lp.h

package info (click to toggle)
qsopt-ex 2.5.10.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 43,343; sh: 427; makefile: 212
file content (73 lines) | stat: -rw-r--r-- 3,394 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/****************************************************************************/
/*                                                                          */
/*  This file is part of QSopt_ex.                                          */
/*                                                                          */
/*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
/*  and Daniel Espinoza                                                     */
/*                                                                          */
/*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
/*  copyright in QSopt.                                                     */
/*                                                                          */
/*  This code may be used under the terms of the GNU General Public License */
/*  (Version 2.1 or later) as published by the Free Software Foundation.    */
/*                                                                          */
/*  Alternatively, use is granted for research purposes only.               */
/*                                                                          */
/*  It is your choice of which of these two licenses you are operating      */
/*  under.                                                                  */
/*                                                                          */
/*  We make no guarantees about the correctness or usefulness of this code. */
/*                                                                          */
/****************************************************************************/

/*  RCS_INFO = "$RCSfile: wr_lp.h,v $ $Revision: 1.2 $ $Date: 2003/11/05 16:57:39 $"; */
#ifndef EGLPNUM_TYPENAME_WRITE_LP_STATE_H
#define EGLPNUM_TYPENAME_WRITE_LP_STATE_H

#include "eg_lpnum.h"
#include "symtab.h"

/****************************************************************************/
/*                                                                          */
/*               Routines to support writing of LP files                    */
/*                                                                          */
/****************************************************************************/

/* 
 * -) anything after '\' is comment 
 * -) variables consist of a-z A-Z 0-9!"#$%(),;.?@_`'{}|~ 
 *    don't start with a digit or '.'
 */

typedef struct EGLPNUM_TYPENAME_ILLwrite_lp_state
{
	char buf[ILL_namebufsize];
	char *p;
	int startlen;
	int total;
}
EGLPNUM_TYPENAME_ILLwrite_lp_state;

extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_init (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line,
	const char *str);
extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_append (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line,
	const char *str);
extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_append_coef (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line,
	EGLPNUM_TYPE v,
	int cnt);

			/* append number sign ('+', '-') iff cnt > 0 or v < 0.0  
			 * append number iff v != 1.0, v != -1.0  
			 */
extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_append_number (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line,
	EGLPNUM_TYPE v);
extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_save_start (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line);
extern void EGLPNUM_TYPENAME_ILLwrite_lp_state_start (
	EGLPNUM_TYPENAME_ILLwrite_lp_state * line);

#endif