00001
00002
00003
00004 #include "cddefines.h"
00005 #include "parse.h"
00006 #include "state.h"
00007
00008
00009 void ParseState(char *chCard)
00010 {
00011 char chFilename[INPUT_LINE_LENGTH];
00012
00013 DEBUG_ENTRY( "ParseState()" );
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 GetQuote( chFilename , chCard , true );
00025
00026
00027 if( nMatch("PRIN",chCard) )
00028 state.lgState_print = true;
00029
00030 if( nMatch(" GET",chCard) )
00031 {
00032 # if 0
00033 state.ioGET_STATE = open_data( chFilename, "rb", AS_LOCAL_ONLY );
00034 # endif
00035 state.lgGet_state = true;
00036 strcpy( state.chGetFilename , chFilename );
00037 }
00038 else if( nMatch(" PUT",chCard) )
00039 {
00040 # if 0
00041 state.ioPUT_STATE = open_data( chFilename , "wb", AS_LOCAL_ONLY );
00042 # endif
00043 state.lgPut_state = true;
00044 strcpy( state.chPutFilename , chFilename );
00045
00046
00047 if( nMatch(" ALL",chCard) )
00048 {
00049 state.lgPutAll = true;
00050 }
00051 else
00052 {
00053 state.lgPutAll = false;
00054 }
00055 }
00056
00057 else
00058 {
00059 fprintf( ioQQQ, " The STATE command has two keywords, GET and PUT. One must appear - I did not see it.\n Sorry.\n" );
00060 cdEXIT(EXIT_FAILURE);
00061 }
00062 return;
00063 }