From: david Date: Sat, 2 Mar 2002 23:37:04 +0000 (+0000) Subject: Cleanups from Petru Paler: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=89fcb12556007915089f13142905963b9a4c004d;p=simgear.git Cleanups from Petru Paler: It's basically a couple unused variables, an explicit cast, some unused functions removed or commented out, and a whole bunch of pragmas removed. --- diff --git a/simgear/metar/Antoi.cpp b/simgear/metar/Antoi.cpp index 783548e5..ba884c1e 100644 --- a/simgear/metar/Antoi.cpp +++ b/simgear/metar/Antoi.cpp @@ -1,13 +1,5 @@ -#pragma comment(compiler) -#pragma comment(date) -#pragma comment(timestamp) - #include -#pragma title("antoi - char array to integer") -#pragma pagesize (80) - -#pragma page(1) /********************************************************************/ /* */ /* Title: antoi */ @@ -78,4 +70,3 @@ int antoi(char * string, int len) } /* end antoi */ -#pragma page(1) diff --git a/simgear/metar/Charcmp.cpp b/simgear/metar/Charcmp.cpp index a36dc9b9..0e4bb087 100644 --- a/simgear/metar/Charcmp.cpp +++ b/simgear/metar/Charcmp.cpp @@ -1,13 +1,5 @@ -#pragma comment (compiler) -//#pragma comment (date) -//#pragma comment (timestamp) -#pragma pagesize(80) - #include "Local.h" /* standard header file */ -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("charcmp - characters compare with patterns ") /********************************************************************/ /* */ /* Title: charcmp */ @@ -34,7 +26,6 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) bool charcmp(char *str, char *pattern) { diff --git a/simgear/metar/Dcdmetar.cpp b/simgear/metar/Dcdmetar.cpp index 123fc8ce..f7a7cb3a 100644 --- a/simgear/metar/Dcdmetar.cpp +++ b/simgear/metar/Dcdmetar.cpp @@ -1,9 +1,3 @@ -#pragma comment (compiler) -//#pragma comment (date) -//#pragma comment (timestamp) -#pragma pagesize(80) - - #include "Local.h" /* standard header file */ #include "Metar.h" /* standard header file */ @@ -11,9 +5,6 @@ float fracPart( char * ); void DcdMTRmk( char **, Decoded_METAR * ); -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("subtitle - Decode METAR report. ") /********************************************************************/ /* */ /* Title: SaveTokenString */ @@ -46,7 +37,6 @@ void DcdMTRmk( char **, Decoded_METAR * ); /* None. */ /* */ /********************************************************************/ -#pragma page(1) static char **SaveTokenString ( char *string , char *delimeters ) { @@ -99,9 +89,6 @@ static char **SaveTokenString ( char *string , char *delimeters ) return token; } -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("subtitle - Decode METAR report. ") /********************************************************************/ /* */ /* Title: freeTokens */ @@ -124,7 +111,6 @@ static char **SaveTokenString ( char *string , char *delimeters ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static void freeTokens( char **token ) { @@ -138,9 +124,6 @@ static void freeTokens( char **token ) } return; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: InitDcdMETAR */ @@ -163,7 +146,6 @@ static void freeTokens( char **token ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static void InitDcdMETAR( Decoded_METAR *Mptr ) { @@ -439,9 +421,6 @@ static void InitDcdMETAR( Decoded_METAR *Mptr ) return; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: ResetMETARGroup */ @@ -475,8 +454,7 @@ static void InitDcdMETAR( Decoded_METAR *Mptr ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) -static int ResetMETARGroup( int StartGroup, +/*static int ResetMETARGroup( int StartGroup, int SaveStartGroup ) { @@ -495,11 +473,8 @@ static int ResetMETARGroup( int StartGroup, return (++SaveStartGroup); } +*/ -#pragma page(1) -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: CodedHgt2Meters */ @@ -523,7 +498,6 @@ static int ResetMETARGroup( int StartGroup, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static int CodedHgt2Meters( char *token, Decoded_METAR *Mptr ) { @@ -537,10 +511,6 @@ static int CodedHgt2Meters( char *token, Decoded_METAR *Mptr ) return (hgt*30); } -#pragma page(1) -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPartObscur */ @@ -574,7 +544,6 @@ static int CodedHgt2Meters( char *token, Decoded_METAR *Mptr ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPartObscur( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -617,10 +586,6 @@ static bool isPartObscur( char **string, Decoded_METAR *Mptr, return FALSE; } -#pragma page(1) -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCldLayer */ @@ -650,7 +615,6 @@ static bool isPartObscur( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCldLayer( char *token ) { @@ -671,10 +635,6 @@ static bool isCldLayer( char *token ) nisdigit((token+3),3)) ? TRUE:FALSE; } -#pragma page(1) -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCAVOK */ @@ -701,7 +661,6 @@ static bool isCldLayer( char *token ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCAVOK( char *token, Decoded_METAR *Mptr, int *NDEX ) { @@ -718,9 +677,6 @@ static bool isCAVOK( char *token, Decoded_METAR *Mptr, int *NDEX ) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: parseCldData */ @@ -742,7 +698,6 @@ static bool isCAVOK( char *token, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static void parseCldData( char *token, Decoded_METAR *Mptr, int next) { @@ -766,9 +721,6 @@ static void parseCldData( char *token, Decoded_METAR *Mptr, int next) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isSkyCond */ @@ -790,7 +742,6 @@ static void parseCldData( char *token, Decoded_METAR *Mptr, int next) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isSkyCond( char **skycond, Decoded_METAR *Mptr, int *NDEX ) { @@ -989,9 +940,6 @@ static bool isSkyCond( char **skycond, Decoded_METAR *Mptr, else return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: prevailVSBY */ @@ -1013,7 +961,6 @@ static bool isSkyCond( char **skycond, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static float prevailVSBY( char *visibility ) { float Miles_vsby; @@ -1061,9 +1008,6 @@ static float prevailVSBY( char *visibility ) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVisibility */ @@ -1086,7 +1030,6 @@ static float prevailVSBY( char *visibility ) /* */ /********************************************************************/ -#pragma page(1) static bool isVisibility( char **visblty, Decoded_METAR *Mptr, int *NDEX ) @@ -1329,9 +1272,6 @@ static bool isVisibility( char **visblty, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: vrblVsby */ @@ -1353,7 +1293,6 @@ static bool isVisibility( char **visblty, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool vrblVsby( char *string1, char *string2, Decoded_METAR *Mptr, int *NDEX ) { @@ -1431,9 +1370,6 @@ static bool vrblVsby( char *string1, char *string2, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isMinMaxWinDir */ @@ -1455,7 +1391,6 @@ static bool vrblVsby( char *string1, char *string2, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isMinMaxWinDir( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -1488,9 +1423,6 @@ static bool isMinMaxWinDir( char *string, Decoded_METAR *Mptr, return FALSE; } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isRVR */ @@ -1512,7 +1444,6 @@ static bool isMinMaxWinDir( char *string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isRVR( char *token, Decoded_METAR *Mptr, int *NDEX, int ndex ) @@ -1575,9 +1506,6 @@ static bool isRVR( char *token, Decoded_METAR *Mptr, int *NDEX, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isAltimStng */ @@ -1599,7 +1527,6 @@ static bool isRVR( char *token, Decoded_METAR *Mptr, int *NDEX, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isAltimStng( char *token, Decoded_METAR *Mptr, int *NDEX ) { @@ -1648,9 +1575,6 @@ static bool isAltimStng( char *token, Decoded_METAR *Mptr, int *NDEX ) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTempGroup */ @@ -1672,7 +1596,6 @@ static bool isAltimStng( char *token, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTempGroup( char *token, Decoded_METAR *Mptr, int *NDEX) { @@ -1768,9 +1691,6 @@ static bool isTempGroup( char *token, Decoded_METAR *Mptr, int *NDEX) -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isWxToken */ @@ -1792,9 +1712,8 @@ static bool isTempGroup( char *token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) -static bool isWxToken( char *token ) +/*static bool isWxToken( char *token ) { int i; @@ -1807,12 +1726,9 @@ static bool isWxToken( char *token ) return FALSE; } return TRUE; -} +}*/ -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPresentWX */ @@ -1834,7 +1750,6 @@ static bool isWxToken( char *token ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPresentWX( char *token, Decoded_METAR *Mptr, int *NDEX, int *next ) @@ -1929,9 +1844,6 @@ static bool isPresentWX( char *token, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isStnID */ @@ -1953,7 +1865,6 @@ static bool isPresentWX( char *token, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isStnId( char *stnID, Decoded_METAR *Mptr, int *NDEX) { @@ -1976,9 +1887,6 @@ static bool isStnId( char *stnID, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCodeName */ @@ -2000,7 +1908,6 @@ static bool isStnId( char *stnID, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCodeName( char *codename, Decoded_METAR *Mptr, int *NDEX) { @@ -2020,9 +1927,6 @@ static bool isCodeName( char *codename, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isNIL */ @@ -2044,7 +1948,6 @@ static bool isCodeName( char *codename, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isNIL( char *token, Decoded_METAR *Mptr, int *NDEX) { @@ -2063,9 +1966,6 @@ static bool isNIL( char *token, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isAUTO */ @@ -2087,7 +1987,6 @@ static bool isNIL( char *token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isAUTO( char *token, Decoded_METAR *Mptr, int *NDEX) { @@ -2106,9 +2005,6 @@ static bool isAUTO( char *token, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCOR */ @@ -2130,7 +2026,6 @@ static bool isAUTO( char *token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCOR ( char *token, Decoded_METAR *Mptr, int *NDEX) { @@ -2149,9 +2044,6 @@ static bool isCOR ( char *token, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTimeUTC */ @@ -2173,7 +2065,6 @@ static bool isCOR ( char *token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTimeUTC( char *UTC, Decoded_METAR *Mptr, int *NDEX ) { @@ -2228,9 +2119,6 @@ static bool isTimeUTC( char *UTC, Decoded_METAR *Mptr, int *NDEX ) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isWindData */ @@ -2252,7 +2140,6 @@ static bool isTimeUTC( char *UTC, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isWindData( char *wind, Decoded_METAR *Mptr, int *NDEX ) { @@ -2322,9 +2209,6 @@ static bool isWindData( char *wind, Decoded_METAR *Mptr, int *NDEX ) return FALSE; } -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("subtitle - Decode METAR report. ") /********************************************************************/ /* */ /* Title: DcdMETAR */ @@ -2349,7 +2233,6 @@ static bool isWindData( char *wind, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) int DcdMETAR( char *string , Decoded_METAR *Mptr ) diff --git a/simgear/metar/Dcdmtrmk.cpp b/simgear/metar/Dcdmtrmk.cpp index ba9e56ef..b8fdd231 100644 --- a/simgear/metar/Dcdmtrmk.cpp +++ b/simgear/metar/Dcdmtrmk.cpp @@ -6,9 +6,6 @@ #define SKY1_len 50 float fracPart( char * ); -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTS_LOC */ @@ -48,7 +45,6 @@ float fracPart( char * ); /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTS_LOC( char **string, Decoded_METAR *Mptr, int *NDEX ) @@ -134,9 +130,6 @@ static bool isTS_LOC( char **string, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isDVR */ @@ -158,7 +151,6 @@ static bool isTS_LOC( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isDVR( char *token, Decoded_METAR *Mptr, int *NDEX ) { @@ -217,9 +209,6 @@ static bool isDVR( char *token, Decoded_METAR *Mptr, int *NDEX ) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTornadicActiv */ @@ -260,7 +249,6 @@ static bool isDVR( char *token, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTornadicActiv( char **string, Decoded_METAR *Mptr, int *NDEX ) @@ -531,9 +519,6 @@ static bool isTornadicActiv( char **string, Decoded_METAR *Mptr, } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPartObscur */ @@ -576,7 +561,6 @@ static bool isTornadicActiv( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPartObscur( char **string, Decoded_METAR *Mptr, int ndex, int *NDEX ) { @@ -677,9 +661,6 @@ static bool isPartObscur( char **string, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isA0indicator */ @@ -720,7 +701,6 @@ static bool isPartObscur( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isA0indicator( char *indicator, Decoded_METAR *Mptr, int *NDEX ) @@ -763,9 +743,6 @@ static bool isA0indicator( char *indicator, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPeakWind */ @@ -805,7 +782,6 @@ static bool isA0indicator( char *indicator, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPeakWind( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -898,9 +874,6 @@ static bool isPeakWind( char **string, Decoded_METAR *Mptr, else return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isWindShift */ @@ -940,7 +913,6 @@ static bool isPeakWind( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isWindShift( char **string, Decoded_METAR *Mptr, int *NDEX) { @@ -1030,9 +1002,6 @@ static bool isWindShift( char **string, Decoded_METAR *Mptr, return FALSE; } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTowerVsby */ @@ -1071,7 +1040,6 @@ static bool isWindShift( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTowerVsby( char **token, Decoded_METAR *Mptr, int *NDEX) { @@ -1186,9 +1154,6 @@ static bool isTowerVsby( char **token, Decoded_METAR *Mptr, int *NDEX) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isSurfaceVsby */ @@ -1227,7 +1192,6 @@ static bool isTowerVsby( char **token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isSurfaceVsby( char **token, Decoded_METAR *Mptr, int *NDEX) { @@ -1344,9 +1308,6 @@ static bool isSurfaceVsby( char **token, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVariableVsby */ @@ -1386,7 +1347,6 @@ static bool isSurfaceVsby( char **token, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isVariableVsby( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -1596,9 +1556,6 @@ static bool isVariableVsby( char **string, Decoded_METAR *Mptr, } return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVsby2ndSite */ @@ -1642,7 +1599,6 @@ static bool isVariableVsby( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isVsby2ndSite( char **token, Decoded_METAR *Mptr, int *NDEX) { @@ -1801,9 +1757,6 @@ static bool isVsby2ndSite( char **token, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isLTGfreq */ @@ -1847,7 +1800,6 @@ static bool isVsby2ndSite( char **token, Decoded_METAR *Mptr, /* */ /* */ /********************************************************************/ -#pragma page(1) bool static isLTGfreq( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -2088,16 +2040,8 @@ bool static isLTGfreq( char **string, Decoded_METAR *Mptr, int *NDEX ) -#pragma comment (compiler) -//#pragma comment (date) -//#pragma comment (timestamp) -#pragma pagesize(80) - #include "Metar.h" /* standard header file */ -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isRecentWx */ @@ -2141,7 +2085,6 @@ bool static isLTGfreq( char **string, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isRecentWX( char **token, Decoded_METAR *Mptr, int *NDEX ) { @@ -2478,9 +2421,6 @@ static bool isRecentWX( char **token, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVariableCIG */ @@ -2511,7 +2451,6 @@ static bool isRecentWX( char **token, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isVariableCIG( char **token, Decoded_METAR *Mptr, int *NDEX ) { @@ -2544,9 +2483,6 @@ static bool isVariableCIG( char **token, Decoded_METAR *Mptr, else return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCeil2ndSite */ @@ -2581,7 +2517,6 @@ static bool isVariableCIG( char **token, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCIG2ndSite( char **token, Decoded_METAR *Mptr, int *NDEX) { @@ -2620,9 +2555,6 @@ static bool isCIG2ndSite( char **token, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPRESFR */ @@ -2671,7 +2603,6 @@ static bool isCIG2ndSite( char **token, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPRESFR( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -2688,9 +2619,6 @@ static bool isPRESFR( char *string, Decoded_METAR *Mptr, int *NDEX) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPRESRR */ @@ -2739,7 +2667,6 @@ static bool isPRESFR( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPRESRR( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -2757,9 +2684,6 @@ static bool isPRESRR( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isSLP */ @@ -2781,7 +2705,6 @@ static bool isPRESRR( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isSLP( char **token, Decoded_METAR *Mptr, int *NDEX ) { @@ -2855,7 +2778,6 @@ static bool isSLP( char **token, Decoded_METAR *Mptr, int *NDEX ) } } -#pragma page(1) static bool isSectorVsby( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -2933,9 +2855,6 @@ static bool isSectorVsby( char **string, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isGR */ @@ -2984,7 +2903,6 @@ static bool isSectorVsby( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isGR( char **string, Decoded_METAR *Mptr, int *NDEX) { char *slash; @@ -3067,9 +2985,6 @@ static bool isGR( char **string, Decoded_METAR *Mptr, int *NDEX) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVIRGA */ @@ -3118,7 +3033,6 @@ static bool isGR( char **string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isVIRGA( char **string, Decoded_METAR *Mptr, int *NDEX) { @@ -3154,7 +3068,6 @@ static bool isVIRGA( char **string, Decoded_METAR *Mptr, int *NDEX) } -#pragma page(1) static bool isSfcObscuration( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3242,7 +3155,6 @@ static bool isSfcObscuration( char *string, Decoded_METAR *Mptr, } -#pragma page(1) static bool isCeiling( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3282,7 +3194,6 @@ static bool isCeiling( char *string, Decoded_METAR *Mptr, int *NDEX ) } } -#pragma page(1) static bool isVrbSky( char **string, Decoded_METAR *Mptr, int *NDEX ) { static char *cldPtr[] = {"FEW", "SCT", "BKN", "OVC", NULL }; @@ -3386,7 +3297,6 @@ static bool isVrbSky( char **string, Decoded_METAR *Mptr, int *NDEX ) } -#pragma page(1) static bool isObscurAloft( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3470,7 +3380,6 @@ static bool isObscurAloft( char **string, Decoded_METAR *Mptr, } } -#pragma page(1) static bool isNOSPECI( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3485,7 +3394,6 @@ static bool isNOSPECI( char *string, Decoded_METAR *Mptr, int *NDEX ) return TRUE; } } -#pragma page(1) static bool isLAST( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3500,9 +3408,6 @@ static bool isLAST( char *string, Decoded_METAR *Mptr, int *NDEX ) return TRUE; } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isSynopClouds */ @@ -3524,7 +3429,6 @@ static bool isLAST( char *string, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isSynopClouds( char *token, Decoded_METAR *Mptr, int *NDEX ) { @@ -3557,7 +3461,6 @@ static bool isSynopClouds( char *token, Decoded_METAR *Mptr, return FALSE; } -#pragma page(1) static bool isSNINCR( char **string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3596,9 +3499,6 @@ static bool isSNINCR( char **string, Decoded_METAR *Mptr, int *NDEX ) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isSnowDepth */ @@ -3620,7 +3520,6 @@ static bool isSNINCR( char **string, Decoded_METAR *Mptr, int *NDEX ) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isSnowDepth( char *token, Decoded_METAR *Mptr, int *NDEX ) { @@ -3644,7 +3543,6 @@ static bool isSnowDepth( char *token, Decoded_METAR *Mptr, return FALSE; } -#pragma page(1) static bool isWaterEquivSnow( char *string, Decoded_METAR *Mptr, int *NDEX ) @@ -3666,7 +3564,6 @@ static bool isWaterEquivSnow( char *string, } } -#pragma page(1) static bool isSunshineDur( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -3692,9 +3589,6 @@ static bool isSunshineDur( char *string, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isHourlyPrecip */ @@ -3743,7 +3637,6 @@ static bool isSunshineDur( char *string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isHourlyPrecip( char **string, Decoded_METAR *Mptr, int *NDEX) @@ -3790,9 +3683,6 @@ static bool isHourlyPrecip( char **string, Decoded_METAR *Mptr, } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isP6Precip */ @@ -3841,7 +3731,6 @@ static bool isHourlyPrecip( char **string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isP6Precip( char *string, Decoded_METAR *Mptr, int *NDEX ) @@ -3869,9 +3758,6 @@ static bool isP6Precip( char *string, Decoded_METAR *Mptr, } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isP24Precip */ @@ -3920,7 +3806,6 @@ static bool isP6Precip( char *string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isP24Precip( char *string, Decoded_METAR *Mptr, int *NDEX ) @@ -3946,9 +3831,6 @@ static bool isP24Precip( char *string, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTTdTenths */ @@ -3997,7 +3879,6 @@ static bool isP24Precip( char *string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTTdTenths( char *token, Decoded_METAR *Mptr, int *NDEX) { @@ -4058,9 +3939,6 @@ static bool isTTdTenths( char *token, Decoded_METAR *Mptr, int *NDEX) } } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isMaxTemp */ @@ -4082,7 +3960,6 @@ static bool isTTdTenths( char *token, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isMaxTemp(char *string, Decoded_METAR *Mptr, int *NDEX) { char buf[ 6 ]; @@ -4122,9 +3999,6 @@ static bool isMaxTemp(char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isMinTemp */ @@ -4146,7 +4020,6 @@ static bool isMaxTemp(char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isMinTemp(char *string, Decoded_METAR *Mptr, int *NDEX) { char buf[ 6 ]; @@ -4185,9 +4058,6 @@ static bool isMinTemp(char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isT24MaxMinTemp */ @@ -4209,7 +4079,6 @@ static bool isMinTemp(char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isT24MaxMinTemp( char *string, Decoded_METAR *Mptr, int *NDEX ) { @@ -4265,9 +4134,6 @@ static bool isT24MaxMinTemp( char *string, Decoded_METAR *Mptr, return FALSE; } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPtendency */ @@ -4289,7 +4155,6 @@ static bool isT24MaxMinTemp( char *string, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPtendency(char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4330,9 +4195,6 @@ static bool isPtendency(char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPWINO */ @@ -4354,7 +4216,6 @@ static bool isPtendency(char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPWINO( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4373,9 +4234,6 @@ static bool isPWINO( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isPNO */ @@ -4397,7 +4255,6 @@ static bool isPWINO( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isPNO( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4416,9 +4273,6 @@ static bool isPNO( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isRVRNO */ @@ -4440,7 +4294,6 @@ static bool isPNO( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isRVRNO( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4458,9 +4311,6 @@ static bool isRVRNO( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isCHINO */ @@ -4482,7 +4332,6 @@ static bool isRVRNO( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isCHINO( char **string, Decoded_METAR *Mptr, int *NDEX) { @@ -4520,9 +4369,6 @@ static bool isCHINO( char **string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isVISNO */ @@ -4544,7 +4390,6 @@ static bool isCHINO( char **string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isVISNO( char **string, Decoded_METAR *Mptr, int *NDEX) { @@ -4581,9 +4426,6 @@ static bool isVISNO( char **string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isFZRANO */ @@ -4605,7 +4447,6 @@ static bool isVISNO( char **string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isFZRANO( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4624,9 +4465,6 @@ static bool isFZRANO( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isTSNO */ @@ -4675,7 +4513,6 @@ static bool isFZRANO( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isTSNO( char *string, Decoded_METAR *Mptr, int *NDEX) { @@ -4693,9 +4530,6 @@ static bool isTSNO( char *string, Decoded_METAR *Mptr, int *NDEX) } -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: isDollarSign */ @@ -4717,7 +4551,6 @@ static bool isTSNO( char *string, Decoded_METAR *Mptr, int *NDEX) /* None. */ /* */ /********************************************************************/ -#pragma page(1) static bool isDollarSign( char *indicator, Decoded_METAR *Mptr, int *NDEX ) @@ -4736,9 +4569,6 @@ static bool isDollarSign( char *indicator, Decoded_METAR *Mptr, } } -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: DcdMTRmk */ @@ -4768,7 +4598,6 @@ static bool isDollarSign( char *indicator, Decoded_METAR *Mptr, /* None. */ /* */ /********************************************************************/ -#pragma page(1) void DcdMTRmk( char **token, Decoded_METAR *Mptr ) { diff --git a/simgear/metar/Drvmetar.c b/simgear/metar/Drvmetar.c index 58891567..a2dd73b6 100644 --- a/simgear/metar/Drvmetar.c +++ b/simgear/metar/Drvmetar.c @@ -1,8 +1,5 @@ #include "Metar.h" -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: dRVMETAR */ @@ -29,10 +26,8 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) -main() +int main() { - char bltn_prefix[20]; static char *string[] = { "KAST 221156Z COR 09005KT 7SM -RA OVC026 09/08 A2996 RMK " @@ -516,7 +511,6 @@ NULL, Decoded_METAR *Mptr = &Metar; int j, ErReturn; - static char *synopRTRN = NULL; /***************************************************/ @@ -541,4 +535,5 @@ NULL, } + return 0; } diff --git a/simgear/metar/Fracpart.cpp b/simgear/metar/Fracpart.cpp index 636e5a84..d089b833 100644 --- a/simgear/metar/Fracpart.cpp +++ b/simgear/metar/Fracpart.cpp @@ -1,9 +1,6 @@ #include "Local.h" /* standard header file */ #include "Metar.h" -#pragma subtitle(" ") -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: fracPart */ @@ -26,7 +23,6 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) float fracPart( char *string ) { diff --git a/simgear/metar/Prtdmetr.cpp b/simgear/metar/Prtdmetr.cpp index b9854bd8..b8600284 100644 --- a/simgear/metar/Prtdmetr.cpp +++ b/simgear/metar/Prtdmetr.cpp @@ -1,7 +1,5 @@ #include "Local.h" /* standard header file */ #include "Metar.h" -#pragma page(1) -#pragma subtitle("subtitle - description ") /********************************************************************/ /* */ /* Title: prtDMETR */ @@ -25,7 +23,6 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) void prtDMETR( Decoded_METAR *Mptr ) { diff --git a/simgear/metar/Stspack2.cpp b/simgear/metar/Stspack2.cpp index 3f7a21c8..6c607b6e 100644 --- a/simgear/metar/Stspack2.cpp +++ b/simgear/metar/Stspack2.cpp @@ -1,13 +1,5 @@ -#pragma comment (compiler) -//#pragma comment (date) -//#pragma comment (timestamp) -#pragma pagesize(80) - #include "Local.h" /* standard header file */ -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("stspack2 - Local string test functions ") /********************************************************************/ /* */ /* Title: stspack2 */ @@ -75,7 +67,6 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) int nisalnum(char *s, int n) { @@ -208,4 +199,3 @@ int nisxdigi(char *s, int n) { } /* end nisxdigi */ -#pragma page(1) diff --git a/simgear/metar/Stspack3.cpp b/simgear/metar/Stspack3.cpp index c927f8f9..8df58c0a 100644 --- a/simgear/metar/Stspack3.cpp +++ b/simgear/metar/Stspack3.cpp @@ -1,13 +1,5 @@ -#pragma comment (compiler) -//#pragma comment (date) -//#pragma comment (timestamp) -#pragma pagesize(80) - #include "Local.h" /* standard header file */ -#pragma page(1) -#pragma subtitle(" ") -#pragma subtitle("stspack3 - Local string test functions ") /********************************************************************/ /* */ /* Title: stspack3 */ @@ -75,7 +67,6 @@ /* None. */ /* */ /********************************************************************/ -#pragma page(1) char *nxtalnum(char *s) { for (; !isalnum(*s) && *s; s++) ; @@ -208,4 +199,3 @@ char *nxtxdigi(char *s) { } /* end nxtxdigi */ -#pragma page(1) diff --git a/simgear/misc/props_io.cxx b/simgear/misc/props_io.cxx index 160539ae..8b93ba22 100644 --- a/simgear/misc/props_io.cxx +++ b/simgear/misc/props_io.cxx @@ -343,6 +343,9 @@ getTypeName (SGPropertyNode::Type type) return "double"; case SGPropertyNode::STRING: return "string"; + case SGPropertyNode::ALIAS: + case SGPropertyNode::NONE: + return "unspecified"; } // keep the compiler from squawking @@ -434,7 +437,6 @@ writeNode (ostream &output, const SGPropertyNode * node, int indent) return true; // Everything's OK, but we won't write. const string &name = node->getName(); - int index = node->getIndex(); int nChildren = node->nChildren(); // If there is a literal value, diff --git a/simgear/xml/xmlparse.c b/simgear/xml/xmlparse.c index 5bba8870..294b73b4 100644 --- a/simgear/xml/xmlparse.c +++ b/simgear/xml/xmlparse.c @@ -190,7 +190,6 @@ static Processor prologInitProcessor; static Processor contentProcessor; static Processor cdataSectionProcessor; static Processor epilogProcessor; -static Processor errorProcessor; static Processor externalEntityInitProcessor; static Processor externalEntityInitProcessor2; static Processor externalEntityInitProcessor3; @@ -2333,15 +2332,6 @@ enum XML_Error epilogProcessor(XML_Parser parser, } } -static -enum XML_Error errorProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - return errorCode; -} - static enum XML_Error storeAttributeValue(XML_Parser parser, const ENCODING *enc, int isCdata, const char *ptr, const char *end, @@ -2483,7 +2473,6 @@ enum XML_Error storeEntityValue(XML_Parser parser, const char *entityTextPtr, const char *entityTextEnd) { - const ENCODING *internalEnc = ns ? XmlGetInternalEncodingNS() : XmlGetInternalEncoding(); STRING_POOL *pool = &(dtd.pool); entityTextPtr += encoding->minBytesPerChar; entityTextEnd -= encoding->minBytesPerChar; diff --git a/simgear/xml/xmltok.c b/simgear/xml/xmltok.c index 8d058d41..d106b1b3 100644 --- a/simgear/xml/xmltok.c +++ b/simgear/xml/xmltok.c @@ -1491,7 +1491,7 @@ int initScan(const ENCODING **encodingTable, break; } } - *encPtr = encodingTable[INIT_ENC_INDEX(enc)]; + *encPtr = encodingTable[(int)INIT_ENC_INDEX(enc)]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); }