awips2/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/dgdriv_c/ergerrmsg.c
Brad Gonzales 632020195a Issue #628 committing PGEN code received from Plummer on 4-19-2012.
Former-commit-id: fda897d2d0 [formerly 253e8bc948] [formerly fda897d2d0 [formerly 253e8bc948] [formerly 295cbf95e5 [formerly 0816cd253c86acc699cb90866131619c4679f631]]]
Former-commit-id: 295cbf95e5
Former-commit-id: 2a3bf4ec32 [formerly ae3d17c698]
Former-commit-id: a610dcde73
2012-05-10 16:50:45 -05:00

39 lines
1.1 KiB
C
Executable file

#include "geminc.h"
#include "gemprm.h"
#include "ercmn.h"
void er_gerrmsg ( int *index, char *msg, int *iret )
/************************************************************************
* er_gerrmsg *
* *
* This routine gets the "index"th error message in the error buffer. *
* *
* er_gerrmsg ( index, msg ) *
* *
* Input parameters: *
* *index int Index of the desired message *
* *
* Output parameters: *
* *msg char Error message *
* *iret int Return code *
* 0 = normal return *
* 1 = no msgs in buffer *
** *
* Log: *
* J. Wu/SAIC 01/04 initial coding *
* J. Wu/SAIC 02/04 input index as a pointer *
***********************************************************************/
{
/*---------------------------------------------------------------------*/
*iret = 0;
if ( nermsg > 0 && *index >= 0 && *index < nermsg ) {
strcpy ( msg, errmsg[*index] );
}
else {
strcpy ( msg, "" );
*iret = 1;
}
}