mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Update to current release
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@32970 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
650fbb0a4e
commit
31098241ae
1109 changed files with 92227 additions and 102013 deletions
19
ANNOUNCE
19
ANNOUNCE
|
@ -1,7 +1,7 @@
|
|||
1 Announcement
|
||||
**************
|
||||
|
||||
The GNUstep Base Library, version 1.20.1, is now available.
|
||||
The GNUstep Base Library, version 1.14.0, is now available.
|
||||
|
||||
1.1 What is the GNUstep Base Library?
|
||||
=====================================
|
||||
|
@ -18,20 +18,27 @@ portion of the OpenStep standard (the Foundation library).
|
|||
There is more information available at the GNUstep homepage at
|
||||
`http://www.gnustep.org'.
|
||||
|
||||
1.2 Noteworthy changes in version `1.20.1'
|
||||
1.2 Noteworthy changes in version `1.14.0'
|
||||
==========================================
|
||||
|
||||
This is a stable bugfix release. There are no major changes or binary
|
||||
incompatibilities, but this release does include an update of timezone
|
||||
handling to include the latest zone information.
|
||||
Many portability (particularly for ms-windows) and MacOS-X
|
||||
compatibility fixes. New MacOS-X classes and incorporation of
|
||||
NSAffineTransform and NSSpellServer which were formerly in the gui
|
||||
library. Improved performance of amssively multithreaded programs.
|
||||
|
||||
1.3 Where can you get it? How can you compile it?
|
||||
==================================================
|
||||
|
||||
The gnustep-base-1.20.1.tar.gz distribution file has been placed at
|
||||
The gnustep-base-1.14.0.tar.gz distribution file has been placed at
|
||||
`ftp://ftp.gnustep.org/pub/gnustep/core'.
|
||||
|
||||
Please log bug reports on the GNUstep project page
|
||||
`http://savannah.gnu.org/bugs/?group=gnustep' or send bug reports to
|
||||
<bug-gnustep@gnu.org>.
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
|
||||
|
|
675
COPYINGv3
675
COPYINGv3
|
@ -1,675 +0,0 @@
|
|||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, 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
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state 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 program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -213,7 +213,7 @@ notice and this notice are preserved.
|
|||
which contain characters not legal in XML. GNUstep always
|
||||
generates legal XML, at the cost of a certain degree of
|
||||
compatibility. GNUstep XML property lists use a backslash
|
||||
to escape illegal characters, and consequently any string
|
||||
to escape illegal chatracters, and consequently any string
|
||||
containing either a backslash or an illegal character will
|
||||
be written differently to the same string on MacOS-X.
|
||||
</p>
|
||||
|
@ -272,35 +272,11 @@ notice and this notice are preserved.
|
|||
<term>GNUSTEP_STACK_TRACE</term>
|
||||
<desc>
|
||||
<p>
|
||||
When this is set to <em>YES</em> a human readable stack trace
|
||||
(with function names and line numbers) is added to the output
|
||||
of the description method of a raised exception object.<br />
|
||||
This only works if gnustep was built with support for it
|
||||
using libbfd, so it may not be available on all systems.
|
||||
</p>
|
||||
<p>
|
||||
When this is set to <em>NO</em> the raw stack trace provided
|
||||
by [NSException-callStackReturnAddresses] is didsabled.<br />
|
||||
The possible reasons for disabling this are:<br />
|
||||
1. that the feature is implemented using a function of the
|
||||
gcc complier to provide stack addresses, and the function is
|
||||
buggy on some systems/compiler versions, and will cause a
|
||||
signal to be sent which would crash your program if not caught.
|
||||
The GNUstep code catches the signal and recovers using a signal
|
||||
handler, but there have been two reports of this not working
|
||||
with no known cause.<br />
|
||||
2. that you have code which uses exceptions in a way in which
|
||||
they were not designed to be used ... so that they are
|
||||
routinely and frquently called rather than being called only
|
||||
occasionally when exceptional conditions occur. In this case
|
||||
you may want to disable the stack frame generation implicit
|
||||
in each raised exception, in order to improve performance.
|
||||
</p>
|
||||
<p>
|
||||
When this is not set, or is set to a non-boolean value, the
|
||||
stack trace handling on exceptionsis MacOS-X compatible ...
|
||||
stack return addresses are available but a human readable
|
||||
traceback is not logged.
|
||||
When this is set to <em>YES</em> a stack trace is placed in
|
||||
the user information dictionary of the NSException object
|
||||
created when an exception is raised. The trace is keyed
|
||||
on <code>GSStackTraceKey</code> and provides additional
|
||||
information to let you know where the exception occurred.
|
||||
</p>
|
||||
</desc>
|
||||
<term>GNUSTEP_STRING_ENCODING</term>
|
||||
|
@ -388,13 +364,6 @@ notice and this notice are preserved.
|
|||
or you want to use an alternative config file for some reason.
|
||||
</p>
|
||||
</desc>
|
||||
<term>GNUSTEP_BEHAVIOR_DEBUG</term>
|
||||
<desc>
|
||||
A boolean (YES or NO) which can be used to turn on debug
|
||||
logging (to stderr) of the GSObjCRuntime functions to
|
||||
add/override methods in a class using a list of methods
|
||||
from another class.
|
||||
</desc>
|
||||
<term>HOMEDRIVE</term>
|
||||
<desc>
|
||||
<p>
|
||||
|
@ -517,90 +486,37 @@ notice and this notice are preserved.
|
|||
of no name.<br />
|
||||
System paths are defined by the following:
|
||||
</p>
|
||||
<deflist>
|
||||
<term>GNUSTEP_SYSTEM_APPS</term>
|
||||
<desc>This is where System GUI Applications get installed.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Applications.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_ADMIN_APPS</term>
|
||||
<desc>This is where System GUI Applications that only the
|
||||
Administrator can use get installed.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Applications/Admin.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_WEB_APPS</term>
|
||||
<desc>This is where System Web Applications (GSWeb, SOPE) get
|
||||
installed.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Library/WebApplications.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_TOOLS</term>
|
||||
<desc>This is where System Command-Line Tools get installed.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Tools.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_ADMIN_TOOLS</term>
|
||||
<desc>This is where System Command-Line Tools that only the
|
||||
Administrator can use get installed. Important: this
|
||||
should not be in the PATH of normal users.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Tools/Admin.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_LIBRARY</term>
|
||||
<desc>This is where System resources get installed.
|
||||
This directory will contain a lot of executable code
|
||||
since *step traditionally likes to
|
||||
bundle executables and resources together.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Library.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_HEADERS</term>
|
||||
<desc>This is where System headers get installed. They are the
|
||||
library .h headers.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Library/Headers.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_LIBRARIES</term>
|
||||
<desc>This is where System libraries get installed.
|
||||
By libraries we mean the shared/static object files that
|
||||
you can link into programs.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Library/Libraries.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_DOC</term>
|
||||
<desc>This is where System documentation get installed.
|
||||
This is known not to contain any executable, so we keep
|
||||
it separate.<br />
|
||||
Traditionally it is /usr/GNUstep/System/Library/Documentation.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_DOC_MAN</term>
|
||||
<desc>This is where System man pages get installed.<br />
|
||||
Traditionally it is
|
||||
/usr/GNUstep/System/Library/Documentation/man.
|
||||
</desc>
|
||||
<term>GNUSTEP_SYSTEM_DOC_INFO</term>
|
||||
<desc>This is where System info pages get installed.<br />
|
||||
Traditionally it is
|
||||
/usr/GNUstep/System/Library/Documentation/info.
|
||||
</desc>
|
||||
</deflist>
|
||||
<deflist>
|
||||
<term>GNUSTEP_SYSTEM_ROOT</term>
|
||||
<desc>
|
||||
Used to specify the GNUstep system root directory ... all
|
||||
system libraries, tools, applications, headers, resources
|
||||
in general are located relative to this.
|
||||
</desc>
|
||||
<term>GNUSTEP_NETWORK_ROOT</term>
|
||||
<desc>
|
||||
Used to specify the GNUstep root directory for local
|
||||
(non-system) resources that are intended to be shared
|
||||
across a local network. Typically this is an NFS exported
|
||||
directory shared by many machines. It provides an
|
||||
alternative to GNUSTEP_LOCAL_ROOT but is usually defined
|
||||
to the same value.
|
||||
</desc>
|
||||
<term>GNUSTEP_LOCAL_ROOT</term>
|
||||
<desc>
|
||||
Used to specify the GNUstep root directory for local
|
||||
(non-system) resources. Typically all locally produced
|
||||
or contributed software is installed relative to this.
|
||||
</desc>
|
||||
</deflist>
|
||||
<p>
|
||||
In addition to the above SYSTEM domain paths, there are
|
||||
corresponding LOCAL, NETWORK, and USER domain paths (with the
|
||||
same names except for replacing 'SYSTEM' with 'LOCAL', 'NETWORK',
|
||||
or 'USER'.<br />
|
||||
All these paths must be absolute, except for the USER domain
|
||||
paths which, if not absolute, are considered to be with the
|
||||
user's home directory.<br />
|
||||
NB. as a special case a path may begin with './' or '../' when
|
||||
it is to be resolved to an absolute path relative to the
|
||||
location of the GNUstep configuration file.
|
||||
So while such paths appear to be relative, they actually produce
|
||||
absolute locations at runtime since the location of the
|
||||
configuration file is known.<br />
|
||||
Finally, for paths in the USER domain only, a limited substitution
|
||||
into the path is performed at runtime as follows:<br />
|
||||
'%u' is replaced by the user name<br />
|
||||
'%i' is replaced by the user ID<br />
|
||||
'%%' is replaced by a single '%'<br />
|
||||
</p>
|
||||
<p>
|
||||
Other paths for each user are defined by the following:
|
||||
Paths for each user are defined by the following:
|
||||
</p>
|
||||
<deflist>
|
||||
<term>GNUSTEP_USER_DIR</term>
|
||||
<desc>Path for user specific GNUstep resources (eg. 'GNUstep').
|
||||
Relative to the user's home directory.
|
||||
</desc>
|
||||
<term>GNUSTEP_USER_CONFIG_FILE</term>
|
||||
<desc>Name of user configuration file (eg. '.GNUstep.conf')
|
||||
relative to the user's home directory.<br />
|
||||
|
@ -609,7 +525,7 @@ notice and this notice are preserved.
|
|||
</desc>
|
||||
<term>GNUSTEP_USER_DEFAULTS_DIR</term>
|
||||
<desc>Name of directory for user defaults files.
|
||||
Always relative to the user's home directory except:<br />
|
||||
Relative to the user's home directory.<br />
|
||||
On mswindows this may be set to be ':REGISTRY:' to have defaults
|
||||
stored in the windows registry rather than in the standard file
|
||||
format.<br />
|
||||
|
@ -626,12 +542,48 @@ notice and this notice are preserved.
|
|||
HOMEDRIVE and HOMEPATH environment variables (or the USERPROFILE
|
||||
environment variable if the others can't be used).
|
||||
</p>
|
||||
<p>
|
||||
Support is provided to locate OS/PLATFORM directories. A conf file
|
||||
may provide the definitions below (with examples typical for
|
||||
when GNUstep is installed according to the Linux
|
||||
Filesystem Hierarchy standard):
|
||||
</p>
|
||||
<deflist>
|
||||
<term>GNUSTEP_SYS_APPS</term>
|
||||
<desc>Place for system/os applications (eg. '/bin')</desc>
|
||||
<term>GNUSTEP_SYS_LIBS</term>
|
||||
<desc>Place for system/os shared libraries (eg. '/lib')</desc>
|
||||
<term>GNUSTEP_SYS_ADMIN</term>
|
||||
<desc>Place for system administration tools (eg. '/sbin')</desc>
|
||||
<term>GNUSTEP_PLATFORM_APPS</term>
|
||||
<desc>Place for non-gnustep applications (eg. '/usr/bin')</desc>
|
||||
<term>GNUSTEP_PLATFORM_LIBS</term>
|
||||
<desc>Place for application shared libraries
|
||||
(eg. '/usr/lib')</desc>
|
||||
<term>GNUSTEP_PLATFORM_RESOURCES</term>
|
||||
<desc>Place for shared application resources
|
||||
(eg. '/usr/share')</desc>
|
||||
<term>GNUSTEP_PLATFORM_ADMIN</term>
|
||||
<desc>Place for non-critical administrative tools
|
||||
(eg. '/usr/sbin')</desc>
|
||||
<term>GNUSTEP_PLATFORM_LOCAL_APPS</term>
|
||||
<desc>Place for machine local applications
|
||||
(eg. '/usr/local/bin')</desc>
|
||||
<term>GNUSTEP_PLATFORM_LOCAL_LIBS</term>
|
||||
<desc>Place for machine local shared libraries
|
||||
(eg. '/usr/local/lib/')</desc>
|
||||
<term>GNUSTEP_PLATFORM_LOCAL_RESOURCES</term>
|
||||
<desc>Place for machine local resources.
|
||||
(eg. '/usr/local/share')</desc>
|
||||
</deflist>
|
||||
<p>
|
||||
These add to the path for NSSystemDomainMask, or
|
||||
NSLocalDomainMask as appropriate.
|
||||
</p>
|
||||
<p>
|
||||
All the above values from the configuration file are made
|
||||
available in the NSUserDefaults system at runtime, in the
|
||||
GSConfigDomain (along with any defaults provided in the
|
||||
GlobalDefaults.plist file in the same directory as the
|
||||
config file).<br />
|
||||
GSConfigDomain of the defaults.<br />
|
||||
In addition, the configuration file may contain the key
|
||||
<em>GNUSTEP_EXTRA</em> with a value set to be a comma separated
|
||||
list of extra key names which are to be allowed in the config
|
||||
|
@ -681,56 +633,42 @@ notice and this notice are preserved.
|
|||
<p>
|
||||
Firstly, variables in the configuration file which define
|
||||
paths, are expected to by full path specifications, except
|
||||
for the special case in which they begin with dot-slash (./)
|
||||
or dot-dot-slash (../).<br />
|
||||
In this case the path from the variable is appended to the
|
||||
path of the directory containing the configuration file
|
||||
(or the path specified to contain the configuration file if no
|
||||
configuration file exists) to form the value used.<br />
|
||||
So, if you configure other paths relative to the configuration
|
||||
file, you can relocate everything when you move the
|
||||
configuration file.
|
||||
for the special case in which they begin with dot-slash (./).
|
||||
In this case the text after the dot-slash is appended to
|
||||
the path to the directory containing the configuration file
|
||||
(or specified to contain the configuration file if no
|
||||
configuration file exists) to form the value used.
|
||||
</p>
|
||||
<p>
|
||||
Secondly, If the value of the path built in to the base library
|
||||
as the location of the config file (or specified by
|
||||
the GNUSTEP_CONFIG_FILE environment variable unless that option
|
||||
was disabled when the base library was configured)
|
||||
begins with a dot-slash (./) or dot-dot-slash (../) then the path
|
||||
used for that file is made relative to the base library.<br />
|
||||
The base library contains code to determine its own location,
|
||||
so this allows it to locate the configuration file, and by
|
||||
reading the configuration file it determines where all other
|
||||
resources are located.
|
||||
begins with a dot and slash (./) then the path used for that
|
||||
file is made relative to the base library.<br />
|
||||
ie the text after the dot-slash is appended to the path of the
|
||||
directory containing the gnustep-base library.
|
||||
</p>
|
||||
<p>
|
||||
So you can bundle the whole lot together in one directory,
|
||||
and configure various relative paths in that directory, then
|
||||
move the directory around wherever you like.
|
||||
</p>
|
||||
</subsect>
|
||||
<subsect>
|
||||
<heading>Lock-Down</heading>
|
||||
<p>
|
||||
If you wish to <em>lock down</em> a production system for
|
||||
distribution so that users can't change the config
|
||||
file and mess up paths, you can specify the config file name as
|
||||
distribution as a relocatable package, so it can be installed
|
||||
anywhere, but users can't accidentally change the config file
|
||||
and mess up paths, you can specify the config file name as
|
||||
a path with a trailing slash so that the base library will
|
||||
<em>not</em> read it, and will use the builtin default values.<br />
|
||||
To do this, you would configure using options like
|
||||
<code>--disable-environment-config-file</code> with
|
||||
<code>--with-config-file=/not-used/</code> and
|
||||
<code>--with-default-config=myConfig</code> where <em>myConfig</em>
|
||||
is a file containing the paths you want to use in the locked down
|
||||
system.<br />
|
||||
To do this, you would configure using the options
|
||||
<code>--with-config-file=./</code> and
|
||||
<code>--with-default-file=myConfig</code> where <em>myConfig</em>
|
||||
is a file containing the paths you want to use relative to the
|
||||
location the base library gets installed in.<br />
|
||||
The paths from that file will be built in to the base library
|
||||
as defaults, and library will use them rather than attempting
|
||||
to read a config file at runtime.<br />
|
||||
You can lock down a relocatable system by using this procedure
|
||||
with './' as the config file path and relative paths in myConfig...
|
||||
a user could then move the entire package around, but would not
|
||||
be able to edit a configuration file to alter the paths within
|
||||
the pacakge.
|
||||
to read a config file at runtime.
|
||||
</p>
|
||||
</subsect>
|
||||
<subsect>
|
||||
|
@ -754,6 +692,10 @@ notice and this notice are preserved.
|
|||
are also ignored.
|
||||
</p>
|
||||
<p>
|
||||
User specific files are stored in the locaton given by
|
||||
GNUSTEP_USER_DIR (by default, the
|
||||
<code>GNUstep</code> subdirectory of the users home
|
||||
directory).<br />
|
||||
The defaults database for a user is stored in the
|
||||
subdirectory of the users home directory given by
|
||||
GNUSTEP_USER_DEFAULTS_DIR (by default, the
|
||||
|
|
|
@ -837,6 +837,8 @@ ftp
|
|||
func
|
||||
functionName
|
||||
gcc
|
||||
GCFinalization
|
||||
gcFinalize
|
||||
gcontext
|
||||
gdnc
|
||||
GDNCHost
|
||||
|
@ -879,6 +881,7 @@ groupsByEvent
|
|||
GSApplicationSupportDirectory
|
||||
GSAtomicMallocZone
|
||||
GSBreakTime
|
||||
GSCategories
|
||||
GSCurrentThread
|
||||
GSCurrentThreadDictionary
|
||||
GSDebugAllocation
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -23,28 +23,21 @@
|
|||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(warning )
|
||||
$(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
|
||||
$(warning Perhaps gnustep-make is not properly installed,)
|
||||
$(warning so gnustep-config is not in your PATH.)
|
||||
$(warning )
|
||||
$(warning Your PATH is currently $(PATH))
|
||||
$(warning )
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
|
||||
endif
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
# Install into the system root by default
|
||||
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
|
||||
|
||||
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../base.make
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
-include ../Version
|
||||
-include ../config.mak
|
||||
include ../Version
|
||||
include ../config.mak
|
||||
|
||||
# The documents to be generated
|
||||
DOCUMENT_NAME = coding-standards
|
||||
|
@ -56,7 +49,7 @@ SUBPROJECTS = manual General
|
|||
|
||||
# The text documents to be generated
|
||||
DOCUMENT_TEXT_NAME = \
|
||||
INSTALL NEWS README ANNOUNCE
|
||||
INSTALL NEWS CODING-STANDARDS README ANNOUNCE
|
||||
|
||||
TOP_DOC_FILES = INSTALL NEWS README ANNOUNCE
|
||||
|
||||
|
@ -78,10 +71,6 @@ NEWS_TEXI_FILES = version.texi
|
|||
NEWS_TEXT_MAIN = news.texi
|
||||
NEWS_DOC_INSTALL_DIR = Developer/Base/ReleaseNotes/$(VERSION)
|
||||
|
||||
CODING-STANDARDS_TEXI_FILES = version.texi
|
||||
CODING-STANDARDS_TEXT_MAIN = coding-standards.texi
|
||||
CODING-STANDARDS_DOC_INSTALL_DIR = Developer/CodingStandards
|
||||
|
||||
README_TEXI_FILES = version.texi
|
||||
README_TEXT_MAIN = readme.texi
|
||||
README_DOC_INSTALL_DIR = Developer/Base/ReleaseNotes/$(VERSION)
|
||||
|
@ -111,10 +100,12 @@ BASE_MAKE_LOADED=yes
|
|||
# file using the make file ../Source/DocMakefile. If headers are added to the
|
||||
# library, you need to modify that file to get the autogsdoc tool to use them.
|
||||
#
|
||||
REF_DOC_INSTALL_DIR = $(GNUSTEP_DOC)/Developer
|
||||
REF_DOC_INSTALL_DIR = $(GNUSTEP_DOCUMENTATION)/Developer
|
||||
|
||||
-include Makefile.preamble
|
||||
|
||||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -23,7 +23,8 @@
|
|||
# Boston, MA 02111 USA
|
||||
#
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
# Install into the system root by default
|
||||
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
include ../../config.mak
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -81,7 +81,10 @@ endif
|
|||
|
||||
# Things to do after uninstalling
|
||||
after-uninstall::
|
||||
rm -rf $(REF_DOC_INSTALL_DIR)
|
||||
rm -rf $(REF_DOC_INSTALL_DIR)/Base/Reference
|
||||
rm -rf $(REF_DOC_INSTALL_DIR)/BaseAdditions/Reference
|
||||
rm -rf $(REF_DOC_INSTALL_DIR)/Tools/Reference
|
||||
-rmdir $(REF_DOC_INSTALL_DIR)
|
||||
|
||||
# Things to do before cleaning
|
||||
# before-clean::
|
||||
|
@ -120,6 +123,14 @@ version.texi: ../Version
|
|||
if [ $(GNUSTEP_BASE_FTP_DIRECTORY) ]; then \
|
||||
echo '@set GNUSTEP-BASE-FTP-DIRECTORY $(GNUSTEP_BASE_FTP_DIRECTORY)' \
|
||||
>> version.texi; fi
|
||||
if [ $(GNUSTEP_BASE_SNAP_FTP_MACHINE) ]; then \
|
||||
echo '@set GNUSTEP-BASE-SNAP-FTP-MACHINE \
|
||||
$(GNUSTEP_BASE_SNAP_FTP_MACHINE)' \
|
||||
>> version.texi; fi
|
||||
if [ $(GNUSTEP_BASE_SNAP_FTP_DIRECTORY) ]; then \
|
||||
echo '@set GNUSTEP-BASE-SNAP-FTP-DIRECTORY \
|
||||
$(GNUSTEP_BASE_SNAP_FTP_DIRECTORY)' \
|
||||
>> version.texi; fi
|
||||
|
||||
regenerate: $(DOCUMENT_TEXT_NAME)
|
||||
mv $(TOP_DOC_FILES) ..
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN" "http://www.gnustep.org/gsdoc-1_0_1.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN" "http://www.gnustep.org/gsdoc-1_0_1.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -24,507 +24,10 @@ notice and this notice are preserved.
|
|||
<chapter>
|
||||
<heading>Base Release Notes</heading>
|
||||
<p>
|
||||
The release notes include descriptions of API changes, behaviour
|
||||
The release notes include descriptions of API changes, behavior
|
||||
changes and other information that might help developers and users
|
||||
migrate to using a newer version of the library.
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.20.2</heading>
|
||||
<p>This is a stable bugfix release. The changes in this release
|
||||
are a rewrite of the netservices code to use libavahi if available,
|
||||
additional languages added, and various bug fixes and portability
|
||||
updates.
|
||||
</p>
|
||||
<deflist>
|
||||
<term>NSBundle</term>
|
||||
<desc>Fix for loading frameworks with relative paths.<br />
|
||||
Fix error in lookup of localized resources.
|
||||
</desc>
|
||||
<term>NSCalendarDate</term>
|
||||
<desc>Fix AM/PM parsing to treat 12 AM as midnight, and to return
|
||||
nil if the format requires a timezone and none is supplied.
|
||||
</desc>
|
||||
<term>NSkeyedArchiver</term>
|
||||
<desc>Implement missing methods and add range checks.</desc>
|
||||
<term>NSMutableSet</term>
|
||||
<desc>Fix for use the correct class when coding.</desc>
|
||||
<term>NSNetServices</term>
|
||||
<desc>Implement using avahi if available<br />
|
||||
<term>NSNotificationQueue</term>
|
||||
<desc>Fix for rare loss of notifications.</desc>
|
||||
<term>NSNumber</term>
|
||||
<desc>Fixes for storing booleans in keyed archives.</desc>
|
||||
<term>NSPathUtilities</term>
|
||||
<desc>Fix to support absolute paths in the user domain.</desc>
|
||||
<term>NSString</term>
|
||||
<desc>Fix memory management issue loading from URL.</desc>
|
||||
<term>NSTask</term>
|
||||
<desc>Fix for thread safety issue on task termination.</desc>
|
||||
<term>NSThread</term>
|
||||
<desc>Fix for deadlock when asked to perform too many operations
|
||||
in another thread.</desc>
|
||||
<term>NSURL</term>
|
||||
<desc>Implement keyed archiving.</desc>
|
||||
<term>NSZombie</term>
|
||||
<desc>Improve handling of -release.</desc>
|
||||
<term>autogdoc</term>
|
||||
<desc>Support paragraph markup generation on pairs of newlines.</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.20.1</heading>
|
||||
<p>This is a stable bugfix release. The changes in this release
|
||||
are a timezone handling update to the latest zone information,
|
||||
various minor bug fixes and portibility updates, some small
|
||||
cleanups and optimisations, a few tweaks to help packagers,
|
||||
and finally an alteration to the additions library on OSX to
|
||||
add a category to re-enable serialisation of property lists
|
||||
in the more readable and compact OpenStep format (something the
|
||||
most recent versions of OSX lost).
|
||||
</p>
|
||||
<deflist>
|
||||
<term>NSAttributedString</term>
|
||||
<desc>Fixes for keyed archiving/unarchiving.</desc>
|
||||
<term>NSData</term>
|
||||
<desc>Improve reading of non-standard files (eg /proc filesystem).
|
||||
</desc>
|
||||
<term>NSHashTable</term>
|
||||
<desc>Fix minor buffer overrun.</desc>
|
||||
<term>NSInvocation</term>
|
||||
<desc>Fix for problem with FFI when caching the method implementation
|
||||
of a proxy.
|
||||
</desc>
|
||||
<term>NSNumber</term>
|
||||
<desc>Fix the +numberWith... methods to work for subclasses of
|
||||
NSNumber rather than creating instances of the default class.</desc>
|
||||
<term>NSKeyValueCoding</term>
|
||||
<desc>Fix -isKey for KVC compliance.</desc>
|
||||
<term>NSPropertyList</term>
|
||||
<desc>Fix whitespace handling in XML property lists.<br />
|
||||
Allow OpenStep style property lists to be written on OSX.
|
||||
</desc>
|
||||
<term>NSTimeZone</term>
|
||||
<desc>Update to latest zone information.<br />
|
||||
Update list of timezone abbreviations.<br />
|
||||
Improve diagnostics when no timezone is set.</desc>
|
||||
<term>GSObjCMethodNames</term>
|
||||
<desc>Fix broken implementation.</desc>
|
||||
<term>ObjectiveC2 compatibility</term>
|
||||
<desc>Bugfix for selector lookup issue.<br />
|
||||
Working implementation of checks for conformance to protocols.
|
||||
</desc>
|
||||
<term>Installation of gdomap</term>
|
||||
<desc>The installation process used to install gdomap setuid to
|
||||
root by default (for developers/hackers) and packagers were
|
||||
supposed to change that to not be setid, and start gdomap as root
|
||||
at system boot time. But packagers weren't doing that.
|
||||
The installation is now changed to install non-setuid by default
|
||||
giving packagers more of an incentive to start gdomap properly.
|
||||
</desc>
|
||||
<term>Update of fake-main mechanism</term>
|
||||
<desc>The fake-main mechanism for obtaining program arguments and
|
||||
environment requires the library to link to the gnustep_user_main
|
||||
function in any program which uses it. This caused problems where
|
||||
a distribution packaging system refuses to allow unresolved link
|
||||
symbols in a library. The code was reworked to use a weak reference
|
||||
to a local function, avoiding this problem.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.20.0</heading>
|
||||
<p>This is a stable release. There have been major changes
|
||||
and reorganizations to support, among other things, the new
|
||||
non-fragile ABI from clang. These changes, although they
|
||||
break binary compatibility with previous releases, should allow
|
||||
all future releases to maintain compatibility.
|
||||
</p>
|
||||
<deflist>
|
||||
<term>Objective-C 2</term>
|
||||
<desc>
|
||||
Add compatibility code for Objective-C 2.0 when it is not provided
|
||||
by the compiler or objc library. Some runtime wrappers for
|
||||
Objective-C have been deprecated in favour of new 2.0 API.
|
||||
</desc>
|
||||
<term>Additions library</term>
|
||||
<desc>
|
||||
Reorganized so all GNUstep extensions are in the Additions
|
||||
library files.
|
||||
</desc>
|
||||
<term>Mac OS X Compatibility</term>
|
||||
<desc>
|
||||
Various improvements for compatibility including use of
|
||||
NSInteger/NSUInteger/CGFloat
|
||||
</desc>
|
||||
<term>non-fragile ABI</term>
|
||||
<desc>
|
||||
Support added for this ABI from clang includes additions of
|
||||
an extra ivar for future expansion and hiding of ivars in some
|
||||
classes.
|
||||
</desc>
|
||||
<term>NSOperation</term>
|
||||
<desc>
|
||||
Complete NSOperation and NSOperationQueue
|
||||
(compatibile with 10.6 apart from blocks).
|
||||
</desc>
|
||||
<term>Fast Enumeration</term>
|
||||
<desc>
|
||||
Support was added.
|
||||
</desc>
|
||||
<term>NSLock</term>
|
||||
<desc>
|
||||
Complete rewrite of NSLock so they are faster, more complete and
|
||||
OS X-compatible. NSLock now depends on POSIX threads.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.19.3</heading>
|
||||
<p>This is a new unstable snapshot release of the base library
|
||||
almost identical to 1.19.2 but containing a bugfix for the
|
||||
introduction of a change in the behavior of NSURL's -path
|
||||
method to match OSX. We add a new -fullPath method which
|
||||
returns the actual path of the URL the way the old -path
|
||||
implementaiton did. This is necessary because the OSX behavior
|
||||
is to strip any trailing '/' from a path so that it's no longer
|
||||
possible to reliably build a URL string from its component parts.
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.19.2</heading>
|
||||
<p>This is a new unstable snapshot release of the base library.
|
||||
It may contain minor binary incompatibilities with the previous
|
||||
unstable release, but should generally work with software compiled
|
||||
for that release.
|
||||
</p>
|
||||
<p>This is primarily intended as a bugfix release prior to major
|
||||
rewrite of NSLock code by David Chisnall. As such, most changes
|
||||
are bugfixes and performance tweaks. Some of the main ones are
|
||||
listed below.
|
||||
</p>
|
||||
<deflist>
|
||||
<term>NSCalendarDate</term>
|
||||
<desc>
|
||||
Add OSX compatible field widths in date formats.
|
||||
</desc>
|
||||
<term>NSCharacterSet</term>
|
||||
<desc>
|
||||
Uses a much more compact internal representation to decrease the
|
||||
memory footprint of applications which make extensive use of
|
||||
charactersets.
|
||||
</desc>
|
||||
<term>NSFileHandle</term>
|
||||
<desc>
|
||||
Fixes for socket connections on mswindows.
|
||||
</desc>
|
||||
<term>NSRunLoop</term>
|
||||
<desc>
|
||||
Adds OSX compatibility changes with timers acting like input
|
||||
sources for determining blocking.
|
||||
</desc>
|
||||
<term>NSString</term>
|
||||
<desc>
|
||||
Performance improvements converting between 8bit and 16bit
|
||||
character representations.
|
||||
</desc>
|
||||
<term>NSURL</term>
|
||||
<desc>
|
||||
Support file URLs on mswindows. Include 'Host' header in requests
|
||||
to conform to W3C standards.
|
||||
</desc>
|
||||
<term>NSUserDefaults</term>
|
||||
<desc>
|
||||
Fixes for improved thread safety.
|
||||
Now stores to file in XML format.
|
||||
</desc>
|
||||
<term>Key Value Coding/Observing</term>
|
||||
<desc>
|
||||
Various improvements for OSX compatibility.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.19.1</heading>
|
||||
<p>A great deal of improvements have occured recently. This includes
|
||||
many improvements in garbage collection (first to get it working again).
|
||||
Also many Mac OS X 10.5 methods and classes have been added, as well
|
||||
as compatibility improvements.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSData</term>
|
||||
<desc>
|
||||
Implemented new Mac OS X methods for writing data.
|
||||
</desc>
|
||||
<term>NSFileManager</term>
|
||||
<desc>
|
||||
Fix -fileOwnerAccountID and -fileGroupOwnerAccountID to
|
||||
return the correct type.
|
||||
</desc>
|
||||
<term>NSHashTable, NSMapTable</term>
|
||||
<desc>
|
||||
New Mac OS X 10.5 API classes.
|
||||
</desc>
|
||||
<term>Garbage Collection</term>
|
||||
<desc>
|
||||
Get GC working again. Fixes in various classes to work
|
||||
better with GC.
|
||||
</desc>
|
||||
<term>Mac OS X 10.5 Return Types</term>
|
||||
<desc>
|
||||
Methods have been converted to use return types and
|
||||
arguments of NSInteger, NSUInteger and CGFloat. For now,
|
||||
these types are equivalent to the old types. This can be
|
||||
changed in NSObjCRuntime.h so that integer tpyes are the
|
||||
same size as a pointer, and the float type is actually a
|
||||
double on 64bit processors.
|
||||
</desc>
|
||||
<term>NSArray</term>
|
||||
<desc>
|
||||
New methods for inserting objects with NSIndexSet
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.19.0</heading>
|
||||
<p>
|
||||
This is a new unstable release of the base library. Note that
|
||||
gnustep-core is now installed in the LOCAL domain by default
|
||||
instead of the SYSTEM domain. You may want to remove old
|
||||
installations in the SYSTEM domain to avoid any
|
||||
incompatibility problems. Or you can force installation in
|
||||
SYSTEM using make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
|
||||
install.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSBundle</term>
|
||||
<desc>Improve lookup of versioned library resources and improve
|
||||
location of resources based on the location of the executable
|
||||
under ms-windows.
|
||||
</desc>
|
||||
<term>NSConnection</term>
|
||||
<desc>Adds a new keepalive mechanism to check connections at periodic
|
||||
intervals to see if the other end is still there. This is enabled
|
||||
for message ports on ms-windows, where the operating system does
|
||||
not inform us when the other end goes away, and is not needed on
|
||||
the socket based connections on Unix.
|
||||
</desc>
|
||||
<term>NSException</term>
|
||||
<desc>Implement full support for native objecive-c exceptions,
|
||||
though this requires a fix for the objc runtme which is not yet
|
||||
available in gcc. The patch for the runtime can be found at
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27466
|
||||
</desc>
|
||||
<term>NSTask</term>
|
||||
<desc>Adds a new method in a category in the Additions library ...
|
||||
The +launchPathForTool: method will locate a named tool by looking
|
||||
in all the standard locations in the USER, LOCAL, NETWORK and
|
||||
SYSTEM domains, and also by looking in PATH.
|
||||
</desc>
|
||||
<term>Portability and compatibility work</term>
|
||||
<desc>There are various minor changes to improve portability
|
||||
(both improved configuration/detection of system software and
|
||||
runtime iimprovements) to different operating systems such as
|
||||
64bit ms-windows. There are also various improvements to
|
||||
MacOS-X compatibility.
|
||||
</desc>
|
||||
<term>@synchronize</term>
|
||||
<desc>
|
||||
Implementation of runtime support for @synchronize.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.15.4</heading>
|
||||
<p>
|
||||
This is an unstable release.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSArray</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSAutoreleasePool</term>
|
||||
<desc>Dummy OSX method (-drain).</desc>
|
||||
<term>NSBundle</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSCoder</term>
|
||||
<desc>New OSX10.5 methods for NSInteger implemented.</desc>
|
||||
<term>NSConnection</term>
|
||||
<desc>New OSX10.5 methods for server connections implemented.<br />
|
||||
A keepalive facility so that daemons can tell (on mswindows)
|
||||
that all client processes have gone away, and shut themselves down.
|
||||
</desc>
|
||||
<term>NSData</term>
|
||||
<desc>New OSX method stubs.</desc>
|
||||
<term>NSException</term>
|
||||
<desc>Implement stack address reporting.</desc>
|
||||
<term>NSIndexSet</term>
|
||||
<desc>Add OSX10.5 stub for countOfIndexesInRange</desc>
|
||||
<term>NSKeyvalueObserving</term>
|
||||
<desc>OSX10.5 additions implemented</desc>
|
||||
<term>NSSet</term>
|
||||
<desc>Implemented new OSX methods.</desc>
|
||||
<term>NSStream</term>
|
||||
<desc>Implemented basic SSL/TLS support using gnu-TLS.</desc>
|
||||
<term>NSThread</term>
|
||||
<desc>Implemented new OSX methods.</desc>
|
||||
<term>NSLock, NSRecursiveLock, NSConditionLock</term>
|
||||
<desc>Implemented names.</desc>
|
||||
<term>GSXML, NSXMLParser</term>
|
||||
<desc>Fully support namespace handling and fix bugs.</desc>
|
||||
<term>NSKeyValueCoding, NSKeyValueObserving</term>
|
||||
<desc>Made fully functional and MacOS-X compatible.</desc>
|
||||
<term>Windows 64bit</term>
|
||||
<desc>Changes so that the library can be built/used for 64bit windows.
|
||||
</desc>
|
||||
<term>@synchronize</term>
|
||||
<desc>Support for new ObjC language feature.
|
||||
</desc>
|
||||
</deflist>
|
||||
<p>The current emphasis of the base library is MacOS-X compatibility,
|
||||
and the headers in this release mark many non-MacOS-X methods as being
|
||||
scheduled for removal by the next unstable release (from 1.17.0).<br />
|
||||
These methods will mostly be moved to the 'additions' library,
|
||||
(which can be built stand-alone in conjunction with the Cocoa Foundation
|
||||
framework as libgnustep-baseadd on OSX) and their declarations will
|
||||
be in the headers of that library (<GNUstepBase/...>) rather
|
||||
than in the <em>Foundation</em> directory.<br />
|
||||
NB. The markup in the headers and documentation should not be
|
||||
assumed to be exhaustive ... it is planned that the next stable
|
||||
release of the base library will enforce MacOS-X compatibility
|
||||
by default, and you will have to explicitly include headers from
|
||||
<GNUstepBase/...> in order to use GNUstep specific
|
||||
additions.<br />
|
||||
You should track the unstable branch of the base library (subversion
|
||||
trunk) to find out what changes your software actually needs to make.
|
||||
</p>
|
||||
<p>The TODO list for MacOS-X 10.5 compatibility follows,
|
||||
this is all stuff which would ideally be done by the next
|
||||
stable release of this library.
|
||||
</p>
|
||||
<list>
|
||||
<item>Remove all non OSX10.5 declarations from standard headers</item>
|
||||
<item>Implement most new method stubs.</item>
|
||||
<item>Implement new OSX10.5 NSCalendar class.</item>
|
||||
<item>Implement new OSX10.5 NSLocale class.</item>
|
||||
<item>Implement new OSX10.5 NSOperation class.</item>
|
||||
<item>Implement new OSX10.5 XML classes.</item>
|
||||
<item>Implement NSInteger coding for NSCoder subclasses.</item>
|
||||
<item>Implement support for now enumerated values
|
||||
in NSComparisonPredicate.</item>
|
||||
<item>Implement new OSX10.5 features of NSDateFormatter.</item>
|
||||
<item>Implement new OSX10.5 features of NSExpression.</item>
|
||||
<item>Implement new OSX10.5 features of NSPredicate.</item>
|
||||
<item>Implement new OSX10.5 features of NSFileManager.</item>
|
||||
<item>Implement new OSX10.5 features of NSProcessInfo.</item>
|
||||
<item>Implement new OSX10.5 NSHashTable class.</item>
|
||||
<item>Implement new OSX10.5 NSMapTable class.</item>
|
||||
<item>Implement new OSX10.5 NSPointerArray class.</item>
|
||||
<item>Implement new OSX10.5 NSLocale additions.</item>
|
||||
<item>Implement new OSX10.5 features of NSNumberFormatter.</item>
|
||||
<item>Implement new OSX10.5 features of NSNumber/NSValue.</item>
|
||||
<item>Update NSDistributedNotificationCenter
|
||||
with new OSX methods.</item>
|
||||
</list>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.15.3</heading>
|
||||
<p>
|
||||
This is an unstable release.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>Configuration/NSUserDefaults</term>
|
||||
<desc>
|
||||
Syntax within the configuration file extended so that a leading
|
||||
'../' in a path name denotes a relative path in a relocatable
|
||||
installation.<br />
|
||||
New 'GlobalDefaults.plist' file in the same directory as the main
|
||||
GNUstep config file allows packagers/sysadmins to set up global
|
||||
defaults easily.
|
||||
</desc>
|
||||
<term>NSStream</term>
|
||||
<desc>
|
||||
Addition of TLS/SSL support using GNU TLS on both unix-like
|
||||
and mswindows systems. First draft.<br />
|
||||
Additions of SOCKS proxying support for socket streams. First draft.
|
||||
</desc>
|
||||
<term>NSURLConnection</term>
|
||||
<desc>
|
||||
Added support for https using new stream code.<br />
|
||||
Added support for basic and digest authentication.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.15.2</heading>
|
||||
<p>
|
||||
This is an unstable release. Bug fixes include improved thread
|
||||
safety and Key-Value observing.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSException</term>
|
||||
<desc>
|
||||
New MacOS X methods and improved stack trace.
|
||||
</desc>
|
||||
<term>NSThread</term>
|
||||
<desc>
|
||||
New methods from Mac OS 10.5 and new ivars
|
||||
</desc>
|
||||
<term>NSDecimal and NSDecimalNumber</term>
|
||||
<desc>
|
||||
Many improvements
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.15.1</heading>
|
||||
<p>
|
||||
This is an unstable release. There have been many bug fixes, but
|
||||
also a few method additions and changes to some headers.
|
||||
Also the license for this release is now GPLv3 and LGPLv3.
|
||||
</p>
|
||||
Highlights:
|
||||
<deflist>
|
||||
<term>NSUserDefaults</term>
|
||||
<desc>
|
||||
Stores YES or NO as a string for MacOS X compatibility.
|
||||
</desc>
|
||||
<term>NSErrorRecoveryAttempting</term>
|
||||
<desc>
|
||||
Added header (and some support in the gui library).
|
||||
</desc>
|
||||
<term>NSArray</term>
|
||||
<desc>
|
||||
Added some new methods to handle multiple objects.
|
||||
</desc>
|
||||
<term>Key-Value Coding</term>
|
||||
<desc>
|
||||
More support for key-value coding.
|
||||
</desc>
|
||||
<term>NSPredicate</term>
|
||||
<desc>
|
||||
Much improved parsing. Ivars have changed in some of the predicate
|
||||
classes.
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.15.0</heading>
|
||||
<p>
|
||||
This is an unstable release from 1.14.0. It is otherwise
|
||||
identical to the 1.14.0 release. Releases in the 1.15 series
|
||||
may not be forward compatible with previous 1.15 releases.
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<heading>Version 1.14.0</heading>
|
||||
<p>
|
||||
|
@ -557,7 +60,7 @@ notice and this notice are preserved.
|
|||
<term>NSObject</term>
|
||||
<desc>
|
||||
Fixes for lock contention with retain/release, so the performance
|
||||
of massively multi-threaded applications is much better.
|
||||
of massively multithreaded applications is much better.
|
||||
</desc>
|
||||
<term>NSNetServices</term>
|
||||
<desc>
|
||||
|
@ -595,18 +98,18 @@ notice and this notice are preserved.
|
|||
<term>NSBundle</term>
|
||||
<desc>
|
||||
Fix for crash when initialising the bundle system in
|
||||
an application linked with many frameworks.
|
||||
an applicatiuon linked with many frameworks.
|
||||
</desc>
|
||||
<term>NSCalendarDate</term>
|
||||
<desc>
|
||||
Fix for buffer overrun problem when initialising
|
||||
Fix for buffer overrun problem mwhen initialising
|
||||
date from string. Also fixed to return nil when
|
||||
initialising from some illegal strings.
|
||||
</desc>
|
||||
<term>NSConnection</term>
|
||||
<desc>
|
||||
Some locking fixes to avoid rare deadlocks in heavily
|
||||
multi-threaded applications.
|
||||
multithreaded applications.
|
||||
</desc>
|
||||
<term>NSDecimalNumber</term>
|
||||
<desc>
|
||||
|
@ -649,17 +152,17 @@ notice and this notice are preserved.
|
|||
<heading>Version 1.13.0</heading>
|
||||
<p>
|
||||
Several sets of classes have been added for dealing with urls and
|
||||
predicates. A few minor api changes have occurred as well.
|
||||
predicates. A few minor api changes have occured as well.
|
||||
</p>
|
||||
<deflist>
|
||||
<term>Character sets</term>
|
||||
<desc>
|
||||
Character sets were improved with regard to ranges (Chinese
|
||||
Character sets were improved with regard to ranges (chinese
|
||||
characters, etc).
|
||||
</desc>
|
||||
<term>Keyed Archiving</term>
|
||||
<desc>
|
||||
Better compatibility with MacOSX. In particular, some guesses
|
||||
Better compatibility with MacOSX. In particular, some gueses
|
||||
are made as to how some objects should be encoded.
|
||||
</desc>
|
||||
<term>GNUstep configuration file</term>
|
||||
|
@ -677,14 +180,14 @@ notice and this notice are preserved.
|
|||
Most of the code was updated to compile nicely with the new
|
||||
gcc objective-c++ compiler.
|
||||
</desc>
|
||||
<term>NSString designated initialiser</term>
|
||||
<term>NSString designated initializer</term>
|
||||
<desc>
|
||||
The GNUstep designated initialiser for the NSString class
|
||||
cluster has changed to
|
||||
<code>-initWithBytesNoCopy:length:encoding:freeWhenDone:</code>
|
||||
from
|
||||
<code>-initWithCharactersNoCopy:length:freeWhenDone:</code>
|
||||
and older code sub classing NSString will need to be updated.
|
||||
and older code subclassing NSString will need to be updated.
|
||||
</desc>
|
||||
<term>NSBundle bundleWithIndentifier:</term>
|
||||
<desc>
|
||||
|
@ -709,7 +212,7 @@ notice and this notice are preserved.
|
|||
</desc>
|
||||
<term>Run loops</term>
|
||||
<desc>
|
||||
Removed the timeout facility for run loop watchers - you should
|
||||
Removed the timeout facility for runloop watchers - you should
|
||||
use standard timers instead. The watcher interface is deprecated
|
||||
anyway.
|
||||
</desc>
|
||||
|
@ -745,7 +248,7 @@ notice and this notice are preserved.
|
|||
Several deprecated and private methods were removed from
|
||||
the public interface including
|
||||
<code>+gnustepBundle</code>, and
|
||||
<code>+pathForGNUstepResource:ofType:inDirectory:</code>.
|
||||
<code>+pathForGNUstepResource:ofTpye:inDirectory:</code>.
|
||||
</desc>
|
||||
<term>NSNotificationCenter deprecated method</term>
|
||||
<desc>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<!--
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -37,3 +37,11 @@ Please log bug reports on the GNUstep project page
|
|||
@url{http://savannah.gnu.org/bugs/?group=gnustep} or send bug
|
||||
reports to @email{bug-gnustep@@gnu.org}.
|
||||
|
||||
@ifinfo
|
||||
Copyright @copyright{} 2005 Free Software Foundation
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
@end ifinfo
|
||||
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
|
||||
@ifinfo
|
||||
@format
|
||||
INFO-DIR-SECTION GNUstep
|
||||
START-INFO-DIR-ENTRY
|
||||
* Coding: (coding-standards). Coding Standards for GNUstep Libraries
|
||||
END-INFO-DIR-ENTRY
|
||||
* Coding: (coding). Coding Standards for GNUstep Libraries
|
||||
@end format
|
||||
@end ifinfo
|
||||
|
||||
|
@ -61,6 +58,7 @@ into another language, under the above conditions for modified versions.
|
|||
* Introduction::
|
||||
* ChangeLog Entries::
|
||||
* Coding Style::
|
||||
* ObjectiveC::
|
||||
* Memory Management::
|
||||
* Error Handling::
|
||||
* Variable Declaration::
|
||||
|
@ -120,7 +118,7 @@ was changed. It's more appropriate to put that in the source code, where
|
|||
someone can find it, or in the documentation.
|
||||
|
||||
@c ******************************************************************
|
||||
@node Coding Style, Memory Management, ChangeLog Entries, Top
|
||||
@node Coding Style, ObjectiveC, ChangeLog Entries, Top
|
||||
@section Coding Style
|
||||
|
||||
The point is not what style is 'better' in the abstract -- it's what
|
||||
|
@ -159,17 +157,19 @@ the trailing bracket (as in this example), though there are odd occasions
|
|||
where those spaces might be omitted ((eg. when brackets are doubled)).
|
||||
This applies to square brackets too.
|
||||
|
||||
Where round brackets are used for type-casts or at the end of a statement,
|
||||
Where round brackets are used to enclose function or macro paramters, there
|
||||
is no space between the function romacro name and the opening bracket, and
|
||||
where round brackets are used for type-casts or at the end of a statement,
|
||||
there is normally no space between the closing bracket and the following
|
||||
expression or semicolon-
|
||||
@example
|
||||
a = (int)b;
|
||||
- (void) methodWithArg1: (int)arg1 andArg2: (float)arg2;
|
||||
a = foo (ax, y, z);
|
||||
a = foo(ax, y, z);
|
||||
@end example
|
||||
|
||||
The placement of curly brackets is part of the indentation rules. the
|
||||
correct GNU style is
|
||||
correct GNU style is to indent by two spaces
|
||||
@example
|
||||
if (...)
|
||||
@{
|
||||
|
@ -266,7 +266,7 @@ length limit).
|
|||
@end example
|
||||
|
||||
My own preference (not part of the standard in any way) is to
|
||||
generally use curly brackets for control constructs, event where only one line
|
||||
generally use curly brackets for control constructs, even where only one line
|
||||
of code is involved
|
||||
@example
|
||||
if (a)
|
||||
|
@ -284,21 +284,40 @@ the matching lines.
|
|||
#else /* not condition */
|
||||
#endif /* condition */
|
||||
|
||||
|
||||
@end example
|
||||
|
||||
@c ******************************************************************
|
||||
@node Memory Management, Error Handling, Coding Style, Top
|
||||
@node ObjectiveC, Memory Management, Coding Style, Top
|
||||
@section ObjectiveC
|
||||
|
||||
Since GNUstep is primarily written in ObjectiveC the C language coding
|
||||
standards largely apply with modifications as specified in the previous
|
||||
section.
|
||||
|
||||
Most code is expect to be written in traditional ObjectiveC, but classes
|
||||
implementing newer APIs designed by Apple will sometimes need to be written
|
||||
using ObjectiveC-2.0, though compatibility with old compilers should be
|
||||
maintained wherever possible, and preprocessor macros must be used to at
|
||||
least conditionally build new code without breaking old code.
|
||||
|
||||
One ObjectiveC-2.0 feature (the dot ('.') operator) is forbidden though.
|
||||
One problem is that, while apparently simple, the actual operation of this
|
||||
feature in unusual cases is actually undefined and varies between compiler
|
||||
versions.
|
||||
The more serious problem is that the feature is simply very bad style
|
||||
because it looks like a simple structure field access and yet the code
|
||||
is really doing something very different and much more expensive, so use
|
||||
of the feature tends to lead to performance problems, bugs, and less
|
||||
explicit/readable code.
|
||||
|
||||
|
||||
@c ******************************************************************
|
||||
@node Memory Management, Error Handling, ObjectiveC, Top
|
||||
@section Memory Management
|
||||
|
||||
In anticipation of the day when we can make the use of a Garbage Collector
|
||||
possible for all GNUstep apps (it's almost-usable/usable-with-care for
|
||||
non-gui apps now), the normal use of retain/release/autorelease is
|
||||
deprecated.
|
||||
|
||||
You should always use the macros RETAIN(), RELEASE() and AUTORELEASE()
|
||||
(defined in NSObject.h) instead.
|
||||
|
||||
There are also some extra macros that may be of use -
|
||||
We encourage the use of the following macros to ease retain and release
|
||||
and as a convenience for managing code which should work in both a
|
||||
garbage collecting and a retain counting environment.
|
||||
@itemize @bullet
|
||||
@item
|
||||
ASSIGN(object,value) to assign an object variable, performing the appropriate retain/release as necessary.
|
||||
|
@ -307,12 +326,6 @@ ASSIGNCOPY(object,value) to copy the value and assign it to the object.
|
|||
@item
|
||||
DESTROY(object) to release an object variable and set it to nil.
|
||||
@item
|
||||
TEST_RETAIN(object) to retain an object if it is non-nil
|
||||
@item
|
||||
TEST_RELEASE(object) to release an object if it is non-nil
|
||||
@item
|
||||
TEST_AUTORELEASE(object) to autorelease an object if it is non-nil
|
||||
@item
|
||||
CREATE_AUTORELEASE_POOL(name) to create an autorelease pool with the
|
||||
specified name.
|
||||
@item IF_NO_GC(X) compile the code 'X' only if GarbageCollection is not
|
||||
|
@ -372,6 +385,23 @@ Certainly we would consider it a bug to introduce code into the
|
|||
GNUstep libraries which stopped them compiling with one of the
|
||||
commonly used compilers.
|
||||
|
||||
Instance variables in public APIs should generally be limited to those
|
||||
which are explicitly declared to be public and which will never change
|
||||
(we want to avoid breaking ABI between releases by changing instance
|
||||
variable layouts). Eventually compilers supporting a non-fragile ABI
|
||||
will be available and this will no longer be an issue, but until then
|
||||
we need to deal with the fragile API instance variable problem.
|
||||
|
||||
The standard mechanism to support this is to provide a single private
|
||||
pointer variable (void *_internal;) which will be used to point to an
|
||||
area of memory containing the actual instance variables used internally.
|
||||
The internal implementation is then free to change without any change
|
||||
to the size of instances of the class.
|
||||
|
||||
The GNUstep-base library has a standardised set of macros for writing
|
||||
code which deals with use of an _internal pointer to instance variables
|
||||
at the same time as allowing the instance variables to be used directly
|
||||
in the class if the code is built using the non-fragile ABI.
|
||||
|
||||
@c ******************************************************************
|
||||
@node Naming Conventions, Object Persistence, Variable Declaration, Top
|
||||
|
@ -438,6 +468,8 @@ that all changes to these methods be backward compatible with previously
|
|||
stored archives (for instance, those created by Gorm). The easiest way to do
|
||||
this is to use class version numbers to indicate which archive configuration
|
||||
should be read.
|
||||
Modern implementations are expected to suppoort keyed archiving and should
|
||||
use the same keys that are used in OSX.
|
||||
|
||||
@c ******************************************************************
|
||||
@node Documentation, Before You Commit, Object Persistence, Top
|
||||
|
@ -449,10 +481,8 @@ do not copy either the OpenStep or Cocoa documentation. Some methods
|
|||
are so simple you might have to intentionally reword the documentation
|
||||
so it is different.
|
||||
|
||||
Currently there is a difference of opinion on whether to document in
|
||||
the header or in the source file, although we generally lean towards
|
||||
the header currently. Make sure you are consistent with the current
|
||||
method of documentation in the source file you are changing.
|
||||
Public documentation should be in the header files, formatted so that the
|
||||
autogsdoc tool can extract it.
|
||||
|
||||
@c ******************************************************************
|
||||
@node Before You Commit, Contributing, Documentation, Top
|
||||
|
@ -460,13 +490,17 @@ method of documentation in the source file you are changing.
|
|||
|
||||
@itemize @bullet
|
||||
@item Make sure you have a ChangeLog entry
|
||||
@item Make sure everything still compiles
|
||||
@item Make sure you've tested the change as much as is reasonable.
|
||||
@item If you have added a class, add the class to @file{Foundation/Foundation.h}
|
||||
@item Make sure any new method/class is documented in the header file.
|
||||
or @file{Appkit/Appkit.h} if appropriate.
|
||||
@item Documentation the methods you have changed or added.
|
||||
@item If you have added a class, add the class to @file{Foundation/Foundation.h}
|
||||
@item If you have updated and configure checks, be sure to run both
|
||||
autoconf and autoheader.
|
||||
@item Make sure everything still compiles at least on the most common
|
||||
platform (ie Intel processor, GNU/Linux operating system, with the GCC compiler and ObjC runtime), and ideally on ms-windows too.
|
||||
@item Make sure you've tested the change and contributed testcase code to
|
||||
the testsuite. Run the testsuite on the systems where you compiled.
|
||||
@item Make sure that documentation generation still works by running 'make'
|
||||
in the Documentation directory.
|
||||
@end itemize
|
||||
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ install the entire GNUstep package (including this library).
|
|||
GNUstep-HOWTO is located in the gnustep-make package or at
|
||||
@url{http://www.gnustep.org}
|
||||
|
||||
This version of gnustep-base requires gnustep-make version 2.0.0 or higher.
|
||||
|
||||
Other external libraries that you may need to install include:
|
||||
|
||||
@itemize
|
||||
|
|
|
@ -25,17 +25,17 @@ constants will modify the API visible to software being compiled -
|
|||
|
||||
@deffn preprocessor NO_GNUSTEP
|
||||
GNUstep specific extensions to the OpenStep and MacOS cocoa APIs are
|
||||
excluded from the headers if this is defined to a non-zero value.
|
||||
excluded from the headers.
|
||||
@end deffn
|
||||
|
||||
@deffn preprocessor STRICT_MACOS_X
|
||||
Only methods and classes that are part of the MacOS cocoa API are made
|
||||
available in the headers if this is defined.
|
||||
available in the headers.
|
||||
@end deffn
|
||||
|
||||
@deffn preprocessor STRICT_OPENSTEP
|
||||
Only methods and classes that are part of the OpenStep specification are
|
||||
made available in the headers if this is defined.
|
||||
made available in the headers.
|
||||
@end deffn
|
||||
|
||||
Note, these preprocessor constants are used in developer code (ie the code
|
||||
|
|
|
@ -86,20 +86,16 @@ For instance:
|
|||
@{
|
||||
FileHandle *handle = [self getFileHandle: filename];
|
||||
parse = [parser parseFile: handle];
|
||||
if (parse == nil)
|
||||
@{
|
||||
NS_VALUERETURN(nil);
|
||||
@}
|
||||
@}
|
||||
NS_HANDLER
|
||||
@{
|
||||
if ([[localException name] isEqualToString: MyFileNotFoundException])
|
||||
@{
|
||||
return [self readDataFile: fallbackFilename];
|
||||
NS_VALUERETURN([self readDataFile: fallbackFilename]);
|
||||
@}
|
||||
else if ([[localException name] isEqualToString: NSParseErrorException])
|
||||
@{
|
||||
return [self readDataFileInOldFormat: filename];
|
||||
NS_VALUERETURN([self readDataFileInOldFormat: filename]);
|
||||
@}
|
||||
else
|
||||
@{
|
||||
|
@ -117,18 +113,13 @@ occur, the code in the @code{NS_HANDLER} block is jumped to. Information on
|
|||
the error is passed to this code in the @code{localException} variable, which
|
||||
is an instance of @code{NSException}. The handler code examines the name of
|
||||
the exception to determine if it can implement a work-around. In the first
|
||||
two cases, an alternative approach is available, and so an alternative value
|
||||
is returned.
|
||||
|
||||
If the file is found but the parse simply produces a nil parse tree, the
|
||||
@code{NS_VALUERETURN} macro is used to return nil to the
|
||||
two cases, an alternative approach is available, and so the
|
||||
@code{NS_VALUERETURN} macro is used to return an alternative value to the
|
||||
@code{readDataFile:} caller. Note that it is @i{not} allowed to simply write
|
||||
``@code{return nil;}'' inside the NS_DURING block, owing to the nature of the
|
||||
``@code{return x;}'' inside an exception handler, owing to the nature of the
|
||||
behind-the-scenes C constructs implementing the mechanism (the @code{setjmp()}
|
||||
and @code{longjmp()} functions). If you are in a void function not returning
|
||||
a value, you may use simply ``@code{NS_VOIDRETURN}'' instead.
|
||||
|
||||
Finally, notice
|
||||
a value, you may use simply ``@code{NS_VOIDRETURN}'' instead. Finally, notice
|
||||
that in the third case above the handler does not recognize the exception
|
||||
type, so it passes it one level up to the caller by calling @code{-raise} on
|
||||
the exception object.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -18,10 +18,7 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
-include ../../config.mak
|
||||
|
||||
GNUSTEP_MAKEINFO_FLAGS = -D NO-TEXI2HTML
|
||||
|
||||
|
|
|
@ -99,14 +99,6 @@ The following Makefile defines a project:
|
|||
# A GNUmakefile
|
||||
#
|
||||
|
||||
# Check that the GNUSTEP_MAKEFILES environment variable is set
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Include the common variables
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
|
@ -114,7 +106,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
OBJC_PROGRAM_NAME = simple
|
||||
|
||||
# Objective-C files requiring compilation
|
||||
simple_OBJC_FILES = source.m
|
||||
simple_OBJC_FILES = simple.m
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
|
||||
@ifinfo
|
||||
@format
|
||||
INFO-DIR-SECTION GNUstep
|
||||
START-INFO-DIR-ENTRY
|
||||
* GNUstepBase: (manual). Objective C Language and GNUstep Base Library
|
||||
* GNUstepBase: Objective C Language and GNUstep Base Library
|
||||
END-INFO-DIR-ENTRY
|
||||
@end format
|
||||
@end ifinfo
|
||||
|
@ -89,7 +88,6 @@ into another language, under the above conditions for modified versions.
|
|||
* Objective-C Java and C++:: Comparison between Objective-C, Java, and C++
|
||||
* Java and Guile:: Programming GNUstep in Java and Guile
|
||||
* Compliance to Standards:: GNUstep and the OpenStep and Mac OS X APIs
|
||||
* Make:: Using the Package to build GNUstep "Objects"
|
||||
@end menu
|
||||
@c **end Top node and master menu
|
||||
@end ifinfo
|
||||
|
@ -135,8 +133,6 @@ into another language, under the above conditions for modified versions.
|
|||
@c Appendix E: GNUstep Compliance to Standards
|
||||
@include Compliance.texi
|
||||
|
||||
@c Appendix F: Using the GNUstep Make Package
|
||||
@include GNUstepMake.texi
|
||||
|
||||
@unnumbered Concept Index
|
||||
@printindex cp
|
||||
|
|
|
@ -11,88 +11,6 @@ The currently released version of the library is
|
|||
See the @url{ReleaseNotes.html} document for more information.
|
||||
@end ifclear
|
||||
|
||||
@section Noteworthy changes in version @samp{1.20.2}
|
||||
|
||||
This is a stable bugfix release. There are no major changes or binary
|
||||
incompatibilities, but this release does include a rewrite of NSNetServices
|
||||
to be based on AVAHI, and various bugfixes and portability improvements.
|
||||
|
||||
@ifclear ANNOUNCE-ONLY
|
||||
|
||||
@section Noteworthy changes in version @samp{1.20.1}
|
||||
|
||||
This is a stable bugfix release. There are no major changes or binary
|
||||
incompatibilities, but this release does include an update of timezone
|
||||
handling to include the latest zone information.
|
||||
|
||||
@section Noteworthy changes in version @samp{1.20.0}
|
||||
|
||||
This is a stable release. There have been major changes
|
||||
and reorganizations to support, among other things, the new
|
||||
non-fragile ABI from clang. These changes, although they
|
||||
break binary compatibility with previous releases, should allow
|
||||
all future releases to maintain compatibility.
|
||||
|
||||
@section Noteworthy changes in version @samp{1.19.3}
|
||||
|
||||
@itemize @bullet
|
||||
@item Bugfix to work around OSX behavior of [NSURL-path]
|
||||
@end itemize
|
||||
|
||||
@section Noteworthy changes in version @samp{1.19.2}
|
||||
|
||||
@itemize @bullet
|
||||
@item Various OSX compatibility improvements.
|
||||
@item String handling performance improvements.
|
||||
@item Several minor bugfixes.
|
||||
@end itemize
|
||||
|
||||
@section Noteworthy changes in version @samp{1.19.1}
|
||||
|
||||
@itemize @bullet
|
||||
@item New Mac OS X methods for writing data in NSData
|
||||
@item New classes NSHashTable and NSMapTable
|
||||
@item Garbage collection now works again and is much improved.
|
||||
@item Method return types and arguments have been changed for Mac OS X 10.5
|
||||
@end itemize
|
||||
|
||||
@section Noteworthy changes in version @samp{1.19.0}
|
||||
|
||||
@itemize @bullet
|
||||
@item Support for native objective-c exceptions
|
||||
@item Connection keepalive for ms-windows
|
||||
@item Path utitlites fix for ms-windows
|
||||
@item Changes to build on 64bit ms-windows
|
||||
@item Support for @@synchronize
|
||||
@end itemize
|
||||
|
||||
@section Noteworthy changes in version @samp{1.15.3}
|
||||
|
||||
@itemize @bullet
|
||||
@item Extended NSUserDefaults so it recognizes ../ as a relative path.
|
||||
@item Added TLS/SSL support for NSStream based on GNU TLS
|
||||
@item Added support for https to NSURLConnection using new stream code and
|
||||
added basic support for digest authentication.
|
||||
@item Fixed various problems with and added new options to KVO.
|
||||
@end itemize
|
||||
|
||||
@section Noteworthy changes in version @samp{1.15.2}
|
||||
Bug fixes include improved thread safety (and a change to the NSThread
|
||||
class structure) and Key-Value observing.
|
||||
|
||||
@section Noteworthy changes in version @samp{1.15.1}
|
||||
|
||||
This is an unstable release. There may be API and ABI changes
|
||||
from previous releases. The licesne hase changed to GPLv3 and LGPLv3.
|
||||
Mostly bug fixes, but a few improvements in NSPredicates and Key-Value
|
||||
coding have been added.
|
||||
|
||||
@section Noteworthy changes in version @samp{1.15.0}
|
||||
|
||||
This is an unstable release from 1.14.0. It is otherwise
|
||||
identical to the 1.14.0 release. Releases in the 1.15 series
|
||||
may not be forward compatible with previous 1.15 releases.
|
||||
|
||||
@section Noteworthy changes in version @samp{1.14.0}
|
||||
|
||||
Many portability (particularly for ms-windows) and MacOS-X compatibility fixes.
|
||||
|
@ -100,6 +18,7 @@ New MacOS-X classes and incorporation of NSAffineTransform and NSSpellServer
|
|||
which were formerly in the gui library.
|
||||
Improved performance of amssively multithreaded programs.
|
||||
|
||||
@ifclear ANNOUNCE-ONLY
|
||||
|
||||
@section Noteworthy changes in version @samp{1.13.1}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ notifications, notification dispatchers, moments in time, network ports,
|
|||
remote object messaging support (distributed objects), and event loops.
|
||||
|
||||
It provides functionality that aims to implement the non-graphical
|
||||
portion of the OpenStep standard (the Foundation library).
|
||||
portion of the Apple's Cocoa frameworks (the Foundation library) which
|
||||
came from the OpenStep standard.
|
||||
|
||||
@section Initial reading
|
||||
|
||||
|
@ -35,7 +36,7 @@ GNUstep tools, test programs, and other files are covered under the
|
|||
GNU Public License. This means if you make changes to these programs,
|
||||
you cannot charge a fee, other than distribution fees, for others to
|
||||
use the program. You should read the COPYING file for more information.
|
||||
All files in the @file{Documentation}, @file{Examples},
|
||||
All files in the @file{Documentation}, @file{Examples}, @file{Testing},
|
||||
@file{Tools}, @file{config}, and @file{macosx} directories are covered
|
||||
under the GPL.
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -25,44 +25,27 @@
|
|||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(warning )
|
||||
$(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
|
||||
$(warning Perhaps gnustep-make is not properly installed,)
|
||||
$(warning so gnustep-config is not in your PATH.)
|
||||
$(warning )
|
||||
$(warning Your PATH is currently $(PATH))
|
||||
$(warning )
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
|
||||
endif
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES = ../base.make
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
-include ../config.mak
|
||||
|
||||
# The tools to be created
|
||||
TEST_TOOL_NAME = \
|
||||
dictionary \
|
||||
nsconnection \
|
||||
nsconnection_client \
|
||||
nsconnection_server \
|
||||
|
||||
dictionary
|
||||
|
||||
# The Objective-C source files to be compiled to create each tool
|
||||
dictionary_OBJC_FILES = dictionary.m
|
||||
nsconnection_OBJC_FILES = nsconnection.m
|
||||
nsconnection_client_OBJC_FILES = nsconnection_client.m
|
||||
nsconnection_server_OBJC_FILES = nsconnection_server.m
|
||||
|
||||
include Makefile.preamble
|
||||
|
||||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/test-tool.make
|
||||
|
||||
include Makefile.postamble
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 3 of the License, or (at your option) any later version.
|
||||
# version 2 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
|
||||
|
@ -19,8 +19,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02111 USA.
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -37,13 +36,13 @@
|
|||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS = $(WARN_FLAGS)
|
||||
ADDITIONAL_CPPFLAGS =
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ADDITIONAL_OBJCFLAGS =
|
||||
ADDITIONAL_OBJCFLAGS =
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
ADDITIONAL_CFLAGS =
|
||||
ADDITIONAL_CFLAGS =
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
|
|
26
GNUmakefile
26
GNUmakefile
|
@ -25,28 +25,18 @@
|
|||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(warning )
|
||||
$(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
|
||||
$(warning Perhaps gnustep-make is not properly installed,)
|
||||
$(warning so gnustep-config is not in your PATH.)
|
||||
$(warning )
|
||||
$(warning Your PATH is currently $(PATH))
|
||||
$(warning )
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GNUSTEP_MAKEFILES),)
|
||||
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
|
||||
endif
|
||||
|
||||
GNUSTEP_CORE_SOFTWARE = YES
|
||||
export GNUSTEP_CORE_SOFTWARE
|
||||
RPM_DISABLE_RELOCATABLE = YES
|
||||
PACKAGE_NEEDS_CONFIGURE = YES
|
||||
# Install into the system root by default
|
||||
# FIXME: would it work if you want to install it into local
|
||||
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
export PACKAGE_NAME
|
||||
RPM_DISABLE_RELOCATABLE=YES
|
||||
PACKAGE_NEEDS_CONFIGURE = YES
|
||||
|
||||
SVN_MODULE_NAME = base
|
||||
SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs
|
||||
|
@ -59,7 +49,8 @@ GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=base.make
|
|||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
include ./Version
|
||||
-include config.mak
|
||||
|
||||
PACKAGE_NAME = gnustep-base
|
||||
|
||||
#
|
||||
# The list of subproject directories
|
||||
|
@ -68,10 +59,11 @@ SUBPROJECTS = Source
|
|||
ifneq ($(GNUSTEP_TARGET_OS), mingw32)
|
||||
SUBPROJECTS += SSL
|
||||
endif
|
||||
SUBPROJECTS += Tools NSTimeZones Resources
|
||||
SUBPROJECTS += Tools NSTimeZones Resources Tests
|
||||
|
||||
-include Makefile.preamble
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||
|
||||
-include Makefile.postamble
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
|
||||
/* Define the has_feature pseudo-macro for GCC. */
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_feature(blocks)
|
||||
/**
|
||||
* Defines a block type. Will work whether or not the compiler natively
|
||||
* supports blocks.
|
||||
*/
|
||||
#define DEFINE_BLOCK_TYPE(name, retTy, argTys, ...) \
|
||||
typedef retTy(^name)(argTys, ## __VA_ARGS__)
|
||||
/**
|
||||
* Calls a block. Works irrespective of whether the compiler supports blocks.
|
||||
*/
|
||||
#define CALL_BLOCK(block, args, ...) \
|
||||
block(args, ## __VA_ARGS__)
|
||||
/* Fall-back versions for when the compiler doesn't have native blocks support.
|
||||
*/
|
||||
#else
|
||||
|
||||
#if (GCC_VERSION >= 3000)
|
||||
|
||||
#define DEFINE_BLOCK_TYPE(name, retTy, argTys, ...) \
|
||||
typedef struct {\
|
||||
void *isa;\
|
||||
int flags;\
|
||||
int reserved;\
|
||||
retTy (*invoke)(void*, argTys, ## __VA_ARGS__);\
|
||||
} *name
|
||||
#define CALL_BLOCK(block, args, ...) \
|
||||
block->invoke(block, args, ## __VA_ARGS__)
|
||||
|
||||
#else /* GCC_VERSION >= 3000 */
|
||||
|
||||
#define DEFINE_BLOCK_TYPE(name, retTy, argTys, args...) \
|
||||
typedef struct {\
|
||||
void *isa;\
|
||||
int flags;\
|
||||
int reserved;\
|
||||
retTy (*invoke)(void*, argTys, args);\
|
||||
} *name
|
||||
#define CALL_BLOCK(block, args...) \
|
||||
block->invoke(block, args)
|
||||
|
||||
|
||||
#endif /* GCC_VERSION >= 3000 */
|
||||
|
||||
#endif
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -30,7 +30,6 @@
|
|||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <objc/objc.h>
|
||||
|
||||
#import <Foundation/FoundationErrors.h>
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
|
@ -43,7 +42,7 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSByteOrder.h>
|
||||
#import <Foundation/NSCache.h>
|
||||
#import <Foundation/NSCalendar.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSCharacterSet.h>
|
||||
#import <Foundation/NSClassDescription.h>
|
||||
|
@ -66,7 +65,6 @@
|
|||
#import <Foundation/NSFileHandle.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSFormatter.h>
|
||||
#import <Foundation/NSGarbageCollector.h>
|
||||
#import <Foundation/NSGeometry.h>
|
||||
#import <Foundation/NSHashTable.h>
|
||||
#import <Foundation/NSHost.h>
|
||||
|
@ -77,8 +75,8 @@
|
|||
#import <Foundation/NSInvocation.h>
|
||||
#import <Foundation/NSKeyedArchiver.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <Foundation/NSKeyValueObserving.h>
|
||||
#import <Foundation/NSLock.h>
|
||||
#import <Foundation/NSLocale.h>
|
||||
#import <Foundation/NSMapTable.h>
|
||||
#import <Foundation/NSMethodSignature.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
|
@ -86,10 +84,7 @@
|
|||
#import <Foundation/NSNetServices.h>
|
||||
#import <Foundation/NSNull.h>
|
||||
#import <Foundation/NSNumberFormatter.h>
|
||||
#import <Foundation/NSOperation.h>
|
||||
#import <Foundation/NSPathUtilities.h>
|
||||
#import <Foundation/NSPointerArray.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
#import <Foundation/NSPortCoder.h>
|
||||
#import <Foundation/NSPortMessage.h>
|
||||
#import <Foundation/NSPortNameServer.h>
|
||||
|
@ -127,12 +122,6 @@
|
|||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSValueTransformer.h>
|
||||
#import <Foundation/NSXMLDocument.h>
|
||||
#import <Foundation/NSXMLDTD.h>
|
||||
#import <Foundation/NSXMLDTDNode.h>
|
||||
#import <Foundation/NSXMLElement.h>
|
||||
#import <Foundation/NSXMLNode.h>
|
||||
#import <Foundation/NSXMLNodeOptions.h>
|
||||
#import <Foundation/NSXMLParser.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
Global include file for the GNUstep Base Library.
|
||||
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Scott Christley <scottc@net-community.com>
|
||||
Date: Sep 1997
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef __Foundation_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __Foundation_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <objc/objc.h>
|
||||
|
||||
#import <Foundation/FoundationErrors.h>
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#import <Foundation/NSAffineTransform.h>
|
||||
#import <Foundation/NSArchiver.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSAttributedString.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSByteOrder.h>
|
||||
#import <Foundation/NSCache.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSCharacterSet.h>
|
||||
#import <Foundation/NSClassDescription.h>
|
||||
#import <Foundation/NSCoder.h>
|
||||
#import <Foundation/NSComparisonPredicate.h>
|
||||
#import <Foundation/NSCompoundPredicate.h>
|
||||
#import <Foundation/NSConnection.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDateFormatter.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSDecimalNumber.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSDistantObject.h>
|
||||
#import <Foundation/NSDistributedLock.h>
|
||||
#import <Foundation/NSDistributedNotificationCenter.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSExpression.h>
|
||||
#import <Foundation/NSFileHandle.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSFormatter.h>
|
||||
#import <Foundation/NSGarbageCollector.h>
|
||||
#import <Foundation/NSGeometry.h>
|
||||
#import <Foundation/NSHashTable.h>
|
||||
#import <Foundation/NSHost.h>
|
||||
#import <Foundation/NSHTTPCookie.h>
|
||||
#import <Foundation/NSHTTPCookieStorage.h>
|
||||
#import <Foundation/NSIndexPath.h>
|
||||
#import <Foundation/NSIndexSet.h>
|
||||
#import <Foundation/NSInvocation.h>
|
||||
#import <Foundation/NSKeyedArchiver.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <Foundation/NSKeyValueObserving.h>
|
||||
#import <Foundation/NSLock.h>
|
||||
#import <Foundation/NSMapTable.h>
|
||||
#import <Foundation/NSMethodSignature.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSNotificationQueue.h>
|
||||
#import <Foundation/NSNetServices.h>
|
||||
#import <Foundation/NSNull.h>
|
||||
#import <Foundation/NSNumberFormatter.h>
|
||||
#import <Foundation/NSOperation.h>
|
||||
#import <Foundation/NSPathUtilities.h>
|
||||
#import <Foundation/NSPointerArray.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
#import <Foundation/NSPortCoder.h>
|
||||
#import <Foundation/NSPortMessage.h>
|
||||
#import <Foundation/NSPortNameServer.h>
|
||||
#import <Foundation/NSPredicate.h>
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
#import <Foundation/NSProtocolChecker.h>
|
||||
#import <Foundation/NSProxy.h>
|
||||
#import <Foundation/NSRange.h>
|
||||
#import <Foundation/NSRunLoop.h>
|
||||
#import <Foundation/NSScanner.h>
|
||||
#import <Foundation/NSSerialization.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
#import <Foundation/NSSortDescriptor.h>
|
||||
#import <Foundation/NSSpellServer.h>
|
||||
#import <Foundation/NSStream.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTask.h>
|
||||
#import <Foundation/NSThread.h>
|
||||
#import <Foundation/NSTimer.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
#import <Foundation/NSUndoManager.h>
|
||||
#import <Foundation/NSURLAuthenticationChallenge.h>
|
||||
#import <Foundation/NSURLCache.h>
|
||||
#import <Foundation/NSURLConnection.h>
|
||||
#import <Foundation/NSURLCredential.h>
|
||||
#import <Foundation/NSURLCredentialStorage.h>
|
||||
#import <Foundation/NSURLDownload.h>
|
||||
#import <Foundation/NSURLError.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSURLHandle.h>
|
||||
#import <Foundation/NSURLProtectionSpace.h>
|
||||
#import <Foundation/NSURLProtocol.h>
|
||||
#import <Foundation/NSURLRequest.h>
|
||||
#import <Foundation/NSURLResponse.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSValueTransformer.h>
|
||||
#import <Foundation/NSXMLDocument.h>
|
||||
#import <Foundation/NSXMLDTD.h>
|
||||
#import <Foundation/NSXMLDTDNode.h>
|
||||
#import <Foundation/NSXMLElement.h>
|
||||
#import <Foundation/NSXMLNode.h>
|
||||
#import <Foundation/NSXMLNodeOptions.h>
|
||||
#import <Foundation/NSXMLParser.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
||||
#endif /* __Foundation_h_GNUSTEP_BASE_INCLUDE */
|
|
@ -1,81 +0,0 @@
|
|||
/* Interface for FoundationErrors for GNUstep
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Date: 2008
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef __FoundationErrors_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __FoundationErrors_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
/* These are those of the NSError code values for the NSCocoaErrorDomain
|
||||
* which are defined in the foundation/base library.
|
||||
*/
|
||||
|
||||
enum {
|
||||
|
||||
NSFileErrorMaximum = 1023,
|
||||
NSFileErrorMinimum = 0,
|
||||
NSFileLockingError = 255,
|
||||
NSFileNoSuchFileError = 4,
|
||||
NSFileReadCorruptFileError = 259,
|
||||
NSFileReadInapplicableStringEncodingError = 261,
|
||||
NSFileReadInvalidFileNameError = 258,
|
||||
NSFileReadNoPermissionError = 257,
|
||||
NSFileReadNoSuchFileError = 260,
|
||||
NSFileReadUnknownError = 256,
|
||||
NSFileReadUnsupportedSchemeError = 262,
|
||||
NSFileWriteInapplicableStringEncodingError = 517,
|
||||
NSFileWriteInvalidFileNameError = 514,
|
||||
NSFileWriteNoPermissionError = 513,
|
||||
NSFileWriteOutOfSpaceError = 640,
|
||||
NSFileWriteUnknownError = 512,
|
||||
NSFileWriteUnsupportedSchemeError = 518,
|
||||
NSFormattingError = 2048,
|
||||
NSFormattingErrorMaximum = 2559,
|
||||
NSFormattingErrorMinimum = 2048,
|
||||
NSKeyValueValidationError = 1024,
|
||||
NSUserCancelledError = 3072,
|
||||
NSValidationErrorMaximum = 2047,
|
||||
NSValidationErrorMinimum = 1024,
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
NSExecutableArchitectureMismatchError = 3585,
|
||||
NSExecutableErrorMaximum = 3839,
|
||||
NSExecutableErrorMinimum = 3584,
|
||||
NSExecutableLinkError = 3588,
|
||||
NSExecutableLoadError = 3587,
|
||||
NSExecutableNotLoadableError = 3584,
|
||||
NSExecutableRuntimeMismatchError = 3586,
|
||||
NSFileReadTooLargeError = 263,
|
||||
NSFileReadUnknownStringEncodingError = 264,
|
||||
#endif
|
||||
|
||||
GSFoundationPlaceHolderError = 9999
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -33,24 +33,22 @@
|
|||
#import <Foundation/NSGeometry.h>
|
||||
|
||||
typedef struct {
|
||||
CGFloat m11;
|
||||
CGFloat m12;
|
||||
CGFloat m21;
|
||||
CGFloat m22;
|
||||
CGFloat tX;
|
||||
CGFloat tY;
|
||||
float m11;
|
||||
float m12;
|
||||
float m21;
|
||||
float m22;
|
||||
float tX;
|
||||
float tY;
|
||||
} NSAffineTransformStruct;
|
||||
|
||||
@interface NSAffineTransform : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSAffineTransform)
|
||||
@private
|
||||
NSAffineTransformStruct _matrix;
|
||||
BOOL _isIdentity; // special case: A=D=1 and B=C=0
|
||||
BOOL _isFlipY; // special case: A=1 D=-1 and B=C=0
|
||||
BOOL _pad1;
|
||||
BOOL _pad2;
|
||||
#endif
|
||||
BOOL _pad1 GS_UNUSED_IVAR;
|
||||
BOOL _pad2 GS_UNUSED_IVAR;
|
||||
}
|
||||
|
||||
+ (NSAffineTransform*) transform;
|
||||
|
@ -58,15 +56,15 @@ typedef struct {
|
|||
- (id) initWithTransform: (NSAffineTransform*)aTransform;
|
||||
- (void) invert;
|
||||
- (void) prependTransform: (NSAffineTransform*)aTransform;
|
||||
- (void) rotateByDegrees: (CGFloat)angle;
|
||||
- (void) rotateByRadians: (CGFloat)angleRad;
|
||||
- (void) scaleBy: (CGFloat)scale;
|
||||
- (void) scaleXBy: (CGFloat)scaleX yBy: (CGFloat)scaleY;
|
||||
- (void) rotateByDegrees: (float)angle;
|
||||
- (void) rotateByRadians: (float)angleRad;
|
||||
- (void) scaleBy: (float)scale;
|
||||
- (void) scaleXBy: (float)scaleX yBy: (float)scaleY;
|
||||
- (void) setTransformStruct: (NSAffineTransformStruct)val;
|
||||
- (NSPoint) transformPoint: (NSPoint)aPoint;
|
||||
- (NSSize) transformSize: (NSSize)aSize;
|
||||
- (NSAffineTransformStruct) transformStruct;
|
||||
- (void) translateXBy: (CGFloat)tranX yBy: (CGFloat)tranY;
|
||||
- (void) translateXBy: (float)tranX yBy: (float)tranY;
|
||||
@end
|
||||
|
||||
#endif /* __NSAffineTransform_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -42,7 +42,6 @@ extern "C" {
|
|||
|
||||
@interface NSArchiver : NSCoder
|
||||
{
|
||||
#if GS_EXPOSE(NSArchiver)
|
||||
@private
|
||||
NSMutableData *_data; /* Data to write into. */
|
||||
id _dst; /* Serialization destination. */
|
||||
|
@ -69,10 +68,6 @@ extern "C" {
|
|||
unsigned _startPos; /* Where in data we started. */
|
||||
BOOL _encodingRoot;
|
||||
BOOL _initialPass;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Initializing an archiver */
|
||||
|
@ -97,7 +92,7 @@ extern "C" {
|
|||
#endif
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE,011700)
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
|
||||
@interface NSArchiver (GNUstep)
|
||||
|
||||
/*
|
||||
|
@ -155,7 +150,6 @@ extern "C" {
|
|||
|
||||
@interface NSUnarchiver : NSCoder
|
||||
{
|
||||
#if GS_EXPOSE(NSUnarchiver)
|
||||
@private
|
||||
NSData *data; /* Data to write into. */
|
||||
Class dataClass; /* What sort of data is it? */
|
||||
|
@ -170,17 +164,13 @@ extern "C" {
|
|||
GSIArray objMap; /* Object crossreference map. */
|
||||
GSIArray ptrMap; /* Pointer crossreference map. */
|
||||
#ifndef _IN_NSUNARCHIVER_M
|
||||
#undef GSIArray
|
||||
#undef GSUnarchiverArray
|
||||
#endif
|
||||
unsigned cursor; /* Position in data buffer. */
|
||||
unsigned version; /* Version of archiver used. */
|
||||
NSZone *zone; /* Zone for allocating objs. */
|
||||
NSMutableDictionary *objDict; /* Class information store. */
|
||||
NSMutableArray *objSave;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Initializing an unarchiver */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -26,10 +26,8 @@
|
|||
#define __NSArray_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSRange.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <GNUstepBase/GSBlocks.h>
|
||||
#import <Foundation/NSUtilities.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -37,9 +35,8 @@ extern "C" {
|
|||
|
||||
@class NSString;
|
||||
@class NSURL;
|
||||
@class NSIndexSet;
|
||||
|
||||
@interface NSArray : NSObject <NSCoding, NSCopying, NSMutableCopying, NSFastEnumeration>
|
||||
@interface NSArray : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||
|
||||
+ (id) array;
|
||||
+ (id) arrayWithArray: (NSArray*)array;
|
||||
|
@ -49,18 +46,18 @@ extern "C" {
|
|||
#endif
|
||||
+ (id) arrayWithObject: (id)anObject;
|
||||
+ (id) arrayWithObjects: (id)firstObject, ...;
|
||||
+ (id) arrayWithObjects: (id*)objects count: (NSUInteger)count;
|
||||
+ (id) arrayWithObjects: (id*)objects count: (unsigned)count;
|
||||
|
||||
- (NSArray*) arrayByAddingObject: (id)anObject;
|
||||
- (NSArray*) arrayByAddingObjectsFromArray: (NSArray*)anotherArray;
|
||||
- (BOOL) containsObject: anObject;
|
||||
- (NSUInteger) count; // Primitive
|
||||
- (unsigned) count; // Primitive
|
||||
- (void) getObjects: (id*)aBuffer;
|
||||
- (void) getObjects: (id*)aBuffer range: (NSRange)aRange;
|
||||
- (NSUInteger) indexOfObject: (id)anObject;
|
||||
- (NSUInteger) indexOfObject: (id)anObject inRange: (NSRange)aRange;
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: (id)anObject;
|
||||
- (NSUInteger) indexOfObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (unsigned) indexOfObject: (id)anObject;
|
||||
- (unsigned) indexOfObject: (id)anObject inRange: (NSRange)aRange;
|
||||
- (unsigned) indexOfObjectIdenticalTo: (id)anObject;
|
||||
- (unsigned) indexOfObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (id) init;
|
||||
- (id) initWithArray: (NSArray*)array;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -71,13 +68,10 @@ extern "C" {
|
|||
- (id) initWithContentsOfURL: (NSURL*)aURL;
|
||||
#endif
|
||||
- (id) initWithObjects: firstObject, ...;
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count; // Primitive
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count; // Primitive
|
||||
|
||||
- (id) lastObject;
|
||||
- (id) objectAtIndex: (NSUInteger)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
- (id) objectAtIndex: (unsigned)index; // Primitive
|
||||
|
||||
- (id) firstObjectCommonWithArray: (NSArray*)otherArray;
|
||||
- (BOOL) isEqualToArray: (NSArray*)otherArray;
|
||||
|
@ -107,138 +101,33 @@ extern "C" {
|
|||
- (NSEnumerator*) reverseObjectEnumerator;
|
||||
|
||||
- (NSString*) description;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (NSUInteger)level;
|
||||
- (NSString*) descriptionWithLocale: (id)locale;
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
indent: (unsigned int)level;
|
||||
|
||||
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)useAuxiliaryFile;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (BOOL) writeToURL: (NSURL*)url atomically: (BOOL)useAuxiliaryFile;
|
||||
- (id) valueForKey: (NSString*)key;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
|
||||
DEFINE_BLOCK_TYPE(GSEnumeratorBlock, void, id, NSUInteger, BOOL*);
|
||||
DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
||||
/**
|
||||
* Enumerate over the collection using the given block. The first argument is
|
||||
* the object and the second is the index in the array. The final argument is
|
||||
* a pointer to a BOOL indicating whether the enumeration should stop. Setting
|
||||
* this to YES will interrupt the enumeration.
|
||||
*/
|
||||
- (void) enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock;
|
||||
|
||||
/**
|
||||
* Enumerate over the collection using the given block. The first argument is
|
||||
* the object and the second is the index in the array. The final argument is
|
||||
* a pointer to a BOOL indicating whether the enumeration should stop. Setting
|
||||
* this to YES will interrupt the enumeration.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (void) enumerateObjectsWithOptions: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSEnumeratorBlock)aBlock;
|
||||
/**
|
||||
* Enumerate over the specified indexes in the collection using the given
|
||||
* block. The first argument is the object and the second is the index in the
|
||||
* array. The final argument is a pointer to a BOOL indicating whether the
|
||||
* enumeration should stop. Setting this to YES will interrupt the
|
||||
* enumeration.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (void) enumerateObjectsAtIndexes: (NSIndexSet*)indexSet
|
||||
options: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSEnumeratorBlock)block;
|
||||
/**
|
||||
* Returns the indexes of the objects in a collection that match the condition
|
||||
* specified by the block.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (NSIndexSet *) indexesOfObjectsWithOptions: (NSEnumerationOptions)opts
|
||||
passingTest: (GSPredicateBlock)predicate;
|
||||
|
||||
/**
|
||||
* Returns the indexes of the objects in a collection that match the condition
|
||||
* specified by the block.
|
||||
*/
|
||||
- (NSIndexSet*) indexesOfObjectsPassingTest: (GSPredicateBlock)predicate;
|
||||
|
||||
/**
|
||||
* Returns the indexes of the objects in a collection that match the condition
|
||||
* specified by the block and are in the range specified by the index set.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (NSIndexSet*) indexesOfObjectsAtIndexes: (NSIndexSet*)indexSet
|
||||
options: (NSEnumerationOptions)opts
|
||||
passingTest: (GSPredicateBlock)predicate;
|
||||
|
||||
/**
|
||||
* Returns the index of the first object in the array that matches the
|
||||
* condition specified by the block.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (NSUInteger) indexOfObjectWithOptions: (NSEnumerationOptions)opts
|
||||
passingTest: (GSPredicateBlock)predicate;
|
||||
|
||||
/**
|
||||
* Returns the index of the first object in the array that matches the
|
||||
* condition specified by the block.
|
||||
*/
|
||||
- (NSUInteger) indexOfObjectPassingTest: (GSPredicateBlock)predicate;
|
||||
|
||||
/**
|
||||
* Returns the index of the first object in the specified range in a collection
|
||||
* that matches the condition specified by the block.
|
||||
*
|
||||
* The opts argument is a bitfield. Setting the NSNSEnumerationConcurrent flag
|
||||
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
|
||||
* that it should be enumerated in reverse order.
|
||||
*/
|
||||
- (NSUInteger) indexOfObjectAtIndexes: (NSIndexSet*)indexSet
|
||||
options: (NSEnumerationOptions)opts
|
||||
passingTest: (GSPredicateBlock)predicate;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
||||
@interface NSMutableArray : NSArray
|
||||
|
||||
+ (id) arrayWithCapacity: (NSUInteger)numItems;
|
||||
+ (id) arrayWithCapacity: (unsigned)numItems;
|
||||
|
||||
- (void) addObject: (id)anObject; // Primitive
|
||||
- (void) addObjectsFromArray: (NSArray*)otherArray;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) exchangeObjectAtIndex: (NSUInteger)i1
|
||||
withObjectAtIndex: (NSUInteger)i2;
|
||||
- (void) exchangeObjectAtIndex: (unsigned int)i1
|
||||
withObjectAtIndex: (unsigned int)i2;
|
||||
#endif
|
||||
- (id) initWithCapacity: (NSUInteger)numItems; // Primitive
|
||||
- (void) insertObject: (id)anObject atIndex: (NSUInteger)index; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes;
|
||||
#endif
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index; // Primitive
|
||||
- (void) removeObjectsAtIndexes: (NSIndexSet *)indexes;
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index
|
||||
- (id) initWithCapacity: (unsigned)numItems; // Primitive
|
||||
- (void) insertObject: (id)anObject atIndex: (unsigned)index; // Primitive
|
||||
- (void) removeObjectAtIndex: (unsigned)index; // Primitive
|
||||
- (void) replaceObjectAtIndex: (unsigned)index
|
||||
withObject: (id)anObject; // Primitive
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||
withObjects: (NSArray *)objects;
|
||||
#endif
|
||||
- (void) replaceObjectsInRange: (NSRange)aRange
|
||||
withObjectsFromArray: (NSArray*)anArray;
|
||||
- (void) replaceObjectsInRange: (NSRange)aRange
|
||||
|
@ -254,8 +143,8 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
|||
- (void) removeObjectIdenticalTo: (id)anObject inRange: (NSRange)aRange;
|
||||
- (void) removeObjectsInArray: (NSArray*)otherArray;
|
||||
- (void) removeObjectsInRange: (NSRange)aRange;
|
||||
- (void) removeObjectsFromIndices: (NSUInteger*)indices
|
||||
numIndices: (NSUInteger)count;
|
||||
- (void) removeObjectsFromIndices: (unsigned*)indices
|
||||
numIndices: (unsigned)count;
|
||||
|
||||
- (void) sortUsingFunction: (NSComparisonResult (*)(id,id,void*))compare
|
||||
context: (void*)context;
|
||||
|
@ -267,12 +156,31 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
|
|||
|
||||
@end
|
||||
|
||||
@interface NSArray (GSCategories)
|
||||
/*
|
||||
* Extension methods for working with sorted arrays - use a binary chop
|
||||
* to determine the insertion location for an nobject. If equal objects
|
||||
* already exist in the array, they will be located immediately before
|
||||
* the insertion position.
|
||||
*
|
||||
* The comparator function takes two items as arguments, the first is the
|
||||
* item to be added, the second is the item already in the array.
|
||||
* The function should return NSOrderedAscending if the item to be
|
||||
* added is 'less than' the item in the array, NSOrderedDescending
|
||||
* if it is greater, and NSOrderedSame if it is equal.
|
||||
*
|
||||
* The selector version works the same - returning NSOrderedAscending if
|
||||
* the receiver is 'less than' the item in the array.
|
||||
*/
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context;
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingSelector: (SEL)comp;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSArray+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSArray_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
This file is part of GNUStep-base
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
If you are interested in a warranty or support for this source code,
|
||||
contact Scott Christley <scottc@net-community.com> for more information.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -71,24 +71,19 @@ extern "C" {
|
|||
- (id) initWithString: (NSString*)aString attributes: (NSDictionary*)attributes;
|
||||
|
||||
//Retrieving character information
|
||||
- (NSUInteger) length;
|
||||
/** Returns the string content of the receiver.<br />
|
||||
* NB. this is actually a proxy to the internal content (which may change)
|
||||
* so if you need an immutable instance yu should copy the returned value,
|
||||
* not jhust retain it.
|
||||
*/
|
||||
- (unsigned int) length;
|
||||
- (NSString*) string; //Primitive method!
|
||||
|
||||
//Retrieving attribute information
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
effectiveRange: (NSRange*)aRange; //Primitive method!
|
||||
- (NSDictionary*) attributesAtIndex: (NSUInteger)index
|
||||
- (NSDictionary*) attributesAtIndex: (unsigned int)index
|
||||
longestEffectiveRange: (NSRange*)aRange
|
||||
inRange: (NSRange)rangeLimit;
|
||||
- (id) attribute: (NSString*)attributeName
|
||||
atIndex: (NSUInteger)index
|
||||
atIndex: (unsigned int)index
|
||||
effectiveRange: (NSRange*)aRange;
|
||||
- (id) attribute: (NSString*)attributeName atIndex: (NSUInteger)index
|
||||
- (id) attribute: (NSString*)attributeName atIndex: (unsigned int)index
|
||||
longestEffectiveRange: (NSRange*)aRange inRange: (NSRange)rangeLimit;
|
||||
|
||||
//Comparing attributed strings
|
||||
|
@ -120,7 +115,7 @@ extern "C" {
|
|||
//Changing characters and attributes
|
||||
- (void) appendAttributedString: (NSAttributedString*)attributedString;
|
||||
- (void) insertAttributedString: (NSAttributedString*)attributedString
|
||||
atIndex: (NSUInteger)index;
|
||||
atIndex: (unsigned int)index;
|
||||
- (void) replaceCharactersInRange: (NSRange)aRange
|
||||
withAttributedString: (NSAttributedString*)attributedString;
|
||||
- (void) replaceCharactersInRange: (NSRange)aRange
|
||||
|
@ -133,15 +128,21 @@ extern "C" {
|
|||
|
||||
@end //NSMutableAttributedString
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
@interface NSAttributedString (GSCategories)
|
||||
/**
|
||||
* Dep[recated synonym for attributedSubstringFromRange:
|
||||
* for consistency with NSString
|
||||
*/
|
||||
- (NSAttributedString*) attributedSubstringWithRange: (NSRange)aRange;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#endif /* GS_API_MACOSX */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSAttributedString+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSAttributedString_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -70,8 +70,7 @@ typedef struct autorelease_thread_vars
|
|||
/* Initialize an autorelease_thread_vars structure for a new thread.
|
||||
This function is called in NSThread each time an NSThread is created.
|
||||
TV should be of type `struct autorelease_thread_vars *' */
|
||||
#define init_autorelease_thread_vars(TV) \
|
||||
memset (TV, 0, sizeof (__typeof__ (*TV)))
|
||||
#define init_autorelease_thread_vars(TV) memset (TV, 0, sizeof (typeof (*TV)))
|
||||
|
||||
|
||||
|
||||
|
@ -180,7 +179,6 @@ typedef struct autorelease_array_list
|
|||
*/
|
||||
@interface NSAutoreleasePool : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSAutoreleasePool)
|
||||
/* For re-setting the current pool when we are dealloc'ed. */
|
||||
NSAutoreleasePool *_parent;
|
||||
/* This pointer to our child pool is necessary for co-existing
|
||||
|
@ -193,10 +191,6 @@ typedef struct autorelease_array_list
|
|||
unsigned _released_count;
|
||||
/* The method to add an object to this pool */
|
||||
void (*_addImp)(id, SEL, id);
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,16 +218,6 @@ typedef struct autorelease_array_list
|
|||
*/
|
||||
- (id) autorelease;
|
||||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
/**
|
||||
* Intended to trigger a garbage collection run (if needed) when called in
|
||||
* a garbage collected environment.<br />
|
||||
* In a non-garbage collected environment, this method implements the
|
||||
* undocumented MacOS-X behavior, and releases the receiver.
|
||||
*/
|
||||
- (void) drain;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Destroys the receiver (calls -dealloc).
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -42,15 +42,6 @@ extern "C" {
|
|||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
enum {
|
||||
NSBundleExecutableArchitectureI386 = 0x00000007,
|
||||
NSBundleExecutableArchitecturePPC = 0x00000012,
|
||||
NSBundleExecutableArchitecturePPC64 = 0x01000012,
|
||||
NSBundleExecutableArchitectureX86_64 = 0x01000007,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Notification posted when a bundle is loaded. The notification object is
|
||||
* the [NSBundle] itself. The notification also contains a <em>userInfo</em>
|
||||
|
@ -107,8 +98,6 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
@interface NSBundle : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSBundle)
|
||||
@public
|
||||
NSString *_path;
|
||||
NSMutableArray *_bundleClasses;
|
||||
Class _principalClass;
|
||||
|
@ -118,10 +107,6 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
BOOL _codeLoaded;
|
||||
unsigned _version;
|
||||
NSString *_frameworkVersion;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Return an array enumerating all the bundles in the application. This
|
||||
|
@ -277,8 +262,8 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
the bundle.
|
||||
</p>
|
||||
<p>
|
||||
If ext is nil or empty, then the first file exactly matching name
|
||||
(ie with no extension) is returned.
|
||||
If ext is nil or empty, then the first file with name and any
|
||||
extension is returned.
|
||||
</p>
|
||||
*/
|
||||
- (NSString*) pathForResource: (NSString*)name
|
||||
|
@ -337,12 +322,10 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
+ (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray
|
||||
forPreferences: (NSArray *)preferencesArray;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/**
|
||||
* Returns a boolean indicating whether code for the bundle has been loaded.
|
||||
*/
|
||||
- (BOOL) isLoaded;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This method returns the same information as
|
||||
|
@ -368,22 +351,12 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
/** Returns the info property list associated with the bundle. */
|
||||
- (NSDictionary*) infoDictionary;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/** Returns a localized info property list based on the preferred
|
||||
* localization or the most appropriate localization if the preferred
|
||||
* one cannot be found.
|
||||
*/
|
||||
- (NSDictionary*) localizedInfoDictionary;
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (NSString*) developmentLocalization;
|
||||
|
||||
/** Not implemented
|
||||
*/
|
||||
- (id) objectForInfoDictionaryKey: (NSString *)key;
|
||||
#endif
|
||||
|
||||
/** Returns all the localizations in the bundle. */
|
||||
- (NSArray*) localizations;
|
||||
|
||||
|
@ -400,27 +373,13 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
- (BOOL) load;
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST)
|
||||
/** * Not implemented
|
||||
*/
|
||||
- (BOOL) unload;
|
||||
#endif
|
||||
|
||||
/** Returns the path to the executable code in the bundle */
|
||||
- (NSString *) executablePath;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSArray *) executableArchitectures;
|
||||
/** Not implemented */
|
||||
- (BOOL) preflightAndReturnError: (NSError **)error;
|
||||
/** Not implemented */
|
||||
- (BOOL) loadAndReturnError: (NSError **)error;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE, 011700)
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
/**
|
||||
* Augments [NSBundle], including methods for handling libraries in the GNUstep
|
||||
* fashion, for rapid localization, and other purposes.
|
||||
|
@ -570,13 +529,160 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
#define NSLocalizedStringFromTableInBundle(key, tbl, bundle, comment) \
|
||||
[bundle localizedStringForKey:(key) value:@"" table:(tbl)]
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
#define NSLocalizedStringFromTableInFramework(key, tbl, fpth, comment) \
|
||||
[[NSBundle mainBundle] localizedStringForKey:(key) value:@"" \
|
||||
table: [bundle pathForGNUstepResource:(tbl) ofType: nil inDirectory: (fpth)]
|
||||
#endif /* GNUSTEP */
|
||||
|
||||
/* Now Support for Quick Localization */
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
||||
/* The quickest possible way to localize a string:
|
||||
|
||||
NSLog (_(@"New Game"));
|
||||
|
||||
Please make use of the longer functions taking a comment when you
|
||||
get the time to localize seriously your code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This function (macro) is a GNUstep extension.
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>_(@"My string to translate")</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* is exactly the same as
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>NSLocalizedString (@"My string to translate", @"")</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* It is useful when you need to translate an application
|
||||
* very quickly, as you just need to enclose all strings
|
||||
* inside <code>_()</code>. But please note that when you
|
||||
* use this macro, you are not taking advantage of comments
|
||||
* for the translator, so consider using
|
||||
* <code>NSLocalizedString</code> instead when you need a
|
||||
* comment.
|
||||
* </p>
|
||||
*/
|
||||
#define _(X) NSLocalizedString (X, @"")
|
||||
|
||||
/* The quickest possible way to localize a static string:
|
||||
|
||||
static NSString *string = __(@"New Game");
|
||||
|
||||
NSLog (_(string)); */
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This function (macro) is a GNUstep extension.
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>__(@"My string to translate")</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* is exactly the same as
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>NSLocalizedStaticString (@"My string to translate", @"")</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* It is useful when you need to translate an application very
|
||||
* quickly. You would use it as follows for static strings:
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>
|
||||
* NSString *message = __(@"Hello there");
|
||||
|
||||
* ... more code ...
|
||||
|
||||
* NSLog (_(messages));
|
||||
* </code>
|
||||
* </p>
|
||||
* <p>
|
||||
* But please note that when you use this macro, you are not
|
||||
* taking advantage of comments for the translator, so
|
||||
* consider using <code>NSLocalizedStaticString</code>
|
||||
* instead when you need a comment.
|
||||
* </p>
|
||||
*/
|
||||
#define __(X) X
|
||||
|
||||
/* The better way for a static string, with a comment - use as follows -
|
||||
|
||||
static NSString *string = NSLocalizedStaticString (@"New Game",
|
||||
@"Menu Option");
|
||||
|
||||
NSLog (_(string));
|
||||
|
||||
If you need anything more complicated than this, please initialize
|
||||
the static strings manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This function (macro) is a GNUstep extensions, and it is used
|
||||
* to localize static strings. Here is an example of a static
|
||||
* string:
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>
|
||||
* NSString *message = @"Hi there";
|
||||
|
||||
* ... some code ...
|
||||
|
||||
* NSLog (message);
|
||||
* </code>
|
||||
* </p>
|
||||
* <p>
|
||||
* This string can not be localized using the standard
|
||||
* openstep functions/macros. By using this gnustep extension,
|
||||
* you can localize it as follows:
|
||||
* </p>
|
||||
* <p>
|
||||
* <code>
|
||||
* NSString *message = NSLocalizedStaticString (@"Hi there",
|
||||
* @"Greeting");
|
||||
*
|
||||
* ... some code ...
|
||||
*
|
||||
* NSLog (NSLocalizedString (message, @""));
|
||||
* </code>
|
||||
* </p>
|
||||
* <p>
|
||||
* When the tools generate the
|
||||
* <code>Localizable.strings</code> file from the source
|
||||
* code, they will ignore the <code>NSLocalizedString</code>
|
||||
* call while they will extract the string (and the comment)
|
||||
* to localize from the <code>NSLocalizedStaticString</code>
|
||||
* call.
|
||||
* </p>
|
||||
* <p>
|
||||
* When the code is compiled, instead, the
|
||||
* <code>NSLocalizedStaticString</code> call is ignored (discarded,
|
||||
* it is a macro which simply expands to <code>key</code>), while
|
||||
* the <code>NSLocalizedString</code> will actually look up the
|
||||
* string for translation in the <code>Localizable.strings</code>
|
||||
* file.
|
||||
* </p>
|
||||
* <p>
|
||||
* Please note that there is currently no macro/function to
|
||||
* localize static strings using different tables. If you
|
||||
* need that functionality, you have either to prepare the
|
||||
* localization tables by hand, or to rewrite your code in
|
||||
* such a way as not to use static strings.
|
||||
* </p>
|
||||
*/
|
||||
#define NSLocalizedStaticString(key, comment) key
|
||||
|
||||
#endif /* GS_API_NONE */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSBundle+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSBundle_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define __NSByteOrder_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#include <GNUstepBase/GSConfig.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
|
|
@ -1,166 +0,0 @@
|
|||
/* Interface for NSCache for GNUStep
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
Written by: David Chisnall <csdavec@swan.ac.uk>
|
||||
Created: 2009
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef __NSCache_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSCache_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSString;
|
||||
@class NSMutableDictionary;
|
||||
@class NSMutableArray;
|
||||
|
||||
@interface NSCache : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSCache)
|
||||
@private
|
||||
/** The maximum total cost of all cache objects. */
|
||||
NSUInteger _costLimit;
|
||||
/** Total cost of currently-stored objects. */
|
||||
NSUInteger _totalCost;
|
||||
/** The maximum number of objects in the cache. */
|
||||
NSUInteger _countLimit;
|
||||
/** The delegate object, notified when objects are about to be evicted. */
|
||||
id _delegate;
|
||||
/** Flag indicating whether discarded objects should be evicted */
|
||||
BOOL _evictsObjectsWithDiscardedContent;
|
||||
/** Name of this cache. */
|
||||
NSString *_name;
|
||||
/** The mapping from names to objects in this cache. */
|
||||
NSMutableDictionary *_objects;
|
||||
/** LRU ordering of all potentially-evictable objects in this cache. */
|
||||
NSMutableArray *_accesses;
|
||||
/** Total number of accesses to objects */
|
||||
int64_t _totalAccesses;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
/**
|
||||
* Returns the maximum number of objects that are supported by this cache.
|
||||
*/
|
||||
- (NSUInteger) countLimit;
|
||||
|
||||
/**
|
||||
* Returns the cache's delegate.
|
||||
*/
|
||||
- (id) delegate;
|
||||
|
||||
/**
|
||||
* Returns whether objects stored in this cache which implement the
|
||||
* NSDiscardableContent protocol are removed from the cache when their contents
|
||||
* are evicted.
|
||||
*/
|
||||
- (BOOL) evictsObjectsWithDiscardedContent;
|
||||
|
||||
/**
|
||||
* Returns the name associated with this cache.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/**
|
||||
* Returns an object associated with the specified key in this cache.
|
||||
*/
|
||||
- (id) objectForKey: (id)key;
|
||||
|
||||
/**
|
||||
* Removes all objects from this cache.
|
||||
*/
|
||||
- (void) removeAllObjects;
|
||||
|
||||
/**
|
||||
* Removes the object associated with the given key.
|
||||
*/
|
||||
- (void) removeObjectForKey: (id)key;
|
||||
|
||||
/**
|
||||
* Sets the maximum number of objects permitted in this cache. This limit is
|
||||
* advisory; caches may choose to disregard it temporarily or permanently. A
|
||||
* limit of 0 is used to indicate no limit; this is the default.
|
||||
*/
|
||||
- (void) setCountLimit: (NSUInteger)lim;
|
||||
|
||||
/**
|
||||
* Sets the delegate for this cache. The delegate will be notified when an
|
||||
* object is being evicted or removed from the cache.
|
||||
*/
|
||||
- (void) setDelegate: (id)del;
|
||||
|
||||
/**
|
||||
* Sets whether this cache will evict objects that conform to the
|
||||
* NSDiscardableContent protocol, or simply discard their contents.
|
||||
*/
|
||||
- (void) setEvictsObjectsWithDiscardedContent: (BOOL)b;
|
||||
|
||||
/**
|
||||
* Sets the name for this cache.
|
||||
*/
|
||||
- (void) setName: (NSString*)cacheName;
|
||||
|
||||
/**
|
||||
* Adds an object and its associated cost. The cache will endeavor to keep the
|
||||
* total cost below the value set with -setTotalCostLimit: by discarding the
|
||||
* contents of objects which implement the NSDiscardableContent protocol.
|
||||
*/
|
||||
- (void) setObject: (id)obj forKey: (id)key cost: (NSUInteger)num;
|
||||
|
||||
/**
|
||||
* Adds an object to the cache without associating a cost with it.
|
||||
*/
|
||||
- (void) setObject: (id)obj forKey: (id)key;
|
||||
|
||||
/**
|
||||
* Sets the maximum total cost for objects stored in this cache. This limit is
|
||||
* advisory; caches may choose to disregard it temporarily or permanently. A
|
||||
* limit of 0 is used to indicate no limit; this is the default.
|
||||
*/
|
||||
- (void) setTotalCostLimit: (NSUInteger)lim;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Protocol implemented by NSCache delegate objects.
|
||||
*/
|
||||
@protocol NSCacheDelegate
|
||||
/**
|
||||
* Delegate method, called just before the cache removes an object, either as
|
||||
* the result of user action or due to the cache becoming full.
|
||||
*/
|
||||
- (void) cache: (NSCache*)cache willEvictObject: (id)obj;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
#endif /* __NSCache_h_GNUSTEP_BASE_INCLUDE */
|
193
Headers/Foundation/NSCalendar.h
Normal file
193
Headers/Foundation/NSCalendar.h
Normal file
|
@ -0,0 +1,193 @@
|
|||
/* NSCalendar.h
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Stefan Bidigaray
|
||||
Date: December, 2010
|
||||
|
||||
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 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; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __NSCalendar_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSCalendar_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSGeometry.h>
|
||||
|
||||
@class NSDate;
|
||||
@class NSCalendar;
|
||||
@class NSLocale;
|
||||
@class NSString;
|
||||
@class NSTimeZone;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef NSUInteger NSCalendarUnit;
|
||||
enum
|
||||
{
|
||||
NSEraCalendarUnit = (1UL << 1),
|
||||
NSYearCalendarUnit = (1UL << 2),
|
||||
NSMonthCalendarUnit = (1UL << 3),
|
||||
NSDayCalendarUnit = (1UL << 4),
|
||||
NSHourCalendarUnit = (1UL << 5),
|
||||
NSMinuteCalendarUnit = (1UL << 6),
|
||||
NSSecondCalendarUnit = (1UL << 7),
|
||||
NSWeekCalendarUnit = (1UL << 8),
|
||||
NSWeekdayCalendarUnit = (1UL << 9),
|
||||
NSWeekdayOrdinalCalendarUnit = (1UL << 10),
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
NSQuarterCalendarUnit = (1UL << 11)
|
||||
#endif
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
NSWrapCalendarComponents = (1UL << 0)
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
NSUndefinedDateComponent = 0x7fffffff
|
||||
};
|
||||
|
||||
|
||||
|
||||
@interface NSDateComponents : NSObject <NSCopying>
|
||||
{
|
||||
NSInteger _era;
|
||||
NSInteger _year;
|
||||
NSInteger _month;
|
||||
NSInteger _day;
|
||||
NSInteger _hour;
|
||||
NSInteger _minute;
|
||||
NSInteger _second;
|
||||
NSInteger _week;
|
||||
NSInteger _weekday;
|
||||
NSInteger _weekdayOrdinal;
|
||||
NSInteger _quarter;
|
||||
// FIXME: In reality these are only available on iOS > 4. Will probably show
|
||||
// up in OS X 10.7.
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
NSCalendar *_cal;
|
||||
NSTimeZone *_tz;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSInteger) day;
|
||||
- (NSInteger) era;
|
||||
- (NSInteger) hour;
|
||||
- (NSInteger) minute;
|
||||
- (NSInteger) month;
|
||||
- (NSInteger) second;
|
||||
- (NSInteger) week;
|
||||
- (NSInteger) weekday;
|
||||
- (NSInteger) weekdayOrdinal;
|
||||
- (NSInteger) year;
|
||||
|
||||
- (void) setDay: (NSInteger) v;
|
||||
- (void) setEra: (NSInteger) v;
|
||||
- (void) setHour: (NSInteger) v;
|
||||
- (void) setMinute: (NSInteger) v;
|
||||
- (void) setMonth: (NSInteger) v;
|
||||
- (void) setQuarter: (NSInteger) v;
|
||||
- (void) setSecond: (NSInteger) v;
|
||||
- (void) setWeek: (NSInteger) v;
|
||||
- (void) setWeekday: (NSInteger) v;
|
||||
- (void) setWeekdayOrdinal: (NSInteger) v;
|
||||
- (void) setYear: (NSInteger) v;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
- (NSInteger) quarter;
|
||||
- (void) setQuarter: (NSInteger) v;
|
||||
#endif
|
||||
|
||||
// FIXME: In reality these are only available on iOS > 4.
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
- (NSCalendar *) calendar;
|
||||
- (NSTimeZone *) timeZone;
|
||||
- (void) setCalendar: (NSCalendar *) cal;
|
||||
- (void) setTimeZone: (NSTimeZone *) tz;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@interface NSCalendar : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
NSString *_identifier;
|
||||
NSString *_localeId;
|
||||
NSTimeZone *_tz;
|
||||
void *_cal;
|
||||
}
|
||||
|
||||
+ (id) currentCalendar;
|
||||
|
||||
- (id) initWithCalendarIdentifier: (NSString *) string;
|
||||
- (NSString *) calendarIdentifier;
|
||||
|
||||
- (NSDateComponents *) components: (NSUInteger) unitFlags
|
||||
fromDate: (NSDate *) date;
|
||||
- (NSDateComponents *) components: (NSUInteger) unitFlags
|
||||
fromDate: (NSDate *) startingDate
|
||||
toDate: (NSDate *) resultDate
|
||||
options: (NSUInteger) opts;
|
||||
- (NSDate *) dateByAddingComponents: (NSDateComponents *) comps
|
||||
toDate: (NSDate *) date
|
||||
options: (NSUInteger) opts;
|
||||
- (NSDate *) dateFromComponents: (NSDateComponents *) comps;
|
||||
|
||||
- (NSLocale *) locale;
|
||||
- (void)setLocale: (NSLocale *) locale;
|
||||
- (NSUInteger) firstWeekday;
|
||||
- (void) setFirstWeekday: (NSUInteger) weekday;
|
||||
- (NSUInteger) minimumDaysInFirstWeek;
|
||||
- (void) setMinimumDaysInFirstWeek: (NSUInteger) mdw;
|
||||
- (NSTimeZone *) timeZone;
|
||||
- (void) setTimeZone: (NSTimeZone *) tz;
|
||||
|
||||
- (NSRange) maximumRangeOfUnit: (NSCalendarUnit) unit;
|
||||
- (NSRange) minimumRangeofUnit: (NSCalendarUnit) unit;
|
||||
- (NSUInteger) ordinalityOfUnit: (NSCalendarUnit) smaller
|
||||
inUnit: (NSCalendarUnit) larger
|
||||
forDate: (NSDate *) date;
|
||||
- (NSRange) rangeOfUnit: (NSCalendarUnit) smaller
|
||||
inUnit: (NSCalendarUnit) larger
|
||||
forDate: (NSDate *) date;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
+ (id) autoupdatingCurrentCalendar;
|
||||
|
||||
- (BOOL) rangeOfUnit: (NSCalendarUnit) unit
|
||||
startDate: (NSDate **) datep
|
||||
interval: (NSTimeInterval *)tip
|
||||
forDate: (NSDate *)date;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) */
|
||||
|
||||
#endif /* __NSCalendar_h_GNUSTEP_BASE_INCLUDE */
|
|
@ -4,7 +4,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -34,11 +34,9 @@ extern "C" {
|
|||
|
||||
@interface NSCalendarDate : NSDate
|
||||
{
|
||||
#if GS_EXPOSE(NSCalendarDate)
|
||||
NSTimeInterval _seconds_since_ref;
|
||||
NSString *_calendar_format;
|
||||
NSTimeZone *_time_zone;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Getting an NSCalendar Date
|
||||
|
@ -48,12 +46,12 @@ extern "C" {
|
|||
+ (id) dateWithString: (NSString*)description
|
||||
calendarFormat: (NSString*)format
|
||||
locale: (NSDictionary*)dictionary;
|
||||
+ (id) dateWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
+ (id) dateWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
timeZone: (NSTimeZone*)aTimeZone;
|
||||
|
||||
// Initializing an NSCalendar Date
|
||||
|
@ -63,50 +61,39 @@ extern "C" {
|
|||
- (id) initWithString: (NSString*)description
|
||||
calendarFormat: (NSString*)fmt
|
||||
locale: (NSDictionary*)locale;
|
||||
- (id) initWithYear: (NSInteger)year
|
||||
month: (NSUInteger)month
|
||||
day: (NSUInteger)day
|
||||
hour: (NSUInteger)hour
|
||||
minute: (NSUInteger)minute
|
||||
second: (NSUInteger)second
|
||||
- (id) initWithYear: (int)year
|
||||
month: (unsigned int)month
|
||||
day: (unsigned int)day
|
||||
hour: (unsigned int)hour
|
||||
minute: (unsigned int)minute
|
||||
second: (unsigned int)second
|
||||
timeZone: (NSTimeZone*)aTimeZone;
|
||||
|
||||
// Retrieving Date Elements
|
||||
- (NSInteger) dayOfCommonEra;
|
||||
- (NSInteger) dayOfMonth;
|
||||
- (NSInteger) dayOfWeek;
|
||||
- (NSInteger) dayOfYear;
|
||||
- (NSInteger) hourOfDay;
|
||||
- (NSInteger) minuteOfHour;
|
||||
- (NSInteger) monthOfYear;
|
||||
- (NSInteger) secondOfMinute;
|
||||
- (NSInteger) yearOfCommonEra;
|
||||
- (int) dayOfCommonEra;
|
||||
- (int) dayOfMonth;
|
||||
- (int) dayOfWeek;
|
||||
- (int) dayOfYear;
|
||||
- (int) hourOfDay;
|
||||
- (int) minuteOfHour;
|
||||
- (int) monthOfYear;
|
||||
- (int) secondOfMinute;
|
||||
- (int) yearOfCommonEra;
|
||||
|
||||
/**
|
||||
* <p>Returns a calendar date formed by adding the specified offsets to the
|
||||
* receiver. The offsets are added in order, years, then months, then
|
||||
* days, then hours then minutes then seconds, so if you add 1 month and
|
||||
* forty days to 20th September, the result will be 9th November.
|
||||
* </p>
|
||||
* <p>This method understands leap years and tries to adjust for daylight
|
||||
* savings time changes so that it preserves expected clock time.
|
||||
* </p>
|
||||
* <p>The returned date has the calendar format and timezone of the receiver.
|
||||
* </p>
|
||||
*/
|
||||
- (NSCalendarDate*) addYear: (NSInteger)year
|
||||
month: (NSInteger)month
|
||||
day: (NSInteger)day
|
||||
hour: (NSInteger)hour
|
||||
minute: (NSInteger)minute
|
||||
second: (NSInteger)second;
|
||||
// Providing Adjusted Dates
|
||||
- (NSCalendarDate*) addYear: (int)year
|
||||
month: (int)month
|
||||
day: (int)day
|
||||
hour: (int)hour
|
||||
minute: (int)minute
|
||||
second: (int)second;
|
||||
|
||||
// Getting String Descriptions of Dates
|
||||
- (NSString*) description;
|
||||
- (NSString*) descriptionWithCalendarFormat: (NSString*)format;
|
||||
- (NSString*) descriptionWithCalendarFormat: (NSString*)format
|
||||
locale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (id)locale;
|
||||
|
||||
// Getting and Setting Calendar Formats
|
||||
- (NSString*) calendarFormat;
|
||||
|
@ -125,16 +112,31 @@ extern "C" {
|
|||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
||||
/**
|
||||
* Adds <code>-weekOfYear</code> method.
|
||||
*/
|
||||
@interface NSCalendarDate (GSCategories)
|
||||
/**
|
||||
* The ISO standard week of the year is based on the first week of the
|
||||
* year being that week (starting on monday) for which the thursday
|
||||
* is on or after the first of january.<br />
|
||||
* This has the effect that, if january first is a friday, saturday or
|
||||
* sunday, the days of that week (up to and including the sunday) are
|
||||
* considered to be in week 53 of the preceding year. Similarly if the
|
||||
* last day of the year is a monday tuesday or wednesday, these days are
|
||||
* part of week 1 of the next year.
|
||||
*/
|
||||
- (int) weekOfYear;
|
||||
@end
|
||||
|
||||
@interface NSCalendarDate (GregorianDate)
|
||||
|
||||
- (NSInteger) lastDayOfGregorianMonth: (NSInteger)month year: (NSInteger)year;
|
||||
- (NSInteger) absoluteGregorianDay: (NSInteger)day
|
||||
month: (NSInteger)month
|
||||
year: (NSInteger)year;
|
||||
- (void) gregorianDateFromAbsolute: (NSInteger)d
|
||||
day: (NSInteger*)day
|
||||
month: (NSInteger*)month
|
||||
year: (NSInteger*)year;
|
||||
- (int) lastDayOfGregorianMonth: (int)month year: (int)year;
|
||||
- (int) absoluteGregorianDay: (int)day month: (int)month year: (int)year;
|
||||
- (void) gregorianDateFromAbsolute: (int)d
|
||||
day: (int*)day
|
||||
month: (int*)month
|
||||
year: (int*)year;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -143,27 +145,23 @@ extern "C" {
|
|||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
@interface NSCalendarDate (OPENSTEP)
|
||||
|
||||
- (NSCalendarDate*) dateByAddingYears: (NSInteger)years
|
||||
months: (NSInteger)months
|
||||
days: (NSInteger)days
|
||||
hours: (NSInteger)hours
|
||||
minutes: (NSInteger)minutes
|
||||
seconds: (NSInteger)seconds;
|
||||
- (NSCalendarDate*) dateByAddingYears: (int)years
|
||||
months: (int)months
|
||||
days: (int)days
|
||||
hours: (int)hours
|
||||
minutes: (int)minutes
|
||||
seconds: (int)seconds;
|
||||
|
||||
- (void) years: (NSInteger*)years
|
||||
months: (NSInteger*)months
|
||||
days: (NSInteger*)days
|
||||
hours: (NSInteger*)hours
|
||||
minutes: (NSInteger*)minutes
|
||||
seconds: (NSInteger*)seconds
|
||||
- (void) years: (int*)years
|
||||
months: (int*)months
|
||||
days: (int*)days
|
||||
hours: (int*)hours
|
||||
minutes: (int*)minutes
|
||||
seconds: (int*)seconds
|
||||
sinceDate: (NSDate*)date;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSCalendarDate+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -92,14 +92,6 @@ extern "C" {
|
|||
*/
|
||||
+ (NSCharacterSet*) lowercaseLetterCharacterSet;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
/**
|
||||
* Returns a character set containing the newline characters, values
|
||||
* 0x000A and 0x000D and nextline 0x0085 character.
|
||||
*/
|
||||
+ (NSCharacterSet*) newlineCharacterSet;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns a character set containing characters for diacritical marks, which
|
||||
* are usually only rendered in conjunction with another character.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -57,7 +57,7 @@ extern "C" {
|
|||
* well.
|
||||
*/
|
||||
- (void) encodeArrayOfObjCType: (const char*)type
|
||||
count: (NSUInteger)count
|
||||
count: (unsigned)count
|
||||
at: (const void*)array;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ extern "C" {
|
|||
/**
|
||||
* Stores bytes directly into archive.
|
||||
*/
|
||||
- (void) encodeBytes: (void*)d length: (NSUInteger)l;
|
||||
- (void) encodeBytes: (void*)d length: (unsigned)l;
|
||||
|
||||
/**
|
||||
* Encode object if it is/will be encoded unconditionally by this coder,
|
||||
|
@ -141,13 +141,13 @@ extern "C" {
|
|||
* well. Objects will be retained and you must release them.
|
||||
*/
|
||||
- (void) decodeArrayOfObjCType: (const char*)type
|
||||
count: (NSUInteger)count
|
||||
count: (unsigned)count
|
||||
at: (void*)address;
|
||||
|
||||
/**
|
||||
* Retrieve bytes directly from archive.
|
||||
*/
|
||||
- (void*) decodeBytesWithReturnedLength: (NSUInteger*)l;
|
||||
- (void*) decodeBytesWithReturnedLength: (unsigned*)l;
|
||||
|
||||
/**
|
||||
* Decode an instance of [NSData].
|
||||
|
@ -222,13 +222,13 @@ extern "C" {
|
|||
* class (decoded). Version comes from [NSObject -getVersion].
|
||||
*
|
||||
*/
|
||||
- (NSInteger) versionForClassName: (NSString*)className;
|
||||
- (unsigned int) versionForClassName: (NSString*)className;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
/*
|
||||
* Include GSConfig.h for typedefs/defines of uint8_t, int32_t int64_t
|
||||
*/
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#include <GNUstepBase/GSConfig.h>
|
||||
|
||||
|
||||
/** <override-subclass />
|
||||
|
@ -257,7 +257,7 @@ extern "C" {
|
|||
* -encodeBytes:length:forKey:
|
||||
*/
|
||||
- (const uint8_t*) decodeBytesForKey: (NSString*)aKey
|
||||
returnedLength: (NSUInteger*)alength;
|
||||
returnedLength: (unsigned*)alength;
|
||||
|
||||
/** <override-subclass />
|
||||
* Returns a double value associated with aKey. This value must previously
|
||||
|
@ -313,7 +313,7 @@ extern "C" {
|
|||
* and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeBytes: (const uint8_t*)aPointer
|
||||
length: (NSUInteger)length
|
||||
length: (unsigned)length
|
||||
forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
|
@ -333,17 +333,17 @@ extern "C" {
|
|||
- (void) encodeFloat: (float)aFloat forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes an int and associates the encoded value with aKey.
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt: (int)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes 32 bit integer and associates the encoded value with aKey.
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt32: (int32_t)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
/** <override-subclass />
|
||||
* Encodes a 64 bit integer and associates the encoded value with aKey.
|
||||
* Encodes anInteger and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeInt64: (int64_t)anInteger forKey: (NSString*)aKey;
|
||||
|
||||
|
@ -352,18 +352,6 @@ extern "C" {
|
|||
*/
|
||||
- (void) encodeObject: (id)anObject forKey: (NSString*)aKey;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
/** <override-subclass />
|
||||
* Encodes an NSInteger and associates the encoded value with key.
|
||||
*/
|
||||
|
||||
- (void) encodeInteger: (NSInteger)anInteger forKey: (NSString *)key;
|
||||
/** <override-subclass />
|
||||
* Decodes an NSInteger associated with the key.
|
||||
*/
|
||||
- (NSInteger) decodeIntegerForKey: (NSString *)key;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -62,24 +62,14 @@ typedef enum _NSPredicateOperatorType
|
|||
NSEndsWithPredicateOperatorType,
|
||||
NSInPredicateOperatorType,
|
||||
NSCustomSelectorPredicateOperatorType
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
,
|
||||
NSContainsPredicateOperatorType = 99,
|
||||
NSBetweenPredicateOperatorType
|
||||
#endif
|
||||
} NSPredicateOperatorType;
|
||||
|
||||
@interface NSComparisonPredicate : NSPredicate
|
||||
{
|
||||
#if GS_EXPOSE(NSComparisonPredicate)
|
||||
NSComparisonPredicateModifier _modifier;
|
||||
SEL _selector;
|
||||
NSUInteger _options;
|
||||
unsigned _options;
|
||||
NSPredicateOperatorType _type;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
@public
|
||||
NSExpression *_left;
|
||||
NSExpression *_right;
|
||||
|
@ -92,7 +82,7 @@ typedef enum _NSPredicateOperatorType
|
|||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (NSUInteger) opts;
|
||||
options: (unsigned) opts;
|
||||
|
||||
- (NSComparisonPredicateModifier) comparisonPredicateModifier;
|
||||
- (SEL) customSelector;
|
||||
|
@ -103,9 +93,9 @@ typedef enum _NSPredicateOperatorType
|
|||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (NSUInteger) opts;
|
||||
options: (unsigned) opts;
|
||||
- (NSExpression *) leftExpression;
|
||||
- (NSUInteger) options;
|
||||
- (unsigned) options;
|
||||
- (NSPredicateOperatorType) predicateOperatorType;
|
||||
- (NSExpression *) rightExpression;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -34,21 +34,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum
|
||||
typedef enum _NSCompoundPredicateType
|
||||
{
|
||||
NSNotPredicateType = 0,
|
||||
NSAndPredicateType,
|
||||
NSOrPredicateType
|
||||
};
|
||||
typedef NSUInteger NSCompoundPredicateType;
|
||||
} NSCompoundPredicateType;
|
||||
|
||||
@interface NSCompoundPredicate : NSPredicate
|
||||
{
|
||||
#if GS_EXPOSE(NSCompoundPredicate)
|
||||
NSCompoundPredicateType _type;
|
||||
NSArray *_subs;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSPredicate *) andPredicateWithSubpredicates: (NSArray *)list;
|
||||
+ (NSPredicate *) notPredicateWithSubpredicate: (NSPredicate *)predicate;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -94,13 +94,44 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */
|
|||
*/
|
||||
@interface NSConnection : NSObject
|
||||
{
|
||||
#if GS_NONFRAGILE
|
||||
# if defined(GS_NSConnection_IVARS)
|
||||
@public GS_NSConnection_IVARS
|
||||
# endif
|
||||
#else
|
||||
@private id _internal;
|
||||
@private
|
||||
BOOL _isValid;
|
||||
BOOL _independentQueueing;
|
||||
BOOL _authenticateIn;
|
||||
BOOL _authenticateOut;
|
||||
BOOL _multipleThreads;
|
||||
BOOL _shuttingDown;
|
||||
BOOL _dummy1;
|
||||
BOOL _dummy2;
|
||||
NSPort *_receivePort;
|
||||
NSPort *_sendPort;
|
||||
unsigned _requestDepth;
|
||||
unsigned _messageCount;
|
||||
unsigned _reqOutCount;
|
||||
unsigned _reqInCount;
|
||||
unsigned _repOutCount;
|
||||
unsigned _repInCount;
|
||||
#ifndef _IN_CONNECTION_M
|
||||
#define GSIMapTable void*
|
||||
#endif
|
||||
GSIMapTable _localObjects;
|
||||
GSIMapTable _localTargets;
|
||||
GSIMapTable _remoteProxies;
|
||||
GSIMapTable _replyMap;
|
||||
#ifndef _IN_CONNECTION_M
|
||||
#undef GSIMapTable
|
||||
#endif
|
||||
NSTimeInterval _replyTimeout;
|
||||
NSTimeInterval _requestTimeout;
|
||||
NSMutableArray *_requestModes;
|
||||
NSMutableArray *_runLoops;
|
||||
NSMutableArray *_requestQueue;
|
||||
id _delegate;
|
||||
NSRecursiveLock *_refGate;
|
||||
NSMutableArray *_cachedDecoders;
|
||||
NSMutableArray *_cachedEncoders;
|
||||
NSString *_registeredName;
|
||||
NSPortNameServer *_nameServer;
|
||||
}
|
||||
|
||||
+ (NSArray*) allConnections;
|
||||
|
@ -118,13 +149,6 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */
|
|||
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
||||
host: (NSString*)h usingNameServer: (NSPortNameServer*)s;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root;
|
||||
+ (id) serviceConnectionWithName: (NSString *)name
|
||||
rootObject: (id)root
|
||||
usingNameServer: (NSPortNameServer *)server;
|
||||
#endif
|
||||
|
||||
- (void) addRequestMode: (NSString*)mode;
|
||||
- (void) addRunLoop: (NSRunLoop*)loop;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -35,33 +35,21 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
@class NSError;
|
||||
@class NSURL;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
enum {
|
||||
NSMappedRead = 1,
|
||||
NSUncachedRead = 2
|
||||
};
|
||||
|
||||
enum {
|
||||
NSAtomicWrite = 1
|
||||
};
|
||||
#endif
|
||||
|
||||
@interface NSData : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||
|
||||
// Allocating and Initializing a Data Object
|
||||
|
||||
+ (id) data;
|
||||
+ (id) dataWithBytes: (const void*)bytes
|
||||
length: (NSUInteger)length;
|
||||
length: (unsigned int)length;
|
||||
+ (id) dataWithBytesNoCopy: (void*)bytes
|
||||
length: (NSUInteger)length;
|
||||
length: (unsigned int)length;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
+ (id) dataWithBytesNoCopy: (void*)aBuffer
|
||||
length: (NSUInteger)bufferSize
|
||||
length: (unsigned int)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree;
|
||||
#endif
|
||||
+ (id) dataWithContentsOfFile: (NSString*)path;
|
||||
|
@ -71,12 +59,12 @@ enum {
|
|||
#endif
|
||||
+ (id) dataWithData: (NSData*)data;
|
||||
- (id) initWithBytes: (const void*)aBuffer
|
||||
length: (NSUInteger)bufferSize;
|
||||
length: (unsigned int)bufferSize;
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (NSUInteger)bufferSize;
|
||||
length: (unsigned int)bufferSize;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (id) initWithBytesNoCopy: (void*)aBuffer
|
||||
length: (NSUInteger)bufferSize
|
||||
length: (unsigned int)bufferSize
|
||||
freeWhenDone: (BOOL)shouldFree;
|
||||
#endif
|
||||
- (id) initWithContentsOfFile: (NSString*)path;
|
||||
|
@ -92,7 +80,7 @@ enum {
|
|||
- (NSString*) description;
|
||||
- (void) getBytes: (void*)buffer;
|
||||
- (void) getBytes: (void*)buffer
|
||||
length: (NSUInteger)length;
|
||||
length: (unsigned int)length;
|
||||
- (void) getBytes: (void*)buffer
|
||||
range: (NSRange)aRange;
|
||||
- (NSData*) subdataWithRange: (NSRange)aRange;
|
||||
|
@ -100,25 +88,14 @@ enum {
|
|||
// Querying a Data Object
|
||||
|
||||
- (BOOL) isEqualToData: (NSData*)other;
|
||||
- (NSUInteger) length;
|
||||
- (unsigned int) length;
|
||||
|
||||
// Storing Data
|
||||
|
||||
/**
|
||||
* <p>Writes a copy of the data encapsulated by the receiver to a file
|
||||
* at path. If the useAuxiliaryFile flag is YES, this writes to a
|
||||
* temporary file and then renames that to the file at path, thus
|
||||
* ensuring that path exists and does not contain partially written
|
||||
* data at any point.
|
||||
* </p>
|
||||
* <p>On success returns YES, on failure returns NO.
|
||||
* </p>
|
||||
*/
|
||||
- (BOOL) writeToFile: (NSString*)path
|
||||
atomically: (BOOL)useAuxiliaryFile;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
/**
|
||||
* Writes a copy of the contents of the receiver to the specified URL.
|
||||
*/
|
||||
- (BOOL) writeToURL: (NSURL*)anURL atomically: (BOOL)flag;
|
||||
#endif
|
||||
|
||||
|
@ -141,32 +118,79 @@ enum {
|
|||
count: (unsigned int)numInts
|
||||
atIndex: (unsigned int)index;
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST)
|
||||
/**
|
||||
* <p>Writes a copy of the data encapsulated by the receiver to a file
|
||||
* at path. If the NSAtomicWrite option is set, this writes to a
|
||||
* temporary file and then renames that to the file at path, thus
|
||||
* ensuring that path exists and does not contain partially written
|
||||
* data at any point.
|
||||
* </p>
|
||||
* <p>On success returns YES, on failure returns NO.
|
||||
* </p>
|
||||
*/
|
||||
- (BOOL) writeToFile: (NSString *)path
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr;
|
||||
|
||||
/**
|
||||
* Writes a copy of the contents of the receiver to the specified URL.
|
||||
*/
|
||||
- (BOOL) writeToURL: (NSURL *)url
|
||||
options: (NSUInteger)writeOptionsMask
|
||||
error: (NSError **)errorPtr;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
||||
/**
|
||||
* Extension methods for the NSData class- mainly conversion utilities.
|
||||
*/
|
||||
@interface NSData (GSCategories)
|
||||
|
||||
/**
|
||||
* Returns an NSString object containing an ASCII hexadecimal representation
|
||||
* of the receiver. This means that the returned object will contain
|
||||
* exactly twice as many characters as there are bytes as the receiver,
|
||||
* as each byte in the receiver is represented by two hexadecimal digits.<br />
|
||||
* The high order four bits of each byte is encoded before the low
|
||||
* order four bits. Capital letters 'A' to 'F' are used to represent
|
||||
* values from 10 to 15.<br />
|
||||
* If you need the hexadecimal representation as raw byte data, use code
|
||||
* like -
|
||||
* <example>
|
||||
* hexData = [[sourceData hexadecimalRepresentation]
|
||||
* dataUsingEncoding: NSASCIIStringEncoding];
|
||||
* </example>
|
||||
*/
|
||||
- (NSString*) hexadecimalRepresentation;
|
||||
|
||||
/**
|
||||
* Initialises the receiver with the supplied string data which contains
|
||||
* a hexadecimal coding of the bytes. The parsing of the string is
|
||||
* fairly tolerant, ignoring whitespace and permitting both upper and
|
||||
* lower case hexadecimal digits (the -hexadecimalRepresentation method
|
||||
* produces a string using only uppercase digits with no white space).<br />
|
||||
* If the string does not contain one or more pairs of hexadecimal digits
|
||||
* then an exception is raised.
|
||||
*/
|
||||
- (id) initWithHexadecimalRepresentation: (NSString*)string;
|
||||
|
||||
/**
|
||||
* Creates an MD5 digest of the information stored in the receiver and
|
||||
* returns it as an autoreleased 16 byte NSData object.<br />
|
||||
* If you need to produce a digest of string information, you need to
|
||||
* decide what character encoding is to be used and convert your string
|
||||
* to a data object of that encoding type first using the
|
||||
* [NSString-dataUsingEncoding:] method -
|
||||
* <example>
|
||||
* myDigest = [[myString dataUsingEncoding: NSUTF8StringEncoding] md5Digest];
|
||||
* </example>
|
||||
* If you need to use the digest in a human readable form, you will
|
||||
* probably want it to be seen as 32 hexadecimal digits, and can do that
|
||||
* using the -hexadecimalRepresentation method.
|
||||
*/
|
||||
- (NSData*) md5Digest;
|
||||
|
||||
/**
|
||||
* Decodes the source data from uuencoded and return the result.<br />
|
||||
* Returns the encoded file name in namePtr if it is not null.
|
||||
* Returns the encoded file mode in modePtr if it is not null.
|
||||
*/
|
||||
- (BOOL) uudecodeInto: (NSMutableData*)decoded
|
||||
name: (NSString**)namePtr
|
||||
mode: (int*)modePtr;
|
||||
|
||||
/**
|
||||
* Encode the source data to uuencoded.<br />
|
||||
* Uses the supplied name as the filename in the encoded data,
|
||||
* and says that the file mode is as specified.<br />
|
||||
* If no name is supplied, uses <code>untitled</code> as the name.
|
||||
*/
|
||||
- (BOOL) uuencodeInto: (NSMutableData*)encoded
|
||||
name: (NSString*)name
|
||||
mode: (int)mode;
|
||||
@end
|
||||
|
||||
/*
|
||||
* We include special support for coding/decoding - adding methods for
|
||||
* serializing/deserializing type-tags and cross-references.
|
||||
|
@ -238,8 +262,8 @@ enum {
|
|||
#define _GSC_CID 0x17 /* Class encoded as id */
|
||||
|
||||
@interface NSData (GNUstepExtensions)
|
||||
+ (id) dataWithShmID: (int)anID length: (NSUInteger) length;
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (NSUInteger) length;
|
||||
+ (id) dataWithShmID: (int)anID length: (unsigned int) length;
|
||||
+ (id) dataWithSharedBytes: (const void*)bytes length: (unsigned int) length;
|
||||
|
||||
/*
|
||||
* -deserializeTypeTag:andCrossRef:atCursor:
|
||||
|
@ -254,21 +278,21 @@ enum {
|
|||
|
||||
@interface NSMutableData : NSData
|
||||
|
||||
+ (id) dataWithCapacity: (NSUInteger)numBytes;
|
||||
+ (id) dataWithLength: (NSUInteger)length;
|
||||
- (id) initWithCapacity: (NSUInteger)capacity;
|
||||
- (id) initWithLength: (NSUInteger)length;
|
||||
+ (id) dataWithCapacity: (unsigned int)numBytes;
|
||||
+ (id) dataWithLength: (unsigned int)length;
|
||||
- (id) initWithCapacity: (unsigned int)capacity;
|
||||
- (id) initWithLength: (unsigned int)length;
|
||||
|
||||
// Adjusting Capacity
|
||||
|
||||
- (void) increaseLengthBy: (NSUInteger)extraLength;
|
||||
- (void) setLength: (NSUInteger)size;
|
||||
- (void) increaseLengthBy: (unsigned int)extraLength;
|
||||
- (void) setLength: (unsigned int)size;
|
||||
- (void*) mutableBytes;
|
||||
|
||||
// Appending Data
|
||||
|
||||
- (void) appendBytes: (const void*)aBuffer
|
||||
length: (NSUInteger)bufferSize;
|
||||
length: (unsigned int)bufferSize;
|
||||
- (void) appendData: (NSData*)other;
|
||||
|
||||
// Modifying Data
|
||||
|
@ -278,7 +302,7 @@ enum {
|
|||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (void) replaceBytesInRange: (NSRange)aRange
|
||||
withBytes: (const void*)bytes
|
||||
length: (NSUInteger)length;
|
||||
length: (unsigned int)length;
|
||||
#endif
|
||||
- (void) resetBytesInRange: (NSRange)aRange;
|
||||
- (void) setData: (NSData*)data;
|
||||
|
@ -307,8 +331,8 @@ enum {
|
|||
* Capacity management - GNUstep gives you control over the size of
|
||||
* the data buffer as well as the 'length' of valid data in it.
|
||||
*/
|
||||
- (NSUInteger) capacity;
|
||||
- (id) setCapacity: (NSUInteger)newCapacity;
|
||||
- (unsigned int) capacity;
|
||||
- (id) setCapacity: (unsigned int)newCapacity;
|
||||
|
||||
- (int) shmID; /* Shared memory ID for data buffer (if any) */
|
||||
|
||||
|
@ -329,8 +353,4 @@ enum {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSData+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSData_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -89,7 +89,7 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970;
|
|||
- (NSString*) descriptionWithCalendarFormat: (NSString*)format
|
||||
timeZone: (NSTimeZone*)aTimeZone
|
||||
locale: (NSDictionary*)l;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (id)locale;
|
||||
|
||||
// Adding and getting intervals
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -102,13 +102,8 @@ extern "C" {
|
|||
*/
|
||||
@interface NSDateFormatter : NSFormatter <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSDateFormatter)
|
||||
NSString *_dateFormat;
|
||||
BOOL _allowsNaturalLanguage;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Initializing an NSDateFormatter */
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -29,16 +29,8 @@
|
|||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#include <errno.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if !NO_GNUSTEP
|
||||
# if defined(GNUSTEP_BASE_INTERNAL)
|
||||
# import "Foundation/NSObject.h"
|
||||
# import "GNUstepBase/NSDebug+GNUstepBase.h"
|
||||
# else
|
||||
# import <Foundation/NSObject.h>
|
||||
# import <GNUstepBase/NSDebug+GNUstepBase.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -157,6 +149,19 @@ GS_EXPORT NSArray *GSDebugAllocationListRecordedObjects(Class c);
|
|||
*/
|
||||
GS_EXPORT id GSDebugAllocationTagRecordedObject(id object, id tag);
|
||||
|
||||
/**
|
||||
* Used to produce a format string for logging a message with function
|
||||
* location details.
|
||||
*/
|
||||
GS_EXPORT NSString* GSDebugFunctionMsg(const char *func, const char *file,
|
||||
int line, NSString *fmt);
|
||||
/**
|
||||
* Used to produce a format string for logging a message with method
|
||||
* location details.
|
||||
*/
|
||||
GS_EXPORT NSString* GSDebugMethodMsg(id obj, SEL sel, const char *file,
|
||||
int line, NSString *fmt);
|
||||
|
||||
/**
|
||||
* This functions allows to set own function callbacks for debugging allocation
|
||||
* of objects. Useful if you intend to write your own object allocation code.
|
||||
|
@ -206,23 +211,261 @@ GS_EXPORT BOOL NSDeallocateZombies;
|
|||
|
||||
|
||||
|
||||
#ifdef GSDIAGNOSE
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
<p>NSDebugLLog() is the basic debug logging macro used to display
|
||||
log messages using NSLog(), if debug logging was enabled at compile
|
||||
time and the appropriate logging level was set at runtime.
|
||||
</p>
|
||||
<p>Debug logging which can be enabled/disabled by defining GSDIAGNOSE
|
||||
when compiling and also setting values in the mutable set which
|
||||
is set up by NSProcessInfo. GSDIAGNOSE is defined automatically
|
||||
unless diagnose=no is specified in the make arguments.
|
||||
</p>
|
||||
<p>NSProcess initialises a set of strings that are the names of active
|
||||
debug levels using the '--GNU-Debug=...' command line argument.
|
||||
Each command-line argument of that form is removed from
|
||||
<code>NSProcessInfo</code>'s list of arguments and the variable part
|
||||
(...) is added to the set.
|
||||
This means that as far as the program proper is concerned, it is
|
||||
running with the same arguments as if debugging had not been enabled.
|
||||
</p>
|
||||
<p>For instance, to debug the NSBundle class, run your program with
|
||||
'--GNU-Debug=NSBundle'
|
||||
You can of course supply multiple '--GNU-Debug=...' arguments to
|
||||
output debug information on more than one thing.
|
||||
</p>
|
||||
<p>NSUserDefaults also adds debug levels from the array given by the
|
||||
GNU-Debug key ... but these values will not take effect until the
|
||||
+standardUserDefaults method is called ... so they are useless for
|
||||
debugging NSUserDefaults itself or for debugging any code executed
|
||||
before the defaults system is used.
|
||||
</p>
|
||||
<p>To embed debug logging in your code you use the NSDebugLLog() or
|
||||
NSDebugLog() macro. NSDebugLog() is just NSDebugLLog() with the debug
|
||||
level set to 'dflt'. So, to activate debug statements that use
|
||||
NSDebugLog(), you supply the '--GNU-Debug=dflt' argument to your program.
|
||||
</p>
|
||||
<p>You can also change the active debug levels under your programs control -
|
||||
NSProcessInfo has a [-debugSet] method that returns the mutable set that
|
||||
contains the active debug levels - your program can modify this set.
|
||||
</p>
|
||||
<p>Two debug levels have a special effect - 'dflt' is the level used for
|
||||
debug logs statements where no debug level is specified, and 'NoWarn'
|
||||
is used to *disable* warning messages.
|
||||
</p>
|
||||
<p>As a convenience, there are four more logging macros you can use -
|
||||
NSDebugFLog(), NSDebugFLLog(), NSDebugMLog() and NSDebugMLLog().
|
||||
These are the same as the other macros, but are specifically for use in
|
||||
either functions or methods and prepend information about the file, line
|
||||
and either function or class/method in which the message was generated.
|
||||
</p>
|
||||
*/
|
||||
GS_EXPORT void *NSFrameAddress(NSUInteger offset);
|
||||
#define NSDebugLLog(level, format, args...) \
|
||||
do { if (GSDebugSet(level) == YES) \
|
||||
NSLog(format , ## args); } while (0)
|
||||
|
||||
/**
|
||||
* This macro is a shorthand for NSDebugLLog() using then default debug
|
||||
* level ... 'dflt'
|
||||
*/
|
||||
#define NSDebugLog(format, args...) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) \
|
||||
NSLog(format , ## args); } while (0)
|
||||
|
||||
/**
|
||||
* This macro is like NSDebugLLog() but includes the name and location
|
||||
* of the function in which the macro is used as part of the log output.
|
||||
*/
|
||||
#define NSDebugFLLog(level, format, args...) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro is a shorthand for NSDebugFLLog() using then default debug
|
||||
* level ... 'dflt'
|
||||
*/
|
||||
#define NSDebugFLog(format, args...) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro is like NSDebugLLog() but includes the name and location
|
||||
* of the <em>method</em> in which the macro is used as part of the log output.
|
||||
*/
|
||||
#define NSDebugMLLog(level, format, args...) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro is a shorthand for NSDebugMLLog() using then default debug
|
||||
* level ... 'dflt'
|
||||
*/
|
||||
#define NSDebugMLog(format, args...) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro saves the name and location of the function in
|
||||
* which the macro is used, along with a short string msg as
|
||||
* the tag associated with a recorded object.
|
||||
*/
|
||||
#define NSDebugFRLog(object, msg) \
|
||||
do { \
|
||||
NSString *tag = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, msg); \
|
||||
GSDebugAllocationTagRecordedObject(object, tag); } while (0)
|
||||
|
||||
/**
|
||||
* This macro saves the name and location of the method in
|
||||
* which the macro is used, along with a short string msg as
|
||||
* the tag associated with a recorded object.
|
||||
*/
|
||||
#define NSDebugMRLog(object, msg) \
|
||||
do { \
|
||||
NSString *tag = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, msg); \
|
||||
GSDebugAllocationTagRecordedObject(object, tag); } while (0)
|
||||
|
||||
#else
|
||||
#define NSDebugLLog(level, format, args...)
|
||||
#define NSDebugLog(format, args...)
|
||||
#define NSDebugFLLog(level, format, args...)
|
||||
#define NSDebugFLog(format, args...)
|
||||
#define NSDebugMLLog(level, format, args...)
|
||||
#define NSDebugMLog(format, args...)
|
||||
#define NSDebugFRLog(object, msg)
|
||||
#define NSDebugMRLog(object, msg)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Macro to log a message only the first time it is encountered.<br />
|
||||
* Not entirely thread safe ... but that's not really important,
|
||||
* it just means that it's possible for the message to be logged
|
||||
* more than once if two threads call it simultaneously when it
|
||||
* has not already been called.<br />
|
||||
* Use this from inside a function. Pass an NSString as a format,
|
||||
* followed by zero or more arguments for the format string.
|
||||
* Example: GSOnceMLog(@"This function is deprecated, use another");
|
||||
*/
|
||||
#define GSOnceFLog(format, args...) \
|
||||
do { static BOOL beenHere = NO; if (beenHere == NO) {\
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
beenHere = YES; \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
/**
|
||||
* Macro to log a message only the first time it is encountered.<br />
|
||||
* Not entirely thread safe ... but that's not really important,
|
||||
* it just means that it's possible for the message to be logged
|
||||
* more than once if two threads call it simultaneously when it
|
||||
* has not already been called.<br />
|
||||
* Use this from inside a method. Pass an NSString as a format
|
||||
* followed by zero or more arguments for the format string.<br />
|
||||
* Example: GSOnceMLog(@"This method is deprecated, use another");
|
||||
*/
|
||||
#define GSOnceMLog(format, args...) \
|
||||
do { static BOOL beenHere = NO; if (beenHere == NO) {\
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
beenHere = YES; \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
|
||||
|
||||
#ifdef GSWARN
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
|
||||
/**
|
||||
<p>NSWarnLog() is the basic debug logging macro used to display
|
||||
warning messages using NSLog(), if warn logging was not disabled at compile
|
||||
time and the disabling logging level was not set at runtime.
|
||||
</p>
|
||||
<p>Warning messages which can be enabled/disabled by defining GSWARN
|
||||
when compiling.
|
||||
</p>
|
||||
<p>You can also disable these messages at runtime by supplying a
|
||||
'--GNU-Debug=NoWarn' argument to the program, or by adding 'NoWarn'
|
||||
to the user default array named 'GNU-Debug'.
|
||||
</p>
|
||||
<p>These logging macros are intended to be used when the software detects
|
||||
something that it not necessarily fatal or illegal, but looks like it
|
||||
might be a programming error. eg. attempting to remove 'nil' from an
|
||||
NSArray, which the Spec/documentation does not prohibit, but which a
|
||||
well written program should not be attempting (since an NSArray object
|
||||
cannot contain a 'nil').
|
||||
</p>
|
||||
<p>NB. The 'warn=yes' option is understood by the GNUstep make package
|
||||
to mean that GSWARN should be defined, and the 'warn=no' means that
|
||||
GSWARN should be undefined. Default is to define it.
|
||||
</p>
|
||||
<p>To embed debug logging in your code you use the NSWarnLog() macro.
|
||||
</p>
|
||||
<p>As a convenience, there are two more logging macros you can use -
|
||||
NSWarnFLog(), and NSWarnMLog().
|
||||
These are specifically for use in either functions or methods and
|
||||
prepend information about the file, line and either function or
|
||||
class/method in which the message was generated.
|
||||
</p>
|
||||
*/
|
||||
|
||||
#define NSWarnLog(format, args...) \
|
||||
do { if (GSDebugSet(@"NoWarn") == NO) { \
|
||||
NSLog(format , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro is like NSWarnLog() but includes the name and location of the
|
||||
* <em>function</em> in which the macro is used as part of the log output.
|
||||
*/
|
||||
#define NSWarnFLog(format, args...) \
|
||||
do { if (GSDebugSet(@"NoWarn") == NO) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
|
||||
/**
|
||||
* This macro is like NSWarnLog() but includes the name and location of the
|
||||
* <em>method</em> in which the macro is used as part of the log output.
|
||||
*/
|
||||
#define NSWarnMLog(format, args...) \
|
||||
do { if (GSDebugSet(@"NoWarn") == NO) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt , ## args); }} while (0)
|
||||
#else
|
||||
#define NSWarnLog(format, args...)
|
||||
#define NSWarnFLog(format, args...)
|
||||
#define NSWarnMLog(format, args...)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT void *NSReturnAddress(NSUInteger offset);
|
||||
GS_EXPORT void *NSFrameAddress(int offset);
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT NSUInteger NSCountFrames(void);
|
||||
GS_EXPORT void *NSReturnAddress(int offset);
|
||||
|
||||
/**
|
||||
* Retrieve stack information. Use caution: uses built-in gcc functions
|
||||
* and currently only works up to 100 frames.
|
||||
*/
|
||||
GS_EXPORT unsigned NSCountFrames(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -27,7 +27,7 @@
|
|||
#define __NSDecimal_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#include <GNUstepBase/GSConfig.h>
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
@ -50,13 +50,12 @@ extern "C" {
|
|||
* .5 rounds to make last remaining digit even). See the
|
||||
* [(NSDecimalNumberBehaviors)] protocol.
|
||||
*/
|
||||
enum {
|
||||
typedef enum {
|
||||
NSRoundPlain, /* Round .5 up */
|
||||
NSRoundDown,
|
||||
NSRoundUp,
|
||||
NSRoundBankers /* Make last digit even */
|
||||
};
|
||||
typedef NSUInteger NSRoundingMode;
|
||||
} NSRoundingMode;
|
||||
|
||||
/**
|
||||
* Enumerated type for specifying a decimal calculation error. Can be one of
|
||||
|
@ -74,14 +73,13 @@ typedef NSUInteger NSRoundingMode;
|
|||
* <desc>The caller tried to divide by 0.</desc>
|
||||
* </deflist>
|
||||
*/
|
||||
enum {
|
||||
typedef enum {
|
||||
NSCalculationNoError = 0,
|
||||
NSCalculationLossOfPrecision,
|
||||
NSCalculationUnderflow, /* result became zero */
|
||||
NSCalculationOverflow,
|
||||
NSCalculationDivideByZero
|
||||
};
|
||||
typedef NSUInteger NSCalculationError;
|
||||
} NSCalculationError;
|
||||
|
||||
/**
|
||||
* Give a precision of at least 38 decimal digits
|
||||
|
@ -151,8 +149,7 @@ NSDecimalCompare(const NSDecimal *leftOperand, const NSDecimal *rightOperand);
|
|||
* but can be the same as number.
|
||||
*/
|
||||
GS_EXPORT void
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, NSInteger scale,
|
||||
NSRoundingMode mode);
|
||||
NSDecimalRound(NSDecimal *result, const NSDecimal *number, int scale, NSRoundingMode mode);
|
||||
|
||||
/**
|
||||
* Sets the exponents of n1 and n2 equal to one another, adjusting mantissas
|
||||
|
@ -204,8 +201,7 @@ NSDecimalDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *rr, NSRo
|
|||
* n or power.
|
||||
*/
|
||||
GS_EXPORT NSCalculationError
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, NSUInteger power,
|
||||
NSRoundingMode mode);
|
||||
NSDecimalPower(NSDecimal *result, const NSDecimal *n, unsigned power, NSRoundingMode mode);
|
||||
|
||||
/**
|
||||
* Multiplies n by 10^power and returns result to 38-digit precision. See the
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -121,17 +121,12 @@ extern "C" {
|
|||
*/
|
||||
@interface NSDecimalNumberHandler : NSObject <NSDecimalNumberBehaviors>
|
||||
{
|
||||
#if GS_EXPOSE(NSDecimalNumberHandler)
|
||||
NSRoundingMode _roundingMode;
|
||||
short _scale;
|
||||
BOOL _raiseOnExactness;
|
||||
BOOL _raiseOnOverflow;
|
||||
BOOL _raiseOnUnderflow;
|
||||
BOOL _raiseOnDivideByZero;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,9 +178,7 @@ extern "C" {
|
|||
*/
|
||||
@interface NSDecimalNumber : NSNumber <NSDecimalNumberBehaviors>
|
||||
{
|
||||
#if GS_EXPOSE(NSDecimalNumber)
|
||||
NSDecimal data;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -369,35 +362,33 @@ extern "C" {
|
|||
* behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Raises self to given positive integer power and returns new result, using
|
||||
* +defaultBehavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power;
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(unsigned)power;
|
||||
|
||||
/**
|
||||
* Raises self to given positive integer power and returns new result, using
|
||||
* given behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(unsigned)power
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Subtracts decimalNumber from self and returns new result, using
|
||||
* +defaultBehavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:
|
||||
(NSDecimalNumber *)decimalNumber;
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber;
|
||||
|
||||
/**
|
||||
* Subtracts decimalNumber from self and returns new result, using given
|
||||
* behavior for rounding/precision/error handling.
|
||||
*/
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:
|
||||
(NSDecimalNumber *)decimalNumber
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber
|
||||
withBehavior:(id <NSDecimalNumberBehaviors>)behavior;
|
||||
|
||||
/**
|
||||
* Returns rounded version of underlying decimal.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -27,15 +27,14 @@
|
|||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSArray, NSString, NSURL;
|
||||
@class NSArray, NSString, NSEnumerator, NSURL;
|
||||
|
||||
@interface NSDictionary : NSObject <NSCoding, NSCopying, NSMutableCopying, NSFastEnumeration>
|
||||
@interface NSDictionary : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||
+ (id) dictionary;
|
||||
+ (id) dictionaryWithContentsOfFile: (NSString*)path;
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -46,18 +45,18 @@ extern "C" {
|
|||
+ (id) dictionaryWithObjects: (NSArray*)objects forKeys: (NSArray*)keys;
|
||||
+ (id) dictionaryWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (NSUInteger)count;
|
||||
count: (unsigned)count;
|
||||
+ (id) dictionaryWithObjectsAndKeys: (id)firstObject, ...;
|
||||
|
||||
- (NSArray*) allKeys;
|
||||
- (NSArray*) allKeysForObject: (id)anObject;
|
||||
- (NSArray*) allValues;
|
||||
- (NSUInteger) count; // Primitive
|
||||
- (unsigned) count; // Primitive
|
||||
- (NSString*) description;
|
||||
- (NSString*) descriptionInStringsFileFormat;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
indent: (NSUInteger)level;
|
||||
- (NSString*) descriptionWithLocale: (id)locale;
|
||||
- (NSString*) descriptionWithLocale: (id)locale
|
||||
indent: (unsigned int)level;
|
||||
|
||||
- (id) init;
|
||||
- (id) initWithContentsOfFile: (NSString*)path;
|
||||
|
@ -70,7 +69,7 @@ extern "C" {
|
|||
- (id) initWithObjectsAndKeys: (id)firstObject, ...;
|
||||
- (id) initWithObjects: (id*)objects
|
||||
forKeys: (id*)keys
|
||||
count: (NSUInteger)count; // Primitive
|
||||
count: (unsigned)count; // Primitive
|
||||
- (BOOL) isEqualToDictionary: (NSDictionary*)other;
|
||||
|
||||
- (NSEnumerator*) keyEnumerator; // Primitive
|
||||
|
@ -88,10 +87,10 @@ extern "C" {
|
|||
|
||||
@interface NSMutableDictionary: NSDictionary
|
||||
|
||||
+ (id) dictionaryWithCapacity: (NSUInteger)numItems;
|
||||
+ (id) dictionaryWithCapacity: (unsigned)numItems;
|
||||
|
||||
- (void) addEntriesFromDictionary: (NSDictionary*)otherDictionary;
|
||||
- (id) initWithCapacity: (NSUInteger)numItems; // Primitive
|
||||
- (id) initWithCapacity: (unsigned)numItems; // Primitive
|
||||
- (void) removeAllObjects;
|
||||
- (void) removeObjectForKey: (id)aKey; // Primitive
|
||||
- (void) removeObjectsForKeys: (NSArray*)keyArray;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -37,15 +37,12 @@ extern "C" {
|
|||
|
||||
@interface NSDistantObject : NSProxy <NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSDistantObject)
|
||||
@public
|
||||
@private
|
||||
NSConnection *_connection;
|
||||
id _object;
|
||||
unsigned _handle;
|
||||
Protocol *_protocol;
|
||||
unsigned _counter;
|
||||
void *_sigs;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSDistantObject*) proxyWithLocal: (id)anObject
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -36,13 +36,8 @@ extern "C" {
|
|||
|
||||
@interface NSDistributedLock : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSDistributedLock)
|
||||
NSString *_lockPath;
|
||||
NSDate *_lockTime;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSDistributedLock*) lockWithPath: (NSString*)aPath;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -50,13 +50,12 @@ extern "C" {
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
enum {
|
||||
typedef enum {
|
||||
NSNotificationSuspensionBehaviorDrop = 1,
|
||||
NSNotificationSuspensionBehaviorCoalesce = 2,
|
||||
NSNotificationSuspensionBehaviorHold = 3,
|
||||
NSNotificationSuspensionBehaviorDeliverImmediately = 4
|
||||
};
|
||||
typedef NSUInteger NSNotificationSuspensionBehavior;
|
||||
} NSNotificationSuspensionBehavior;
|
||||
|
||||
/**
|
||||
* Type for [NSDistributedNotificationCenter+notificationCenterForType:] -
|
||||
|
@ -80,15 +79,10 @@ GS_EXPORT NSString* const GSNetworkNotificationCenterType;
|
|||
|
||||
@interface NSDistributedNotificationCenter : NSNotificationCenter
|
||||
{
|
||||
#if GS_EXPOSE(NSDistributedNotificationCenter)
|
||||
NSRecursiveLock *_centerLock; /* For thread safety. */
|
||||
NSString *_type; /* Type of notification center. */
|
||||
id _remote; /* Proxy for center. */
|
||||
BOOL _suspended; /* Is delivery suspended? */
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
+ (NSNotificationCenter*) defaultCenter;
|
||||
+ (NSNotificationCenter*) notificationCenterForType: (NSString*)type;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -34,21 +34,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long state;
|
||||
id *itemsPtr;
|
||||
unsigned long *mutationsPtr;
|
||||
unsigned long extra[5];
|
||||
} NSFastEnumerationState;
|
||||
|
||||
@protocol NSFastEnumeration
|
||||
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState *)state
|
||||
objects: (id *)stackbuf
|
||||
count: (NSUInteger)len;
|
||||
@end
|
||||
|
||||
@interface NSEnumerator : NSObject <NSFastEnumeration>
|
||||
@interface NSEnumerator : NSObject
|
||||
- (NSArray *) allObjects;
|
||||
- (id) nextObject;
|
||||
@end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -115,15 +115,10 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
*/
|
||||
@interface NSError : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSError)
|
||||
@private
|
||||
int _code;
|
||||
NSString *_domain;
|
||||
NSDictionary *_userInfo;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,14 +126,14 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
* -initWithDomain:code:userInfo:
|
||||
*/
|
||||
+ (id) errorWithDomain: (NSString*)aDomain
|
||||
code: (NSInteger)aCode
|
||||
code: (int)aCode
|
||||
userInfo: (NSDictionary*)aDictionary;
|
||||
|
||||
/**
|
||||
* Return the error code ... which is not globally unique, just unique for
|
||||
* a particular domain.
|
||||
*/
|
||||
- (NSInteger) code;
|
||||
- (int) code;
|
||||
|
||||
/**
|
||||
* Return the domain for this instance.
|
||||
|
@ -150,7 +145,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
|
|||
* The domain must be non-nil.
|
||||
*/
|
||||
- (id) initWithDomain: (NSString*)aDomain
|
||||
code: (NSInteger)aCode
|
||||
code: (int)aCode
|
||||
userInfo: (NSDictionary*)aDictionary;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
/** Interface for NSErrorRecoveryAttempting for GNUStep
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Fred Kiefer <fredkiefer@gmx.de>
|
||||
Date: July 2007
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* These methods define the informal error recovery protocol
|
||||
*/
|
||||
@interface NSObject (NSErrorRecoveryAttempting)
|
||||
|
||||
- (BOOL) attemptRecoveryFromError: (NSError*)error
|
||||
optionIndex: (unsigned int)recoveryOptionIndex;
|
||||
- (void) attemptRecoveryFromError: (NSError*)error
|
||||
optionIndex: (unsigned int)recoveryOptionIndex
|
||||
delegate: (id)delegate
|
||||
didRecoverSelector: (SEL)didRecoverSelector
|
||||
contextInfo: (void*)contextInfo;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE*/
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -31,16 +31,6 @@
|
|||
#ifndef __NSException_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSException_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
|
||||
#if defined(_NATIVE_OBJC_EXCEPTIONS)
|
||||
#define USER_NATIVE_OBJC_EXCEPTIONS 1
|
||||
#else
|
||||
#define USER_NATIVE_OBJC_EXCEPTIONS 0
|
||||
#endif
|
||||
#if BASE_NATIVE_OBJC_EXCEPTIONS != USER_NATIVE_OBJC_EXCEPTIONS
|
||||
#error The current setting for native-objc-exceptions does not match that of gnustep-base ... please correct this.
|
||||
#endif
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -93,12 +83,9 @@ extern "C" {
|
|||
*/
|
||||
@interface NSException : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSException)
|
||||
@private
|
||||
NSString *_e_name;
|
||||
NSString *_e_reason;
|
||||
void *_reserved;
|
||||
#endif
|
||||
NSDictionary *_e_info;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,24 +116,6 @@ extern "C" {
|
|||
format: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST) && GS_API_VERSION( 11501,GS_API_LATEST)
|
||||
/** Returns an array of the call stack return addresses at the point when
|
||||
* the exception was raised. Re-raising the exception does not change
|
||||
* this value.
|
||||
*/
|
||||
- (NSArray*) callStackReturnAddresses;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100600,GS_API_LATEST) && GS_API_VERSION( 11903,GS_API_LATEST)
|
||||
/**
|
||||
* Returns an array of the symbolic names of the call stack return addresses.
|
||||
* Note that, on some platforms, symbols are only exported in
|
||||
* position-independent code and so these may only return numeric addresses for
|
||||
* code in static libraries or the main application.
|
||||
*/
|
||||
- (NSArray*) callStackSymbols;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* <init/>Initializes a newly allocated NSException object with a
|
||||
* name, reason and a dictionary userInfo.
|
||||
|
@ -178,84 +147,61 @@ extern "C" {
|
|||
- (NSString*) reason;
|
||||
|
||||
/** Returns the exception userInfo dictionary.<br />
|
||||
* There is a GNUstep extension, enabled when the GNUSTEP_STACK_TRACE
|
||||
* environment variable is set to YES, which causes a stack trace to
|
||||
* be placed in this dictionary (keyed on GSStackTraceKey) at the point
|
||||
* when the exception is raised. This can be useful for determining
|
||||
* where an exception ocurred.
|
||||
*/
|
||||
- (NSDictionary*) userInfo;
|
||||
|
||||
@end
|
||||
|
||||
/** An exception when character set conversion fails.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSCharacterConversionException;
|
||||
|
||||
/** Attempt to use an invalidated destination.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSDestinationInvalidException;
|
||||
|
||||
/** A generic exception for general purpose usage.
|
||||
/**
|
||||
* A generic exception for general purpose usage.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSGenericException;
|
||||
|
||||
/** An exception for cases where unexpected state is detected within an object.
|
||||
/**
|
||||
* An exception for cases where unexpected state is detected within an object.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSInternalInconsistencyException;
|
||||
|
||||
/** An exception used when an invalid argument is passed to a method
|
||||
/**
|
||||
* An exception used when an invalid argument is passed to a method
|
||||
* or function.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSInvalidArgumentException;
|
||||
|
||||
/** Attempt to use a receive port which has been invalidated.
|
||||
*/
|
||||
GS_EXPORT NSString * const NSInvalidReceivePortException;
|
||||
|
||||
/** Attempt to use a send port which has been invalidated.
|
||||
*/
|
||||
GS_EXPORT NSString * const NSInvalidSendPortException;
|
||||
|
||||
/** An exception used when the system fails to allocate required memory.
|
||||
/**
|
||||
* An exception used when the system fails to allocate required memory.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSMallocException;
|
||||
|
||||
/** An exception when a remote object is sent a message from a thread
|
||||
/**
|
||||
* An exception used when an illegal range is encountered ... usually this
|
||||
* is used to provide more information than an invalid argument exception.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSRangeException;
|
||||
|
||||
/**
|
||||
* An exception when character set conversion fails.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSCharacterConversionException;
|
||||
|
||||
/**
|
||||
* An exception when a remote object is sent a message from a thread
|
||||
* unable to access the object.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSObjectInaccessibleException;
|
||||
|
||||
/** Attempt to send to an object which is no longer available.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSObjectNotAvailableException;
|
||||
|
||||
/** UNused ... for MacOS-X compatibility.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSOldStyleException;
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
/** An exception used when some form of parsing fails.
|
||||
/**
|
||||
* An exception used when some form of parsing fails.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSParseErrorException;
|
||||
#endif
|
||||
|
||||
/** Some failure to receive on a port.
|
||||
*/
|
||||
GS_EXPORT NSString * const NSPortReceiveException;
|
||||
|
||||
/** Some failure to send on a port.
|
||||
*/
|
||||
GS_EXPORT NSString * const NSPortSendException;
|
||||
|
||||
/**
|
||||
* Exception raised by [NSPort], [NSConnection], and friends if sufficient
|
||||
* time elapses while waiting for a response, or if the receiving port is
|
||||
* invalidated before a request can be received. See
|
||||
* [NSConnection-setReplyTimeout:].
|
||||
*/
|
||||
GS_EXPORT NSString * const NSPortTimeoutException; /* OPENSTEP */
|
||||
|
||||
/** An exception used when an illegal range is encountered ... usually this
|
||||
* is used to provide more information than an invalid argument exception.
|
||||
*/
|
||||
GS_EXPORT NSString* const NSRangeException;
|
||||
|
||||
/**
|
||||
* The actual structure for an NSHandler. You shouldn't need to worry about it.
|
||||
*/
|
||||
|
@ -273,6 +219,12 @@ typedef struct _NSHandler
|
|||
*/
|
||||
typedef void NSUncaughtExceptionHandler(NSException *exception);
|
||||
|
||||
/**
|
||||
* Variable used to hold the current uncaught exception handler. Use the
|
||||
* function NSSetUncaughtExceptionHandler() to set this.
|
||||
*/
|
||||
GS_EXPORT NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
||||
|
||||
/**
|
||||
* Returns the exception handler called when an exception is generated and
|
||||
* not caught by the programmer (by enclosing in <code>NS_DURING</code> and
|
||||
|
@ -280,8 +232,7 @@ typedef void NSUncaughtExceptionHandler(NSException *exception);
|
|||
* an error message and exits the program. You can change this behavior by
|
||||
* calling NSSetUncaughtExceptionHandler().
|
||||
*/
|
||||
GS_EXPORT NSUncaughtExceptionHandler *
|
||||
NSGetUncaughtExceptionHandler();
|
||||
#define NSGetUncaughtExceptionHandler() _NSUncaughtExceptionHandler
|
||||
|
||||
/**
|
||||
* <p>Sets the exception handler called when an exception is generated and
|
||||
|
@ -292,23 +243,20 @@ NSGetUncaughtExceptionHandler();
|
|||
* </p>
|
||||
* <p>NB. If the exception handler set by this function does not terminate
|
||||
* the process, the process will be terminateed anyway. This is a safety
|
||||
* precaution to ensure that, in the event of an exception being raised
|
||||
* precaution to ensure that, in the event of an exception ebing raised
|
||||
* and not handled, the program does not try to continue running in a
|
||||
* confused state (possibly doing horrible things like billing customers
|
||||
* who shouldn't be billed etc), but shuts down as cleanly as possible.
|
||||
* </p>
|
||||
* <p>Process termination is normally accomplished by calling the standard
|
||||
* exit function of the C runtime library, but if the environment variable
|
||||
* exit function of theC runtime library, but if the environment variable
|
||||
* CRASH_ON_ABORT is set to YES or TRUE or 1 the termination will be
|
||||
* accomplished by calling the abort function instead, which should cause
|
||||
* a core dump to be made for debugging.
|
||||
* </p>
|
||||
* <p>The value of proc should be a pointer to a function taking an
|
||||
* [NSException] instance as an argument.
|
||||
* </p>
|
||||
*/
|
||||
GS_EXPORT void
|
||||
NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler);
|
||||
#define NSSetUncaughtExceptionHandler(proc) \
|
||||
(_NSUncaughtExceptionHandler = (proc))
|
||||
|
||||
/* NS_DURING, NS_HANDLER and NS_ENDHANDLER are always used like:
|
||||
|
||||
|
@ -328,7 +276,7 @@ NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler);
|
|||
It is illegal to exit the first block of code by any other means than
|
||||
NS_VALRETURN, NS_VOIDRETURN, or just falling out the bottom.
|
||||
*/
|
||||
#if defined(_NATIVE_OBJC_EXCEPTIONS)
|
||||
#ifdef _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
# define NS_DURING @try {
|
||||
# define NS_HANDLER } @catch (NSException * localException) {
|
||||
|
@ -356,7 +304,7 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
|||
|
||||
#define NS_ENDHANDLER }}}
|
||||
|
||||
#define NS_VALRETURN(val) do { __typeof__(val) temp = (val); \
|
||||
#define NS_VALRETURN(val) do { typeof(val) temp = (val); \
|
||||
_NSRemoveHandler(&NSLocalHandler); \
|
||||
return(temp); } while (0)
|
||||
|
||||
|
@ -379,16 +327,17 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
|||
|
||||
- (void) handleFailureInFunction: (NSString*)functionName
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (NSInteger)line
|
||||
description: (NSString*)format,...;
|
||||
lineNumber: (int)line
|
||||
description: (NSString*)format,... GS_NORETURN_METHOD;
|
||||
|
||||
- (void) handleFailureInMethod: (SEL)aSelector
|
||||
object: object
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (NSInteger)line
|
||||
description: (NSString*)format,...;
|
||||
lineNumber: (int)line
|
||||
description: (NSString*)format,... GS_NORETURN_METHOD;
|
||||
|
||||
@end
|
||||
extern NSString *const NSAssertionHandlerKey;
|
||||
|
||||
#ifdef NS_BLOCK_ASSERTIONS
|
||||
#define _NSAssertArgs(condition, desc, args...)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -28,32 +28,24 @@
|
|||
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSPredicate.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSArray;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
|
||||
enum
|
||||
typedef enum _NSExpressionType
|
||||
{
|
||||
NSConstantValueExpressionType=0,
|
||||
NSEvaluatedObjectExpressionType,
|
||||
NSVariableExpressionType,
|
||||
NSKeyPathExpressionType,
|
||||
NSFunctionExpressionType
|
||||
};
|
||||
typedef NSUInteger NSExpressionType;
|
||||
} NSExpressionType;
|
||||
|
||||
@interface NSExpression : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSExpression)
|
||||
NSExpressionType _type;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSExpression *) expressionForConstantValue: (id)obj;
|
||||
+ (NSExpression *) expressionForEvaluatedObject;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -157,14 +157,8 @@ GS_EXPORT NSString * const NSFileHandleOperationException;
|
|||
|
||||
@interface NSPipe : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSPipe)
|
||||
@private
|
||||
NSFileHandle *_readHandle;
|
||||
NSFileHandle *_writeHandle;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
NSFileHandle* readHandle;
|
||||
NSFileHandle* writeHandle;
|
||||
}
|
||||
+ (id) pipe;
|
||||
- (NSFileHandle*) fileHandleForReading;
|
||||
|
@ -178,19 +172,19 @@ GS_EXPORT NSString * const NSFileHandleOperationException;
|
|||
// GNUstep class extensions
|
||||
|
||||
@interface NSFileHandle (GNUstepExtensions)
|
||||
+ (id) fileHandleAsServerAtAddress: (NSString*)a
|
||||
service: (NSString*)s
|
||||
protocol: (NSString*)p;
|
||||
+ (id) fileHandleAsClientAtAddress: (NSString*)a
|
||||
service: (NSString*)s
|
||||
protocol: (NSString*)p;
|
||||
+ (id) fileHandleAsClientInBackgroundAtAddress: (NSString*)a
|
||||
service: (NSString*)s
|
||||
protocol: (NSString*)p;
|
||||
+ (id) fileHandleAsClientInBackgroundAtAddress: (NSString*)a
|
||||
service: (NSString*)s
|
||||
protocol: (NSString*)p
|
||||
forModes: (NSArray*)m;
|
||||
+ (id) fileHandleAsServerAtAddress: (NSString*)address
|
||||
service: (NSString*)service
|
||||
protocol: (NSString*)protocol;
|
||||
+ (id) fileHandleAsClientAtAddress: (NSString*)address
|
||||
service: (NSString*)service
|
||||
protocol: (NSString*)protocol;
|
||||
+ (id) fileHandleAsClientInBackgroundAtAddress: (NSString*)address
|
||||
service: (NSString*)service
|
||||
protocol: (NSString*)protocol;
|
||||
+ (id) fileHandleAsClientInBackgroundAtAddress: (NSString*)address
|
||||
service: (NSString*)service
|
||||
protocol: (NSString*)protocol
|
||||
forModes: (NSArray*)modes;
|
||||
- (void) readDataInBackgroundAndNotifyLength: (unsigned)len;
|
||||
- (void) readDataInBackgroundAndNotifyLength: (unsigned)len
|
||||
forModes: (NSArray*)modes;
|
||||
|
@ -208,22 +202,16 @@ GS_EXPORT NSString * const NSFileHandleOperationException;
|
|||
|
||||
/**
|
||||
* Where OpenSSL is available, you can use the subclass returned by +sslClass
|
||||
* to handle SSL connections.<br />
|
||||
* The -sslAccept method is used to do SSL handshake and start an
|
||||
* encrypted session on a channel where the connection was initiated
|
||||
* from the far end.<br />
|
||||
* The -sslConnect method is used to do SSL handshake and start an
|
||||
* encrypted session on a channel where the connection was initiated
|
||||
* from the near end.<br />
|
||||
* The -sslDisconnect method is used to end the encrypted session.
|
||||
* The -sslSetCertificate:privateKey:PEMpasswd: method is used to
|
||||
* establish a client certificate before starting an encrypted session.<br />
|
||||
* NB. Some of these methods may block while performing I/O on the network
|
||||
* connection, (though they should run the current runloop while doing so)
|
||||
* so you should structure your code to handle that. In particular, if you
|
||||
* are writing a server application, you should initiate a background accept
|
||||
* to allow another incoming connection <em>before</em> you perform an
|
||||
* -sslAccept on a connection you have just accepted.
|
||||
* to handle SSL connections.
|
||||
* The -sslAccept method is used to do SSL handshake and start an
|
||||
* encrypted session on a channel where the connection was initiated
|
||||
* from the far end.
|
||||
* The -sslConnect method is used to do SSL handshake and start an
|
||||
* encrypted session on a channel where the connection was initiated
|
||||
* from the near end..
|
||||
* The -sslDisconnect method is used to end the encrypted session.
|
||||
* The -sslSetCertificate:privateKey:PEMpasswd: method is used to
|
||||
* establish a client certificate before starting an encrypted session.
|
||||
*/
|
||||
@interface NSFileHandle (GNUstepOpenSSL)
|
||||
+ (Class) sslClass;
|
||||
|
@ -260,8 +248,4 @@ GS_EXPORT NSString * const GSFileHandleNotificationError;
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSFileHandle+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSFileHandle_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -173,8 +173,8 @@
|
|||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
#import <Foundation/NSUtilities.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -186,26 +186,12 @@ extern "C" {
|
|||
@class NSDate;
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
@class NSEnumerator;
|
||||
@class NSDirectoryEnumerator;
|
||||
@class NSError;
|
||||
|
||||
/* MacOS-X defines OSType as a 32bit unsigned integer.
|
||||
*/
|
||||
#ifndef OSTYPE_DECLARED
|
||||
typedef uint32_t OSType;
|
||||
#define OSTYPE_DECLARED
|
||||
#endif
|
||||
@class NSDirectoryEnumerator;
|
||||
|
||||
@interface NSFileManager : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSFileManager)
|
||||
@private
|
||||
NSString *_lastError;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSFileManager*) defaultManager;
|
||||
|
@ -220,10 +206,6 @@ typedef uint32_t OSType;
|
|||
- (BOOL) copyPath: (NSString*)source
|
||||
toPath: (NSString*)destination
|
||||
handler: (id)handler;
|
||||
- (BOOL) createDirectoryAtPath: (NSString *)path
|
||||
withIntermediateDirectories: (BOOL)flag
|
||||
attributes: (NSDictionary *)attributes
|
||||
error: (NSError **) error;
|
||||
- (BOOL) createDirectoryAtPath: (NSString*)path
|
||||
attributes: (NSDictionary*)attributes;
|
||||
- (BOOL) createFileAtPath: (NSString*)path
|
||||
|
@ -234,17 +216,6 @@ typedef uint32_t OSType;
|
|||
- (NSString*) currentDirectoryPath;
|
||||
- (NSArray*) directoryContentsAtPath: (NSString*)path;
|
||||
- (NSString*) displayNameAtPath: (NSString*)path;
|
||||
/**
|
||||
* <p>Returns an enumerator which can be used to return each item with
|
||||
* the directory at path in turn.
|
||||
* </p>
|
||||
* <p>The enumeration is recursive ... following all nested subdirectories.
|
||||
* </p>
|
||||
* <p>The order in which directory contents are enumerated is undefined,
|
||||
* and in the current implementation the natural order of the underlying
|
||||
* filesystem is used.
|
||||
* </p>
|
||||
*/
|
||||
- (NSDirectoryEnumerator*) enumeratorAtPath: (NSString*)path;
|
||||
- (NSDictionary*) fileAttributesAtPath: (NSString*)path
|
||||
traverseLink: (BOOL)flag;
|
||||
|
@ -292,7 +263,7 @@ typedef uint32_t OSType;
|
|||
* with unicode strings.
|
||||
*/
|
||||
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
|
||||
length: (NSUInteger)len;
|
||||
length: (unsigned int)len;
|
||||
|
||||
- (NSArray*) subpathsAtPath: (NSString*)path;
|
||||
|
||||
|
@ -355,22 +326,8 @@ typedef uint32_t OSType;
|
|||
@end
|
||||
|
||||
|
||||
/**
|
||||
* <p>This is a subclass of <code>NSEnumerator</code> which provides a full
|
||||
* listing of all the files beneath a directory and its subdirectories.
|
||||
* Instances can be obtained through [NSFileManager-enumeratorAtPath:].
|
||||
* </p>
|
||||
*
|
||||
* <p>This implementation is optimized and performance should be comparable
|
||||
* to the speed of standard Unix tools for large directories.</p>
|
||||
*
|
||||
* <p>The order in which directory contents are enumerated is undefined,
|
||||
* and in the current implementation the natural order of the underlying
|
||||
* filesystem is used.</p>
|
||||
*/
|
||||
@interface NSDirectoryEnumerator : NSEnumerator
|
||||
{
|
||||
#if GS_EXPOSE(NSDirectoryEnumerator)
|
||||
@private
|
||||
void *_stack; /* GSIArray */
|
||||
NSString *_topPath;
|
||||
|
@ -382,10 +339,6 @@ typedef uint32_t OSType;
|
|||
BOOL isFollowing: 1;
|
||||
BOOL justContents: 1;
|
||||
} _flags;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
- (NSDictionary*) directoryAttributes;
|
||||
- (NSDictionary*) fileAttributes;
|
||||
|
@ -496,20 +449,20 @@ GS_EXPORT NSString* const NSFileSystemFreeNodes;
|
|||
@interface NSDictionary(NSFileAttributes)
|
||||
- (NSDate*) fileCreationDate;
|
||||
- (BOOL) fileExtensionHidden;
|
||||
- (OSType) fileHFSCreatorCode;
|
||||
- (OSType) fileHFSTypeCode;
|
||||
- (int) fileHFSCreatorCode;
|
||||
- (int) fileHFSTypeCode;
|
||||
- (BOOL) fileIsAppendOnly;
|
||||
- (BOOL) fileIsImmutable;
|
||||
- (unsigned long long) fileSize;
|
||||
- (NSString*) fileType;
|
||||
- (NSNumber*) fileOwnerAccountID;
|
||||
- (unsigned long) fileOwnerAccountID;
|
||||
- (NSString*) fileOwnerAccountName;
|
||||
- (NSNumber*) fileGroupOwnerAccountID;
|
||||
- (unsigned long) fileGroupOwnerAccountID;
|
||||
- (NSString*) fileGroupOwnerAccountName;
|
||||
- (NSDate*) fileModificationDate;
|
||||
- (NSUInteger) filePosixPermissions;
|
||||
- (NSUInteger) fileSystemNumber;
|
||||
- (NSUInteger) fileSystemFileNumber;
|
||||
- (unsigned long) filePosixPermissions;
|
||||
- (unsigned long) fileSystemNumber;
|
||||
- (unsigned long) fileSystemFileNumber;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -46,7 +46,8 @@ extern "C" {
|
|||
* applications.
|
||||
*/
|
||||
@interface NSFormatter : NSObject <NSCopying, NSCoding>
|
||||
|
||||
{
|
||||
}
|
||||
/**
|
||||
* This method calls [-stringForObjectValue:] then marks up the string with
|
||||
* attributes if it should be displayed specially. For example, in an
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
/** Interface for NSGarbageCollector for GNUStep
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Created: Jan 2009
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
AutogsdocSource: NSGarbageCollector.m
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _NSGarbageCollector_h_GNUSTEP_BASE_INCLUDE
|
||||
#define _NSGarbageCollector_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
@interface NSGarbageCollector : NSObject
|
||||
|
||||
/** Returns the garbage collector instance ... there is only one.<br />
|
||||
* Returns nil if the process is not using garbage collection.
|
||||
*/
|
||||
+ (id) defaultCollector;
|
||||
|
||||
/** Collects some memory.
|
||||
*/
|
||||
- (void) collectIfNeeded;
|
||||
|
||||
/** Collects all collectable memory.
|
||||
*/
|
||||
- (void) collectExhaustively;
|
||||
|
||||
/** Disables garbage collection until a corresponding call to -enable is made.
|
||||
* NB. Calls to this method stack, and must be matched by the same number of
|
||||
* calls to the -enable method.
|
||||
*/
|
||||
- (void) disable;
|
||||
|
||||
/** Makes the area of memory pointed at be uncollectable ... that is to say,
|
||||
* the memory will not be collected by the garbage collector. You must not
|
||||
* explicitly free this memory unless you re-enable collection first.<br />
|
||||
* Calls to this method do not stack, so callig it multiple times for the
|
||||
* same pointer has the same effect as calling it once.
|
||||
*/
|
||||
- (void) disableCollectorForPointer: (void *)ptr;
|
||||
|
||||
/** Enables garbage collection prevously disabled by a call to the
|
||||
* -disable method. Since calls to -disable stack, you must make as
|
||||
* many calls to -enable as to -disable in order to re-start collection.
|
||||
*/
|
||||
- (void) enable;
|
||||
|
||||
/** Enables collection for the area of memory pointed at, which must have
|
||||
* previously been made uncollectable by a call to the
|
||||
* -disableCollectorForPointer: method.
|
||||
*/
|
||||
- (void) enableCollectorForPointer: (void *)ptr;
|
||||
|
||||
/** Returns yes if there is a garbage collection progress.
|
||||
*/
|
||||
- (BOOL) isCollecting;
|
||||
|
||||
/** Retunrs YES if garbage collecting is currently enabled.
|
||||
*/
|
||||
- (BOOL) isEnabled;
|
||||
|
||||
/** Returns a zone for holding non-collectable pointers.<br />
|
||||
* Memory allocated in this zone will not be seen by the garbage collector
|
||||
* and will never be collected (so it needs to be freed explicitly).
|
||||
* The presence of pointers from the memory to other objects will not
|
||||
* prevent those other objects from being collected.
|
||||
*/
|
||||
- (NSZone*) zone;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -7,7 +7,7 @@
|
|||
* This file is part of the GNUstep Base Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02111 USA.
|
||||
|
@ -38,29 +38,29 @@ extern "C" {
|
|||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) \
|
||||
({__typeof__(a) _MAX_a = (a); __typeof__(b) _MAX_b = (b); \
|
||||
({typeof(a) _MAX_a = (a); typeof(b) _MAX_b = (b); \
|
||||
_MAX_a > _MAX_b ? _MAX_a : _MAX_b; })
|
||||
#define GS_DEFINED_MAX
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) \
|
||||
({__typeof__(a) _MIN_a = (a); __typeof__(b) _MIN_b = (b); \
|
||||
({typeof(a) _MIN_a = (a); typeof(b) _MIN_b = (b); \
|
||||
_MIN_a < _MIN_b ? _MIN_a : _MIN_b; })
|
||||
#define GS_DEFINED_MIN
|
||||
#endif
|
||||
|
||||
/**
|
||||
<example>{
|
||||
CGFloat x;
|
||||
CGFloat y;
|
||||
float x;
|
||||
float y;
|
||||
}</example>
|
||||
<p>Represents a 2-d cartesian position.</p> */
|
||||
typedef struct _NSPoint NSPoint;
|
||||
struct _NSPoint
|
||||
{
|
||||
CGFloat x;
|
||||
CGFloat y;
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -72,15 +72,15 @@ typedef NSPoint *NSPointPointer;
|
|||
|
||||
/**
|
||||
<example>{
|
||||
CGFloat width;
|
||||
CGFloat height;
|
||||
float width;
|
||||
float height;
|
||||
}</example>
|
||||
<p>Floating point rectangle size.</p> */
|
||||
typedef struct _NSSize NSSize;
|
||||
struct _NSSize
|
||||
{
|
||||
CGFloat width;
|
||||
CGFloat height;
|
||||
float width;
|
||||
float height;
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -111,13 +111,6 @@ typedef NSRect *NSRectArray;
|
|||
typedef NSRect *NSRectPointer;
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
NSMinXEdge = 0,
|
||||
NSMinYEdge = 1,
|
||||
NSMaxXEdge = 2,
|
||||
NSMaxYEdge = 3
|
||||
};
|
||||
/** Sides of a rectangle.
|
||||
<example>
|
||||
{
|
||||
|
@ -128,7 +121,13 @@ enum
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef NSUInteger NSRectEdge;
|
||||
typedef enum _NSRectEdge
|
||||
{
|
||||
NSMinXEdge = 0,
|
||||
NSMinYEdge = 1,
|
||||
NSMaxXEdge = 2,
|
||||
NSMaxYEdge = 3
|
||||
} NSRectEdge;
|
||||
|
||||
/** Point at 0,0 */
|
||||
static const NSPoint NSZeroPoint __attribute__((unused)) = {0.0,0.0};
|
||||
|
@ -157,11 +156,11 @@ static const NSSize NSZeroSize __attribute__((unused)) = {0.0,0.0};
|
|||
/** Create Basic Structures... **/
|
||||
|
||||
GS_GEOM_SCOPE NSPoint
|
||||
NSMakePoint(CGFloat x, CGFloat y) GS_GEOM_ATTR;
|
||||
NSMakePoint(float x, float y) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSPoint having x-coordinate X and y-coordinate Y. */
|
||||
GS_GEOM_SCOPE NSPoint
|
||||
NSMakePoint(CGFloat x, CGFloat y)
|
||||
NSMakePoint(float x, float y)
|
||||
{
|
||||
NSPoint point;
|
||||
|
||||
|
@ -171,11 +170,11 @@ NSMakePoint(CGFloat x, CGFloat y)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSSize
|
||||
NSMakeSize(CGFloat w, CGFloat h) GS_GEOM_ATTR;
|
||||
NSMakeSize(float w, float h) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSSize having width w and height h. */
|
||||
GS_GEOM_SCOPE NSSize
|
||||
NSMakeSize(CGFloat w, CGFloat h)
|
||||
NSMakeSize(float w, float h)
|
||||
{
|
||||
NSSize size;
|
||||
|
||||
|
@ -185,11 +184,11 @@ NSMakeSize(CGFloat w, CGFloat h)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h) GS_GEOM_ATTR;
|
||||
NSMakeRect(float x, float y, float w, float h) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns an NSRect having point of origin (x, y) and size {w, h}. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h)
|
||||
NSMakeRect(float x, float y, float w, float h)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
|
@ -202,81 +201,81 @@ NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h)
|
|||
|
||||
/** Get a Rectangle's Coordinates... **/
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMaxX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the greatest x-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMaxX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x + aRect.size.width;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMaxY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the greatest y-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMaxY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y + aRect.size.height;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMidX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the x-coordinate of aRect's middle point. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMidX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x + (aRect.size.width / 2.0);
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMidY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the y-coordinate of aRect's middle point. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMidY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y + (aRect.size.height / 2.0);
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMinX(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the least x-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMinX(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.x;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMinY(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the least y-coordinate value still inside aRect. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSMinY(NSRect aRect)
|
||||
{
|
||||
return aRect.origin.y;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSWidth(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns aRect's width. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSWidth(NSRect aRect)
|
||||
{
|
||||
return aRect.size.width;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSHeight(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns aRect's height. */
|
||||
GS_GEOM_SCOPE CGFloat
|
||||
GS_GEOM_SCOPE float
|
||||
NSHeight(NSRect aRect)
|
||||
{
|
||||
return aRect.size.height;
|
||||
|
@ -296,12 +295,12 @@ NSIsEmptyRect(NSRect aRect)
|
|||
/** Modify a Copy of a Rectangle... **/
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSOffsetRect(NSRect aRect, CGFloat dx, CGFloat dy) GS_GEOM_ATTR;
|
||||
NSOffsetRect(NSRect aRect, float dx, float dy) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the rectangle obtained by translating aRect
|
||||
* horizontally by dx and vertically by dy. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSOffsetRect(NSRect aRect, CGFloat dx, CGFloat dy)
|
||||
NSOffsetRect(NSRect aRect, float dx, float dy)
|
||||
{
|
||||
NSRect rect = aRect;
|
||||
|
||||
|
@ -311,16 +310,13 @@ NSOffsetRect(NSRect aRect, CGFloat dx, CGFloat dy)
|
|||
}
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSInsetRect(NSRect aRect, CGFloat dX, CGFloat dY) GS_GEOM_ATTR;
|
||||
NSInsetRect(NSRect aRect, float dX, float dY) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns the rectangle obtained by moving each of aRect's
|
||||
* horizontal sides inward by dy and each of aRect's vertical
|
||||
* sides inward by dx.<br />
|
||||
* NB. For MacOS-X compatability, this is permitted to return
|
||||
* a rectanglew with nagative width or height, strange as that seems.
|
||||
*/
|
||||
* sides inward by dx. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSInsetRect(NSRect aRect, CGFloat dX, CGFloat dY)
|
||||
NSInsetRect(NSRect aRect, float dX, float dY)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
|
@ -338,7 +334,7 @@ GS_EXPORT void
|
|||
NSDivideRect(NSRect aRect,
|
||||
NSRect *slice,
|
||||
NSRect *remainder,
|
||||
CGFloat amount,
|
||||
float amount,
|
||||
NSRectEdge edge);
|
||||
|
||||
/** Returns a rectangle obtained by expanding aRect minimally
|
||||
|
@ -424,18 +420,41 @@ NSIntersectionRect (NSRect aRect, NSRect bRect)
|
|||
|
||||
/** Test geometric relationships... **/
|
||||
|
||||
/** Returns 'YES' iff aRect's and bRect's origin and size are the same. */
|
||||
GS_EXPORT BOOL
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualRects(NSRect aRect, NSRect bRect) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns 'YES' iff aSize's and bSize's width and height are the same. */
|
||||
GS_EXPORT BOOL
|
||||
/** Returns 'YES' iff aRect's and bRect's origin and size are the same. */
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualRects(NSRect aRect, NSRect bRect)
|
||||
{
|
||||
return ((NSMinX(aRect) == NSMinX(bRect))
|
||||
&& (NSMinY(aRect) == NSMinY(bRect))
|
||||
&& (NSWidth(aRect) == NSWidth(bRect))
|
||||
&& (NSHeight(aRect) == NSHeight(bRect))) ? YES : NO;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualSizes(NSSize aSize, NSSize bSize) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns 'YES' iff aSize's and bSize's width and height are the same. */
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualSizes(NSSize aSize, NSSize bSize)
|
||||
{
|
||||
return ((aSize.width == bSize.width)
|
||||
&& (aSize.height == bSize.height)) ? YES : NO;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualPoints(NSPoint aPoint, NSPoint bPoint) GS_GEOM_ATTR;
|
||||
|
||||
/** Returns 'YES' iff aPoint's and bPoint's x- and y-coordinates
|
||||
* are the same. */
|
||||
GS_EXPORT BOOL
|
||||
NSEqualPoints(NSPoint aPoint, NSPoint bPoint) GS_GEOM_ATTR;
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSEqualPoints(NSPoint aPoint, NSPoint bPoint)
|
||||
{
|
||||
return ((aPoint.x == bPoint.x)
|
||||
&& (aPoint.y == bPoint.y)) ? YES : NO;
|
||||
}
|
||||
|
||||
GS_GEOM_SCOPE BOOL
|
||||
NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL flipped) GS_GEOM_ATTR;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define __NSHTTPCookie_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION(011300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
@ -43,8 +43,8 @@ extern "C" {
|
|||
extern NSString * const NSHTTPCookieComment; /** Obtain text of the comment */
|
||||
extern NSString * const NSHTTPCookieCommentURL; /** Obtain the comment URL */
|
||||
extern NSString * const NSHTTPCookieDiscard; /** Obtain the sessions discard setting */
|
||||
extern NSString * const NSHTTPCookieDomain; /** Obtain cookie domain */
|
||||
extern NSString * const NSHTTPCookieExpires; /** Obtain cookie expiry date */
|
||||
extern NSString * const NSHTTPCookieDomain; /** Obrain cookie domain */
|
||||
extern NSString * const NSHTTPCookieExpires; /** Obrain cookie expiry date */
|
||||
extern NSString * const NSHTTPCookieMaximumAge; /** Obtain maximum age (expiry) */
|
||||
extern NSString * const NSHTTPCookieName; /** Obtain name of cookie */
|
||||
extern NSString * const NSHTTPCookieOriginURL; /** Obtain cookie origin URL */
|
||||
|
@ -65,10 +65,8 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */
|
|||
*/
|
||||
@interface NSHTTPCookie : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSHTTPCookie)
|
||||
@private
|
||||
void *_NSHTTPCookieInternal;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -108,7 +106,7 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */
|
|||
/**
|
||||
* Returns the domain to which the cookie should be sent.<br />
|
||||
* If there is a leading dot then subdomains should also receive the
|
||||
* cookie as specified in RFC 2965.
|
||||
* coockie as specified in RFC 2965.
|
||||
*/
|
||||
- (NSString *) domain;
|
||||
|
||||
|
@ -245,7 +243,7 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */
|
|||
* Returns 0 for an unversioned Netscape style cookie or a
|
||||
* positive integer for a versioned cookie.
|
||||
*/
|
||||
- (NSUInteger) version;
|
||||
- (unsigned) version;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define __NSHTTPCookieStorage_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION(011300,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
|
@ -38,18 +38,17 @@ extern "C" {
|
|||
@class NSHTTPCookie;
|
||||
@class NSURL;
|
||||
|
||||
enum {
|
||||
NSHTTPCookieAcceptPolicyAlways,
|
||||
NSHTTPCookieAcceptPolicyNever,
|
||||
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
|
||||
};
|
||||
/**
|
||||
* NSHTTPCookieAcceptPolicyAlways Accept all cookies
|
||||
* NSHTTPCookieAcceptPolicyNever Reject all cookies
|
||||
* NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain Accept cookies
|
||||
* only from the main document domain
|
||||
*/
|
||||
typedef NSUInteger NSHTTPCookieAcceptPolicy;
|
||||
typedef enum {
|
||||
NSHTTPCookieAcceptPolicyAlways,
|
||||
NSHTTPCookieAcceptPolicyNever,
|
||||
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
|
||||
} NSHTTPCookieAcceptPolicy;
|
||||
|
||||
/**
|
||||
* Posted to the distributed notification center when the cookie
|
||||
|
@ -70,10 +69,8 @@ extern NSString * const NSHTTPCookieManagerCookiesChangedNotification;
|
|||
|
||||
@interface NSHTTPCookieStorage : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSHTTPCookieStorage)
|
||||
@private
|
||||
void *_NSHTTPCookieStorageInternal;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* This file is part of the GNUstep Base Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, 02111 USA.
|
||||
|
@ -31,121 +31,20 @@
|
|||
|
||||
/**** Included Headers *******************************************************/
|
||||
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
@class NSArray, NSSet, NSHashTable;
|
||||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
enum {
|
||||
NSHashTableStrongMemory
|
||||
= NSPointerFunctionsStrongMemory,
|
||||
NSHashTableZeroingWeakMemory
|
||||
= NSPointerFunctionsZeroingWeakMemory,
|
||||
NSHashTableCopyIn
|
||||
= NSPointerFunctionsCopyIn,
|
||||
NSHashTableObjectPointerPersonality
|
||||
= NSPointerFunctionsObjectPointerPersonality,
|
||||
};
|
||||
|
||||
typedef NSUInteger NSHashTableOptions;
|
||||
|
||||
@interface NSHashTable : NSObject <NSCopying, NSCoding, NSFastEnumeration>
|
||||
|
||||
+ (id) hashTableWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
+ (id) hashTableWithWeakObjects;
|
||||
|
||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
- (id) initWithPointerFunctions: (NSPointerFunctions*)functions
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
/** Adds the object to the receiver.
|
||||
/**
|
||||
* Hash table type ... an opaque pointer to a data structure.
|
||||
*/
|
||||
- (void) addObject: (id)object;
|
||||
|
||||
/** Returns an array containing all objects in the receiver.
|
||||
*/
|
||||
- (NSArray*) allObjects;
|
||||
|
||||
/** Returns any objct from the receiver, or nil if the receiver contains no
|
||||
* objects.
|
||||
*/
|
||||
- (id) anyObject;
|
||||
|
||||
/** Returns YES if the receiver contains an item equal to anObject, or NO
|
||||
* otherwise.
|
||||
*/
|
||||
- (BOOL) containsObject: (id)anObject;
|
||||
|
||||
/** Return the number of items atored in the receiver.
|
||||
*/
|
||||
- (NSUInteger) count;
|
||||
|
||||
/** Removes from the receiver any items which are not also present in 'other'.
|
||||
*/
|
||||
- (void) intersectHashTable: (NSHashTable*)other;
|
||||
|
||||
/** Returns YES if the receiver and 'other' contain any items in common.
|
||||
*/
|
||||
- (BOOL) intersectsHashTable: (NSHashTable*)other;
|
||||
|
||||
/** Returns YES if the receiver and 'other' contain equal sets of items.
|
||||
*/
|
||||
- (BOOL) isEqualToHashTable: (NSHashTable*)other;
|
||||
|
||||
/** Returns YES fi all the items in the receiver are also present in 'other'
|
||||
*/
|
||||
- (BOOL) isSubsetOfHashTable: (NSHashTable*)other;
|
||||
|
||||
/** Returns an item stored in the receiver which is equal to the supplied
|
||||
* object argument, or nil if no matchi is found.
|
||||
*/
|
||||
- (id) member: (id)object;
|
||||
|
||||
/** Removes from the receivr all those items which are prsent in both
|
||||
* the receiver and in 'other'.
|
||||
*/
|
||||
- (void) minusHashTable: (NSHashTable*)other;
|
||||
|
||||
/** Return an enumerator for the receiver.
|
||||
*/
|
||||
- (NSEnumerator*) objectEnumerator;
|
||||
|
||||
/** Return an NSPointerFunctions value describing the functions used by the
|
||||
* receiver to handle its contents.
|
||||
*/
|
||||
- (NSPointerFunctions*) pointerFunctions;
|
||||
|
||||
/** Removes all objects.
|
||||
*/
|
||||
- (void) removeAllObjects;
|
||||
|
||||
/** Remove the object (or any equal object) from the receiver.
|
||||
*/
|
||||
- (void) removeObject: (id)object;
|
||||
|
||||
/** Returns a set containing all the objects in the receiver.
|
||||
*/
|
||||
- (NSSet*) setRepresentation;
|
||||
|
||||
/** Adds to the receiver thse items present in 'other' which were
|
||||
* not present in the receiver.
|
||||
*/
|
||||
- (void) unionHashTable: (NSHashTable*)other;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
typedef void* NSHashTable;
|
||||
|
||||
/**
|
||||
* Type for enumerating.<br />
|
||||
|
@ -157,11 +56,11 @@ typedef struct { void *map; void *node; size_t bucket; } NSHashEnumerator;
|
|||
/** Callback functions for an NSHashTable. See NSCreateHashTable() . <br />*/
|
||||
typedef struct _NSHashTableCallBacks
|
||||
{
|
||||
/** <code>NSUInteger (*hash)(NSHashTable *, const void *)</code> ...
|
||||
/** <code>unsigned int (*hash)(NSHashTable *, const void *)</code> ...
|
||||
* Hashing function. NOTE: Elements with equal values must have equal hash
|
||||
* function values. The default if NULL uses the pointer addresses
|
||||
* directly. <br/>*/
|
||||
NSUInteger (*hash)(NSHashTable *, const void *);
|
||||
unsigned int (*hash)(NSHashTable *, const void *);
|
||||
|
||||
/** <code>BOOL (*isEqual)(NSHashTable *, const void *, const void *)</code>
|
||||
* ... Comparison function. The default if NULL uses '<code>==</code>'.
|
||||
|
@ -192,11 +91,11 @@ GS_EXPORT const NSHashTableCallBacks NSPointerToStructHashCallBacks;
|
|||
|
||||
GS_EXPORT NSHashTable *
|
||||
NSCreateHashTable(NSHashTableCallBacks callBacks,
|
||||
NSUInteger capacity);
|
||||
unsigned int capacity);
|
||||
|
||||
GS_EXPORT NSHashTable *
|
||||
NSCreateHashTableWithZone(NSHashTableCallBacks callBacks,
|
||||
NSUInteger capacity,
|
||||
unsigned int capacity,
|
||||
NSZone *zone);
|
||||
|
||||
GS_EXPORT NSHashTable *
|
||||
|
@ -211,7 +110,7 @@ NSResetHashTable(NSHashTable *table);
|
|||
GS_EXPORT BOOL
|
||||
NSCompareHashTables(NSHashTable *table1, NSHashTable *table2);
|
||||
|
||||
GS_EXPORT NSUInteger
|
||||
GS_EXPORT unsigned int
|
||||
NSCountHashTable(NSHashTable *table);
|
||||
|
||||
GS_EXPORT void *
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -39,14 +39,9 @@ extern "C" {
|
|||
*/
|
||||
@interface NSHost : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSHost)
|
||||
@private
|
||||
NSSet *_names;
|
||||
NSSet *_addresses;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,8 +112,6 @@ extern "C" {
|
|||
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE,011700)
|
||||
|
||||
/**
|
||||
* Adds synonym for +currentHost.
|
||||
*/
|
||||
|
@ -129,7 +122,6 @@ extern "C" {
|
|||
*/
|
||||
+ (NSHost*) localHost; /* All local IP addresses */
|
||||
@end
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -35,7 +35,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
|
||||
|
||||
/**
|
||||
* Instances of this class represent a series of indexes into a hierarchy
|
||||
|
@ -44,26 +44,20 @@ extern "C" {
|
|||
*/
|
||||
@interface NSIndexPath : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSIndexPath)
|
||||
@private
|
||||
NSUInteger _hash;
|
||||
NSUInteger _length;
|
||||
NSUInteger *_indexes;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
unsigned _hash;
|
||||
unsigned _length;
|
||||
unsigned *_indexes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a path containing the single value anIndex.
|
||||
*/
|
||||
+ (id) indexPathWithIndex: (NSUInteger)anIndex;
|
||||
+ (id) indexPathWithIndex: (unsigned)anIndex;
|
||||
|
||||
/**
|
||||
* Return a path containing all the indexes in the supplied array.
|
||||
*/
|
||||
+ (id) indexPathWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length;
|
||||
+ (id) indexPathWithIndexes: (unsigned*)indexes length: (unsigned)length;
|
||||
|
||||
/**
|
||||
* Compares other with the receiver.<br />
|
||||
|
@ -77,18 +71,18 @@ extern "C" {
|
|||
/**
|
||||
* Copies all index values from the receiver into aBuffer.
|
||||
*/
|
||||
- (void) getIndexes: (NSUInteger*)aBuffer;
|
||||
- (void) getIndexes: (unsigned*)aBuffer;
|
||||
|
||||
/**
|
||||
* Return the index at the specified position or NSNotFound if there
|
||||
* is no index at the specified position.
|
||||
*/
|
||||
- (NSUInteger) indexAtPosition: (NSUInteger)position;
|
||||
- (unsigned) indexAtPosition: (unsigned)position;
|
||||
|
||||
/**
|
||||
* Return path formed by adding anIndex to the receiver.
|
||||
*/
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (NSUInteger)anIndex;
|
||||
- (NSIndexPath *) indexPathByAddingIndex: (unsigned)anIndex;
|
||||
|
||||
/**
|
||||
* Return path formed by removing the last index from the receiver.
|
||||
|
@ -99,18 +93,18 @@ extern "C" {
|
|||
* Returns the shared instance containing the specified index, creating it
|
||||
* and destroying the receiver if necessary.
|
||||
*/
|
||||
- (id) initWithIndex: (NSUInteger)anIndex;
|
||||
- (id) initWithIndex: (unsigned)anIndex;
|
||||
|
||||
/** <init />
|
||||
* Returns the shared instance containing the specified index array,
|
||||
* creating it and destroying the receiver if necessary.
|
||||
*/
|
||||
- (id) initWithIndexes: (NSUInteger*)indexes length: (NSUInteger)length;
|
||||
- (id) initWithIndexes: (unsigned*)indexes length: (unsigned)length;
|
||||
|
||||
/**
|
||||
* Returns the number of index values present in the receiver.
|
||||
*/
|
||||
- (NSUInteger) length;
|
||||
- (unsigned) length;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -45,9 +45,7 @@ extern "C" {
|
|||
*/
|
||||
@interface NSIndexSet : NSObject <NSCopying, NSMutableCopying, NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSIndexSet)
|
||||
void *_data;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,7 +57,7 @@ extern "C" {
|
|||
* Return a set containing the single value anIndex, or returns nil if
|
||||
* anIndex is NSNotFound.
|
||||
*/
|
||||
+ (id) indexSetWithIndex: (NSUInteger)anIndex;
|
||||
+ (id) indexSetWithIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Return a set containing all the values in aRange, or returns nil if
|
||||
|
@ -70,7 +68,7 @@ extern "C" {
|
|||
/**
|
||||
* Returns YES if the receiver contains anIndex, NO otherwise.
|
||||
*/
|
||||
- (BOOL) containsIndex: (NSUInteger)anIndex;
|
||||
- (BOOL) containsIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Returns YES if the receiver contains all the index values present
|
||||
|
@ -87,20 +85,13 @@ extern "C" {
|
|||
/**
|
||||
* Returns the number of index values present in the receiver.
|
||||
*/
|
||||
- (NSUInteger) count;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented
|
||||
* Returns the number of indexes set within the specified range.
|
||||
*/
|
||||
- (NSUInteger) countOfIndexesInRange: (NSRange)range;
|
||||
#endif
|
||||
- (unsigned int) count;
|
||||
|
||||
/**
|
||||
* Returns the first index value in the receiver or NSNotFound if the
|
||||
* receiver is empty.
|
||||
*/
|
||||
- (NSUInteger) firstIndex;
|
||||
- (unsigned int) firstIndex;
|
||||
|
||||
/**
|
||||
* Copies index values into aBuffer until there are no index values left or
|
||||
|
@ -111,39 +102,39 @@ extern "C" {
|
|||
* If aRange is a null pointer, this method attempts to get <em>all</em>
|
||||
* index values from the set (and of course no range can be returned in it).
|
||||
*/
|
||||
- (NSUInteger) getIndexes: (NSUInteger*)aBuffer
|
||||
maxCount: (NSUInteger)aCount
|
||||
inIndexRange: (NSRangePointer)aRange;
|
||||
- (unsigned int) getIndexes: (unsigned int*)aBuffer
|
||||
maxCount: (unsigned int)aCount
|
||||
inIndexRange: (NSRangePointer)aRange;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is greater than
|
||||
* anIndex.
|
||||
*/
|
||||
- (NSUInteger) indexGreaterThanIndex: (NSUInteger)anIndex;
|
||||
- (unsigned int) indexGreaterThanIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is greater than
|
||||
* or equal to anIndex.
|
||||
*/
|
||||
- (NSUInteger) indexGreaterThanOrEqualToIndex: (NSUInteger)anIndex;
|
||||
- (unsigned int) indexGreaterThanOrEqualToIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is less than
|
||||
* anIndex.
|
||||
*/
|
||||
- (NSUInteger) indexLessThanIndex: (NSUInteger)anIndex;
|
||||
- (unsigned int) indexLessThanIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Return the first index value in the receiver which is less than
|
||||
* or equal to anIndex.
|
||||
*/
|
||||
- (NSUInteger) indexLessThanOrEqualToIndex: (NSUInteger)anIndex;
|
||||
- (unsigned int) indexLessThanOrEqualToIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Initialise the receiver to contain anIndex. Returns the initialised
|
||||
* object or nil if anIndex is NSNotFound.
|
||||
*/
|
||||
- (id) initWithIndex: (NSUInteger)anIndex;
|
||||
- (id) initWithIndex: (unsigned int)anIndex;
|
||||
|
||||
/** <init />
|
||||
* Initialise the receiver to contain all index values in aRange.
|
||||
|
@ -171,7 +162,7 @@ extern "C" {
|
|||
* Returns the last index value in the receiver or NSNotFound if the
|
||||
* receiver is empty.
|
||||
*/
|
||||
- (NSUInteger) lastIndex;
|
||||
- (unsigned int) lastIndex;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -180,7 +171,7 @@ extern "C" {
|
|||
/**
|
||||
* Adds anIndex to the set of indexes stored in the receiver.
|
||||
*/
|
||||
- (void) addIndex: (NSUInteger)anIndex;
|
||||
- (void) addIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Adds all the indexes from aSet to the set of indexes stored in the receiver.
|
||||
|
@ -200,7 +191,7 @@ extern "C" {
|
|||
/**
|
||||
* Removes anIndex from the set of indexes stored in the receiver.
|
||||
*/
|
||||
- (void) removeIndex: (NSUInteger)anIndex;
|
||||
- (void) removeIndex: (unsigned int)anIndex;
|
||||
|
||||
/**
|
||||
* Removes all the indexes in aSet from the set of indexes
|
||||
|
@ -215,14 +206,14 @@ extern "C" {
|
|||
- (void) removeIndexesInRange: (NSRange)aRange;
|
||||
|
||||
/**
|
||||
* Not implemented.<br />
|
||||
* Moves all the indexes from anIndex upwards by the amount specified.<br />
|
||||
* If amount is negative, index values below anIndex will be overwritten
|
||||
* by the shifted values.<br />
|
||||
* If amount is positive, a 'hole' will be left in the index range after
|
||||
* anIndex.
|
||||
*/
|
||||
- (void) shiftIndexesStartingAtIndex: (NSUInteger)anIndex
|
||||
by: (NSInteger)amount;
|
||||
- (void) shiftIndexesStartingAtIndex: (unsigned int)anIndex by: (int)amount;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -35,24 +35,21 @@ extern "C" {
|
|||
|
||||
@interface NSInvocation : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSInvocation)
|
||||
@public
|
||||
NSMethodSignature *_sig;
|
||||
void *_cframe;
|
||||
void *_retval;
|
||||
id _target;
|
||||
SEL _selector;
|
||||
unsigned int _numArgs;
|
||||
void *_info;
|
||||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
NSArgumentInfo *_info;
|
||||
#else
|
||||
void *_dummy;
|
||||
#endif
|
||||
BOOL _argsRetained;
|
||||
BOOL _targetRetained;
|
||||
BOOL _validReturn;
|
||||
BOOL _sendToSuper;
|
||||
void *_retptr;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -64,11 +61,11 @@ extern "C" {
|
|||
* Accessing message elements.
|
||||
*/
|
||||
- (void) getArgument: (void*)buffer
|
||||
atIndex: (NSInteger)index;
|
||||
atIndex: (int)index;
|
||||
- (void) getReturnValue: (void*)buffer;
|
||||
- (SEL) selector;
|
||||
- (void) setArgument: (void*)buffer
|
||||
atIndex: (NSInteger)index;
|
||||
atIndex: (int)index;
|
||||
- (void) setReturnValue: (void*)buffer;
|
||||
- (void) setSelector: (SEL)aSelector;
|
||||
- (void) setTarget: (id)anObject;
|
||||
|
@ -80,7 +77,7 @@ extern "C" {
|
|||
- (BOOL) argumentsRetained;
|
||||
- (void) retainArguments;
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE) && GS_API_VERSION( 11101,GS_API_LATEST)
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE) && GS_API_VERSION(011101,GS_API_LATEST)
|
||||
- (BOOL) targetRetained;
|
||||
- (void) retainArgumentsIncludingTarget: (BOOL)retainTargetFlag;
|
||||
#endif
|
||||
|
@ -98,7 +95,7 @@ extern "C" {
|
|||
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE, 011700)
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
@interface NSInvocation (GNUstep)
|
||||
/**
|
||||
* Returns the status of the flag set by -setSendsToSuper:
|
||||
|
@ -122,6 +119,8 @@ extern "C" {
|
|||
+ (NSInvocation*) _returnInvocationAndDestroyProxy: (id)proxy;
|
||||
- (id) initWithArgframe: (arglist_t)frame selector: (SEL)aSelector;
|
||||
- (id) initWithMethodSignature: (NSMethodSignature*)aSignature;
|
||||
- (id) initWithSelector: (SEL)aSelector;
|
||||
- (id) initWithTarget: (id)anObject selector: (SEL)aSelector, ...;
|
||||
- (void*) returnFrame: (arglist_t)argFrame;
|
||||
@end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -37,8 +37,6 @@ extern "C" {
|
|||
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
@class NSSet;
|
||||
@class NSMutableSet;
|
||||
@class NSDictionary;
|
||||
@class NSError;
|
||||
@class NSString;
|
||||
|
@ -93,67 +91,17 @@ GS_EXPORT NSString* const NSUndefinedKeyException;
|
|||
- (void) handleTakeValue: (id)anObject forUnboundKey: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
* Returns a mutable array value for a given key. This method:
|
||||
* <list>
|
||||
* <item>Searches the receiver for methods matching the patterns
|
||||
* insertObject:in<Key>AtIndex: and
|
||||
* removeObjectFrom<Key>AtIndex:. If both
|
||||
* methods are found, each message sent to the proxy array will result in the
|
||||
* invocation of one or more of these methods. If
|
||||
* replaceObjectIn<Key>AtIndex:withObject:
|
||||
* is also found in the receiver it
|
||||
* will be used when appropriate for better performance.</item>
|
||||
* <item>If the set of methods is not found, searches the receiver for a the
|
||||
* method set<Key>:. Each message sent to the proxy array will result in
|
||||
* the invocation of set<Key>:</item>
|
||||
* <item>If the previous do not match, and accessInstanceVariablesDirectly
|
||||
* returns YES, searches for an instance variable matching _<key> or
|
||||
* <key> (in that order). If the instance variable is found,
|
||||
* messages sent
|
||||
* to the proxy object will be forwarded to the instance variable.</item>
|
||||
* <item>If none of the previous are found, raises an NSUndefinedKeyException
|
||||
* </item>
|
||||
* </list>
|
||||
* <strong>Not implemented</strong> ... I don't know what this method
|
||||
* is good for ... do we need to copy MacOS-X and implement it?
|
||||
*/
|
||||
- (NSMutableArray*) mutableArrayValueForKey: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
* Returns a mutable array value for the given key path.
|
||||
* <strong>Not implemented</strong> ... I don't know what this method
|
||||
* is good for ... do we need to copy MacOS-X and implement it?
|
||||
*/
|
||||
- (NSMutableArray*) mutableArrayValueForKeyPath: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
* Returns a mutable set value for a given key. This method:
|
||||
* <list>
|
||||
* <item>Searches the receiver for methods matching the patterns
|
||||
* add<Key>Object:, remove<Key>Object:,
|
||||
* add<Key>:, and remove<Key>:, which
|
||||
* correspond to the NSMutableSet methods addObject:, removeObject:,
|
||||
* unionSet:, and minusSet:, respectively. If at least one addition
|
||||
* and one removal method are found, each message sent to the proxy set
|
||||
* will result in the invocation of one or more of these methods. If
|
||||
* intersect<Key>: or set<Key>:
|
||||
* is also found in the receiver, the method(s)
|
||||
* will be used when appropriate for better performance.</item>
|
||||
* <item>If the set of methods is not found, searches the receiver for a the
|
||||
* method set<Key>:. Each message sent to the proxy set will result in
|
||||
* the invocation of set<Key>:</item>
|
||||
* <item>If the previous do not match, and accessInstanceVariablesDirectly
|
||||
* returns YES, searches for an instance variable matching _<key> or
|
||||
* <key> (in that order). If the instance variable is found,
|
||||
* messages sent
|
||||
* to the proxy object will be forwarded to the instance variable.</item>
|
||||
* <item>If none of the previous are found, raises an NSUndefinedKeyException
|
||||
* </item>
|
||||
* </list>
|
||||
*/
|
||||
- (NSMutableSet*) mutableSetValueForKey: (NSString *)aKey;
|
||||
|
||||
/**
|
||||
* Returns a mutable set value for the given key path.
|
||||
*/
|
||||
- (NSMutableSet*) mutableSetValueForKeyPath: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
* This method is invoked by the NSKeyValueCoding mechanism when an attempt
|
||||
* is made to set an null value for a scalar attribute. This implementation
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define __NSKeyValueObserving_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
|
||||
#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION(010200,GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
@ -39,39 +39,29 @@ extern "C" {
|
|||
@class NSSet;
|
||||
@class NSString;
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
NSKeyValueObservingOptionNew = 1,
|
||||
NSKeyValueObservingOptionOld = 2
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
, NSKeyValueObservingOptionInitial = 4,
|
||||
NSKeyValueObservingOptionPrior = 8
|
||||
#endif
|
||||
};
|
||||
typedef NSUInteger NSKeyValueObservingOptions;
|
||||
} NSKeyValueObservingOptions;
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
NSKeyValueChangeSetting = 1,
|
||||
NSKeyValueChangeInsertion = 2,
|
||||
NSKeyValueChangeRemoval = 3,
|
||||
NSKeyValueChangeReplacement = 4
|
||||
};
|
||||
typedef NSUInteger NSKeyValueChange;
|
||||
} NSKeyValueChange;
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
NSKeyValueUnionSetMutation = 1,
|
||||
NSKeyValueMinusSetMutation = 2,
|
||||
NSKeyValueIntersectSetMutation = 3,
|
||||
NSKeyValueSetSetMutation = 4
|
||||
};
|
||||
typedef NSUInteger NSKeyValueSetMutationKind;
|
||||
} NSKeyValueSetMutationKind;
|
||||
|
||||
GS_EXPORT NSString *const NSKeyValueChangeIndexesKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeKindKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeNewKey;
|
||||
GS_EXPORT NSString *const NSKeyValueChangeOldKey;
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
|
||||
#endif
|
||||
|
||||
/* Given that the receiver has been registered as an observer
|
||||
* of the value at a key path relative to an object,
|
||||
|
@ -213,10 +203,10 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
|
|||
|
||||
/**
|
||||
* Tells the observing system that when NSKeyValueObserverNotification
|
||||
* protocol messages are sent for any key in the triggerKeys array,
|
||||
* they should also be sent for dependentKey.
|
||||
* protocol messages are sent for any key in the keys array, they should
|
||||
* also be sent for dependentKey.
|
||||
*/
|
||||
+ (void) setKeys: (NSArray*)triggerKeys
|
||||
+ (void) setKeys: (NSArray*)keys
|
||||
triggerChangeNotificationsForDependentKey: (NSString*)dependentKey;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -52,7 +52,6 @@ extern "C" {
|
|||
*/
|
||||
@interface NSKeyedArchiver : NSCoder
|
||||
{
|
||||
#if GS_EXPOSE(NSKeyedArchiver)
|
||||
@private
|
||||
NSMutableData *_data; /* Data to write into. */
|
||||
id _delegate; /* Delegate controls operation. */
|
||||
|
@ -70,10 +69,6 @@ extern "C" {
|
|||
NSMutableDictionary *_enc; /* Object being encoded. */
|
||||
NSMutableArray *_obj; /* Array of objects. */
|
||||
NSPropertyListFormat _format;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,7 +121,7 @@ extern "C" {
|
|||
* and associates the encoded value with aKey.
|
||||
*/
|
||||
- (void) encodeBytes: (const uint8_t*)aPointer
|
||||
length: (NSUInteger)length
|
||||
length: (unsigned)length
|
||||
forKey: (NSString*)aKey;
|
||||
|
||||
/**
|
||||
|
@ -221,7 +216,6 @@ extern "C" {
|
|||
*/
|
||||
@interface NSKeyedUnarchiver : NSCoder
|
||||
{
|
||||
#if GS_EXPOSE(NSKeyedUnarchiver)
|
||||
@private
|
||||
NSDictionary *_archive;
|
||||
id _delegate; /* Delegate controls operation. */
|
||||
|
@ -236,13 +230,9 @@ extern "C" {
|
|||
#endif
|
||||
GSIArray _objMap; /* Decoded objects. */
|
||||
#ifndef _IN_NSKEYEDUNARCHIVER_M
|
||||
#undef GSIArray
|
||||
#undef GSUnarchiverArray
|
||||
#endif
|
||||
NSZone *_zone; /* Zone for allocating objs. */
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -308,7 +298,7 @@ extern "C" {
|
|||
* -encodeBytes:length:forKey:
|
||||
*/
|
||||
- (const uint8_t*) decodeBytesForKey: (NSString*)aKey
|
||||
returnedLength: (NSUInteger*)length;
|
||||
returnedLength: (unsigned*)length;
|
||||
|
||||
/**
|
||||
* Returns a double value associated with aKey. This value must previously
|
||||
|
|
237
Headers/Foundation/NSLocale.h
Normal file
237
Headers/Foundation/NSLocale.h
Normal file
|
@ -0,0 +1,237 @@
|
|||
/* NSLocale.h
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Stefan Bidigaray, Richard Frith-Macdonald
|
||||
Date: June, 2010
|
||||
|
||||
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 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; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __NSLocale_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSLocale_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
|
||||
typedef NSUInteger NSLocaleLanguageDirection;
|
||||
enum
|
||||
{
|
||||
NSLocaleLanguageDirectionUnknown = 0,
|
||||
NSLocaleLanguageDirectionLeftToRight = 1,
|
||||
NSLocaleLanguageDirectionRightToLeft = 2,
|
||||
NSLocaleLanguageDirectionTopToBottom = 3,
|
||||
NSLocaleLanguageDirectionBottomToTop = 4
|
||||
};
|
||||
|
||||
GS_EXPORT NSString * const NSCurrentLocaleDidChangeNotification;
|
||||
|
||||
//
|
||||
// NSLocale Component Keys
|
||||
//
|
||||
GS_EXPORT NSString * const NSLocaleIdentifier;
|
||||
GS_EXPORT NSString * const NSLocaleLanguageCode;
|
||||
GS_EXPORT NSString * const NSLocaleCountryCode;
|
||||
GS_EXPORT NSString * const NSLocaleScriptCode;
|
||||
GS_EXPORT NSString * const NSLocaleVariantCode;
|
||||
GS_EXPORT NSString * const NSLocaleExemplarCharacterSet;
|
||||
GS_EXPORT NSString * const NSLocaleCalendarIdentifier;
|
||||
GS_EXPORT NSString * const NSLocaleCalendar;
|
||||
GS_EXPORT NSString * const NSLocaleCollationIdentifier;
|
||||
GS_EXPORT NSString * const NSLocaleUsesMetricSystem;
|
||||
GS_EXPORT NSString * const NSLocaleMeasurementSystem;
|
||||
GS_EXPORT NSString * const NSLocaleDecimalSeparator;
|
||||
GS_EXPORT NSString * const NSLocaleGroupingSeparator;
|
||||
GS_EXPORT NSString * const NSLocaleCurrencySymbol;
|
||||
GS_EXPORT NSString * const NSLocaleCurrencyCode;
|
||||
GS_EXPORT NSString * const NSLocaleCollatorIdentifier;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
GS_EXPORT NSString * const NSLocaleQuotationBeginDelimiterKey;
|
||||
GS_EXPORT NSString * const NSLocaleQuotationEndDelimiterKey;
|
||||
GS_EXPORT NSString * const NSLocaleAlternateQuotationBeginDelimiterKey;
|
||||
GS_EXPORT NSString * const NSLocaleAlternateQuotationEndDelimiterKey;
|
||||
#endif
|
||||
|
||||
//
|
||||
// NSLocale Calendar Keys
|
||||
//
|
||||
GS_EXPORT NSString * const NSGregorianCalendar;
|
||||
GS_EXPORT NSString * const NSBuddhistCalendar;
|
||||
GS_EXPORT NSString * const NSChineseCalendar;
|
||||
GS_EXPORT NSString * const NSHebrewCalendar;
|
||||
GS_EXPORT NSString * const NSIslamicCalendar;
|
||||
GS_EXPORT NSString * const NSIslamicCivilCalendar;
|
||||
GS_EXPORT NSString * const NSJapaneseCalendar;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
GS_EXPORT NSString * const NSRepublicOfChinaCalendar;
|
||||
GS_EXPORT NSString * const NSPersianCalendar;
|
||||
GS_EXPORT NSString * const NSIndianCalendar;
|
||||
GS_EXPORT NSString * const NSISO8601Calendar;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Provides information describing language, date and time, and currency
|
||||
* information.
|
||||
*/
|
||||
@interface NSLocale : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSLocale)
|
||||
@private
|
||||
NSString *_localeId;
|
||||
NSMutableDictionary *_components;
|
||||
#endif
|
||||
#if GS_NONFRAGILE
|
||||
#else
|
||||
/* Pointer to private additional data used to avoid breaking ABI
|
||||
* when we don't have the non-fragile ABI available.
|
||||
* Use this mechanism rather than changing the instance variable
|
||||
* layout (see Source/GSInternal.h for details).
|
||||
*/
|
||||
@private id _internal GS_UNUSED_IVAR;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Returns a version of the current locale which automatically updates
|
||||
* when locale settngs are changed.
|
||||
*/
|
||||
+ (id) autoupdatingCurrentLocale;
|
||||
#endif
|
||||
|
||||
/** Returns an array of NSStrings with all the available locale identifiers.
|
||||
*/
|
||||
+ (NSArray *) availableLocaleIdentifiers;
|
||||
|
||||
/** Returns the caoninical identifier for a language represented by
|
||||
* the supplied string.
|
||||
*/
|
||||
+ (NSString *) canonicalLanguageIdentifierFromString: (NSString *)string;
|
||||
|
||||
/** Returns the canonical identifier for a locale represented by the
|
||||
* supplied string.
|
||||
*/
|
||||
+ (NSString *) canonicalLocaleIdentifierFromString: (NSString *)string;
|
||||
|
||||
/** Returns the direction in which the language is written.
|
||||
*/
|
||||
+ (NSLocaleLanguageDirection) characterDirectionForLanguage:
|
||||
(NSString *)isoLangCode;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Returns a list of available ISO currency code strings.
|
||||
*/
|
||||
+ (NSArray *) commonISOCurrencyCodes;
|
||||
#endif
|
||||
|
||||
/** Parses the supplied locale identifier and returns a dictionary containing
|
||||
* its components.<br />
|
||||
* Components are NSLocaleLanguageCode, NSLocaleCountryCode, NSLocaleCalendar.
|
||||
*/
|
||||
+ (NSDictionary *) componentsFromLocaleIdentifier: (NSString *)string;
|
||||
|
||||
/** Returns the current locale information.
|
||||
*/
|
||||
+ (id) currentLocale;
|
||||
|
||||
/** Returns an array of NSString representing all known country codes.
|
||||
*/
|
||||
+ (NSArray *) ISOCountryCodes;
|
||||
|
||||
/** Returns an array of NSString representing all known currency codes.
|
||||
*/
|
||||
+ (NSArray *) ISOCurrencyCodes;
|
||||
|
||||
/** Returns an array of NSString representing all known language codes.
|
||||
*/
|
||||
+ (NSArray *) ISOLanguageCodes;
|
||||
|
||||
/** Returns the direction in which lines of text in the specified
|
||||
* language are written.
|
||||
*/
|
||||
+ (NSLocaleLanguageDirection) lineDirectionForLanguage: (NSString*)isoLangCode;
|
||||
|
||||
/** Builds and returns a locale idntifier from the individual components
|
||||
* supplied in dict.<br />
|
||||
* Components are NSLocaleLanguageCode, NSLocaleCountryCode, NSLocaleCalendar.
|
||||
*/
|
||||
+ (NSString *) localeIdentifierFromComponents: (NSDictionary*)dict;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Returns the standard locale identifier for the windows locale code.
|
||||
*/
|
||||
+ (NSString *) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Returns an array of preferred languages. Sorted from most preferred to
|
||||
* leave preferred.
|
||||
*/
|
||||
+ (NSArray *) preferredLanguages;
|
||||
#endif
|
||||
|
||||
/** Returns the the system locale.
|
||||
*/
|
||||
+ (id) systemLocale;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Returns the windows locale code corresponding to the staqndard locale
|
||||
* identifier.
|
||||
*/
|
||||
+ (uint32_t) windowsLocaleCodeFromLocaleIdentifier:
|
||||
(NSString *)localeIdentifier;
|
||||
#endif
|
||||
|
||||
/** Returns the localised representation of the supplied value converted
|
||||
* on the basis that it represents information whose type is specified by
|
||||
* the key.
|
||||
*/
|
||||
- (NSString *) displayNameForKey: (id)key value: (id)value;
|
||||
|
||||
/** Initialises the receiver to be the locale specified by the identifier.
|
||||
* This may result in replacement of the receiver by an existing locale.
|
||||
*/
|
||||
- (id) initWithLocaleIdentifier: (NSString *)string;
|
||||
|
||||
/** Returns the canonical identifier for the receiver (which
|
||||
* may differ from the identifgier used to create the receiver
|
||||
* since different identifiers may map to the same locale).
|
||||
*/
|
||||
- (NSString *) localeIdentifier;
|
||||
|
||||
/** Returns the named object from the receiver locale.
|
||||
*/
|
||||
- (id) objectForKey: (id)key;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) */
|
||||
|
||||
#endif /* __NSLocale_h_GNUSTEPBASE_INCLUDE */
|
|
@ -11,7 +11,7 @@
|
|||
This file is part of the GNUstep Objective-C Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
If you are interested in a warranty or support for this source code,
|
||||
contact Scott Christley <scottc@net-community.com> for more information.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -31,12 +31,11 @@
|
|||
|
||||
#ifndef __NSLock_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSLock_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
@ -58,24 +57,12 @@ extern "C" {
|
|||
@end
|
||||
|
||||
/**
|
||||
* <p>Simplest lock for protecting critical sections of code.
|
||||
* </p>
|
||||
* <p>An <code>NSLock</code> is used in multi-threaded applications to protect
|
||||
* critical pieces of code. While one thread holds a lock within a piece of
|
||||
* code, another thread cannot execute that code until the first thread has
|
||||
* given up its hold on the lock. The limitation of <code>NSLock</code> is
|
||||
* that you can only lock an <code>NSLock</code> once and it must be unlocked
|
||||
* before it can be acquired again.<br /> Other lock classes, notably
|
||||
* [NSRecursiveLock], have different restrictions.
|
||||
* </p>
|
||||
* Simplest lock for protecting critical sections of code.
|
||||
*/
|
||||
@interface NSLock : NSObject <NSLocking>
|
||||
@interface NSLock : NSObject <NSLocking, GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSLock)
|
||||
@private
|
||||
gs_mutex_t _mutex;
|
||||
NSString *_name;
|
||||
#endif
|
||||
void *_mutex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,64 +85,6 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* NSCondition provides an interface to POSIX condition variables.
|
||||
*/
|
||||
@interface NSCondition : NSObject <NSLocking>
|
||||
{
|
||||
#if GS_EXPOSE(NSCondition)
|
||||
@private
|
||||
gs_cond_t _condition;
|
||||
gs_mutex_t _mutex;
|
||||
NSString *_name;
|
||||
#endif
|
||||
}
|
||||
/**
|
||||
* Blocks and atomically unlocks the receiver.
|
||||
* This method should only be called when the receiver is locked.
|
||||
* The caller will then block until the receiver is sent either a -signal
|
||||
* or -broadcast message from another thread. At which
|
||||
* point, the calling thread will reacquire the lock.
|
||||
*/
|
||||
- (void) wait;
|
||||
|
||||
/**
|
||||
* Blocks the calling thread and acquires the lock, in the same way as -wait.
|
||||
* Returns YES if the condition is signaled, or NO if the timeout is reached.
|
||||
*/
|
||||
- (BOOL) waitUntilDate: (NSDate*)limit;
|
||||
|
||||
/**
|
||||
* Wakes wany one of the threads that are waiting on this condition.
|
||||
*/
|
||||
- (void) signal;
|
||||
|
||||
/**
|
||||
* Wakes all threads that are waiting on this condition.
|
||||
*/
|
||||
- (void) broadcast;
|
||||
|
||||
/**
|
||||
* Sets the name used for debugging messages.
|
||||
*/
|
||||
- (void) setName: (NSString*)newName;
|
||||
|
||||
/**
|
||||
* Returns the name used for debugging messages.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -163,25 +92,23 @@ extern "C" {
|
|||
* condition is equal to a particular value. The condition is set on
|
||||
* initialization and whenever the lock is relinquished.
|
||||
*/
|
||||
@interface NSConditionLock : NSObject <NSLocking>
|
||||
@interface NSConditionLock : NSObject <NSLocking, GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSConditionLock)
|
||||
@private
|
||||
NSCondition *_condition;
|
||||
void *_condition;
|
||||
void *_mutex;
|
||||
int _condition_value;
|
||||
NSString *_name;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize lock with given condition.
|
||||
*/
|
||||
- (id) initWithCondition: (NSInteger)value;
|
||||
- (id) initWithCondition: (int)value;
|
||||
|
||||
/**
|
||||
* Return the current condition of the lock.
|
||||
*/
|
||||
- (NSInteger) condition;
|
||||
- (int) condition;
|
||||
|
||||
/*
|
||||
* Acquiring and releasing the lock.
|
||||
|
@ -191,12 +118,12 @@ extern "C" {
|
|||
* Acquire lock when it is available and the internal condition is equal to
|
||||
* value. Blocks until this occurs.
|
||||
*/
|
||||
- (void) lockWhenCondition: (NSInteger)value;
|
||||
- (void) lockWhenCondition: (int)value;
|
||||
|
||||
/**
|
||||
* Relinquish the lock, setting internal condition to value.
|
||||
*/
|
||||
- (void) unlockWithCondition: (NSInteger)value;
|
||||
- (void) unlockWithCondition: (int)value;
|
||||
|
||||
/**
|
||||
* Try to acquire lock regardless of condition and return immediately, YES if
|
||||
|
@ -208,7 +135,7 @@ extern "C" {
|
|||
* Try to acquire lock if condition is equal to value and return immediately
|
||||
* in any case, YES if succeeded, NO if not.
|
||||
*/
|
||||
- (BOOL) tryLockWhenCondition: (NSInteger)value;
|
||||
- (BOOL) tryLockWhenCondition: (int)value;
|
||||
|
||||
/*
|
||||
* Acquiring the lock with a date condition.
|
||||
|
@ -223,7 +150,7 @@ extern "C" {
|
|||
* Try to acquire lock, when internal condition is equal to condition_to_meet,
|
||||
* and return before limit, YES if succeeded, NO if not.
|
||||
*/
|
||||
- (BOOL) lockWhenCondition: (NSInteger)condition_to_meet
|
||||
- (BOOL) lockWhenCondition: (int)condition_to_meet
|
||||
beforeDate: (NSDate*)limitDate;
|
||||
|
||||
/**
|
||||
|
@ -236,16 +163,6 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -256,13 +173,10 @@ extern "C" {
|
|||
* thread must also unlock it (n) times before another thread
|
||||
* can acquire the lock.
|
||||
*/
|
||||
@interface NSRecursiveLock : NSObject <NSLocking>
|
||||
@interface NSRecursiveLock : NSObject <NSLocking, GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSRecursiveLock)
|
||||
@private
|
||||
gs_mutex_t _mutex;
|
||||
NSString *_name;
|
||||
#endif
|
||||
void *_mutex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,24 +200,100 @@ extern "C" {
|
|||
*/
|
||||
- (void) unlock;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Return the name of the receiver or nil of none has been set.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Sets the name of the receiver (for use in debugging).
|
||||
*/
|
||||
- (void) setName: (NSString*)name;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSLock+GNUstepBase.h>
|
||||
/**
|
||||
* Returns IDENT which will be initialized
|
||||
* to an instance of a CLASSNAME in a thread safe manner.
|
||||
* If IDENT has been previously initialized
|
||||
* this macro merely returns IDENT.
|
||||
* IDENT is considered uninitialized, if it contains nil.
|
||||
* CLASSNAME must be either NSLock, NSRecursiveLock or one
|
||||
* of their subclasses.
|
||||
* See [NSLock+newLockAt:] for details.
|
||||
* This macro is intended for code that cannot insure
|
||||
* that a lock can be initialized in thread safe manner otherwise.
|
||||
* <example>
|
||||
* NSLock *my_lock = nil;
|
||||
*
|
||||
* void function (void)
|
||||
* {
|
||||
* [GS_INITIALIZED_LOCK(my_lock, NSLock) lock];
|
||||
* do_work ();
|
||||
* [my_lock unlock];
|
||||
* }
|
||||
*
|
||||
* </example>
|
||||
*/
|
||||
#define GS_INITIALIZED_LOCK(IDENT,CLASSNAME) \
|
||||
(IDENT != nil ? (id)IDENT : (id)[CLASSNAME newLockAt: &IDENT])
|
||||
|
||||
/**
|
||||
* Defines the <code>newLockAt:</code> method.
|
||||
*/
|
||||
@interface NSLock (GSCategories)
|
||||
/**
|
||||
* Initializes the id pointed to by location
|
||||
* with a new instance of the receiver's class
|
||||
* in a thread safe manner, unless
|
||||
* it has been previously initialized.
|
||||
* Returns the contents pointed to by location.
|
||||
* The location is considered unintialized if it contains nil.
|
||||
* <br/>
|
||||
* This method is used in the GS_INITIALIZED_LOCK macro
|
||||
* to initialize lock variables when it cannot be insured
|
||||
* that they can be initialized in a thread safe environment.
|
||||
* <example>
|
||||
* NSLock *my_lock = nil;
|
||||
*
|
||||
* void function (void)
|
||||
* {
|
||||
* [GS_INITIALIZED_LOCK(my_lock, NSLock) lock];
|
||||
* do_work ();
|
||||
* [my_lock unlock];
|
||||
* }
|
||||
*
|
||||
* </example>
|
||||
*/
|
||||
+ (id) newLockAt: (id *)location;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Defines the <code>newLockAt:</code> method.
|
||||
*/
|
||||
@interface NSRecursiveLock (GSCategories)
|
||||
/**
|
||||
* Initializes the id pointed to by location
|
||||
* with a new instance of the receiver's class
|
||||
* in a thread safe manner, unless
|
||||
* it has been previously initialized.
|
||||
* Returns the contents pointed to by location.
|
||||
* The location is considered unintialized if it contains nil.
|
||||
* <br/>
|
||||
* This method is used in the GS_INITIALIZED_LOCK macro
|
||||
* to initialize lock variables when it cannot be insured
|
||||
* that they can be initialized in a thread safe environment.
|
||||
* <example>
|
||||
* NSLock *my_lock = nil;
|
||||
*
|
||||
* void function (void)
|
||||
* {
|
||||
* [GS_INITIALIZED_LOCK(my_lock, NSRecursiveLock) lock];
|
||||
* do_work ();
|
||||
* [my_lock unlock];
|
||||
* }
|
||||
*
|
||||
* </example>
|
||||
*/
|
||||
+ (id) newLockAt: (id *)location;
|
||||
@end
|
||||
|
||||
#endif /* GS_API_NONE */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NSLock_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
/* NSMapTable interface for GNUStep.
|
||||
* Copyright (C) 1994, 1995, 1996, 2002, 2009 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1994, 1995, 1996, 2002 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
||||
* Created: Tue Dec 13 00:05:02 EST 1994
|
||||
* Updated: Thu Mar 21 15:12:42 EST 1996
|
||||
* Serial: 96.03.21.05
|
||||
* Modified by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
* Updated: March 2009
|
||||
*
|
||||
* This file is part of the GNUstep Base Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
|
@ -20,7 +19,7 @@
|
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02111 USA.
|
||||
|
@ -35,8 +34,6 @@
|
|||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -44,103 +41,10 @@ extern "C" {
|
|||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
enum {
|
||||
NSMapTableStrongMemory
|
||||
= NSPointerFunctionsStrongMemory,
|
||||
NSMapTableZeroingWeakMemory
|
||||
= NSPointerFunctionsZeroingWeakMemory,
|
||||
NSMapTableCopyIn
|
||||
= NSPointerFunctionsCopyIn,
|
||||
NSMapTableObjectPointerPersonality
|
||||
= NSPointerFunctionsObjectPointerPersonality
|
||||
};
|
||||
|
||||
typedef NSUInteger NSMapTableOptions;
|
||||
|
||||
@interface NSMapTable : NSObject <NSCopying, NSCoding, NSFastEnumeration>
|
||||
|
||||
/** Return a map table initialised using the specified options for
|
||||
* keys and values.
|
||||
/**
|
||||
* Map table type ... an opaque pointer to a data structure.
|
||||
*/
|
||||
+ (id) mapTableWithKeyOptions: (NSPointerFunctionsOptions)keyOptions
|
||||
valueOptions: (NSPointerFunctionsOptions)valueOptions;
|
||||
|
||||
/** Convenience method for creating a map table to store object values
|
||||
* using object keys.
|
||||
*/
|
||||
+ (id) mapTableWithStrongToStrongObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store non-retained
|
||||
* object values with retained object keys.
|
||||
*/
|
||||
+ (id) mapTableWithStrongToWeakObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store retained
|
||||
* object values with non-retained object keys.
|
||||
*/
|
||||
+ (id) mapTableWithWeakToStrongObjects;
|
||||
|
||||
/** Convenience method for creating a map table to store non-retained
|
||||
* object values with non-retained object keys.
|
||||
*/
|
||||
+ (id) mapTableWithWeakToWeakObjects;
|
||||
|
||||
/** Initialiser using option bitmasks to describe the keys and values.
|
||||
*/
|
||||
- (id) initWithKeyOptions: (NSPointerFunctionsOptions)keyOptions
|
||||
valueOptions: (NSPointerFunctionsOptions)valueOptions
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
/** Initialiser using full pointer function information to describe
|
||||
* the keys and values.
|
||||
*/
|
||||
- (id) initWithKeyPointerFunctions: (NSPointerFunctions*)keyFunctions
|
||||
valuePointerFunctions: (NSPointerFunctions*)valueFunctions
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
/** Return the number of items stored in the map.
|
||||
*/
|
||||
- (NSUInteger) count;
|
||||
|
||||
/** Return a dictionary containing the keys and values in the receiver.
|
||||
*/
|
||||
- (NSDictionary*) dictionaryRepresentation;
|
||||
|
||||
/** Return an enumerator able to enumerate the keys in the receiver.
|
||||
*/
|
||||
- (NSEnumerator*) keyEnumerator;
|
||||
|
||||
/** Return an NSPointerFunctions value describind the functions used by the
|
||||
* receiver to handle keys.
|
||||
*/
|
||||
- (NSPointerFunctions*) keyPointerFunctions;
|
||||
|
||||
/** Return an enumerator able to enumerate the values in the receiver.
|
||||
*/
|
||||
- (NSEnumerator*) objectEnumerator;
|
||||
|
||||
/** Return the object stored under the specified key.
|
||||
*/
|
||||
- (id) objectForKey: (id)aKey;
|
||||
|
||||
/** Empty the receiver of all stored values.
|
||||
*/
|
||||
- (void) removeAllObjects;
|
||||
|
||||
/** Remove the object stored under the specified key.
|
||||
*/
|
||||
- (void) removeObjectForKey: (id)aKey;
|
||||
|
||||
/** Store the object under the specified key, replacing any object which
|
||||
* was previously stored under that key.
|
||||
*/
|
||||
- (void) setObject: (id)anObject forKey: (id)aKey;
|
||||
|
||||
/** Return an NSPointerFunctions value describind the functions used by the
|
||||
* receiver to handle values.
|
||||
*/
|
||||
- (NSPointerFunctions*) valuePointerFunctions;
|
||||
@end
|
||||
typedef void *NSMapTable;
|
||||
|
||||
/**
|
||||
* Type for enumerating.<br />
|
||||
|
@ -159,7 +63,7 @@ typedef struct _NSMapTableKeyCallBacks
|
|||
* NOTE: Elements with equal values must
|
||||
* have equal hash function values.
|
||||
*/
|
||||
NSUInteger (*hash)(NSMapTable *, const void *);
|
||||
unsigned (*hash)(NSMapTable *, const void *);
|
||||
|
||||
/**
|
||||
* Comparison function. Must not modify either key.
|
||||
|
@ -242,12 +146,12 @@ GS_EXPORT const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks;
|
|||
GS_EXPORT NSMapTable *
|
||||
NSCreateMapTable(NSMapTableKeyCallBacks keyCallBacks,
|
||||
NSMapTableValueCallBacks valueCallBacks,
|
||||
NSUInteger capacity);
|
||||
unsigned int capacity);
|
||||
|
||||
GS_EXPORT NSMapTable *
|
||||
NSCreateMapTableWithZone(NSMapTableKeyCallBacks keyCallBacks,
|
||||
NSMapTableValueCallBacks valueCallBacks,
|
||||
NSUInteger capacity,
|
||||
unsigned int capacity,
|
||||
NSZone *zone);
|
||||
|
||||
GS_EXPORT NSMapTable *
|
||||
|
@ -262,7 +166,7 @@ NSResetMapTable(NSMapTable *table);
|
|||
GS_EXPORT BOOL
|
||||
NSCompareMapTables(NSMapTable *table1, NSMapTable *table2);
|
||||
|
||||
GS_EXPORT NSUInteger
|
||||
GS_EXPORT unsigned int
|
||||
NSCountMapTable(NSMapTable *table);
|
||||
|
||||
GS_EXPORT BOOL
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -34,6 +34,44 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_MACOSX)
|
||||
/**
|
||||
* <p>Info about layout of arguments.
|
||||
* Extended from the original OpenStep version to let us know if the
|
||||
* arg is passed in registers or on the stack.</p>
|
||||
*
|
||||
* <p>NB. This no longer exists in Rhapsody/MacOS.</p>
|
||||
<example>
|
||||
typedef struct {
|
||||
int offset;
|
||||
unsigned size;
|
||||
const char *type;
|
||||
unsigned align; // extension, available only in GNUSTEP
|
||||
unsigned qual; // extension, available only in GNUSTEP
|
||||
BOOL isReg; // extension, available only in GNUSTEP
|
||||
} NSArgumentInfo;
|
||||
</example>
|
||||
* <p>NB. The offset and register information may not always be reliable.
|
||||
* In the past it was dependent on locally maintained platform dependent
|
||||
* information. In the future it may depend on layout information
|
||||
* supplied by the compiler.</p>
|
||||
*/
|
||||
typedef struct {
|
||||
int offset;
|
||||
unsigned size;
|
||||
const char *type;
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
unsigned align;
|
||||
unsigned qual;
|
||||
BOOL isReg;
|
||||
#else
|
||||
unsigned _reserved1;
|
||||
unsigned _reserved2;
|
||||
BOOL _reserved3;
|
||||
#endif
|
||||
} NSArgumentInfo;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* <p>Class encapsulating type information for method arguments and return
|
||||
* value. It is used as a component of [NSInvocation] to implement message
|
||||
|
@ -42,18 +80,19 @@ extern "C" {
|
|||
* [NSObject-methodSignatureForSelector:].</p>
|
||||
*
|
||||
* <p>Basically, types are represented as Objective-C <code>@encode(...)</code>
|
||||
* compatible strings. The arguments are
|
||||
* compatible strings, together with size information. The arguments are
|
||||
* numbered starting from 0, including the implicit arguments
|
||||
* <code><em>self</em></code> (type <code>id</code>, at position 0) and
|
||||
* <code><em>_cmd</em></code> (type <code>SEL</code>, at position 1).</p>
|
||||
*/
|
||||
@interface NSMethodSignature : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSMethodSignature)
|
||||
@private
|
||||
const char *_methodTypes;
|
||||
NSUInteger _argFrameLength;
|
||||
NSUInteger _numArgs;
|
||||
unsigned _argFrameLength;
|
||||
unsigned _numArgs;
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_MACOSX)
|
||||
NSArgumentInfo *_info;
|
||||
#else
|
||||
void *_info;
|
||||
#endif
|
||||
}
|
||||
|
@ -64,20 +103,27 @@ extern "C" {
|
|||
*/
|
||||
+ (NSMethodSignature*) signatureWithObjCTypes: (const char*)t;
|
||||
|
||||
#if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX)
|
||||
/**
|
||||
* Returns full information on given argument. Indices start at 0. Provide
|
||||
* -1 to get info on return value.
|
||||
*/
|
||||
- (NSArgumentInfo) argumentInfoAtIndex: (unsigned)index;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of bytes that the full set of arguments occupies on the stack, which
|
||||
* is platform(hardware)-dependent.
|
||||
*/
|
||||
- (NSUInteger) frameLength;
|
||||
- (unsigned) frameLength;
|
||||
|
||||
/**
|
||||
* Returns Objective-C <code>@encode(...)</code> compatible string. Arguments
|
||||
* are numbered starting from 0, including the implicit arguments
|
||||
* <code><em>self</em></code> (type <code>id</code>, at position 0) and
|
||||
* <code><em>_cmd</em></code> (type <code>SEL</code>, at position 1).<br />
|
||||
* Type strings may include leading type qualifiers.
|
||||
* <code><em>_cmd</em></code> (type <code>SEL</code>, at position 1).
|
||||
*/
|
||||
- (const char*) getArgumentTypeAtIndex: (NSUInteger)index;
|
||||
- (const char*) getArgumentTypeAtIndex: (unsigned)index;
|
||||
|
||||
/**
|
||||
* Pertains to distributed objects; method is asynchronous when invoked and
|
||||
|
@ -89,12 +135,13 @@ extern "C" {
|
|||
* Number of bytes that the return value occupies on the stack, which is
|
||||
* platform(hardware)-dependent.
|
||||
*/
|
||||
- (NSUInteger) methodReturnLength;
|
||||
- (unsigned) methodReturnLength;
|
||||
|
||||
/**
|
||||
* Returns an Objective-C <code>@encode(...)</code> compatible string
|
||||
* describing the return type of the method. This may include type
|
||||
* qualifiers.
|
||||
* Returns Objective-C <code>@encode(...)</code> compatible string. Arguments
|
||||
* are numbered starting from 0, including the implicit arguments
|
||||
* <code><em>self</em></code> (type <code>id</code>, at position 0) and
|
||||
* <code><em>_cmd</em></code> (type <code>SEL</code>, at position 1).
|
||||
*/
|
||||
- (const char*) methodReturnType;
|
||||
|
||||
|
@ -102,10 +149,30 @@ extern "C" {
|
|||
* Returns number of arguments to method, including the implicit
|
||||
* <code><em>self</em></code> and <code><em>_cmd</em></code>.
|
||||
*/
|
||||
- (NSUInteger) numberOfArguments;
|
||||
- (unsigned) numberOfArguments;
|
||||
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
/**
|
||||
* Declares a convenience method for getting the entire array of raw type and
|
||||
* size information.
|
||||
*/
|
||||
@interface NSMethodSignature(GNUstep)
|
||||
/**
|
||||
* Convenience method for getting the entire array of raw type and size
|
||||
* information.
|
||||
*/
|
||||
- (NSArgumentInfo*) methodInfo;
|
||||
|
||||
/**
|
||||
* Returns a string containing all Objective-C
|
||||
* <code>@encode(...)</code> compatible type information.
|
||||
*/
|
||||
- (const char*) methodType;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -33,17 +33,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
NSNetServicesUnknownError = -72000L,
|
||||
NSNetServicesCollisionError = -72001L,
|
||||
NSNetServicesNotFoundError = -72002L,
|
||||
NSNetServicesActivityInProgress = -72003L,
|
||||
NSNetServicesBadArgumentError = -72004L,
|
||||
NSNetServicesCancelledError = -72005L,
|
||||
NSNetServicesInvalidError = -72006L,
|
||||
NSNetServicesTimeoutError = -72007L
|
||||
};
|
||||
/**
|
||||
* <list>
|
||||
* <item>
|
||||
|
@ -89,13 +80,15 @@ enum
|
|||
* </item>
|
||||
* </list>
|
||||
*/
|
||||
typedef NSUInteger NSNetServicesError;
|
||||
|
||||
enum {
|
||||
NSNetServiceNoAutoRename = 1 << 0
|
||||
};
|
||||
typedef NSUInteger NSNetServiceOptions;
|
||||
|
||||
NSNetServicesUnknownError = -72000L,
|
||||
NSNetServicesCollisionError = -72001L,
|
||||
NSNetServicesNotFoundError = -72002L,
|
||||
NSNetServicesActivityInProgress = -72003L,
|
||||
NSNetServicesBadArgumentError = -72004L,
|
||||
NSNetServicesCancelledError = -72005L,
|
||||
NSNetServicesInvalidError = -72006L,
|
||||
NSNetServicesTimeoutError = -72007L
|
||||
} NSNetServicesError;
|
||||
|
||||
GS_EXPORT NSString * const NSNetServicesErrorCode;
|
||||
GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
||||
|
@ -120,19 +113,16 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
* <p>
|
||||
* [NSNetService] lets you publish a network service in a domain using
|
||||
* multicast DNS. Additionally, it lets you resolve a network service that
|
||||
* was discovered by [NSNetServiceBrowser]. This class is an abstract
|
||||
* superclass for concrete implementations of its functionality.
|
||||
* was discovered by [NSNetServiceBrowser].
|
||||
* </p>
|
||||
*/
|
||||
|
||||
@interface NSNetService : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSNetService)
|
||||
@private
|
||||
id _delegate;
|
||||
void *_netService;
|
||||
void *_reserved;
|
||||
#endif
|
||||
void * _netService;
|
||||
id _delegate;
|
||||
void * _reserved;
|
||||
}
|
||||
|
||||
+ (NSData *) dataFromTXTRecordDictionary: (NSDictionary *) txtDictionary;
|
||||
|
@ -144,19 +134,13 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
- (id) initWithDomain: (NSString *) domain
|
||||
type: (NSString *) type
|
||||
name: (NSString *) name
|
||||
port: (NSInteger) port;
|
||||
port: (int) port;
|
||||
|
||||
- (void) removeFromRunLoop: (NSRunLoop *) aRunLoop
|
||||
forMode: (NSString *) mode;
|
||||
- (void) scheduleInRunLoop: (NSRunLoop *) aRunLoop
|
||||
forMode: (NSString *) mode;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
- (NSInteger)port;
|
||||
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options;
|
||||
#endif
|
||||
|
||||
- (void) publish;
|
||||
- (void) resolve;
|
||||
- (void) resolveWithTimeout: (NSTimeInterval) timeout;
|
||||
|
@ -207,19 +191,15 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
* <p>
|
||||
* Each [NSNetServiceBrowser] performs one search at a time. So in order
|
||||
* to perform multiple searches simultaneously, create multiple instances.
|
||||
* This class is an abstract superclass for concrete implementations of its
|
||||
* functionality.
|
||||
* </p>
|
||||
*/
|
||||
|
||||
@interface NSNetServiceBrowser : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSNetServiceBrowser)
|
||||
@private
|
||||
id _delegate;
|
||||
void *_netServiceBrowser;
|
||||
void *_reserved;
|
||||
#endif
|
||||
void * _netServiceBrowser;
|
||||
id _delegate;
|
||||
void * _reserved;
|
||||
}
|
||||
|
||||
- (id) init;
|
||||
|
@ -454,12 +434,5 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
|
||||
@end
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSNetServices+GNUstepBase.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NSNetServices_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -42,6 +42,8 @@ extern "C" {
|
|||
@class NSLock;
|
||||
|
||||
@interface NSNotification : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
}
|
||||
|
||||
/* Creating a Notification Object */
|
||||
+ (NSNotification*) notificationWithName: (NSString*)name
|
||||
|
@ -61,12 +63,9 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
@interface NSNotificationCenter : NSObject
|
||||
@interface NSNotificationCenter : NSObject <GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSNotificationCenter)
|
||||
@private
|
||||
void *_table;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSNotificationCenter*) defaultCenter;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -73,12 +73,11 @@ extern "C" {
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
enum {
|
||||
typedef enum {
|
||||
NSPostWhenIdle = 1,
|
||||
NSPostASAP = 2,
|
||||
NSPostNow = 3
|
||||
};
|
||||
typedef NSUInteger NSPostingStyle;
|
||||
} NSPostingStyle;
|
||||
|
||||
/**
|
||||
* Enumeration of possible ways to combine notifications when dealing with
|
||||
|
@ -91,12 +90,11 @@ typedef NSUInteger NSPostingStyle;
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
enum {
|
||||
typedef enum {
|
||||
NSNotificationNoCoalescing = 0,
|
||||
NSNotificationCoalescingOnName = 1,
|
||||
NSNotificationCoalescingOnSender = 2,
|
||||
};
|
||||
typedef NSUInteger NSNotificationCoalescing;
|
||||
} NSNotificationCoalescing;
|
||||
|
||||
/*
|
||||
* NSNotificationQueue class
|
||||
|
@ -109,13 +107,10 @@ struct _NSNotificationQueueList;
|
|||
|
||||
@interface NSNotificationQueue : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSNotificationQueue)
|
||||
@public
|
||||
NSNotificationCenter *_center;
|
||||
struct _NSNotificationQueueList *_asapQueue;
|
||||
struct _NSNotificationQueueList *_idleQueue;
|
||||
NSZone *_zone;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Creating Notification Queues */
|
||||
|
@ -126,14 +121,14 @@ struct _NSNotificationQueueList;
|
|||
/* Inserting and Removing Notifications From a Queue */
|
||||
|
||||
- (void) dequeueNotificationsMatching: (NSNotification*)notification
|
||||
coalesceMask: (NSUInteger)coalesceMask;
|
||||
coalesceMask: (unsigned int)coalesceMask;
|
||||
|
||||
- (void) enqueueNotification: (NSNotification*)notification
|
||||
postingStyle: (NSPostingStyle)postingStyle;
|
||||
|
||||
- (void) enqueueNotification: (NSNotification*)notification
|
||||
postingStyle: (NSPostingStyle)postingStyle
|
||||
coalesceMask: (NSUInteger)coalesceMask
|
||||
coalesceMask: (unsigned int)coalesceMask
|
||||
forModes: (NSArray*)modes;
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This file is part of the GNUstep Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -75,10 +75,8 @@ extern "C" {
|
|||
* of attributes for positive and negative numbers, and for specific cases
|
||||
* including 0, NaN, and nil... </p>
|
||||
*/
|
||||
@interface NSNumberFormatter : NSFormatter
|
||||
@interface NSNumberFormatter: NSFormatter
|
||||
{
|
||||
#if GS_EXPOSE(NSNumberFormatter)
|
||||
@private
|
||||
BOOL _hasThousandSeparators;
|
||||
BOOL _allowsFloats;
|
||||
BOOL _localizesFormat;
|
||||
|
@ -94,10 +92,6 @@ extern "C" {
|
|||
NSString *_positiveFormat;
|
||||
NSDictionary *_attributesForPositiveValues;
|
||||
NSDictionary *_attributesForNegativeValues;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Format
|
||||
|
@ -304,16 +298,6 @@ extern "C" {
|
|||
*/
|
||||
- (void) setMinimum: (NSDecimalNumber*)aMinimum;
|
||||
|
||||
/**
|
||||
* Returns the string version of this number based on the format
|
||||
* specified.
|
||||
*/
|
||||
- (NSString *) stringFromNumber: (NSNumber *)number;
|
||||
|
||||
/**
|
||||
* Returns the number for this string.
|
||||
*/
|
||||
- (NSNumber *) numberFromString: (NSString *)string;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -28,69 +28,20 @@
|
|||
|
||||
#ifndef __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
|
||||
/* These typedefs must be in place before GSObjCRuntime.h is imported.
|
||||
*/
|
||||
|
||||
#if !defined(NSINTEGER_DEFINED)
|
||||
typedef intptr_t NSInteger;
|
||||
typedef uintptr_t NSUInteger;
|
||||
#endif /* !defined(NSINTEGER_DEFINED) */
|
||||
|
||||
#if !defined(CGFLOAT_DEFINED)
|
||||
#if GS_SIZEOF_VOIDP == 8
|
||||
#define CGFLOAT_IS_DBL 1
|
||||
typedef double CGFloat;
|
||||
#else
|
||||
typedef float CGFloat;
|
||||
#endif
|
||||
#endif /* !defined(CGFLOAT_DEFINED) */
|
||||
|
||||
#define NSINTEGER_DEFINED 1
|
||||
#define CGFLOAT_DEFINED 1
|
||||
#import <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
/**
|
||||
* Specifies that the enumeration is concurrency-safe. Note that this does
|
||||
* not mean that it will be carried out in a concurrent manner, only that
|
||||
* it can be.
|
||||
*/
|
||||
NSEnumerationConcurrent = (1UL << 0),
|
||||
/**
|
||||
* Specifies that the enumeration should happen in the opposite of the
|
||||
* natural order of the collection.
|
||||
*/
|
||||
NSEnumerationReverse = (1UL << 1)
|
||||
};
|
||||
|
||||
/** Bitfield used to specify options to control enumeration over collections.
|
||||
*/
|
||||
typedef NSUInteger NSEnumerationOptions;
|
||||
|
||||
#import <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
GS_EXPORT NSString *NSStringFromProtocol(Protocol *aProtocol);
|
||||
GS_EXPORT Protocol *NSProtocolFromString(NSString *aProtocolName);
|
||||
#endif
|
||||
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
||||
GS_EXPORT NSString *NSStringFromSelector(SEL aSelector);
|
||||
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
||||
GS_EXPORT Class NSClassFromString(NSString *aClassName);
|
||||
GS_EXPORT NSString *NSStringFromClass(Class aClass);
|
||||
GS_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr,
|
||||
NSUInteger *sizep, NSUInteger *alignp);
|
||||
unsigned int *sizep, unsigned int *alignp);
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
/* Logging */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,27 +16,26 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
AutogsdocSource: NSObject.m
|
||||
AutogsdocSource: Additions/GSCategories.m
|
||||
*/
|
||||
|
||||
#ifndef __NSObject_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSObject_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <objc/objc.h>
|
||||
#import <GNUstepBase/preface.h>
|
||||
#include <GNUstepBase/GSConfig.h>
|
||||
#include <objc/objc.h>
|
||||
#include <objc/typedstream.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
||||
#ifndef GS_WITH_GC
|
||||
#define GS_WITH_GC 0
|
||||
#endif
|
||||
|
||||
#import <GNUstepBase/GNUstep.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -66,7 +65,7 @@ extern "C" {
|
|||
- (BOOL) isKindOfClass: (Class)aClass; /** See [NSObject-isKindOfClass:] */
|
||||
- (BOOL) isMemberOfClass: (Class)aClass;/** See [NSObject-isMemberOfClass:] */
|
||||
- (BOOL) isProxy; /** See [NSObject-isProxy] */
|
||||
- (NSUInteger) hash; /** See [NSObject-hash] */
|
||||
- (unsigned) hash; /** See [NSObject-hash] */
|
||||
- (id) self; /** See [NSObject-self] */
|
||||
- (id) performSelector: (SEL)aSelector; /** See [NSObject-performSelector:] */
|
||||
/** See [NSObject-performSelector:withObject:] */
|
||||
|
@ -83,7 +82,7 @@ extern "C" {
|
|||
- (id) retain; /** See [NSObject-retain] */
|
||||
- (id) autorelease /** See [NSObject-autorelease] */;
|
||||
- (oneway void) release; /** See [NSObject-release] */
|
||||
- (NSUInteger) retainCount; /** See [NSObject-retainCount] */
|
||||
- (unsigned) retainCount; /** See [NSObject-retainCount] */
|
||||
- (NSZone*) zone; /** See [NSObject-zone] */
|
||||
- (NSString*) description; /** See [NSObject-description] */
|
||||
@end
|
||||
|
@ -169,13 +168,10 @@ extern "C" {
|
|||
Class isa;
|
||||
}
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** On a system which performs garbage collection, you should implement
|
||||
* this method to execute code when the receiver is collected.<br />
|
||||
* You must not call this method yourself (except when a subclass
|
||||
* calls the superclass method within its own implementation).
|
||||
*/
|
||||
- (void) finalize;
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
#if GS_WITH_GC
|
||||
+ (BOOL) requiresTypedMemory;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
@ -186,52 +182,6 @@ extern "C" {
|
|||
+ (id) alloc;
|
||||
+ (Class) class;
|
||||
+ (NSString*) description;
|
||||
|
||||
/**
|
||||
* This method is automatically invoked on any class which implements it
|
||||
* when the class is loaded into the runtime.<br />
|
||||
* It is also invoked on any category where the method is implemented
|
||||
* when that category is loaded into the runtime.<br />
|
||||
* The +load method is called directly by the runtime and you should never
|
||||
* send a +load message to a class yourself.<br />
|
||||
* This method is called <em>before</em> the +initialize message is sent
|
||||
* to the class, so you cannot depend on class initialisation having been
|
||||
* performed, or upon other classes existing (apart from superclasses of
|
||||
* the receiver, since +load is called on superclasses before it is called
|
||||
* on their subclasses).<br />
|
||||
* As a gross generalisation, it is safe to use C code, including
|
||||
* most ObjectiveC runtime functions within +load, but attempting to send
|
||||
* messages to ObjectiveC objects is likely to fail.<br />
|
||||
* In GNUstep, this method is implemented for NSObject to perform some
|
||||
* initialisation for the base library.<br />
|
||||
* If you implement +load for a class, don't call [super load] in your
|
||||
* implementation.
|
||||
*/
|
||||
+ (void) load;
|
||||
|
||||
/**
|
||||
* This message is automatically sent to a class by the runtime. It is
|
||||
* sent once for each class, just before the class is used for the first
|
||||
* time (excluding any automatic call to +load by the runtime).<br />
|
||||
* The message is sent in a thread-safe manner ... other threads may not
|
||||
* call methods of the class until +initialize has finished executing.<br />
|
||||
* If the class has a superclass, its implementation of +initialize is
|
||||
* called first.<br />
|
||||
* If the class does not implement +initialize then the implementation
|
||||
* in the closest superclass may be called. This means that +initialize may
|
||||
* be called more than once, and the recommended way to handle this by
|
||||
* using the
|
||||
* <code>
|
||||
* if (self == [classname class])
|
||||
* </code>
|
||||
* conditional to check whether the method is being called for a subclass.<br />
|
||||
* You should never call +initialize yourself ... let the runtime do it.<br />
|
||||
* You can implement +initialize in your own class if you need to.
|
||||
* NSObject's implementation handles essential root object and base
|
||||
* library initialization.<br />
|
||||
* It should be safe to call [super initialize] in your implementation
|
||||
* of +initialize.
|
||||
*/
|
||||
+ (void) initialize;
|
||||
+ (IMP) instanceMethodForSelector: (SEL)aSelector;
|
||||
+ (NSMethodSignature*) instanceMethodSignatureForSelector: (SEL)aSelector;
|
||||
|
@ -239,9 +189,9 @@ extern "C" {
|
|||
+ (BOOL) isSubclassOfClass: (Class)aClass;
|
||||
+ (id) new;
|
||||
+ (void) poseAsClass: (Class)aClassObject;
|
||||
+ (id) setVersion: (NSInteger)aVersion;
|
||||
+ (id) setVersion: (int)aVersion;
|
||||
+ (Class) superclass;
|
||||
+ (NSInteger) version;
|
||||
+ (int) version;
|
||||
|
||||
- (id) autorelease;
|
||||
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder;
|
||||
|
@ -254,7 +204,7 @@ extern "C" {
|
|||
- (NSString*) description;
|
||||
- (void) doesNotRecognizeSelector: (SEL)aSelector;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (NSUInteger) hash;
|
||||
- (unsigned) hash;
|
||||
- (id) init;
|
||||
- (BOOL) isEqual: anObject;
|
||||
- (BOOL) isKindOfClass: (Class)aClass;
|
||||
|
@ -274,65 +224,10 @@ extern "C" {
|
|||
- (id) replacementObjectForCoder: (NSCoder*)anEncoder;
|
||||
- (BOOL) respondsToSelector: (SEL)aSelector;
|
||||
- (id) retain;
|
||||
- (NSUInteger) retainCount;
|
||||
- (unsigned) retainCount;
|
||||
- (id) self;
|
||||
- (Class) superclass;
|
||||
- (NSZone*) zone;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/**
|
||||
* This method will be called when attempting to send a message a class that
|
||||
* does not understand it. The class may install a new method for the given
|
||||
* selector and return YES, otherwise it should return NO.
|
||||
*
|
||||
* Note: This method is only reliable when using the GNUstep runtime. If you
|
||||
* require compatibility with the GCC runtime, you must also implement
|
||||
* -forwardInvocation: with equivalent semantics. This will be considerably
|
||||
* slower, but more portable.
|
||||
*/
|
||||
+ (BOOL) resolveClassMethod: (SEL)name;
|
||||
|
||||
/**
|
||||
* This method will be called when attempting to send a message an instance
|
||||
* that does not understand it. The class may install a new method for the
|
||||
* given selector and return YES, otherwise it should return NO.
|
||||
*
|
||||
* Note: This method is only reliable when using the GNUstep runtime. If you
|
||||
* require compatibility with the GCC runtime, you must also implement
|
||||
* -forwardInvocation: with equivalent semantics. This will be considerably
|
||||
* slower, but more portable.
|
||||
*/
|
||||
+ (BOOL) resolveInstanceMethod: (SEL)name;
|
||||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/**
|
||||
* Returns an auto-accessing proxy for the given object. This proxy sends a
|
||||
* -beginContentAccess message to the receiver when it is created and an
|
||||
* -endContentAccess message when it is destroyed. This prevents an object
|
||||
* that implements the NSDiscardableContent protocol from having its contents
|
||||
* discarded for as long as the proxy exists.
|
||||
*
|
||||
* On systems using the GNUstep runtime, messages send to the proxy will be
|
||||
* slightly slower than direct messages. With the GCC runtime, they will be
|
||||
* approximately two orders of magnitude slower. The GNUstep runtime,
|
||||
* therefore, is strongly recommended for code calling this method.
|
||||
*/
|
||||
- (id) autoContentAccessingProxy;
|
||||
|
||||
/**
|
||||
* If an object does not understand a message, it may delegate it to another
|
||||
* object. Returning nil indicates that forwarding should not take place. The
|
||||
* default implementation of this returns nil, but care should be taken when
|
||||
* subclassing NSObject subclasses and overriding this method that
|
||||
* the superclass implementation is called if returning nil.
|
||||
*
|
||||
* Note: This method is only reliable when using the GNUstep runtime and code
|
||||
* compiled with clang. If you require compatibility with GCC and the GCC
|
||||
* runtime, you must also implement -forwardInvocation: with equivalent
|
||||
* semantics. This will be considerably slower, but more portable.
|
||||
*/
|
||||
- (id) forwardingTargetForSelector: (SEL)aSelector;
|
||||
|
||||
#endif
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -342,15 +237,15 @@ extern "C" {
|
|||
* instance variables of the object.<br />
|
||||
* This function is used by the [NSObject+allocWithZone:] method.
|
||||
*/
|
||||
GS_EXPORT id
|
||||
NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
|
||||
GS_EXPORT NSObject *
|
||||
NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
|
||||
|
||||
/**
|
||||
* Used to release the memory used by an object.<br />
|
||||
* This function is used by the [NSObject-dealloc] method.
|
||||
*/
|
||||
GS_EXPORT void
|
||||
NSDeallocateObject(id anObject);
|
||||
NSDeallocateObject(NSObject *anObject);
|
||||
|
||||
/**
|
||||
* Used to copy anObject. This makes a bitwise copy of anObject to
|
||||
|
@ -361,7 +256,7 @@ NSDeallocateObject(id anObject);
|
|||
* [(NSCopying)-copyWithZone:] method.
|
||||
*/
|
||||
GS_EXPORT NSObject *
|
||||
NSCopyObject(NSObject *anObject, NSUInteger extraBytes, NSZone *zone);
|
||||
NSCopyObject(NSObject *anObject, unsigned extraBytes, NSZone *zone);
|
||||
|
||||
/**
|
||||
* Returns a flag to indicate whether anObject should be retained or
|
||||
|
@ -375,7 +270,7 @@ NSShouldRetainWithZone(NSObject *anObject, NSZone *requestedZone);
|
|||
GS_EXPORT BOOL
|
||||
NSDecrementExtraRefCountWasZero(id anObject);
|
||||
|
||||
GS_EXPORT NSUInteger
|
||||
GS_EXPORT unsigned
|
||||
NSExtraRefCount(id anObject);
|
||||
|
||||
GS_EXPORT void
|
||||
|
@ -396,25 +291,86 @@ enum {NSNotFound = 0x7fffffff};
|
|||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
|
||||
/** Global lock to be used by classes when operating on any global
|
||||
data that invoke other methods which also access global; thus,
|
||||
creating the potential for deadlock. */
|
||||
GS_EXPORT NSRecursiveLock *gnustep_global_lock;
|
||||
|
||||
@interface NSObject (NEXTSTEP)
|
||||
- error:(const char *)aString, ...;
|
||||
/* - (const char *) name;
|
||||
Removed because OpenStep has -(NSString*)name; */
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE, 011700)
|
||||
/** Global lock to be used by classes when operating on any global
|
||||
data that invoke other methods which also access global; thus,
|
||||
creating the potential for deadlock. */
|
||||
GS_EXPORT NSRecursiveLock *gnustep_global_lock;
|
||||
|
||||
@interface NSObject (GNUstep)
|
||||
- (BOOL) isInstance;
|
||||
- (id) makeImmutableCopyOnFail: (BOOL)force;
|
||||
- (Class) transmuteClassTo: (Class)aClassObject;
|
||||
+ (Class) autoreleaseClass;
|
||||
+ (void) setAutoreleaseClass: (Class)aClass;
|
||||
+ (void) enableDoubleReleaseCheck: (BOOL)enable;
|
||||
- (id) read: (TypedStream*)aStream;
|
||||
- (id) write: (TypedStream*)aStream;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Provides a number of GNUstep-specific methods that are used to aid
|
||||
* implementation of the Base library.
|
||||
*/
|
||||
@interface NSObject (GSCategories)
|
||||
|
||||
/**
|
||||
* Message sent when an implementation wants to explicitly exclude a method
|
||||
* (but cannot due to compiler constraint), and wants to make sure it is not
|
||||
* called by mistake. Default implementation raises an exception at runtime.
|
||||
*/
|
||||
- notImplemented:(SEL)aSel;
|
||||
|
||||
/**
|
||||
* Message sent when an implementation wants to explicitly require a subclass
|
||||
* to implement a method (but cannot at compile time since there is no
|
||||
* <code>abstract</code> keyword in Objective-C). Default implementation
|
||||
* raises an exception at runtime to alert developer that he/she forgot to
|
||||
* override a method.
|
||||
*/
|
||||
- (id) subclassResponsibility: (SEL)aSel;
|
||||
|
||||
/**
|
||||
* Message sent when an implementation wants to explicitly exclude a method
|
||||
* (but cannot due to compiler constraint) and forbid that subclasses
|
||||
* implement it. Default implementation raises an exception at runtime. If a
|
||||
* subclass <em>does</em> implement this method, however, the superclass's
|
||||
* implementation will not be called, so this is not a perfect mechanism.
|
||||
*/
|
||||
- (id) shouldNotImplement: (SEL)aSel;
|
||||
|
||||
/**
|
||||
WARNING: The -compare: method for NSObject is deprecated
|
||||
due to subclasses declaring the same selector with
|
||||
conflicting signatures.
|
||||
Comparison of arbitrary objects is not just meaningless
|
||||
but also dangerous as most concrete implementations
|
||||
expect comparable objects as arguments often accessing
|
||||
instance variables directly.
|
||||
This method will be removed in a future release.
|
||||
*/
|
||||
- (NSComparisonResult) compare: (id)anObject;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Protocol for garbage collection finalization - same as libFoundation
|
||||
* for compatibility.
|
||||
*/
|
||||
@protocol GCFinalization
|
||||
/**
|
||||
* Called before receiver is deallocated by garbage collector. If you want
|
||||
* to do anything special before [NSObject -dealloc] is called, do it here.
|
||||
*/
|
||||
- (void) gcFinalize;
|
||||
@end
|
||||
|
||||
#import <Foundation/NSDate.h>
|
||||
/**
|
||||
* Declares some methods for sending messages to self after a fixed delay.
|
||||
|
@ -456,48 +412,192 @@ GS_EXPORT NSRecursiveLock *gnustep_global_lock;
|
|||
inModes: (NSArray*)modes;
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/**
|
||||
* The NSDiscardableContent protocol is used by objects which encapsulate data
|
||||
* which may be discarded if resource constraints are exceeded. These
|
||||
* constraints are typically, but not always, related memory.
|
||||
/*
|
||||
* RETAIN(), RELEASE(), and AUTORELEASE() are placeholders for the
|
||||
* future day when we have garbage collecting.
|
||||
*/
|
||||
@protocol NSDiscardableContent
|
||||
|
||||
/**
|
||||
* This method is called before any access to the object. It returns YES if
|
||||
* the object's content is still valid. The caller must call -endContentAccess
|
||||
* once for every call to -beginContentAccess;
|
||||
*/
|
||||
- (BOOL) beginContentAccess;
|
||||
|
||||
/**
|
||||
* Discards the contents of the object if it is not currently being edited.
|
||||
*/
|
||||
- (void) discardContentIfPossible;
|
||||
|
||||
/**
|
||||
* This method indicates that the caller has finished accessing the contents of
|
||||
* the object adopting this protocol. Every call to -beginContentAccess must
|
||||
* be be paired with a call to this method after the caller has finished
|
||||
* accessing the contents.
|
||||
*/
|
||||
- (void) endContentAccess;
|
||||
|
||||
/**
|
||||
* Returns YES if the contents of the object have been discarded, either via a
|
||||
* call to -discardContentIfPossible while the object is not in use, or by some
|
||||
* implementation dependent mechanism.
|
||||
*/
|
||||
- (BOOL) isContentDiscarded;
|
||||
@end
|
||||
#ifndef GS_WITH_GC
|
||||
#define GS_WITH_GC 0
|
||||
#endif
|
||||
#if GS_WITH_GC
|
||||
|
||||
#ifndef RETAIN
|
||||
#define RETAIN(object) ((id)object)
|
||||
#endif
|
||||
#ifndef RELEASE
|
||||
#define RELEASE(object)
|
||||
#endif
|
||||
#ifndef AUTORELEASE
|
||||
#define AUTORELEASE(object) ((id)object)
|
||||
#endif
|
||||
|
||||
#ifndef TEST_RETAIN
|
||||
#define TEST_RETAIN(object) ((id)object)
|
||||
#endif
|
||||
#ifndef TEST_RELEASE
|
||||
#define TEST_RELEASE(object)
|
||||
#endif
|
||||
#ifndef TEST_AUTORELEASE
|
||||
#define TEST_AUTORELEASE(object) ((id)object)
|
||||
#endif
|
||||
|
||||
#ifndef ASSIGN
|
||||
#define ASSIGN(object,value) (object = value)
|
||||
#endif
|
||||
#ifndef ASSIGNCOPY
|
||||
#define ASSIGNCOPY(object,value) (object = [value copy])
|
||||
#endif
|
||||
#ifndef DESTROY
|
||||
#define DESTROY(object) (object = nil)
|
||||
#endif
|
||||
|
||||
#ifndef CREATE_AUTORELEASE_POOL
|
||||
#define CREATE_AUTORELEASE_POOL(X)
|
||||
#endif
|
||||
|
||||
#ifndef RECREATE_AUTORELEASE_POOL
|
||||
#define RECREATE_AUTORELEASE_POOL(X)
|
||||
#endif
|
||||
|
||||
#define IF_NO_GC(X)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef RETAIN
|
||||
/**
|
||||
* Basic retain operation ... calls [NSObject-retain]
|
||||
*/
|
||||
#define RETAIN(object) [object retain]
|
||||
#endif
|
||||
|
||||
#ifndef RELEASE
|
||||
/**
|
||||
* Basic release operation ... calls [NSObject-release]
|
||||
*/
|
||||
#define RELEASE(object) [object release]
|
||||
#endif
|
||||
|
||||
#ifndef AUTORELEASE
|
||||
/**
|
||||
* Basic autorelease operation ... calls [NSObject-autorelease]
|
||||
*/
|
||||
#define AUTORELEASE(object) [object autorelease]
|
||||
#endif
|
||||
|
||||
#ifndef TEST_RETAIN
|
||||
/**
|
||||
* Tested retain - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
*/
|
||||
#define TEST_RETAIN(object) ({\
|
||||
id __object = (id)(object); (__object != nil) ? [__object retain] : nil; })
|
||||
#endif
|
||||
#ifndef TEST_RELEASE
|
||||
/**
|
||||
* Tested release - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
*/
|
||||
#define TEST_RELEASE(object) ({\
|
||||
id __object = (id)(object); if (__object != nil) [__object release]; })
|
||||
#endif
|
||||
#ifndef TEST_AUTORELEASE
|
||||
/**
|
||||
* Tested autorelease - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
*/
|
||||
#define TEST_AUTORELEASE(object) ({\
|
||||
id __object = (id)(object); (__object != nil) ? [__object autorelease] : nil; })
|
||||
#endif
|
||||
|
||||
#ifndef ASSIGN
|
||||
/**
|
||||
* ASSIGN(object,value) assigns the value to the object with
|
||||
* appropriate retain and release operations.
|
||||
*/
|
||||
#define ASSIGN(object,value) ({\
|
||||
id __value = (id)(value); \
|
||||
id __object = (id)(object); \
|
||||
if (__value != __object) \
|
||||
{ \
|
||||
if (__value != nil) \
|
||||
{ \
|
||||
[__value retain]; \
|
||||
} \
|
||||
object = __value; \
|
||||
if (__object != nil) \
|
||||
{ \
|
||||
[__object release]; \
|
||||
} \
|
||||
} \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef ASSIGNCOPY
|
||||
/**
|
||||
* ASSIGNCOPY(object,value) assigns a copy of the value to the object
|
||||
* with release of the original.
|
||||
*/
|
||||
#define ASSIGNCOPY(object,value) ({\
|
||||
id __value = (id)(value); \
|
||||
id __object = (id)(object); \
|
||||
if (__value != __object) \
|
||||
{ \
|
||||
if (__value != nil) \
|
||||
{ \
|
||||
__value = [__value copy]; \
|
||||
} \
|
||||
object = __value; \
|
||||
if (__object != nil) \
|
||||
{ \
|
||||
[__object release]; \
|
||||
} \
|
||||
} \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef DESTROY
|
||||
/**
|
||||
* DESTROY() is a release operation which also sets the variable to be
|
||||
* a nil pointer for tidiness - we can't accidentally use a DESTROYED
|
||||
* object later. It also makes sure to set the variable to nil before
|
||||
* releasing the object - to avoid side-effects of the release trying
|
||||
* to reference the object being released through the variable.
|
||||
*/
|
||||
#define DESTROY(object) ({ \
|
||||
if (object) \
|
||||
{ \
|
||||
id __o = object; \
|
||||
object = nil; \
|
||||
[__o release]; \
|
||||
} \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef CREATE_AUTORELEASE_POOL
|
||||
/**
|
||||
* Declares an autorelease pool variable and creates and initialises
|
||||
* an autorelease pool object.
|
||||
*/
|
||||
#define CREATE_AUTORELEASE_POOL(X) \
|
||||
NSAutoreleasePool *(X) = [NSAutoreleasePool new]
|
||||
#endif
|
||||
|
||||
#ifndef RECREATE_AUTORELEASE_POOL
|
||||
/**
|
||||
* Similar, but allows reuse of variables. Be sure to use DESTROY()
|
||||
* so the object variable stays nil.
|
||||
*/
|
||||
#define RECREATE_AUTORELEASE_POOL(X) \
|
||||
if (X == nil) \
|
||||
(X) = [NSAutoreleasePool new]
|
||||
#endif
|
||||
|
||||
#define IF_NO_GC(X) X
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSObject_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -1,286 +0,0 @@
|
|||
/**Interface for NSOperation for GNUStep
|
||||
Copyright (C) 2009,2010 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Gregory Casamento <greg.casamento@gmail.com>
|
||||
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Date: 2009,2010
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __NSOperation_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSOperation_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSMutableArray;
|
||||
|
||||
enum {
|
||||
NSOperationQueuePriorityVeryLow = -8,
|
||||
NSOperationQueuePriorityLow = -4,
|
||||
NSOperationQueuePriorityNormal = 0,
|
||||
NSOperationQueuePriorityHigh = 4,
|
||||
NSOperationQueuePriorityVeryHigh = 8
|
||||
};
|
||||
|
||||
typedef NSInteger NSOperationQueuePriority;
|
||||
|
||||
@interface NSOperation : NSObject
|
||||
{
|
||||
#if GS_NONFRAGILE
|
||||
# if defined(GS_NSOperation_IVARS)
|
||||
@public GS_NSOperation_IVARS
|
||||
# endif
|
||||
#else
|
||||
@private id _internal;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Adds a dependency to the receiver.<br />
|
||||
* The receiver is not considered ready to execute until all of its
|
||||
* dependencies have finished executing.<br />
|
||||
* You must not add a particular object to the receiver more than once.<br />
|
||||
* You must not create loops of dependencies (this would cause deadlock).<br />
|
||||
*/
|
||||
- (void) addDependency: (NSOperation *)op;
|
||||
|
||||
/** Marks the operation as cancelled (causes subsequent calls to the
|
||||
* -isCancelled method to return YES).<br />
|
||||
* This does not directly cause the receiver to stop executing ... it is the
|
||||
* responsibility of the receiver to call -isCancelled while executing and
|
||||
* act accordingly.<br />
|
||||
* If an operation in a queue is cancelled before it starts executing, it
|
||||
* will be removed from the queue (though not necessarily immediately).<br />
|
||||
* Calling this method on an object which has already finished executing
|
||||
* has no effect.
|
||||
*/
|
||||
- (void) cancel;
|
||||
|
||||
/** Returns all the dependencies of the receiver in the order in which they
|
||||
* were added.
|
||||
*/
|
||||
- (NSArray *)dependencies;
|
||||
|
||||
/** This method should return YES if the -cancel method has been called.<br />
|
||||
* NB. a cancelled operation may still be executing.
|
||||
*/
|
||||
- (BOOL) isCancelled;
|
||||
|
||||
/** This method returns YES if the receiver handles its own environment or
|
||||
* threading rather than expecting to run in an evironment set up elsewhere
|
||||
* (eg, by an [NSOperationQueue] instance).<br />
|
||||
* The default implementation returns NO.
|
||||
*/
|
||||
- (BOOL) isConcurrent;
|
||||
|
||||
/** This method should return YES if the receiver is currently executing its
|
||||
* -main method (even if -cancel has been called).
|
||||
*/
|
||||
- (BOOL) isExecuting;
|
||||
|
||||
/** This method should return YES if the receiver has finished executing its
|
||||
* -main method (irrespective of whether the execution completed due to
|
||||
* cancellation, failure, or success).
|
||||
*/
|
||||
- (BOOL) isFinished;
|
||||
|
||||
/** This method should return YES when the receiver is ready to begin
|
||||
* executing. That is, the receiver must have no dependencies which
|
||||
* have not finished executing.<br />
|
||||
* Also returns YES if the operation has been cancelled (even if there
|
||||
* are unfinished dependencies).<br />
|
||||
* An executing or finished operation is also considered to be ready.
|
||||
*/
|
||||
- (BOOL) isReady;
|
||||
|
||||
/** <override-subclass/>
|
||||
* This is the method which actually performs the operation ...
|
||||
* the default implementation does nothing.<br />
|
||||
* You MUST ensure that your implemention of -main does not raise any
|
||||
* exception or call [NSThread-exit] as either of these will terminate
|
||||
* the operation prematurely resulting in the operation never reaching
|
||||
* the -isFinished state.<br />
|
||||
* If you are writing a concurrent subclass, you should override -start
|
||||
* instead of (or as well as) the -main method.
|
||||
*/
|
||||
- (void) main;
|
||||
|
||||
/** Returns the priority set using the -setQueuePriority method, or
|
||||
* NSOperationQueuePriorityNormal if no priority has been set.
|
||||
*/
|
||||
- (NSOperationQueuePriority) queuePriority;
|
||||
|
||||
/** Removes a dependency from the receiver.
|
||||
*/
|
||||
- (void) removeDependency: (NSOperation *)op;
|
||||
|
||||
/** Sets the priority for the receiver. If the value supplied is not one of
|
||||
* the predefined queue priorities, it is converted into the next available
|
||||
* defined value moving towards NSOperationQueuePriorityNormal.
|
||||
*/
|
||||
- (void) setQueuePriority: (NSOperationQueuePriority)priority;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** Sets the thread priority to be used while executing then -main method.
|
||||
* The priority change is implemented in the -start method, so if you are
|
||||
* replacing -start you are responsible for managing this.<br />
|
||||
* The valid range is 0.0 to 1.0
|
||||
*/
|
||||
- (void) setThreadPriority: (double)prio;
|
||||
#endif
|
||||
|
||||
/** This method is called to start execution of the receiver.<br />
|
||||
* <p>For concurrent operations, the subclass must override this method
|
||||
* to set up the environment for the operation to execute, must execute the
|
||||
* -main method, must ensure that -isExecuting and -isFinished return the
|
||||
* correct values, and must manually call key-value-observing methods to
|
||||
* notify observers of the state of those two properties.<br />
|
||||
* The subclass implementation must NOT call the superclass implementation.
|
||||
* </p>
|
||||
* <p>For non-concurrent operations, the default implementation of this method
|
||||
* performs all the work of setting up environment etc, and the subclass only
|
||||
* needs to override the -main method.
|
||||
* </p>
|
||||
*/
|
||||
- (void) start;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** Returns the thread priority to be used executing the -main method.
|
||||
* The default is 0.5
|
||||
*/
|
||||
- (double) threadPriority;
|
||||
|
||||
/** This method blocks the current thread until the receiver finishes.<br />
|
||||
* Care must be taken to avoid deadlock ... you must not call this method
|
||||
* from the same thread that the receiver started in.
|
||||
*/
|
||||
- (void) waitUntilFinished;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
* NSOperationQueue
|
||||
*/
|
||||
|
||||
// Enumerated type for default operation count.
|
||||
enum {
|
||||
NSOperationQueueDefaultMaxConcurrentOperationCount = -1
|
||||
};
|
||||
|
||||
@interface NSOperationQueue : NSObject
|
||||
{
|
||||
#if GS_NONFRAGILE
|
||||
# if defined(GS_NSOperationQueue_IVARS)
|
||||
@public GS_NSOperationQueue_IVARS
|
||||
# endif
|
||||
#else
|
||||
@private id _internal;
|
||||
#endif
|
||||
}
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** If called from within the -main method of an operation which is
|
||||
* currently being executed by a queue, this returns the queue instance
|
||||
* in use.
|
||||
*/
|
||||
+ (id) currentQueue;
|
||||
|
||||
/** Returns the default queue on the main thread.
|
||||
*/
|
||||
+ (id) mainQueue;
|
||||
#endif
|
||||
|
||||
/** Adds an operation to the receiver.
|
||||
*/
|
||||
- (void) addOperation: (NSOperation *)op;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** Adds multiple operations to the receiver and (optionally) waits for
|
||||
* all the operations in the queue to finish.
|
||||
*/
|
||||
- (void) addOperations: (NSArray *)ops
|
||||
waitUntilFinished: (BOOL)shouldWait;
|
||||
#endif
|
||||
|
||||
/** Cancels all outstanding operations in the queue.
|
||||
*/
|
||||
- (void) cancelAllOperations;
|
||||
|
||||
/** Returns a flag indicating whether the queue is currently suspended.
|
||||
*/
|
||||
- (BOOL) isSuspended;
|
||||
|
||||
/** Returns the value set using the -setMaxConcurrentOperationCount:
|
||||
* method, or NSOperationQueueDefaultMaxConcurrentOperationCount if
|
||||
* none has been set.<br />
|
||||
*/
|
||||
- (NSInteger) maxConcurrentOperationCount;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** Return the name of this operation queue.
|
||||
*/
|
||||
- (NSString*) name;
|
||||
|
||||
/** Return the number of operations in the queue at an instant.
|
||||
*/
|
||||
- (NSUInteger) operationCount;
|
||||
#endif
|
||||
|
||||
/** Returns all the operations in the queue at an instant.
|
||||
*/
|
||||
- (NSArray *) operations;
|
||||
|
||||
/** Sets the number of concurrent operations permitted.<br />
|
||||
* The default (NSOperationQueueDefaultMaxConcurrentOperationCount)
|
||||
* means that the queue should decide how many it does based on
|
||||
* system load etc.
|
||||
*/
|
||||
- (void) setMaxConcurrentOperationCount: (NSInteger)cnt;
|
||||
|
||||
#if OS_API_VERSION(100600, GS_API_LATEST)
|
||||
/** Sets the name for this operation queue.
|
||||
*/
|
||||
- (void) setName: (NSString*)s;
|
||||
#endif
|
||||
|
||||
/** Marks the receiver as suspended ... while suspended an operation queue
|
||||
* will not start any more operations.
|
||||
*/
|
||||
- (void) setSuspended: (BOOL)flag;
|
||||
|
||||
/** Waits until all operations in the queue have finished (or been cancelled
|
||||
* and removed from the queue).
|
||||
*/
|
||||
- (void) waitUntilAllOperationsAreFinished;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __NSOperation_h_GNUSTEP_BASE_INCLUDE */
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -27,7 +27,8 @@
|
|||
#ifndef __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
|
||||
#import <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -106,45 +107,6 @@ GS_EXPORT NSString *NSHomeDirectory(void);
|
|||
GS_EXPORT NSString *NSHomeDirectoryForUser(NSString *loginName);
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
enum
|
||||
{
|
||||
NSApplicationDirectory = 1, /** Applications */
|
||||
NSDemoApplicationDirectory, /** Demos */
|
||||
NSDeveloperApplicationDirectory, /** Developer/Applications */
|
||||
NSAdminApplicationDirectory, /** Administration */
|
||||
NSLibraryDirectory, /** Library */
|
||||
NSDeveloperDirectory, /** Developer */
|
||||
NSUserDirectory, /** user home directories */
|
||||
NSDocumentationDirectory, /** Documentation */
|
||||
#if OS_API_VERSION(100200, GS_API_LATEST)
|
||||
NSDocumentDirectory, /** Documents */
|
||||
#endif
|
||||
#if OS_API_VERSION(100300, GS_API_LATEST)
|
||||
NSCoreServicesDirectory, /** CoreServices */
|
||||
#endif
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
NSDesktopDirectory = 12, /** location of users desktop */
|
||||
NSCachesDirectory = 13, /** location of users cache files */
|
||||
NSApplicationSupportDirectory = 14, /** location of app support files */
|
||||
#endif
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
NSDownloadsDirectory = 15, /** location of downloaded files */
|
||||
#endif
|
||||
|
||||
NSAllApplicationsDirectory = 100, /** all app directories */
|
||||
NSAllLibrariesDirectory = 101, /** all library resources */
|
||||
|
||||
#define GSApplicationSupportDirectory NSApplicationSupportDirectory
|
||||
/* GNUstep Directory Identifiers
|
||||
* Start at 1000, we hope Apple will never overlap.
|
||||
*/
|
||||
GSLibrariesDirectory = 1000, /** libraries (binary code) */
|
||||
GSToolsDirectory, /** non-gui programs */
|
||||
GSFontsDirectory, /** font storage */
|
||||
GSFrameworksDirectory, /** frameworks */
|
||||
GSWebApplicationsDirectory, /** web applications (GSWeb or SOPE) */
|
||||
GSAdminToolsDirectory /** admin non-gui programs */
|
||||
};
|
||||
/**
|
||||
* Enumeration of possible requested directory type specifiers for
|
||||
* NSSearchPathForDirectoriesInDomains() function. On a traditional
|
||||
|
@ -178,22 +140,56 @@ enum
|
|||
}
|
||||
</example>
|
||||
*/
|
||||
typedef NSUInteger NSSearchPathDirectory;
|
||||
typedef enum
|
||||
{
|
||||
NSApplicationDirectory = 1, /** Applications */
|
||||
NSDemoApplicationDirectory, /** Demos */
|
||||
NSDeveloperApplicationDirectory, /** Developer/Applications */
|
||||
NSAdminApplicationDirectory, /** Administration */
|
||||
NSLibraryDirectory, /** Library */
|
||||
NSDeveloperDirectory, /** Developer */
|
||||
NSUserDirectory, /** user home directories */
|
||||
NSDocumentationDirectory, /** Documentation */
|
||||
#if OS_API_VERSION(100200, GS_API_LATEST)
|
||||
NSDocumentDirectory, /** Documents */
|
||||
#endif
|
||||
#if OS_API_VERSION(100300, GS_API_LATEST)
|
||||
NSCoreServicesDirectory, /** CoreServices */
|
||||
#endif
|
||||
#if OS_API_VERSION(100400, GS_API_LATEST)
|
||||
NSDesktopDirectory = 12, /** location of users desktop */
|
||||
NSCachesDirectory = 13, /** location of users cache files */
|
||||
NSApplicationSupportDirectory = 14, /** location of app support files */
|
||||
#endif
|
||||
|
||||
enum
|
||||
NSAllApplicationsDirectory = 100, /** all app directories */
|
||||
NSAllLibrariesDirectory = 101, /** all library resources */
|
||||
|
||||
#define GSApplicationSupportDirectory NSApplicationSupportDirectory
|
||||
/* GNUstep Directory Identifiers
|
||||
* Start at 1000, we hope Apple will never overlap.
|
||||
*/
|
||||
GSLibrariesDirectory = 1000, /** libraries (binary code) */
|
||||
GSToolsDirectory, /** non-gui programs */
|
||||
GSFontsDirectory, /** font storage */
|
||||
GSFrameworksDirectory, /** frameworks */
|
||||
GSWebApplicationsDirectory, /** web applications (GSWeb or SOPE) */
|
||||
GSAdminToolsDirectory /** admin non-gui programs */
|
||||
} NSSearchPathDirectory;
|
||||
|
||||
/**
|
||||
* Mask type for NSSearchPathForDirectoriesInDomains() function. A bitwise OR
|
||||
* of one or more of <code>NSUserDomainMask, NSLocalDomainMask,
|
||||
* NSNetworkDomainMask, NSSystemDomainMask, NSAllDomainsMask</code>.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
NSUserDomainMask = 1, /** The user's personal items */
|
||||
NSLocalDomainMask = 2, /** Local for all users on the machine */
|
||||
NSNetworkDomainMask = 4, /** Public for all users on network */
|
||||
NSSystemDomainMask = 8, /** Standard GNUstep items */
|
||||
NSAllDomainsMask = 0x0ffff, /** all domains */
|
||||
};
|
||||
/**
|
||||
* Mask type for NSSearchPathForDirectoriesInDomains() function. A bitwise OR
|
||||
* of one or more of <code>NSUserDomainMask, NSLocalDomainMask,
|
||||
* NSNetworkDomainMask, NSSystemDomainMask, NSAllDomainsMask</code>.
|
||||
*/
|
||||
typedef NSUInteger NSSearchPathDomainMask;
|
||||
} NSSearchPathDomainMask;
|
||||
|
||||
/**
|
||||
* Returns an array of search paths to look at for resources.<br/ >
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
/**Interface for NSPointerArray for GNUStep
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Date: 2009
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __NSPointerArray_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSPointerArray_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSPointerFunctions.h>
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An NSPointerArray acts like a standard mutable array except that it
|
||||
* can contain nil and even non-object values.<br />
|
||||
* The count can also be set causing the array to shrink (discarding items)
|
||||
* or grow (adding nil/zero items).
|
||||
*/
|
||||
|
||||
@interface NSPointerArray : NSObject <NSCopying, NSCoding>
|
||||
|
||||
/** Allocate an instance, initialise using initWithOptions: and
|
||||
* return it autoreleased.
|
||||
*/
|
||||
+ (id) pointerArrayWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
/** Allocate an instance, initialise using initWithPointerFunctions: and
|
||||
* return it autoreleased.
|
||||
*/
|
||||
+ (id) pointerArrayWithPointerFunctions: (NSPointerFunctions *)functions;
|
||||
|
||||
/** Removes all nil/zero items from the array.
|
||||
*/
|
||||
- (void) compact; // eliminate NULLs
|
||||
|
||||
/** Returns the number of items in the array.
|
||||
*/
|
||||
- (NSUInteger) count;
|
||||
|
||||
/** Initialises the receiver with the spefieifd options.
|
||||
*/
|
||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
/** Initialises the receiver using the supplied object.
|
||||
*/
|
||||
- (id) initWithPointerFunctions: (NSPointerFunctions*)functions;
|
||||
|
||||
/** Adds an item at the end of the array.
|
||||
*/
|
||||
- (void) addPointer: (void*)pointer;
|
||||
|
||||
/** Inserts an item at the specified index causing all higher indexed
|
||||
* items to be adjusted upwards.<br />
|
||||
* WARNING ... the Apple documented (and implemented in MacOS-X 10.5)
|
||||
* behavior is to raise an exception if index is the same as the count of
|
||||
* items in the array. This is insane ... for arrays, data and strings you
|
||||
* can insert at the end of an object to append to it, so the behavior of
|
||||
* this class in MacOS is inconsistent and must be considered buggy.
|
||||
*/
|
||||
- (void) insertPointer: (void*)pointer atIndex: (NSUInteger)index;
|
||||
|
||||
/** Returns the item at the given index or raises an exception if index
|
||||
* is out of range.
|
||||
*/
|
||||
- (void*) pointerAtIndex: (NSUInteger)index;
|
||||
|
||||
/** Returns an autorelease NSPointerFunctions instance giving the
|
||||
* functions in use by the receiver.
|
||||
*/
|
||||
- (NSPointerFunctions*) pointerFunctions;
|
||||
|
||||
/** Removes the item at the specified index, adjusting the positions of
|
||||
* all higher indexed items.
|
||||
*/
|
||||
- (void) removePointerAtIndex: (NSUInteger)index;
|
||||
|
||||
/* Replaces the item at the specified index. The index must be less than
|
||||
* the current count or an exception is raised.
|
||||
*/
|
||||
- (void) replacePointerAtIndex: (NSUInteger)index withPointer: (void*)item;
|
||||
|
||||
/** Sets the number of items in the receiver. Adds nil/zero items to pad
|
||||
* the end of the array, or removes extraneous items from the end.
|
||||
*/
|
||||
- (void) setCount: (NSUInteger)count;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSPointerArray (NSArrayConveniences)
|
||||
|
||||
/** Creates an instance configured to hold objects and prevent them from
|
||||
* being garbage collected.
|
||||
*/
|
||||
+ (id) pointerArrayWithStrongObjects;
|
||||
|
||||
/** Creates an instance configured to hold objects, allowing them to be
|
||||
* garbage collected and replaced by nil if/when they are collected.
|
||||
*/
|
||||
+ (id) pointerArrayWithWeakObjects;
|
||||
|
||||
/** Returns an array containing all the non-nil objects from the receiver.
|
||||
*/
|
||||
- (NSArray*) allObjects;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,152 +0,0 @@
|
|||
/**Interface for NSPointerFunctions for GNUStep
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Date: 2008
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
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 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
|
||||
Library 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., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __NSPointerFunctions_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSPointerFunctions_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#if OS_API_VERSION(100500, GS_API_LATEST)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Options flags come in three groups ...<br />
|
||||
* Memory management options (only one of which may be set)<br />
|
||||
* Personality options (only one of which may be set)<br />
|
||||
* Others.
|
||||
*/
|
||||
enum {
|
||||
/** Garbage collected strong references , or retain counting if GC
|
||||
* is not active. */
|
||||
NSPointerFunctionsStrongMemory = (0<<0),
|
||||
|
||||
/** Garbage collected weak references */
|
||||
NSPointerFunctionsZeroingWeakMemory = (1<<0),
|
||||
|
||||
/** Non-GC memory */
|
||||
NSPointerFunctionsOpaqueMemory = (2<<0),
|
||||
|
||||
/** Heap (calloc/free) memory */
|
||||
NSPointerFunctionsMallocMemory = (3<<0),
|
||||
|
||||
/** MACH virtual memory (not implemented) */
|
||||
NSPointerFunctionsMachVirtualMemory = (4<<0),
|
||||
|
||||
|
||||
/** Use the -hash and -isEqual: methods for storing objects, and the
|
||||
* -description method to describe them. */
|
||||
NSPointerFunctionsObjectPersonality = (0<<8),
|
||||
|
||||
/** Use the pointer (shifted) as a hash, and compare for bitwise quality.
|
||||
*/
|
||||
NSPointerFunctionsOpaquePersonality = (1<<8),
|
||||
|
||||
/** Use the pointer (shifted) as a hash, and compare for bitwise quality,
|
||||
* but use -description to desribe the objects.
|
||||
*/
|
||||
NSPointerFunctionsObjectPointerPersonality = (2<<8),
|
||||
|
||||
/** Use strcmp for comparison and a hash of the string contents. Describe
|
||||
* assuming that the string contains UTF-8 data.
|
||||
*/
|
||||
NSPointerFunctionsCStringPersonality = (3<<8),
|
||||
|
||||
/** Use memcmp for comparison and a hash of the sructure contents.
|
||||
* A size function must be set so that the size of the memcmp and hash
|
||||
* are known,
|
||||
*/
|
||||
NSPointerFunctionsStructPersonality = (4<<8),
|
||||
|
||||
/** Use unmodified integer value for both hash and equality test.
|
||||
*/
|
||||
NSPointerFunctionsIntegerPersonality = (5<<8),
|
||||
|
||||
|
||||
/** Request the memory acquire function to allocate/copy items.
|
||||
*/
|
||||
NSPointerFunctionsCopyIn = (1<<16)
|
||||
};
|
||||
|
||||
/** An integer value containing memory option, personality option,
|
||||
* and copying option.
|
||||
*/
|
||||
typedef NSUInteger NSPointerFunctionsOptions;
|
||||
|
||||
@interface NSPointerFunctions : NSObject <NSCopying>
|
||||
|
||||
+ (id) pointerFunctionsWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
- (void* (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item), BOOL shouldCopy)) acquireFunction;
|
||||
|
||||
- (NSString *(*)(const void *item)) descriptionFunction;
|
||||
|
||||
- (NSUInteger (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item))) hashFunction;
|
||||
|
||||
- (BOOL (*)(const void *item1, const void *item2,
|
||||
NSUInteger (*size)(const void *item))) isEqualFunction;
|
||||
|
||||
- (void (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item))) relinquishFunction;
|
||||
|
||||
- (void) setAcquireFunction: (void* (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item), BOOL shouldCopy))func;
|
||||
|
||||
- (void) setDescriptionFunction: (NSString *(*)(const void *item))func;
|
||||
|
||||
- (void) setHashFunction: (NSUInteger (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item)))func;
|
||||
|
||||
- (void) setIsEqualFunction: (BOOL (*)(const void *item1, const void *item2,
|
||||
NSUInteger (*size)(const void *item)))func;
|
||||
|
||||
- (void) setRelinquishFunction: (void (*)(const void *item,
|
||||
NSUInteger (*size)(const void *item))) func;
|
||||
|
||||
- (void) setSizeFunction: (NSUInteger (*)(const void *item))func;
|
||||
|
||||
- (void) setUsesStrongWriteBarrier: (BOOL)flag;
|
||||
|
||||
- (void) setUsesWeakReadAndWriteBarriers: (BOOL)flag;
|
||||
|
||||
- (NSUInteger (*)(const void *item)) sizeFunction;
|
||||
|
||||
- (BOOL) usesStrongWriteBarrier;
|
||||
|
||||
- (BOOL) usesWeakReadAndWriteBarriers;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OS_API_VERSION(100500, GS_API_LATEST) */
|
||||
#endif /* __NSPointerFunctions_h_GNUSTEP_BASE_INCLUDE */
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -33,7 +33,7 @@
|
|||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSMapTable.h>
|
||||
|
||||
#if defined(__MINGW__)
|
||||
#if defined(__MINGW32__)
|
||||
#include <winsock2.h>
|
||||
#include <wininet.h>
|
||||
#else
|
||||
|
@ -61,6 +61,14 @@ extern "C" {
|
|||
- (void) handlePortMessage: (NSPortMessage*)aMessage;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Exception raised by [NSPort], [NSConnection], and friends if sufficient
|
||||
* time elapses while waiting for a response, or if the receiving port is
|
||||
* invalidated before a request can be received. See
|
||||
* [NSConnection-setReplyTimeout:].
|
||||
*/
|
||||
GS_EXPORT NSString * const NSPortTimeoutException; /* OPENSTEP */
|
||||
|
||||
/**
|
||||
* <p><code>NSPort</code> is an abstract class defining interfaces underlying
|
||||
* communications in the distributed objects framework. Each side of a
|
||||
|
@ -74,10 +82,8 @@ extern "C" {
|
|||
*/
|
||||
@interface NSPort : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSPort)
|
||||
BOOL _is_valid;
|
||||
id _delegate;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,7 +99,7 @@ extern "C" {
|
|||
/**
|
||||
* NSMachPort compatibility method.
|
||||
*/
|
||||
+ (NSPort*) portWithMachPort: (NSInteger)machPort;
|
||||
+ (NSPort*) portWithMachPort: (int)machPort;
|
||||
|
||||
/**
|
||||
* Returns the object that received messages will be passed off to.
|
||||
|
@ -114,12 +120,12 @@ extern "C" {
|
|||
/**
|
||||
* NSMachPort compatibility method.
|
||||
*/
|
||||
- (id) initWithMachPort: (NSInteger)machPort;
|
||||
- (id) initWithMachPort: (int)machPort;
|
||||
|
||||
/**
|
||||
* NSMachPort compatibility.
|
||||
*/
|
||||
- (NSInteger) machPort;
|
||||
- (int) machPort;
|
||||
|
||||
/**
|
||||
* Mark port as invalid, deregister with listeners and cease further network
|
||||
|
@ -153,16 +159,16 @@ extern "C" {
|
|||
* Returns amount of space used for header info at beginning of messages.
|
||||
* Subclasses should override (this implementation returns 0).
|
||||
*/
|
||||
- (NSUInteger) reservedSpaceLength;
|
||||
- (unsigned) reservedSpaceLength;
|
||||
|
||||
/**
|
||||
* Internal method for sending message, for use by subclasses.
|
||||
*/
|
||||
- (BOOL) sendBeforeDate: (NSDate*)when
|
||||
msgid: (NSInteger)msgid
|
||||
msgid: (int)msgid
|
||||
components: (NSMutableArray*)components
|
||||
from: (NSPort*)receivingPort
|
||||
reserved: (NSUInteger)length;
|
||||
reserved: (unsigned)length;
|
||||
|
||||
/**
|
||||
* Internal method for sending message, for use by subclasses.
|
||||
|
@ -170,7 +176,7 @@ extern "C" {
|
|||
- (BOOL) sendBeforeDate: (NSDate*)when
|
||||
components: (NSMutableArray*)components
|
||||
from: (NSPort*)receivingPort
|
||||
reserved: (NSUInteger)length;
|
||||
reserved: (unsigned)length;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
@ -197,23 +203,18 @@ typedef SOCKET NSSocketNativeHandle;
|
|||
*
|
||||
* <p>Note that this class is incompatible with the latest OS X version.</p>
|
||||
*/
|
||||
@interface NSSocketPort : NSPort
|
||||
@interface NSSocketPort : NSPort <GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSSocketPort)
|
||||
NSRecursiveLock *myLock;
|
||||
NSHost *host; /* OpenStep host for this port. */
|
||||
NSString *address; /* Forced internet address. */
|
||||
uint16_t portNum; /* TCP port in host byte order. */
|
||||
SOCKET listener;
|
||||
NSMapTable *handles; /* Handles indexed by socket. */
|
||||
#if defined(__MINGW__)
|
||||
#if defined(__MINGW32__)
|
||||
WSAEVENT eventListener;
|
||||
NSMapTable *events;
|
||||
#endif
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -265,6 +266,40 @@ typedef SOCKET NSSocketNativeHandle;
|
|||
* Returns port number of underlying socket.
|
||||
*/
|
||||
- (uint16_t) portNumber;
|
||||
|
||||
// This is the OS X interface
|
||||
/*
|
||||
{
|
||||
NSSocketNativeHandle _socket;
|
||||
int _protocolFamily;
|
||||
int _socketType;
|
||||
int _protocol;
|
||||
NSData *_remoteAddrData;
|
||||
}
|
||||
- (id) init;
|
||||
- (id) initWithTCPPort: (unsigned short)portNumber;
|
||||
- (id) initWithProtocolFamily: (int)family
|
||||
socketType: (int)type
|
||||
protocol: (int)protocol
|
||||
address: (NSData *)addrData;
|
||||
- (id) initWithProtocolFamily: (int)family
|
||||
socketType: (int)type
|
||||
protocol: (int)protocol
|
||||
socket: (NSSocketNativeHandle)socket;
|
||||
- (id) initRemoteWithTCPPort: (unsigned short)portNumber
|
||||
host: (NSString *)hostname;
|
||||
- (id) initRemoteWithProtocolFamily: (int)family
|
||||
socketType: (int)type
|
||||
protocol: (int)protocol
|
||||
address: (NSData *)addrData;
|
||||
|
||||
- (NSData *) address;
|
||||
- (int) protocol;
|
||||
- (int) protocolFamily;
|
||||
- (NSSocketNativeHandle) socket;
|
||||
- (int) socketType;
|
||||
*/
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -273,11 +308,9 @@ typedef SOCKET NSSocketNativeHandle;
|
|||
* which can be used for interthread/interprocess communications
|
||||
* on the same host, but not between different hosts.
|
||||
*/
|
||||
@interface NSMessagePort : NSPort
|
||||
@interface NSMessagePort : NSPort <GCFinalization>
|
||||
{
|
||||
#if GS_EXPOSE(NSMessagePort)
|
||||
void *_internal;
|
||||
#endif
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -50,7 +50,6 @@ extern "C" {
|
|||
// around, so maybe the docs should be changed..
|
||||
@interface NSPortCoder : NSCoder
|
||||
{
|
||||
#if GS_EXPOSE(NSPortCoder)
|
||||
@private
|
||||
NSMutableArray *_comp;
|
||||
NSConnection *_conn;
|
||||
|
@ -93,10 +92,6 @@ extern "C" {
|
|||
unsigned _cursor; /* Position in data buffer. */
|
||||
unsigned _version; /* Version of archiver used. */
|
||||
NSZone *_zone; /* Zone for allocating objs. */
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -44,16 +44,10 @@ extern "C" {
|
|||
*/
|
||||
@interface NSPortMessage : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSPortMessage)
|
||||
@private
|
||||
unsigned _msgid;
|
||||
NSPort *_recv;
|
||||
NSPort *_send;
|
||||
NSMutableArray *_components;
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
/**
|
||||
* OpenStep compatibility.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -45,6 +45,8 @@ extern "C" {
|
|||
@class NSPort, NSString, NSMutableArray;
|
||||
|
||||
@interface NSPortNameServer : NSObject
|
||||
{
|
||||
}
|
||||
+ (id) systemDefaultPortNameServer;
|
||||
- (NSPort*) portForName: (NSString*)name;
|
||||
- (NSPort*) portForName: (NSString*)name
|
||||
|
@ -56,13 +58,8 @@ extern "C" {
|
|||
|
||||
@interface NSSocketPortNameServer : NSPortNameServer
|
||||
{
|
||||
#if GS_EXPOSE(NSSocketPortNameServer)
|
||||
NSMapTable *_portMap; /* Registered ports information. */
|
||||
NSMapTable *_nameMap; /* Registered names information. */
|
||||
#endif
|
||||
#if !GS_NONFRAGILE
|
||||
void *_unused;
|
||||
#endif
|
||||
}
|
||||
+ (id) sharedInstance;
|
||||
- (NSPort*) portForName: (NSString*)name
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -30,7 +30,6 @@
|
|||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -52,33 +51,9 @@ extern "C" {
|
|||
@end
|
||||
|
||||
@interface NSArray (NSPredicate)
|
||||
/** Evaluate each object in the array using the specified predicate and
|
||||
* return an array containing all the objects which evaluate to YES.
|
||||
*/
|
||||
- (NSArray *) filteredArrayUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSMutableArray (NSPredicate)
|
||||
/** Evaluate each object in the array using the specified predicate and
|
||||
* remove each objects which evaluates to NO.
|
||||
*/
|
||||
- (void) filterUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSSet (NSPredicate)
|
||||
/** Evaluate each object in the set using the specified predicate and
|
||||
* return an set containing all the objects which evaluate to YES.
|
||||
*/
|
||||
- (NSSet *) filteredSetUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSMutableSet (NSPredicate)
|
||||
/** Evaluate each object in the set using the specified predicate and
|
||||
* remove each objects which evaluates to NO.
|
||||
*/
|
||||
- (void) filterUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -141,7 +141,7 @@ enum {
|
|||
* <item>GSCygwinOperatingSystem - cygwin unix-like environment</item>
|
||||
* </list>
|
||||
*/
|
||||
- (NSUInteger) operatingSystem;
|
||||
- (unsigned int) operatingSystem;
|
||||
|
||||
/**
|
||||
* Return a human readable string representing the operating system type.<br />
|
||||
|
@ -189,17 +189,9 @@ enum {
|
|||
*/
|
||||
- (void) setProcessName: (NSString*)newName;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
/** Not implemented */
|
||||
- (NSUInteger) processorCount;
|
||||
/** Not implemented */
|
||||
- (NSUInteger) activeProcessorCount;
|
||||
/** Not implemented */
|
||||
- (unsigned long long) physicalMemory;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE,011700)
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
|
||||
|
||||
/**
|
||||
* Provides GNUstep-specific methods for controlled debug logging (a GNUstep
|
||||
|
@ -207,6 +199,29 @@ enum {
|
|||
*/
|
||||
@interface NSProcessInfo (GNUstep)
|
||||
|
||||
/**
|
||||
* Returns a indication of whether debug logging is enabled.
|
||||
* This returns YES unless a call to -setDebugLoggingEnabled: has
|
||||
* been used to turn logging off.
|
||||
*/
|
||||
- (BOOL) debugLoggingEnabled;
|
||||
|
||||
/**
|
||||
* This method returns a set of debug levels set using the
|
||||
* --GNU-Debug=... command line option and/or the GNU-Debug
|
||||
* user default.<br />
|
||||
* You can modify this set to change the debug logging under
|
||||
* your programs control ... but such modifications are not
|
||||
* thread-safe.
|
||||
*/
|
||||
- (NSMutableSet*) debugSet;
|
||||
|
||||
/**
|
||||
* This method permits you to turn all debug logging on or off
|
||||
* without modifying the set of debug levels in use.
|
||||
*/
|
||||
- (void) setDebugLoggingEnabled: (BOOL)flag;
|
||||
|
||||
/**
|
||||
* Set the file to which NSLog output should be directed.<br />
|
||||
* Returns YES on success, NO on failure.<br />
|
||||
|
@ -214,25 +229,19 @@ enum {
|
|||
*/
|
||||
- (BOOL) setLogFile: (NSString*)path;
|
||||
|
||||
/** Obsolete ... the GSInitializeProcess() function has the same effect and
|
||||
* can be called more easily from other languages (particularly C).
|
||||
/**
|
||||
* Fallback/override method. The developer must call this method to initialize
|
||||
* the NSProcessInfo system if none of the system-specific hacks to
|
||||
* auto-initialize it are working.<br />
|
||||
* It is also safe to call this method to override the effects
|
||||
* of the automatic initialisation, which some applications may need
|
||||
* to do when using GNUstep libraries embeddedm within other frameworks.
|
||||
*/
|
||||
+ (void) initializeWithArguments: (char**)argv
|
||||
count: (int)argc
|
||||
environment: (char**)env;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Fallback/override function.<br />
|
||||
* The developer must call this method to initialize
|
||||
* the NSProcessInfo system if none of the system-specific hacks to
|
||||
* auto-initialize it are working.<br />
|
||||
* It is also safe to call this function to override the effects
|
||||
* of the automatic initialisation, which some applications may need
|
||||
* to do when using GNUstep libraries embedded within other frameworks.
|
||||
*/
|
||||
GS_EXPORT void GSInitializeProcess(int argc, char **argv, char **envp);
|
||||
|
||||
/**
|
||||
* Function for rapid testing to see if a debug level is set.<br />
|
||||
* This is used by the debugging macros.<br />
|
||||
|
@ -247,8 +256,4 @@ GS_EXPORT BOOL GSDebugSet(NSString *level);
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSProcessInfo+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* __NSProcessInfo_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
@ -39,47 +39,46 @@ extern "C" {
|
|||
|
||||
@class NSData, NSString;
|
||||
|
||||
enum {
|
||||
NSPropertyListImmutable = 0,
|
||||
NSPropertyListMutableContainers,
|
||||
NSPropertyListMutableContainersAndLeaves
|
||||
};
|
||||
/**
|
||||
* Describes the mutability to use when generating objects during
|
||||
* deserialisation of a property list.
|
||||
* <list>
|
||||
* <item><strong>NSPropertyListImmutable</strong>
|
||||
* all objects in created list are immutable</item>
|
||||
* <item><strong>NSPropertyListMutableContainers</strong>
|
||||
* dictionaries, arrays, strings and data objects are mutable</item>
|
||||
* </list>
|
||||
*/
|
||||
typedef NSUInteger NSPropertyListMutabilityOptions;
|
||||
typedef enum {
|
||||
NSPropertyListImmutable = 0,
|
||||
/** <strong>NSPropertyListImmutable</strong>
|
||||
* all objects in created list are immutable
|
||||
*/
|
||||
NSPropertyListMutableContainers,
|
||||
/** <strong>NSPropertyListMutableContainers</strong>
|
||||
* dictionaries and arrays are mutable
|
||||
*/
|
||||
NSPropertyListMutableContainersAndLeaves
|
||||
/** <strong>NSPropertyListMutableContainersAndLeaves</strong>
|
||||
* dictionaries, arrays, strings and data objects are mutable
|
||||
*/
|
||||
} NSPropertyListMutabilityOptions;
|
||||
|
||||
enum {
|
||||
NSPropertyListOpenStepFormat = 1,
|
||||
NSPropertyListXMLFormat_v1_0 = 100,
|
||||
NSPropertyListBinaryFormat_v1_0 = 200,
|
||||
|
||||
NSPropertyListGNUstepFormat = 1000,
|
||||
NSPropertyListGNUstepBinaryFormat,
|
||||
};
|
||||
/**
|
||||
* Specifies the serialisation format for a serialised property list.
|
||||
* <list>
|
||||
* <item><strong>NSPropertyListOpenStepFormat</strong>
|
||||
* the most human-readable format</item>
|
||||
* <item><strong>NSPropertyListXMLFormat_v1_0</strong>
|
||||
* portable and readable</item>
|
||||
* <item><strong>NSPropertyListBinaryFormat_v1_0</strong>
|
||||
* the standard format on macos-x</item>
|
||||
* <item><strong>NSPropertyListGNUstepFormat</strong>
|
||||
* extension of OpenStep format</item>
|
||||
* <item><strong>NSPropertyListGNUstepBinaryFormat</strong>
|
||||
* efficient, hardware independent</item>
|
||||
* </list>
|
||||
*/
|
||||
typedef NSUInteger NSPropertyListFormat;
|
||||
typedef enum {
|
||||
NSPropertyListOpenStepFormat = 1,
|
||||
/** <strong>NSPropertyListOpenStepFormat</strong>
|
||||
* the most human-readable format */
|
||||
NSPropertyListXMLFormat_v1_0 = 100,
|
||||
/** <strong>NSPropertyListXMLFormat_v1_0</strong>
|
||||
* portable and readable */
|
||||
NSPropertyListBinaryFormat_v1_0 = 200,
|
||||
/** <strong>NSPropertyListBinaryFormat_v1_0</strong>
|
||||
* the standard format on macos-x */
|
||||
|
||||
NSPropertyListGNUstepFormat = 1000,
|
||||
/** <strong>NSPropertyListGNUstepFormat</strong>
|
||||
* extension of OpenStep format */
|
||||
NSPropertyListGNUstepBinaryFormat,
|
||||
/** <strong>NSPropertyListGNUstepBinaryFormat</strong>
|
||||
* efficient, hardware independent */
|
||||
} NSPropertyListFormat;
|
||||
|
||||
/**
|
||||
* <p>The NSPropertyListSerialization class provides facilities for
|
||||
|
@ -133,10 +132,9 @@ typedef NSUInteger NSPropertyListFormat;
|
|||
* <*D2002-03-22 11:30:00 +0100>
|
||||
* </example>
|
||||
* In XML format, a date object is an element whose name is
|
||||
* <code>date</code> and whose content is a date in the format
|
||||
* YYYY-MM-DDTHH:MM:SSZ (or the above dfate format).
|
||||
* <code>date</code> and whose content is a date in the above format.
|
||||
* <example>
|
||||
* <date>2002-03-22T11:30:00Z</date>
|
||||
* <date>2002-03-22 11:30:00 +0100</date>
|
||||
* </example>
|
||||
* </desc>
|
||||
* <term>[NSDictionary]</term>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue