Added files to index. Former-commit-id:7324dcd368
[formerlye3d3629375
] [formerlycf1383a412
] [formerly7324dcd368
[formerlye3d3629375
] [formerlycf1383a412
] [formerlybeae8e7e59
[formerlycf1383a412
[formerly 874ae116e412c39b73dc3cc74ee3f3a3b02d82f7]]]] Former-commit-id:beae8e7e59
Former-commit-id:901d493ecf
[formerly49dfa99cc5
] [formerly c8669b5ab7910607c5f11760fd75aaf1865a062e [formerlye1fc0b48c1
]] Former-commit-id: 58f45807010c2a34d66569d325b876da780850a4 [formerly03ad145679
] Former-commit-id:57bc02d754
47 lines
1.3 KiB
C
Executable file
47 lines
1.3 KiB
C
Executable file
#include "geminc.h"
|
|
#include "gemprm.h"
|
|
#include "ercmn.h"
|
|
|
|
|
|
void er_smsg ( char *string, int *iret )
|
|
/************************************************************************
|
|
* er_smsg *
|
|
* *
|
|
* This routine adds an error message to the error buffer. If the *
|
|
* buffer is full, the first (oldest) message is removed. *
|
|
* *
|
|
* er_smsg ( string, iret ) *
|
|
* *
|
|
* Input parameters: *
|
|
* *string char Error message *
|
|
* *
|
|
* Output parameters: *
|
|
* *iret int Return code *
|
|
* 0 = normal return *
|
|
* *
|
|
** *
|
|
* Log: *
|
|
* K. Tyle/GSC 12/96 *
|
|
* K. Tyle/GSC 1/97 Change nstr to nermsg; MXNSTR to MXERST *
|
|
* C. Lin/EAI 1/97 msgstr to errmsg *
|
|
* S. Maxwell/GSC 6/97 Documentation changes *
|
|
* T. Piper/SAIC 12/01 Fixed ABR; reduced loop by one *
|
|
* T. Piper/SAIC 02/04 Removed lens parameter *
|
|
***********************************************************************/
|
|
{
|
|
int ii;
|
|
char tmp[133];
|
|
/*---------------------------------------------------------------------*/
|
|
*iret = 0;
|
|
if ( nermsg < MXERST ) {
|
|
strcpy ( errmsg[nermsg], string);
|
|
nermsg++;
|
|
}
|
|
else if ( nermsg == MXERST ) {
|
|
for ( ii = 0; ii < MXERST-1; ii++ ) {
|
|
strcpy ( tmp, errmsg[ii+1] );
|
|
strcpy ( errmsg[ii], tmp );
|
|
}
|
|
strcpy ( errmsg[nermsg-1], string );
|
|
}
|
|
}
|