Main Page
Classes
Files
File List
File Members
build
coinor-dylp-BO66rW
coinor-dylp-1.6.0
DyLP
src
Dylp
dy_cmdint.h
Go to the documentation of this file.
1
/*
2
This file is a part of the Dylp LP distribution.
3
4
Copyright (C) 2005 -- 2007 Lou Hafer
5
6
School of Computing Science
7
Simon Fraser University
8
Burnaby, B.C., V5A 1S6, Canada
9
lou@cs.sfu.ca
10
11
This code is licensed under the terms of the Common Public License (CPL).
12
*/
13
14
#ifndef _DY_CMDINT_H
15
#define _DY_CMDINT_H
16
17
/*
18
@(#)dy_cmdint.h 3.3 06/22/04
19
svn/cvs: $Id: dy_cmdint.h 148 2007-06-09 03:15:30Z lou $
20
21
Declarations specific to dylp's command interpreter.
22
*/
23
24
#include "
dylib_std.h
"
25
#include "
dylib_io.h
"
26
#include "
dylib_errs.h
"
27
28
/*
29
Globals for log stream and echo control, command input stream and echo
30
control. These must be declared in a main program somewhere.
31
32
dy_cmdchn i/o id for command input
33
dy_cmdecho controls echoing of command input to stdout
34
35
dy_logchn i/o id for log file
36
dy_gtxecho controls echoing of generated text to stdout
37
38
dylp.h also contains extern declarations for dy_logchn and dy_gtxecho. Turns out
39
that the files related to the command interpreter don't need the main dylp
40
structures, so it's useful to duplicate the extern decl's in both .h files.
41
*/
42
43
extern
ioid
dy_logchn
,
dy_cmdchn
;
44
extern
bool
dy_gtxecho
,
dy_cmdecho
;
45
46
47
/*
48
cmdint.c
49
*/
50
51
/*
52
Return codes for command execution routines called from the command
53
interpreter:
54
55
cmdOK execution of the command was adequately successful, further
56
command interpretation should continue.
57
cmdHALTNOERROR execution of the command was adequately successful, but break
58
out of the command interpretation loop.
59
cmdHALTERROR an error occurred during execution of the command, break
60
out of the command interpretation loop.
61
62
As return codes for process_cmds, the interpretation is slightly different:
63
cmdOK command interpretation was ended by an eof on the top level
64
command channel (this is the normal case when command execution
65
completes without error).
66
cmdHALTNOERROR some command returned a cmdHALTNOERROR return code.
67
cmdHALTERROR either a command returned a cmdHALTERROR return code, or a
68
fatal error occurred in process_cmds.
69
*/
70
71
typedef
enum
{
cmdOK
,
cmdHALTERROR
,
cmdHALTNOERROR
}
cmd_retval
;
72
73
cmd_retval
process_cmds
(
bool
silent) ;
74
75
#endif
/* _DY_CMDINT_H */
dylib_errs.h
cmdHALTNOERROR
Definition:
dy_cmdint.h:71
ioid
int ioid
Definition:
dylib_io.h:39
process_cmds
cmd_retval process_cmds(bool silent)
dy_logchn
ioid dy_logchn
dy_cmdchn
ioid dy_cmdchn
cmd_retval
cmd_retval
Definition:
dy_cmdint.h:71
dy_gtxecho
bool dy_gtxecho
cmdOK
Definition:
dy_cmdint.h:71
dylib_io.h
dylib_std.h
cmdHALTERROR
Definition:
dy_cmdint.h:71
dy_cmdecho
bool dy_cmdecho
Generated by
1.8.9.1