| 1 | /* --------------------------------------------------------------- ARGLIST.H */ |
|---|
| 2 | |
|---|
| 3 | /* ///////////////////////////////////////////////////////////////////////// |
|---|
| 4 | |
|---|
| 5 | [ Version 1.0 ] |
|---|
| 6 | 16.Oct.1998 - Argument list. |
|---|
| 7 | |
|---|
| 8 | ///////////////////////////////////////////////////////////////////////// */ |
|---|
| 9 | |
|---|
| 10 | /* ------------------------------------------------------------- enumeration */ |
|---|
| 11 | typedef enum { |
|---|
| 12 | ARG_ERROR_OK, |
|---|
| 13 | ARG_ERROR_MAX = FILE_ERROR_LIST_QTT, |
|---|
| 14 | ARG_ERROR_QTT |
|---|
| 15 | } ARG_ERROR_LIST; |
|---|
| 16 | |
|---|
| 17 | typedef enum { |
|---|
| 18 | ARG_TYPE_BOOLEAN, |
|---|
| 19 | ARG_TYPE_NUMBER, |
|---|
| 20 | ARG_TYPE_TEXT, |
|---|
| 21 | ARG_TYPE_QTT |
|---|
| 22 | } ARG_TYPE; /* argument type */ |
|---|
| 23 | /* -------------------------------------------------------------- structures */ |
|---|
| 24 | typedef struct stru_argument { |
|---|
| 25 | char *id; /* the argument identification label */ |
|---|
| 26 | int id_size; /* argument identification label size */ |
|---|
| 27 | ARG_TYPE id_type; /* argument type */ |
|---|
| 28 | long num; /* the argument number */ |
|---|
| 29 | char *text; /* the argument text content */ |
|---|
| 30 | int status; /* the argument status, defined by the application */ |
|---|
| 31 | } STRUCT_ARGUMENT; /* argument */ |
|---|
| 32 | /* -------------------------------------------------------------- prototypes */ |
|---|
| 33 | int arg_in (char *argv[],int arg_from,int arg_max,char *filename); |
|---|
| 34 | void arg_load (STRUCT_ARGUMENT *item,char *id,ARG_TYPE id_type); |
|---|
| 35 | void arg_read (STRUCT_ARGUMENT argl[],int argl_max,char *argv[],int arg_from,int arg_max); |
|---|