/*wcnint initialize stack or warnings, cautions, notes */ #include #include "cddefines.h" #include "warnings.h" void wcnint(void) { # ifdef DEBUG_FUN fputs( "<+>wcnint()\n", debug_fp ); # endif /* this sub is called first, to initialize the variables */ warnings.nwarn = 0; warnings.ncaun = 0; warnings.nnote = 0; warnings.nbang = 0; # ifdef DEBUG_FUN fputs( " <->wcnint()\n", debug_fp ); # endif return; } /*warnin enter warnings at the end of the calculations into large stack */ void warnin(char *chLine) { # ifdef DEBUG_FUN fputs( "<+>warnin()\n", debug_fp ); # endif warnings.nwarn += 1; if( warnings.nwarn > LIMWCN ) { fprintf( ioQQQ, " Too many warnings have been entered; increase the value of LIMWCN everywhere in the code.\n" ); puts( "[Stop in warnin]" ); exit(1); } else { strcpy( warnings.chWarnln[warnings.nwarn-1], chLine ); } # ifdef DEBUG_FUN fputs( " <->warnin()\n", debug_fp ); # endif return; } /*notein enter a note about calculation into comment array */ void notein(char *chLine) { # ifdef DEBUG_FUN fputs( "<+>notein()\n", debug_fp ); # endif warnings.nnote += 1; if( warnings.nnote > LIMWCN ) { fprintf( ioQQQ, " Too many notes have been entered; increase the value of LIMWCN everywhere in the code.\n" ); puts( "[Stop in notein]" ); exit(1); } else { strcpy( warnings.chNoteln[warnings.nnote-1], chLine ); } # ifdef DEBUG_FUN fputs( " <->notein()\n", debug_fp ); # endif return; } /*bangin called by routine comment to enter surprise into comment stack */ void bangin(char *chLine) { # ifdef DEBUG_FUN fputs( "<+>bangin()\n", debug_fp ); # endif warnings.nbang += 1; if( warnings.nbang > LIMWCN ) { fprintf( ioQQQ, " Too many surprises have been entered; increase the value of LIMWCN everywhere in the code.\n" ); puts( "[Stop in bangin]" ); exit(1); } else { strcpy( warnings.chBangln[warnings.nbang-1], chLine ); } # ifdef DEBUG_FUN fputs( " <->bangin()\n", debug_fp ); # endif return; } /*caunin called by comment to enter caution into comment stack */ void caunin(char *chLine) { # ifdef DEBUG_FUN fputs( "<+>caunin()\n", debug_fp ); # endif warnings.ncaun += 1; if( warnings.ncaun > LIMWCN ) { fprintf( ioQQQ, " Too many cautions have been entered; increase the value of LIMWCN everywhere in the code.\n" ); puts( "[Stop in caunin]" ); exit(1); } else { strcpy( warnings.chCaunln[warnings.ncaun-1], chLine ); } # ifdef DEBUG_FUN fputs( " <->caunin()\n", debug_fp ); # endif return; }