summaryrefslogtreecommitdiff
path: root/src/FYBA/FYLO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/FYBA/FYLO.cpp')
-rw-r--r--src/FYBA/FYLO.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/FYBA/FYLO.cpp b/src/FYBA/FYLO.cpp
index eafbda7..21291d7 100644
--- a/src/FYBA/FYLO.cpp
+++ b/src/FYBA/FYLO.cpp
@@ -757,11 +757,13 @@ SK_EntPnt_FYBA LC_BASEADM * LC_OpenBase(short sBaseType)
*/
if (fyba_initiert != 1){
LC_Error(4,"(LC_OpenBase)","");
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
if (sBaseType != LC_BASE && sBaseType != LC_KLADD) {
LC_Error(1,"(LC_OpenBase)","");
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
/*
@@ -1149,17 +1151,20 @@ SK_EntPnt_FYBA short LC_OpenSos(const char *fil,short sModus,short sNyIdx,short
*/
if (fyba_initiert != 1) {
LC_Error(4,"(LC_OpenSos)","");
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
if (Sys.pForsteBase == NULL) {
LC_Error(5,"(LC_OpenSos)","");
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
if (Sys.pAktBase->sType == LC_KLADD) {
if (sModus == LC_BASE_FRAMGR || sModus == LC_BASE_BAKGR) {
LC_Error(106,"(LC_OpenSos)",fil);
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
}
@@ -1471,7 +1476,8 @@ void LO_ReopenSos(LC_FILADM *pFil)
/* Åpningsfeil */
if (ostat != UT_OK) {
LC_Error(6,"(LO_ReopenSos)",pFil->pszNavn);
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
/* Husk current filnummer */
@@ -1982,7 +1988,8 @@ static short LO_InklSos(LC_FILADM *pFil,short sVisStatus)
} else { /* For mange grupper, tab. sprengt */
UT_SNPRINTF(err().tx,LC_ERR_LEN," %ld",pFil->lAntGr+1L);
LC_Error(2,"(LO_InklSos)",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
avbrutt = LC_Cancel(); /* <ESC> avbryter lesing */