system-independent, adj.:
Works equally poorly on all systems.
-- unknown
Fnkdat provides an interface for determining common directory names in Win32 and UNIX applications.
Appications organize files differently on different platforms. On Win32 systems, an application is generally installed by a user and it is usually (more-or-less) installed entirely under a single tree. For example, the game OmniHype might be installed in the directory C:\Program Files\OmniHype\. Its maps or data may be in C:\Program Files\OmniHype\maps\, and the system configuration might be C:\Program Files\OmniHype\config.dat. Information specific to the user straczynski (such as keyboard/mouse settings) might be stored under G:\Documents and Settings\Straczynski\Application Data\OmniHype\ in Windows NT and its derivatives, and under C:\Program Files\OmniHype\users\straczynski\ in Windows 95 and its derivatives.
On a UNIX system the story is completely different. An application may be compiled by a user or a packager, and file locations (at least one of them, anyway) are often defined at compile-time. The application is then installed by a user or a system administrator, relative to a prefix (such as /usr/). Following the above example, the binary for the game OmniHype may be installed as /usr/bin/omnihype. Its maps or data may be in /usr/share/omnihype/maps/. The system configuration may be /etc/omnihype.conf, and information specific to the user straczynski may be stored under ~straczynski/.omnihype/.
fnkdat is an attempt to cope with these
differences.
fnkdat is implemented as a single function.
The source is released under a GUILE style license and
may be statically linked to both public and commercial software.
The license text, links to the source, and a couple tutorials are
listed below.
fnkdat has been tested, and runs on the
following platforms:
Microsoft Windows NT/95/2000
Cygwin (DLL version 1.3.10)
x86 GNU/Linux 2.2 (Debian 2.2)
x86 GNU/Linux 2.4 (RedHat 6.2, RedHat 7.2)
x86 FreeBSD 4.5-STABLE
Alpha GNU/Linux 2.2 (Debian 2.2)
PPC - RS/6000 Linux 2.2 (Debian 2.2)
Sparc GNU/Linux 2.2 (Debian 2.2)
fnkdat compiles on the following,
though I doubt very much that the values being returned are
correct. Patches welcome.
PPC - G4 MacOSX Darwin Kernel Version 5.3
Sparc - R220 Sun Solaris (8), SPROcc
This project is hosted by the GNU Savannah Website; Patches, mailing lists, and distributions can be found there. http://savannah.nongnu.org/projects/fnkdat/.
You can join the mailing lists here http://savannah.gnu.org/mail/?group_id=1650.
The latest version, additional information, tutorials, and source can be found on the project homepage at http://www.maccormack.net/~djm/fnkdat/
fnkdat - an interface for determining common directory names
Copyright (C) 2001, 2002 David MacCormack
This program 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 program 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, David MacCormack gives permission for additional uses of the text contained in the files named ``fnkdat.h'' and ``fnkdat.c'', hereafter known as FNKDAT.
The exception is that, if you link the FNKDAT with other files to produce an executable, this does not by itself cause the resulting executable to be covered by the GNU General Public License. Your use of that executable is in no way restricted on account of linking the FNKDAT code into it.
This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.
This exception applies only to the code released by David MacCormack under the name FNKDAT. If you copy code from other software into a copy of FNKDAT, as the General Public License permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from them.
If you write modifications of your own for FNKDAT, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, delete this exception notice.
David MacCormack (djm at maccormack dot net)