Switched to zlib license.

This commit is contained in:
Ryan C. Gordon 2003-07-20 20:57:55 +00:00
parent 33be461bcb
commit 025aef8a15
32 changed files with 840 additions and 3523 deletions

View File

@ -2,6 +2,13 @@
* CHANGELOG.
*/
07202003 - Switched to zlib license (see new LICENSE text in root of source
tree, and zlib_license_switch.txt for details). Had to remove
archivers/qpak.c, the Ruby bindings from the extras directory, and
the Russian and Spanish translations, since those contributors
couldn't be contacted. If they show up, we'll readd them to the
project, otherwise we'll eventually replace their work...everyone
else signed on for the change.
06112003 - Patches to globbing.c to handle corner cases (thanks, Bradley!).
06102003 - Added globbing.c to "extras" directory.
05232003 - Rewrote MacOSX/Darwin CD-ROM detection code to use IOKit, which is

513
LICENSE
View File

@ -1,504 +1,29 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (c) 2003 Ryan C. Gordon and others.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from
the use of this software.
Preamble
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
3. This notice may not be removed or altered from any source distribution.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
Ryan C. Gordon <icculus@clutteredmind.org>
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
(Please note that versions of PhysicsFS prior to 0.1.9 are licensed under
the GNU Lesser General Public License, which restricts you significantly more.
For your own safety, please make sure you've got 0.1.9 or later if you plan
to use physfs in a commercial or closed-source project.)

View File

@ -4,4 +4,4 @@ The API can be found in the file ~/Library/Frameworks/physfs.framework/Headers/p
The source code is available from:
http://www.icculus.org/physfs/
This library is distributed under the terms of the GNU LGPL license: http://www.gnu.org/copyleft/lesser.html
This library is distributed under the terms of the zlib license: http://www.opensource.org/licenses/zlib-license.php

View File

@ -3,4 +3,4 @@ This is an example portable file system.
The source code is available from:
http://www.icculus.org/physfs/
This library is distributed under the terms of the GNU LGPL license: http://www.gnu.org/copyleft/lesser.html
This library is distributed under the terms of the zlib license: http://www.opensource.org/licenses/zlib-license.php

View File

@ -1,778 +0,0 @@
/*
* Quake PAK support routines for PhysicsFS.
*
* This driver handles id Software Quake PAK files.
*
* Please see the file LICENSE in the source's root directory.
*
* This file written by Ed Sinjiashvili.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if (defined PHYSFS_SUPPORTS_QPAK)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "physfs.h"
#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
#define QPAK_MAXDIRLEN 60
typedef struct
{
char name[56];
PHYSFS_uint32 offset;
PHYSFS_uint32 size;
} QPAKentry;
typedef struct tagQPAKdirentry
{
char *name;
QPAKentry *entry;
struct tagQPAKdirentry *next;
} QPAKdirentry;
typedef struct QPAKDirectory
{
char name[QPAK_MAXDIRLEN];
struct QPAKDirectory *dirs, *next;
QPAKdirentry *files;
} QPAKdirectory;
typedef struct
{
void *handle;
char *filename;
PHYSFS_uint32 dirOffset;
PHYSFS_uint32 totalEntries;
QPAKentry *entries;
QPAKdirectory *root;
} QPAKinfo;
typedef struct
{
void *handle;
QPAKentry *entry;
PHYSFS_sint64 curPos;
} QPAKfileinfo;
static int QPAK_isArchive(const char *filename, int forWriting);
static DirHandle *QPAK_openArchive(const char *name, int forWriting);
static void QPAK_dirClose(DirHandle *h);
static LinkedStringList *QPAK_enumerateFiles(DirHandle *h, const char *dirname,
int omitSymLinks);
static int QPAK_exists(DirHandle *h, const char *name);
static int QPAK_isDirectory(DirHandle *h, const char *name, int *e);
static int QPAK_isSymLink(DirHandle *h, const char *name, int *e);
static PHYSFS_sint64 QPAK_getLastModTime(DirHandle *h, const char *n, int *e);
static FileHandle *QPAK_openRead(DirHandle *h, const char *name, int *e);
static FileHandle *QPAK_openWrite(DirHandle *h, const char *name);
static FileHandle *QPAK_openAppend(DirHandle *h, const char *name);
static PHYSFS_sint64 QPAK_read(FileHandle *handle, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
static PHYSFS_sint64 QPAK_write(FileHandle *handle, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
static int QPAK_eof(FileHandle *handle);
static PHYSFS_sint64 QPAK_tell(FileHandle *handle);
static int QPAK_seek(FileHandle *handle, PHYSFS_uint64 offset);
static PHYSFS_sint64 QPAK_fileLength(FileHandle *handle);
static int QPAK_fileClose(FileHandle *handle);
static int QPAK_remove(DirHandle *h, const char *name);
static int QPAK_mkdir(DirHandle *h, const char *name);
const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_QPAK =
{
"PAK",
"Quake PAK file format",
"Ed Sinjiashvili <slimb@swes.saren.ru>",
"http://icculus.org/physfs/",
};
static const FileFunctions __PHYSFS_FileFunctions_QPAK =
{
QPAK_read, /* read() method */
QPAK_write, /* write() method */
QPAK_eof, /* eof() method */
QPAK_tell, /* tell() method */
QPAK_seek, /* seek() method */
QPAK_fileLength, /* fileLength() method */
QPAK_fileClose /* fileClose() method */
};
const DirFunctions __PHYSFS_DirFunctions_QPAK =
{
&__PHYSFS_ArchiveInfo_QPAK,
QPAK_isArchive, /* isArchive() method */
QPAK_openArchive, /* openArchive() method */
QPAK_enumerateFiles, /* enumerateFiles() method */
QPAK_exists, /* exists() method */
QPAK_isDirectory, /* isDirectory() method */
QPAK_isSymLink, /* isSymLink() method */
QPAK_getLastModTime, /* getLastModTime() method */
QPAK_openRead, /* openRead() method */
QPAK_openWrite, /* openWrite() method */
QPAK_openAppend, /* openAppend() method */
QPAK_remove, /* remove() method */
QPAK_mkdir, /* mkdir() method */
QPAK_dirClose /* dirClose() method */
};
#define QPAK_MAGIC 0x4B434150 /* look like "PACK" in ascii. */
/*
* Read an unsigned 32-bit int and swap to native byte order.
*/
static int readui32(void *in, PHYSFS_uint32 *val)
{
PHYSFS_uint32 v;
BAIL_IF_MACRO(__PHYSFS_platformRead(in, &v, sizeof (v), 1) != 1, NULL, 0);
*val = PHYSFS_swapULE32(v);
return(1);
} /* readui32 */
static int openQPak(const char *filename, int forWriting, void **fileHandle)
{
PHYSFS_uint32 sig;
*fileHandle = NULL;
BAIL_IF_MACRO(forWriting, ERR_ARC_IS_READ_ONLY, 0);
*fileHandle = __PHYSFS_platformOpenRead(filename);
BAIL_IF_MACRO(*fileHandle == NULL, NULL, 0);
if (!readui32(*fileHandle, &sig))
goto openPak_failed;
if (sig != QPAK_MAGIC)
{
__PHYSFS_setError(ERR_UNSUPPORTED_ARCHIVE);
goto openPak_failed;
} /* if */
return(1);
openPak_failed:
if (*fileHandle != NULL)
__PHYSFS_platformClose(*fileHandle);
*fileHandle = NULL;
return(0);
} /* openQPak */
static int QPAK_isArchive(const char *filename, int forWriting)
{
void *fileHandle;
int retval = openQPak(filename, forWriting, &fileHandle);
if (fileHandle != NULL)
__PHYSFS_platformClose(fileHandle);
return(retval);
} /* QPAK_isArchive */
static int qpak_loadEntries(void *fh, int dirOffset, int numEntries,
QPAKentry *entries)
{
PHYSFS_sint32 i;
BAIL_IF_MACRO(__PHYSFS_platformSeek(fh, dirOffset) == 0, NULL, 0);
for (i = 0; i < numEntries; i++, entries++)
{
PHYSFS_sint64 r = __PHYSFS_platformRead(fh, entries->name, 56, 1);
BAIL_IF_MACRO(r == 0, NULL, 0);
BAIL_IF_MACRO(!readui32(fh, &entries->offset), NULL, 0);
BAIL_IF_MACRO(!readui32(fh, &entries->size), NULL, 0);
} /* for */
return(1);
} /* qpak_loadEntries */
static QPAKdirentry *qpak_newDirentry(char *name, QPAKentry *entry)
{
QPAKdirentry *retval = (QPAKdirentry *) malloc(sizeof (QPAKdirentry));
BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, 0);
retval->name = name;
retval->entry = entry;
retval->next = NULL;
return(retval);
} /* qpak_newDirentry */
static void qpak_deleteDirentry(QPAKdirentry *e)
{
while (e != NULL)
{
QPAKdirentry *next = e->next;
free(e);
e = next;
} /* while */
} /* qpak_deleteDirentry */
static QPAKdirectory *qpak_newDirectory(char *name)
{
QPAKdirectory *dir = (QPAKdirectory *) malloc(sizeof (QPAKdirectory));
BAIL_IF_MACRO(dir == NULL, ERR_OUT_OF_MEMORY, 0);
strcpy(dir->name, name);
dir->dirs = NULL;
dir->next = NULL;
dir->files = NULL;
return dir;
} /* qpak_newDirectory */
static void qpak_deleteDirectory(QPAKdirectory *d)
{
while (d != NULL)
{
QPAKdirectory *next = d->next;
qpak_deleteDirentry(d->files);
qpak_deleteDirectory(d->dirs);
free(d);
d = next;
} /* while */
} /* qpak_deleteDirectory */
static int qpak_addFile(QPAKdirectory *dir, char *name, QPAKentry *entry)
{
QPAKdirentry *file = qpak_newDirentry(name, entry);
if (file == NULL)
return(0);
/* !!! FIXME: Traversing a linkedlist gets slower with each added file. */
if (dir->files == NULL)
{
dir->files = file;
} /* if */
else
{
QPAKdirentry *tail = dir->files;
while (tail->next != NULL)
tail = tail->next;
tail->next = file;
} /* else */
return(1);
} /* qpak_addFile */
static QPAKdirectory *qpak_findDirectory(QPAKdirectory *root, const char *name)
{
char *p = strchr(name, '/');
if (p == NULL)
{
QPAKdirectory *thisDir = root->dirs;
while (thisDir != NULL)
{
if (__PHYSFS_platformStricmp(thisDir->name, name) == 0)
return(thisDir);
thisDir = thisDir->next;
} /* while */
} /* if */
else
{
char temp[QPAK_MAXDIRLEN];
QPAKdirectory *thisDir = root->dirs;
strncpy (temp, name, p - name);
temp[p - name] = '\0';
while (thisDir != NULL)
{
if (__PHYSFS_platformStricmp(thisDir->name, temp) == 0)
return(qpak_findDirectory(thisDir, p + 1));
thisDir = thisDir->next;
} /* while */
} /* else */
BAIL_MACRO(ERR_NO_SUCH_PATH, 0);
} /* qpak_findDirectory */
static QPAKdirectory *qpak_addDir(QPAKdirectory *dir, char *name)
{
QPAKdirectory *newDir = qpak_findDirectory(dir, name);
if (newDir != 0)
return(newDir);
newDir = qpak_newDirectory(name);
if (newDir == 0)
return 0;
if (dir->dirs == NULL)
{
dir->dirs = newDir;
} /* if */
else
{
QPAKdirectory *tail = dir->dirs;
while (tail->next != NULL)
tail = tail->next;
tail->next = newDir;
} /* else */
return(newDir);
} /* qpak_addDir */
static int qpak_addEntry(QPAKdirectory *dir, char *name, QPAKentry *entry)
{
char tempName[QPAK_MAXDIRLEN];
QPAKdirectory *child;
char *p = strchr(name, '/');
if (p == NULL)
return(qpak_addFile(dir, name, entry));
strncpy(tempName, name, p - name);
tempName[p - name] = '\0';
child = qpak_addDir(dir, tempName);
return(qpak_addEntry(child, p + 1, entry));
} /* qpak_addEntry */
static QPAKentry *qpak_findEntry(QPAKdirectory *root, const char *name)
{
QPAKdirectory *dir = NULL;
QPAKdirentry *thisFile = NULL;
const char *t = strrchr(name, '/');
if (t == NULL)
{
dir = root;
t = name;
} /* if */
else
{
char temp[QPAK_MAXDIRLEN];
strncpy(temp, name, t - name);
temp[t - name] = '\0';
dir = qpak_findDirectory(root, temp);
t++;
} /* else */
if (dir == NULL)
return(0);
thisFile = dir->files;
while (thisFile != NULL)
{
if (__PHYSFS_platformStricmp(thisFile->name, t) == 0)
return(thisFile->entry);
thisFile = thisFile->next;
} /* while */
BAIL_MACRO(ERR_NO_SUCH_FILE, 0);
} /* qpak_findEntry */
static int qpak_populateDirectories(QPAKentry *entries, int numEntries,
QPAKdirectory *root)
{
PHYSFS_sint32 i;
QPAKentry *entry = entries;
for (i = 0; i < numEntries; i++, entry++)
{
if (qpak_addEntry(root, entry->name, entry) == 0)
return(0);
} /* for */
return(1);
} /* qpak_populateDirectories */
static void qpak_deletePakInfo(QPAKinfo *pakInfo)
{
if (pakInfo->handle != NULL)
__PHYSFS_platformClose(pakInfo->handle);
if (pakInfo->filename != NULL)
free(pakInfo->filename);
if (pakInfo->entries != NULL)
free(pakInfo->entries);
qpak_deleteDirectory(pakInfo->root);
free(pakInfo);
} /* qpak_deletePakInfo */
static int qpak_entry_cmp(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
QPAKentry *a = (QPAKentry *) _a;
return(strcmp(a[one].name, a[two].name));
} /* qpak_entry_cmp */
static void qpak_entry_swap(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
QPAKentry tmp;
QPAKentry *first = &(((QPAKentry *) _a)[one]);
QPAKentry *second = &(((QPAKentry *) _a)[two]);
memcpy(&tmp, first, sizeof (QPAKentry));
memcpy(first, second, sizeof (QPAKentry));
memcpy(second, &tmp, sizeof (QPAKentry));
} /* qpak_entry_swap */
static DirHandle *QPAK_openArchive(const char *name, int forWriting)
{
void *fh = NULL;
PHYSFS_uint32 dirOffset, dirLength;
QPAKinfo *pi;
DirHandle *retval;
retval = (DirHandle *) malloc(sizeof (DirHandle));
BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
pi = (QPAKinfo *) malloc(sizeof (QPAKinfo));
if (pi == NULL)
{
free(retval);
BAIL_MACRO(ERR_OUT_OF_MEMORY, NULL);
} /* if */
retval->opaque = pi;
pi->filename = (char *) malloc(strlen(name) + 1);
if (pi->filename == NULL)
{
__PHYSFS_setError(ERR_OUT_OF_MEMORY);
goto QPAK_openArchive_failed;
} /* if */
if (!openQPak(name, forWriting, &fh))
goto QPAK_openArchive_failed;
if (!readui32(fh, &dirOffset))
goto QPAK_openArchive_failed;
if (!readui32(fh, &dirLength))
goto QPAK_openArchive_failed;
if (__PHYSFS_platformFileLength(fh) < dirOffset + dirLength)
goto QPAK_openArchive_failed;
strcpy(pi->filename, name);
pi->handle = fh;
pi->dirOffset = dirOffset;
pi->totalEntries = dirLength / 64;
pi->entries = (QPAKentry *) malloc(pi->totalEntries * sizeof (QPAKentry));
if (pi->entries == NULL)
{
__PHYSFS_setError(ERR_OUT_OF_MEMORY);
goto QPAK_openArchive_failed;
} /* if */
if (qpak_loadEntries(fh, dirOffset, pi->totalEntries, pi->entries) == 0)
goto QPAK_openArchive_failed;
__PHYSFS_sort(pi->entries, pi->totalEntries,
qpak_entry_cmp, qpak_entry_swap);
pi->root = qpak_newDirectory("");
if (pi->root == NULL)
goto QPAK_openArchive_failed;
if (qpak_populateDirectories(pi->entries, pi->totalEntries, pi->root) == 0)
goto QPAK_openArchive_failed;
retval->funcs = &__PHYSFS_DirFunctions_QPAK;
return(retval);
QPAK_openArchive_failed:
if (retval != NULL)
{
if (retval->opaque != NULL)
qpak_deletePakInfo((QPAKinfo *) retval->opaque);
free(retval);
} /* if */
if (fh != NULL)
__PHYSFS_platformClose(fh);
return(0);
} /* QPAK_openArchive */
static void QPAK_dirClose(DirHandle *dirHandle)
{
qpak_deletePakInfo((QPAKinfo *) dirHandle->opaque);
free(dirHandle);
} /* QPAK_dirClose */
static LinkedStringList *QPAK_enumerateFiles(DirHandle *h, const char *dirname,
int omitSymLinks)
{
LinkedStringList *retval = NULL, *p = NULL;
QPAKdirectory *dir;
QPAKinfo *info = (QPAKinfo *) h->opaque;
if ((dirname == NULL) || (*dirname == '\0'))
dir = info->root;
else
dir = qpak_findDirectory(info->root, dirname);
if (dir != NULL)
{
QPAKdirectory *child = dir->dirs;
QPAKdirentry *file = dir->files;
while (child != NULL)
{
retval = __PHYSFS_addToLinkedStringList(retval, &p, child->name, -1);
child = child->next;
} /* while */
while (file != NULL)
{
retval = __PHYSFS_addToLinkedStringList(retval, &p, file->name, -1);
file = file->next;
} /* while */
} /* if */
return(retval);
} /* QPAK_enumerateFiles */
static int QPAK_exists(DirHandle *h, const char *name)
{
QPAKinfo *driver = (QPAKinfo *) h->opaque;
if ((name == NULL) || (*name == '\0'))
return(0);
if (qpak_findDirectory(driver->root, name) != 0)
return(1);
if (qpak_findEntry(driver->root, name) != 0)
return(1);
return(0);
} /* QPAK_exists */
static int QPAK_isDirectory(DirHandle *h, const char *name, int *fileExists)
{
QPAKinfo *info = (QPAKinfo *) h->opaque;
*fileExists = (qpak_findDirectory(info->root, name) != 0);
return(*fileExists);
} /* QPAK_isDirectory */
static int QPAK_isSymLink(DirHandle *h, const char *name, int *fileExists)
{
*fileExists = QPAK_exists(h, name);
return(0); /* we don't support symlinks for now */
} /* QPAK_isSymlink */
static int QPAK_remove(DirHandle *h, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* QPAK_remove */
static int QPAK_mkdir(DirHandle *h, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* QPAK_mkdir */
static PHYSFS_sint64 QPAK_getLastModTime(DirHandle *h,
const char *name,
int *fileExists)
{
QPAKinfo *info = (QPAKinfo *) h->opaque;
PHYSFS_sint64 retval = -1;
*fileExists = QPAK_exists(h, name);
if (*fileExists)
retval = __PHYSFS_platformGetLastModTime(info->filename);
return(retval);
} /* QPAK_getLastModTime */
static void *qpak_getFileHandle(const char *name, QPAKentry *entry)
{
void *retval = __PHYSFS_platformOpenRead(name);
if (retval == NULL)
return(NULL);
if (!__PHYSFS_platformSeek(retval, entry->offset))
{
__PHYSFS_platformClose(retval);
return(NULL);
} /* if */
return(retval);
} /* qpak_getFileHandle */
static FileHandle *QPAK_openRead(DirHandle *h, const char *fnm, int *fileExists)
{
QPAKinfo *driver = (QPAKinfo *) h->opaque;
QPAKentry *entry = qpak_findEntry(driver->root, fnm);
QPAKfileinfo *fileDriver = 0;
FileHandle *result = 0;
*fileExists = (entry != NULL);
if (entry == NULL)
return(NULL);
fileDriver = (QPAKfileinfo *) malloc(sizeof (QPAKfileinfo));
BAIL_IF_MACRO(fileDriver == NULL, ERR_OUT_OF_MEMORY, NULL);
fileDriver->handle = qpak_getFileHandle(driver->filename, entry);
if (fileDriver->handle == NULL)
{
free(fileDriver);
return(NULL);
} /* if */
fileDriver->entry = entry;
fileDriver->curPos = 0;
result = (FileHandle *)malloc(sizeof (FileHandle));
if (result == NULL)
{
__PHYSFS_platformClose(fileDriver->handle);
free(fileDriver);
BAIL_MACRO(ERR_OUT_OF_MEMORY, NULL);
} /* if */
result->opaque = fileDriver;
result->dirHandle = h;
result->funcs = &__PHYSFS_FileFunctions_QPAK;
return(result);
} /* QPAK_openRead */
static FileHandle *QPAK_openWrite(DirHandle *h, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* QPAK_openWrite */
static FileHandle *QPAK_openAppend(DirHandle *h, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* QPAK_openAppend */
static PHYSFS_sint64 QPAK_read(FileHandle *handle, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) (handle->opaque);
QPAKentry *entry = finfo->entry;
PHYSFS_uint64 bytesLeft = entry->size - finfo->curPos;
PHYSFS_uint64 objsLeft = (bytesLeft / objSize);
PHYSFS_sint64 rc;
if (objsLeft < objCount)
objCount = (PHYSFS_uint32) objsLeft;
rc = __PHYSFS_platformRead(finfo->handle, buffer, objSize, objCount);
if (rc > 0)
finfo->curPos += (rc * objSize);
return(rc);
} /* QPAK_read */
static PHYSFS_sint64 QPAK_write(FileHandle *handle, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, -1);
} /* QPAK_write */
static int QPAK_eof(FileHandle *handle)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) (handle->opaque);
QPAKentry *entry = finfo->entry;
return(finfo->curPos >= (PHYSFS_sint64) entry->size);
} /* QPAK_eof */
static PHYSFS_sint64 QPAK_tell(FileHandle *handle)
{
return(((QPAKfileinfo *) handle->opaque)->curPos);
} /* QPAK_tell */
static int QPAK_seek(FileHandle *handle, PHYSFS_uint64 offset)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) handle->opaque;
QPAKentry *entry = finfo->entry;
PHYSFS_uint64 newPos = entry->offset + offset;
int rc;
BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0);
BAIL_IF_MACRO(newPos > entry->offset + entry->size, ERR_PAST_EOF, 0);
rc = __PHYSFS_platformSeek(finfo->handle, newPos);
if (rc)
finfo->curPos = offset;
return(rc);
} /* QPAK_seek */
static PHYSFS_sint64 QPAK_fileLength(FileHandle *handle)
{
return ((QPAKfileinfo *) handle->opaque)->entry->size;
} /* QPAK_fileLength */
static int QPAK_fileClose(FileHandle *handle)
{
QPAKfileinfo *finfo = (QPAKfileinfo *) handle->opaque;
BAIL_IF_MACRO(!__PHYSFS_platformClose(finfo->handle), NULL, 0);
free(finfo);
free(handle);
return(1);
} /* QPAK_fileClose */
#endif /* defined PHYSFS_SUPPORTS_QPAK */
/* end of qpak.c ... */

View File

@ -282,31 +282,6 @@ if test x$physfslang = xenglish; then
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_ENGLISH, [define desired natural language])
fi
if test x$physfslang = xrussian-koi8-r; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_KOI8_R, [define desired natural language])
fi
if test x$physfslang = xrussian-cp1251; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language])
fi
if test x$physfslang = xrussian-cp866; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language])
fi
if test x$physfslang = xrussian-iso-8859-5; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_ISO_8859_5, [define desired natural language])
fi
if test x$physfslang = xspanish; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_SPANISH, [define desired natural language])
fi
if test x$physfslang = xfrench; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_FRENCH, [define desired natural language])
@ -332,13 +307,8 @@ if test x$physfs_valid_lang = xno; then
AC_MSG_WARN([***])
AC_MSG_WARN([*** Currently known languages:])
AC_MSG_WARN([*** --enable-language=english])
AC_MSG_WARN([*** --enable-language=spanish])
AC_MSG_WARN([*** --enable-language=german])
AC_MSG_WARN([*** --enable-language=french])
AC_MSG_WARN([*** --enable-language=russian-koi8-r])
AC_MSG_WARN([*** --enable-language=russian-cp1251])
AC_MSG_WARN([*** --enable-language=russian-cp866])
AC_MSG_WARN([*** --enable-language=russian-iso-8859-5])
AC_MSG_WARN([***])
AC_MSG_ERROR([*** unsupported language. stop.])
fi

28
debian/copyright vendored
View File

@ -7,7 +7,27 @@ Upstream Author(s): Ryan Gordon <icculus@icculus.org>
This software is copyright (c) 2001-02 by Ryan Gordon, icculus.org.
You are free to distribute this software under the terms of the GNU Lesser
General Public License.
On Debian systems, the complete text of the GNU Lesser General Public License
can be found in the file `/usr/share/common-licenses/LGPL'.
This library is distributed under the terms of the zlib license:
Copyright (c) 2003 Ryan C. Gordon and others.
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from
the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Ryan C. Gordon <icculus@clutteredmind.org>

View File

@ -18,10 +18,11 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* \author Ryan C. Gordon.
*/

View File

@ -21,10 +21,11 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* \author Ryan C. Gordon.
*/

View File

@ -18,10 +18,11 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* \author Ryan C. Gordon.
*/

View File

@ -35,10 +35,11 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* \author Ryan C. Gordon.
*/

View File

@ -1,103 +0,0 @@
# $Id: installer.rb,v 1.1 2002/12/11 15:37:23 icculus Exp $
require 'rbconfig'
require 'find'
require 'ftools'
include Config
module Slimb
class Installer
def initialize target_dir = "", &user_skip
@user_skip = user_skip or proc {|f| false}
@version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
@libdir = File.join(CONFIG["libdir"], "ruby", @version)
@sitedir = CONFIG["sitedir"] || File.join(@libdir, "site_ruby")
@dest = File.join @sitedir, target_dir
File::makedirs @dest
File::chmod 0755, @dest, true
end
def skip? file
@user_skip[file] or
file[0] == ?. or file[-1] == ?~ or file[-1] == ?#
end
def install_dir dir
File::makedirs(File.join(@dest, dir))
File::chmod(0755, File.join(@dest, dir), true)
Dir.foreach(dir) {|file|
next if skip? file
if File.ftype(File.join(dir, file)) == "directory"
install_dir File.join(dir, file)
else
install_file File.join(dir, file)
end
}
end
def install_file file
if file =~ /\.so$/
install_so file
else
File::install file, File.join(@dest, file), 0644, true
end
end
def install_so file
File::install file, File.join(CONFIG["sitearchdir"], file), 0644, true
end
def uninstall_so file
file = File.join(CONFIG["sitearchdir"], file)
File::safe_unlink file
end
def install something
case something
when Array
something.each {|x|
install x if x.is_a? String
}
when String
if File.ftype(something) == "directory"
install_dir something
else
install_file something
end
end
end
def uninstall what = "*"
case what
when Array
files = what.map {|x| File.join(@dest, x)}
when String
files = Dir[File.join(@dest, what)]
end
files.each {|x|
# FIXME: recursive uninstall is a must
next if FileTest.directory? x
File::safe_unlink x
}
end
def run files, argv
if !argv.grep(/--uninstall/).empty?
uninstall files
else
install files
end
end
end
end
# self-installation
if $0 == __FILE__
$stderr.puts "Installing slimb installer..."
Slimb::Installer.new("slimb").install File.basename(__FILE__)
end

View File

@ -1,9 +0,0 @@
require 'mkmf'
$CFLAGS += `sdl-config --cflags`.chomp
$LDFLAGS += `sdl-config --libs`.chomp
have_library "physfs", "PHYSFS_init"
have_library "SDL", "SDL_AllocRW"
create_makefile "physfs_so"

View File

@ -1,7 +0,0 @@
#!/usr/local/bin/ruby
if __FILE__ == $0
require 'slimb/installer'
files = ["physfs.rb", "physfs_so.so"]
installer = Slimb::Installer.new.run files, ARGV
end

View File

@ -1,9 +0,0 @@
#!/bin/sh
ruby extconf.rb
make
cd ..
ruby installer.rb
cd physfs
ruby install.rb
cd test
ruby test_physfs.rb

View File

@ -1,121 +0,0 @@
#
# PhysicsFS - ruby interface
#
# Author: Ed Sinjiashvili (slimb@vlinkmail.com)
# License: LGPL
#
require 'physfs_so'
module PhysicsFS
class Version
def initialize major, minor, patch
@major = major
@minor = minor
@patch = patch
end
attr_reader :major, :minor, :patch
def to_s
"#@major.#@minor.#@patch"
end
end
class ArchiveInfo
def initialize ext, desc, author, url
@extension = ext
@description = desc
@author = author
@url = url
end
attr_reader :extension, :description
attr_reader :author, :url
def to_s
" * #@extension: #@description\n Written by #@author.\n #@url\n"
end
end
#
# convenience methods
#
class << self
def init argv0 = $0
init_internal argv0
end
def append_search_path str
add_to_search_path str, 1
self
end
def prepend_search_path str
add_to_search_path str, 0
self
end
alias_method :<<, :append_search_path
alias_method :push, :append_search_path
alias_method :unshift, :prepend_search_path
def ls path = ""
enumerate path
end
end
#
# File - PhysicsFS abstract file - can be drawn from various sources
#
class File
def write_str str
write str, 1, str.length
end
def cat
prev_pos = tell
seek 0
r = read length, 1
seek prev_pos
r
end
alias_method :size, :length
end
#
# RWops - general stdio like operations on file-like creatures
#
class RWops
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
# tell current position of RWopted entity
def tell
seek 0, SEEK_CUR
end
# length of RWops abstracted entity
def length
cur = tell
r = seek 0, SEEK_END
seek cur, SEEK_SET
r
end
alias_method :size, :length
#
# create rwops from PhysicsFS file object
#
def self.from_physfs file
file.to_rwops
end
end
end
# physfs.rb ends here #

View File

@ -1,192 +0,0 @@
/*
* This code provides a glue layer between PhysicsFS and Simple Directmedia
* Layer's (SDL) RWops i/o abstraction.
*
* License: this code is public domain. I make no warranty that it is useful,
* correct, harmless, or environmentally safe.
*
* This particular file may be used however you like, including copying it
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
*
* SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
*
* This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
*/
#include <stdio.h> /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */
#include "physfsrwops.h"
static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
int pos = 0;
if (whence == SEEK_SET)
{
pos = offset;
} /* if */
else if (whence == SEEK_CUR)
{
PHYSFS_sint64 current = PHYSFS_tell(handle);
if (current == -1)
{
SDL_SetError("Can't find position in file: %s",
PHYSFS_getLastError());
return(-1);
} /* if */
pos = (int) current;
if ( ((PHYSFS_sint64) pos) != current )
{
SDL_SetError("Can't fit current file position in an int!");
return(-1);
} /* if */
if (offset == 0) /* this is a "tell" call. We're done. */
return(pos);
pos += offset;
} /* else if */
else if (whence == SEEK_END)
{
PHYSFS_sint64 len = PHYSFS_fileLength(handle);
if (len == -1)
{
SDL_SetError("Can't find end of file: %s", PHYSFS_getLastError());
return(-1);
} /* if */
pos = (int) len;
if ( ((PHYSFS_sint64) pos) != len )
{
SDL_SetError("Can't fit end-of-file position in an int!");
return(-1);
} /* if */
pos += offset;
} /* else if */
else
{
SDL_SetError("Invalid 'whence' parameter.");
return(-1);
} /* else */
if ( pos < 0 )
{
SDL_SetError("Attempt to seek past start of file.");
return(-1);
} /* if */
if (!PHYSFS_seek(handle, (PHYSFS_uint64) pos))
{
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
return(-1);
} /* if */
return(pos);
} /* physfsrwops_seek */
static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
if (rc != maxnum)
{
if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
} /* if */
return((int) rc);
} /* physfsrwops_read */
static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_write(handle, ptr, size, num);
if (rc != num)
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
return((int) rc);
} /* physfsrwops_write */
static int physfsrwops_close(SDL_RWops *rw)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
if (!PHYSFS_close(handle))
{
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
return(-1);
} /* if */
SDL_FreeRW(rw);
return(0);
} /* physfsrwops_close */
static SDL_RWops *create_rwops(PHYSFS_file *handle)
{
SDL_RWops *retval = NULL;
if (handle == NULL)
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
else
{
retval = SDL_AllocRW();
if (retval != NULL)
{
retval->seek = physfsrwops_seek;
retval->read = physfsrwops_read;
retval->write = physfsrwops_write;
retval->close = physfsrwops_close;
retval->hidden.unknown.data1 = handle;
} /* if */
} /* else */
return(retval);
} /* create_rwops */
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle)
{
SDL_RWops *retval = NULL;
if (handle == NULL)
SDL_SetError("NULL pointer passed to PHYSFSRWOPS_makeRWops().");
else
retval = create_rwops(handle);
return(retval);
} /* PHYSFSRWOPS_makeRWops */
SDL_RWops *PHYSFSRWOPS_openRead(const char *fname)
{
return(create_rwops(PHYSFS_openRead(fname)));
} /* PHYSFSRWOPS_openRead */
SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname)
{
return(create_rwops(PHYSFS_openWrite(fname)));
} /* PHYSFSRWOPS_openWrite */
SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname)
{
return(create_rwops(PHYSFS_openAppend(fname)));
} /* PHYSFSRWOPS_openAppend */
/* end of physfsrwops.c ... */

View File

@ -1,87 +0,0 @@
/*
* This code provides a glue layer between PhysicsFS and Simple Directmedia
* Layer's (SDL) RWops i/o abstraction.
*
* License: this code is public domain. I make no warranty that it is useful,
* correct, harmless, or environmentally safe.
*
* This particular file may be used however you like, including copying it
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
*
* SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
*
* This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
*/
#ifndef _INCLUDE_PHYSFSRWOPS_H_
#define _INCLUDE_PHYSFSRWOPS_H_
#include "physfs.h"
#include "SDL.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Open a platform-independent filename for reading, and make it accessible
* via an SDL_RWops structure. The file will be closed in PhysicsFS when the
* RWops is closed. PhysicsFS should be configured to your liking before
* opening files through this method.
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
* of the error can be gleaned from PHYSFS_getLastError().
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
/**
* Open a platform-independent filename for writing, and make it accessible
* via an SDL_RWops structure. The file will be closed in PhysicsFS when the
* RWops is closed. PhysicsFS should be configured to your liking before
* opening files through this method.
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
* of the error can be gleaned from PHYSFS_getLastError().
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
/**
* Open a platform-independent filename for appending, and make it accessible
* via an SDL_RWops structure. The file will be closed in PhysicsFS when the
* RWops is closed. PhysicsFS should be configured to your liking before
* opening files through this method.
*
* @param filename File to open in platform-independent notation.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
* of the error can be gleaned from PHYSFS_getLastError().
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
/**
* Make a SDL_RWops from an existing PhysicsFS file handle. You should
* dispose of any references to the handle after successful creation of
* the RWops. The actual PhysicsFS handle will be destroyed when the
* RWops is closed.
*
* @param handle a valid PhysicsFS file handle.
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
* of the error can be gleaned from PHYSFS_getLastError().
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
#ifdef __cplusplus
}
#endif
#endif /* include-once blocker */
/* end of physfsrwops.h ... */

View File

@ -1,462 +0,0 @@
/*
* PhysicsFS - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#include "physfs.h"
#include "ruby.h"
#include "rb_physfs.h"
#include "rb_physfs_file.h"
VALUE modulePhysfs;
/*
* PhysicsFS::init str
*
* initialize PhysicsFS
*/
VALUE physfs_init (VALUE self, VALUE str)
{
int result = PHYSFS_init (STR2CSTR(str));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::deinit
*/
VALUE physfs_deinit (VALUE self)
{
if (PHYSFS_deinit ())
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::version
*
* return PhysicsFS::Version object
*/
VALUE physfs_version (VALUE self)
{
char evalStr[200];
PHYSFS_Version ver;
PHYSFS_getLinkedVersion (&ver);
sprintf (evalStr, "PhysicsFS::Version.new %d, %d, %d",
ver.major, ver.minor, ver.patch);
return rb_eval_string (evalStr);
}
/*
* PhysicsFS::supported_archives
*
* return Array of PhysicsFS::ArchiveInfo objects
*/
VALUE physfs_supported_archives (VALUE self)
{
const PHYSFS_ArchiveInfo **info = PHYSFS_supportedArchiveTypes();
VALUE klass = rb_const_get (modulePhysfs, rb_intern ("ArchiveInfo"));
VALUE ary = rb_ary_new ();
VALUE params[4];
while ( *info != 0 )
{
params[0] = rb_str_new2 ((*info)->extension);
params[1] = rb_str_new2 ((*info)->description);
params[2] = rb_str_new2 ((*info)->author);
params[3] = rb_str_new2 ((*info)->url);
rb_ary_push (ary, rb_class_new_instance (4, params, klass));
info++;
}
return ary;
}
/*
* PhysicsFS::last_error
*
* return string representation of last PhysicsFS error
*/
VALUE physfs_last_error (VALUE self)
{
const char *last_error = PHYSFS_getLastError ();
if (last_error == 0)
last_error = "";
return rb_str_new2 (last_error);
}
/*
* PhysicsFS::dir_separator
*
* return platform directory separator
*/
VALUE physfs_dir_separator (VALUE self)
{
return rb_str_new2 (PHYSFS_getDirSeparator ());
}
/*
* PhysicsFS::permit_symlinks boolValue
*
* turn symlinks support on/off
*/
VALUE physfs_permit_symlinks (VALUE self, VALUE allow)
{
int p = 1;
if (allow == Qfalse || allow == Qnil)
p = 0;
PHYSFS_permitSymbolicLinks (p);
return Qtrue;
}
/*
* PhysicsFS::cdrom_dirs
*
* return Array of strings containing available CDs
*/
VALUE physfs_cdrom_dirs (VALUE self)
{
char **cds = PHYSFS_getCdRomDirs();
char **i;
VALUE ary = rb_ary_new ();
for (i = cds; *i != 0; i++)
rb_ary_push (ary, rb_str_new2 (*i));
PHYSFS_freeList (cds);
return ary;
}
/*
* PhysicsFS::base_dir
*
* return base directory
*/
VALUE physfs_base_dir (VALUE self)
{
const char *base_dir = PHYSFS_getBaseDir ();
if (base_dir == 0)
base_dir = "";
return rb_str_new2 (base_dir);
}
/*
* PhysicsFS::user_dir
*
* return user directory
*/
VALUE physfs_user_dir (VALUE self)
{
const char *user_dir = PHYSFS_getBaseDir ();
if (user_dir == 0)
user_dir = "";
return rb_str_new2 (user_dir);
}
/*
* PhysicsFS::write_dir
*
* return write directory
*/
VALUE physfs_write_dir (VALUE self)
{
const char *write_dir = PHYSFS_getWriteDir ();
if (write_dir == 0)
return Qnil;
return rb_str_new2 (write_dir);
}
/*
* PhysicsFS::write_dir= str
*
* set write directory to *str*
*/
VALUE physfs_set_write_dir (VALUE self, VALUE str)
{
int result = PHYSFS_setWriteDir (STR2CSTR(str));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::add_to_search_path str, append
*
* if append > 0 - append str to search path, otherwise prepend it
*/
VALUE physfs_add_search_path (VALUE self, VALUE str, VALUE append)
{
int result = PHYSFS_addToSearchPath (STR2CSTR(str), FIX2INT(append));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::remove_from_search_path str
*
* removes str from search path
*/
VALUE physfs_remove_search_path (VALUE self, VALUE str)
{
int result = PHYSFS_removeFromSearchPath (STR2CSTR(str));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::search_path
*
* return current search_path - as array of strings
*/
VALUE physfs_search_path (VALUE self)
{
char **path = PHYSFS_getSearchPath ();
char **i;
VALUE ary = rb_ary_new ();
for (i = path ; *i != 0; i++)
rb_ary_push (ary, rb_str_new2 (*i));
PHYSFS_freeList (path);
return ary;
}
//
VALUE physfs_setSaneConfig(VALUE self, VALUE org, VALUE app, VALUE ext,
VALUE includeCdroms, VALUE archivesFirst)
{
int res = PHYSFS_setSaneConfig (STR2CSTR(org), STR2CSTR(app), STR2CSTR(ext),
RTEST(includeCdroms), RTEST(archivesFirst));
if (res)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::mkdir newdir
*
* create new directory
*/
VALUE physfs_mkdir (VALUE self, VALUE newdir)
{
int result = PHYSFS_mkdir (STR2CSTR(newdir));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::delete name
*
* delete file with name
*/
VALUE physfs_delete (VALUE self, VALUE name)
{
int result = PHYSFS_delete (STR2CSTR(name));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::real_dir name
*
* return real directory (in search path) of a name
*/
VALUE physfs_real_dir (VALUE self, VALUE name)
{
const char *path = PHYSFS_getRealDir (STR2CSTR(name));
if (path == 0)
return Qnil;
return rb_str_new2 (path);
}
/*
* PhysicsFS::enumerate dir
*
* list a dir from a search path
*/
VALUE physfs_enumerate (VALUE self, VALUE dir)
{
char **files = PHYSFS_enumerateFiles (STR2CSTR(dir));
char **i;
VALUE ary = rb_ary_new ();
for (i = files; *i != 0; i++)
rb_ary_push (ary, rb_str_new2 (*i));
PHYSFS_freeList (files);
return ary;
}
/*
* PhysicsFS::exists? name
*
* does a file with name exist?
*/
VALUE physfs_exists (VALUE self, VALUE name)
{
int result = PHYSFS_exists (STR2CSTR(name));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::is_directory? name
*
* return true if name is directory
*/
VALUE physfs_is_directory (VALUE self, VALUE name)
{
int result = PHYSFS_isDirectory (STR2CSTR(name));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::is_symlink? name
*
* return true if name is symlink
*/
VALUE physfs_is_symlink (VALUE self, VALUE name)
{
int result = PHYSFS_isSymbolicLink (STR2CSTR(name));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::last_mod_time name
*
* return last modification time of a file
*/
VALUE physfs_last_mod_time (VALUE self, VALUE name)
{
int result = PHYSFS_getLastModTime (STR2CSTR(name));
return INT2FIX(result);
}
/*
* PhysicsFS::open_read name
*
* return +PhysicsFS::File+ ready for reading
*/
VALUE physfs_open_read (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openRead (STR2CSTR(name));
return physfs_file_new (file);
}
/*
* PhysicsFS::open_write name
*
* return PhysicsFS::File ready for writing
*/
VALUE physfs_open_write (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openWrite (STR2CSTR(name));
return physfs_file_new (file);
}
/*
* PhysicsFS::open_append name
*
* return PhysicsFS::File ready for appending
*/
VALUE physfs_open_append (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openAppend (STR2CSTR(name));
return physfs_file_new (file);
}
void Init_physfs_so (void)
{
modulePhysfs = rb_define_module ("PhysicsFS");
rb_define_singleton_method (modulePhysfs, "init_internal", physfs_init, 1);
rb_define_singleton_method (modulePhysfs, "deinit", physfs_deinit, 0);
rb_define_singleton_method (modulePhysfs, "version", physfs_version, 0);
rb_define_singleton_method (modulePhysfs, "supported_archives",
physfs_supported_archives, 0);
rb_define_singleton_method (modulePhysfs, "last_error",
physfs_last_error, 0);
rb_define_singleton_method (modulePhysfs, "dir_separator",
physfs_dir_separator, 0);
rb_define_singleton_method (modulePhysfs, "permit_symlinks",
physfs_permit_symlinks, 1);
rb_define_singleton_method (modulePhysfs, "cdrom_dirs",
physfs_cdrom_dirs, 0);
rb_define_singleton_method (modulePhysfs, "base_dir", physfs_base_dir, 0);
rb_define_singleton_method (modulePhysfs, "user_dir", physfs_user_dir, 0);
rb_define_singleton_method (modulePhysfs, "write_dir", physfs_write_dir, 0);
rb_define_singleton_method (modulePhysfs, "write_dir=",
physfs_set_write_dir, 1);
rb_define_singleton_method (modulePhysfs, "add_to_search_path",
physfs_add_search_path, 2);
rb_define_singleton_method (modulePhysfs, "remove_from_search_path",
physfs_remove_search_path, 1);
rb_define_singleton_method (modulePhysfs, "search_path",
physfs_search_path, 0);
rb_define_singleton_method (modulePhysfs, "set_sane_config",
physfs_setSaneConfig, 5);
rb_define_singleton_method (modulePhysfs, "mkdir", physfs_mkdir, 1);
rb_define_singleton_method (modulePhysfs, "delete", physfs_delete, 1);
rb_define_singleton_method (modulePhysfs, "real_dir",
physfs_real_dir, 1);
rb_define_singleton_method (modulePhysfs, "enumerate", physfs_enumerate, 1);
rb_define_singleton_method (modulePhysfs, "exists?", physfs_exists, 1);
rb_define_singleton_method (modulePhysfs, "is_directory?",
physfs_is_directory, 1);
rb_define_singleton_method (modulePhysfs, "is_symlink?",
physfs_is_symlink, 1);
rb_define_singleton_method (modulePhysfs, "last_mod_time",
physfs_last_mod_time, 1);
rb_define_singleton_method (modulePhysfs, "open_read",
physfs_open_read, 1);
rb_define_singleton_method (modulePhysfs, "open_write",
physfs_open_write, 1);
rb_define_singleton_method (modulePhysfs, "open_append",
physfs_open_append, 1);
init_physfs_file ();
init_sdl_rwops ();
}
/*
// Local Variables:
// mode: C
// c-indentation-style: "stroustrup"
// indent-tabs-mode: nil
// End:
*/

View File

@ -1,13 +0,0 @@
/*
* PhysicsFS - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#ifndef __RB__PHYSFS__H__
#define __RB__PHYSFS__H__
extern VALUE modulePhysfs;
#endif

View File

@ -1,226 +0,0 @@
/*
* PhysicsFS File abstraction - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#include "physfs.h"
#include "ruby.h"
#include "rb_physfs.h"
#include "rb_physfs_file.h"
#include "physfsrwops.h"
VALUE classPhysfsFile;
/*
* construct new PhysicsFS::File object
*/
VALUE physfs_file_new (PHYSFS_file *file)
{
if (file == 0)
return Qnil;
return Data_Wrap_Struct (classPhysfsFile, 0, 0, file);
}
/*
* PhysicsFS::File#close
*
* Close the file. It's illegal to use the object after its closure.
*/
VALUE physfs_file_close (VALUE self)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qfalse;
result = PHYSFS_close (file);
DATA_PTR(self) = 0;
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::File#read obj_size, num_objects
*
* Read *objCount* objects which are *objSize* each.
* return String instance containing raw data or nil if failure.
* #length of string will reflect real number of objects read.
*/
VALUE physfs_file_read (VALUE self, VALUE objSize, VALUE objCount)
{
int objRead;
void *buffer;
VALUE result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil; //wasted file - no read possible
buffer = malloc (FIX2UINT(objSize) * FIX2UINT(objCount));
if (buffer == 0)
return Qnil;
objRead = PHYSFS_read (file, buffer, FIX2UINT(objSize), FIX2UINT(objCount));
if (objRead == -1)
{
free (buffer);
return Qnil;
}
result = rb_str_new (buffer, objRead * FIX2UINT(objSize));
free (buffer);
return result;
}
/*
* PhysicsFS::File#write buffer, obj_size, num_objects
*
* return nil on failure or number of objects written.
*/
VALUE physfs_file_write (VALUE self, VALUE buf, VALUE objSize, VALUE objCount)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
result = PHYSFS_write (file, STR2CSTR(buf),
FIX2UINT(objSize), FIX2UINT(objCount));
if (result == -1)
return Qnil;
return INT2FIX(result);
}
/*
* PhysicsFS::File#eof?
*/
VALUE physfs_file_eof (VALUE self)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
result = PHYSFS_eof (file);
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::File#tell
*
* tells current position in file
*/
VALUE physfs_file_tell (VALUE self)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
result = PHYSFS_tell (file);
if (result == -1)
return Qnil;
return INT2FIX(result);
}
/*
* PhysicsFS::File#seek pos
*
* seek to pos in file
*/
VALUE physfs_file_seek (VALUE self, VALUE pos)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
result = PHYSFS_seek (file, FIX2LONG(pos));
if (result)
return Qtrue;
return Qfalse;
}
/*
* PhysicsFS::File#length
*/
VALUE physfs_file_length (VALUE self)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
result = PHYSFS_fileLength (file);
if (result == -1)
return Qnil;
return INT2FIX(result);
}
/*
* PhysicsFS::File#to_rwops
*
* File object is converted to RWops object.
* File object becomes unusable after that - every operation
* should be done through new-born RWops object.
*/
VALUE physfs_file_to_rwops (VALUE self)
{
PHYSFS_file *file;
SDL_RWops *rwops;
Data_Get_Struct (self, PHYSFS_file, file);
if (file == 0)
return Qnil;
rwops = PHYSFSRWOPS_makeRWops (file);
if (rwops == 0)
return Qnil;
DATA_PTR(self) = 0; // oh, gosh, we've sacrificed ourselves!
return sdl_rwops_new (rwops);
}
void init_physfs_file (void)
{
classPhysfsFile = rb_define_class_under (modulePhysfs, "File", rb_cObject);
rb_define_method (classPhysfsFile, "close", physfs_file_close, 0);
rb_define_method (classPhysfsFile, "eof?", physfs_file_eof, 0);
rb_define_method (classPhysfsFile, "tell", physfs_file_tell, 0);
rb_define_method (classPhysfsFile, "seek", physfs_file_seek, 1);
rb_define_method (classPhysfsFile, "length", physfs_file_length, 0);
rb_define_method (classPhysfsFile, "read", physfs_file_read, 2);
rb_define_method (classPhysfsFile, "write", physfs_file_write, 3);
rb_define_method (classPhysfsFile, "to_rwops", physfs_file_to_rwops, 0);
}

View File

@ -1,24 +0,0 @@
/*
* PhysicsFS File abstraction - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#ifndef __RB__PHYSFS__FILE__H__
#define __RB__PHYSFS__FILE__H__
extern VALUE classPhysfsFile;
VALUE physfs_file_new (PHYSFS_file *file);
VALUE physfs_file_close (VALUE self);
VALUE physfs_file_read (VALUE self, VALUE objSize, VALUE objCount);
VALUE physfs_file_write (VALUE self, VALUE buf, VALUE objSize, VALUE objCount);
VALUE physfs_file_eof (VALUE self);
VALUE physfs_file_tell (VALUE self);
VALUE physfs_file_seek (VALUE self, VALUE pos);
VALUE physfs_file_length (VALUE self);
void init_physfs_file (void);
#endif

View File

@ -1,162 +0,0 @@
/*
* SDL_RWops - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#include "SDL_rwops.h"
#include "ruby.h"
#include "rb_physfs.h"
#include "rb_sdl_rwops.h"
VALUE classRWops;
/*
* RWops constructor
*/
VALUE sdl_rwops_new (SDL_RWops *ops)
{
VALUE result;
if (ops == 0)
return Qnil;
result = Data_Wrap_Struct (classRWops, 0, SDL_FreeRW, ops);
return result;
}
/*
* PhysicsFS::RWops::from_file name, mode
*
* create RWops object from file
*/
VALUE sdl_rwops_from_file (VALUE self, VALUE name, VALUE mode)
{
SDL_RWops *ops = SDL_RWFromFile(STR2CSTR(name), STR2CSTR(mode));
return sdl_rwops_new (ops);
}
/*
* PhysicsFS::RWops::from_memory string
*
* create RWops object from memory
*/
VALUE sdl_rwops_from_mem (VALUE self, VALUE str)
{
int len = RSTRING(str)->len;
void *mem = STR2CSTR(str);
SDL_RWops *ops = SDL_RWFromMem(mem, len);
return sdl_rwops_new (ops);
}
/*
* PhysicsFS::RWops#seek offset, whence
*
* position RWops object
*/
VALUE sdl_rwops_seek (VALUE self, VALUE offset, VALUE whence)
{
int result;
SDL_RWops *ops;
Data_Get_Struct (self, SDL_RWops, ops);
if (ops == 0)
return Qnil;
result = SDL_RWseek(ops, FIX2INT(offset), FIX2INT(whence));
return INT2FIX(result);
}
/*
* PhysicsFS::RWops#close
*
* close RWops. No use of the object is possible after that.
*/
VALUE sdl_rwops_close (VALUE self)
{
int result;
SDL_RWops *ops;
Data_Get_Struct (self, SDL_RWops, ops);
if (ops == 0)
return Qnil;
result = SDL_RWclose (ops);
DATA_PTR(self) = 0;
return INT2FIX(result);
}
/*
* PhysicsFS::RWops#read
*
* read from RWops object objCount objSize'd entities.
* return string containing raw data or nil
*/
VALUE sdl_rwops_read (VALUE self, VALUE objSize, VALUE objCount)
{
int objRead;
void *buffer;
VALUE result;
SDL_RWops *ops;
Data_Get_Struct (self, SDL_RWops, ops);
if (ops == 0)
return Qnil;
buffer = malloc (FIX2UINT(objSize) * FIX2UINT(objCount));
if (buffer == 0)
return Qnil;
objRead = SDL_RWread (ops, buffer, FIX2UINT(objSize), FIX2UINT(objCount));
if (objRead == -1)
{
free (buffer);
return Qnil;
}
result = rb_str_new (buffer, objRead * FIX2UINT(objSize));
free (buffer);
return result;
}
/*
* PhysicsFS::RWops#write buffer, size, n
*
* write raw string containing n objects size length each.
* return number of objects written or nil
*/
VALUE sdl_rwops_write (VALUE self, VALUE buffer, VALUE size, VALUE n)
{
int result;
SDL_RWops *ops;
Data_Get_Struct (self, SDL_RWops, ops);
if (ops == 0)
return Qnil;
result = SDL_RWwrite (ops, STR2CSTR(buffer), FIX2INT(size), FIX2INT(n));
if (result == -1)
return Qnil;
return INT2FIX(result);
}
void init_sdl_rwops (void)
{
classRWops = rb_define_class_under (modulePhysfs, "RWops", rb_cObject);
rb_define_method (classRWops, "seek", sdl_rwops_seek, 2);
rb_define_method (classRWops, "read", sdl_rwops_read, 2);
rb_define_method (classRWops, "write", sdl_rwops_write, 3);
rb_define_method (classRWops, "close", sdl_rwops_close, 0);
rb_define_singleton_method (classRWops, "from_file",
sdl_rwops_from_file, 2);
rb_define_singleton_method (classRWops, "from_memory",
sdl_rwops_from_mem, 1);
}

View File

@ -1,16 +0,0 @@
/*
* SDL_RWops - ruby interface
*
* Author:: Ed Sinjiashvili (slimb@vlinkmail.com)
* License:: LGPL
*/
#ifndef __RB__SDL__RWOPS__H__
#define __RB__SDL__RWOPS__H__
extern VALUE classRWops;
VALUE sdl_rwops_new (SDL_RWops *ops);
void init_sdl_rwops (void);
#endif

View File

@ -1,358 +0,0 @@
#
# PhysicsFS test program - mimics real physfs_test
#
require 'readline'
require 'physfs'
def die msg
puts "#{msg} - reason: #{PhysicsFS.last_error}"
end
#
# parse line to command and args
#
def parse line
return false if line.nil?
if line.strip =~ /^(.*?) (?: (?:\s+(.*)) | $)/x
run $1, $2
else
false
end
end
#
# parse command args
#
def parse_args args
args.strip!
dquoted = /^ " (.*?) "/x
squoted = /^ ' (.*?) '/x
unquoted = /^([^\s\'\"]+)/
regexps = [dquoted, squoted, unquoted]
result = []
while args != ""
regexps.each do |r|
if args =~ r
result << $1
args.sub! r, ""
args.sub!(/\s+/, "")
break
end
end
end
result
end
def usage cmd, prefix = "usage: "
print prefix
args = Commands::HELP[cmd]
if args
print cmd
args.scan(/\w+/).each {|x|
print " <#{x}>"
}
puts
else
puts %|#{cmd} (no arguments)|
end
end
# commands go below
module Commands
HELP = {
"init" => "argv0",
"addarchive" => "archiveLocation append",
"removearchive" => "archiveLocation",
"enumerate" => "dirToEnumerate",
"ls" => "dirToEnumerate",
"setwritedir" => "newWriteDir",
"permitsymlinks" => "1or0",
"setsaneconfig" => "org appName arcExt includeCdRoms archivesFirst",
"mkdir" => "dirToMk",
"delete" => "dirToDelete",
"getrealdir" => "fileToFind",
"exists" => "fileToCheck",
"isdir" => "fileToCheck",
"issymlink" => "fileToCheck",
"cat" => "fileToCat",
"filelength" => "fileToCheck",
"append" => "fileToAppend",
"write" => "fileToCreateOrTrash",
"getlastmodtime" => "fileToExamine"
}
def quit_cmd
exit
end
alias q_cmd quit_cmd
def help_cmd
commands = ::Commands.instance_methods.grep(/_cmd$/).sort
puts "Commands:"
commands.each do |c|
usage c.sub("_cmd", ""), " - "
end
true
end
def e val
if val
puts "Successful."
else
puts "Failure. reason: #{PhysicsFS.last_error}"
end
true
end
def init_cmd arg
e PhysicsFS.init(arg)
end
def deinit_cmd
e PhysicsFS.deinit
end
def addarchive_cmd archive, append
e PhysicsFS.add_to_search_path(archive, append)
end
def removearchive_cmd archive
e PhysicsFS.remove_from_search_path archive
end
def enumerate_cmd path
entries = PhysicsFS.enumerate(path)
entries.each {|x|
puts x
}
true
end
alias ls_cmd enumerate_cmd
def getlasterror_cmd
puts "Last error is [#{PhysicsFS.last_error}]"
true
end
def getdirsep_cmd
puts "Directory separator is [#{PhysicsFS.dir_separator}]"
true
end
def getcdromdirs_cmd
dirs = PhysicsFS.cdrom_dirs
dirs.each {|x|
puts x
}
puts " total [#{dirs.length}] drives."
true
end
def getsearchpath_cmd
spath = PhysicsFS.search_path
spath.each {|x|
puts x
}
puts "total [#{spath.length}] directories."
true
end
def getbasedir_cmd
dir = PhysicsFS.base_dir
puts dir if dir
true
end
def getuserdir_cmd
puts PhysicsFS.user_dir
true
end
def getwritedir_cmd
dir = PhysicsFS.write_dir
if dir
puts "Write directory is [#{dir}]."
else
puts "No write directory defined."
end
true
end
def setwritedir_cmd dir
e(PhysicsFS.write_dir = dir)
end
def permitsymlinks_cmd val
if val.to_i == 1
PhysicsFS.permit_symlinks true
puts "Symlinks are now permitted"
else
PhysicsFS.permit_symlinks false
puts "Symlinks are now forbidden"
end
true
end
def setsaneconfig_cmd org, appname, ext, includeCdroms, archivesFirst
includeCdroms = includeCdroms.to_i == 1
archiveFirst = archivesFirst == 1
e PhysicsFS.set_sane_config(org, appname, ext, includeCdroms, archivesFirst)
end
def mkdir_cmd dir
e PhysicsFS.mkdir(dir)
end
def delete_cmd dir
e PhysicsFS.delete(dir)
end
def getrealdir_cmd file
dir = PhysicsFS.real_dir file
if dir
puts "Found at [#{dir}]"
else
puts "Not found."
end
true
end
def exists_cmd file
if PhysicsFS.exists? file
puts "File exists"
else
puts "File does not exist"
end
true
end
def isdir_cmd file
if PhysicsFS.is_directory? file
puts "File is a directory"
else
puts "File is NOT a directory"
end
true
end
def issymlink_cmd file
if PhysicsFS.is_symlink? file
puts "File is a symlink"
else
puts "File is NOT a symlink"
end
true
end
def cat_cmd filename
file = PhysicsFS.open_read filename
if file.nil?
puts "failed to open. reason: #{PhysicsFS.last_error}"
return true
end
puts file.cat
true
end
def filelength_cmd filename
file = PhysicsFS.open_read filename
if file.nil?
puts "failed to open. reason: #{PhysicsFS.last_error}"
return true
end
puts file.length
file.close
true
end
WRITE_STR = "Rubyfied PhysicsFS works just fine.\n\n"
def append_cmd filename
file = PhysicsFS.open_append filename
if file.nil?
puts "failed to open. reason: #{PhysicsFS.last_error}"
return true
end
file.write WRITE_STR, 1, WRITE_STR.length
file.close
true
end
def write_cmd filename
file = PhysicsFS.open_write filename
if file.nil?
puts "failed to open. reason: #{PhysicsFS.last_error}"
return true
end
file.write_str WRITE_STR
file.close
true
end
def getlastmodtime_cmd filename
t = PhysicsFS.last_mod_time filename
if t == -1
puts "failed to determin. reason: #{PhysicsFS.last_error}"
else
puts "Last modified: #{Time.at(t)}"
end
true
end
end
include Commands
def run command, args
if args
args = parse_args args
else
args = []
end
begin
cmd = method "#{command}_cmd"
if args.length == cmd.arity
return cmd.call *args
else
usage command
true
end
rescue NameError
puts 'Unknown command. Enter "help" for instructions.'
true
end
end
if __FILE__ == $0
PhysicsFS.init($0) or die "PhysicsFS init failed"
puts "PhysicsFS version: #{PhysicsFS.version}"
puts
puts "Supported archives: "
puts PhysicsFS.supported_archives
puts
puts 'Enter commands. Enter "help" for instructions.'
loop {
line = Readline::readline "physfs_rb> ", true
break unless parse line
}
end

View File

@ -23,10 +23,11 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
*/

View File

@ -9,12 +9,13 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
* SDL falls under the LGPL license. You can get SDL at http://www.libsdl.org/
*
* This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
*/

View File

@ -9,12 +9,13 @@
* verbatim into a closed-source project, exploiting it commercially, and
* removing any trace of my name from the source (although I hope you won't
* do that). I welcome enhancements and corrections to this file, but I do
* not require you to send me patches if you make changes.
* not require you to send me patches if you make changes. This code has
* NO WARRANTY.
*
* Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
* General Public License: http://www.gnu.org/licenses/lgpl.txt
* Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
* Please see LICENSE in the root of the source tree.
*
* SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
* SDL falls under the LGPL license. You can get SDL at http://www.libsdl.org/
*
* This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
*/

View File

@ -69,11 +69,6 @@ extern const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_MVL;
extern const DirFunctions __PHYSFS_DirFunctions_MVL;
#endif
#if (defined PHYSFS_SUPPORTS_QPAK)
extern const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_QPAK;
extern const DirFunctions __PHYSFS_DirFunctions_QPAK;
#endif
extern const DirFunctions __PHYSFS_DirFunctions_DIR;
@ -95,10 +90,6 @@ static const PHYSFS_ArchiveInfo *supported_types[] =
&__PHYSFS_ArchiveInfo_MVL,
#endif
#if (defined PHYSFS_SUPPORTS_QPAK)
&__PHYSFS_ArchiveInfo_QPAK,
#endif
NULL
};
@ -120,10 +111,6 @@ static const DirFunctions *dirFunctions[] =
&__PHYSFS_DirFunctions_MVL,
#endif
#if (defined PHYSFS_SUPPORTS_QPAK)
&__PHYSFS_DirFunctions_QPAK,
#endif
&__PHYSFS_DirFunctions_DIR,
NULL
};

View File

@ -8,7 +8,7 @@ Name: %{name}
Version: %{version}
Release: %{release}
Prefix: %{prefix}
Copyright: GNU Lesser General Public License (LGPL)
Copyright: zlib license
Group: System Environment/Libraries
URL: http://www.icculus/physfs/
Source: physfs-%{version}.tar.gz

View File

@ -35,11 +35,6 @@ extern "C" {
#endif
#define PHYSFS_LANG_ENGLISH 1 /* English by Ryan C. Gordon */
#define PHYSFS_LANG_RUSSIAN_KOI8_R 2 /* Russian by Ed Sinjiashvili */
#define PHYSFS_LANG_RUSSIAN_CP1251 3 /* Russian by Ed Sinjiashvili */
#define PHYSFS_LANG_RUSSIAN_CP866 4 /* Russian by Ed Sinjiashvili */
#define PHYSFS_LANG_RUSSIAN_ISO_8859_5 5 /* Russian by Ed Sinjiashvili */
#define PHYSFS_LANG_SPANISH 6 /* Spanish by Pedro J. Pérez */
#define PHYSFS_LANG_FRENCH 7 /* French by Stéphane Peter */
#define PHYSFS_LANG_GERMAN 8 /* German by Michael Renner */
@ -331,390 +326,6 @@ extern "C" {
#define ERR_PROT_VIOLATION "îÁÒÕÛÅÎÉÅ ÚÁÝÉÔÙ"
#define ERR_BROKEN_PIPE "óÌÏÍÁÎÎÙÊ ËÏÎ×ÅÊÅÒ"
#elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_CP1251)
#define DIR_ARCHIVE_DESCRIPTION "Íå àðõèâ, íåïîñðåäñòâåííûé ââîä/âûâîä ôàéëîâîé ñèñòåìû"
#define GRP_ARCHIVE_DESCRIPTION "Ôîðìàò ãðóïïîâîãî ôàéëà Build engine"
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip ñîâìåñòèìûé"
#define ERR_IS_INITIALIZED "Óæå èíèöèàëèçèðîâàí"
#define ERR_NOT_INITIALIZED "Íå èíèöèàëèçèðîâàí"
#define ERR_INVALID_ARGUMENT "Íåâåðíûé àðãóìåíò"
#define ERR_FILES_STILL_OPEN "Ôàéëû åùå îòêðûòû"
#define ERR_NO_DIR_CREATE "Íå ìîãó ñîçäàòü êàòàëîãè"
#define ERR_OUT_OF_MEMORY "Êîí÷èëàñü ïàìÿòü"
#define ERR_NOT_IN_SEARCH_PATH "Íåò òàêîãî ýëåìåíòà â ïóòè ïîèñêà"
#define ERR_NOT_SUPPORTED "Îïåðàöèÿ íå ïîääåðæèâàåòñÿ"
#define ERR_UNSUPPORTED_ARCHIVE "Àðõèâû òàêîãî òèïà íå ïîääåðæèâàþòñÿ"
#define ERR_NOT_A_HANDLE "Íå ôàéëîâûé äåñêðèïòîð"
#define ERR_INSECURE_FNAME "Íåáåçîïàñíîå èìÿ ôàéëà"
#define ERR_SYMLINK_DISALLOWED "Ñèìâîëüíûå ññûëêè îòêëþ÷åíû"
#define ERR_NO_WRITE_DIR "Êàòàëîã äëÿ çàïèñè íå óñòàíîâëåí"
#define ERR_NO_SUCH_FILE "Ôàéë íå íàéäåí"
#define ERR_NO_SUCH_PATH "Ïóòü íå íàéäåí"
#define ERR_NO_SUCH_VOLUME "Òîì íå íàéäåí"
#define ERR_PAST_EOF "Çà êîíöîì ôàéëà"
#define ERR_ARC_IS_READ_ONLY "Àðõèâ òîëüêî äëÿ ÷òåíèÿ"
#define ERR_IO_ERROR "Îøèáêà ââîäà/âûâîäà"
#define ERR_CANT_SET_WRITE_DIR "Íå ìîãó óñòàíîâèòü êàòàëîã äëÿ çàïèñè"
#define ERR_SYMLINK_LOOP "Áåñêîíå÷íûé öèêë ñèìâîëüíîé ññûëêè"
#define ERR_COMPRESSION "Îøèáêà (Ðàñ)ïàêîâêè"
#define ERR_NOT_IMPLEMENTED "Íå ðåàëèçîâàíî"
#define ERR_OS_ERROR "Îïåðàöèîííàÿ ñèñòåìà ñîîáùèëà îøèáêó"
#define ERR_FILE_EXISTS "Ôàéë óæå ñóùåñòâóåò"
#define ERR_NOT_A_FILE "Íå ôàéë"
#define ERR_NOT_A_DIR "Íå êàòàëîã"
#define ERR_NOT_AN_ARCHIVE "Íå àðõèâ"
#define ERR_CORRUPTED "Ïîâðåæäåííûé àðõèâ"
#define ERR_SEEK_OUT_OF_RANGE "Ïîçèöèîíèðîâàíèå çà ïðåäåëû"
#define ERR_BAD_FILENAME "Íåâåðíîå èìÿ ôàéëà"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS âûïîëíèëà íåâåðíûé ñèñòåìíûé âûçîâ"
#define ERR_ARGV0_IS_NULL "argv0 is NULL"
#define ERR_ZLIB_NEED_DICT "zlib: íóæåí ñëîâàðü"
#define ERR_ZLIB_DATA_ERROR "zlib: îøèáêà äàííûõ"
#define ERR_ZLIB_MEMORY_ERROR "zlib: îøèáêà ïàìÿòè"
#define ERR_ZLIB_BUFFER_ERROR "zlib: îøèáêà áóôåðà"
#define ERR_ZLIB_VERSION_ERROR "zlib: îøèáêà âåðñèè"
#define ERR_ZLIB_UNKNOWN_ERROR "zlib: íåèçâåñòíàÿ îøèáêà"
#define ERR_SEARCHPATH_TRUNC "Ïóòü ïîèñêà îáðåçàí"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() îáðåçàí"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() íå ïîëó÷èë êàòàëîã"
#define ERR_DISK_FULL "Äèñê ïîëîí"
#define ERR_DIRECTORY_FULL "Êàòàëîã ïîëîí"
#define ERR_MACOS_GENERIC "MacOS ñîîáùèëà îøèáêó (%d)"
#define ERR_OS2_GENERIC "OS/2 ñîîáùèëà îøèáêó (%d)"
#define ERR_VOL_LOCKED_HW "Òîì áëîêèðîâàí àïïàðàòíî"
#define ERR_VOL_LOCKED_SW "Òîì áëîêèðîâàí ïðîãðàììíî"
#define ERR_FILE_LOCKED "Ôàéë çàáëîêèðîâàí"
#define ERR_FILE_OR_DIR_BUSY "Ôàéë/êàòàëîã çàíÿò"
#define ERR_FILE_ALREADY_OPEN_W "Ôàéë óæå îòêðûò íà çàïèñü"
#define ERR_FILE_ALREADY_OPEN_R "Ôàéë óæå îòêðûò íà ÷òåíèå"
#define ERR_INVALID_REFNUM "Íåâåðíîå êîëè÷åñòâî ññûëîê"
#define ERR_GETTING_FILE_POS "Îøèáêà ïðè ïîëó÷åíèè ïîçèöèè ôàéëà"
#define ERR_VOLUME_OFFLINE "Òîì îòñîåäèíåí"
#define ERR_PERMISSION_DENIED "Îòêàçàíî â ðàçðåøåíèè"
#define ERR_VOL_ALREADY_ONLINE "Òîì óæå ïîäñîåäèíåí"
#define ERR_NO_SUCH_DRIVE "Íåò òàêîãî äèñêà"
#define ERR_NOT_MAC_DISK "Íå äèñê Macintosh"
#define ERR_VOL_EXTERNAL_FS "Òîì ïðèíàäëåæèò âíåøíåé ôàéëîâîé ñèñòåìå"
#define ERR_PROBLEM_RENAME "Ïðîáëåìà ïðè ïåðåèìåíîâàíèè"
#define ERR_BAD_MASTER_BLOCK "Ïëîõîé ãëàâíûé áëîê êàòàëîãà"
#define ERR_CANT_MOVE_FORBIDDEN "Ïîïûòêà ïåðåìåñòèòü çàïðåùåíà"
#define ERR_WRONG_VOL_TYPE "Íåâåðíûé òèï òîìà"
#define ERR_SERVER_VOL_LOST "Ñåðâåðíûé òîì áûë îòñîåäèíåí"
#define ERR_FILE_ID_NOT_FOUND "Èäåíòèôèêàòîð ôàéëà íå íàéäåí"
#define ERR_FILE_ID_EXISTS "Èäåíòèôèêàòîð ôàéëà óæå ñóùåñòâóåò"
#define ERR_SERVER_NO_RESPOND "Ñåðâåð íå îòâå÷àåò"
#define ERR_USER_AUTH_FAILED "Èäåíòèôèêàöèÿ ïîëüçîâàòåëÿ íå óäàëàñü"
#define ERR_PWORD_EXPIRED "Ïàðîëü íà ñåðâåðå óñòàðåë"
#define ERR_ACCESS_DENIED "Îòêàçàíî â äîñòóïå"
#define ERR_NOT_A_DOS_DISK "Íå äèñê DOS"
#define ERR_SHARING_VIOLATION "Íàðóøåíèå ñîâìåñòíîãî äîñòóïà"
#define ERR_CANNOT_MAKE "Íå ìîãó ñîáðàòü"
#define ERR_DEV_IN_USE "Óñòðîéñòâî óæå èñïîëüçóåòñÿ"
#define ERR_OPEN_FAILED "Îòêðûòèå íå óäàëîñü"
#define ERR_PIPE_BUSY "Êîíâåéåð çàíÿò"
#define ERR_SHARING_BUF_EXCEEDED "Ðàçäåëÿåìûé áóôåð ïåðåïîëíåí"
#define ERR_TOO_MANY_HANDLES "Ñëèøêîì ìíîãî îòêðûòûõ äåñêðèïòîðîâ"
#define ERR_SEEK_ERROR "Îøèáêà ïîçèöèîíèðîâàíèÿ"
#define ERR_DEL_CWD "Ïîïûòêà óäàëèòü òåêóùèé ðàáî÷èé êàòàëîã"
#define ERR_WRITE_PROTECT_ERROR "Îøèáêà çàùèòû çàïèñè"
#define ERR_WRITE_FAULT "Îøèáêà çàïèñè"
#define ERR_LOCK_VIOLATION "Íàðóøåíèå áëîêèðîâêè"
#define ERR_GEN_FAILURE "Îáùèé ñáîé"
#define ERR_UNCERTAIN_MEDIA "Íåîïðåäåëåííûé íîñèòåëü"
#define ERR_PROT_VIOLATION "Íàðóøåíèå çàùèòû"
#define ERR_BROKEN_PIPE "Ñëîìàííûé êîíâåéåð"
#elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_CP866)
#define DIR_ARCHIVE_DESCRIPTION "<22>¥  à娢, ­¥¯®á।á⢥­­ë© ¢¢®¤/¢ë¢®¤ ä ©«®¢®© á¨á⥬ë"
#define GRP_ARCHIVE_DESCRIPTION "”®à¬ â £à㯯®¢®£® ä ©«  Build engine"
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip ᮢ¬¥á⨬ë©"
#define ERR_IS_INITIALIZED "“¦¥ ¨­¨æ¨ «¨§¨à®¢ ­"
#define ERR_NOT_INITIALIZED "<22>¥ ¨­¨æ¨ «¨§¨à®¢ ­"
#define ERR_INVALID_ARGUMENT "<22>¥¢¥à­ë©  à£ã¬¥­â"
#define ERR_FILES_STILL_OPEN "” ©«ë ¥é¥ ®âªàëâë"
#define ERR_NO_DIR_CREATE "<22>¥ ¬®£ã ᮧ¤ âì ª â «®£¨"
#define ERR_OUT_OF_MEMORY "Š®­ç¨« áì ¯ ¬ïâì"
#define ERR_NOT_IN_SEARCH_PATH "<22>¥â â ª®£® í«¥¬¥­â  ¢ ¯ã⨠¯®¨áª "
#define ERR_NOT_SUPPORTED "Ž¯¥à æ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï"
#define ERR_UNSUPPORTED_ARCHIVE "€à娢ë â ª®£® ⨯  ­¥ ¯®¤¤¥à¦¨¢ îâáï"
#define ERR_NOT_A_HANDLE "<22>¥ ä ©«®¢ë© ¤¥áªà¨¯â®à"
#define ERR_INSECURE_FNAME "<22>¥¡¥§®¯ á­®¥ ¨¬ï ä ©« "
#define ERR_SYMLINK_DISALLOWED "‘¨¬¢®«ì­ë¥ áá뫪¨ ®âª«î祭ë"
#define ERR_NO_WRITE_DIR "Š â «®£ ¤«ï § ¯¨á¨ ­¥ ãáâ ­®¢«¥­"
#define ERR_NO_SUCH_FILE "” ©« ­¥ ­ ©¤¥­"
#define ERR_NO_SUCH_PATH "<22>ãâì ­¥ ­ ©¤¥­"
#define ERR_NO_SUCH_VOLUME "’®¬ ­¥ ­ ©¤¥­"
#define ERR_PAST_EOF "‡  ª®­æ®¬ ä ©« "
#define ERR_ARC_IS_READ_ONLY "€à娢 ⮫쪮 ¤«ï ç⥭¨ï"
#define ERR_IO_ERROR "Žè¨¡ª  ¢¢®¤ /¢ë¢®¤ "
#define ERR_CANT_SET_WRITE_DIR "<22>¥ ¬®£ã ãáâ ­®¢¨âì ª â «®£ ¤«ï § ¯¨á¨"
#define ERR_SYMLINK_LOOP "<22>¥áª®­¥ç­ë© 横« ᨬ¢®«ì­®© áá뫪¨"
#define ERR_COMPRESSION "Žè¨¡ª  (<28> á)¯ ª®¢ª¨"
#define ERR_NOT_IMPLEMENTED "<22>¥ ॠ«¨§®¢ ­®"
#define ERR_OS_ERROR "Ž¯¥à æ¨®­­ ï á¨á⥬  á®®¡é¨«  ®è¨¡ªã"
#define ERR_FILE_EXISTS "” ©« 㦥 áãé¥áâ¢ã¥â"
#define ERR_NOT_A_FILE "<22>¥ ä ©«"
#define ERR_NOT_A_DIR "<22>¥ ª â «®£"
#define ERR_NOT_AN_ARCHIVE "<22>¥  à娢"
#define ERR_CORRUPTED "<22>®¢à¥¦¤¥­­ë©  à娢"
#define ERR_SEEK_OUT_OF_RANGE "<22>®§¨æ¨®­¨à®¢ ­¨¥ §  ¯à¥¤¥«ë"
#define ERR_BAD_FILENAME "<22>¥¢¥à­®¥ ¨¬ï ä ©« "
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS ¢ë¯®«­¨«  ­¥¢¥à­ë© á¨á⥬­ë© ¢ë§®¢"
#define ERR_ARGV0_IS_NULL "argv0 is NULL"
#define ERR_ZLIB_NEED_DICT "zlib: ­ã¦¥­ á«®¢ àì"
#define ERR_ZLIB_DATA_ERROR "zlib: ®è¨¡ª  ¤ ­­ëå"
#define ERR_ZLIB_MEMORY_ERROR "zlib: ®è¨¡ª  ¯ ¬ïâ¨"
#define ERR_ZLIB_BUFFER_ERROR "zlib: ®è¨¡ª  ¡ãä¥à "
#define ERR_ZLIB_VERSION_ERROR "zlib: ®è¨¡ª  ¢¥àᨨ"
#define ERR_ZLIB_UNKNOWN_ERROR "zlib: ­¥¨§¢¥áâ­ ï ®è¨¡ª "
#define ERR_SEARCHPATH_TRUNC "<22>ãâì ¯®¨áª  ®¡à¥§ ­"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() ®¡à¥§ ­"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() ­¥ ¯®«ã稫 ª â «®£"
#define ERR_DISK_FULL "„¨áª ¯®«®­"
#define ERR_DIRECTORY_FULL "Š â «®£ ¯®«®­"
#define ERR_MACOS_GENERIC "MacOS á®®¡é¨«  ®è¨¡ªã (%d)"
#define ERR_OS2_GENERIC "OS/2 á®®¡é¨«  ®è¨¡ªã (%d)"
#define ERR_VOL_LOCKED_HW "’®¬ ¡«®ª¨à®¢ ­  ¯¯ à â­®"
#define ERR_VOL_LOCKED_SW "’®¬ ¡«®ª¨à®¢ ­ ¯à®£à ¬¬­®"
#define ERR_FILE_LOCKED "” ©« § ¡«®ª¨à®¢ ­"
#define ERR_FILE_OR_DIR_BUSY "” ©«/ª â «®£ § ­ïâ"
#define ERR_FILE_ALREADY_OPEN_W "” ©« 㦥 ®âªàëâ ­  § ¯¨áì"
#define ERR_FILE_ALREADY_OPEN_R "” ©« 㦥 ®âªàëâ ­  ç⥭¨¥"
#define ERR_INVALID_REFNUM "<22>¥¢¥à­®¥ ª®«¨ç¥á⢮ ááë«®ª"
#define ERR_GETTING_FILE_POS "Žè¨¡ª  ¯à¨ ¯®«ã祭¨¨ ¯®§¨æ¨¨ ä ©« "
#define ERR_VOLUME_OFFLINE "’®¬ ®âᮥ¤¨­¥­"
#define ERR_PERMISSION_DENIED "Žâª § ­® ¢ à §à¥è¥­¨¨"
#define ERR_VOL_ALREADY_ONLINE "’®¬ 㦥 ¯®¤á®¥¤¨­¥­"
#define ERR_NO_SUCH_DRIVE "<22>¥â â ª®£® ¤¨áª "
#define ERR_NOT_MAC_DISK "<22>¥ ¤¨áª Macintosh"
#define ERR_VOL_EXTERNAL_FS "’®¬ ¯à¨­ ¤«¥¦¨â ¢­¥è­¥© ä ©«®¢®© á¨á⥬¥"
#define ERR_PROBLEM_RENAME "<22>஡«¥¬  ¯à¨ ¯¥à¥¨¬¥­®¢ ­¨¨"
#define ERR_BAD_MASTER_BLOCK "<22>«®å®© £« ¢­ë© ¡«®ª ª â «®£ "
#define ERR_CANT_MOVE_FORBIDDEN "<22>®¯ë⪠ ¯¥à¥¬¥áâ¨âì § ¯à¥é¥­ "
#define ERR_WRONG_VOL_TYPE "<22>¥¢¥à­ë© ⨯ ⮬ "
#define ERR_SERVER_VOL_LOST "‘¥à¢¥à­ë© ⮬ ¡ë« ®âᮥ¤¨­¥­"
#define ERR_FILE_ID_NOT_FOUND "ˆ¤¥­â¨ä¨ª â®à ä ©«  ­¥ ­ ©¤¥­"
#define ERR_FILE_ID_EXISTS "ˆ¤¥­â¨ä¨ª â®à ä ©«  㦥 áãé¥áâ¢ã¥â"
#define ERR_SERVER_NO_RESPOND "‘¥à¢¥à ­¥ ®â¢¥ç ¥â"
#define ERR_USER_AUTH_FAILED "ˆ¤¥­â¨ä¨ª æ¨ï ¯®«ì§®¢ â¥«ï ­¥ 㤠« áì"
#define ERR_PWORD_EXPIRED "<22> à®«ì ­  á¥à¢¥à¥ ãáâ à¥«"
#define ERR_ACCESS_DENIED "Žâª § ­® ¢ ¤®áâ㯥"
#define ERR_NOT_A_DOS_DISK "<22>¥ ¤¨áª DOS"
#define ERR_SHARING_VIOLATION "<22> àã襭¨¥ ᮢ¬¥áâ­®£® ¤®áâ㯠"
#define ERR_CANNOT_MAKE "<22>¥ ¬®£ã ᮡà âì"
#define ERR_DEV_IN_USE "“áâனá⢮ 㦥 ¨á¯®«ì§ã¥âáï"
#define ERR_OPEN_FAILED "Žâªàë⨥ ­¥ 㤠«®áì"
#define ERR_PIPE_BUSY "Š®­¢¥©¥à § ­ïâ"
#define ERR_SHARING_BUF_EXCEEDED "<22> §¤¥«ï¥¬ë© ¡ãä¥à ¯¥à¥¯®«­¥­"
#define ERR_TOO_MANY_HANDLES "‘«¨èª®¬ ¬­®£® ®âªàëâëå ¤¥áªà¨¯â®à®¢"
#define ERR_SEEK_ERROR "Žè¨¡ª  ¯®§¨æ¨®­¨à®¢ ­¨ï"
#define ERR_DEL_CWD "<22>®¯ë⪠ 㤠«¨âì ⥪ã騩 à ¡®ç¨© ª â «®£"
#define ERR_WRITE_PROTECT_ERROR "Žè¨¡ª  § é¨âë § ¯¨á¨"
#define ERR_WRITE_FAULT "Žè¨¡ª  § ¯¨á¨"
#define ERR_LOCK_VIOLATION "<22> àã襭¨¥ ¡«®ª¨à®¢ª¨"
#define ERR_GEN_FAILURE "Ž¡é¨© á¡®©"
#define ERR_UNCERTAIN_MEDIA "<22>¥®¯à¥¤¥«¥­­ë© ­®á¨â¥«ì"
#define ERR_PROT_VIOLATION "<22> àã襭¨¥ § é¨âë"
#define ERR_BROKEN_PIPE "‘«®¬ ­­ë© ª®­¢¥©¥à"
#elif (PHYSFS_LANG == PHYSFS_LANG_RUSSIAN_ISO_8859_5)
#define DIR_ARCHIVE_DESCRIPTION "½Õ ÐàåØÒ, ÝÕßÞáàÕÔáâÒÕÝÝëÙ ÒÒÞÔ/ÒëÒÞÔ äÐÙÛÞÒÞÙ áØáâÕÜë"
#define GRP_ARCHIVE_DESCRIPTION "ÄÞàÜÐâ ÓàãßßÞÒÞÓÞ äÐÙÛÐ Build engine"
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip áÞÒÜÕáâØÜëÙ"
#define ERR_IS_INITIALIZED "ÃÖÕ ØÝØæØÐÛØ×ØàÞÒÐÝ"
#define ERR_NOT_INITIALIZED "½Õ ØÝØæØÐÛØ×ØàÞÒÐÝ"
#define ERR_INVALID_ARGUMENT "½ÕÒÕàÝëÙ ÐàÓãÜÕÝâ"
#define ERR_FILES_STILL_OPEN "ÄÐÙÛë ÕéÕ ÞâÚàëâë"
#define ERR_NO_DIR_CREATE "½Õ ÜÞÓã áÞ×ÔÐâì ÚÐâÐÛÞÓØ"
#define ERR_OUT_OF_MEMORY "ºÞÝçØÛÐáì ßÐÜïâì"
#define ERR_NOT_IN_SEARCH_PATH "½Õâ âÐÚÞÓÞ íÛÕÜÕÝâÐ Ò ßãâØ ßÞØáÚÐ"
#define ERR_NOT_SUPPORTED "¾ßÕàÐæØï ÝÕ ßÞÔÔÕàÖØÒÐÕâáï"
#define ERR_UNSUPPORTED_ARCHIVE "°àåØÒë âÐÚÞÓÞ âØßÐ ÝÕ ßÞÔÔÕàÖØÒÐîâáï"
#define ERR_NOT_A_HANDLE "½Õ äÐÙÛÞÒëÙ ÔÕáÚàØßâÞà"
#define ERR_INSECURE_FNAME "½ÕÑÕ×ÞßÐáÝÞÕ ØÜï äÐÙÛÐ"
#define ERR_SYMLINK_DISALLOWED "ÁØÜÒÞÛìÝëÕ ááëÛÚØ ÞâÚÛîçÕÝë"
#define ERR_NO_WRITE_DIR "ºÐâÐÛÞÓ ÔÛï ×ÐßØáØ ÝÕ ãáâÐÝÞÒÛÕÝ"
#define ERR_NO_SUCH_FILE "ÄÐÙÛ ÝÕ ÝÐÙÔÕÝ"
#define ERR_NO_SUCH_PATH "¿ãâì ÝÕ ÝÐÙÔÕÝ"
#define ERR_NO_SUCH_VOLUME "ÂÞÜ ÝÕ ÝÐÙÔÕÝ"
#define ERR_PAST_EOF "·Ð ÚÞÝæÞÜ äÐÙÛÐ"
#define ERR_ARC_IS_READ_ONLY "°àåØÒ âÞÛìÚÞ ÔÛï çâÕÝØï"
#define ERR_IO_ERROR "¾èØÑÚÐ ÒÒÞÔÐ/ÒëÒÞÔÐ"
#define ERR_CANT_SET_WRITE_DIR "½Õ ÜÞÓã ãáâÐÝÞÒØâì ÚÐâÐÛÞÓ ÔÛï ×ÐßØáØ"
#define ERR_SYMLINK_LOOP "±ÕáÚÞÝÕçÝëÙ æØÚÛ áØÜÒÞÛìÝÞÙ ááëÛÚØ"
#define ERR_COMPRESSION "¾èØÑÚÐ (ÀÐá)ßÐÚÞÒÚØ"
#define ERR_NOT_IMPLEMENTED "½Õ àÕÐÛØ×ÞÒÐÝÞ"
#define ERR_OS_ERROR "¾ßÕàÐæØÞÝÝÐï áØáâÕÜÐ áÞÞÑéØÛÐ ÞèØÑÚã"
#define ERR_FILE_EXISTS "ÄÐÙÛ ãÖÕ áãéÕáâÒãÕâ"
#define ERR_NOT_A_FILE "½Õ äÐÙÛ"
#define ERR_NOT_A_DIR "½Õ ÚÐâÐÛÞÓ"
#define ERR_NOT_AN_ARCHIVE "½Õ ÐàåØÒ"
#define ERR_CORRUPTED "¿ÞÒàÕÖÔÕÝÝëÙ ÐàåØÒ"
#define ERR_SEEK_OUT_OF_RANGE "¿Þ×ØæØÞÝØàÞÒÐÝØÕ ×Ð ßàÕÔÕÛë"
#define ERR_BAD_FILENAME "½ÕÒÕàÝÞÕ ØÜï äÐÙÛÐ"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS ÒëßÞÛÝØÛÐ ÝÕÒÕàÝëÙ áØáâÕÜÝëÙ Òë×ÞÒ"
#define ERR_ARGV0_IS_NULL "argv0 is NULL"
#define ERR_ZLIB_NEED_DICT "zlib: ÝãÖÕÝ áÛÞÒÐàì"
#define ERR_ZLIB_DATA_ERROR "zlib: ÞèØÑÚÐ ÔÐÝÝëå"
#define ERR_ZLIB_MEMORY_ERROR "zlib: ÞèØÑÚÐ ßÐÜïâØ"
#define ERR_ZLIB_BUFFER_ERROR "zlib: ÞèØÑÚÐ ÑãäÕàÐ"
#define ERR_ZLIB_VERSION_ERROR "zlib: ÞèØÑÚÐ ÒÕàáØØ"
#define ERR_ZLIB_UNKNOWN_ERROR "zlib: ÝÕØ×ÒÕáâÝÐï ÞèØÑÚÐ"
#define ERR_SEARCHPATH_TRUNC "¿ãâì ßÞØáÚÐ ÞÑàÕ×ÐÝ"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() ÞÑàÕ×ÐÝ"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() ÝÕ ßÞÛãçØÛ ÚÐâÐÛÞÓ"
#define ERR_DISK_FULL "´ØáÚ ßÞÛÞÝ"
#define ERR_DIRECTORY_FULL "ºÐâÐÛÞÓ ßÞÛÞÝ"
#define ERR_MACOS_GENERIC "MacOS áÞÞÑéØÛÐ ÞèØÑÚã (%d)"
#define ERR_OS2_GENERIC "OS/2 áÞÞÑéØÛÐ ÞèØÑÚã (%d)"
#define ERR_VOL_LOCKED_HW "ÂÞÜ ÑÛÞÚØàÞÒÐÝ ÐßßÐàÐâÝÞ"
#define ERR_VOL_LOCKED_SW "ÂÞÜ ÑÛÞÚØàÞÒÐÝ ßàÞÓàÐÜÜÝÞ"
#define ERR_FILE_LOCKED "ÄÐÙÛ ×ÐÑÛÞÚØàÞÒÐÝ"
#define ERR_FILE_OR_DIR_BUSY "ÄÐÙÛ/ÚÐâÐÛÞÓ ×ÐÝïâ"
#define ERR_FILE_ALREADY_OPEN_W "ÄÐÙÛ ãÖÕ ÞâÚàëâ ÝÐ ×ÐßØáì"
#define ERR_FILE_ALREADY_OPEN_R "ÄÐÙÛ ãÖÕ ÞâÚàëâ ÝÐ çâÕÝØÕ"
#define ERR_INVALID_REFNUM "½ÕÒÕàÝÞÕ ÚÞÛØçÕáâÒÞ ááëÛÞÚ"
#define ERR_GETTING_FILE_POS "¾èØÑÚÐ ßàØ ßÞÛãçÕÝØØ ßÞ×ØæØØ äÐÙÛÐ"
#define ERR_VOLUME_OFFLINE "ÂÞÜ ÞâáÞÕÔØÝÕÝ"
#define ERR_PERMISSION_DENIED "¾âÚÐ×ÐÝÞ Ò àÐ×àÕèÕÝØØ"
#define ERR_VOL_ALREADY_ONLINE "ÂÞÜ ãÖÕ ßÞÔáÞÕÔØÝÕÝ"
#define ERR_NO_SUCH_DRIVE "½Õâ âÐÚÞÓÞ ÔØáÚÐ"
#define ERR_NOT_MAC_DISK "½Õ ÔØáÚ Macintosh"
#define ERR_VOL_EXTERNAL_FS "ÂÞÜ ßàØÝÐÔÛÕÖØâ ÒÝÕèÝÕÙ äÐÙÛÞÒÞÙ áØáâÕÜÕ"
#define ERR_PROBLEM_RENAME "¿àÞÑÛÕÜÐ ßàØ ßÕàÕØÜÕÝÞÒÐÝØØ"
#define ERR_BAD_MASTER_BLOCK "¿ÛÞåÞÙ ÓÛÐÒÝëÙ ÑÛÞÚ ÚÐâÐÛÞÓÐ"
#define ERR_CANT_MOVE_FORBIDDEN "¿ÞßëâÚÐ ßÕàÕÜÕáâØâì ×ÐßàÕéÕÝÐ"
#define ERR_WRONG_VOL_TYPE "½ÕÒÕàÝëÙ âØß âÞÜÐ"
#define ERR_SERVER_VOL_LOST "ÁÕàÒÕàÝëÙ âÞÜ ÑëÛ ÞâáÞÕÔØÝÕÝ"
#define ERR_FILE_ID_NOT_FOUND "¸ÔÕÝâØäØÚÐâÞà äÐÙÛÐ ÝÕ ÝÐÙÔÕÝ"
#define ERR_FILE_ID_EXISTS "¸ÔÕÝâØäØÚÐâÞà äÐÙÛÐ ãÖÕ áãéÕáâÒãÕâ"
#define ERR_SERVER_NO_RESPOND "ÁÕàÒÕà ÝÕ ÞâÒÕçÐÕâ"
#define ERR_USER_AUTH_FAILED "¸ÔÕÝâØäØÚÐæØï ßÞÛì×ÞÒÐâÕÛï ÝÕ ãÔÐÛÐáì"
#define ERR_PWORD_EXPIRED "¿ÐàÞÛì ÝÐ áÕàÒÕàÕ ãáâÐàÕÛ"
#define ERR_ACCESS_DENIED "¾âÚÐ×ÐÝÞ Ò ÔÞáâãßÕ"
#define ERR_NOT_A_DOS_DISK "½Õ ÔØáÚ DOS"
#define ERR_SHARING_VIOLATION "½ÐàãèÕÝØÕ áÞÒÜÕáâÝÞÓÞ ÔÞáâãßÐ"
#define ERR_CANNOT_MAKE "½Õ ÜÞÓã áÞÑàÐâì"
#define ERR_DEV_IN_USE "ÃáâàÞÙáâÒÞ ãÖÕ ØáßÞÛì×ãÕâáï"
#define ERR_OPEN_FAILED "¾âÚàëâØÕ ÝÕ ãÔÐÛÞáì"
#define ERR_PIPE_BUSY "ºÞÝÒÕÙÕà ×ÐÝïâ"
#define ERR_SHARING_BUF_EXCEEDED "ÀÐ×ÔÕÛïÕÜëÙ ÑãäÕà ßÕàÕßÞÛÝÕÝ"
#define ERR_TOO_MANY_HANDLES "ÁÛØèÚÞÜ ÜÝÞÓÞ ÞâÚàëâëå ÔÕáÚàØßâÞàÞÒ"
#define ERR_SEEK_ERROR "¾èØÑÚÐ ßÞ×ØæØÞÝØàÞÒÐÝØï"
#define ERR_DEL_CWD "¿ÞßëâÚÐ ãÔÐÛØâì âÕÚãéØÙ àÐÑÞçØÙ ÚÐâÐÛÞÓ"
#define ERR_WRITE_PROTECT_ERROR "¾èØÑÚÐ ×ÐéØâë ×ÐßØáØ"
#define ERR_WRITE_FAULT "¾èØÑÚÐ ×ÐßØáØ"
#define ERR_LOCK_VIOLATION "½ÐàãèÕÝØÕ ÑÛÞÚØàÞÒÚØ"
#define ERR_GEN_FAILURE "¾ÑéØÙ áÑÞÙ"
#define ERR_UNCERTAIN_MEDIA "½ÕÞßàÕÔÕÛÕÝÝëÙ ÝÞáØâÕÛì"
#define ERR_PROT_VIOLATION "½ÐàãèÕÝØÕ ×ÐéØâë"
#define ERR_BROKEN_PIPE "ÁÛÞÜÐÝÝëÙ ÚÞÝÒÕÙÕà"
#elif (PHYSFS_LANG == PHYSFS_LANG_SPANISH)
#define DIR_ARCHIVE_DESCRIPTION "No es un archivo, E/S directa al sistema de ficheros"
#define GRP_ARCHIVE_DESCRIPTION "Formato Build engine Groupfile"
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
#define ZIP_ARCHIVE_DESCRIPTION "Compatible con PkZip/WinZip/Info-Zip"
#define ERR_IS_INITIALIZED "Ya estaba inicializado"
#define ERR_NOT_INITIALIZED "No está inicializado"
#define ERR_INVALID_ARGUMENT "Argumento inválido"
#define ERR_FILES_STILL_OPEN "Archivos aún abiertos"
#define ERR_NO_DIR_CREATE "Fallo al crear los directorios"
#define ERR_OUT_OF_MEMORY "Memoria agotada"
#define ERR_NOT_IN_SEARCH_PATH "No existe tal entrada en la ruta de búsqueda"
#define ERR_NOT_SUPPORTED "Operación no soportada"
#define ERR_UNSUPPORTED_ARCHIVE "Tipo de archivo no soportado"
#define ERR_NOT_A_HANDLE "No es un manejador de ficheo (file handle)"
#define ERR_INSECURE_FNAME "Nombre de archivo inseguro"
#define ERR_SYMLINK_DISALLOWED "Los enlaces simbólicos están desactivados"
#define ERR_NO_WRITE_DIR "No has configurado un directorio de escritura"
#define ERR_NO_SUCH_FILE "Archivo no encontrado"
#define ERR_NO_SUCH_PATH "Ruta no encontrada"
#define ERR_NO_SUCH_VOLUME "Volumen no encontrado"
#define ERR_PAST_EOF "Te pasaste del final del archivo"
#define ERR_ARC_IS_READ_ONLY "El archivo es de sólo lectura"
#define ERR_IO_ERROR "Error E/S"
#define ERR_CANT_SET_WRITE_DIR "No puedo configurar el directorio de escritura"
#define ERR_SYMLINK_LOOP "Bucle infnito de enlaces simbólicos"
#define ERR_COMPRESSION "Error de (des)compresión"
#define ERR_NOT_IMPLEMENTED "No implementado"
#define ERR_OS_ERROR "El sistema operativo ha devuelto un error"
#define ERR_FILE_EXISTS "El archivo ya existe"
#define ERR_NOT_A_FILE "No es un archivo"
#define ERR_NOT_A_DIR "No es un directorio"
#define ERR_NOT_AN_ARCHIVE "No es un archivo"
#define ERR_CORRUPTED "Archivo corrupto"
#define ERR_SEEK_OUT_OF_RANGE "Búsqueda fuera de rango"
#define ERR_BAD_FILENAME "Nombre de archivo incorrecto"
#define ERR_PHYSFS_BAD_OS_CALL "(BUG) PhysicsFS ha hecho una llamada incorrecta al sistema"
#define ERR_ARGV0_IS_NULL "argv0 es NULL"
#define ERR_ZLIB_NEED_DICT "zlib: necesito diccionario"
#define ERR_ZLIB_DATA_ERROR "zlib: error de datos"
#define ERR_ZLIB_MEMORY_ERROR "zlib: error de memoria"
#define ERR_ZLIB_BUFFER_ERROR "zlib: error de buffer"
#define ERR_ZLIB_VERSION_ERROR "zlib: error de versión"
#define ERR_ZLIB_UNKNOWN_ERROR "zlib: error desconocido"
#define ERR_SEARCHPATH_TRUNC "La ruta de búsqueda ha sido truncada"
#define ERR_GETMODFN_TRUNC "GetModuleFileName() ha sido truncado"
#define ERR_GETMODFN_NO_DIR "GetModuleFileName() no tenia directorio"
#define ERR_DISK_FULL "El disco está lleno"
#define ERR_DIRECTORY_FULL "El directorio está lleno"
#define ERR_MACOS_GENERIC "MacOS ha devuelto un error (%d)"
#define ERR_OS2_GENERIC "OS/2 ha devuelto un error (%d)"
#define ERR_VOL_LOCKED_HW "El volumen está bloqueado por el hardware"
#define ERR_VOL_LOCKED_SW "El volumen está bloqueado por el software"
#define ERR_FILE_LOCKED "El archivo está bloqueado"
#define ERR_FILE_OR_DIR_BUSY "Fichero o directorio ocupados"
#define ERR_FILE_ALREADY_OPEN_W "Fichero ya abierto para escritura"
#define ERR_FILE_ALREADY_OPEN_R "Fichero ya abierto para lectura"
#define ERR_INVALID_REFNUM "El número de referencia no es válido"
#define ERR_GETTING_FILE_POS "Error al tomar la posición del fichero"
#define ERR_VOLUME_OFFLINE "El volumen está desconectado"
#define ERR_PERMISSION_DENIED "Permiso denegado"
#define ERR_VOL_ALREADY_ONLINE "El volumen ya estaba conectado"
#define ERR_NO_SUCH_DRIVE "No existe tal unidad"
#define ERR_NOT_MAC_DISK "No es un disco Macintosh"
#define ERR_VOL_EXTERNAL_FS "El volumen pertence a un sistema de ficheros externo"
#define ERR_PROBLEM_RENAME "Problemas al renombrar"
#define ERR_BAD_MASTER_BLOCK "Bloque maestro de directorios incorrecto"
#define ERR_CANT_MOVE_FORBIDDEN "Intento de mover forbidden"
#define ERR_WRONG_VOL_TYPE "Tipo de volumen incorrecto"
#define ERR_SERVER_VOL_LOST "El servidor de volúmenes ha sido desconectado"
#define ERR_FILE_ID_NOT_FOUND "Identificador de archivo no encontrado"
#define ERR_FILE_ID_EXISTS "El identificador de archivo ya existe"
#define ERR_SERVER_NO_RESPOND "El servidor no responde"
#define ERR_USER_AUTH_FAILED "Fallo al autentificar el usuario"
#define ERR_PWORD_EXPIRED "La Password en el servidor ha caducado"
#define ERR_ACCESS_DENIED "Acceso denegado"
#define ERR_NOT_A_DOS_DISK "No es un disco de DOS"
#define ERR_SHARING_VIOLATION "Violación al compartir"
#define ERR_CANNOT_MAKE "No puedo hacer make"
#define ERR_DEV_IN_USE "El dispositivo ya estaba en uso"
#define ERR_OPEN_FAILED "Fallo al abrir"
#define ERR_PIPE_BUSY "Tubería ocupada"
#define ERR_SHARING_BUF_EXCEEDED "Buffer de compartición sobrepasado"
#define ERR_TOO_MANY_HANDLES "Demasiados manejadores (handles)"
#define ERR_SEEK_ERROR "Error de búsqueda"
#define ERR_DEL_CWD "Intentando borrar el directorio de trabajo actual"
#define ERR_WRITE_PROTECT_ERROR "Error de protección contra escritura"
#define ERR_WRITE_FAULT "Fallo al escribir"
#define ERR_LOCK_VIOLATION "Violación del bloqueo"
#define ERR_GEN_FAILURE "Fallo general"
#define ERR_UNCERTAIN_MEDIA "Medio incierto"
#define ERR_PROT_VIOLATION "Violación de la protección"
#define ERR_BROKEN_PIPE "Tubería rota"
#elif (PHYSFS_LANG == PHYSFS_LANG_FRENCH)
#define DIR_ARCHIVE_DESCRIPTION "Pas d'archive, E/S directes sur système de fichiers"
#define GRP_ARCHIVE_DESCRIPTION "Format Groupfile du moteur Build"

757
zlib_license_change.txt Normal file
View File

@ -0,0 +1,757 @@
Original discussion is partially quoted in here, thread is archived at:
http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?4:mss:209:200306:nhnacekcfbbhichggfpk
These are the emails I got approving the change to a zlib license. I have
removed the authors' email addresses for spam safety. --ryan.
From xxxxxxxxxxx Mon Jun 9 07:56:24 2003
Date: Mon, 09 Jun 2003 12:17:18 +0100
From: Adam D. Moss <xxxxxxxxx>
Reply-To: "physfs@icculus.org" <physfs@icculus.org>
To: "physfs@icculus.org" <physfs@icculus.org>
Subject: Re: [physfs] License change proposition.
"I approve of a switch to the zlib license for code I own
in PhysicsFS" (and think it's generally a swell idea...)
> Adam D. Moss
> ------------
> extras/abs-file.h (need you to sign off on whole file):
> http://cvs.icculus.org/horde/chora/co.php/extras/abs-file.h?rt=physfs&r=1.3
--
Adam D. Moss . ,,^^ xxxxxxxxx http://www.foxbox.org/ co:3
"Responsible parents don't raise kids in West Virginia."
From xxxxxxxxxxxxxxx Mon Jun 9 16:45:02 2003
Date: Mon, 9 Jun 2003 11:37:31 -0700
From: Bradley Bell <xxxxxxxxxxxx>
Reply-To: "physfs@icculus.org" <physfs@icculus.org>
To: "physfs@icculus.org" <physfs@icculus.org>
Subject: Re: [physfs] License change proposition.
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Quoting "Ryan C. Gordon" <xxxxxxxxxxxxxxx>:
> Please discuss.
Sounds fine to me. And it makes it easier for me to use it in d2x. (which has a
very confusing license)
-brad
From xxxxxxxxxxxx Mon Jun 9 16:45:12 2003
Date: Mon, 09 Jun 2003 12:00:13 -0700
From: David Hedbor <xxxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: [physfs] License change proposition.
As mentioned before, I'm all for the license change since it would
benefit me personally.
--
[ Below is a random fortune, which is unrelated to the above message. ]
The Hollywood tradition I like best is called "sucking up to the stars."
-- Johnny Carson
From xxxxxxxxxxxxx Mon Jun 9 16:45:22 2003
Date: 09 Jun 2003 14:13:00 -0500
From: Edward Rudd <xxxxxxxxxxxxxxxx>
Reply-To: "physfs@icculus.org" <physfs@icculus.org>
To: "physfs@icculus.org" <physfs@icculus.org>
Subject: Re: [physfs] License change proposition.
On Mon, 2003-06-09 at 05:50, Ryan C. Gordon wrote:
That's fine with me.. You have permissions from me.
>
> Edward Rudd
> -----------
> RPM specfile (need you to sign off on whole file):
> http://cvs.icculus.org/horde/chora/cvs.php/physfs.spec.in?rt=physfs
--
Edward Rudd <xxxxxxxxxxxxx>
Home Page <http://urkle.drip.ws/>
From xxxxxxxxxxx Wed Jun 11 13:15:28 2003
Date: Wed, 11 Jun 2003 06:43:43 -0700 (PDT)
From: Eric Wing <xxxxxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: [physfs] License change proposition.
Hi Ryan,
Sorry for the delayed response. (email troubles at
Stanford among other things)
I approve of a switch to the zlib license for
code I own in PhysicsFS, so you can sign off
everything I have there.
Thanks,
Eric
--- "Ryan C. Gordon" <icculus@clutteredmind.org>
wrote:
>
> I like to be helpful when people ask me questions
> about PhysicsFS. I may not
> always have an immediate solution, but I hate
> telling people "that can't be
> done at all".
>
> There is one problem that comes up a lot at which I
> just have to shrug my
> shoulders, and that's distribution.
>
> PhysicsFS, being LGPL'd, can not be statically
> linked to a closed-source
> program. Generally this is not an obstacle so much
> as an annoyance for the
> application developer, since they need to ship a
> shared library and do some
> other legal tapdancing (hey, _someone_ will be a
> pain and demand a copy of the
> physfs source tree by postal mail someday!). End
> result: developers unhappily
> put up with distribution issues and possible bug
> reports, or they do without.
>
> There are places where this annoyance can be a
> showstopper, though. For
> example, I was contacted about a year ago by a game
> shop that wanted to use
> PhysicsFS in a PlayStation 2 title, since the
> PhysicsFS API combined with
> its efficient zipfile archiver is _very_ appealing
> in light of the PSX2's
> awful native filesystem limitations.
>
> How does one ship an LGPL'd library in a console
> game? End users can't relink
> the bugger, after all. Furthermore, their legal
> department had a fit when they
> heard about the "viral" nature of the license when
> statically linking it...
> there is no such thing as "dynamic" linking on a
> PlayStation 2.
>
> Now, here's the lesson for any future project
> maintainers: either don't accept
> patches, or make sure you own the copyright on _all_
> the code before accepting
> it. I have poured years of effort into PhysicsFS,
> but I don't own all the code,
> so I couldn't just grant a license exemption to this
> console developer. End
> result: they did without.
>
> I don't like my own hands being tied by my own
> license. That really doesn't
> seem fair to me.
>
> So for these reasons, I've decided to switch
> PhysicsFS to the zlib license.
> The end result of this is that there will be no
> confusion as to how you can
> use the library ("any way you like") and how you can
> distribute it ("any way
> you like"). The only significant loss is that
> contributers are no longer
> legally obligated to give back source changes, but
> I'm confident that
> developers will if it's generally useful and
> relevant to the public. At least,
> I don't think we should license the library with the
> assumption that
> programmers must have their hands forced to do the
> right thing.
>
> For those that aren't aware of the zlib license,
> here it is. zlib is used in
> all sorts of software without you needing to think
> about it (including
> PhysicsFS), and the license is by far the simplest
> I've ever seen. This is
> the text:
>
> Copyright (c) <year> <copyright holders>
>
> This software is provided 'as-is', without any
> express or implied warranty.
> In no event will the authors be held liable for
> any damages arising from
> the use of this software.
>
> Permission is granted to anyone to use this
> software for any purpose,
> including commercial applications, and to alter
> it and redistribute it
> freely, subject to the following restrictions:
>
> 1. The origin of this software must not be
> misrepresented; you must not
> claim that you wrote the original software. If
> you use this software in a
> product, an acknowledgment in the product
> documentation would be
> appreciated but is not required.
>
> 2. Altered source versions must be plainly marked
> as such, and must not be
> misrepresented as being the original software.
>
> 3. This notice may not be removed or altered from
> any source distribution.
>
>
> That's that.
>
>
> Here's how this works: I've compiled a list of all
> contributors to PhysicsFS
> and what was contributed. I need from these people a
> message saying that they
> will approve a switch to the zlib license. Nothing
> fancy, just quote this
> email and say something like "I approve of a switch
> to the zlib license for
> code I own in PhysicsFS." You still own the
> copyright on that bit of code, but
> it'll be under the zlib license.
>
> I can't switch the license until all the developers,
> below, give me permission,
> or their code has been replaced or removed.
>
> If you contributed something and I missed you,
> please let me know. If I don't
> hear from you, I'll try to track you down. If I
> can't track you down, we've
> got to remove or replace your code.
>
> For application developers and end users: you use
> any code up until we switch
> under the LGPL. After the switch, you can use the
> older code under the LGPL
> and the new code under the zlib license. You have
> less restrictions with the
> zlib license, so you'll probably want to upgrade.
>
>
> Please discuss.
>
> --ryan.
>
>
>
> Contributors:
> I tried to list everything, but the LGPL says you
> can cut-and-paste up to ten
> lines of code, so if you fixed a few typos, you
> might not be listed here. If
> this is a concern, please speak up.
>
>
>
> David Hedbor
> ------------
> Patch to handle situation when CWD is deleted out
> from under program:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs.c?rt=physfs&r1=1.22&r2=1.23&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&r1=1.11&r2=1.12&ty=u
>
> Patch to make PHYSFS_setSaneConfig() set Write
> Directory correctly:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs.c?rt=physfs&r1=1.23&r2=1.24&ty=u
>
> PocketPC patches:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/pocketpc.c?rt=physfs&r1=1.1&r2=1.2&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/archivers/zip.c?rt=physfs&ws=0&r1=1.61&r2=1.62&ty=u
>
>
> Patrick Stein
> -------------
> More-portable __PHYSFS_platformTimeslice() for
> Unix:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&ws=0&r1=1.12&r2=1.13&ty=u
>
> General BSD-ish (but originally for Darwin) CD-ROM
> detection:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&ws=0&r1=1.13&r2=1.14&ty=u
>
>
> Gregory S. Read
> ---------------
> Lots of Win32 work (need you to sign off on whole
> file):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/platform/win32.c?rt=physfs
>
> Microsoft .NET bindings (need you to sign off on
> whole directory tree):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/extras/PhysFS.NET?rt=physfs
>
>
> John Hall
> ---------
> PHYSFS_getLastModTime() API:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs.c?rt=physfs&r1=1.39&r2=1.40&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/macclassic.c?rt=physfs&r1=1.9&r2=1.10&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/posix.c?rt=physfs&r1=1.1&r2=1.2&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/skeleton.c?rt=physfs&r1=1.3&r2=1.4&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/win32.c?rt=physfs&r1=1.18&r2=1.19&ty=u
>
>
> Alexander Pipelka
> -----------------
> configure.in fixes:
>
>
http://cvs.icculus.org/horde/chora/diff.php/configure.in?rt=physfs&r1=1.19&r2=1.20&ty=u
>
> doOpen() fix:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/posix.c?rt=physfs&ws=0&r1=1.6&r2=1.7&ty=u
>
> Strange $PATH fix:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&ws=0&r1=1.38&r2=1.39&ty=u
>
>
> Edward Rudd
> -----------
> RPM specfile (need you to sign off on whole file):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/physfs.spec.in?rt=physfs
>
>
> Ed Sinjiashvili
> ---------------
> Various Russian translations:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.33&r2=1.34&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.34&r2=1.35&ty=u
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.37&r2=1.38&ty=u
>
> Ruby bindings (need you to sign off on whole
> directory tree):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/extras/physfs_rb?rt=physfs
>
> QPAK archiver (need you to sign off on whole file):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/archivers/qpak.c?rt=physfs
>
>
> Pedro J. P^Îrez
> ---------------
> Spanish translation:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.35&r2=1.36&ty=u
>
>
> Stepane Peter
> -------------
> French translation:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.36&r2=1.37&ty=u
>
>
> Michael Renner
> --------------
> German translation:
>
>
http://cvs.icculus.org/horde/chora/diff.php/physfs_internal.h?rt=physfs&r1=1.42&r2=1.43&ty=u
>
>
> Adam D. Moss
> ------------
> extras/abs-file.h (need you to sign off on whole
> file):
>
>
http://cvs.icculus.org/horde/chora/co.php/extras/abs-file.h?rt=physfs&r=1.3
>
>
> "Corona688"
> -----------
> Initial PocketPC port (need you to sign off on
> whole file):
>
>
http://cvs.icculus.org/horde/chora/co.php/platform/pocketpc.c?rt=physfs&r=1.1
>
>
> Eric Wing
> ---------
> Apple Project Builder build system (need you to
> sign off on whole dir tree):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/PBProjects?rt=physfs
>
> MacOS X Application Bundle workarounds:
>
>
http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&r1=1.39&r2=1.40&ty=u
>
>
> Colin Bayer
> -----------
> Debian package support (need you to sign off on
> whole directory tree):
>
>
http://cvs.icculus.org/horde/chora/cvs.php/debian?rt=physfs
>
>
> Bradley Bell
> ------------
> HOG archiver:
>
>
http://cvs.icculus.org/horde/chora/cvs.php/archivers/hog.c?rt=physfs
>
> MVL archiver:
>
>
http://cvs.icculus.org/horde/chora/cvs.php/archivers/mvl.c?rt=physfs
>
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
From xxxxxxxxxxxxxxxx Fri Jun 20 18:07:25 2003
Date: 16 Jun 2003 16:41:31 +0200
From: Alexander Pipelka <xxxxxxxxxxxxxxxxxx>
To: "icculus@clutteredmind.org" <icculus@clutteredmind.org>
Subject: Re: [physfs] License change proposition.
Hi Ryan,
No problem. Please change the licensing model as you like.
Alex
PS: Sorry for my late reply, I just returned from vacation.
Am Mon, 2003-06-09 um 12.50 schrieb Ryan C. Gordon:
> Alexander Pipelka
> -----------------
> configure.in fixes:
> http://cvs.icculus.org/horde/chora/diff.php/configure.in?rt=physfs&r1=1.19&r2=1.20&ty=u
>
> doOpen() fix:
> http://cvs.icculus.org/horde/chora/diff.php/platform/posix.c?rt=physfs&ws=0&r1=1.6&r2=1.7&ty=u
>
> Strange $PATH fix:
> http://cvs.icculus.org/horde/chora/diff.php/platform/unix.c?rt=physfs&ws=0&r1=1.38&r2=1.39&ty=u
From xxxxxxxxxxxxxx Thu Jul 10 03:27:43 2003
Date: Thu, 10 Jul 2003 00:10:16 -0700
From: "xxxxxxxxxxx" <xxxxxxxxxxxxx>
To: "icculus@icculus.org" <icculus@icculus.org>
Subject: physfs
I hereby assign the copyright of any changes I have made to PhysicsFS to Ryan Gordon.
And thanks for asking, even though I obviously wouldn't have a problem with this.
-John
From xxxxxxxxxxxxxxxx Thu Jul 10 04:26:07 2003
Date: 10 Jul 2003 01:23:25 -0700
From: Colin Bayer <xxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@icculus.org>
Subject: physicsfs/zlib
> Here's how this works: I've compiled a list of all contributors to
PhysicsFS
> and what was contributed. I need from these people a message saying that they
> will approve a switch to the zlib license. Nothing fancy, just quote this
> email and say something like "I approve of a switch to the zlib license for
> code I own in PhysicsFS." You still own the copyright on that bit of code, but
> it'll be under the zlib license.
I approve of a switch to the zlib license for code I own in PhysicsFS.
-- Colin Bayer <xxxxxxxxxxxxxxx>
[ Part 2, "This is a digitally signed message part" ]
[ Application/PGP-SIGNATURE 196bytes. ]
[ Unable to print this part. ]
From xxxxxxxxxxxxxxx Thu Jul 10 14:40:34 2003
Date: Thu, 10 Jul 2003 13:17:00 -0500
From: Patrick Stein <xxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: PhysicsFS license change.
Wow... forgot that I had ever written anything for that...
Anyhow... in addition to having no problems with you
changing the license.... I also give to you any say in
any future matters pertaining to the two or three lines
of code that I sent you. 8^)
alter,
Patrick
On Thursday, July 10, 2003, at 01:07 PM, Ryan C. Gordon wrote:
>
> Hey there,
>
> I'm looking to change the licensing on PhysicsFS from LGPL to the zlib
> license. The long explanation is here:
>
>
> http://icculus.org/cgi-bin/ezmlm/ezmlm-
> cgi?4:mss:209:200306:nhnacekcfbbhichggfpk
>
> If you're reading this, it means that I never got a response on the
> mailing list, either because you aren't subscribed, or because you
> missed
> it, and this is the last email address I have for you....but I need
> explicit permission from you to convert code you wrote (even if it was
> just a natural language translation) to a different license.
>
> If you don't mind switching to zlib, please respond with something
> along
> the lines of "I approve of a switch to the zlib license for code I own
> in
> PhysicsFS."
>
> If you have any problems, that's okay, too, just let me know.
>
> Thanks,
> --ryan.
>
From xxxxxxxxxxxxxx Thu Jul 10 14:40:40 2003
Date: 10 Jul 2003 11:33:26 -0700
From: Stephane Peter <xxxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: PhysicsFS license change.
You know, I don't think I ever contributed code to physfs, but if you
manage to find out something I may have, then you have my approval to
switch it to the zlib license...
On Thu, 2003-07-10 at 11:07, Ryan C. Gordon wrote:
> Hey there,
>
> I'm looking to change the licensing on PhysicsFS from LGPL to the zlib
> license. The long explanation is here:
>
> http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?4:mss:209:200306:nhnacekcfbbhichggfpk
>
> If you're reading this, it means that I never got a response on the
> mailing list, either because you aren't subscribed, or because you missed
> it, and this is the last email address I have for you....but I need
> explicit permission from you to convert code you wrote (even if it was
> just a natural language translation) to a different license.
>
> If you don't mind switching to zlib, please respond with something along
> the lines of "I approve of a switch to the zlib license for code I own in
> PhysicsFS."
>
> If you have any problems, that's okay, too, just let me know.
>
> Thanks,
> --ryan.
--
Stephane Peter
Sr. Software Engineer
Codehost, Inc.
From xxxxxxxxxxxx Thu Jul 10 21:07:13 2003
Date: Fri, 11 Jul 2003 00:08:44 +0200 (CEST)
From: Michael Renner <xxxxxxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: PhysicsFS license change.
On Thu, 10 Jul 2003, Ryan C. Gordon wrote:
>
> Hey there,
>
> I'm looking to change the licensing on PhysicsFS from LGPL to the zlib
> license. The long explanation is here:
Hi Ryan!
For your mailfilters:
"I approve of a switch to the zlib license for code I own in PhysicsFS."
The change of license makes sense, what use is a library when the target
audience is reluctant to use it. Keep up the good work.
Btw. if you need any other non-babelfish english -> german translations
just contact me.
best regards,
michael renner
From xxxxxxxxxxxxx Mon Jul 14 16:36:06 2003
Date: Sat, 12 Jul 2003 22:57:28 -0400
From: Gregory S. Read <xxxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: PhysicsFS license change.
I have no problem with you licensing my contributed code for PhysFS to
the zlib licensing.
Have a nice day.
Greg
Ryan C. Gordon wrote:
>Hey there,
>
>I'm looking to change the licensing on PhysicsFS from LGPL to the zlib
>license. The long explanation is here:
>
> http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?4:mss:209:200306:nhnacekcfbbhichggfpk
>
>If you're reading this, it means that I never got a response on the
>mailing list, either because you aren't subscribed, or because you missed
>it, and this is the last email address I have for you....but I need
>explicit permission from you to convert code you wrote (even if it was
>just a natural language translation) to a different license.
>
>If you don't mind switching to zlib, please respond with something along
>the lines of "I approve of a switch to the zlib license for code I own in
>PhysicsFS."
>
>If you have any problems, that's okay, too, just let me know.
>
>Thanks,
>--ryan.
>
>
>
>
From xxxxxxxxxxxx Mon Jul 14 16:36:15 2003
Date: Mon, 14 Jul 2003 14:26:38 -0600
From: Tyler Montbriand <xxxxxxxxxxxxx>
To: Ryan C. Gordon <icculus@clutteredmind.org>
Subject: Re: PhysicsFS license change.
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Hello. Sorry for delay in reply, things've been messed up for the last couple
while..
I think that changing it to the Zlib license is a great idea... never
realized there were those sort of complications with the LGPL - thought it
was a much less restrictive license than your plain vanilla GPL, but I guess
not less restrictive enough. I've no problem at all with you putting any of
the code I've contributed under the Zlib license.
-Tyler Montbriand/Corona688
On Thursday 10 July 2003 12:07 pm, you wrote:
> Hey there,
>
> I'm looking to change the licensing on PhysicsFS from LGPL to the zlib
> license. The long explanation is here:
>
>
> http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?4:mss:209:200306:nhnacekcfbbhich
>ggfpk
>
> If you're reading this, it means that I never got a response on the
> mailing list, either because you aren't subscribed, or because you missed
> it, and this is the last email address I have for you....but I need
> explicit permission from you to convert code you wrote (even if it was
> just a natural language translation) to a different license.
>
> If you don't mind switching to zlib, please respond with something along
> the lines of "I approve of a switch to the zlib license for code I own in
> PhysicsFS."
>
> If you have any problems, that's okay, too, just let me know.
>
> Thanks,
> --ryan.