00001
00002
00003
00004
00005 #include "cddefines.h"
00006 #include "map.h"
00007 #include "parse.h"
00008
00009 void ParseMap(char *chCard )
00010 {
00011 bool lgEOL,
00012 lgLogOn;
00013 long int i;
00014
00015 DEBUG_ENTRY( "ParseMap()" );
00016
00017
00018 ioMAP = ( ioQQQ == NULL ) ? stdout : ioQQQ;
00019
00020
00021
00022 i = 5;
00023 map.MapZone = (long)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00024 if( lgEOL )
00025 {
00026 map.MapZone = 0;
00027
00028 DEBUG_EXIT( "ParseMap()" );
00029 return;
00030 }
00031
00032 if( nMatch("RANG",chCard) )
00033 {
00034 map.RangeMap[0] = (float)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00035 if( map.RangeMap[0] <= 10. )
00036 {
00037 map.RangeMap[0] = (float)pow(10.f,map.RangeMap[0]);
00038 lgLogOn = true;
00039 }
00040 else
00041 {
00042 lgLogOn = false;
00043 }
00044 map.RangeMap[1] = (float)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00045 if( lgLogOn )
00046 map.RangeMap[1] = (float)pow(10.f,map.RangeMap[1]);
00047
00048 if( lgEOL )
00049 {
00050 fprintf( ioQQQ, " There must be a zone number, followed by two temperatures, on this line. Sorry.\n" );
00051 puts( "[Stop in ParseMap]" );
00052 cdEXIT(EXIT_FAILURE);
00053 }
00054
00055 DEBUG_EXIT( "ParseMap()" );
00056 return;
00057 }
00058
00059 DEBUG_EXIT( "ParseMap()" );
00060 return;
00061 }
00062