/[escript]/trunk/esys2/finley/src/finleyC/setFinleyError.c
ViewVC logotype

Contents of /trunk/esys2/finley/src/finleyC/setFinleyError.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years, 5 months ago) by jgs
File MIME type: text/plain
File size: 540 byte(s)
Initial revision

1 #include "Finley.h"
2 #include "setFinleyError.h"
3
4 enum Finley_ErrorCodeType Finley_ErrorCode=NO_ERROR;
5 char Finley_ErrorMsg[LenErrorMsg_MAX]={'\0'};
6
7 void setFinleyError(enum Finley_ErrorCodeType errorCode, char* errorMess,
8 int lenMess)
9 {
10 Finley_ErrorCode=errorCode;
11 if (lenMess>=LenErrorMsg_MAX) {
12 strncpy(Finley_ErrorMsg,errorMess,LenErrorMsg_MAX);
13 /*
14 * make sure the message is null terminated
15 */
16 Finley_ErrorMsg[LenErrorMsg_MAX-1]='\0';
17 } else {
18 strncpy(Finley_ErrorMsg,errorMess,lenMess);
19 }
20 }
21
22

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26