/home66/gary/public_html/cloudy/c08_branch/source/warnings.cpp

Go to the documentation of this file.
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
00002  * others.  For conditions of distribution and use see copyright notice in license.txt */
00003 /*wcnint initialize stack or warnings, cautions, notes */
00004 /*warnin enter warnings at the end of the calculations into large stack */
00005 /*notein enter a note about calculation into comment array */
00006 /*bangin called by routine comment to enter surprise into comment stack */
00007 /*caunin called by comment to enter caution into comment stack */
00008 #include "cddefines.h"
00009 #include "warnings.h"
00010 
00011 void wcnint(void)
00012 {
00013 
00014         DEBUG_ENTRY( "wcnint()" );
00015 
00016         /* this sub is called first, to initialize the variables */
00017         warnings.nwarn = 0;
00018         warnings.ncaun = 0;
00019         warnings.nnote = 0;
00020         warnings.nbang = 0;
00021         return;
00022 }
00023 
00024 /*warnin enter warnings at the end of the calculations into large stack */
00025 void warnin(char *chLine)
00026 {
00027 
00028         DEBUG_ENTRY( "warnin()" );
00029 
00030         if( warnings.nwarn >= LIMWCN )
00031         {
00032                 static bool lgFirst=true;
00033                 if( lgFirst )
00034                         fprintf( ioQQQ, 
00035                                 " Too many warnings have been entered; increase the value of LIMWCN everywhere in the code.\n" );
00036                 lgFirst = false;
00037         }
00038         else
00039         {
00040                 strcpy( warnings.chWarnln[warnings.nwarn], chLine  );
00041         }
00042 
00043         ++warnings.nwarn;
00044         return;
00045 }
00046 
00047 /*notein enter a note about calculation into comment array */
00048 void notein(char *chLine)
00049 {
00050 
00051         DEBUG_ENTRY( "notein()" );
00052 
00053         if( warnings.nnote >= LIMWCN )
00054         {
00055                 static bool lgFirst=true;
00056                 if( lgFirst )
00057                         fprintf( ioQQQ, 
00058                                 " Too many notes have been entered; increase the value of LIMWCN everywhere in the code.\n" );
00059                 lgFirst = false;
00060         }
00061         else
00062         {
00063                 strcpy( warnings.chNoteln[warnings.nnote], chLine );
00064         }
00065 
00066         ++warnings.nnote;
00067         return;
00068 }
00069 
00070 /*bangin called by routine comment to enter surprise into comment stack */
00071 void bangin(char *chLine)
00072 {
00073 
00074         DEBUG_ENTRY( "bangin()" );
00075 
00076         if( warnings.nbang >= LIMWCN )
00077         {
00078                 static bool lgFirst=true;
00079                 if( lgFirst )
00080                         fprintf( ioQQQ, 
00081                                 " Too many surprises have been entered; increase the value of LIMWCN everywhere in the code.\n" );
00082                 lgFirst = false;
00083         }
00084         else
00085         {
00086                 strcpy( warnings.chBangln[warnings.nbang], chLine );
00087         }
00088 
00089         ++warnings.nbang;
00090         return;
00091 }
00092 
00093 /*caunin called by comment to enter caution into comment stack */
00094 void caunin(char *chLine)
00095 {
00096 
00097         DEBUG_ENTRY( "caunin()" );
00098 
00099         if( warnings.ncaun >= LIMWCN )
00100         {
00101                 static bool lgFirst=true;
00102                 if( lgFirst )
00103                         fprintf( ioQQQ, 
00104                                 " Too many cautions have been entered; increase the value of LIMWCN everywhere in the code.\n" );
00105                 lgFirst = false;
00106         }
00107         else
00108         {
00109                 strcpy( warnings.chCaunln[warnings.ncaun], chLine );
00110         }
00111 
00112         ++warnings.ncaun;
00113         return;
00114 }

Generated on Mon Feb 16 12:01:28 2009 for cloudy by  doxygen 1.4.7