Skip to content
Commits on Source (17)
Lib/*.lib
*Debug*
*Release*
*.sdf
*.suo
\ No newline at end of file
4.1.1:
Automake build routines
Simplified building routines in Linux, Windows and Mac
Removed routines possibly copyrighted by Borland
Handling for file permission denied of index files
Translated some documentation into English.
Added ChangeLog :)
4.1.0:
First release to be published under an open source license
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src/GM src/UT src/FYBA doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = fyba.pc
== INTRODUCTION ==
OpenFYBA is the source code release of the FYBA library, distributed by the
National Mapping Authority of Norway (Statens kartverk) to read and write
files in the National geodata standard format SOSI.
The original library has a long history, and was originally developed for
systems as diverse as DOS, OS/2-16, OS/2-32, Win16, Win32, and various UNIX
variants (POSIX, HPUX, Silicon graphics). In Norwegian. It shows in the
source code. OpenFYBA has been tested to run at least on Windows and Linux
environments.
We welcome any contributions towards internationalization of the library.
In the meantime, if you do not happen to speak Norwegian, google translate
can help you with the documentation.
Do send feedback if you think you can help to improve this documentation.
_______________________________________________________________________
Send feedback to: Thomas Hirsch <thomas.hirsch@statkart.no>
== INSTALLATION ==
The FYBA library depends on two helper libraries, GM for geometry routines
and UT for utilities. The general procedure is therefore:
- Compile libfybagm and libfybaut using the provided make scripts (or Visual
Studio project files).
- Compile libfyba using the provided make script.
- Optionally build and run the unit tests in the tests folder.
** Linux **
./configure
make
make install
If the first step does not work right away, try to rebuild the configure
file for your system with autotools first:
autoreconf --force --install
** Mac OS X **
See issue #12. Replace any include of vfs.h with mount.h, then proceed with as per the Linux instructions.
Patches welcome.
** Windows **
On Windows all three libs of the FYBA library (GM.lib, UT.lib, and FYBA.lib)
have to be build individually.
For building FYBA on Windows project files for MS Visual Studio Express 2012
are provided in the folders fyba/src/GM, fyba/src/UT and fyba/src/FYBA.
Using these project files the individual libs are built in a subfolder within
the project directory and then copied to the fyba/Lib folder.
Therefore the fyba/Lib folder has to be created before running the build process.
When GM.lib, UT.lib and FYBA.lib are built you may want to use the libs for
activating the SOSI-driver in GDAL. For building GDAL with SOSI-support on Windows
see: http://trac.osgeo.org/gdal/wiki/SOSI
** Other **
Do send feedback if you manage to compile the library on any other system!
== USAGE ==
Please refer to the extensive, but Norwegian documentation in docs/no_NB.
Take a moment to enjoy the pleasant International mix of method names.
Most methods have a few lines of example code to help you getting started.
If you do not speak Norwegian, try google translating the document.
I personally would also suggest to take a look at the
SOSI driver for the GDAL/OGR library for more usage examples.
== LICENSE ==
/******************************************************************************
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
****************************************************************************/
This diff is collapsed.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT(fyba, 4.1.1, thomas.hirsch@statkart.no)
AM_INIT_AUTOMAKE(fyba, 4.1.1)
LT_INIT()
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([include/fygm.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h memory.h stdint.h stdlib.h string.h sys/ioctl.h sys/statvfs.h sys/time.h sys/vfs.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRCOLL
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor getcwd memmove memset mkdir modf pow rmdir sqrt strchr strerror strpbrk strstr strtol strtoul])
AC_OUTPUT
AC_OUTPUT(fyba.pc Makefile src/GM/Makefile src/UT/Makefile src/FYBA/Makefile doc/Makefile)
fyba (4.1.1-7) UNRELEASED; urgency=medium
* Bump Standards-Version to 4.2.0, no changes.
-- Ruben Undheim <ruben.undheim@gmail.com> Sat, 04 Aug 2018 11:58:33 +0200
fyba (4.1.1-6) unstable; urgency=medium
* Add a sensible autopkgtest which verifies that it is possible to
link with libfyba.
- Added these files:
debian/tests/control
debian/tests/link-to-library
* Remove lintian override for testsuite-autopkgtest-missing.
-- Ruben Undheim <ruben.undheim@gmail.com> Thu, 02 Aug 2018 20:28:34 +0200
fyba (4.1.1-5) unstable; urgency=medium
* Team upload.
* Drop autopkgtest to test installability.
(closes: #905117)
* Add lintian override for testsuite-autopkgtest-missing.
-- Bas Couwenberg <sebastic@debian.org> Tue, 31 Jul 2018 14:13:20 +0200
fyba (4.1.1-4) unstable; urgency=medium
* Team upload.
* Change Maintainer to Debian GIS project, move Ruben to Uploaders.
* Restructure control file with cme.
* Drop autoconf & libtool build dependencies, pulled in via dh-autoreconf.
* Update watch file to handle common issues.
* Drop incorrect Forwarded header from patches.
* Add upstream metadata.
* Bump Standards-Version to 4.1.5, no changes.
* Strip trailing whitespace from control file.
* Update copyright-format URL to use HTTPS.
* Update Vcs-* URLs for Salsa.
* Don't use autotools-dev explicitly.
* Drop obsolete dbg package.
* Add autopkgtest to test installability.
* Enable all hardening buildflags.
* Don't limit dh_strip to libfyba0.
* Override dh_makeshlibs to use -V.
* Fix capitalization error in description synopsis.
-- Bas Couwenberg <sebastic@debian.org> Sun, 29 Jul 2018 21:10:50 +0200
fyba (4.1.1-3) unstable; urgency=medium
* debian/control:
- Set Vcs URLs to https
- Updated standards to 3.9.8 (no changes)
* debian/patches/fix_issue.patch
- Don't define min/max macros
Fixes FTBFS with GCC 6 (Closes: #831206)
-- Ruben Undheim <ruben.undheim@gmail.com> Fri, 19 Aug 2016 17:59:12 +0000
fyba (4.1.1-2) unstable; urgency=low
* debian/control:
- Fixed debhelper version 9.0.0 -> 9
- Set "Multi-Arch: same" to enable multiarch for library
- Standards version to 3.9.6
* Added debian/gbp.conf to automatically enable pristine-tar build
-- Ruben Undheim <ruben.undheim@gmail.com> Sat, 23 May 2015 12:20:40 +0200
fyba (4.1.1-1) unstable; urgency=low
* Initial release (Closes: #760544)
-- Ruben Undheim <ruben.undheim@gmail.com> Thu, 04 Sep 2014 21:41:19 +0200
Source: fyba
Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Uploaders: Ruben Undheim <ruben.undheim@gmail.com>
Section: libs
Priority: optional
Build-Depends: debhelper (>= 9.20160114),
dh-autoreconf
Standards-Version: 4.2.0
Vcs-Browser: https://salsa.debian.org/debian-gis-team/fyba
Vcs-Git: https://salsa.debian.org/debian-gis-team/fyba.git
Homepage: https://github.com/kartverket/fyba
Package: libfyba0
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Description: FYBA library to read and write Norwegian geodata standard format SOSI
OpenFYBA is the source code release of the FYBA library, distributed by the
National Mapping Authority of Norway (Statens kartverk) to read and write
files in the National geodata standard format SOSI.
Package: libfyba-dev
Architecture: any
Multi-Arch: same
Section: libdevel
Depends: libfyba0 (= ${binary:Version}),
${misc:Depends}
Description: Header files for FYBA library
This is the development package for developing applications that depends on
libfyba. It includes header files, static library files and HTML
documentation.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fyba
Source: https://github.com/kartverket/fyba/
Files: *
Copyright: 1990-2011 Statens kartverk
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Files: debian/*
Copyright: 2013 Anders Einar Hilden <hildenae@gmail.com>
2014 Ruben Undheim <ruben.undheim@gmail.com>
License: GPL-2.0+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
[DEFAULT]
pristine-tar = True
upstream-tag=%(version)s
Document: libfyba-dev
Title: libfyba API documentation
Abstract: library for reading SOSI files
This library lets you open and manipulate SOSI files. The
library was released by the Norwegian Mapping Authority.
.
This document describes the API of the library.
Section: Programming/C
Format: HTML
Index: /usr/share/doc/libfyba-dev/en_EN/fyba.html
Files: /usr/share/doc/libfyba-dev/en_EN/fyba*.html
usr/include/*
usr/lib/*/lib*.a
usr/lib/*/lib*.so
usr/lib/*/pkgconfig/*
usr/lib/*/lib*.so.*
# Symbols are problematic for C++ libraries, shlibs is used instead.
no-symbols-control-file *
Description: This fixes the shlib-calls-exit lintian. Every
exit()-call is replaced with an error message and return.
Author: Ruben Undheim <ruben.undheim@gmail.com>
--- a/src/FYBA/FYLB.cpp
+++ b/src/FYBA/FYLB.cpp
@@ -3280,7 +3280,8 @@ short LB_RGru(LC_FILADM *pFil,UT_INT64 s
UT_SNPRINTF(err().tx,LC_ERR_LEN," \"%s %s\"",LN_GetNavn(&(pAktFil->SosiNavn),
pLb->cur_navn[pLb->cur_niv-1]),pLb->pp);
LC_Error(47,"(LB_RGru)",err().tx);
- exit (2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
siste = 0;
@@ -4275,7 +4276,8 @@ void LB_FyllBuffer (FILE *fil,LB_LESEBUF
} else {
LC_Error(43,"(LB_FyllBuffer)",""); /* Annen lesefeil */
}
- exit(1);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
/* Konverter til rett tegnsett */
@@ -4286,7 +4288,8 @@ void LB_FyllBuffer (FILE *fil,LB_LESEBUF
char szMelding[LC_MAX_SOSI_LINJE_LEN + 10];
UT_SNPRINTF(szMelding, LC_MAX_SOSI_LINJE_LEN + 10, "\"%s\"", plb->tx);
LC_Error(164,"(LB_FyllBuffer)",szMelding);
- exit(1);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
/* Nullstill pekere */
--- a/src/FYBA/FYLI.cpp
+++ b/src/FYBA/FYLI.cpp
@@ -151,7 +151,8 @@ short LI_OpenInit(LC_FILADM *pFil)
if (fil[strlen(fil)-1] == ' ')
{
LC_Error(120,"(LI_OpenInit)",pFil->pszNavn);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
// Opprett katalogen
@@ -173,7 +174,8 @@ short LI_OpenInit(LC_FILADM *pFil)
if (fwrite(pFil,sizeof(*pFil),1,pF) != 1) {
LC_Error(112,"(LI_OpenInit)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
fclose(pF);
@@ -260,7 +262,8 @@ short LI_OpenRead(LC_FILADM *pFil)
if (fread(pGrt,sizeof(*pGrt),1,pF) != 1) { /* Les */
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %ld",pFil->pszNavn,linje);
LC_Error(111,"(LI_OpenRead): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
}
fclose(pF);
@@ -275,7 +278,8 @@ short LI_OpenRead(LC_FILADM *pFil)
if (! feof(pF)) {
UT_SNPRINTF(err().tx,LC_ERR_LEN," %ld",lSnr);
LC_Error(111,"(LI_OpenRead): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
fclose(pF);
@@ -286,7 +290,8 @@ short LI_OpenRead(LC_FILADM *pFil)
if (fread(&bt,sizeof(bt),1,pF) != 1) { /* Les */
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %ld",pFil->pszNavn,linje);
LC_Error(111,"(LI_OpenRead): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
LI_PutBt(pFil,linje,bt);
}
@@ -298,7 +303,8 @@ short LI_OpenRead(LC_FILADM *pFil)
if (fread(&Boks,sizeof(Boks),1,pF) != 1) { /* Les */
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %ld",pFil->pszNavn,linje);
LC_Error(111,"(LI_OpenRead): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
if (Boks.dMaxAust != (double)LONG_MAX) {
@@ -440,7 +446,8 @@ void LI_Close(LC_FILADM *pFil,short s_st
for (lGrNr=0; lGrNr<pFil->lAntGr; lGrNr++) {
if (fwrite(LI_GetGrt(pFil,lGrNr),sizeof (LC_GRTAB_LINJE),1,pF) != 1) {
LC_Error(112,"(LI_Close)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
fclose(pF);
@@ -451,7 +458,8 @@ void LI_Close(LC_FILADM *pFil,short s_st
flag = LI_GetBt(pFil,lGrNr);
if (fwrite(&flag,sizeof flag,1,pF) != 1) {
LC_Error(112,"(LI_Close)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
fclose(pF);
@@ -462,7 +470,8 @@ void LI_Close(LC_FILADM *pFil,short s_st
lGrNr = LI_GetSnr(pFil,lSnr);
if (fwrite(&lGrNr,sizeof lGrNr,1,pF) != 1) {
LC_Error(112,"(LI_Close)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
fclose(pF);
@@ -476,13 +485,15 @@ void LI_Close(LC_FILADM *pFil,short s_st
Boks.dMaxAust = (double)LONG_MAX;
if (fwrite(&Boks,sizeof (LC_BOKS),1,pF) != 1) {
LC_Error(112,"(LI_Close)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
} else {
if (fwrite(&(pRL->Boks),sizeof (LC_BOKS),1,pF) != 1) {
LC_Error(112,"(LI_Close)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
}
@@ -557,7 +568,8 @@ static FILE *LI_OpenIdxFil(LC_FILADM *pF
UT_strerror(szError,256,ierr);
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s - %s",fil,szError);
LC_Error(6,"(LI_OpenIdxFil)",err().tx);
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
/* Posisjoner hvis ndvendig */
@@ -804,12 +816,14 @@ void LI_PutSnr(LC_FILADM *pFil,long lSnr
} else {
UT_SNPRINTF(err().tx,LC_ERR_LEN,"%ld",lSnr);
LC_Error(61,"(LI_PutSnr): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
} else {
LC_Error(75,"(LI_PutSnr): ","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
}
@@ -849,7 +863,8 @@ LC_GRTAB_LINJE * LI_GetGrt(LC_FILADM *pF
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %ld",pFil->pszNavn,linje);
LC_Error(111,"(LI_GetGrt): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
return NULL;
}
@@ -891,7 +906,8 @@ LC_GRTAB_LINJE * LI_AppGrt(LC_FILADM *pF
} else {
LC_Error(75,"(LI_PutGrt): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
return NULL;
@@ -932,7 +948,8 @@ unsigned long LI_GetBt(LC_FILADM *pFil,l
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %ld",pFil->pszNavn,linje);
LC_Error(111,"(LI_GetBt): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
return 0L;
}
@@ -976,7 +993,8 @@ void LI_PutBt(LC_FILADM *pFil,long linje
} else {
LC_Error(75,"(LI_PutBt): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
}
@@ -1398,7 +1416,8 @@ void LI_SaveAdm(LC_FILADM *pFil)
pFil->ulPid = 0;
if (fwrite(pFil,sizeof(*pFil),1,pF) != 1) {
LC_Error(112,"(LI_SaveAdm)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
fclose(pF);
@@ -1547,7 +1566,8 @@ static short LI_ReadAdm(LC_FILADM *pFil)
if (fwrite(pFil,sizeof(*pFil),1,pF) != 1)
{
LC_Error(112,"(LI_ReadAdm)","");
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
// Stenger filen
@@ -1631,7 +1651,8 @@ void LI_WriteRb(LC_FILADM *pFil, UT_INT6
if (sSkrivefeil == UT_TRUE) {
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %lld",pFil->pszNavn,n64FilPos);
LC_Error(74,"(LI_WriteRb): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
pFil->pBase->n64FilPosRb = _ftelli64(pF);
@@ -1727,7 +1748,8 @@ void LI_ReadRb(LC_FILADM *pFil, UT_INT64
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %lld",pFil->pszNavn,n64FilPos);
LC_Error(73,"(LI_ReadRb): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
pFil->pBase->n64FilPosRb = _ftelli64(pF);
@@ -1799,7 +1821,8 @@ void LI_ReadCoordRb(LC_FILADM *pFil, UT_
if (sLesefeil == UT_TRUE) {
UT_SNPRINTF(err().tx,LC_ERR_LEN," %s : %lld",pFil->pszNavn,n64FilPos);
LC_Error(73,"(LI_ReadCoordRb): ",err().tx);
- exit(99);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
}
pFil->pBase->n64FilPosRb = _ftelli64(pF);
--- a/src/FYBA/FYLO.cpp
+++ b/src/FYBA/FYLO.cpp
@@ -757,11 +757,13 @@ SK_EntPnt_FYBA LC_BASEADM * LC_OpenBase(
*/
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 ch
*/
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,
} 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 */
--- a/src/FYBA/Fyba_Callback.cpp
+++ b/src/FYBA/Fyba_Callback.cpp
@@ -102,7 +102,8 @@ void LC_ErrorHandler (short feil_nr, con
case 4:
printf("\aTrykk [Enter] for avbryte programmet:");
if (getchar() == 0) getchar();
- exit(2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return;
break;
}
}
--- a/src/FYBA/fyln.cpp
+++ b/src/FYBA/fyln.cpp
@@ -448,7 +448,8 @@ short LN_PakkNavn (LC_NAVNETABELL * pLn,
UT_FPRINTF(stderr,"%s\n",LN_VisNavn(pLn,nr));
}
LC_Error(21,"(LN_PakkNavn)","");
- exit (2);
+ fprintf(stderr,"Error: The library used to stop the program execution here\n");
+ return 0;
}
/* ----- Nytt navn */
Description: This call makes libfyba link with libfyut and libfygm.
Author: Ruben Undheim <ruben.undheim@gmail.com>
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src/GM src/UT src/FYBA doc
+SUBDIRS = src/UT src/GM src/FYBA doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = fyba.pc
--- a/src/FYBA/Makefile.am
+++ b/src/FYBA/Makefile.am
@@ -4,6 +4,8 @@ ACLOCAL_AMFLAGS = -I m5
lib_LTLIBRARIES = libfyba.la
libfyba_la_SOURCES = fyba.h Fyba_Callback.cpp FYBA_DLL.cpp FYHO.cpp FYLD.cpp FYLH.cpp fyln.cpp FYLP.cpp FYLS.cpp FYLX.cpp stdafx.cpp FYBA.cpp Fyba_melding.cpp FYLB.cpp FYLE.cpp FYLI.cpp FYLO.cpp FYLR.cpp FYLU.cpp FYTA.cpp fyba.h fyba_strings.h fybax.h stdafx.h
libfyba_la_LDFLAGS = -version-info 0:0:0
+libfyba_la_LIBADD = $(top_builddir)/src/UT/libfyut.la \
+ $(top_builddir)/src/GM/libfygm.la
library_includedir=$(includedir)/fyba
library_include_HEADERS = fyba.h
--- a/src/GM/Makefile.am
+++ b/src/GM/Makefile.am
@@ -4,6 +4,7 @@ ACLOCAL_AMFLAGS = -I m5
lib_LTLIBRARIES = libfygm.la
libfygm_la_SOURCES = fygm.h GM.cpp stdafx.cpp stdafx.h
libfygm_la_LDFLAGS = -version-info 0:0:0
+libfygm_la_LIBADD = $(top_builddir)/src/UT/libfyut.la
library_includedir=$(includedir)/fyba
library_include_HEADERS = fygm.h