mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Compare commits
273 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d56e2c3a62 | ||
|
|
38818e6502 | ||
|
|
ebf5d63bc6 | ||
|
|
2421ffcbb9 | ||
|
|
2bdd055f4b | ||
|
|
039c805161 | ||
|
|
e19974fe47 | ||
|
|
bb41d5e549 | ||
|
|
fd163c7105 | ||
|
|
a3d61a67c8 | ||
|
|
459d57da9c | ||
|
|
3d58795d0f | ||
|
|
e293873dc7 | ||
|
|
17e3b3b0e2 | ||
|
|
ae1ac21c71 | ||
|
|
2025e39014 | ||
|
|
ea09fc96db | ||
|
|
bf0a6e0c43 | ||
|
|
cf74717ead | ||
|
|
f81dfdfca7 | ||
|
|
196ce6e140 | ||
|
|
629e40475f | ||
|
|
85e421feb8 | ||
|
|
3be260b746 | ||
|
|
b78a86774c | ||
|
|
9aba55afba | ||
|
|
426fe0cc61 | ||
|
|
6a13b08f40 | ||
|
|
59807dbff1 | ||
|
|
414e07aa20 | ||
|
|
2a22c4ff0d | ||
|
|
576660ca0a | ||
|
|
5451d3a694 | ||
|
|
c26da2c5e8 | ||
|
|
c3975b1e6e | ||
|
|
a79b05194d | ||
|
|
3975d234bd | ||
|
|
3c220c3939 | ||
|
|
49e98713d4 | ||
|
|
505c23237a | ||
|
|
ffeb475873 | ||
|
|
c3a10b88b5 | ||
|
|
2ced1d3293 | ||
|
|
fb4dae84aa | ||
|
|
a03ced93b0 | ||
|
|
a19d60f524 | ||
|
|
f6d20fee01 | ||
|
|
d4aa0b04af | ||
|
|
df05c80c57 | ||
|
|
a1ffc20864 | ||
|
|
13c857ba0a | ||
|
|
5ecfdf33c6 | ||
|
|
fa31c468dc | ||
|
|
feb29fa334 | ||
|
|
d0a4e057bc | ||
|
|
c5087c78ce | ||
|
|
c5c6492868 | ||
|
|
539cc3553d | ||
|
|
bc65dd2877 | ||
|
|
ec027fa510 | ||
|
|
65484eac3c | ||
|
|
2be60de3e7 | ||
|
|
89b568bcb8 | ||
|
|
2548af2b4b | ||
|
|
a1b39c4d01 | ||
|
|
9e32991a6d | ||
|
|
c8d29ea9c1 | ||
|
|
28f561c61b | ||
|
|
07056f3e26 | ||
|
|
3bd6766484 | ||
|
|
e01d58319d | ||
|
|
ec4fd3c2cb | ||
|
|
df89c636db | ||
|
|
90a192134e | ||
|
|
3660b26c9f | ||
|
|
9f3d5e50b4 | ||
|
|
876039440f | ||
|
|
0c553faff1 | ||
|
|
1d611fefbe | ||
|
|
a50aba0b64 | ||
|
|
2e9ac7d003 | ||
|
|
0a440c8405 | ||
|
|
f63a0788d5 | ||
|
|
431dd488a1 | ||
|
|
15c16efd07 | ||
|
|
6e39efe7d7 | ||
|
|
92cc3e9a79 | ||
|
|
a18f415374 | ||
|
|
3096691d75 | ||
|
|
d5c36d66e4 | ||
|
|
7f9fbc453b | ||
|
|
6f010ddf87 | ||
|
|
09b52e077f | ||
|
|
9c2c44b008 | ||
|
|
df01f27551 | ||
|
|
58d26ce8cb | ||
|
|
b1ac45a0b9 | ||
|
|
aafda37c84 | ||
|
|
3eb15a612f | ||
|
|
590d1b8eec | ||
|
|
1fbe4bd0a5 | ||
|
|
8edfcc3f86 | ||
|
|
a6daababe7 | ||
|
|
5695784272 | ||
|
|
5eefcf4555 | ||
|
|
d85d6648ea | ||
|
|
c471c50784 | ||
|
|
cd10dc9a1a | ||
|
|
7d3ea7fae6 | ||
|
|
ead29c1850 | ||
|
|
f492e6a6c0 | ||
|
|
dc80018239 | ||
|
|
966851e8bd | ||
|
|
a60623bbc6 | ||
|
|
d8bf652ae6 | ||
|
|
b048323196 | ||
|
|
08cc54d3fa | ||
|
|
419172fb0e | ||
|
|
f289140266 | ||
|
|
86b7e5c429 | ||
|
|
42963b39c4 | ||
|
|
678cab02fb | ||
|
|
59d7f8d07f | ||
|
|
9a7c8a8705 | ||
|
|
96e74015f0 | ||
|
|
db8710d2ae | ||
|
|
91f12dd8f0 | ||
|
|
d2f157b0a1 | ||
|
|
e3e82b3657 | ||
|
|
4d3dc4a77f | ||
|
|
ee556fcb35 | ||
|
|
cc8a8e42c0 | ||
|
|
0fad53e56e | ||
|
|
d33e3e909e | ||
|
|
ef43011783 | ||
|
|
a9c8cdc554 | ||
|
|
d370bd123b | ||
|
|
6931123dc1 | ||
|
|
b2ddf28fa7 | ||
|
|
1bc19a04d3 | ||
|
|
1a0999bc1c | ||
|
|
1bf430d1d6 | ||
|
|
f2d1a3238d | ||
|
|
2c3bd39f71 | ||
|
|
0deb0e3e2d | ||
|
|
dd380f8479 | ||
|
|
ec3d921f7b | ||
|
|
ebd6cc3639 | ||
|
|
7690bb8399 | ||
|
|
2aba208878 | ||
|
|
593caccb38 | ||
|
|
ac0cc97924 | ||
|
|
ef44c75126 | ||
|
|
9a8fe330a9 | ||
|
|
17d81c12c0 | ||
|
|
c799b17bb9 | ||
|
|
1df294c07e | ||
|
|
f51faeb168 | ||
|
|
c0c70bfd99 | ||
|
|
b10d1ad38c | ||
|
|
1550c6fef3 | ||
|
|
53d99ac7a2 | ||
|
|
c4c25649f2 | ||
|
|
18f1f75479 | ||
|
|
410833d2ed | ||
|
|
cfa6f566db | ||
|
|
99547756fe | ||
|
|
ea638f0970 | ||
|
|
4aa85e1d12 | ||
|
|
fcb8cfc0dc | ||
|
|
a626336b7b | ||
|
|
07d09bb185 | ||
|
|
6ad88ff97f | ||
|
|
2ddfeab0cf | ||
|
|
91028c63bc | ||
|
|
209884bd1f | ||
|
|
3548d3cf7e | ||
|
|
50b8b623cc | ||
|
|
49bc1d6b13 | ||
|
|
fce21e21d6 | ||
|
|
f8b1e7516f | ||
|
|
8e2820e9b7 | ||
|
|
ab22a23f27 | ||
|
|
0ae8d68e64 | ||
|
|
0b1d21471d | ||
|
|
987316e638 | ||
|
|
e8d4187ea5 | ||
|
|
003faf7a24 | ||
|
|
d1aaa84bcc | ||
|
|
e1476c15b3 | ||
|
|
17fea5626a | ||
|
|
e4b70e946f | ||
|
|
56b0a74c61 | ||
|
|
d23f4318f9 | ||
|
|
23f70d0c53 | ||
|
|
c6fcede4ce | ||
|
|
5801d000d4 | ||
|
|
619b64e6f4 | ||
|
|
5191ee5660 | ||
|
|
64c1175f7b | ||
|
|
be827762de | ||
|
|
618299fb48 | ||
|
|
fbc6d94840 | ||
|
|
5cf80326bc | ||
|
|
e571888f4f | ||
|
|
f519aafaca | ||
|
|
984c6729c1 | ||
|
|
49df44872d | ||
|
|
e77cc97daf | ||
|
|
ad0880d204 | ||
|
|
d74535f87f | ||
|
|
73e6ccc14e | ||
|
|
3c9f119046 | ||
|
|
76c68da3a5 | ||
|
|
7b67ccdec1 | ||
|
|
19ea207fba | ||
|
|
b3f0f0dfe0 | ||
|
|
7492d108a3 | ||
|
|
9bf1e01518 | ||
|
|
be2d80a86a | ||
|
|
24ea9161a7 | ||
|
|
2d5193371a | ||
|
|
186887bba5 | ||
|
|
83f0977c0c | ||
|
|
e22a226640 | ||
|
|
3c1df9b1db | ||
|
|
655ea577d2 | ||
|
|
99e6856c11 | ||
|
|
b252f90d66 | ||
|
|
1ed26d0a60 | ||
|
|
4dd74de299 | ||
|
|
3b5a4a32a4 | ||
|
|
7f7ca50d06 | ||
|
|
0ed8ef67ed | ||
|
|
267bdc4be6 | ||
|
|
a7bac89279 | ||
|
|
95f0617964 | ||
|
|
4b3dbd3546 | ||
|
|
b8663a4240 | ||
|
|
aa3ccda8de | ||
|
|
8062f49f1c | ||
|
|
1310865c33 | ||
|
|
2ed76311fd | ||
|
|
3f19d52557 | ||
|
|
7038751f6b | ||
|
|
5d9e4c07a6 | ||
|
|
f49a45f6a8 | ||
|
|
fef99a0181 | ||
|
|
17a0e794c5 | ||
|
|
64f39b51ae | ||
|
|
a7e0bc8e16 | ||
|
|
14595cc0a8 | ||
|
|
8555296691 | ||
|
|
53bb602493 | ||
|
|
a048eadf09 | ||
|
|
51e20cee1d | ||
|
|
618af18519 | ||
|
|
0cbc101798 | ||
|
|
5d508c6e6d | ||
|
|
a4b138e406 | ||
|
|
7d21a272cc | ||
|
|
7ae8399e43 | ||
|
|
0d101fd928 | ||
|
|
6a2db55fc2 | ||
|
|
6214bc2067 | ||
|
|
4a4c8b2ef9 | ||
|
|
f3c4ee68cd | ||
|
|
0848048029 | ||
|
|
dfd3dc3170 | ||
|
|
5d705f3c30 | ||
|
|
51f1dacdfa | ||
|
|
56e788a268 | ||
|
|
916dfa3c6a |
@@ -1,13 +0,0 @@
|
|||||||
# The "checkoutlist" file is used to support additional version controlled
|
|
||||||
# administrative files in $CVSROOT/CVSROOT, such as template files.
|
|
||||||
#
|
|
||||||
# The first entry on a line is a filename which will be checked out from
|
|
||||||
# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
|
|
||||||
# The remainder of the line is an error message to use if the file cannot
|
|
||||||
# be checked out.
|
|
||||||
#
|
|
||||||
# File format:
|
|
||||||
#
|
|
||||||
# [<whitespace>]<filename>[<whitespace><error message>]<end-of-line>
|
|
||||||
#
|
|
||||||
# comment lines begin with '#'
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# The "commitinfo" file is used to control pre-commit checks.
|
|
||||||
# The filter on the right is invoked with the repository and a list
|
|
||||||
# of files to check. A non-zero exit of the filter program will
|
|
||||||
# cause the commit to be aborted.
|
|
||||||
#
|
|
||||||
# The first entry on a line is a regular expression which is tested
|
|
||||||
# against the directory that the change is being committed to, relative
|
|
||||||
# to the $CVSROOT. For the first match that is found, then the remainder
|
|
||||||
# of the line is the name of the filter to run.
|
|
||||||
#
|
|
||||||
# If the repository name does not match any of the regular expressions in this
|
|
||||||
# file, the "DEFAULT" line is used, if it is specified.
|
|
||||||
#
|
|
||||||
# If the name "ALL" appears as a regular expression it is always used
|
|
||||||
# in addition to the first matching regex or "DEFAULT".
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# Set this to "no" if pserver shouldn't check system users/passwords
|
|
||||||
#SystemAuth=no
|
|
||||||
|
|
||||||
# Put CVS lock files in this directory rather than directly in the repository.
|
|
||||||
#LockDir=/var/lock/cvs
|
|
||||||
|
|
||||||
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
|
|
||||||
# level of the new working directory when using the `cvs checkout'
|
|
||||||
# command.
|
|
||||||
#TopLevelAdmin=no
|
|
||||||
|
|
||||||
# Set `LogHistory' to `all' or `TOEFWUPCGMAR' to log all transactions to the
|
|
||||||
# history file, or a subset as needed (ie `TMAR' logs all write operations)
|
|
||||||
#LogHistory=TOEFWUPCGMAR
|
|
||||||
|
|
||||||
# Set `RereadLogAfterVerify' to `always' (the default) to allow the verifymsg
|
|
||||||
# script to change the log message. Set it to `stat' to force CVS to verify# that the file has changed before reading it (this can take up to an extra
|
|
||||||
# second per directory being committed, so it is not recommended for large
|
|
||||||
# repositories. Set it to `never' (the previous CVS behavior) to prevent
|
|
||||||
# verifymsg scripts from changing the log message.
|
|
||||||
#RereadLogAfterVerify=always
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# This file affects handling of files based on their names.
|
|
||||||
#
|
|
||||||
# The -m option specifies whether CVS attempts to merge files.
|
|
||||||
#
|
|
||||||
# The -k option specifies keyword expansion (e.g. -kb for binary).
|
|
||||||
#
|
|
||||||
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
|
|
||||||
#
|
|
||||||
# wildcard [option value][option value]...
|
|
||||||
#
|
|
||||||
# where option is one of
|
|
||||||
# -f from cvs filter value: path to filter
|
|
||||||
# -t to cvs filter value: path to filter
|
|
||||||
# -m update methodology value: MERGE or COPY
|
|
||||||
# -k expansion mode value: b, o, kkv, &c
|
|
||||||
#
|
|
||||||
# and value is a single-quote delimited value.
|
|
||||||
# For example:
|
|
||||||
#*.gif -k 'b'
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# The "editinfo" file is used to allow verification of logging
|
|
||||||
# information. It works best when a template (as specified in the
|
|
||||||
# rcsinfo file) is provided for the logging procedure. Given a
|
|
||||||
# template with locations for, a bug-id number, a list of people who
|
|
||||||
# reviewed the code before it can be checked in, and an external
|
|
||||||
# process to catalog the differences that were code reviewed, the
|
|
||||||
# following test can be applied to the code:
|
|
||||||
#
|
|
||||||
# Making sure that the entered bug-id number is correct.
|
|
||||||
# Validating that the code that was reviewed is indeed the code being
|
|
||||||
# checked in (using the bug-id number or a seperate review
|
|
||||||
# number to identify this particular code set.).
|
|
||||||
#
|
|
||||||
# If any of the above test failed, then the commit would be aborted.
|
|
||||||
#
|
|
||||||
# Actions such as mailing a copy of the report to each reviewer are
|
|
||||||
# better handled by an entry in the loginfo file.
|
|
||||||
#
|
|
||||||
# One thing that should be noted is the the ALL keyword is not
|
|
||||||
# supported. There can be only one entry that matches a given
|
|
||||||
# repository.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# The "loginfo" file controls where "cvs commit" log information
|
|
||||||
# is sent. The first entry on a line is a regular expression which must match
|
|
||||||
# the directory that the change is being made to, relative to the
|
|
||||||
# $CVSROOT. If a match is found, then the remainder of the line is a filter
|
|
||||||
# program that should expect log information on its standard input.
|
|
||||||
#
|
|
||||||
# If the repository name does not match any of the regular expressions in this
|
|
||||||
# file, the "DEFAULT" line is used, if it is specified.
|
|
||||||
#
|
|
||||||
# If the name ALL appears as a regular expression it is always used
|
|
||||||
# in addition to the first matching regex or DEFAULT.
|
|
||||||
#
|
|
||||||
# You may specify a format string as part of the
|
|
||||||
# filter. The string is composed of a `%' followed
|
|
||||||
# by a single format character, or followed by a set of format
|
|
||||||
# characters surrounded by `{' and `}' as separators. The format
|
|
||||||
# characters are:
|
|
||||||
#
|
|
||||||
# s = file name
|
|
||||||
# V = old version number (pre-checkin)
|
|
||||||
# v = new version number (post-checkin)
|
|
||||||
# t = tag or branch name
|
|
||||||
#
|
|
||||||
# For example:
|
|
||||||
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
|
|
||||||
# or
|
|
||||||
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# Three different line formats are valid:
|
|
||||||
# key -a aliases...
|
|
||||||
# key [options] directory
|
|
||||||
# key [options] directory files...
|
|
||||||
#
|
|
||||||
# Where "options" are composed of:
|
|
||||||
# -i prog Run "prog" on "cvs commit" from top-level of module.
|
|
||||||
# -o prog Run "prog" on "cvs checkout" of module.
|
|
||||||
# -e prog Run "prog" on "cvs export" of module.
|
|
||||||
# -t prog Run "prog" on "cvs rtag" of module.
|
|
||||||
# -u prog Run "prog" on "cvs update" of module.
|
|
||||||
# -d dir Place module in directory "dir" instead of module name.
|
|
||||||
# -l Top-level directory only -- do not recurse.
|
|
||||||
#
|
|
||||||
# NOTE: If you change any of the "Run" options above, you'll have to
|
|
||||||
# release and re-checkout any working directories of these modules.
|
|
||||||
#
|
|
||||||
# And "directory" is a path to a directory relative to $CVSROOT.
|
|
||||||
#
|
|
||||||
# The "-a" option specifies an alias. An alias is interpreted as if
|
|
||||||
# everything on the right of the "-a" had been typed on the command line.
|
|
||||||
#
|
|
||||||
# You can encode a module within a module by using the special '&'
|
|
||||||
# character to interpose another module into the current module. This
|
|
||||||
# can be useful for creating a module that consists of many directories
|
|
||||||
# spread out over the entire source repository.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# The "notify" file controls where notifications from watches set by
|
|
||||||
# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
|
|
||||||
# a regular expression which is tested against the directory that the
|
|
||||||
# change is being made to, relative to the $CVSROOT. If it matches,
|
|
||||||
# then the remainder of the line is a filter program that should contain
|
|
||||||
# one occurrence of %s for the user to notify, and information on its
|
|
||||||
# standard input.
|
|
||||||
#
|
|
||||||
# "ALL" or "DEFAULT" can be used in place of the regular expression.
|
|
||||||
#
|
|
||||||
# For example:
|
|
||||||
#ALL mail -s "CVS notification" %s
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# The "rcsinfo" file is used to control templates with which the editor
|
|
||||||
# is invoked on commit and import.
|
|
||||||
#
|
|
||||||
# The first entry on a line is a regular expression which is tested
|
|
||||||
# against the directory that the change is being made to, relative to the
|
|
||||||
# $CVSROOT. For the first match that is found, then the remainder of the
|
|
||||||
# line is the name of the file that contains the template.
|
|
||||||
#
|
|
||||||
# If the repository name does not match any of the regular expressions in this
|
|
||||||
# file, the "DEFAULT" line is used, if it is specified.
|
|
||||||
#
|
|
||||||
# If the name "ALL" appears as a regular expression it is always used
|
|
||||||
# in addition to the first matching regex or "DEFAULT".
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# The "taginfo" file is used to control pre-tag checks.
|
|
||||||
# The filter on the right is invoked with the following arguments:
|
|
||||||
#
|
|
||||||
# $1 -- tagname
|
|
||||||
# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
|
|
||||||
# $3 -- repository
|
|
||||||
# $4-> file revision [file revision ...]
|
|
||||||
#
|
|
||||||
# A non-zero exit of the filter program will cause the tag to be aborted.
|
|
||||||
#
|
|
||||||
# The first entry on a line is a regular expression which is tested
|
|
||||||
# against the directory that the change is being committed to, relative
|
|
||||||
# to the $CVSROOT. For the first match that is found, then the remainder
|
|
||||||
# of the line is the name of the filter to run.
|
|
||||||
#
|
|
||||||
# If the repository name does not match any of the regular expressions in this
|
|
||||||
# file, the "DEFAULT" line is used, if it is specified.
|
|
||||||
#
|
|
||||||
# If the name "ALL" appears as a regular expression it is always used
|
|
||||||
# in addition to the first matching regex or "DEFAULT".
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# The "verifymsg" file is used to allow verification of logging
|
|
||||||
# information. It works best when a template (as specified in the
|
|
||||||
# rcsinfo file) is provided for the logging procedure. Given a
|
|
||||||
# template with locations for, a bug-id number, a list of people who
|
|
||||||
# reviewed the code before it can be checked in, and an external
|
|
||||||
# process to catalog the differences that were code reviewed, the
|
|
||||||
# following test can be applied to the code:
|
|
||||||
#
|
|
||||||
# Making sure that the entered bug-id number is correct.
|
|
||||||
# Validating that the code that was reviewed is indeed the code being
|
|
||||||
# checked in (using the bug-id number or a seperate review
|
|
||||||
# number to identify this particular code set.).
|
|
||||||
#
|
|
||||||
# If any of the above test failed, then the commit would be aborted.
|
|
||||||
#
|
|
||||||
# Actions such as mailing a copy of the report to each reviewer are
|
|
||||||
# better handled by an entry in the loginfo file.
|
|
||||||
#
|
|
||||||
# One thing that should be noted is the the ALL keyword is not
|
|
||||||
# supported. There can be only one entry that matches a given
|
|
||||||
# repository.
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
In order to build the library, you need a 'C' compiler (obvious, isn't it?) and
|
|
||||||
a set of header files for the networking API definitions. The networking header
|
|
||||||
files go into a directory "netinclude" which has to sit in the same directory as
|
|
||||||
the source code and the "include" directory you find in there. I'm not currently
|
|
||||||
supplying these header files here. Drop me a line, and I'll take care of that.
|
|
||||||
|
|
||||||
The SAS/C flavour (smakefile) should get the library built using the "large data"
|
|
||||||
model. This rules out the use of residentable programs as the startup code I'm
|
|
||||||
using is very primitive (startup.o) and doesn't tinker with A4 relative data
|
|
||||||
addressing (and how this may be set up).
|
|
||||||
|
|
||||||
There are two makefiles for GCC, each a different flavour. There is "GNUmakefile.68k",
|
|
||||||
which will build the library for GCC on the 68k platform ("classic" Amiga). This
|
|
||||||
builds all variants of the library, for large data, small data, resident, whatever
|
|
||||||
model. It's a lot of work and I don't recommend you do this on a plain 68k machine.
|
|
||||||
It will literally (!) take hours. The other makefile flavour is for AmigaOS4 using
|
|
||||||
the PowerPC hosted GCC system ("GNUmakefile.os4"). This builds only the large data
|
|
||||||
version of the library, but this is usually all you need. Small data support is
|
|
||||||
currently not implemented but might follow in the future.
|
|
||||||
@@ -1,235 +0,0 @@
|
|||||||
An ISO 'C' (1994) compliant runtime library for the Amiga
|
|
||||||
=========================================================
|
|
||||||
|
|
||||||
1. What is this?
|
|
||||||
|
|
||||||
This is my attempt to get Samba 2.2.x ported to the Amiga. My first Amiga
|
|
||||||
port required SAS/C and a number of strange tricks had to be pulled to get
|
|
||||||
it to support the kind of environment Samba needed. But with the
|
|
||||||
introduction of Samba 2.2.x many of those tricks did not work any more,
|
|
||||||
which is why I decided to attack the problem at the root, namely the
|
|
||||||
runtime library.
|
|
||||||
|
|
||||||
Because it was no longer possible to build Samba with SAS/C on the new
|
|
||||||
Amiga platform, the idea came up to move development to the GNU 'C'
|
|
||||||
compiler. This turned out to be a challenge due to its somewhat
|
|
||||||
underdeveloped runtime library and header files. Eventually, I decided to
|
|
||||||
rewrite that library from scratch.
|
|
||||||
|
|
||||||
|
|
||||||
2. What does it do?
|
|
||||||
|
|
||||||
Using "'C' - A reference manual" as a reference I wrote a set of header
|
|
||||||
files, then proceeded to implement each single function referenced in them.
|
|
||||||
With few exceptions in the area of wide character support, the result
|
|
||||||
should be a feature complete implementation of the ISO 'C' (1994) runtime
|
|
||||||
library.
|
|
||||||
|
|
||||||
Because Samba needs a few POSIX-like routines to be supported, the library
|
|
||||||
functionality is complemented by a set of routines described in "Advanced
|
|
||||||
programming in the Unix environent". This set is not complete, however. It
|
|
||||||
will have to grow even further to accomodate for Samba's needs, but this is
|
|
||||||
a good start. I specifically added hooks for integrating socket I/O at a
|
|
||||||
later point of time.
|
|
||||||
|
|
||||||
This is not a portable implementation of the library in the sense that you
|
|
||||||
could move it from one 'C' compiler on one operating system to another.
|
|
||||||
This is an Amiga specific implementation.
|
|
||||||
|
|
||||||
The library supports floating point math, which is limited to IEEE single
|
|
||||||
and double precision or M68881 inline math. There is no support for the
|
|
||||||
fast floating point (FFP) format or exclusive IEEE single precision. You
|
|
||||||
either get double precision (IEEE math) or extended precision (M68881
|
|
||||||
inline math). What it is that you get is determined at compile time. Use
|
|
||||||
the IEEE_FLOATING_POINT_SUPPORT preprocessor symbol to activate IEEE math
|
|
||||||
code and the M68881_FLOATING_POINT_SUPPORT symbol for M68881 inline math.
|
|
||||||
|
|
||||||
Not unlike SAS/C, you can configure a minimum stack size the program is to
|
|
||||||
use when it starts up. This is controlled via the '__stack_size' variable
|
|
||||||
(see "stdlib_main.c").
|
|
||||||
|
|
||||||
I added some amiga.lib and debug.lib functionality to the library, but
|
|
||||||
don't count on it to be complete.
|
|
||||||
|
|
||||||
|
|
||||||
3. What does it not do?
|
|
||||||
|
|
||||||
This library is a departure from the typical 'C' runtime environments of
|
|
||||||
the past which had to run on all AmigaOS releases, down to Kickstart 1.1.
|
|
||||||
This very library was designed to take advantage of the routines available
|
|
||||||
since Kickstart 2.04 was introduced and virtually nobody ever put to use.
|
|
||||||
This helps to cut the code size, and it also helps to keep bugs out of the
|
|
||||||
library by falling back onto well-tested implementations. However, the
|
|
||||||
catch is that the code won't run under Kickstart 1.3 and below. But then
|
|
||||||
these operating system releases have been obsolete for more than a decade,
|
|
||||||
and you can always go back to a compiler environment which supports them.
|
|
||||||
|
|
||||||
Practically all library routines are implemented in a sort of naïve
|
|
||||||
fashion. That is, they contain virtually no optimizations whatsoever. This
|
|
||||||
is particularly apparent in workhorses such as memset() or memmove(). But
|
|
||||||
then, the issue is easy testability and Amiga platform portability.
|
|
||||||
|
|
||||||
There is very little support for amiga.lib functionality. There is
|
|
||||||
NewList(), HookEntry(), CallHook(), CallHookA(), the DoMethod() family, the
|
|
||||||
RexxVars family, but that's all. If you need more, you would have to
|
|
||||||
implement it yourself. Put another way, if you absolutely need
|
|
||||||
functionality that is only found in amiga.lib, you really shouldn't need in
|
|
||||||
in the first place.
|
|
||||||
|
|
||||||
|
|
||||||
4. Where does the source code come from?
|
|
||||||
|
|
||||||
I originally thought that it might be helpful to piece this library
|
|
||||||
together from various sources, such as the BSD libc. Turned out that this
|
|
||||||
code was so 'portable' that it became much more complex than it ought to
|
|
||||||
be. Also, some side-effects were present which considerably changed the
|
|
||||||
behaviour of the library. For example, the BSD libc uses bcopy() as an
|
|
||||||
alias for memcpy(), and unlike memcpy() is documented to, bcopy() supports
|
|
||||||
overlapping copies.
|
|
||||||
|
|
||||||
Eventually, I wrote virtually all the code myself, borrowing algorithmic
|
|
||||||
ideas from the BSD libc and the Manx Aztec 'C' runtime library. Because I
|
|
||||||
don't know much about the environment GCC expects, I borrowed code snippets
|
|
||||||
from libnix, which was written by Matthias Fleischer and Gunther Nikl. This
|
|
||||||
in particular concerns the integer and floating point math support, the
|
|
||||||
setjmp/longjmp routines and the startup code. The M68881 inline math code
|
|
||||||
comes from the <math-68881.h> file written by Matthew Self
|
|
||||||
(self@bayes.arc.nasa.gov).
|
|
||||||
|
|
||||||
|
|
||||||
5. Limitations and caveats
|
|
||||||
|
|
||||||
There is hardly any documentation on the code I wrote. In part this is due
|
|
||||||
to the fact that the code itself is very simple in design. It should speak
|
|
||||||
for itself. However, to make a usable runtime library you have to have a
|
|
||||||
user documentation as in man pages or autodocs. We will eventually have to
|
|
||||||
have autodocs for this library.
|
|
||||||
|
|
||||||
The code is currently plastered with assertions and debug code. It is
|
|
||||||
therefore much larger than it ought to be and runs much slower than it
|
|
||||||
ought to be. For example, the malloc() routine will set the contents of the
|
|
||||||
memory allocated to a 'dirty' bit pattern which is likely to break software
|
|
||||||
which makes assumptions about its contents. Likewise, the free() routine
|
|
||||||
will trash the memory to deallocate with a different 'dirty' bit pattern to
|
|
||||||
turn up reuse of memory after deallocation. All these debugging features
|
|
||||||
can be disabled by defining the NDEBUG preprocessor symbol at compile time
|
|
||||||
(see <assert.h>).
|
|
||||||
|
|
||||||
The exception handling in the math code is not particularly effective. For
|
|
||||||
one part this is due to the fact that there is no exception handler
|
|
||||||
installed by the runtime library when it starts up which could catch and
|
|
||||||
process the error conditions the CPU or FPU generates. The idea was to
|
|
||||||
provide for a portable runtime library with little to no assembly language
|
|
||||||
involved. To make the exception handling complete, such code would be
|
|
||||||
necessary.
|
|
||||||
|
|
||||||
The library currently builds under SAS/C, but because the 'normal' program
|
|
||||||
startup code is not utilized, the base relative (A4) addressing does not
|
|
||||||
work. If you are going to test it, use the data=faronly option to compile
|
|
||||||
the library and the programs.
|
|
||||||
|
|
||||||
If you are going to rebuild the library with SAS/C you will need to
|
|
||||||
reassign INCLUDE: to point to the local 'include' directory or things won't
|
|
||||||
work.
|
|
||||||
|
|
||||||
|
|
||||||
6. Conventions and design issues
|
|
||||||
|
|
||||||
You will have noticed the 330+ files in this directory. This is not the
|
|
||||||
best way to organize a runtime library, but at least all the bits and
|
|
||||||
pieces are in plain sight. Each file stands for the one or two routines it
|
|
||||||
contains. The name indicates what routine(s) that might be. Each file name
|
|
||||||
is prefixed by the name of the header file in which the corresponding
|
|
||||||
routine is defined. So, for example, you will find that "unistd_lchown.c"
|
|
||||||
contains the definition of the lchown() routine, which has its prototype
|
|
||||||
defined in the <unistd.h> header file.
|
|
||||||
|
|
||||||
Internal function and variable names are prefixed with two underscores, as
|
|
||||||
in '__stdio_init()'.
|
|
||||||
|
|
||||||
All routines attempt to do error checking on their parameters. They will
|
|
||||||
either drop into an assert() or set an errno value and refuse to go any
|
|
||||||
further. This cuts performance but should help to catch the simple bugs
|
|
||||||
quite easily (NULL pointers).
|
|
||||||
|
|
||||||
Just like any halfway sane Amiga 'C' runtime library, this one performs its
|
|
||||||
^C checking in the I/O routines. Typically once upon entry and in every
|
|
||||||
iteration of the loop there might be it will quickly poll the ^C signal and
|
|
||||||
drop into raise(SIGINT) in case the signal is set. This is just about the
|
|
||||||
safest method to solve the problem and should be much more robust than the
|
|
||||||
ixemul approach of 'interrupt anywhere - crash anywhere' using the task
|
|
||||||
switch/launch hooks to test for signals.
|
|
||||||
|
|
||||||
By default all library routines follow the ISO 'C' conventions in that
|
|
||||||
where implementation defined behaviour is permitted, the AmigaOS rules are
|
|
||||||
followed. For example, unlink() will by default operate like DeleteFile()
|
|
||||||
and rename() will return with an error code set if the name of the
|
|
||||||
file/directory to be renamed would collide with an existing directory
|
|
||||||
entry. However, your program can set a global variable '__unix_semantics'
|
|
||||||
which will cause some routines to perform like their Unix counterparts.
|
|
||||||
This is necessary for Samba to work but not a generally desirable feature.
|
|
||||||
You have some Unix-like behaviour, but the environment itself is not
|
|
||||||
completely Unix- or POSIX-compliant. And it shouldn't be. Don't make the
|
|
||||||
mistake of trying to mold the environment into a POSIX emulation. It
|
|
||||||
doesn't work; AmigaOS is not Unix.
|
|
||||||
|
|
||||||
|
|
||||||
7. The startup code
|
|
||||||
|
|
||||||
There are three program startup files provided. The most simplistic is in
|
|
||||||
'startup.c' which I use for SAS/C. It just invokes the setup routine which
|
|
||||||
eventually calls main() and drops straight into exit().
|
|
||||||
|
|
||||||
The ncrt0.S file was adapted from the libnix startup code which sets up the
|
|
||||||
base relative data area, if necessary (the SMALL_DATA preprocessor symbol
|
|
||||||
must be defined).
|
|
||||||
|
|
||||||
The nrcrt0.S file was adapted from libnix startup code, too, and sets up
|
|
||||||
the base relative data area for programs to be made resident. Note that the
|
|
||||||
geta4() stub is missing here; it wouldn't work in a resident program
|
|
||||||
anyway.
|
|
||||||
|
|
||||||
The ncrt0.S and nrcrt0.S files are considerably smaller and less complex
|
|
||||||
than the libnix code they are based on. This is because in this library
|
|
||||||
design all the more complex tasks are performed in the stdlib_main.c file
|
|
||||||
rather than in assembly language.
|
|
||||||
|
|
||||||
|
|
||||||
8. Documentation
|
|
||||||
|
|
||||||
Well, you're reading it. There isn't anything much yet. You can consult the book
|
|
||||||
"'C' - A reference manual" and you could look at the Open Group's Single Unix
|
|
||||||
Specification at <http://www.opengroup.org/onlinepubs/007904975>.
|
|
||||||
|
|
||||||
|
|
||||||
9. Legal status
|
|
||||||
|
|
||||||
Because this library is in part based upon free software it would be uncourteous
|
|
||||||
not to make it free software itself. The BSD license would probably be
|
|
||||||
appropriate here.
|
|
||||||
|
|
||||||
The PowerPC math library is based in part on work by Sun Microsystems:
|
|
||||||
|
|
||||||
====================================================
|
|
||||||
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
||||||
|
|
||||||
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
||||||
Permission to use, copy, modify, and distribute this
|
|
||||||
software is freely granted, provided that this notice
|
|
||||||
is preserved.
|
|
||||||
====================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
10. Contacting the author
|
|
||||||
|
|
||||||
The basic work was done by Olaf Barthel during two weeks in July 2002. You
|
|
||||||
can reach me at:
|
|
||||||
|
|
||||||
Olaf Barthel
|
|
||||||
Gneisenaustr. 43
|
|
||||||
D-31275 Lehrte
|
|
||||||
|
|
||||||
Or via e-mail:
|
|
||||||
|
|
||||||
olsen@sourcery.han.de
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,888 +0,0 @@
|
|||||||
#
|
|
||||||
# $Id: GNUmakefile.os4,v 1.5 2004-08-16 09:33:11 obarthel Exp $
|
|
||||||
#
|
|
||||||
# :ts=8
|
|
||||||
#
|
|
||||||
# -*- mode: makefile; -*-
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# You may have to tweak this for the native OS4 compiler
|
|
||||||
SDK_INCLUDE = $(V)/include
|
|
||||||
NET_INCLUDE = netinclude
|
|
||||||
|
|
||||||
# These are for the cross compiler
|
|
||||||
CC = ppc-amigaos-gcc
|
|
||||||
AR = ppc-amigaos-ar -q
|
|
||||||
RANLIB = ppc-amigaos-ranlib
|
|
||||||
COPY = cp
|
|
||||||
DELETE = rm -r
|
|
||||||
MAKEDIR = mkdir
|
|
||||||
|
|
||||||
# The following are for the native OS4 compiler
|
|
||||||
# CC = gcc
|
|
||||||
# AR = ar -q
|
|
||||||
# RANLIB = ranlib
|
|
||||||
# COPY = copy
|
|
||||||
# DELETE = delete all quiet
|
|
||||||
# MAKEDIR = makedir
|
|
||||||
|
|
||||||
MAKE = make -f GNUmakefile.os4
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
ifeq (,$(TYPE))
|
|
||||||
LIBC_OBJS = libc_objs
|
|
||||||
LIBUNIX_OBJS = libunix_objs
|
|
||||||
LIBM_OBJS = libm_objs
|
|
||||||
LIBSTACK_OBJS = libstack_objs
|
|
||||||
LIBNET_OBJS = libnet_objs
|
|
||||||
LIBDEBUG_OBJS = libdebug_objs
|
|
||||||
LIBAMIGA_OBJS = libamiga_objs
|
|
||||||
else
|
|
||||||
LIBC_OBJS = $(TYPE)/libc_objs
|
|
||||||
LIBUNIX_OBJS = $(TYPE)/libunix_objs
|
|
||||||
LIBM_OBJS = $(TYPE)/libm_objs
|
|
||||||
LIBSTACK_OBJS = $(TYPE)/libstack_objs
|
|
||||||
LIBNET_OBJS = $(TYPE)/libnet_objs
|
|
||||||
LIBDEBUG_OBJS = $(TYPE)/libdebug_objs
|
|
||||||
LIBAMIGA_OBJS = $(TYPE)/libamiga_objs
|
|
||||||
endif
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
@echo "Compiling $<"
|
|
||||||
@$(CC) -c $(CFLAGS) -DPPC_FLOATING_POINT_SUPPORT $<
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):c]"
|
|
||||||
@$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
$(LIBUNIX_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):unix]"
|
|
||||||
@$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $<
|
|
||||||
|
|
||||||
$(LIBM_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):m]"
|
|
||||||
@$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) -DPPC_FLOATING_POINT_SUPPORT $<
|
|
||||||
|
|
||||||
$(LIBSTACK_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):stack]"
|
|
||||||
@$(CC) -o $(LIBSTACK_OBJS)/$*.o -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
$(LIBNET_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):net]"
|
|
||||||
@$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $<
|
|
||||||
|
|
||||||
$(LIBDEBUG_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):debug]"
|
|
||||||
@$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
$(LIBAMIGA_OBJS)/%.o : %.c
|
|
||||||
@echo "Compiling $< [$(TYPE):amiga]"
|
|
||||||
@$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $<
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
ifeq (small_data,$(TYPE))
|
|
||||||
CODE_TYPE := -msdata=sysv -DSMALL_DATA
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (large_data,$(TYPE))
|
|
||||||
CODE_TYPE := -msdata=data
|
|
||||||
endif
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
WARNINGS = \
|
|
||||||
-Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
|
|
||||||
-Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion
|
|
||||||
|
|
||||||
INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE)
|
|
||||||
OPTIONS = -DNDEBUG -DUSE_64_BIT_INTS -fno-builtin -D__USE_INLINE__ -Wa,-mregnames
|
|
||||||
OPTIMIZE = -O3 -fomit-frame-pointer -funroll-loops
|
|
||||||
#DEBUG = -g
|
|
||||||
|
|
||||||
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES)
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
C_LIB = \
|
|
||||||
c.lib_rev.o \
|
|
||||||
ctype_isalnum.o \
|
|
||||||
ctype_isalpha.o \
|
|
||||||
ctype_isascii.o \
|
|
||||||
ctype_iscntrl.o \
|
|
||||||
ctype_isdigit.o \
|
|
||||||
ctype_isgraph.o \
|
|
||||||
ctype_islower.o \
|
|
||||||
ctype_isprint.o \
|
|
||||||
ctype_ispunct.o \
|
|
||||||
ctype_isspace.o \
|
|
||||||
ctype_isupper.o \
|
|
||||||
ctype_isxdigit.o \
|
|
||||||
ctype_tolower.o \
|
|
||||||
ctype_toupper.o \
|
|
||||||
ctype_table.o \
|
|
||||||
dirent_closedir.o \
|
|
||||||
dirent_data.o \
|
|
||||||
dirent_opendir.o \
|
|
||||||
dirent_readdir.o \
|
|
||||||
dirent_rewinddir.o \
|
|
||||||
errno_data.o \
|
|
||||||
fcntl_close.o \
|
|
||||||
fcntl_creat.o \
|
|
||||||
fcntl_fcntl.o \
|
|
||||||
fcntl_lseek.o \
|
|
||||||
fcntl_open.o \
|
|
||||||
fcntl_read.o \
|
|
||||||
fcntl_write.o \
|
|
||||||
libgen_basename.o \
|
|
||||||
libgen_dirname.o \
|
|
||||||
locale_data.o \
|
|
||||||
locale_init_exit.o \
|
|
||||||
locale_localeconv.o \
|
|
||||||
locale_setlocale.o \
|
|
||||||
mount_convertinfo.o \
|
|
||||||
mount_fstatfs.o \
|
|
||||||
mount_statfs.o \
|
|
||||||
signal_checkabort.o \
|
|
||||||
signal_data.o \
|
|
||||||
signal_kill.o \
|
|
||||||
signal_raise.o \
|
|
||||||
signal_sigaddset.o \
|
|
||||||
signal_sigblock.o \
|
|
||||||
signal_sigemptyset.o \
|
|
||||||
signal_sigmask.o \
|
|
||||||
signal_signal.o \
|
|
||||||
signal_sigprocmask.o \
|
|
||||||
signal_sigsetmask.o \
|
|
||||||
stat_chmod.o \
|
|
||||||
stat_convertfileinfo.o \
|
|
||||||
stat_data.o \
|
|
||||||
stat_fchmod.o \
|
|
||||||
stat_fstat.o \
|
|
||||||
stat_lstat.o \
|
|
||||||
stat_mkdir.o \
|
|
||||||
stat_rmdir.o \
|
|
||||||
stat_stat.o \
|
|
||||||
stat_umask.o \
|
|
||||||
stdio_asprintf.o \
|
|
||||||
stdio_clearerr.o \
|
|
||||||
stdio_data.o \
|
|
||||||
stdio_dropiobreadbuffer.o \
|
|
||||||
stdio_duplicate_fd.o \
|
|
||||||
stdio_fclose.o \
|
|
||||||
stdio_fdhookentry.o \
|
|
||||||
stdio_feof.o \
|
|
||||||
stdio_ferror.o \
|
|
||||||
stdio_fflush.o \
|
|
||||||
stdio_flush.o \
|
|
||||||
stdio_fgetc.o \
|
|
||||||
stdio_fgetpos.o \
|
|
||||||
stdio_fgets.o \
|
|
||||||
stdio_filliobreadbuffer.o \
|
|
||||||
stdio_findvacantfdentry.o \
|
|
||||||
stdio_findvacantiobentry.o \
|
|
||||||
stdio_flushiobwritebuffer.o \
|
|
||||||
stdio_fopen.o \
|
|
||||||
stdio_fprintf.o \
|
|
||||||
stdio_fputc.o \
|
|
||||||
stdio_fputs.o \
|
|
||||||
stdio_fread.o \
|
|
||||||
stdio_freopen.o \
|
|
||||||
stdio_fscanf.o \
|
|
||||||
stdio_fseek.o \
|
|
||||||
stdio_fsetpos.o \
|
|
||||||
stdio_ftell.o \
|
|
||||||
stdio_fwrite.o \
|
|
||||||
stdio_getc.o \
|
|
||||||
stdio_getchar.o \
|
|
||||||
stdio_get_file_descriptor.o \
|
|
||||||
stdio_gets.o \
|
|
||||||
stdio_growfdtable.o \
|
|
||||||
stdio_growiobtable.o \
|
|
||||||
stdio_initializefd.o \
|
|
||||||
stdio_initializeiob.o \
|
|
||||||
stdio_init_exit.o \
|
|
||||||
stdio_iobhookentry.o \
|
|
||||||
stdio_locksemaphorename.o \
|
|
||||||
stdio_nostdio.o \
|
|
||||||
stdio_openiob.o \
|
|
||||||
stdio_perror.o \
|
|
||||||
stdio_popen.o \
|
|
||||||
stdio_printf.o \
|
|
||||||
stdio_putc.o \
|
|
||||||
stdio_putchar.o \
|
|
||||||
stdio_puts.o \
|
|
||||||
stdio_remove.o \
|
|
||||||
stdio_rename.o \
|
|
||||||
stdio_rewind.o \
|
|
||||||
stdio_scanf.o \
|
|
||||||
stdio_setbuf.o \
|
|
||||||
stdio_setvbuf.o \
|
|
||||||
stdio_snprintf.o \
|
|
||||||
stdio_sprintf.o \
|
|
||||||
stdio_sscanf.o \
|
|
||||||
stdio_sscanf_hook_entry.o \
|
|
||||||
stdio_tmpfile.o \
|
|
||||||
stdio_tmpnam.o \
|
|
||||||
stdio_translateioerror.o \
|
|
||||||
stdio_ungetc.o \
|
|
||||||
stdio_vasprintf.o \
|
|
||||||
stdio_vasprintf_hook_entry.o \
|
|
||||||
stdio_vfprintf.o \
|
|
||||||
stdio_vfscanf.o \
|
|
||||||
stdio_vprintf.o \
|
|
||||||
stdio_vsnprintf.o \
|
|
||||||
stdio_vsnprintf_hook_entry.o \
|
|
||||||
stdio_vsprintf.o \
|
|
||||||
stdio_vsprintf_hook_entry.o \
|
|
||||||
stdlib_abort.o \
|
|
||||||
stdlib_abs.o \
|
|
||||||
stdlib_alloca.o \
|
|
||||||
stdlib_assertion_failure.o \
|
|
||||||
stdlib_atexit.o \
|
|
||||||
stdlib_atoi.o \
|
|
||||||
stdlib_atol.o \
|
|
||||||
stdlib_bsearch.o \
|
|
||||||
stdlib_calloc.o \
|
|
||||||
stdlib_data.o \
|
|
||||||
stdlib_default_pool_size.o \
|
|
||||||
stdlib_default_puddle_size.o \
|
|
||||||
stdlib_destructor.o \
|
|
||||||
stdlib_disablerequesters.o \
|
|
||||||
stdlib_div.o \
|
|
||||||
stdlib_modsi3.o \
|
|
||||||
stdlib_divsi3.o \
|
|
||||||
stdlib_divsi4.o \
|
|
||||||
stdlib_umodsi3.o \
|
|
||||||
stdlib_udivsi3.o \
|
|
||||||
stdlib_udivsi4.o \
|
|
||||||
stdlib_exit.o \
|
|
||||||
stdlib_free.o \
|
|
||||||
stdlib_getenv.o \
|
|
||||||
stdlib_getsp.o \
|
|
||||||
stdlib_init_exit.o \
|
|
||||||
stdlib_labs.o \
|
|
||||||
stdlib_ldiv.o \
|
|
||||||
stdlib_getdefstacksize.o \
|
|
||||||
stdlib_stackargbytes.o \
|
|
||||||
stdlib_stack_usage.o \
|
|
||||||
stdlib_checkdetach.o \
|
|
||||||
stdlib_detach.o \
|
|
||||||
stdlib_isresident.o \
|
|
||||||
stdlib_sysbase.o \
|
|
||||||
stdlib_dosbase.o \
|
|
||||||
stdlib_machine_test.o \
|
|
||||||
stdlib_malloc.o \
|
|
||||||
stdlib_math.o \
|
|
||||||
stdlib_mkdtemp.o \
|
|
||||||
stdlib_mkstemp.o \
|
|
||||||
stdlib_mktemp.o \
|
|
||||||
stdlib_mulsi3.o \
|
|
||||||
stdlib_never_free.o \
|
|
||||||
stdlib_putenv.o \
|
|
||||||
stdlib_qsort.o \
|
|
||||||
stdlib_rand.o \
|
|
||||||
stdlib_realloc.o \
|
|
||||||
stdlib_red_black.o \
|
|
||||||
stdlib_setenv.o \
|
|
||||||
stdlib_setjmp.o \
|
|
||||||
stdlib_shell_escape.o \
|
|
||||||
stdlib_showerror.o \
|
|
||||||
stdlib_socket.o \
|
|
||||||
stdlib_srand.o \
|
|
||||||
stdlib_stackcheck.o \
|
|
||||||
stdlib_stackoverflow.o \
|
|
||||||
stdlib_stacksafezone.o \
|
|
||||||
stdlib_stacksize.o \
|
|
||||||
stdlib_startup.o \
|
|
||||||
stdlib_strtol.o \
|
|
||||||
stdlib_strtoul.o \
|
|
||||||
stdlib_swapstack.o \
|
|
||||||
stdlib_system.o \
|
|
||||||
stdlib_termination_message.o \
|
|
||||||
stdlib_threshold.o \
|
|
||||||
stdlib_unsetenv.o \
|
|
||||||
stdlib_usergroup.o \
|
|
||||||
stdlib_wildcard_expand.o \
|
|
||||||
strings_strcasecmp.o \
|
|
||||||
strings_strncasecmp.o \
|
|
||||||
string_bcmp.o \
|
|
||||||
string_bcopy.o \
|
|
||||||
string_bzero.o \
|
|
||||||
string_index.o \
|
|
||||||
string_memchr.o \
|
|
||||||
string_memcmp.o \
|
|
||||||
string_memcpy.o \
|
|
||||||
string_memmove.o \
|
|
||||||
string_memset.o \
|
|
||||||
string_rindex.o \
|
|
||||||
string_strcat.o \
|
|
||||||
string_strchr.o \
|
|
||||||
string_strcmp.o \
|
|
||||||
string_strcoll.o \
|
|
||||||
string_strcpy.o \
|
|
||||||
string_strcspn.o \
|
|
||||||
string_strdup.o \
|
|
||||||
string_strerror.o \
|
|
||||||
string_strlen.o \
|
|
||||||
string_strncat.o \
|
|
||||||
string_strncmp.o \
|
|
||||||
string_strncpy.o \
|
|
||||||
string_strpbrk.o \
|
|
||||||
string_strrchr.o \
|
|
||||||
string_strspn.o \
|
|
||||||
string_strstr.o \
|
|
||||||
string_strtok.o \
|
|
||||||
string_strxfrm.o \
|
|
||||||
time_asctime.o \
|
|
||||||
time_clock.o \
|
|
||||||
time_converttime.o \
|
|
||||||
time_ctime.o \
|
|
||||||
time_data.o \
|
|
||||||
time_gettimeofday.o \
|
|
||||||
time_gmtime.o \
|
|
||||||
time_localtime.o \
|
|
||||||
time_mktime.o \
|
|
||||||
time_numbertostring.o \
|
|
||||||
time_strftime.o \
|
|
||||||
time_time.o \
|
|
||||||
unistd_access.o \
|
|
||||||
unistd_chdir.o \
|
|
||||||
unistd_chown.o \
|
|
||||||
unistd_currentpathname.o \
|
|
||||||
unistd_data.o \
|
|
||||||
unistd_dup.o \
|
|
||||||
unistd_dup2.o \
|
|
||||||
unistd_fchown.o \
|
|
||||||
unistd_fdopen.o \
|
|
||||||
unistd_fileno.o \
|
|
||||||
unistd_ftruncate.o \
|
|
||||||
unistd_getcwd.o \
|
|
||||||
unistd_getopt.o \
|
|
||||||
unistd_getpid.o \
|
|
||||||
unistd_init_exit.o \
|
|
||||||
unistd_isatty.o \
|
|
||||||
unistd_lchown.o \
|
|
||||||
unistd_link.o \
|
|
||||||
unistd_readlink.o \
|
|
||||||
unistd_realpath.o \
|
|
||||||
unistd_sleep.o \
|
|
||||||
unistd_symlink.o \
|
|
||||||
unistd_truncate.o \
|
|
||||||
unistd_unlink.o \
|
|
||||||
utime_utime.o
|
|
||||||
|
|
||||||
|
|
||||||
UNIX_LIB = \
|
|
||||||
unix.lib_rev.o \
|
|
||||||
dirent_closedir.o \
|
|
||||||
dirent_data.o \
|
|
||||||
dirent_opendir.o \
|
|
||||||
dirent_readdir.o \
|
|
||||||
dirent_rewinddir.o \
|
|
||||||
fcntl_creat.o \
|
|
||||||
fcntl_fcntl.o \
|
|
||||||
fcntl_open.o \
|
|
||||||
mount_convertinfo.o \
|
|
||||||
mount_statfs.o \
|
|
||||||
stat_chmod.o \
|
|
||||||
stat_fstat.o \
|
|
||||||
stat_lstat.o \
|
|
||||||
stat_mkdir.o \
|
|
||||||
stat_rmdir.o \
|
|
||||||
stat_stat.o \
|
|
||||||
stdio_fdhookentry.o \
|
|
||||||
stdio_init_exit.o \
|
|
||||||
stdio_locksemaphorename.o \
|
|
||||||
stdio_openiob.o \
|
|
||||||
stdio_fflush.o \
|
|
||||||
stdio_fopen.o \
|
|
||||||
stdio_fopen.o \
|
|
||||||
stdio_popen.o \
|
|
||||||
stdio_remove.o \
|
|
||||||
stdio_rename.o \
|
|
||||||
stdlib_mkdtemp.o \
|
|
||||||
stdlib_mkstemp.o \
|
|
||||||
stdlib_mkstemp.o \
|
|
||||||
stdlib_mktemp.o \
|
|
||||||
stdlib_system.o \
|
|
||||||
unistd_access.o \
|
|
||||||
unistd_chdir.o \
|
|
||||||
unistd_chown.o \
|
|
||||||
unistd_getcwd.o \
|
|
||||||
unistd_lchown.o \
|
|
||||||
unistd_link.o \
|
|
||||||
unistd_readlink.o \
|
|
||||||
unistd_realpath.o \
|
|
||||||
unistd_restorepathname.o \
|
|
||||||
unistd_setcurrentpath.o \
|
|
||||||
unistd_strip_double_slash.o \
|
|
||||||
unistd_translatea2u.o \
|
|
||||||
unistd_translaterel.o \
|
|
||||||
unistd_translateu2a.o \
|
|
||||||
unistd_truncate.o \
|
|
||||||
unistd_unix_path_semantics.o \
|
|
||||||
unistd_unlink.o \
|
|
||||||
unistd_wildcard_expand.o \
|
|
||||||
utime_utime.o
|
|
||||||
|
|
||||||
MATH_LIB = \
|
|
||||||
math_acos.o \
|
|
||||||
math_asin.o \
|
|
||||||
math_atan.o \
|
|
||||||
math_atan2.o \
|
|
||||||
math_ceil.o \
|
|
||||||
math_cos.o \
|
|
||||||
math_cosh.o \
|
|
||||||
math_data.o \
|
|
||||||
math_exp.o \
|
|
||||||
math_fabs.o \
|
|
||||||
math_floor.o \
|
|
||||||
math_fmod.o \
|
|
||||||
math_frexp.o \
|
|
||||||
math_hypot.o \
|
|
||||||
math_init_exit.o \
|
|
||||||
math_isnan.o \
|
|
||||||
math_isinf.o \
|
|
||||||
math_ldexp.o \
|
|
||||||
math_log.o \
|
|
||||||
math_log10.o \
|
|
||||||
math_logb.o \
|
|
||||||
math_modf.o \
|
|
||||||
math_pow.o \
|
|
||||||
math_rint.o \
|
|
||||||
math_rintf.o \
|
|
||||||
math_sin.o \
|
|
||||||
math_sinh.o \
|
|
||||||
math_sqrt.o \
|
|
||||||
math_tan.o \
|
|
||||||
math_tanh.o \
|
|
||||||
math_kernel_expm1.o \
|
|
||||||
math_kernel_scalbn.o \
|
|
||||||
math_kernel_tan.o \
|
|
||||||
math_kernel_cos.o \
|
|
||||||
math_kernel_rem_pio2.o \
|
|
||||||
math_kernel_sin.o \
|
|
||||||
stdio_asprintf.o \
|
|
||||||
stdio_flush.o \
|
|
||||||
stdio_fprintf.o \
|
|
||||||
stdio_fscanf.o \
|
|
||||||
stdio_printf.o \
|
|
||||||
stdio_scanf.o \
|
|
||||||
stdio_snprintf.o \
|
|
||||||
stdio_sprintf.o \
|
|
||||||
stdio_sscanf.o \
|
|
||||||
stdio_vasprintf.o \
|
|
||||||
stdio_vfprintf.o \
|
|
||||||
stdio_vfscanf.o \
|
|
||||||
stdio_vfscanf.o \
|
|
||||||
stdio_vprintf.o \
|
|
||||||
stdio_vsnprintf.o \
|
|
||||||
stdio_vsprintf.o \
|
|
||||||
stdlib_atof.o \
|
|
||||||
stdlib_machine_test.o \
|
|
||||||
stdlib_strtod.o \
|
|
||||||
time_difftime.o
|
|
||||||
|
|
||||||
MATH_LIB_IEEE = \
|
|
||||||
m.lib_rev.o \
|
|
||||||
$(MATH_LIB) \
|
|
||||||
math_adddf3.o \
|
|
||||||
math_addsf3.o \
|
|
||||||
math_divdf3.o \
|
|
||||||
math_divsf3.o \
|
|
||||||
math_eqdf2.o \
|
|
||||||
math_eqsf2.o \
|
|
||||||
math_extendsfdf2.o \
|
|
||||||
math_fixdfsi.o \
|
|
||||||
math_fixsfsi.o \
|
|
||||||
math_fixunsdfsi.o \
|
|
||||||
math_fixunssfsi.o \
|
|
||||||
math_floatsidf.o \
|
|
||||||
math_floatsisf.o \
|
|
||||||
math_gedf2.o \
|
|
||||||
math_gesf2.o \
|
|
||||||
math_gtdf2.o \
|
|
||||||
math_gtsf2.o \
|
|
||||||
math_ledf2.o \
|
|
||||||
math_lesf2.o \
|
|
||||||
math_ltdf2.o \
|
|
||||||
math_ltsf2.o \
|
|
||||||
math_muldf3.o \
|
|
||||||
math_mulsf3.o \
|
|
||||||
math_nedf2.o \
|
|
||||||
math_negdf2.o \
|
|
||||||
math_negsf2.o \
|
|
||||||
math_nesf2.o \
|
|
||||||
math_subdf3.o \
|
|
||||||
math_subsf3.o \
|
|
||||||
math_truncdfsf2.o
|
|
||||||
|
|
||||||
STACK_LIB = \
|
|
||||||
stack.lib_rev.o \
|
|
||||||
stdlib_setjmp.o \
|
|
||||||
stdlib_stackextension.o \
|
|
||||||
stdlib_stackminframe.o \
|
|
||||||
stdlib_stackoverflow.o \
|
|
||||||
stdlib_stacksafezone.o
|
|
||||||
|
|
||||||
NET_LIB = \
|
|
||||||
net.lib_rev.o \
|
|
||||||
socket_accept.o \
|
|
||||||
socket_bind.o \
|
|
||||||
socket_connect.o \
|
|
||||||
socket_data.o \
|
|
||||||
socket_gethostbyaddr.o \
|
|
||||||
socket_gethostbyname.o \
|
|
||||||
socket_gethostid.o \
|
|
||||||
socket_gethostname.o \
|
|
||||||
socket_getnetbyaddr.o \
|
|
||||||
socket_getnetbyname.o \
|
|
||||||
socket_getpeername.o \
|
|
||||||
socket_getprotobyname.o \
|
|
||||||
socket_getprotobynumber.o \
|
|
||||||
socket_getservbyname.o \
|
|
||||||
socket_getservbyport.o \
|
|
||||||
socket_getsockname.o \
|
|
||||||
socket_getsockopt.o \
|
|
||||||
socket_get_descriptor.o \
|
|
||||||
socket_inet_addr.o \
|
|
||||||
socket_inet_aton.o \
|
|
||||||
socket_inet_lnaof.o \
|
|
||||||
socket_inet_makeaddr.o \
|
|
||||||
socket_inet_netof.o \
|
|
||||||
socket_inet_network.o \
|
|
||||||
socket_inet_ntoa.o \
|
|
||||||
socket_init_exit.o \
|
|
||||||
socket_ioctl.o \
|
|
||||||
socket_isdaemon.o \
|
|
||||||
socket_listen.o \
|
|
||||||
socket_recv.o \
|
|
||||||
socket_recvfrom.o \
|
|
||||||
socket_recvmsg.o \
|
|
||||||
socket_select.o \
|
|
||||||
socket_send.o \
|
|
||||||
socket_sendmsg.o \
|
|
||||||
socket_sendto.o \
|
|
||||||
socket_setsockopt.o \
|
|
||||||
socket_shutdown.o \
|
|
||||||
socket_socket.o \
|
|
||||||
socket_hook_entry.o \
|
|
||||||
socket_hstrerror.o \
|
|
||||||
usergroup_crypt.o \
|
|
||||||
usergroup_data.o \
|
|
||||||
usergroup_endgrent.o \
|
|
||||||
usergroup_endpwent.o \
|
|
||||||
usergroup_getegid.o \
|
|
||||||
usergroup_geteuid.o \
|
|
||||||
usergroup_getgid.o \
|
|
||||||
usergroup_getgrent.o \
|
|
||||||
usergroup_getgrgid.o \
|
|
||||||
usergroup_getgrnam.o \
|
|
||||||
usergroup_getgroups.o \
|
|
||||||
usergroup_getpass.o \
|
|
||||||
usergroup_getpwent.o \
|
|
||||||
usergroup_getpwnam.o \
|
|
||||||
usergroup_getpwuid.o \
|
|
||||||
usergroup_getuid.o \
|
|
||||||
usergroup_initgroups.o \
|
|
||||||
usergroup_init_exit.o \
|
|
||||||
usergroup_rootmode.o \
|
|
||||||
usergroup_setegid.o \
|
|
||||||
usergroup_seteuid.o \
|
|
||||||
usergroup_setgid.o \
|
|
||||||
usergroup_setgrent.o \
|
|
||||||
usergroup_setgroups.o \
|
|
||||||
usergroup_setpwent.o \
|
|
||||||
usergroup_setregid.o \
|
|
||||||
usergroup_setreuid.o \
|
|
||||||
usergroup_setsid.o \
|
|
||||||
usergroup_setuid.o \
|
|
||||||
stat_umask.o
|
|
||||||
|
|
||||||
DEBUG_LIB = \
|
|
||||||
debug.lib_rev.o \
|
|
||||||
debug.o \
|
|
||||||
debug_level.o \
|
|
||||||
debug_cmpstrexec.o \
|
|
||||||
debug_kcmpstr.o \
|
|
||||||
debug_kdofmt.o \
|
|
||||||
debug_kgetc.o \
|
|
||||||
debug_kgetch1.o \
|
|
||||||
debug_kgetch2.o \
|
|
||||||
debug_kgetchar1.o \
|
|
||||||
debug_kgetchar2.o \
|
|
||||||
debug_kgetnum1.o \
|
|
||||||
debug_kgetnum2.o \
|
|
||||||
debug_kmaygetch.o \
|
|
||||||
debug_kmaygetchar.o \
|
|
||||||
debug_kprintf1.o \
|
|
||||||
debug_kprintf2.o \
|
|
||||||
debug_kputc.o \
|
|
||||||
debug_kputch1.o \
|
|
||||||
debug_kputch2.o \
|
|
||||||
debug_kputchar1.o \
|
|
||||||
debug_kputchar2.o \
|
|
||||||
debug_kputfmt.o \
|
|
||||||
debug_kputs1.o \
|
|
||||||
debug_kputs2.o \
|
|
||||||
debug_kputstr1.o \
|
|
||||||
debug_kputstr2.o \
|
|
||||||
debug_kvprintf1.o \
|
|
||||||
debug_kvprintf2.o
|
|
||||||
|
|
||||||
AMIGA_LIB = \
|
|
||||||
amiga.lib_rev.o \
|
|
||||||
amiga_acrypt.o \
|
|
||||||
amiga_addtof.o \
|
|
||||||
amiga_argarraydone.o \
|
|
||||||
amiga_argarrayinit.o \
|
|
||||||
amiga_argint.o \
|
|
||||||
amiga_argstring.o \
|
|
||||||
amiga_callhooka.o \
|
|
||||||
amiga_coercemethod.o \
|
|
||||||
amiga_createstdio.o \
|
|
||||||
amiga_deletestdio.o \
|
|
||||||
amiga_domethod.o \
|
|
||||||
amiga_dosupermethod.o \
|
|
||||||
amiga_dotimer.o \
|
|
||||||
amiga_fastrand.o \
|
|
||||||
amiga_freeievents.o \
|
|
||||||
amiga_hotkey.o \
|
|
||||||
amiga_invertstring.o \
|
|
||||||
amiga_rangerand.o \
|
|
||||||
amiga_remtof.o \
|
|
||||||
amiga_setsuperattrs.o \
|
|
||||||
amiga_timedelay.o \
|
|
||||||
amiga_waitbeam.o
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
LIBS := $(LIBC_OBJS)/libc.a $(LIBSTACK_OBJS)/libstack.a $(LIBUNIX_OBJS)/libunix.a \
|
|
||||||
$(LIBDEBUG_OBJS)/libdebug.a $(LIBAMIGA_OBJS)/libamiga.a \
|
|
||||||
$(LIBM_OBJS)/libm.a $(LIBNET_OBJS)/libnet.a
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
STARTUPS := crt0.o crtbegin.o crtend.o mainnb.o
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
all: \
|
|
||||||
lib/crt0.o \
|
|
||||||
lib/crtbegin.o \
|
|
||||||
lib/crtend.o \
|
|
||||||
lib/mainnb.o \
|
|
||||||
lib/libm.a
|
|
||||||
|
|
||||||
copy:
|
|
||||||
$(COPY) $(foreach file,$(LIBS),large_data/$(file)) lib
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-$(DELETE) $(TYPE) $(STARTUPS) \
|
|
||||||
$(LIBC_OBJS) $(LIBUNIX_OBJS) $(LIBM_OBJS) $(LIBSTACK_OBJS) $(LIBNET_OBJS) $(LIBDEBUG_OBJS) $(LIBAMIGA_OBJS)
|
|
||||||
|
|
||||||
realclean:
|
|
||||||
$(MAKE) clean
|
|
||||||
-$(DELETE) lib small_data large_data
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
version:
|
|
||||||
cp c.lib_rev.rev amiga.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev debug.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev m.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev m881.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev net.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev stack.lib_rev.rev
|
|
||||||
cp c.lib_rev.rev unix.lib_rev.rev
|
|
||||||
bumprev 1 amiga.lib
|
|
||||||
bumprev 1 c.lib
|
|
||||||
bumprev 1 debug.lib
|
|
||||||
bumprev 1 m.lib
|
|
||||||
bumprev 1 m881.lib
|
|
||||||
bumprev 1 net.lib
|
|
||||||
bumprev 1 stack.lib
|
|
||||||
bumprev 1 unix.lib
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
cvs-tag:
|
|
||||||
cvs -q tag V1_`cat c.lib_rev.rev`
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
kitchen_sink: $(TYPE) $(LIBS) $(STARTUPS)
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
ifneq (,$(TYPE))
|
|
||||||
$(TYPE):
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
lib:
|
|
||||||
-$(MAKEDIR) $@
|
|
||||||
|
|
||||||
lib/libm.a: lib
|
|
||||||
$(MAKE) TYPE=large_data kitchen_sink
|
|
||||||
$(COPY) $(foreach file,$(LIBS),large_data/$(file)) lib
|
|
||||||
|
|
||||||
lib/small-data/libm.a: lib lib/small-data
|
|
||||||
$(MAKE) TYPE=small_data kitchen_sink
|
|
||||||
$(COPY) $(foreach file,$(LIBS),small_data/$(file)) lib/small-data
|
|
||||||
|
|
||||||
lib/crt0.o : lib crt0.o
|
|
||||||
$(COPY) crt0.o lib
|
|
||||||
|
|
||||||
lib/crtbegin.o : lib crtbegin.o
|
|
||||||
$(COPY) crtbegin.o lib
|
|
||||||
|
|
||||||
lib/crtend.o : lib crtend.o
|
|
||||||
$(COPY) crtend.o lib
|
|
||||||
|
|
||||||
lib/mainnb.o : lib mainnb.o
|
|
||||||
$(COPY) mainnb.o lib
|
|
||||||
|
|
||||||
lib/mainb.o : lib mainb.o
|
|
||||||
$(COPY) mainb.o lib
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBAMIGA_OBJS)/amiga_hookentry.o : amiga_hookentry.c
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_getsp.o : stdlib_getsp.c
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_swapstack.o : stdlib_swapstack.c
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c
|
|
||||||
|
|
||||||
$(LIBSTACK_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_stacksize.o : stdlib_stacksize.c stdlib_gcc_help.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_shell_escape.o : stdlib_shell_escape.c stdlib_gcc_help.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_init_exit.o : stdlib_init_exit.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_mem_debug.h
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBC_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBC_OBJS)/libc.a : $(LIBC_OBJS) $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBUNIX_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBUNIX_OBJS)/libunix.a : $(LIBUNIX_OBJS) $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBM_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBM_OBJS)/libm.a : $(LIBM_OBJS) $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBSTACK_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBSTACK_OBJS)/libstack.a : $(LIBSTACK_OBJS) $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBNET_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBNET_OBJS)/libnet.a : $(LIBNET_OBJS) $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBDEBUG_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBDEBUG_OBJS)/libdebug.a : $(LIBDEBUG_OBJS) $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
$(LIBAMIGA_OBJS) :
|
|
||||||
$(MAKEDIR) $@
|
|
||||||
|
|
||||||
$(LIBAMIGA_OBJS)/libamiga.a : $(LIBAMIGA_OBJS) $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file))
|
|
||||||
-$(DELETE) $@
|
|
||||||
@$(AR) $@ $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file))
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
crt0.o : crt0.S
|
|
||||||
@echo "Assembling $<"
|
|
||||||
@$(CC) -Wa,-mregnames -o crt0.o -c crt0.S
|
|
||||||
|
|
||||||
bcrt0.o : crt0.S
|
|
||||||
@echo "Assembling $<"
|
|
||||||
@$(CC) -DSMALL_DATA -Wa,-mregnames -o bcrt0.o -c crt0.S
|
|
||||||
|
|
||||||
mainnb.o : stdlib_main.c
|
|
||||||
@echo "Compiling $<"
|
|
||||||
@$(CC) -o mainnb.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=data stdlib_main.c
|
|
||||||
|
|
||||||
mainb.o : stdlib_main.c
|
|
||||||
@echo "Compiling $<"
|
|
||||||
@$(CC) -o mainb.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA stdlib_main.c
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
mkid:
|
|
||||||
# mkid -v #?.(c|h|asm|i) include/#?.(c|h|asm|i) include/sys/#?.(c|h|asm|i)
|
|
||||||
mkid *.[ch] include/*.h include/sys/*.h
|
|
||||||
|
|
||||||
update:
|
|
||||||
mkid -v -u
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga.lib_rev.c,v 1.1.1.1 2004-07-26 16:30:15 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "amiga.lib_rev.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
char __amiga_lib_version[] = VERSTAG;
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#define VERSION 1
|
|
||||||
#define REVISION 171
|
|
||||||
#define DATE "16.8.2004"
|
|
||||||
#define VERS "amiga.lib 1.171"
|
|
||||||
#define VSTRING "amiga.lib 1.171 (16.8.2004)\r\n"
|
|
||||||
#define VERSTAG "\0$VER: amiga.lib 1.171 (16.8.2004)"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
171
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_acrypt.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/types.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define OSIZE 12
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
UBYTE *
|
|
||||||
ACrypt(UBYTE * buffer, const UBYTE * password, const UBYTE * user)
|
|
||||||
{
|
|
||||||
UBYTE * result = NULL;
|
|
||||||
LONG buf[OSIZE];
|
|
||||||
LONG i,d,k;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
assert( buffer != NULL && password != NULL && user != NULL );
|
|
||||||
|
|
||||||
SHOWPOINTER(buffer);
|
|
||||||
SHOWSTRING(password);
|
|
||||||
SHOWSTRING(user);
|
|
||||||
|
|
||||||
if(buffer == NULL || password == NULL || user == NULL)
|
|
||||||
{
|
|
||||||
SHOWMSG("invalid parameters");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = 0 ; i < OSIZE ; i++)
|
|
||||||
{
|
|
||||||
if((*password) != '\0')
|
|
||||||
d = (*password++);
|
|
||||||
else
|
|
||||||
d = i;
|
|
||||||
|
|
||||||
if((*user) != '\0')
|
|
||||||
d += (*user++);
|
|
||||||
else
|
|
||||||
d += i;
|
|
||||||
|
|
||||||
buf[i] = 'A' + d;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = 0 ; i < OSIZE ; i++)
|
|
||||||
{
|
|
||||||
for(k = 0 ; k < OSIZE ; k++)
|
|
||||||
buf[i] = (buf[i] + buf[OSIZE - k - 1]) % 53;
|
|
||||||
|
|
||||||
buffer[i] = buf[i] + 'A';
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer[OSIZE-1] = '\0';
|
|
||||||
|
|
||||||
SHOWSTRING(buffer);
|
|
||||||
|
|
||||||
result = buffer;
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_addtof.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/interrupts.h>
|
|
||||||
#include <hardware/intbits.h>
|
|
||||||
#include <graphics/graphint.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/graphics.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
typedef LONG (* CFUNC)(APTR arg);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static LONG INTERRUPT ASM
|
|
||||||
call_routine(REG(a1,struct Isrvstr *i))
|
|
||||||
{
|
|
||||||
CFUNC p = (CFUNC)i->ccode;
|
|
||||||
|
|
||||||
(*p)(i->Carg);
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
AddTOF(struct Isrvstr *i,CFUNC p,APTR arg)
|
|
||||||
{
|
|
||||||
assert( i != NULL && p != NULL );
|
|
||||||
|
|
||||||
i->code = (long (*)())call_routine;
|
|
||||||
i->Iptr = i;
|
|
||||||
i->ccode = p;
|
|
||||||
i->Carg = arg;
|
|
||||||
|
|
||||||
AddIntServer(INTB_VERTB,(struct Interrupt *)i);
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_argarraydone.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <workbench/workbench.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/icon.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern char **CXLIB_argarray;
|
|
||||||
|
|
||||||
extern struct DiskObject * CXLIB_disko;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ArgArrayDone(VOID)
|
|
||||||
{
|
|
||||||
if(CXLIB_argarray != NULL)
|
|
||||||
{
|
|
||||||
FreeVec(CXLIB_argarray);
|
|
||||||
CXLIB_argarray = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(CXLIB_disko != NULL)
|
|
||||||
{
|
|
||||||
FreeDiskObject(CXLIB_disko);
|
|
||||||
CXLIB_disko = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_argarrayinit.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <libraries/commodities.h>
|
|
||||||
#include <workbench/workbench.h>
|
|
||||||
#include <workbench/startup.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/dos.h>
|
|
||||||
#include <proto/icon.h>
|
|
||||||
#include <proto/commodities.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
const unsigned char ** CXLIB_argarray;
|
|
||||||
|
|
||||||
struct DiskObject * CXLIB_disko;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
STRPTR *
|
|
||||||
ArgArrayInit(LONG argc, CONST_STRPTR * argv)
|
|
||||||
{
|
|
||||||
unsigned char ** result = NULL;
|
|
||||||
|
|
||||||
if(argc != 0) /* run from CLI */
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if(argc == 1)
|
|
||||||
goto out; /* skip command name */
|
|
||||||
|
|
||||||
CXLIB_argarray = (const unsigned char **)AllocVec(sizeof(char *) * argc,MEMF_ANY|MEMF_CLEAR);
|
|
||||||
if(CXLIB_argarray == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
for(i = 1 ; i < argc ; i++)
|
|
||||||
CXLIB_argarray[i-1] = argv[i];
|
|
||||||
|
|
||||||
result = (unsigned char **)CXLIB_argarray;
|
|
||||||
}
|
|
||||||
else if (IconBase != NULL)
|
|
||||||
{
|
|
||||||
struct WBStartup * msg;
|
|
||||||
|
|
||||||
/* run from WB */
|
|
||||||
msg = (struct WBStartup *)argv;
|
|
||||||
|
|
||||||
CXLIB_disko = GetDiskObject(msg->sm_ArgList[0].wa_Name);
|
|
||||||
if(CXLIB_disko == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = (unsigned char **)CXLIB_disko->do_ToolTypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_argint.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <workbench/workbench.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/dos.h>
|
|
||||||
#include <proto/icon.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
ArgInt(CONST_STRPTR *tt,CONST_STRPTR entry,LONG default_val)
|
|
||||||
{
|
|
||||||
STRPTR str;
|
|
||||||
|
|
||||||
if(tt != NULL && IconBase != NULL && ((str = (STRPTR)FindToolType((STRPTR *)tt,(STRPTR)entry))) != NULL)
|
|
||||||
StrToLong(str,&default_val);
|
|
||||||
|
|
||||||
return(default_val);
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_argstring.c,v 1.1.1.1 2004-07-26 16:30:16 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <libraries/commodities.h>
|
|
||||||
#include <workbench/workbench.h>
|
|
||||||
#include <workbench/startup.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/icon.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
STRPTR
|
|
||||||
ArgString(CONST_STRPTR *tt,CONST_STRPTR entry,CONST_STRPTR default_string)
|
|
||||||
{
|
|
||||||
STRPTR result;
|
|
||||||
|
|
||||||
if(tt != NULL && IconBase != NULL && ((result = (STRPTR)FindToolType((STRPTR *)tt,(STRPTR)entry))) != NULL)
|
|
||||||
return(result);
|
|
||||||
else
|
|
||||||
return((STRPTR)default_string);
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_beginio.c,v 1.1.1.1 2004-07-26 16:30:17 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/devices.h>
|
|
||||||
#include <exec/io.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__SASC)
|
|
||||||
|
|
||||||
VOID __begin_io(struct IORequest * ior);
|
|
||||||
#pragma libcall DeviceBase __begin_io 01e 901
|
|
||||||
|
|
||||||
#endif /* __SASC */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __begin_io(ior) ({ \
|
|
||||||
struct IORequest * _BeginIO_ior = (ior); \
|
|
||||||
{ \
|
|
||||||
register struct Library * const __BeginIO__bn __asm("a6") = (struct Library *) (DeviceBase);\
|
|
||||||
register struct IORequest * __BeginIO_ior __asm("a1") = (_BeginIO_ior); \
|
|
||||||
__asm volatile ("jsr a6@(-30:W)" \
|
|
||||||
: \
|
|
||||||
: "r"(__BeginIO__bn), "r"(__BeginIO_ior) \
|
|
||||||
: "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory"); \
|
|
||||||
} \
|
|
||||||
})
|
|
||||||
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
BeginIO(struct IORequest *ior)
|
|
||||||
{
|
|
||||||
struct Device * DeviceBase;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
assert( ior != NULL && ior->io_Device != NULL );
|
|
||||||
|
|
||||||
DeviceBase = ior->io_Device;
|
|
||||||
__begin_io(ior);
|
|
||||||
|
|
||||||
LEAVE();
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_callhook.c,v 1.1.1.1 2004-07-26 16:30:17 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
CallHook(struct Hook *hook_ptr,Object *obj,...)
|
|
||||||
{
|
|
||||||
ULONG result;
|
|
||||||
va_list arg;
|
|
||||||
|
|
||||||
assert( hook_ptr != NULL );
|
|
||||||
|
|
||||||
va_start(arg,obj);
|
|
||||||
|
|
||||||
result = CallHookA(hook_ptr,obj,(APTR)arg);
|
|
||||||
|
|
||||||
va_end(arg);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
*
|
|
||||||
* $Id: amiga_callhooka.asm,v 1.1.1.1 2004-07-26 16:30:17 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=8
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
|
|
||||||
section text,code
|
|
||||||
|
|
||||||
h_Entry equ 8
|
|
||||||
|
|
||||||
xdef _CallHookA
|
|
||||||
|
|
||||||
****************************************************************************
|
|
||||||
* new hook standard
|
|
||||||
* use struct Hook (with minnode at the top)
|
|
||||||
*
|
|
||||||
* *** register calling convention: ***
|
|
||||||
* A0 - pointer to hook itself
|
|
||||||
* A1 - pointer to parameter packed ("message")
|
|
||||||
* A2 - Hook specific address data ("object," e.g, gadget )
|
|
||||||
*
|
|
||||||
* *** C conventions: ***
|
|
||||||
* Note that parameters are in unusual register order: a0, a2, a1.
|
|
||||||
* This is to provide a performance boost for assembly language
|
|
||||||
* programming (the object in a2 is most frequently untouched).
|
|
||||||
* It is also no problem in "register direct" C function parameters.
|
|
||||||
*
|
|
||||||
* calling through a hook
|
|
||||||
* CallHook( hook, object, msgid, p1, p2, ... );
|
|
||||||
* CallHookA( hook, object, msgpkt );
|
|
||||||
*
|
|
||||||
* using a C function: CFunction( hook, object, message );
|
|
||||||
* hook.h_Entry = HookEntry;
|
|
||||||
* hook.h_SubEntry = CFunction;
|
|
||||||
*
|
|
||||||
****************************************************************************
|
|
||||||
|
|
||||||
* C calling hook interface for prepared message packet
|
|
||||||
_CallHookA:
|
|
||||||
movem.l a2/a6,-(sp)
|
|
||||||
move.l 12(sp),a0
|
|
||||||
move.l 16(sp),a2
|
|
||||||
move.l 20(sp),a1
|
|
||||||
pea.l hook_return(pc)
|
|
||||||
move.l h_Entry(a0),-(sp)
|
|
||||||
rts
|
|
||||||
|
|
||||||
hook_return:
|
|
||||||
|
|
||||||
movem.l (sp)+,a2/a6
|
|
||||||
rts
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_callhooka.c,v 1.1.1.1 2004-07-26 16:30:17 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if (defined(__GNUC__) && !defined(__PPC__))
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
asm("
|
|
||||||
|
|
||||||
h_Entry = 8
|
|
||||||
|
|
||||||
.text
|
|
||||||
.even
|
|
||||||
|
|
||||||
|---------------------------------------------------------------------------
|
|
||||||
| new hook standard
|
|
||||||
| use struct Hook (with minnode at the top)
|
|
||||||
|
|
|
||||||
| *** register calling convention: ***
|
|
||||||
| A0 - pointer to hook itself
|
|
||||||
| A1 - pointer to parameter packed ('message')
|
|
||||||
| A2 - Hook specific address data ('object,' e.g, gadget )
|
|
||||||
|
|
|
||||||
| *** C conventions: ***
|
|
||||||
| Note that parameters are in unusual register order: a0, a2, a1.
|
|
||||||
| This is to provide a performance boost for assembly language
|
|
||||||
| programming (the object in a2 is most frequently untouched).
|
|
||||||
| It is also no problem in 'register direct' C function parameters.
|
|
||||||
|
|
|
||||||
| calling through a hook
|
|
||||||
| CallHook( hook, object, msgid, p1, p2, ... );
|
|
||||||
| CallHookA( hook, object, msgpkt );
|
|
||||||
|
|
|
||||||
| using a C function: CFunction( hook, object, message );
|
|
||||||
| hook.h_Entry = HookEntry;
|
|
||||||
| hook.h_SubEntry = CFunction;
|
|
||||||
|
|
|
||||||
|---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
| C calling hook interface for prepared message packet
|
|
||||||
|
|
||||||
.globl _CallHookA
|
|
||||||
|
|
||||||
_CallHookA:
|
|
||||||
|
|
||||||
moveml a2/a6,sp@-
|
|
||||||
moveal sp@(12),a0
|
|
||||||
moveal sp@(16),a2
|
|
||||||
moveal sp@(20),a1
|
|
||||||
pea callhooka_return
|
|
||||||
movel a0@(h_Entry),sp@-
|
|
||||||
rts
|
|
||||||
|
|
||||||
callhooka_return:
|
|
||||||
|
|
||||||
moveml sp@+,a2/a6
|
|
||||||
rts
|
|
||||||
|
|
||||||
");
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __GNUC__ && !__PPC__ */
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_coercemethod.c,v 1.1.1.1 2004-07-26 16:30:17 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <intuition/intuition.h>
|
|
||||||
#include <intuition/classes.h>
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
CoerceMethodA(Class * cl,Object * obj,Msg msg)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWPOINTER(msg);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
result = CallHookA(&cl->cl_Dispatcher,obj,msg);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
CoerceMethod(Class *cl, Object *obj, ULONG method_id, ...)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWVALUE(method_id);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
result = CoerceMethodA(cl,obj,(Msg)&method_id);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_createextio.c,v 1.1.1.1 2004-07-26 16:30:18 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct IORequest *
|
|
||||||
CreateExtIO(CONST struct MsgPort * port, LONG io_size)
|
|
||||||
{
|
|
||||||
struct IORequest * result = NULL;
|
|
||||||
|
|
||||||
assert( port != NULL && io_size > 0 );
|
|
||||||
|
|
||||||
if(port == NULL || io_size < (LONG)sizeof(*result))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = CreateIORequest(port,(ULONG)io_size);
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_createport.c,v 1.1.1.1 2004-07-26 16:30:18 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct MsgPort *
|
|
||||||
CreatePort(CONST_STRPTR name, LONG pri)
|
|
||||||
{
|
|
||||||
struct MsgPort * result = NULL;
|
|
||||||
|
|
||||||
assert( -128 <= pri && pri <= 127 );
|
|
||||||
|
|
||||||
if(pri < -128 || pri > 127)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = CreateMsgPort();
|
|
||||||
if(result != NULL && name != NULL)
|
|
||||||
{
|
|
||||||
result->mp_Node.ln_Name = (char *)name;
|
|
||||||
result->mp_Node.ln_Pri = pri;
|
|
||||||
|
|
||||||
AddPort(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_createstdio.c,v 1.1.1.1 2004-07-26 16:30:18 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct IOStdReq *
|
|
||||||
CreateStdIO(CONST struct MsgPort * port)
|
|
||||||
{
|
|
||||||
struct IOStdReq * result = NULL;
|
|
||||||
|
|
||||||
assert( port != NULL );
|
|
||||||
|
|
||||||
if(port == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = (struct IOStdReq *)CreateIORequest((struct MsgPort *)port,sizeof(*result));
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_createtask.c,v 1.1.1.1 2004-07-26 16:30:18 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <exec/libraries.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
#include <exec/tasks.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Create a task with given name, priority, and stack size.
|
|
||||||
* It will use the default exception and trap handlers for now.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* the template for the mementries. Unfortunately, this is hard to
|
|
||||||
* do from C: mementries have unions, and they cannot be statically
|
|
||||||
* initialized...
|
|
||||||
*
|
|
||||||
* In the interest of simplicity I recreate the mem entry structures
|
|
||||||
* here with appropriate sizes. We will copy this to a local
|
|
||||||
* variable and set the stack size to what the user specified,
|
|
||||||
* then attempt to actually allocate the memory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ME_TASK 0
|
|
||||||
#define ME_STACK 1
|
|
||||||
|
|
||||||
#define NUM_MEM_ENTRIES 2
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct FakeMemEntry
|
|
||||||
{
|
|
||||||
ULONG fme_Reqs;
|
|
||||||
ULONG fme_Size;
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct FakeMemList
|
|
||||||
{
|
|
||||||
struct Node fml_Node;
|
|
||||||
UWORD fml_NumEntries;
|
|
||||||
struct FakeMemEntry fml_ME[NUM_MEM_ENTRIES];
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct Task *
|
|
||||||
CreateTask(CONST_STRPTR name,LONG pri,CONST APTR init_pc,ULONG stack_size)
|
|
||||||
{
|
|
||||||
struct Task * new_task;
|
|
||||||
struct FakeMemList fake_mem_list;
|
|
||||||
struct MemList * ml = NULL;
|
|
||||||
APTR result = NULL;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWSTRING(name);
|
|
||||||
SHOWVALUE(pri);
|
|
||||||
SHOWPOINTER(init_pc);
|
|
||||||
SHOWVALUE(stack_size);
|
|
||||||
|
|
||||||
assert( name != NULL && (-128 <= pri && pri <= 127) && init_pc != NULL && stack_size > 0 );
|
|
||||||
|
|
||||||
if(name == NULL || pri < -128 || pri > 127 || init_pc == NULL || stack_size == 0)
|
|
||||||
{
|
|
||||||
SHOWMSG("invalid parameters");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* round the stack up to longwords... */
|
|
||||||
stack_size = (stack_size + 3UL) & ~3UL;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This will allocate two chunks of memory: task of PUBLIC
|
|
||||||
* and stack of PRIVATE
|
|
||||||
*/
|
|
||||||
memset(&fake_mem_list,0,sizeof(fake_mem_list));
|
|
||||||
|
|
||||||
fake_mem_list.fml_NumEntries = NUM_MEM_ENTRIES;
|
|
||||||
fake_mem_list.fml_ME[ME_TASK].fme_Reqs = MEMF_PUBLIC | MEMF_CLEAR;
|
|
||||||
fake_mem_list.fml_ME[ME_TASK].fme_Size = sizeof(struct Task);
|
|
||||||
fake_mem_list.fml_ME[ME_STACK].fme_Reqs = MEMF_ANY | MEMF_CLEAR;
|
|
||||||
fake_mem_list.fml_ME[ME_STACK].fme_Size = stack_size;
|
|
||||||
|
|
||||||
ml = (struct MemList *)AllocEntry((struct MemList *)&fake_mem_list);
|
|
||||||
|
|
||||||
/* Did the allocation succeed? */
|
|
||||||
if(((LONG)ml) < 0)
|
|
||||||
{
|
|
||||||
SHOWMSG("memory allocation failed");
|
|
||||||
|
|
||||||
/* Note: if AllocEntry() fails, the entire allocation is
|
|
||||||
* released before the function returns with bit #31
|
|
||||||
* set and the number of the slot that failed being
|
|
||||||
* returned. Thus, the return value is not a valid
|
|
||||||
* address that would need to be freed.
|
|
||||||
*/
|
|
||||||
ml = NULL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* set the stack accounting stuff */
|
|
||||||
new_task = (struct Task *)ml->ml_ME[ME_TASK].me_Addr;
|
|
||||||
|
|
||||||
new_task->tc_SPLower = ml->ml_ME[ME_STACK].me_Addr;
|
|
||||||
new_task->tc_SPUpper = (APTR)((ULONG)(new_task->tc_SPLower) + stack_size);
|
|
||||||
new_task->tc_SPReg = new_task->tc_SPUpper;
|
|
||||||
|
|
||||||
/* misc task data structures */
|
|
||||||
new_task->tc_Node.ln_Type = NT_TASK;
|
|
||||||
new_task->tc_Node.ln_Pri = pri;
|
|
||||||
new_task->tc_Node.ln_Name = (char *)name;
|
|
||||||
|
|
||||||
/* add it to the tasks memory list */
|
|
||||||
NewList(&new_task->tc_MemEntry);
|
|
||||||
AddHead(&new_task->tc_MemEntry,(struct Node *)ml);
|
|
||||||
|
|
||||||
/* add the task to the system -- use the default final PC */
|
|
||||||
|
|
||||||
PROFILE_OFF();
|
|
||||||
result = AddTask(new_task,init_pc,NULL);
|
|
||||||
PROFILE_ON();
|
|
||||||
|
|
||||||
if(result == NULL)
|
|
||||||
{
|
|
||||||
SHOWMSG("could not add task");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Gobbled up by task. */
|
|
||||||
ml = NULL;
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
if(ml != NULL)
|
|
||||||
FreeEntry(ml);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_deleteextio.c,v 1.1.1.1 2004-07-26 16:30:18 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DeleteExtIO(struct IORequest * io)
|
|
||||||
{
|
|
||||||
assert(io != NULL);
|
|
||||||
|
|
||||||
if(io != NULL)
|
|
||||||
DeleteIORequest((struct IORequest *)io);
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_deleteport.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DeletePort(struct MsgPort * port)
|
|
||||||
{
|
|
||||||
assert( port != NULL );
|
|
||||||
|
|
||||||
if(port->mp_Node.ln_Name != NULL)
|
|
||||||
RemPort(port);
|
|
||||||
|
|
||||||
DeleteMsgPort(port);
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_deletestdio.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DeleteStdIO(struct IOStdReq * io)
|
|
||||||
{
|
|
||||||
if(io != NULL)
|
|
||||||
DeleteIORequest((struct IORequest *)io);
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_deletetask.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/libraries.h>
|
|
||||||
#include <exec/tasks.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DeleteTask(struct Task *tc)
|
|
||||||
{
|
|
||||||
RemTask(tc);
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_domethod.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <intuition/intuition.h>
|
|
||||||
#include <intuition/classes.h>
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
DoMethodA(Object * obj,Msg msg)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWPOINTER(msg);
|
|
||||||
|
|
||||||
assert(obj != NULL);
|
|
||||||
|
|
||||||
if(obj != NULL)
|
|
||||||
{
|
|
||||||
Class * cl;
|
|
||||||
|
|
||||||
cl = OCLASS(obj);
|
|
||||||
|
|
||||||
assert( cl != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL)
|
|
||||||
result = CallHookA(&cl->cl_Dispatcher,obj,msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
DoMethod(Object *obj, ULONG method_id, ...)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWVALUE(method_id);
|
|
||||||
|
|
||||||
assert( obj != NULL );
|
|
||||||
|
|
||||||
if(obj != NULL)
|
|
||||||
result = DoMethodA(obj,(Msg)&method_id);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_dosupermethod.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <intuition/intuition.h>
|
|
||||||
#include <intuition/classes.h>
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
DoSuperMethodA(Class * cl, Object * obj, Msg msg)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWPOINTER(msg);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
result = CallHookA(&cl->cl_Super->cl_Dispatcher,obj,msg);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
DoSuperMethod(Class *cl, Object *obj, ULONG method_id, ...)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWVALUE(method_id);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
result = DoSuperMethodA(cl,obj,(Msg)&method_id);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_dotimer.c,v 1.1.1.1 2004-07-26 16:30:19 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/errors.h>
|
|
||||||
|
|
||||||
#include <devices/timer.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
DoTimer(struct timeval *tv,LONG unit,LONG command)
|
|
||||||
{
|
|
||||||
struct timerequest * tr = NULL;
|
|
||||||
struct MsgPort * mp;
|
|
||||||
LONG error;
|
|
||||||
|
|
||||||
assert( tv != NULL );
|
|
||||||
|
|
||||||
mp = AllocVec(sizeof(*mp),MEMF_ANY|MEMF_PUBLIC|MEMF_CLEAR);
|
|
||||||
if(mp == NULL)
|
|
||||||
{
|
|
||||||
error = IOERR_OPENFAIL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
mp->mp_Node.ln_Type = NT_MSGPORT;
|
|
||||||
mp->mp_Flags = PA_SIGNAL;
|
|
||||||
mp->mp_SigBit = SIGB_SINGLE;
|
|
||||||
mp->mp_SigTask = FindTask(NULL);
|
|
||||||
NewList(&mp->mp_MsgList);
|
|
||||||
|
|
||||||
tr = (struct timerequest *)CreateIORequest(mp,sizeof(*tr));
|
|
||||||
if(tr == NULL)
|
|
||||||
{
|
|
||||||
error = IOERR_OPENFAIL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
error = OpenDevice(TIMERNAME,(ULONG)unit,(struct IORequest *)tr,0);
|
|
||||||
if(error != 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
tr->tr_node.io_Command = command;
|
|
||||||
tr->tr_time.tv_secs = tv->tv_secs;
|
|
||||||
tr->tr_time.tv_micro = tv->tv_micro;
|
|
||||||
|
|
||||||
PROFILE_OFF();
|
|
||||||
|
|
||||||
SetSignal(0,SIGF_SINGLE);
|
|
||||||
|
|
||||||
error = DoIO((struct IORequest *)tr);
|
|
||||||
|
|
||||||
PROFILE_ON();
|
|
||||||
|
|
||||||
tv->tv_secs = tr->tr_time.tv_secs;
|
|
||||||
tv->tv_micro = tr->tr_time.tv_micro;
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
if(tr != NULL)
|
|
||||||
{
|
|
||||||
if(tr->tr_node.io_Device != NULL)
|
|
||||||
CloseDevice((struct IORequest *)tr);
|
|
||||||
|
|
||||||
DeleteIORequest((struct IORequest *)tr);
|
|
||||||
}
|
|
||||||
|
|
||||||
FreeVec(mp);
|
|
||||||
|
|
||||||
return(error);
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_fastrand.c,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/types.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
FastRand(ULONG seed)
|
|
||||||
{
|
|
||||||
ULONG value;
|
|
||||||
|
|
||||||
value = seed + seed;
|
|
||||||
if(value < seed)
|
|
||||||
value ^= 0x1D872B41;
|
|
||||||
|
|
||||||
return(value);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_freeievents.c,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <devices/inputevent.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
FreeIEvents(struct InputEvent * ie)
|
|
||||||
{
|
|
||||||
struct InputEvent * next;
|
|
||||||
|
|
||||||
while(ie != NULL)
|
|
||||||
{
|
|
||||||
next = ie->ie_NextEvent;
|
|
||||||
|
|
||||||
FreeVec(ie);
|
|
||||||
|
|
||||||
ie = next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
*
|
|
||||||
* $Id: amiga_hookentry.asm,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=8
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
|
|
||||||
section text,code
|
|
||||||
|
|
||||||
h_SubEntry equ 12
|
|
||||||
|
|
||||||
xdef _HookEntry
|
|
||||||
|
|
||||||
_HookEntry:
|
|
||||||
|
|
||||||
move.l a1,-(sp)
|
|
||||||
move.l a2,-(sp)
|
|
||||||
move.l a0,-(sp)
|
|
||||||
move.l h_SubEntry(a0),a0
|
|
||||||
jsr (a0)
|
|
||||||
lea 12(sp),sp
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_hookentry.c,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if (defined(__GNUC__) && !defined(__PPC__))
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
asm("
|
|
||||||
|
|
||||||
h_SubEntry = 12
|
|
||||||
|
|
||||||
.text
|
|
||||||
.even
|
|
||||||
|
|
||||||
.globl _HookEntry
|
|
||||||
|
|
||||||
_HookEntry:
|
|
||||||
|
|
||||||
movel a1,sp@-
|
|
||||||
movel a2,sp@-
|
|
||||||
movel a0,sp@-
|
|
||||||
movel a0@(h_SubEntry:W),a0
|
|
||||||
jsr a0@
|
|
||||||
lea sp@(12:W),sp
|
|
||||||
rts
|
|
||||||
|
|
||||||
");
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __GNUC__ && !__PPC__ */
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_hotkey.c,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <libraries/commodities.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/commodities.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
CxObj *
|
|
||||||
HotKey(CONST_STRPTR descr,struct MsgPort * port,LONG ID)
|
|
||||||
{
|
|
||||||
CxObj * result = NULL;
|
|
||||||
CxObj * filter = NULL;
|
|
||||||
|
|
||||||
assert( descr != NULL && port != NULL );
|
|
||||||
|
|
||||||
if(CxBase == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
filter = CxFilter(descr);
|
|
||||||
if(filter == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
AttachCxObj(filter,CxSender(port,ID));
|
|
||||||
AttachCxObj(filter,CxTranslate(NULL));
|
|
||||||
|
|
||||||
if(CxObjError(filter))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = filter;
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
if(result == NULL && filter != NULL)
|
|
||||||
DeleteCxObjAll(filter);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_invertstring.c,v 1.1.1.1 2004-07-26 16:30:20 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <libraries/commodities.h>
|
|
||||||
#include <devices/keymap.h>
|
|
||||||
#include <exec/memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <proto/commodities.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static int
|
|
||||||
do_escape(int cc)
|
|
||||||
{
|
|
||||||
int result;
|
|
||||||
|
|
||||||
switch(cc)
|
|
||||||
{
|
|
||||||
case 'n':
|
|
||||||
case 'r':
|
|
||||||
|
|
||||||
result = '\r';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
|
|
||||||
result = '\t';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '0':
|
|
||||||
|
|
||||||
result = '\0';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '\\':
|
|
||||||
case '\"':
|
|
||||||
case '\'':
|
|
||||||
case '<':
|
|
||||||
|
|
||||||
result = cc;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
|
|
||||||
result = -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static ULONG
|
|
||||||
do_angle(STRPTR * strp, struct InputEvent *ie)
|
|
||||||
{
|
|
||||||
ULONG result;
|
|
||||||
char * cp;
|
|
||||||
IX ix;
|
|
||||||
|
|
||||||
/* find closing angle '>', put a null there */
|
|
||||||
for(cp = (*strp) ; (*cp) ; cp++)
|
|
||||||
{
|
|
||||||
if((*cp) == '>')
|
|
||||||
{
|
|
||||||
(*cp) = '\0';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result = ParseIX((*strp),&ix);
|
|
||||||
|
|
||||||
if(cp != NULL)
|
|
||||||
{
|
|
||||||
(*cp) = '>'; /* fix it */
|
|
||||||
(*strp) = cp; /* point to char following '>' */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(*strp) = cp - 1; /* ++will point to terminating null */
|
|
||||||
}
|
|
||||||
|
|
||||||
if(result == 0)
|
|
||||||
{
|
|
||||||
/* use IX to describe a suitable InputEvent */
|
|
||||||
ie->ie_Class = ix.ix_Class;
|
|
||||||
ie->ie_Code = ix.ix_Code;
|
|
||||||
ie->ie_Qualifier = ix.ix_Qualifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern VOID FreeIEvents(struct InputEvent *ie);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct InputEvent *
|
|
||||||
InvertString(CONST_STRPTR str, CONST struct KeyMap *km)
|
|
||||||
{
|
|
||||||
/* bugs:
|
|
||||||
can't escape '>'
|
|
||||||
puts '\0' on closing angles */
|
|
||||||
|
|
||||||
/* allocate input event for each character in string */
|
|
||||||
|
|
||||||
struct InputEvent * result = NULL;
|
|
||||||
struct InputEvent * chain = NULL;
|
|
||||||
struct InputEvent * ie;
|
|
||||||
int cc;
|
|
||||||
|
|
||||||
if(CxBase == NULL || str == NULL || (*str) == '\0')
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
do /* have checked that str is not null */
|
|
||||||
{
|
|
||||||
/* allocate the next ie and link it in */
|
|
||||||
ie = AllocVec(sizeof(*ie),MEMF_ANY|MEMF_CLEAR|MEMF_PUBLIC);
|
|
||||||
if(ie == NULL)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
ie->ie_NextEvent = chain;
|
|
||||||
chain = ie;
|
|
||||||
|
|
||||||
/* now fill in the input event */
|
|
||||||
cc = (*str);
|
|
||||||
switch(cc)
|
|
||||||
{
|
|
||||||
case '<':
|
|
||||||
|
|
||||||
str++;
|
|
||||||
|
|
||||||
if(do_angle((STRPTR*)&str, ie) != 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '\\':
|
|
||||||
|
|
||||||
str++;
|
|
||||||
|
|
||||||
cc = do_escape(*str); /* get escaped character */
|
|
||||||
if(cc < 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* fall through */
|
|
||||||
|
|
||||||
default:
|
|
||||||
|
|
||||||
InvertKeyMap((ULONG) cc, ie, (struct KeyMap *)km);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
str++;
|
|
||||||
}
|
|
||||||
while((*str) != '\0');
|
|
||||||
|
|
||||||
result = chain;
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
if(result == NULL && chain != NULL)
|
|
||||||
FreeIEvents(chain);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_newlist.c,v 1.1.1.1 2004-07-26 16:30:21 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/lists.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
NewList(struct List *lh)
|
|
||||||
{
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(lh);
|
|
||||||
|
|
||||||
assert( lh != NULL );
|
|
||||||
|
|
||||||
lh->lh_Head = (struct Node *)&lh->lh_Tail;
|
|
||||||
lh->lh_Tail = NULL;
|
|
||||||
lh->lh_TailPred = (struct Node *)&lh->lh_Head;
|
|
||||||
|
|
||||||
LEAVE();
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_rangerand.c,v 1.1.1.1 2004-07-26 16:30:21 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/types.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG RangeSeed;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
UWORD
|
|
||||||
RangeRand(ULONG max_value)
|
|
||||||
{
|
|
||||||
ULONG next_value;
|
|
||||||
ULONG result;
|
|
||||||
ULONG value;
|
|
||||||
UWORD range;
|
|
||||||
UWORD bits;
|
|
||||||
|
|
||||||
range = (max_value & 0xFFFF);
|
|
||||||
bits = range - 1;
|
|
||||||
|
|
||||||
value = RangeSeed;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
next_value = value + value;
|
|
||||||
if(next_value <= value)
|
|
||||||
next_value ^= 0x1D872B41;
|
|
||||||
|
|
||||||
value = next_value;
|
|
||||||
|
|
||||||
bits = bits >> 1;
|
|
||||||
}
|
|
||||||
while(bits != 0);
|
|
||||||
|
|
||||||
RangeSeed = value;
|
|
||||||
|
|
||||||
if(range == 0)
|
|
||||||
result = value & 0xFFFF;
|
|
||||||
else
|
|
||||||
result = (range * (value & 0xFFFF)) >> 16;
|
|
||||||
|
|
||||||
return((UWORD)result);
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_remtof.c,v 1.1.1.1 2004-07-26 16:30:21 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/interrupts.h>
|
|
||||||
#include <hardware/intbits.h>
|
|
||||||
#include <graphics/graphint.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/exec.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
RemTOF(struct Isrvstr *i)
|
|
||||||
{
|
|
||||||
assert( i != NULL );
|
|
||||||
|
|
||||||
RemIntServer(INTB_VERTB,(struct Interrupt *)i);
|
|
||||||
}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_setsuperattrs.c,v 1.1.1.1 2004-07-26 16:30:21 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <intuition/intuition.h>
|
|
||||||
#include <intuition/classes.h>
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
STATIC ULONG
|
|
||||||
SetSuperAttrsA(Class * cl,Object * obj,struct TagItem * tags)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWPOINTER(tags);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
{
|
|
||||||
struct opSet ops;
|
|
||||||
|
|
||||||
ops.MethodID = OM_SET;
|
|
||||||
ops.ops_AttrList = tags;
|
|
||||||
ops.ops_GInfo = NULL;
|
|
||||||
|
|
||||||
result = CallHookA(&cl->cl_Super->cl_Dispatcher,obj,&ops);
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
SetSuperAttrs(Class * cl,Object * obj,ULONG tag1,...)
|
|
||||||
{
|
|
||||||
ULONG result = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
SHOWPOINTER(cl);
|
|
||||||
SHOWPOINTER(obj);
|
|
||||||
SHOWVALUE(tag1);
|
|
||||||
|
|
||||||
assert( cl != NULL && obj != NULL );
|
|
||||||
|
|
||||||
if(cl != NULL && obj != NULL)
|
|
||||||
result = SetSuperAttrsA(cl,obj,(struct TagItem *)&tag1);
|
|
||||||
|
|
||||||
RETURN(result);
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* __PPC__ */
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_timedelay.c,v 1.1.1.1 2004-07-26 16:30:21 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <devices/timer.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
TimeDelay(LONG unit,ULONG seconds,ULONG micros)
|
|
||||||
{
|
|
||||||
struct timeval tv;
|
|
||||||
LONG error;
|
|
||||||
|
|
||||||
tv.tv_secs = seconds;
|
|
||||||
tv.tv_micro = micros;
|
|
||||||
|
|
||||||
error = DoTimer(&tv,unit,TR_ADDREQUEST);
|
|
||||||
|
|
||||||
return(error);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: amiga_waitbeam.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/interrupts.h>
|
|
||||||
#include <hardware/intbits.h>
|
|
||||||
#include <graphics/graphint.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <proto/graphics.h>
|
|
||||||
#include <clib/alib_protos.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define DO_NOTHING ((void)0)
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
waitbeam(LONG position)
|
|
||||||
{
|
|
||||||
while(position > VBeamPos())
|
|
||||||
DO_NOTHING;
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: c.lib_rev.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "c.lib_rev.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
char __c_lib_version[] = VERSTAG;
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#define VERSION 1
|
|
||||||
#define REVISION 171
|
|
||||||
#define DATE "16.8.2004"
|
|
||||||
#define VERS "c.lib 1.171"
|
|
||||||
#define VSTRING "c.lib 1.171 (16.8.2004)\r\n"
|
|
||||||
#define VERSTAG "\0$VER: c.lib 1.171 (16.8.2004)"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
171
|
|
||||||
3100
library/changes
3100
library/changes
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
|||||||
//
|
|
||||||
// $Id: crt0.S,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
//
|
|
||||||
// :ts=4
|
|
||||||
//
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
.globl _main
|
|
||||||
.globl _start
|
|
||||||
|
|
||||||
_start:
|
|
||||||
|
|
||||||
#if defined(SMALL_DATA)
|
|
||||||
/* Don't do a function call here, since that
|
|
||||||
means LR has to be saved */
|
|
||||||
lis r13, _SDA_BASE_@ha
|
|
||||||
addi r13, r13, _SDA_BASE_@l
|
|
||||||
#endif
|
|
||||||
|
|
||||||
b _main
|
|
||||||
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: crtbegin.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Handles global constructors and destructors.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <exec/types.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <setjmp.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Dummy constructor and destructor array. The linker script will put these at the
|
|
||||||
* very beginning of section ".ctors" and ".dtors". crtend.o contains a similar entry
|
|
||||||
* with a NULL pointer entry and is put at the end of the sections. This way, the init
|
|
||||||
* code can find the global constructor/destructor pointers
|
|
||||||
*/
|
|
||||||
static void (*__CTOR_LIST__[1]) (void) __attribute__((section(".ctors"))) = { (void *)-1 };
|
|
||||||
static void (*__DTOR_LIST__[1]) (void) __attribute__((section(".dtors"))) = { (void *)-1 };
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
_do_ctors(void)
|
|
||||||
{
|
|
||||||
void (**pFuncPtr)(void);
|
|
||||||
|
|
||||||
/* Skip the first entry in the list (it's -1 anyway) */
|
|
||||||
pFuncPtr = __CTOR_LIST__ + 1;
|
|
||||||
|
|
||||||
/* Call all constructors in forward order */
|
|
||||||
while (*pFuncPtr != NULL)
|
|
||||||
(**pFuncPtr++)();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
_do_dtors(void)
|
|
||||||
{
|
|
||||||
ULONG i = (ULONG)__DTOR_LIST__[0];
|
|
||||||
void (**pFuncPtr)(void);
|
|
||||||
|
|
||||||
if (i == ~0UL)
|
|
||||||
{
|
|
||||||
/* Find the end of the destructors list */
|
|
||||||
i = 1;
|
|
||||||
|
|
||||||
while (__DTOR_LIST__[i] != NULL)
|
|
||||||
i++;
|
|
||||||
|
|
||||||
/* We're at the NULL entry now. Go back by one */
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Call all destructors in reverse order */
|
|
||||||
pFuncPtr = __DTOR_LIST__ + i;
|
|
||||||
while (i-- > 0)
|
|
||||||
(**pFuncPtr--)();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
typedef void (*func_ptr)(void);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
_do_ctors(void)
|
|
||||||
{
|
|
||||||
extern func_ptr __CTOR_LIST__[];
|
|
||||||
ULONG nptrs = (ULONG)__CTOR_LIST__[0];
|
|
||||||
ULONG i;
|
|
||||||
|
|
||||||
for(i = nptrs ; i > 0 ; i--)
|
|
||||||
__CTOR_LIST__[i]();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
_do_dtors(void)
|
|
||||||
{
|
|
||||||
extern func_ptr __DTOR_LIST__[];
|
|
||||||
extern jmp_buf __exit_jmp_buf;
|
|
||||||
ULONG nptrs = (ULONG)__DTOR_LIST__[0];
|
|
||||||
static ULONG i;
|
|
||||||
|
|
||||||
/* If one of the destructors drops into
|
|
||||||
* exit(), processing will continue with
|
|
||||||
* the next following destructor.
|
|
||||||
*/
|
|
||||||
(void)setjmp(__exit_jmp_buf);
|
|
||||||
|
|
||||||
while(i++ < nptrs)
|
|
||||||
__DTOR_LIST__[i]();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /*__amigaos4__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* FIXME: Do we need to put these in .init/.fini sections? */
|
|
||||||
|
|
||||||
//void _init(void) __attribute__((section(".init")));
|
|
||||||
//void _fini(void) __attribute__((section(".fini")));
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_init(void)
|
|
||||||
{
|
|
||||||
_do_ctors();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_fini(void)
|
|
||||||
{
|
|
||||||
_do_dtors();
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: crtend.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* End markers for the CTOR and DTOR list.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static volatile void (*__CTOR_LIST__[1]) (void) __attribute__((used,section(".ctors"))) = { (void *)0 };
|
|
||||||
static volatile void (*__DTOR_LIST__[1]) (void) __attribute__((used,section(".dtors"))) = { (void *)0 };
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /*__amigaos4__ */
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_headers.h,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#define _CTYPE_HEADERS_H
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _LOCALE_HEADERS_H
|
|
||||||
#include "locale_headers.h"
|
|
||||||
#endif /* _LOCALE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _STDLIB_LOCALE_UTILITY_H
|
|
||||||
#include "stdlib_locale_utility.h"
|
|
||||||
#endif /* _STDLIB_LOCALE_UTILITY_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isalnum.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isalnum
|
|
||||||
#undef isalpha
|
|
||||||
#undef isdigit
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isalnum(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsAlNum(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = isalpha(c) || isdigit(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isalpha.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isalpha
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isalpha(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsAlpha(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (('a' <= c && c <= 'z') ||
|
|
||||||
('A' <= c && c <= 'Z'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isascii.c,v 1.1.1.1 2004-07-26 16:30:22 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isascii
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int isascii(int c);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isascii(int c)
|
|
||||||
{
|
|
||||||
int result;
|
|
||||||
|
|
||||||
result = (0 <= c && c <= 127);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_iscntrl.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef iscntrl
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
iscntrl(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsCntrl(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (('\0' <= c && c < ' ') || (c == 127));
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isdigit.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isdigit
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isdigit(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsDigit(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = ('0' <= c && c <= '9');
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isgraph.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isgraph
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isgraph(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsGraph(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (' ' < c && c < 127);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_islower.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef islower
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
islower(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsLower(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = ('a' <= c && c <= 'z');
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isprint.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isprint
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isprint(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsPrint(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (' ' <= c && c <= '~');
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_ispunct.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef ispunct
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
ispunct(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsPunct(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (('!' <= c && c <= '/') ||
|
|
||||||
(':' <= c && c <= '@') ||
|
|
||||||
('[' <= c && c <= '`') ||
|
|
||||||
('{' <= c && c <= '~'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isspace.c,v 1.1.1.1 2004-07-26 16:30:23 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isspace
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isspace(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsSpace(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (c == '\t' ||
|
|
||||||
c == '\r' ||
|
|
||||||
c == '\n' ||
|
|
||||||
c == '\v' ||
|
|
||||||
c == '\f' ||
|
|
||||||
c == ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isupper.c,v 1.1.1.1 2004-07-26 16:30:24 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isupper
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isupper(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsUpper(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = ('A' <= c && c <= 'Z');
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_isxdigit.c,v 1.1.1.1 2004-07-26 16:30:24 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#undef isxdigit
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
isxdigit(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = IsXDigit(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = (('0' <= c && c <= '9') ||
|
|
||||||
('a' <= c && c <= 'f') ||
|
|
||||||
('A' <= c && c <= 'F'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_table.c,v 1.1.1.1 2004-07-26 16:30:24 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define __C_MACROS__
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* The construction of this table is rather peculiar. The assumption is that
|
|
||||||
the table index from which a flag value could be fetched is in the range
|
|
||||||
-128..255 since the character to be tested could be a signed or unsigned
|
|
||||||
8 bit value. The table access pointer (declared below) therefore points
|
|
||||||
to the 128th byte of '__ctype_data[]'. */
|
|
||||||
static const unsigned char __ctype_data[3 * 128] =
|
|
||||||
{
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
|
|
||||||
/* 0 */ __CTYPE_CONTROL,
|
|
||||||
/* 1 */ __CTYPE_CONTROL,
|
|
||||||
/* 2 */ __CTYPE_CONTROL,
|
|
||||||
/* 3 */ __CTYPE_CONTROL,
|
|
||||||
/* 4 */ __CTYPE_CONTROL,
|
|
||||||
/* 5 */ __CTYPE_CONTROL,
|
|
||||||
/* 6 */ __CTYPE_CONTROL,
|
|
||||||
/* 7 */ __CTYPE_CONTROL,
|
|
||||||
/* 8 */ __CTYPE_CONTROL,
|
|
||||||
/* 9 */ __CTYPE_CONTROL|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 10 */ __CTYPE_CONTROL|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 11 */ __CTYPE_CONTROL|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 12 */ __CTYPE_CONTROL|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 13 */ __CTYPE_CONTROL|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 14 */ __CTYPE_CONTROL,
|
|
||||||
/* 15 */ __CTYPE_CONTROL,
|
|
||||||
/* 16 */ __CTYPE_CONTROL,
|
|
||||||
/* 17 */ __CTYPE_CONTROL,
|
|
||||||
/* 18 */ __CTYPE_CONTROL,
|
|
||||||
/* 19 */ __CTYPE_CONTROL,
|
|
||||||
/* 20 */ __CTYPE_CONTROL,
|
|
||||||
/* 21 */ __CTYPE_CONTROL,
|
|
||||||
/* 22 */ __CTYPE_CONTROL,
|
|
||||||
/* 23 */ __CTYPE_CONTROL,
|
|
||||||
/* 24 */ __CTYPE_CONTROL,
|
|
||||||
/* 25 */ __CTYPE_CONTROL,
|
|
||||||
/* 26 */ __CTYPE_CONTROL,
|
|
||||||
/* 27 */ __CTYPE_CONTROL,
|
|
||||||
/* 28 */ __CTYPE_CONTROL,
|
|
||||||
/* 29 */ __CTYPE_CONTROL,
|
|
||||||
/* 30 */ __CTYPE_CONTROL,
|
|
||||||
/* 31 */ __CTYPE_CONTROL,
|
|
||||||
/* 32, ' ' */ __CTYPE_PRINTABLE|__CTYPE_WHITE_SPACE,
|
|
||||||
/* 33, '!' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 34, '"' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 35, '#' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 36, '$' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 37, '%' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 38, '&' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 39, ''' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 40, '(' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 41, ')' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 42, '*' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 43, '+' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 44, ',' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 45, '-' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 46, '.' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 47, '/' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 48, '0' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 49, '1' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 50, '2' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 51, '3' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 52, '4' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 53, '5' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 54, '6' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 55, '7' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 56, '8' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 57, '9' */ __CTYPE_DIGIT|__CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE,
|
|
||||||
/* 58, ':' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 59, ';' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 60, '<' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 61, '=' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 62, '>' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 63, '?' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 64, '@' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 65, 'A' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 66, 'B' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 67, 'C' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 68, 'D' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 69, 'E' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 70, 'F' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 71, 'G' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 72, 'H' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 73, 'I' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 74, 'J' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 75, 'K' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 76, 'L' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 77, 'M' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 78, 'N' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 79, 'O' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 80, 'P' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 81, 'Q' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 82, 'R' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 83, 'S' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 84, 'T' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 85, 'U' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 86, 'V' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 87, 'W' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 88, 'X' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 89, 'Y' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 90, 'Z' */ __CTYPE_PRINTABLE|__CTYPE_UPPER_CASE,
|
|
||||||
/* 91, '[' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 92, '\' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 93, ']' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 94, '^' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 95, '_' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 96, '`' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 97, 'a' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 98, 'b' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 99, 'c' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 100, 'd' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 101, 'e' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 102, 'f' */ __CTYPE_HEX_DIGIT|__CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 103, 'g' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 104, 'h' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 105, 'i' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 106, 'j' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 107, 'k' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 108, 'l' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 109, 'm' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 110, 'n' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 111, 'o' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 112, 'p' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 113, 'q' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 114, 'r' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 115, 's' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 116, 't' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 117, 'u' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 118, 'v' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 119, 'w' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 120, 'x' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 121, 'y' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 122, 'z' */ __CTYPE_PRINTABLE|__CTYPE_LOWER_CASE,
|
|
||||||
/* 123, '{' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 124, '|' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 125, '}' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 126, '~' */ __CTYPE_PUNCTUATION|__CTYPE_PRINTABLE,
|
|
||||||
/* 127 */ __CTYPE_CONTROL,
|
|
||||||
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
const unsigned char * const __ctype_table = &__ctype_data[128];
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_tolower.c,v 1.1.1.1 2004-07-26 16:30:25 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
tolower(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = ConvToLower(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = ('A' <= c && c <= 'Z') ? (c + ('a' - 'A')) : c;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: ctype_toupper.c,v 1.1.1.1 2004-07-26 16:30:25 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CTYPE_HEADERS_H
|
|
||||||
#include "ctype_headers.h"
|
|
||||||
#endif /* _CTYPE_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
toupper(int c)
|
|
||||||
{
|
|
||||||
DECLARE_LOCALEBASE();
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if(__locale_table[LC_CTYPE] != NULL)
|
|
||||||
{
|
|
||||||
assert( LocaleBase != NULL );
|
|
||||||
|
|
||||||
result = ConvToUpper(__locale_table[LC_CTYPE],(ULONG)c);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = ('a' <= c && c <= 'z') ? (c - ('a' - 'A')) : c;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
342
library/debug.c
342
library/debug.c
@@ -1,342 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug.c,v 1.1.1.1 2004-07-26 16:30:25 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=8
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define NULL ((void *)0L)
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef DEBUG
|
|
||||||
#define DEBUG 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern void KPrintF(const char * format,...);
|
|
||||||
extern void KPutFmt(const char * format,va_list arg);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define DEBUGLEVEL_OnlyAsserts 0
|
|
||||||
#define DEBUGLEVEL_Reports 1
|
|
||||||
#define DEBUGLEVEL_CallTracing 2
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern int __debug_level;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static int indent_level = 0;
|
|
||||||
|
|
||||||
static char program_name[40];
|
|
||||||
static int program_name_len = 0;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_SETPROGRAMNAME(char *name)
|
|
||||||
{
|
|
||||||
if(name != NULL && name[0] != '\0')
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i = 0 ; name[i] != '\0' && i < (int)sizeof(program_name)-1 ; i++)
|
|
||||||
program_name[i] = name[i];
|
|
||||||
|
|
||||||
program_name[i] = '\0';
|
|
||||||
|
|
||||||
program_name_len = i;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
program_name_len = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
_SETDEBUGLEVEL(int level)
|
|
||||||
{
|
|
||||||
int old_level = __debug_level;
|
|
||||||
|
|
||||||
__debug_level = level;
|
|
||||||
|
|
||||||
return(old_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
int
|
|
||||||
_GETDEBUGLEVEL(void)
|
|
||||||
{
|
|
||||||
return(__debug_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static int previous_debug_level = -1;
|
|
||||||
|
|
||||||
void
|
|
||||||
_PUSHDEBUGLEVEL(int level)
|
|
||||||
{
|
|
||||||
previous_debug_level = _SETDEBUGLEVEL(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_POPDEBUGLEVEL(void)
|
|
||||||
{
|
|
||||||
if(previous_debug_level != -1)
|
|
||||||
{
|
|
||||||
_SETDEBUGLEVEL(previous_debug_level);
|
|
||||||
|
|
||||||
previous_debug_level = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
_INDENT(void)
|
|
||||||
{
|
|
||||||
if(program_name_len > 0)
|
|
||||||
KPrintF("(%s) ",program_name);
|
|
||||||
|
|
||||||
if(__debug_level >= DEBUGLEVEL_CallTracing)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i = 0 ; i < indent_level ; i++)
|
|
||||||
KPrintF(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_SHOWVALUE(
|
|
||||||
unsigned long value,
|
|
||||||
int size,
|
|
||||||
const char *name,
|
|
||||||
const char *file,
|
|
||||||
int line)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
char *fmt;
|
|
||||||
|
|
||||||
switch(size)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
|
|
||||||
fmt = "%s:%ld:%s = %ld, 0x%02lx";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
|
|
||||||
fmt = "%s:%ld:%s = %ld, 0x%04lx";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
|
|
||||||
fmt = "%s:%ld:%s = %ld, 0x%08lx";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
_INDENT();
|
|
||||||
|
|
||||||
KPrintF(fmt,file,line,name,value,value);
|
|
||||||
|
|
||||||
if(size == 1 && value < 256)
|
|
||||||
{
|
|
||||||
if(value < ' ' || (value >= 127 && value < 160))
|
|
||||||
KPrintF(", '\\x%02lx'",value);
|
|
||||||
else
|
|
||||||
KPrintF(", '%lc'",value);
|
|
||||||
}
|
|
||||||
|
|
||||||
KPrintF("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_SHOWPOINTER(
|
|
||||||
const void *pointer,
|
|
||||||
const char *name,
|
|
||||||
const char *file,
|
|
||||||
int line)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
char *fmt;
|
|
||||||
|
|
||||||
_INDENT();
|
|
||||||
|
|
||||||
if(pointer != NULL)
|
|
||||||
fmt = "%s:%ld:%s = 0x%08lx\n";
|
|
||||||
else
|
|
||||||
fmt = "%s:%ld:%s = NULL\n";
|
|
||||||
|
|
||||||
KPrintF(fmt,file,line,name,pointer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_SHOWSTRING(
|
|
||||||
const char *string,
|
|
||||||
const char *name,
|
|
||||||
const char *file,
|
|
||||||
int line)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld:%s = 0x%08lx \"%s\"\n",file,line,name,string,string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_SHOWMSG(
|
|
||||||
const char *string,
|
|
||||||
const char *file,
|
|
||||||
int line)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld:%s\n",file,line,string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_DPRINTF_HEADER(
|
|
||||||
const char *file,
|
|
||||||
int line)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld:",file,line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_DPRINTF(const char *fmt,...)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args,fmt);
|
|
||||||
KPutFmt((char *)fmt,args);
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
KPrintF("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_DLOG(const char *fmt,...)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_Reports)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args,fmt);
|
|
||||||
KPutFmt((char *)fmt,args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
_ENTER(
|
|
||||||
const char *file,
|
|
||||||
int line,
|
|
||||||
const char *function)
|
|
||||||
{
|
|
||||||
if(__debug_level >= DEBUGLEVEL_CallTracing)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld:Entering %s\n",file,line,function);
|
|
||||||
}
|
|
||||||
|
|
||||||
indent_level++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_LEAVE(
|
|
||||||
const char *file,
|
|
||||||
int line,
|
|
||||||
const char *function)
|
|
||||||
{
|
|
||||||
indent_level--;
|
|
||||||
|
|
||||||
if(__debug_level >= DEBUGLEVEL_CallTracing)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld: Leaving %s\n",file,line,function);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_RETURN(
|
|
||||||
const char *file,
|
|
||||||
int line,
|
|
||||||
const char *function,
|
|
||||||
unsigned long result)
|
|
||||||
{
|
|
||||||
indent_level--;
|
|
||||||
|
|
||||||
if(__debug_level >= DEBUGLEVEL_CallTracing)
|
|
||||||
{
|
|
||||||
_INDENT();
|
|
||||||
KPrintF("%s:%ld: Leaving %s (result 0x%08lx, %ld)\n",file,line,function,result,result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
191
library/debug.h
191
library/debug.h
@@ -1,191 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug.h,v 1.1.1.1 2004-07-26 16:30:26 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=8
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _DEBUG_H
|
|
||||||
#define _DEBUG_H
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* IMPORTANT: If DEBUG is redefined, it must happen only here. This
|
|
||||||
* will cause all modules to depend upon it to be rebuilt
|
|
||||||
* by the smakefile (that is, provided the smakefile has
|
|
||||||
* all the necessary dependency lines in place).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*#define DEBUG*/
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define PUSH_REPORTS() PUSHDEBUGLEVEL(1)
|
|
||||||
#define PUSH_CALLS() PUSHDEBUGLEVEL(2)
|
|
||||||
#define PUSH_ALL() PUSHDEBUGLEVEL(2)
|
|
||||||
#define POP() POPDEBUGLEVEL()
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern void kprintf(const char *format,...);
|
|
||||||
extern void abort(void);
|
|
||||||
extern char * __program_name;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
void _SHOWVALUE(unsigned long value,int size,const char *name,const char *file,int line);
|
|
||||||
void _SHOWPOINTER(const void *p,const char *name,const char *file,int line);
|
|
||||||
void _SHOWSTRING(const char *string,const char *name,const char *file,int line);
|
|
||||||
void _SHOWMSG(const char *msg,const char *file,int line);
|
|
||||||
void _ENTER(const char *file,int line,const char *function);
|
|
||||||
void _LEAVE(const char *file,int line,const char *function);
|
|
||||||
void _RETURN(const char *file,int line,const char *function,unsigned long result);
|
|
||||||
void _DPRINTF_HEADER(const char *file,int line);
|
|
||||||
void _DPRINTF(const char *format,...);
|
|
||||||
void _DLOG(const char *format,...);
|
|
||||||
int _SETDEBUGLEVEL(int level);
|
|
||||||
void _PUSHDEBUGLEVEL(int level);
|
|
||||||
void _POPDEBUGLEVEL(void);
|
|
||||||
int _GETDEBUGLEVEL(void);
|
|
||||||
void _SETPROGRAMNAME(char *name);
|
|
||||||
|
|
||||||
#if defined(__SASC)
|
|
||||||
#define ENTER() _ENTER(__FILE__,__LINE__,__FUNC__)
|
|
||||||
#define LEAVE() _LEAVE(__FILE__,__LINE__,__FUNC__)
|
|
||||||
#define RETURN(r) _RETURN(__FILE__,__LINE__,__FUNC__,(unsigned long)r)
|
|
||||||
#define SHOWVALUE(v) _SHOWVALUE((unsigned long)v,sizeof(v),#v,__FILE__,__LINE__)
|
|
||||||
#define SHOWPOINTER(p) _SHOWPOINTER(p,#p,__FILE__,__LINE__)
|
|
||||||
#define SHOWSTRING(s) _SHOWSTRING(s,#s,__FILE__,__LINE__)
|
|
||||||
#define SHOWMSG(s) _SHOWMSG(s,__FILE__,__LINE__)
|
|
||||||
#define D(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DPRINTF s; } while(0)
|
|
||||||
#define PRINTHEADER() _DPRINTF_HEADER(__FILE__,__LINE__)
|
|
||||||
#define PRINTF(s) _DLOG s
|
|
||||||
#define LOG(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DLOG("<%s()>:",__FUNC__); _DLOG s; } while(0)
|
|
||||||
#define SETDEBUGLEVEL(l) _SETDEBUGLEVEL(l)
|
|
||||||
#define PUSHDEBUGLEVEL(l) _PUSHDEBUGLEVEL(l)
|
|
||||||
#define POPDEBUGLEVEL() _POPDEBUGLEVEL()
|
|
||||||
#define SETPROGRAMNAME(n) _SETPROGRAMNAME(n)
|
|
||||||
#define GETDEBUGLEVEL() _GETDEBUGLEVEL()
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define ENTER() _ENTER(__FILE__,__LINE__,__FUNCTION__)
|
|
||||||
#define LEAVE() _LEAVE(__FILE__,__LINE__,__FUNCTION__)
|
|
||||||
#define RETURN(r) _RETURN(__FILE__,__LINE__,__FUNCTION__,(unsigned long)r)
|
|
||||||
#define SHOWVALUE(v) _SHOWVALUE((unsigned long)v,sizeof(v),#v,__FILE__,__LINE__)
|
|
||||||
#define SHOWPOINTER(p) _SHOWPOINTER(p,#p,__FILE__,__LINE__)
|
|
||||||
#define SHOWSTRING(s) _SHOWSTRING(s,#s,__FILE__,__LINE__)
|
|
||||||
#define SHOWMSG(s) _SHOWMSG(s,__FILE__,__LINE__)
|
|
||||||
#define D(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DPRINTF s; } while(0)
|
|
||||||
#define PRINTHEADER() _DPRINTF_HEADER(__FILE__,__LINE__)
|
|
||||||
#define PRINTF(s) _DLOG s
|
|
||||||
#define LOG(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DLOG("<%s()>:",__FUNCTION__); _DLOG s; } while(0)
|
|
||||||
#define SETDEBUGLEVEL(l) _SETDEBUGLEVEL(l)
|
|
||||||
#define PUSHDEBUGLEVEL(l) _PUSHDEBUGLEVEL(l)
|
|
||||||
#define POPDEBUGLEVEL() _POPDEBUGLEVEL()
|
|
||||||
#define SETPROGRAMNAME(n) _SETPROGRAMNAME(n)
|
|
||||||
#define GETDEBUGLEVEL() _GETDEBUGLEVEL()
|
|
||||||
#else
|
|
||||||
#define __FUNC__ ""
|
|
||||||
#define ENTER() _ENTER(__FILE__,__LINE__,__FUNC__)
|
|
||||||
#define LEAVE() _LEAVE(__FILE__,__LINE__,__FUNC__)
|
|
||||||
#define RETURN(r) _RETURN(__FILE__,__LINE__,__FUNC__,(unsigned long)r)
|
|
||||||
#define SHOWVALUE(v) _SHOWVALUE((unsigned long)v,sizeof(v),#v,__FILE__,__LINE__)
|
|
||||||
#define SHOWPOINTER(p) _SHOWPOINTER(p,#p,__FILE__,__LINE__)
|
|
||||||
#define SHOWSTRING(s) _SHOWSTRING(s,#s,__FILE__,__LINE__)
|
|
||||||
#define SHOWMSG(s) _SHOWMSG(s,__FILE__,__LINE__)
|
|
||||||
#define D(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DPRINTF s; } while(0)
|
|
||||||
#define PRINTHEADER() _DPRINTF_HEADER(__FILE__,__LINE__)
|
|
||||||
#define PRINTF(s) _DLOG s
|
|
||||||
#define LOG(s) do { _DPRINTF_HEADER(__FILE__,__LINE__); _DLOG("<%s()>:",__FUNC__); _DLOG s; } while(0)
|
|
||||||
#define SETDEBUGLEVEL(l) _SETDEBUGLEVEL(l)
|
|
||||||
#define PUSHDEBUGLEVEL(l) _PUSHDEBUGLEVEL(l)
|
|
||||||
#define POPDEBUGLEVEL() _POPDEBUGLEVEL()
|
|
||||||
#define SETPROGRAMNAME(n) _SETPROGRAMNAME(n)
|
|
||||||
#define GETDEBUGLEVEL() _GETDEBUGLEVEL()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef DEBUG
|
|
||||||
#define DEBUG 1
|
|
||||||
|
|
||||||
#define assert(expression) \
|
|
||||||
((void) \
|
|
||||||
((expression) ? 0 : \
|
|
||||||
( \
|
|
||||||
*(char *)0 = 0, /* Enforcer hit */ \
|
|
||||||
_SETDEBUGLEVEL(2), \
|
|
||||||
kprintf("[%s] " \
|
|
||||||
"%s:%ld: failed assertion '%s'\n", \
|
|
||||||
__program_name, \
|
|
||||||
__FILE__, \
|
|
||||||
__LINE__, \
|
|
||||||
#expression), \
|
|
||||||
abort(), \
|
|
||||||
0 \
|
|
||||||
) \
|
|
||||||
) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define assert(expression) ((void)0)
|
|
||||||
#else
|
|
||||||
#include <assert.h>
|
|
||||||
#endif /* NDEBUG */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define ENTER() ((void)0)
|
|
||||||
#define LEAVE() ((void)0)
|
|
||||||
#define RETURN(r) ((void)0)
|
|
||||||
#define SHOWVALUE(v) ((void)0)
|
|
||||||
#define SHOWPOINTER(p) ((void)0)
|
|
||||||
#define SHOWSTRING(s) ((void)0)
|
|
||||||
#define SHOWMSG(s) ((void)0)
|
|
||||||
#define D(s) ((void)0)
|
|
||||||
#define PRINTHEADER() ((void)0)
|
|
||||||
#define PRINTF(s) ((void)0)
|
|
||||||
#define LOG(s) ((void)0)
|
|
||||||
#define SETDEBUGLEVEL(l) ((void)0)
|
|
||||||
#define PUSHDEBUGLEVEL(l) ((void)0)
|
|
||||||
#define POPDEBUGLEVEL() ((void)0)
|
|
||||||
#define SETPROGRAMNAME(n) ((void)0)
|
|
||||||
#define GETDEBUGLEVEL() (0)
|
|
||||||
|
|
||||||
#define DEBUG 0
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* _DEBUG_H */
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug.lib_rev.c,v 1.1.1.1 2004-07-26 16:30:26 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug.lib_rev.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
char __debug_lib_version[] = VERSTAG;
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#define VERSION 1
|
|
||||||
#define REVISION 171
|
|
||||||
#define DATE "16.8.2004"
|
|
||||||
#define VERS "debug.lib 1.171"
|
|
||||||
#define VSTRING "debug.lib 1.171 (16.8.2004)\r\n"
|
|
||||||
#define VERSTAG "\0$VER: debug.lib 1.171 (16.8.2004)"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
171
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_cmpstrexec.c,v 1.1.1.1 2004-07-26 16:30:26 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
cmpstrexec(const char * source1,const char * source2)
|
|
||||||
{
|
|
||||||
LONG result = 0;
|
|
||||||
|
|
||||||
assert( source1 != NULL && source2 != NULL );
|
|
||||||
|
|
||||||
if(source1 != NULL && source2 != NULL)
|
|
||||||
{
|
|
||||||
while((*source1) == (*source2))
|
|
||||||
{
|
|
||||||
if((*source1) == '\0')
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
source1++;
|
|
||||||
source2++;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = (*source1) - (*source2);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_headers.h,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _DEBUG_HEADERS_H
|
|
||||||
#define _DEBUG_HEADERS_H
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <exec/libraries.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__SASC)
|
|
||||||
|
|
||||||
#include <clib/exec_protos.h>
|
|
||||||
/*#include <pragmas/exec_sysbase_pragmas.h>*/
|
|
||||||
#include <pragmas/exec_pragmas.h>
|
|
||||||
|
|
||||||
LONG RawMayGetChar(VOID);
|
|
||||||
VOID RawPutChar(UBYTE c);
|
|
||||||
|
|
||||||
#pragma libcall SysBase RawMayGetChar 1fe 00
|
|
||||||
#pragma libcall SysBase RawPutChar 204 001
|
|
||||||
|
|
||||||
#endif /* __SASC */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
#include <exec/emulation.h>
|
|
||||||
#endif /* __amigaos4__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
|
|
||||||
#define __NOLIBBASE__
|
|
||||||
#include <proto/exec.h>
|
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
|
|
||||||
#define RawMayGetChar() ({ \
|
|
||||||
UBYTE _RawMayGetChar__re = \
|
|
||||||
({ \
|
|
||||||
register struct Library * const __RawMayGetChar__bn __asm("a6") = SysBase;\
|
|
||||||
register UBYTE __RawMayGetChar__re __asm("d0"); \
|
|
||||||
__asm volatile ("jsr a6@(-510:W)" \
|
|
||||||
: "=r"(__RawMayGetChar__re) \
|
|
||||||
: "r"(__RawMayGetChar__bn) \
|
|
||||||
: "d1", "a0", "a1", "fp0", "fp1", "cc", "memory"); \
|
|
||||||
__RawMayGetChar__re; \
|
|
||||||
}); \
|
|
||||||
_RawMayGetChar__re; \
|
|
||||||
})
|
|
||||||
|
|
||||||
#define RawPutChar(c) ({ \
|
|
||||||
ULONG _RawPutChar_c = (c); \
|
|
||||||
{ \
|
|
||||||
register struct Library * const __RawPutChar__bn __asm("a6") = SysBase;\
|
|
||||||
register ULONG __RawPutChar_c __asm("d0") = (_RawPutChar_c); \
|
|
||||||
__asm volatile ("jsr a6@(-516:W)" \
|
|
||||||
: \
|
|
||||||
: "r"(__RawPutChar__bn), "r"(__RawPutChar_c) \
|
|
||||||
: "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory"); \
|
|
||||||
} \
|
|
||||||
})
|
|
||||||
|
|
||||||
#endif /* __PPC___ */
|
|
||||||
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#define SysBase (*(struct Library **)4)
|
|
||||||
#define IExec ((struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface)
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
extern LONG cmpstrexec(const char *source1, const char *source2);
|
|
||||||
extern LONG KCmpStr(const char *source1, const char *source2);
|
|
||||||
extern LONG KMayGetCh(VOID);
|
|
||||||
extern LONG KMayGetChar(VOID);
|
|
||||||
extern LONG kgetc(VOID);
|
|
||||||
extern LONG kgetchar(VOID);
|
|
||||||
extern LONG kgetch(VOID);
|
|
||||||
extern LONG KGetCh(VOID);
|
|
||||||
extern LONG KGetChar(VOID);
|
|
||||||
extern LONG kgetnum(VOID);
|
|
||||||
extern LONG KGetNum(void);
|
|
||||||
extern VOID KDoFmt(const char *format_string, APTR data_stream, APTR put_char_routine, APTR put_char_data);
|
|
||||||
extern VOID KPutFmt(const char *format, va_list arg);
|
|
||||||
extern VOID KVPrintF(const char * format, va_list arg);
|
|
||||||
extern VOID kvprintf(const char *format, va_list arg);
|
|
||||||
extern VOID kprintf(const char *format, ...);
|
|
||||||
extern VOID KPrintF(const char *format, ...);
|
|
||||||
extern VOID kputc(UBYTE c);
|
|
||||||
extern VOID kputchar(UBYTE c);
|
|
||||||
extern VOID kputch(UBYTE c);
|
|
||||||
extern VOID KPutCh(UBYTE c);
|
|
||||||
extern VOID KPutChar(UBYTE c);
|
|
||||||
extern VOID kputstr(const UBYTE *s);
|
|
||||||
extern VOID KPutS(const UBYTE *s);
|
|
||||||
extern VOID kputs(const UBYTE *s);
|
|
||||||
extern VOID KPutStr(const UBYTE *s);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* _DEBUG_HEADERS_H */
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kcmpstr.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KCmpStr(const char * source1,const char * source2)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = cmpstrexec(source1,source2);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kdofmt.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
KDoFmt(const char * format_string,APTR data_stream,APTR put_char_routine,APTR put_char_data)
|
|
||||||
{
|
|
||||||
assert( format_string != NULL );
|
|
||||||
|
|
||||||
if(format_string != NULL)
|
|
||||||
RawDoFmt((STRPTR)format_string,data_stream,(VOID (*)())put_char_routine,put_char_data);
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetc.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
kgetc(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
do
|
|
||||||
result = KMayGetChar();
|
|
||||||
while(result < 0);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetch1.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
kgetch(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = kgetc();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetch2.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KGetCh(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = kgetc();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetchar1.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
kgetchar(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = kgetc();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetchar2.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KGetChar(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = kgetc();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetnum1.c,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
kgetnum(VOID)
|
|
||||||
{
|
|
||||||
LONG sum = 0;
|
|
||||||
LONG result;
|
|
||||||
BOOL is_negative = FALSE;
|
|
||||||
LONG position = 0;
|
|
||||||
LONG c;
|
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
c = kgetc();
|
|
||||||
|
|
||||||
if(c == '-')
|
|
||||||
{
|
|
||||||
if(position == 0)
|
|
||||||
{
|
|
||||||
is_negative = TRUE;
|
|
||||||
|
|
||||||
kputc(c);
|
|
||||||
|
|
||||||
position++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (c == '\b')
|
|
||||||
{
|
|
||||||
if(position > 0)
|
|
||||||
{
|
|
||||||
position--;
|
|
||||||
if(position == 0)
|
|
||||||
{
|
|
||||||
is_negative = FALSE;
|
|
||||||
|
|
||||||
sum = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sum = sum / 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
kputc(c);
|
|
||||||
kputc(' ');
|
|
||||||
kputc(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (c == '\r')
|
|
||||||
{
|
|
||||||
kputc('\n');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if ('0' <= c && c <= '9')
|
|
||||||
{
|
|
||||||
LONG new_sum;
|
|
||||||
|
|
||||||
new_sum = sum * 10 + (c - '0');
|
|
||||||
if(new_sum >= sum)
|
|
||||||
{
|
|
||||||
sum = new_sum;
|
|
||||||
|
|
||||||
kputc(c);
|
|
||||||
|
|
||||||
position++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_negative)
|
|
||||||
result = (-sum);
|
|
||||||
else
|
|
||||||
result = sum;
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kgetnum2.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KGetNum(void)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = kgetnum();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kmaygetch.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KMayGetCh(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
result = KMayGetChar();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kmaygetchar.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
|
||||||
KMayGetChar(VOID)
|
|
||||||
{
|
|
||||||
LONG result;
|
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
{
|
|
||||||
/* Call RawMayGetChar() through the 68k LVO. */
|
|
||||||
result = EmulateTags(SysBase, ET_Offset, -510, TAG_DONE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
result = RawMayGetChar();
|
|
||||||
}
|
|
||||||
#endif /* __amigaos4__ */
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kprintf1.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
kprintf(const char * format,...)
|
|
||||||
{
|
|
||||||
assert( format != NULL );
|
|
||||||
|
|
||||||
if(format != NULL)
|
|
||||||
{
|
|
||||||
va_list arg;
|
|
||||||
|
|
||||||
va_start(arg,format);
|
|
||||||
KPutFmt(format,arg);
|
|
||||||
va_end(arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kprintf2.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
KPrintF(const char * format,...)
|
|
||||||
{
|
|
||||||
assert( format != NULL );
|
|
||||||
|
|
||||||
if(format != NULL)
|
|
||||||
{
|
|
||||||
va_list arg;
|
|
||||||
|
|
||||||
va_start(arg,format);
|
|
||||||
KPutFmt(format,arg);
|
|
||||||
va_end(arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kputc.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
kputc(UBYTE c)
|
|
||||||
{
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
{
|
|
||||||
/* Call RawPutChar() through the 68k LVO. */
|
|
||||||
EmulateTags(SysBase, ET_Offset, -516, ET_RegisterD0, c, TAG_DONE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
RawPutChar(c);
|
|
||||||
}
|
|
||||||
#endif /* __amigaos4__ */
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kputch1.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
kputch(UBYTE c)
|
|
||||||
{
|
|
||||||
kputc(c);
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kputch2.c,v 1.1.1.1 2004-07-26 16:30:28 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
KPutCh(UBYTE c)
|
|
||||||
{
|
|
||||||
kputc(c);
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kputchar1.c,v 1.1.1.1 2004-07-26 16:30:29 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
kputchar(UBYTE c)
|
|
||||||
{
|
|
||||||
kputc(c);
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: debug_kputchar2.c,v 1.1.1.1 2004-07-26 16:30:29 obarthel Exp $
|
|
||||||
*
|
|
||||||
* :ts=4
|
|
||||||
*
|
|
||||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
|
||||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* - Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
|
||||||
* may be used to endorse or promote products derived from this
|
|
||||||
* software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "debug_headers.h"
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
KPutChar(UBYTE c)
|
|
||||||
{
|
|
||||||
kputc(c);
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user