Merge branch 'master' into 'master'
Reorganized, made better Makefile, deleted useless files This project is clean now. 😃 See merge request !1
This commit is contained in:
commit
e657b210ac
|
@ -0,0 +1,5 @@
|
|||
/obj
|
||||
/Sound4Calc.sublime-workspace
|
||||
/*.bin
|
||||
/*.elf
|
||||
/*.g1a
|
|
@ -0,0 +1 @@
|
|||
_No published version yet._
|
|
@ -0,0 +1,540 @@
|
|||
GNU General Public License
|
||||
==========================
|
||||
|
||||
_Version 3, 29 June 2007_
|
||||
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and other
|
||||
kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away
|
||||
your freedom to share and change the works. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change all versions of a
|
||||
program--to make sure it remains free software for all its users. We, the Free
|
||||
Software Foundation, use the GNU General Public License for most of our software; it
|
||||
applies also to any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General
|
||||
Public Licenses are designed to make sure that you have the freedom to distribute
|
||||
copies of free software (and charge for them if you wish), that you receive source
|
||||
code or can get it if you want it, that you can change the software or use pieces of
|
||||
it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or
|
||||
asking you to surrender the rights. Therefore, you have certain responsibilities if
|
||||
you distribute copies of the software, or if you modify it: responsibilities to
|
||||
respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee,
|
||||
you must pass on to the recipients the same freedoms that you received. You must make
|
||||
sure that they, too, receive or can get the source code. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: **(1)** assert
|
||||
copyright on the software, and **(2)** offer you this License giving you legal permission
|
||||
to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is
|
||||
no warranty for this free software. For both users' and authors' sake, the GPL
|
||||
requires that modified versions be marked as changed, so that their problems will not
|
||||
be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of
|
||||
the software inside them, although the manufacturer can do so. This is fundamentally
|
||||
incompatible with the aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we have designed
|
||||
this version of the GPL to prohibit the practice for those products. If such problems
|
||||
arise substantially in other domains, we stand ready to extend this provision to
|
||||
those domains in future versions of the GPL, as needed to protect the freedom of
|
||||
users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should
|
||||
not allow patents to restrict development and use of software on general-purpose
|
||||
computers, but in those that do, we wish to avoid the special danger that patents
|
||||
applied to a free program could make it effectively proprietary. To prevent this, the
|
||||
GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
## TERMS AND CONDITIONS
|
||||
|
||||
### 0. Definitions
|
||||
|
||||
“This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as “you”. “Licensees” and
|
||||
“recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in
|
||||
a fashion requiring copyright permission, other than the making of an exact copy. The
|
||||
resulting work is called a “modified version” of the earlier work or a
|
||||
work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on
|
||||
the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for infringement under
|
||||
applicable copyright law, except executing it on a computer or modifying a private
|
||||
copy. Propagation includes copying, distribution (with or without modification),
|
||||
making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through a computer
|
||||
network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the
|
||||
extent that it includes a convenient and prominently visible feature that **(1)**
|
||||
displays an appropriate copyright notice, and **(2)** tells the user that there is no
|
||||
warranty for the work (except to the extent that warranties are provided), that
|
||||
licensees may convey the work under this License, and how to view a copy of this
|
||||
License. If the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
### 1. Source Code
|
||||
|
||||
The “source code” for a work means the preferred form of the work for
|
||||
making modifications to it. “Object code” means any non-source form of a
|
||||
work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of interfaces
|
||||
specified for a particular programming language, one that is widely used among
|
||||
developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than
|
||||
the work as a whole, that **(a)** is included in the normal form of packaging a Major
|
||||
Component, but which is not part of that Major Component, and **(b)** serves only to
|
||||
enable use of the work with that Major Component, or to implement a Standard
|
||||
Interface for which an implementation is available to the public in source code form.
|
||||
A “Major Component”, in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system (if any) on which
|
||||
the executable work runs, or a compiler used to produce the work, or an object code
|
||||
interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the
|
||||
source code needed to generate, install, and (for an executable work) run the object
|
||||
code and to modify the work, including scripts to control those activities. However,
|
||||
it does not include the work's System Libraries, or general-purpose tools or
|
||||
generally available free programs which are used unmodified in performing those
|
||||
activities but which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for the work, and
|
||||
the source code for shared libraries and dynamically linked subprograms that the work
|
||||
is specifically designed to require, such as by intimate data communication or
|
||||
control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate
|
||||
automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
### 2. Basic Permissions
|
||||
|
||||
All rights granted under this License are granted for the term of copyright on the
|
||||
Program, and are irrevocable provided the stated conditions are met. This License
|
||||
explicitly affirms your unlimited permission to run the unmodified Program. The
|
||||
output from running a covered work is covered by this License only if the output,
|
||||
given its content, constitutes a covered work. This License acknowledges your rights
|
||||
of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without
|
||||
conditions so long as your license otherwise remains in force. You may convey covered
|
||||
works to others for the sole purpose of having them make modifications exclusively
|
||||
for you, or provide you with facilities for running those works, provided that you
|
||||
comply with the terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for you must do so
|
||||
exclusively on your behalf, under your direction and control, on terms that prohibit
|
||||
them from making any copies of your copyrighted material outside their relationship
|
||||
with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions
|
||||
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
|
||||
|
||||
No covered work shall be deemed part of an effective technological measure under any
|
||||
applicable law fulfilling obligations under article 11 of the WIPO copyright treaty
|
||||
adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention
|
||||
of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of
|
||||
technological measures to the extent such circumvention is effected by exercising
|
||||
rights under this License with respect to the covered work, and you disclaim any
|
||||
intention to limit operation or modification of the work as a means of enforcing,
|
||||
against the work's users, your or third parties' legal rights to forbid circumvention
|
||||
of technological measures.
|
||||
|
||||
### 4. Conveying Verbatim Copies
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any
|
||||
medium, provided that you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice; keep intact all notices stating that this License and
|
||||
any non-permissive terms added in accord with section 7 apply to the code; keep
|
||||
intact all notices of the absence of any warranty; and give all recipients a copy of
|
||||
this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer
|
||||
support or warranty protection for a fee.
|
||||
|
||||
### 5. Conveying Modified Source Versions
|
||||
|
||||
You may convey a work based on the Program, or the modifications to produce it from
|
||||
the Program, in the form of source code under the terms of section 4, provided that
|
||||
you also meet all of these conditions:
|
||||
|
||||
* **a)** The work must carry prominent notices stating that you modified it, and giving a
|
||||
relevant date.
|
||||
* **b)** The work must carry prominent notices stating that it is released under this
|
||||
License and any conditions added under section 7. This requirement modifies the
|
||||
requirement in section 4 to “keep intact all notices”.
|
||||
* **c)** You must license the entire work, as a whole, under this License to anyone who
|
||||
comes into possession of a copy. This License will therefore apply, along with any
|
||||
applicable section 7 additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no permission to license the
|
||||
work in any other way, but it does not invalidate such permission if you have
|
||||
separately received it.
|
||||
* **d)** If the work has interactive user interfaces, each must display Appropriate Legal
|
||||
Notices; however, if the Program has interactive interfaces that do not display
|
||||
Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are
|
||||
not by their nature extensions of the covered work, and which are not combined with
|
||||
it such as to form a larger program, in or on a volume of a storage or distribution
|
||||
medium, is called an “aggregate” if the compilation and its resulting
|
||||
copyright are not used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work in an aggregate
|
||||
does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
### 6. Conveying Non-Source Forms
|
||||
|
||||
You may convey a covered work in object code form under the terms of sections 4 and
|
||||
5, provided that you also convey the machine-readable Corresponding Source under the
|
||||
terms of this License, in one of these ways:
|
||||
|
||||
* **a)** Convey the object code in, or embodied in, a physical product (including a
|
||||
physical distribution medium), accompanied by the Corresponding Source fixed on a
|
||||
durable physical medium customarily used for software interchange.
|
||||
* **b)** Convey the object code in, or embodied in, a physical product (including a
|
||||
physical distribution medium), accompanied by a written offer, valid for at least
|
||||
three years and valid for as long as you offer spare parts or customer support for
|
||||
that product model, to give anyone who possesses the object code either **(1)** a copy of
|
||||
the Corresponding Source for all the software in the product that is covered by this
|
||||
License, on a durable physical medium customarily used for software interchange, for
|
||||
a price no more than your reasonable cost of physically performing this conveying of
|
||||
source, or **(2)** access to copy the Corresponding Source from a network server at no
|
||||
charge.
|
||||
* **c)** Convey individual copies of the object code with a copy of the written offer to
|
||||
provide the Corresponding Source. This alternative is allowed only occasionally and
|
||||
noncommercially, and only if you received the object code with such an offer, in
|
||||
accord with subsection 6b.
|
||||
* **d)** Convey the object code by offering access from a designated place (gratis or for
|
||||
a charge), and offer equivalent access to the Corresponding Source in the same way
|
||||
through the same place at no further charge. You need not require recipients to copy
|
||||
the Corresponding Source along with the object code. If the place to copy the object
|
||||
code is a network server, the Corresponding Source may be on a different server
|
||||
(operated by you or a third party) that supports equivalent copying facilities,
|
||||
provided you maintain clear directions next to the object code saying where to find
|
||||
the Corresponding Source. Regardless of what server hosts the Corresponding Source,
|
||||
you remain obligated to ensure that it is available for as long as needed to satisfy
|
||||
these requirements.
|
||||
* **e)** Convey the object code using peer-to-peer transmission, provided you inform
|
||||
other peers where the object code and Corresponding Source of the work are being
|
||||
offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the
|
||||
Corresponding Source as a System Library, need not be included in conveying the
|
||||
object code work.
|
||||
|
||||
A “User Product” is either **(1)** a “consumer product”, which
|
||||
means any tangible personal property which is normally used for personal, family, or
|
||||
household purposes, or **(2)** anything designed or sold for incorporation into a
|
||||
dwelling. In determining whether a product is a consumer product, doubtful cases
|
||||
shall be resolved in favor of coverage. For a particular product received by a
|
||||
particular user, “normally used” refers to a typical or common use of
|
||||
that class of product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected to use, the
|
||||
product. A product is a consumer product regardless of whether the product has
|
||||
substantial commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install and execute
|
||||
modified versions of a covered work in that User Product from a modified version of
|
||||
its Corresponding Source. The information must suffice to ensure that the continued
|
||||
functioning of the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for
|
||||
use in, a User Product, and the conveying occurs as part of a transaction in which
|
||||
the right of possession and use of the User Product is transferred to the recipient
|
||||
in perpetuity or for a fixed term (regardless of how the transaction is
|
||||
characterized), the Corresponding Source conveyed under this section must be
|
||||
accompanied by the Installation Information. But this requirement does not apply if
|
||||
neither you nor any third party retains the ability to install modified object code
|
||||
on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to
|
||||
continue to provide support service, warranty, or updates for a work that has been
|
||||
modified or installed by the recipient, or for the User Product in which it has been
|
||||
modified or installed. Access to a network may be denied when the modification itself
|
||||
materially and adversely affects the operation of the network or violates the rules
|
||||
and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with
|
||||
this section must be in a format that is publicly documented (and with an
|
||||
implementation available to the public in source code form), and must require no
|
||||
special password or key for unpacking, reading or copying.
|
||||
|
||||
### 7. Additional Terms
|
||||
|
||||
“Additional permissions” are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions. Additional
|
||||
permissions that are applicable to the entire Program shall be treated as though they
|
||||
were included in this License, to the extent that they are valid under applicable
|
||||
law. If additional permissions apply only to part of the Program, that part may be
|
||||
used separately under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any
|
||||
additional permissions from that copy, or from any part of it. (Additional
|
||||
permissions may be written to require their own removal in certain cases when you
|
||||
modify the work.) You may place additional permissions on material, added by you to a
|
||||
covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a
|
||||
covered work, you may (if authorized by the copyright holders of that material)
|
||||
supplement the terms of this License with terms:
|
||||
|
||||
* **a)** Disclaiming warranty or limiting liability differently from the terms of
|
||||
sections 15 and 16 of this License; or
|
||||
* **b)** Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices displayed by works
|
||||
containing it; or
|
||||
* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that
|
||||
modified versions of such material be marked in reasonable ways as different from the
|
||||
original version; or
|
||||
* **d)** Limiting the use for publicity purposes of names of licensors or authors of the
|
||||
material; or
|
||||
* **e)** Declining to grant rights under trademark law for use of some trade names,
|
||||
trademarks, or service marks; or
|
||||
* **f)** Requiring indemnification of licensors and authors of that material by anyone
|
||||
who conveys the material (or modified versions of it) with contractual assumptions of
|
||||
liability to the recipient, for any liability that these contractual assumptions
|
||||
directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further
|
||||
restrictions” within the meaning of section 10. If the Program as you received
|
||||
it, or any part of it, contains a notice stating that it is governed by this License
|
||||
along with a term that is a further restriction, you may remove that term. If a
|
||||
license document contains a further restriction but permits relicensing or conveying
|
||||
under this License, you may add to a covered work material governed by the terms of
|
||||
that license document, provided that the further restriction does not survive such
|
||||
relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in
|
||||
the relevant source files, a statement of the additional terms that apply to those
|
||||
files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a
|
||||
separately written license, or stated as exceptions; the above requirements apply
|
||||
either way.
|
||||
|
||||
### 8. Termination
|
||||
|
||||
You may not propagate or modify a covered work except as expressly provided under
|
||||
this License. Any attempt otherwise to propagate or modify it is void, and will
|
||||
automatically terminate your rights under this License (including any patent licenses
|
||||
granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a
|
||||
particular copyright holder is reinstated **(a)** provisionally, unless and until the
|
||||
copyright holder explicitly and finally terminates your license, and **(b)** permanently,
|
||||
if the copyright holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently
|
||||
if the copyright holder notifies you of the violation by some reasonable means, this
|
||||
is the first time you have received notice of violation of this License (for any
|
||||
work) from that copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of
|
||||
parties who have received copies or rights from you under this License. If your
|
||||
rights have been terminated and not permanently reinstated, you do not qualify to
|
||||
receive new licenses for the same material under section 10.
|
||||
|
||||
### 9. Acceptance Not Required for Having Copies
|
||||
|
||||
You are not required to accept this License in order to receive or run a copy of the
|
||||
Program. Ancillary propagation of a covered work occurring solely as a consequence of
|
||||
using peer-to-peer transmission to receive a copy likewise does not require
|
||||
acceptance. However, nothing other than this License grants you permission to
|
||||
propagate or modify any covered work. These actions infringe copyright if you do not
|
||||
accept this License. Therefore, by modifying or propagating a covered work, you
|
||||
indicate your acceptance of this License to do so.
|
||||
|
||||
### 10. Automatic Licensing of Downstream Recipients
|
||||
|
||||
Each time you convey a covered work, the recipient automatically receives a license
|
||||
from the original licensors, to run, modify and propagate that work, subject to this
|
||||
License. You are not responsible for enforcing compliance by third parties with this
|
||||
License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an organization, or
|
||||
merging organizations. If propagation of a covered work results from an entity
|
||||
transaction, each party to that transaction who receives a copy of the work also
|
||||
receives whatever licenses to the work the party's predecessor in interest had or
|
||||
could give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if the predecessor
|
||||
has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or
|
||||
affirmed under this License. For example, you may not impose a license fee, royalty,
|
||||
or other charge for exercise of rights granted under this License, and you may not
|
||||
initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that any patent claim is infringed by making, using, selling, offering for sale, or
|
||||
importing the Program or any portion of it.
|
||||
|
||||
### 11. Patents
|
||||
|
||||
A “contributor” is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The work thus
|
||||
licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or
|
||||
controlled by the contributor, whether already acquired or hereafter acquired, that
|
||||
would be infringed by some manner, permitted by this License, of making, using, or
|
||||
selling its contributor version, but do not include claims that would be infringed
|
||||
only as a consequence of further modification of the contributor version. For
|
||||
purposes of this definition, “control” includes the right to grant patent
|
||||
sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license
|
||||
under the contributor's essential patent claims, to make, use, sell, offer for sale,
|
||||
import and otherwise run, modify and propagate the contents of its contributor
|
||||
version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent (such as an
|
||||
express permission to practice a patent or covenant not to sue for patent
|
||||
infringement). To “grant” such a patent license to a party means to make
|
||||
such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the
|
||||
Corresponding Source of the work is not available for anyone to copy, free of charge
|
||||
and under the terms of this License, through a publicly available network server or
|
||||
other readily accessible means, then you must either **(1)** cause the Corresponding
|
||||
Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or **(3)** arrange, in a manner consistent with
|
||||
the requirements of this License, to extend the patent license to downstream
|
||||
recipients. “Knowingly relying” means you have actual knowledge that, but
|
||||
for the patent license, your conveying the covered work in a country, or your
|
||||
recipient's use of the covered work in a country, would infringe one or more
|
||||
identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you
|
||||
convey, or propagate by procuring conveyance of, a covered work, and grant a patent
|
||||
license to some of the parties receiving the covered work authorizing them to use,
|
||||
propagate, modify or convey a specific copy of the covered work, then the patent
|
||||
license you grant is automatically extended to all recipients of the covered work and
|
||||
works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on the
|
||||
non-exercise of one or more of the rights that are specifically granted under this
|
||||
License. You may not convey a covered work if you are a party to an arrangement with
|
||||
a third party that is in the business of distributing software, under which you make
|
||||
payment to the third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties who would receive
|
||||
the covered work from you, a discriminatory patent license **(a)** in connection with
|
||||
copies of the covered work conveyed by you (or copies made from those copies), or **(b)**
|
||||
primarily for and in connection with specific products or compilations that contain
|
||||
the covered work, unless you entered into that arrangement, or that patent license
|
||||
was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied
|
||||
license or other defenses to infringement that may otherwise be available to you
|
||||
under applicable patent law.
|
||||
|
||||
### 12. No Surrender of Others' Freedom
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise)
|
||||
that contradict the conditions of this License, they do not excuse you from the
|
||||
conditions of this License. If you cannot convey a covered work so as to satisfy
|
||||
simultaneously your obligations under this License and any other pertinent
|
||||
obligations, then as a consequence you may not convey it at all. For example, if you
|
||||
agree to terms that obligate you to collect a royalty for further conveying from
|
||||
those to whom you convey the Program, the only way you could satisfy both those terms
|
||||
and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
### 13. Use with the GNU Affero General Public License
|
||||
|
||||
Notwithstanding any other provision of this License, you have permission to link or
|
||||
combine any covered work with a work licensed under version 3 of the GNU Affero
|
||||
General Public License into a single combined work, and to convey the resulting work.
|
||||
The terms of this License will continue to apply to the part which is the covered
|
||||
work, but the special requirements of the GNU Affero General Public License, section
|
||||
13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
### 14. Revised Versions of this License
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU
|
||||
General Public License from time to time. Such new versions will be similar in spirit
|
||||
to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that
|
||||
a certain numbered version of the GNU General Public License “or any later
|
||||
version” applies to it, you have the option of following the terms and
|
||||
conditions either of that numbered version or of any later version published by the
|
||||
Free Software Foundation. If the Program does not specify a version number of the GNU
|
||||
General Public License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU
|
||||
General Public License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no
|
||||
additional obligations are imposed on any author or copyright holder as a result of
|
||||
your choosing to follow a later version.
|
||||
|
||||
### 15. Disclaimer of Warranty
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
|
||||
QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
### 16. Limitation of Liability
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
|
||||
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
|
||||
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE
|
||||
OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE
|
||||
WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
### 17. Interpretation of Sections 15 and 16
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be
|
||||
given local legal effect according to their terms, reviewing courts shall apply local
|
||||
law that most closely approximates an absolute waiver of all civil liability in
|
||||
connection with the Program, unless a warranty or assumption of liability accompanies
|
||||
a copy of the Program in return for a fee.
|
89
Makefile
89
Makefile
|
@ -1,48 +1,65 @@
|
|||
.PHONY: all mrproper send
|
||||
#!/usr/bin/make -f
|
||||
# INCLUDE CONFIGURATION
|
||||
include $(CURDIR)/Makefile.cfg
|
||||
|
||||
PREFIX = sh3eb-elf-
|
||||
AS = $(PREFIX)as
|
||||
CC = $(PREFIX)gcc
|
||||
CXX = $(PREFIX)g++
|
||||
OBJCOPY = $(PREFIX)objcopy
|
||||
WRAPPER = g1a-wrapper
|
||||
SEND = UsbConnector
|
||||
# DEDUCED VARS
|
||||
ALLOBJ = $(SRC:%=$(OBJDIR)/%.o)
|
||||
ALLINC = $(INC:%=$(INCDIR)/%.h)
|
||||
|
||||
FLAGS = -m3 -mb -Os -nostdlib
|
||||
CFLAGS = -W -Wall -Wno-main -pedantic -std=c11
|
||||
INCLUDE = -I. -Iinclude -isystem stdinc
|
||||
LIBS = -Llib -lgcc -lfx
|
||||
NAME = sound
|
||||
# RULES
|
||||
## Make it all (default rule)
|
||||
all: $(NAME).g1a
|
||||
|
||||
OBJ = build/Sound4Calc.o build/crt0.o build/syscall.o
|
||||
ICON = icon.bmp
|
||||
## Make the object directory
|
||||
$(OBJDIR):
|
||||
mkdir -p $(OBJDIR)
|
||||
|
||||
## Make an object file out of an ASM source file
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.s
|
||||
$(AS) -c -o $@ $<
|
||||
|
||||
all: build/$(NAME).bin
|
||||
@ $(WRAPPER) build/$(NAME).bin -o bin/$(NAME).g1a
|
||||
@ echo "Build finished."
|
||||
@ stat -c "Output size is %s bytes." bin/$(NAME).g1a
|
||||
## Make an object file out of a C source file
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(ALLINC)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
build/$(NAME).bin: build/$(NAME).elf
|
||||
@ $(OBJCOPY) -R .comment -R .bss -O binary build/$(NAME).elf build/$(NAME).bin
|
||||
## Make the ELF file
|
||||
$(NAME).elf: $(OBJDIR) $(ALLOBJ)
|
||||
$(LD) -o $@ $(ALLOBJ) $(LFLAGS)
|
||||
|
||||
build/$(NAME).elf: bin/addin.ld $(OBJ)
|
||||
@ $(CC) $(FLAGS) $(OBJ) -T"bin/addin.ld" -o build/$(NAME).elf $(LIBS)
|
||||
## Make the BIN file
|
||||
$(NAME).bin: $(NAME).elf
|
||||
$(OBJCPY) -R .comment -R .bss -R '$$iop' -O binary $< $@
|
||||
|
||||
build/%.o: %.c
|
||||
@ $(CC) $(FLAGS) -c $^ -o $@ $(INCLUDE) $(CFLAGS)
|
||||
## Make the G1A file
|
||||
$(NAME).g1a: $(NAME).bin
|
||||
$(WRAPR) $< -o $(NAME).g1a
|
||||
@stat -c "Build finished -- output size is %s bytes." $(NAME).g1a
|
||||
|
||||
build/%.o: %.s
|
||||
@ $(AS) -c $^ -o $@
|
||||
## Clean up your mess
|
||||
clean:
|
||||
$(RM) $(ALLOBJ)
|
||||
$(RM) $(NAME).elf
|
||||
$(RM) $(NAME).bin
|
||||
|
||||
## Clean up everything
|
||||
mrproper: clean
|
||||
$(RM) $(NAME).g1a
|
||||
fclean: mrproper
|
||||
|
||||
## Remake
|
||||
re: fclean all
|
||||
|
||||
## Send to calc
|
||||
send:
|
||||
@ cp bin/$(NAME).g1a $(NAME).g1a
|
||||
@ $(SEND) SEND $(NAME).g1a $(NAME).g1a fls0
|
||||
@ rm -f $(NAME).g1a
|
||||
|
||||
mrproper:
|
||||
rm -f build/*.o
|
||||
rm -f build/$(NAME).elf
|
||||
rm -f build/$(NAME).bin
|
||||
|
||||
@if [ ! -f $(NAME).g1a ]; then \
|
||||
echo "Please make before sending." >&2; false; \
|
||||
fi
|
||||
@if $(SENDR) SEND $(NAME).g1a $(NAME).g1a fls0 1>/dev/null; \
|
||||
then true; \
|
||||
else echo "UsbConnector: calculator not plugged-in/in receive mode" >&2; \
|
||||
false; \
|
||||
fi
|
||||
|
||||
## Phuneral phuture ?
|
||||
.PHONY: all clean fclean mrproper re send
|
||||
# END OF FILE
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/make -f
|
||||
# PROJECT INFORMATION
|
||||
NAME = Sound4Calc
|
||||
ICON = ./icon.bmp
|
||||
LIB = gcc fx
|
||||
|
||||
## DIRECTORIES
|
||||
SRCDIR = ./src
|
||||
INCDIR = ./include
|
||||
OBJDIR = ./obj
|
||||
LIBDIR = ./lib
|
||||
SCPTDIR = ./scripts
|
||||
|
||||
# TOOLCHAIN
|
||||
## Directory maker
|
||||
MD = mkdir -p
|
||||
## File remover
|
||||
RM = rm -f
|
||||
## Assembler
|
||||
AS = sh3eb-elf-as
|
||||
## C compiler
|
||||
CC = sh3eb-elf-gcc
|
||||
CFLAGS = -m3 -mb -Os -nostdlib -Wall -Wextra -Wno-main -pedantic -std=c11 -I $(INCDIR)
|
||||
## Linker
|
||||
LD = sh3eb-elf-gcc
|
||||
LFLAGS = -nostdlib -T $(SCPTDIR)/addin.ld -L $(LIBDIR) $(addprefix -l,$(LIB))
|
||||
## Object copier
|
||||
OBJCPY = sh3eb-elf-objcopy
|
||||
## G1A Wrapper
|
||||
WRAPR = g1a-wrapper
|
||||
## Sender
|
||||
SENDR = UsbConnector
|
||||
|
||||
# SOURCES
|
||||
SRC = crt0 Sound4Calc syscall
|
||||
|
||||
# INCLUDES
|
||||
INC = dispbios endian filebios fxlib keybios timer \
|
||||
stdlib syscall \
|
||||
Sound4Calc
|
||||
|
||||
# END OF FILE
|
|
@ -1,576 +0,0 @@
|
|||
{
|
||||
"auto_complete":
|
||||
{
|
||||
"selected_items":
|
||||
[
|
||||
[
|
||||
"a",
|
||||
"a"
|
||||
],
|
||||
[
|
||||
"ma",
|
||||
"math"
|
||||
],
|
||||
[
|
||||
"ml",
|
||||
"ML_display_vram"
|
||||
],
|
||||
[
|
||||
"boat_",
|
||||
"boat_r"
|
||||
],
|
||||
[
|
||||
"bot_",
|
||||
"boat_r"
|
||||
],
|
||||
[
|
||||
"bot",
|
||||
"boat_r"
|
||||
],
|
||||
[
|
||||
"l",
|
||||
"l"
|
||||
],
|
||||
[
|
||||
"hl",
|
||||
"hl"
|
||||
],
|
||||
[
|
||||
"c",
|
||||
"c"
|
||||
],
|
||||
[
|
||||
"d",
|
||||
"d"
|
||||
],
|
||||
[
|
||||
"L",
|
||||
"Load_polygone_loop2"
|
||||
],
|
||||
[
|
||||
"proprié",
|
||||
"propriété"
|
||||
],
|
||||
[
|
||||
"Del",
|
||||
"Delta_Y"
|
||||
],
|
||||
[
|
||||
"D",
|
||||
"Delta_X"
|
||||
],
|
||||
[
|
||||
"__",
|
||||
"__base_printf"
|
||||
],
|
||||
[
|
||||
"be",
|
||||
"before"
|
||||
]
|
||||
]
|
||||
},
|
||||
"buffers":
|
||||
[
|
||||
{
|
||||
"file": "Sound4Calc.c",
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 5121,
|
||||
"line_ending": "Unix"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "addresses.h",
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 40864,
|
||||
"line_ending": "Unix"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "Makefile",
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 1104,
|
||||
"line_ending": "Unix"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "Sound4Calc.h",
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 215,
|
||||
"line_ending": "Unix"
|
||||
}
|
||||
}
|
||||
],
|
||||
"build_system": "",
|
||||
"build_system_choices":
|
||||
[
|
||||
],
|
||||
"build_varint": "",
|
||||
"command_palette":
|
||||
{
|
||||
"height": 0.0,
|
||||
"last_filter": "",
|
||||
"selected_items":
|
||||
[
|
||||
],
|
||||
"width": 0.0
|
||||
},
|
||||
"console":
|
||||
{
|
||||
"height": 153.0,
|
||||
"history":
|
||||
[
|
||||
]
|
||||
},
|
||||
"distraction_free":
|
||||
{
|
||||
"menu_visible": true,
|
||||
"show_minimap": false,
|
||||
"show_open_files": false,
|
||||
"show_tabs": false,
|
||||
"side_bar_visible": false,
|
||||
"status_bar_visible": false
|
||||
},
|
||||
"file_history":
|
||||
[
|
||||
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.sublime-workspace",
|
||||
"/home/ulimit/.config/sublime-text-3/Packages/User/C++.sublime-settings",
|
||||
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.h",
|
||||
"/home/ulimit/Bureau/Sound4Calc/crt0.s",
|
||||
"/home/ulimit/Bureau/CasioUsb-Files-14276/CasioUsb-Sources/Makefile",
|
||||
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.c",
|
||||
"/home/ulimit/Bureau/Sound4Calc/.git/refs/remotes/origin/master",
|
||||
"/home/ulimit/Bureau/Sound4Calc/.git/refs/heads/master",
|
||||
"/home/ulimit/.cache/.fr-hsDhJT/Sound4Calc-master-ea3869585beb9d01cd849a1ec4ee6a9f1551e9c4/Sound4Calc.c",
|
||||
"/home/ulimit/Bureau/Git_depot/.git/config",
|
||||
"/home/ulimit/.cache/.fr-HaPj72/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/Menu.cpp",
|
||||
"/home/ulimit/.cache/.fr-2XLUx2/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/Menu.hpp",
|
||||
"/home/ulimit/.cache/.fr-jL6Cxs/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/README.md",
|
||||
"/media/ulimit/Chang/Comté/.~lock.comté ecrit.odt#",
|
||||
"/home/ulimit/.cache/.fr-8aSPsA/SCIFTEST.c",
|
||||
"/home/ulimit/Bureau/Sound4Calc/autre/syscall.s",
|
||||
"/home/ulimit/Bureau/Sound4Calc/syscall.h",
|
||||
"/home/ulimit/Bureau/Sound4Calc/syscall.s",
|
||||
"/media/ulimit/Chang/Sound4Calc/New/Sound4Calc.c",
|
||||
"/home/ulimit/Bureau/key_test/Makefile",
|
||||
"/home/ulimit/Bureau/key_test/syscall.h",
|
||||
"/home/ulimit/Bureau/key_test/syscall.s",
|
||||
"/home/ulimit/Bureau/key_test/key.c",
|
||||
"/home/ulimit/Bureau/key_test/syscall.c",
|
||||
"/home/ulimit/.cache/.fr-evMloG/RTC.c",
|
||||
"/home/ulimit/Bureau/Nouveau dossier 3/Nouveau",
|
||||
"/home/ulimit/Bureau/Nouveau dossier 3/Nouveau document",
|
||||
"/home/ulimit/Bureau/RPi 3",
|
||||
"/home/ulimit/Sound4Calc/.git/config",
|
||||
"/home/ulimit/Bureau/Caisse Régionale Loire Haute Loire_files/infosbulle.js",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/campaigns/natives/scripting.lua",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/campaigns/natives/startpos.esf",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/anim.pack",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/all_scripted.lua",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/checksum",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/battle_scripted.lua",
|
||||
"/home/ulimit/Bureau/mon_script.sh",
|
||||
"/home/ulimit/Bureau/Nouveau dossier/xinput-decoder.py",
|
||||
"/home/ulimit/Bureau/Nouveau dossier/xinputtest",
|
||||
"/media/ulimit/My U3 Drive/ZbThumbnail.info",
|
||||
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/language.txt",
|
||||
"/media/ulimit/e6e7f776-11a4-4cd7-b4fd-c44ecdbfcf90/etc/resolv.conf",
|
||||
"/home/ulimit/.cache/.fr-v6y6TO/minetest.conf.example",
|
||||
"/home/ulimit/.cache/.fr-tH2FKG/Jetpack Joyride Casio - LastIndev/fonctions.c",
|
||||
"/home/ulimit/.cache/.fr-LkbQfI/Jetpack Joyride Casio - LastIndev/._fonctions.c",
|
||||
"/home/ulimit/Bureau/test",
|
||||
"/media/ulimit/FREEDOM/ ",
|
||||
"/home/ulimit/.cache/.fr-tLHu3g/mods/mods_here.txt",
|
||||
"/home/ulimit/.cache/.fr-pL7Ev9/misc/minetest.desktop",
|
||||
"/home/ulimit/.cache/.fr-mugyGQ/CMakeLists.txt",
|
||||
"/home/ulimit/.cache/.fr-KtLxHU/minetest.conf.example",
|
||||
"/home/ulimit/.cache/.fr-LB61pY/po/minetest.pot",
|
||||
"/home/ulimit/.cache/.fr-MaDHoM/C-Engine-master-88e60a9aea1f9f68623519f87ae25763c15d8add/CHeader.hpp",
|
||||
"/home/ulimit/.cache/.fr-LwMtxQ/Jetpack Joyride Casio - LastIndev/include.h",
|
||||
"/home/ulimit/.cache/.fr-bQC73D/Jetpack Joyride Casio - LastIndev/Jetpack.c",
|
||||
"/home/ulimit/.cache/.fr-UQheAl/Jetpack Joyride Casio - LastIndev/Elements.c",
|
||||
"/home/ulimit/Bureau/projet agrobot/logiciel agrobot/agrobot/main.c",
|
||||
"/home/ulimit/Bureau/5001_1_43132081.pdf",
|
||||
"/home/ulimit/.minetest/worlds/sylvaintest/world.mt",
|
||||
"/home/ulimit/.minetest/worlds/sylvaintest/auth.txt",
|
||||
"/home/ulimit/.minetest/worlds/sylvaintest/ipban.txt",
|
||||
"/home/ulimit/.minetest/worlds/valentin/env_meta.txt",
|
||||
"/home/ulimit/.minetest/worlds/valentin/map_meta.txt",
|
||||
"/home/ulimit/.minetest/worlds/valentin/world.mt",
|
||||
"/home/ulimit/.minetest/worlds/valentin/auth.txt",
|
||||
"/home/ulimit/.minetest/worlds/valentin/players/singleplayer",
|
||||
"/home/ulimit/Bureau/con-addin/bin/test_l.g1a",
|
||||
"/home/ulimit/Bureau/con-addin/Makefile",
|
||||
"/home/ulimit/Bureau/con-addin/test.c",
|
||||
"/home/ulimit/Bureau/con-addin/crt0.s",
|
||||
"/home/ulimit/Bureau/con-addin/test_l_si.g1a",
|
||||
"/home/ulimit/.minetest/client/serverlist/favoriteservers.txt",
|
||||
"/home/ulimit/Bureau/projet agrobot/logiciel agrobot/agrobot/agrobot.depend",
|
||||
"/media/ulimit/2821-0000/System Volume Information/IndexerVolumeGuid",
|
||||
"/home/ulimit/Bureau/fréquen.g1m",
|
||||
"/home/ulimit/Bureau/con-addin/test_l.g1a",
|
||||
"/home/ulimit/Bureau/Nouveau document",
|
||||
"/home/ulimit/Bureau/Nouveau dossier/tampon",
|
||||
"/home/ulimit/Bureau/worms/SH4Comp.c",
|
||||
"/home/ulimit/Bureau/Atomas/atomas.c",
|
||||
"/home/ulimit/Bureau/mon script.sh",
|
||||
"/home/ulimit/Bureau/worms/bateau.c",
|
||||
"/home/ulimit/Bureau/testbash",
|
||||
"/home/ulimit/Bureau/chr_giant.info",
|
||||
"/home/ulimit/Bureau/building_barbarian_hut_tex.sc",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/arena_training.info",
|
||||
"/home/ulimit/Bureau/arena_training.info",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/building_barbarian_hut_tex.sc",
|
||||
"/home/ulimit/Bureau/Atomas/maths.c",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/building_elixir_collector.info",
|
||||
"/home/ulimit/Bureau/1",
|
||||
"/home/ulimit/Bureau/execute",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/maths_add.asm",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/transformations et quaternions/transformation.asm",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin2/classe_vecteur",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/classe_polygone",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/classes/classe_octree",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/tables_align.inc",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/ram_area.inc",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/todolist",
|
||||
"/home/ulimit/Bureau/moteur 3D sylvain/bin/transformations et quaternions/quaternions.asm",
|
||||
"/home/ulimit/Bureau/Sound4Calc/Makefile",
|
||||
"/home/ulimit/Bureau/Sound4Calc/addresses.h",
|
||||
"/media/ulimit/LEXAR/tpe final/readme.txt",
|
||||
"/media/ulimit/LEXAR/tpe final/readme",
|
||||
"/home/ulimit/Bureau/jahshaka/INSTALL",
|
||||
"/home/ulimit/.cache/.fr-1OmWIK/jahshaka/INSTALL",
|
||||
"/home/ulimit/Bureau/TS3.run",
|
||||
"/media/ulimit/LEXAR/fact",
|
||||
"/media/ulimit/LEXAR/Nouveau document texte.txt",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/Library",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/uk.co.aifactory.chessfree/files/B.current",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/savegame.bin.bkp",
|
||||
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/savegame.bin",
|
||||
"/home/ulimit/Bureau/2_05_0000_sh4.fls",
|
||||
"/home/ulimit/Bureau/worms/bateau.h",
|
||||
"/home/ulimit/Bureau/worms/MonochromeLib.c",
|
||||
"/home/ulimit/Bureau/worms/sprite.c",
|
||||
"/home/ulimit/Bureau/worms/Makefile",
|
||||
"/home/ulimit/.cache/.fr-ZkiGuQ/worms/bateau.c",
|
||||
"/home/ulimit/Bureau/webcalc/examples/old/suites.htm",
|
||||
"/home/ulimit/Bureau/webcalc/tex-0.9.c",
|
||||
"/home/ulimit/Bureau/webcalc/examples/old/lim asym.htm",
|
||||
"/usr/share/magicrescue/recipes/png",
|
||||
"/home/ulimit/Bureau/INTEGR.htm",
|
||||
"/home/ulimit/Bureau/webcalc/libfont-3.1.c",
|
||||
"/usr/share/magicrescue/recipes/jpeg-jfif",
|
||||
"/home/ulimit/Sound4Calc/Sound4Calc.c.save"
|
||||
],
|
||||
"find":
|
||||
{
|
||||
"height": 27.0
|
||||
},
|
||||
"find_in_files":
|
||||
{
|
||||
"height": 0.0,
|
||||
"where_history":
|
||||
[
|
||||
]
|
||||
},
|
||||
"find_state":
|
||||
{
|
||||
"case_sensitive": false,
|
||||
"find_history":
|
||||
[
|
||||
"SH7305_PUDR",
|
||||
"SH7305_PUCR",
|
||||
"SH7305_PJCR",
|
||||
"SH7305_PUCR",
|
||||
"SH7305_PJDR",
|
||||
"appart",
|
||||
"math",
|
||||
"j",
|
||||
"itoa",
|
||||
"strcat",
|
||||
"sgn",
|
||||
"ML_display_vram();",
|
||||
"tbl64Div",
|
||||
"RTC2Time",
|
||||
"BCD2int",
|
||||
"memory_user_select",
|
||||
"strcmp",
|
||||
"Sin",
|
||||
"_Sin",
|
||||
"sub_Sin",
|
||||
"Key",
|
||||
"IsKeyDown"
|
||||
],
|
||||
"highlight": true,
|
||||
"in_selection": false,
|
||||
"preserve_case": false,
|
||||
"regex": false,
|
||||
"replace_history":
|
||||
[
|
||||
""
|
||||
],
|
||||
"reverse": false,
|
||||
"show_context": true,
|
||||
"use_buffer2": true,
|
||||
"whole_word": false,
|
||||
"wrap": true
|
||||
},
|
||||
"groups":
|
||||
[
|
||||
{
|
||||
"selected": 0,
|
||||
"sheets":
|
||||
[
|
||||
{
|
||||
"buffer": 0,
|
||||
"file": "Sound4Calc.c",
|
||||
"semi_transient": false,
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 5121,
|
||||
"regions":
|
||||
{
|
||||
},
|
||||
"selection":
|
||||
[
|
||||
[
|
||||
109,
|
||||
109
|
||||
]
|
||||
],
|
||||
"settings":
|
||||
{
|
||||
"syntax": "Packages/C++/C++.tmLanguage"
|
||||
},
|
||||
"translation.x": 0.0,
|
||||
"translation.y": 0.0,
|
||||
"zoom_level": 1.0
|
||||
},
|
||||
"stack_index": 3,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"selected": 1,
|
||||
"sheets":
|
||||
[
|
||||
{
|
||||
"buffer": 1,
|
||||
"file": "addresses.h",
|
||||
"semi_transient": false,
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 40864,
|
||||
"regions":
|
||||
{
|
||||
},
|
||||
"selection":
|
||||
[
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"settings":
|
||||
{
|
||||
"syntax": "Packages/C++/C++.tmLanguage"
|
||||
},
|
||||
"translation.x": 0.0,
|
||||
"translation.y": 0.0,
|
||||
"zoom_level": 1.0
|
||||
},
|
||||
"stack_index": 1,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"buffer": 2,
|
||||
"file": "Makefile",
|
||||
"semi_transient": false,
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 1104,
|
||||
"regions":
|
||||
{
|
||||
},
|
||||
"selection":
|
||||
[
|
||||
[
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"settings":
|
||||
{
|
||||
"syntax": "Packages/Makefile/Makefile.tmLanguage"
|
||||
},
|
||||
"translation.x": 0.0,
|
||||
"translation.y": 0.0,
|
||||
"zoom_level": 1.0
|
||||
},
|
||||
"stack_index": 0,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"selected": 0,
|
||||
"sheets":
|
||||
[
|
||||
{
|
||||
"buffer": 3,
|
||||
"file": "Sound4Calc.h",
|
||||
"semi_transient": false,
|
||||
"settings":
|
||||
{
|
||||
"buffer_size": 215,
|
||||
"regions":
|
||||
{
|
||||
},
|
||||
"selection":
|
||||
[
|
||||
[
|
||||
215,
|
||||
215
|
||||
]
|
||||
],
|
||||
"settings":
|
||||
{
|
||||
"syntax": "Packages/C++/C++.tmLanguage"
|
||||
},
|
||||
"translation.x": 0.0,
|
||||
"translation.y": 0.0,
|
||||
"zoom_level": 1.0
|
||||
},
|
||||
"stack_index": 2,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"incremental_find":
|
||||
{
|
||||
"height": 27.0
|
||||
},
|
||||
"input":
|
||||
{
|
||||
"height": 0.0
|
||||
},
|
||||
"layout":
|
||||
{
|
||||
"cells":
|
||||
[
|
||||
[
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"cols":
|
||||
[
|
||||
0.0,
|
||||
0.7328125,
|
||||
1.0
|
||||
],
|
||||
"rows":
|
||||
[
|
||||
0.0,
|
||||
0.716904276986,
|
||||
1.0
|
||||
]
|
||||
},
|
||||
"menu_visible": true,
|
||||
"output.find_results":
|
||||
{
|
||||
"height": 0.0
|
||||
},
|
||||
"pinned_build_system": "",
|
||||
"project": "",
|
||||
"replace":
|
||||
{
|
||||
"height": 50.0
|
||||
},
|
||||
"save_all_on_build": true,
|
||||
"select_file":
|
||||
{
|
||||
"height": 0.0,
|
||||
"last_filter": "",
|
||||
"selected_items":
|
||||
[
|
||||
],
|
||||
"width": 0.0
|
||||
},
|
||||
"select_project":
|
||||
{
|
||||
"height": 500.0,
|
||||
"last_filter": "",
|
||||
"selected_items":
|
||||
[
|
||||
[
|
||||
"",
|
||||
"~/Bureau/Sound4Calc/Sound4Calc.sublime-workspace"
|
||||
]
|
||||
],
|
||||
"width": 380.0
|
||||
},
|
||||
"select_symbol":
|
||||
{
|
||||
"height": 0.0,
|
||||
"last_filter": "",
|
||||
"selected_items":
|
||||
[
|
||||
],
|
||||
"width": 0.0
|
||||
},
|
||||
"selected_group": 1,
|
||||
"settings":
|
||||
{
|
||||
"last_automatic_layout":
|
||||
[
|
||||
[
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2
|
||||
]
|
||||
]
|
||||
},
|
||||
"show_minimap": true,
|
||||
"show_open_files": false,
|
||||
"show_tabs": true,
|
||||
"side_bar_visible": true,
|
||||
"side_bar_width": 150.0,
|
||||
"status_bar_visible": true,
|
||||
"template_settings":
|
||||
{
|
||||
"max_columns": 2
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
void SetPin()
|
||||
{
|
||||
if(is_SH4)
|
||||
{
|
||||
*(unsigned char*)SH7305_PJDR |= 0x04;
|
||||
*(unsigned char*)SH7305_PJDR &= ~0x08;
|
||||
//set pin to 0x4B
|
||||
}
|
||||
else
|
||||
{
|
||||
*(unsigned char*)SH7337_SCPDR |= 0x01;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetPin()
|
||||
{
|
||||
if(is_SH4)
|
||||
{
|
||||
*(unsigned char*)SH7305_PJDR &= ~0x04;
|
||||
*(unsigned char*)SH7305_PJDR |= 0x08;
|
||||
// set the pin to 0x47
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
*(unsigned char*)SH7337_SCPDR &= ~0x01;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char getMPU(void)
|
||||
{
|
||||
// Port L control register.
|
||||
volatile unsigned short *plcr = (unsigned short *)0xa4000114;
|
||||
// Saved value for PLCR.
|
||||
unsigned short saved_plcr;
|
||||
unsigned int tested_plcr;
|
||||
|
||||
saved_plcr = *plcr;
|
||||
*plcr = 0xffff;
|
||||
|
||||
tested_plcr = *plcr;
|
||||
*plcr = saved_plcr;
|
||||
|
||||
if(tested_plcr == 0x00ff || tested_plcr == 0x0fff)
|
||||
{
|
||||
return 0; // MPU_SH3
|
||||
}
|
||||
|
||||
return 1; // MPU_SH4
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -1,12 +0,0 @@
|
|||
#ifndef _SYSCALL_H
|
||||
#define _SYSCALL_H
|
||||
|
||||
int IsKeyDown(short* matrixcode);
|
||||
|
||||
#define KEY_CTRL_EXE 0x0201
|
||||
#define KEY_CTRL_SHIFT 0x0608
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.global_IsKeyDown
|
||||
|
||||
_IsKeyDown:
|
||||
mov.l sc_addr, r2
|
||||
mov.l 1f, r0
|
||||
jmp @r2
|
||||
nop
|
||||
1: .long 0x24B
|
||||
|
||||
sc_addr:
|
||||
.long 0x80010070
|
BIN
bin/sound.g1a
BIN
bin/sound.g1a
Binary file not shown.
Binary file not shown.
BIN
build/crt0.o
BIN
build/crt0.o
Binary file not shown.
BIN
build/sound.bin
BIN
build/sound.bin
Binary file not shown.
BIN
build/sound.elf
BIN
build/sound.elf
Binary file not shown.
BIN
build/syscall.o
BIN
build/syscall.o
Binary file not shown.
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
|
@ -1,29 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C/C++ Compiler Ver. 6.0 */
|
||||
/* Copyright (c) 1992,2000 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = _h_c_lib.h : */
|
||||
/* */
|
||||
/* FUNC = Include file for SH SERIES C/C++ Compiler environment */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef _H_C_LIB
|
||||
#define _H_C_LIB
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
extern void _CALL_INIT(void); /* for global class object initial processing */
|
||||
extern void _CALL_END(void); /* for global class object post-processing */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* #ifdef __cplusplus */
|
||||
|
||||
#endif /* #ifndef _H_C_LIB */
|
|
@ -1,39 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = assert.h : debug macro define ; */
|
||||
/* */
|
||||
/* FUNC = this module do the following functions; */
|
||||
/* (1) if NDEBUG defined assert(x) = (void)0; */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
#ifndef _ASSERT
|
||||
#define _ASSERT
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef NDEBUG
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(x) ((void)0)
|
||||
#else
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(x) ( x ? (void) 0 : (fprintf(stderr,\
|
||||
"ASSERTION FAILED: "#x" FILE %s,LINE %d \n", \
|
||||
__FILE__,__LINE__),abort(),(void)0))
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,84 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 6.0 */
|
||||
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = builtin : */
|
||||
/* */
|
||||
/* FUNC = this header file do the following functions; */
|
||||
/* (1)builtin function prototype define; */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
|
||||
#ifndef _BUILTIN
|
||||
#define _BUILTIN
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
/* follow math.h & mathf.h */
|
||||
extern float _builtin_fabsf(float);
|
||||
extern double _builtin_fabs(double);
|
||||
extern float _builtin_sqrtf(float);
|
||||
extern double _builtin_sqrt(double);
|
||||
|
||||
/* follow private.h */
|
||||
extern void _builtin_fsca(long ,float *,float *);
|
||||
extern float _builtin_fsrra(float);
|
||||
|
||||
/* follow smachine.h */
|
||||
extern void _builtin_set_imask(int);
|
||||
extern int _builtin_get_imask(void);
|
||||
extern void _builtin_set_cr(int);
|
||||
extern int _builtin_get_cr(void);
|
||||
extern void _builtin_set_vbr(void *);
|
||||
extern void *_builtin_get_vbr(void);
|
||||
extern void _builtin_sleep(void);
|
||||
|
||||
/* follow string.h */
|
||||
extern char *_builtin_strcpy(char *, const char *);
|
||||
extern int _builtin_strcmp(const char *, const char *);
|
||||
|
||||
/* follow umachine.h */
|
||||
extern void _builtin_set_gbr(void *);
|
||||
extern void *_builtin_get_gbr(void);
|
||||
extern unsigned char _builtin_gbr_read_byte(int);
|
||||
extern unsigned short _builtin_gbr_read_word(int);
|
||||
extern unsigned long _builtin_gbr_read_long(int);
|
||||
extern void _builtin_gbr_write_byte(int, unsigned char);
|
||||
extern void _builtin_gbr_write_word(int, unsigned short);
|
||||
extern void _builtin_gbr_write_long(int, unsigned long);
|
||||
extern void _builtin_gbr_and_byte(int, unsigned char);
|
||||
extern void _builtin_gbr_or_byte(int, unsigned char);
|
||||
extern void _builtin_gbr_xor_byte(int, unsigned char);
|
||||
extern int _builtin_gbr_tst_byte(int, unsigned char);
|
||||
extern int _builtin_tas(char *);
|
||||
extern int _builtin_trapa(int);
|
||||
extern int _builtin_macw(short *, short *, unsigned int);
|
||||
extern int _builtin_macwl(short *, short *, unsigned int, unsigned int);
|
||||
extern int _builtin_macl(int *, int *, unsigned int);
|
||||
extern int _builtin_macll(int *, int *, unsigned int, unsigned int);
|
||||
extern int _builtin_trapa_svc(...);
|
||||
extern void _builtin_prefetch(void *);
|
||||
extern void _builtin_set_fpscr(int);
|
||||
extern int _builtin_get_fpscr(void);
|
||||
extern float _builtin_fipr(float a1[], float b1[]);
|
||||
extern void _builtin_ftrv(float a1[], float b1[]);
|
||||
extern void _builtin_ftrvadd(float a1[], float b1[], float c1[]);
|
||||
extern void _builtin_ftrvsub(float a1[], float b1[], float c1[]);
|
||||
extern void _builtin_mtrx4mul(float [][4], float [][4]);
|
||||
extern void _builtin_mtrx4muladd(float [][4], float [][4], float [][4]);
|
||||
extern void _builtin_mtrx4mulsub(float [][4], float [][4], float [][4]);
|
||||
extern void _builtin_ld_ext(float [][4]);
|
||||
extern void _builtin_st_ext(float [][4]);
|
||||
extern void _builtin_add4(float a1[], float b1[], float c1[]);
|
||||
extern void _builtin_sub4(float a1[], float b1[], float c1[]);
|
||||
extern void _builtin_trace(int);
|
||||
}
|
||||
#endif /* #ifdef __cplusplus */
|
||||
|
||||
#endif /* #ifndef _BUILTIN */
|
189
include/complex
189
include/complex
|
@ -1,189 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//====================================================================
|
||||
// File: complex
|
||||
// Purpose: Numerics library / Complex numbers
|
||||
// Header <complex>
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _COMPLEX_
|
||||
#define _COMPLEX_
|
||||
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
class float_complex; // based on float
|
||||
class double_complex; // based on double
|
||||
|
||||
// complex specialization
|
||||
class float_complex {
|
||||
public:
|
||||
typedef float value_type;
|
||||
|
||||
float_complex(float re = 0.0f, float im = 0.0f){
|
||||
_re = re; _im = im; return; }
|
||||
float_complex(const double_complex&);
|
||||
float real() const{ return (_re);}
|
||||
float imag() const{ return (_im);}
|
||||
|
||||
float_complex& operator= (float rhs){
|
||||
_re = rhs; _im = 0.0; return *this; }
|
||||
float_complex& operator+=(float rhs){ _re += rhs; return *this; }
|
||||
float_complex& operator-=(float rhs){ _re -= rhs; return *this; }
|
||||
float_complex& operator*=(float rhs){
|
||||
_re *= rhs; _im *= rhs; return *this; }
|
||||
float_complex& operator/=(float rhs){
|
||||
_re /= rhs; _im /= rhs; return *this; }
|
||||
|
||||
float_complex& operator=(const float_complex&rhs){
|
||||
_re = rhs.real(); _im = rhs.imag(); return *this; }
|
||||
float_complex& operator+=(const float_complex&rhs){
|
||||
_re += rhs.real(); _im += rhs.imag(); return *this; }
|
||||
float_complex& operator-=(const float_complex&rhs){
|
||||
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
|
||||
float_complex& operator*=(const float_complex&);
|
||||
float_complex& operator/=(const float_complex&);
|
||||
private:
|
||||
float _re, _im;
|
||||
};
|
||||
|
||||
class double_complex {
|
||||
public:
|
||||
typedef double value_type;
|
||||
|
||||
double_complex(double re = 0.0, double im = 0.0){
|
||||
_re = re; _im = im; return; }
|
||||
double_complex(const float_complex&rhs){
|
||||
_re = (double)rhs.real(); _im = (double)rhs.imag(); return; }
|
||||
double real() const{ return (_re);}
|
||||
double imag() const{ return (_im);}
|
||||
|
||||
double_complex& operator= (double rhs){
|
||||
_re = rhs; _im = 0.0; return *this; }
|
||||
double_complex& operator+=(double rhs){ _re += rhs; return *this; }
|
||||
double_complex& operator-=(double rhs){ _re -= rhs; return *this; }
|
||||
double_complex& operator*=(double rhs){
|
||||
_re *= rhs; _im *= rhs; return *this; }
|
||||
double_complex& operator/=(double rhs){
|
||||
_re /= rhs; _im /= rhs; return *this; }
|
||||
|
||||
double_complex& operator=(const double_complex&rhs){
|
||||
_re = rhs.real(); _im = rhs.imag(); return *this; }
|
||||
double_complex& operator+=(const double_complex&rhs){
|
||||
_re += rhs.real(); _im += rhs.imag(); return *this; }
|
||||
double_complex& operator-=(const double_complex&rhs){
|
||||
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
|
||||
double_complex& operator*=(const double_complex&);
|
||||
double_complex& operator/=(const double_complex&);
|
||||
private:
|
||||
double _re, _im;
|
||||
};
|
||||
|
||||
|
||||
// complex non-member functions
|
||||
float_complex operator+(const float_complex&);
|
||||
float_complex operator-(const float_complex&);
|
||||
float_complex operator+(const float_complex&, const float_complex&);
|
||||
float_complex operator+(const float_complex&, const float&);
|
||||
float_complex operator+(const float&, const float_complex&);
|
||||
float_complex operator-(const float_complex&, const float_complex&);
|
||||
float_complex operator-(const float_complex&, const float&);
|
||||
float_complex operator-(const float&, const float_complex&);
|
||||
float_complex operator*(const float_complex&, const float_complex&);
|
||||
float_complex operator*(const float_complex&, const float&);
|
||||
float_complex operator*(const float&, const float_complex&);
|
||||
float_complex operator/(const float_complex&, const float_complex&);
|
||||
float_complex operator/(const float_complex&, const float&);
|
||||
float_complex operator/(const float&, const float_complex&);
|
||||
bool operator==(const float_complex&, const float_complex&);
|
||||
bool operator==(const float_complex&, const float&);
|
||||
bool operator==(const float&, const float_complex&);
|
||||
bool operator!=(const float_complex&, const float_complex&);
|
||||
bool operator!=(const float_complex&, const float&);
|
||||
bool operator!=(const float&, const float_complex&);
|
||||
istream& operator>>(istream&, float_complex&);
|
||||
ostream& operator<<(ostream&, const float_complex&);
|
||||
|
||||
double_complex operator+(const double_complex&);
|
||||
double_complex operator-(const double_complex&);
|
||||
double_complex operator+(const double_complex&, const double_complex&);
|
||||
double_complex operator+(const double_complex&, const double&);
|
||||
double_complex operator+(const double&, const double_complex&);
|
||||
double_complex operator-(const double_complex&, const double_complex&);
|
||||
double_complex operator-(const double_complex&, const double&);
|
||||
double_complex operator-(const double&, const double_complex&);
|
||||
double_complex operator*(const double_complex&, const double_complex&);
|
||||
double_complex operator*(const double_complex&, const double&);
|
||||
double_complex operator*(const double&, const double_complex&);
|
||||
double_complex operator/(const double_complex&, const double_complex&);
|
||||
double_complex operator/(const double_complex&, const double&);
|
||||
double_complex operator/(const double&, const double_complex&);
|
||||
bool operator==(const double_complex&, const double_complex&);
|
||||
bool operator==(const double_complex&, const double&);
|
||||
bool operator==(const double&, const double_complex&);
|
||||
bool operator!=(const double_complex&, const double_complex&);
|
||||
bool operator!=(const double_complex&, const double&);
|
||||
bool operator!=(const double&, const double_complex&);
|
||||
istream& operator>>(istream&, double_complex&);
|
||||
ostream& operator<<(ostream&, const double_complex&);
|
||||
|
||||
// complex value operations
|
||||
float real(const float_complex&);
|
||||
float imag(const float_complex&);
|
||||
float abs(const float_complex&);
|
||||
float arg(const float_complex&);
|
||||
float norm(const float_complex&);
|
||||
float_complex conj(const float_complex&);
|
||||
float_complex polar(const float&, const float&);
|
||||
|
||||
double real(const double_complex&);
|
||||
double imag(const double_complex&);
|
||||
double abs(const double_complex&);
|
||||
double arg(const double_complex&);
|
||||
double norm(const double_complex&);
|
||||
double_complex conj(const double_complex&);
|
||||
double_complex polar(const double&, const double&);
|
||||
|
||||
// complex transcendentals
|
||||
|
||||
#ifdef sqrt
|
||||
#undef sqrt
|
||||
extern "C" double sqrt(double);
|
||||
#endif
|
||||
|
||||
float_complex cos (const float_complex&);
|
||||
float_complex cosh (const float_complex&);
|
||||
float_complex exp (const float_complex&);
|
||||
float_complex log (const float_complex&);
|
||||
float_complex log10(const float_complex&);
|
||||
|
||||
float_complex pow(const float_complex&, int);
|
||||
float_complex pow(const float_complex&, const float&);
|
||||
float_complex pow(const float_complex&, const float_complex&);
|
||||
float_complex pow(const float&, const float_complex&);
|
||||
float_complex sin (const float_complex&);
|
||||
float_complex sinh (const float_complex&);
|
||||
float_complex sqrt (const float_complex&);
|
||||
float_complex tan (const float_complex&);
|
||||
float_complex tanh (const float_complex&);
|
||||
|
||||
double_complex cos (const double_complex&);
|
||||
double_complex cosh (const double_complex&);
|
||||
double_complex exp (const double_complex&);
|
||||
double_complex log (const double_complex&);
|
||||
double_complex log10(const double_complex&);
|
||||
|
||||
double_complex pow(const double_complex&, int);
|
||||
double_complex pow(const double_complex&, const double&);
|
||||
double_complex pow(const double_complex&, const double_complex&);
|
||||
double_complex pow(const double&, const double_complex&);
|
||||
double_complex sin (const double_complex&);
|
||||
double_complex sinh (const double_complex&);
|
||||
double_complex sqrt (const double_complex&);
|
||||
double_complex tan (const double_complex&);
|
||||
double_complex tanh (const double_complex&);
|
||||
|
||||
#endif
|
|
@ -1,66 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = ctype : */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _CTYPE
|
||||
#define _CTYPE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern unsigned char _ctype[];
|
||||
|
||||
extern int isalnum(int);
|
||||
extern int isalpha(int);
|
||||
extern int iscntrl(int);
|
||||
extern int isdigit(int);
|
||||
extern int isgraph(int);
|
||||
extern int islower(int);
|
||||
extern int isprint(int);
|
||||
extern int ispunct(int);
|
||||
extern int isspace(int);
|
||||
extern int isupper(int);
|
||||
extern int isxdigit(int);
|
||||
extern int tolower(int);
|
||||
extern int toupper(int);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define _UPPER 0x01
|
||||
#define _LOWER 0x02
|
||||
#define _DIGIT 0x04
|
||||
#define _SPACE 0x08
|
||||
#define _PUNCT 0x10
|
||||
#define _CNTRL 0x20
|
||||
#define _WHITE 0x40
|
||||
#define _HEX 0x80
|
||||
|
||||
#define isalnum(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT))
|
||||
#define isalpha(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER))
|
||||
#define iscntrl(c) (_ctype[(c) & 0xff] & _CNTRL)
|
||||
#define isdigit(c) (_ctype[(c) & 0xff] & _DIGIT)
|
||||
#define isgraph(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT | _PUNCT))
|
||||
#define islower(c) (_ctype[(c) & 0xff] & _LOWER)
|
||||
#define isprint(c) (_ctype[(c) & 0xff] & (_UPPER|_LOWER|_DIGIT|_PUNCT|_SPACE))
|
||||
#define ispunct(c) (_ctype[(c) & 0xff] & _PUNCT)
|
||||
#define isspace(c) (_ctype[(c) & 0xff] & _WHITE)
|
||||
#define isupper(c) (_ctype[(c) & 0xff] & _UPPER)
|
||||
#define isxdigit(c) (_ctype[(c) & 0xff] & _HEX)
|
||||
#define tolower(c) (isupper(c) ? ((c)-'A'+'a') : (c))
|
||||
#define toupper(c) (islower(c) ? ((c)-'a'+'A') : (c))
|
||||
|
||||
#endif
|
|
@ -1,257 +0,0 @@
|
|||
/*
|
||||
*SHDSP Library
|
||||
*Copyright (c) Hitachi,Ltd. 1998
|
||||
*Licensed material of Hitachi,Ltd
|
||||
*/
|
||||
/***********************************************************
|
||||
* File: ensigdsp.h
|
||||
* Purpose: Common
|
||||
* Create: 1998.03.20 Rev. 1.0
|
||||
***********************************************************/
|
||||
|
||||
/*
|
||||
** Copyright Ensigma Ltd. 1995
|
||||
**
|
||||
** Unauthorised copying or distribution of this software is prohibited.
|
||||
**
|
||||
** Version 1.0.
|
||||
**
|
||||
*/
|
||||
|
||||
/*
|
||||
** ENSIGMA DSP Library
|
||||
*/
|
||||
|
||||
/* Constants */
|
||||
#ifndef _ENSIGDSP
|
||||
#define _ENSIGDSP
|
||||
|
||||
#define BIQUAD_SIZE 6 /* no. coefficients in an IIR biquad */
|
||||
|
||||
#define EDSP_OK 0
|
||||
#define EDSP_BAD_ARG 1
|
||||
#define EDSP_NO_HEAP 2
|
||||
|
||||
#define EFFTALLSCALE (-1L)
|
||||
#define EFFTMIDSCALE 0x55555555L
|
||||
#define EFFTNOSCALE 0x00000000L
|
||||
|
||||
#ifdef __cplusplus /*A-10-014-01*/
|
||||
extern"C"{ /*A-10-014-01*/
|
||||
#endif /*A-10-014-01*/
|
||||
|
||||
/*
|
||||
** Fourier transforms
|
||||
*/
|
||||
int FftComplex(short op_x[],
|
||||
short op_y[],
|
||||
const short ip_x[],
|
||||
const short ip_y[],
|
||||
long size,
|
||||
long scale);
|
||||
int FftInComplex(short data_x[],
|
||||
short data_y[],
|
||||
long size,
|
||||
long scale);
|
||||
int FftReal(short op_x[],
|
||||
short op_y[],
|
||||
const short ip[],
|
||||
long size,
|
||||
long scale);
|
||||
/* int ip_is_x);*/
|
||||
int FftInReal(short data_x[],
|
||||
short data_y[],
|
||||
long size,
|
||||
long scale,
|
||||
int not_sure_about_ip_format);
|
||||
int IfftComplex(short op_x[],
|
||||
short op_y[],
|
||||
const short ip_x[],
|
||||
const short ip_y[],
|
||||
long size,
|
||||
long scale);
|
||||
int IfftInComplex(short data_x[],
|
||||
short data_y[],
|
||||
long size,
|
||||
long scale);
|
||||
int IfftReal(short op_x[],
|
||||
short op_y[],
|
||||
const short ip_x[],
|
||||
const short ip_y[],
|
||||
long size,
|
||||
long scale,
|
||||
int op_is_x_scratch_is_y);
|
||||
int IfftInReal(short data_x[],
|
||||
short data_y[],
|
||||
long size,
|
||||
long scale,
|
||||
int not_sure_about_op_format);
|
||||
int InitFft(long max_size);
|
||||
void FreeFft(void); /*A-10-015-01*/
|
||||
int LogMagnitude(short output[],
|
||||
const short ip_x[],
|
||||
const short ip_y[],
|
||||
long no_elements,
|
||||
float fscale);
|
||||
|
||||
/*
|
||||
** These three variables are for the internal use of the library FFT
|
||||
** functions only. They should not be accessed by user programs.
|
||||
*/
|
||||
extern long max_fft_size;
|
||||
extern short *twtble;
|
||||
|
||||
/*
|
||||
** Window functions
|
||||
*/
|
||||
int GenBlackman(short data[], long N);
|
||||
int GenHamming(short data[], long N);
|
||||
int GenHanning(short data[], long N);
|
||||
int GenTriangle(short data[], long N);
|
||||
|
||||
/*
|
||||
** Filters. The coefficients must be supplied in X and the workspace in Y.
|
||||
** If it is straightforward we can support the opposite, ie Xworkspace and
|
||||
** Ycoeff.
|
||||
*/
|
||||
int FreeFir(short **Yworkspace, long order);
|
||||
int InitFir(short **Yworkspace, long order);
|
||||
int InitIir(short **Yworkspace, long no_sections);
|
||||
int FreeIir(short **Yworkspace, long no_sections); /*A-10-015-01*/
|
||||
int InitDIir(long **Yworkspace, long no_sections);
|
||||
int FreeDIir(long **Yworkspace, long no_sections); /*A-10-015-01*/
|
||||
int InitLms(short **Yworkspace, long order);
|
||||
int FreeLms(short **Yworkspace, long order); /*A-10-015-01*/
|
||||
int Fir(short op[],
|
||||
const short ip[],
|
||||
long no_samples,
|
||||
const short Xcoeff[],
|
||||
long order,
|
||||
int res_shift,
|
||||
short *Yworkspace);
|
||||
int Fir1(short *op_ptr,
|
||||
short input,
|
||||
const short Xcoeff[],
|
||||
long order,
|
||||
int res_shift,
|
||||
short *Yworkspace);
|
||||
int Iir(short op[],
|
||||
const short ip[],
|
||||
long no_samples,
|
||||
const short Xcoeff[],
|
||||
long no_sections,
|
||||
short *Yworkspace);
|
||||
int Iir1(short *op_ptr,
|
||||
short input,
|
||||
const short Xcoeff[],
|
||||
long no_sections,
|
||||
short *Yworkspace);
|
||||
int DIir(short op[],
|
||||
const short ip[],
|
||||
long no_samples,
|
||||
const long Xcoeff[],
|
||||
long no_sections,
|
||||
long *Yworkspace);
|
||||
int DIir1(short *op_ptr,
|
||||
const short input, /*98.01.09 C-10-005-01 */
|
||||
/* short input, 98.01.09 D-10-005-01 */
|
||||
const long Xcoeff[],
|
||||
long no_sections,
|
||||
long *Yworkspace);
|
||||
int Lms(short op[],
|
||||
const short ip[],
|
||||
const short ref[],
|
||||
long no_samples,
|
||||
short Xcoeff[],
|
||||
long order,
|
||||
int res_shift,
|
||||
short mu,
|
||||
short *Yworkspace);
|
||||
int Lms1(short *op_ptr,
|
||||
short input,
|
||||
short ref_op,
|
||||
short Xcoeff[],
|
||||
long order,
|
||||
int res_shift,
|
||||
short mu,
|
||||
short *Yworkspace);
|
||||
|
||||
/*
|
||||
** Convolution and Correlation
|
||||
*/
|
||||
int ConvComplete(short op[],
|
||||
const short ix[],
|
||||
const short iy[],
|
||||
long ix_size,
|
||||
long iy_size,
|
||||
int res_shift);
|
||||
int ConvCyclic(short op[],
|
||||
const short ix[],
|
||||
const short iy[],
|
||||
long size,
|
||||
int res_shift);
|
||||
int ConvPartial(short op[],
|
||||
const short ix[],
|
||||
const short iy[],
|
||||
long ix_size,
|
||||
long iy_size,
|
||||
int res_shift);
|
||||
int Correlate(short op[],
|
||||
const short ix[],
|
||||
const short iy[],
|
||||
long ix_size,
|
||||
long iy_size,
|
||||
long no_corr,
|
||||
int x_is_larger,
|
||||
int res_shift);
|
||||
int CorrCyclic(short op[],
|
||||
const short ix[],
|
||||
const short iy[],
|
||||
long size,
|
||||
int reverse,
|
||||
int res_shift);
|
||||
|
||||
|
||||
/*
|
||||
** Miscellaneous
|
||||
*/
|
||||
int GenGWnoise(short output[], long no_samples, float variance);
|
||||
|
||||
int MinI(short **min_ptr, short buffer[], long buff_len, int src_is_x);
|
||||
int MaxI(short **max_ptr, short buffer[], long buff_len, int src_is_x);
|
||||
int PeakI(short **peak_ptr, short buffer[], long buff_len, int src_is_x);
|
||||
|
||||
int Mean(short *mean_ptr, const short buffer[], long buff_len, int src_is_x);
|
||||
int Variance(long *variance_ptr,
|
||||
short *mean_ptr,
|
||||
const short buffer[],
|
||||
long buff_len, int src_is_x);
|
||||
|
||||
int VectorMult(short dest[],
|
||||
const short matrixX[],
|
||||
const short matrixY[],
|
||||
long length,
|
||||
int res_shift);
|
||||
int MatrixMult(void *matrix3,
|
||||
const void *matrixX,
|
||||
const void *matrixY,
|
||||
long m,
|
||||
long n,
|
||||
long p,
|
||||
int res_shift, int dest_is_x);
|
||||
int MsPower(long *pow_ptr, const short input[], long buff_size, int src_is_x);
|
||||
|
||||
int CopyXtoY(short y[], const short x[], long n);
|
||||
int CopyYtoX(short x[], const short y[], long n);
|
||||
int CopyToX(short x[], const short src[], long n);
|
||||
int CopyToY(short y[], const short src[], long n);
|
||||
int CopyFromX(short src[], const short x[], long n);
|
||||
int CopyFromY(short src[], const short y[], long n);
|
||||
|
||||
int Limit(short data[], long no_elements, int data_is_x);
|
||||
|
||||
#ifdef __cplusplus /*A-10-014-01*/
|
||||
} /*A-10-014-01*/
|
||||
#endif /*A-10-014-01*/
|
||||
|
||||
#endif
|
114
include/errno.h
114
include/errno.h
|
@ -1,114 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = errno : */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _ERRNO
|
||||
#define _ERRNO
|
||||
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 1100
|
||||
#endif
|
||||
|
||||
#ifndef EDOM
|
||||
#define EDOM 1101
|
||||
#endif
|
||||
|
||||
#ifndef EDIV
|
||||
#define EDIV 1102
|
||||
#endif
|
||||
|
||||
#ifndef ESTRN
|
||||
#define ESTRN 1104
|
||||
#endif
|
||||
|
||||
#ifndef PTRERR
|
||||
#define PTRERR 1106
|
||||
#endif
|
||||
|
||||
#ifndef SEQERR
|
||||
#define SEQERR 1108
|
||||
#endif
|
||||
|
||||
#ifndef ECBASE
|
||||
#define ECBASE 1200
|
||||
#endif
|
||||
|
||||
#ifndef ETLN
|
||||
#define ETLN 1202
|
||||
#endif
|
||||
|
||||
#ifndef EEXP
|
||||
#define EEXP 1204
|
||||
#endif
|
||||
|
||||
#ifndef EEXPN
|
||||
#define EEXPN 1206
|
||||
#endif
|
||||
|
||||
#ifndef ENUM
|
||||
#define ENUM 1208
|
||||
#endif
|
||||
|
||||
#ifndef EFLOATO
|
||||
#define EFLOATO 1210
|
||||
#endif
|
||||
|
||||
#ifndef EFLOATU
|
||||
#define EFLOATU 1220
|
||||
#endif
|
||||
|
||||
#ifndef EDBLO
|
||||
#define EDBLO 1250
|
||||
#endif
|
||||
|
||||
#ifndef EDBLU
|
||||
#define EDBLU 1260
|
||||
#endif
|
||||
|
||||
#ifndef ELDBLO
|
||||
#define ELDBLO 1270
|
||||
#endif
|
||||
|
||||
#ifndef ELDBLU
|
||||
#define ELDBLU 1280
|
||||
#endif
|
||||
|
||||
#ifndef NOTOPN
|
||||
#define NOTOPN 1300
|
||||
#endif
|
||||
|
||||
#ifndef EBADF
|
||||
#define EBADF 1302
|
||||
#endif
|
||||
|
||||
#ifndef ECSPEC
|
||||
#define ECSPEC 1304
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern volatile int _errno;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
#define errno _errno
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,74 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = exception.h : */
|
||||
/* */
|
||||
/* FUNC = Include file for exception handling (see 18.6) */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef _EXCEPTION_H
|
||||
#define _EXCEPTION_H
|
||||
|
||||
/* This lets users disable the EDG supplied exception classes. */
|
||||
#ifndef __NO_EDG_EXCEPTION_CLASSES
|
||||
|
||||
#include <stdexcept.h>
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
namespace std {
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
/*
|
||||
If bool is not supported, use a typedef for bool.
|
||||
*/
|
||||
#ifdef _BOOL
|
||||
typedef bool __bool;
|
||||
#else /* ifndef _BOOL */
|
||||
typedef int __bool;
|
||||
#endif /* ifdef _BOOL */
|
||||
|
||||
class bad_exception : public exception {
|
||||
public:
|
||||
bad_exception() throw();
|
||||
bad_exception(const bad_exception&) throw();
|
||||
bad_exception& operator=(const bad_exception&) throw();
|
||||
virtual ~bad_exception() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
typedef void (*terminate_handler)();
|
||||
extern terminate_handler set_terminate(terminate_handler);
|
||||
|
||||
typedef void (*unexpected_handler)();
|
||||
extern unexpected_handler set_unexpected(unexpected_handler);
|
||||
|
||||
/* unexpected and terminate are in the WP definition of exception.h.
|
||||
It is not clear why. */
|
||||
void terminate();
|
||||
void unexpected();
|
||||
|
||||
extern __bool uncaught_exception();
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
} /* namespace */
|
||||
|
||||
#ifdef __EDG_IMPLICIT_USING_STD
|
||||
/* Implicitly include a using directive for the STD namespace when this
|
||||
preprocessing flag is TRUE. */
|
||||
using namespace std;
|
||||
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
|
||||
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
|
||||
|
||||
#endif /* _EXCEPTION_H */
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
*SHDSP Library
|
||||
*Copyright (c) Hitachi,Ltd. 1998
|
||||
*Licensed material of Hitachi,Ltd
|
||||
*/
|
||||
/***********************************************************
|
||||
* File: filt_ws.h
|
||||
* Purpose: Filter
|
||||
* Create: 1998.03.20 Rev. 1.0
|
||||
***********************************************************/
|
||||
|
||||
#ifndef FILT_WS
|
||||
#define FILT_WS
|
||||
|
||||
#ifndef WS_SIZE
|
||||
#define WS_SIZE 1024 /* Set Global workspace buffer size=1024 shorts (2048 bytes) */
|
||||
#endif
|
||||
|
||||
#define MEMSIZE WS_SIZE*sizeof(short)
|
||||
#pragma section Y /*need to equate DYRAM with link.cmd file*/
|
||||
short ws_mem[WS_SIZE];
|
||||
short * ws_ptr=ws_mem;
|
||||
long ws_left=MEMSIZE;
|
||||
#pragma section
|
||||
|
||||
#endif
|
208
include/float.h
208
include/float.h
|
@ -1,208 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = float : */
|
||||
/* FUNC = limit about float type and double type ; */
|
||||
/* */
|
||||
/* */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _FLOAT
|
||||
#define _FLOAT
|
||||
|
||||
extern const float _FLT_MAX_VAL;
|
||||
extern const float _FLT_MIN_VAL;
|
||||
extern const double _DBL_MAX_VAL;
|
||||
extern const double _DBL_MIN_VAL;
|
||||
extern const long double _LDBL_MAX_VAL;
|
||||
extern const long double _LDBL_MIN_VAL;
|
||||
|
||||
#ifndef _FPD
|
||||
|
||||
#define FLT_RADIX 2
|
||||
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
|
||||
#define FLT_ROUNDS 0
|
||||
#define FLT_GUARD 0
|
||||
#else
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_GUARD 1
|
||||
#endif
|
||||
#define FLT_NORMALIZE 1
|
||||
#define FLT_MAX _FLT_MAX_VAL
|
||||
#define FLT_MIN _FLT_MIN_VAL
|
||||
#define FLT_MAX_EXP 127
|
||||
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
|
||||
#define FLT_MIN_EXP (-126)
|
||||
#else
|
||||
#define FLT_MIN_EXP (-149)
|
||||
#endif
|
||||
#define FLT_MAX_10_EXP 38
|
||||
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
|
||||
#define FLT_MIN_10_EXP (-38)
|
||||
#else
|
||||
#define FLT_MIN_10_EXP (-44)
|
||||
#endif
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_EXP_DIG 8
|
||||
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
|
||||
#define FLT_POS_EPS 1.1920928955078125e-7f
|
||||
#if defined(_DON)
|
||||
#define FLT_NEG_EPS 1.4012984643248171e-45f
|
||||
#else
|
||||
#define FLT_NEG_EPS 1.1754943508222876e-38f
|
||||
#endif
|
||||
#else
|
||||
#define FLT_POS_EPS 5.9604648328104311e-8f
|
||||
#define FLT_NEG_EPS 2.9802324164052156e-8f
|
||||
#endif
|
||||
#define FLT_POS_EPS_EXP (-23)
|
||||
#if defined(_SH2E)|defined(_SH3E)|defined(_SH4)
|
||||
#define FLT_NEG_EPS_EXP (-126)
|
||||
#else
|
||||
#define FLT_NEG_EPS_EXP (-24)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_FLT)|defined(_FPS)
|
||||
|
||||
#define DBL_RADIX FLT_RADIX
|
||||
#define DBL_ROUNDS FLT_ROUNDS
|
||||
#define DBL_GUARD FLT_GUARD
|
||||
#define DBL_NORMALIZE FLT_NORMALIZE
|
||||
#define DBL_MAX _FLT_MAX_VAL
|
||||
#define DBL_MIN _FLT_MIN_VAL
|
||||
#define DBL_MAX_EXP FLT_MAX_EXP
|
||||
#define DBL_MIN_EXP FLT_MIN_EXP
|
||||
#define DBL_MAX_10_EXP FLT_MAX_10_EXP
|
||||
#define DBL_MIN_10_EXP FLT_MIN_10_EXP
|
||||
#define DBL_DIG FLT_DIG
|
||||
#define DBL_MANT_DIG FLT_MANT_DIG
|
||||
#define DBL_EXP_DIG FLT_EXP_DIG
|
||||
#define DBL_POS_EPS FLT_POS_EPS
|
||||
#define DBL_NEG_EPS FLT_NEG_EPS
|
||||
#define DBL_POS_EPS_EXP FLT_POS_EPS_EXP
|
||||
#define DBL_NEG_EPS_EXP FLT_NEG_EPS_EXP
|
||||
|
||||
#else
|
||||
|
||||
#define DBL_RADIX 2
|
||||
#if defined(_SH4)&!defined(_RON)
|
||||
#define DBL_ROUNDS 0
|
||||
#define DBL_GUARD 0
|
||||
#else
|
||||
#define DBL_ROUNDS 1
|
||||
#define DBL_GUARD 1
|
||||
#endif
|
||||
#define DBL_NORMALIZE 1
|
||||
#define DBL_MAX _DBL_MAX_VAL
|
||||
#define DBL_MIN _DBL_MIN_VAL
|
||||
#define DBL_MAX_EXP 1023
|
||||
#if defined(_SH4)&!defined(_DON)
|
||||
#define DBL_MIN_EXP (-1022)
|
||||
#else
|
||||
#define DBL_MIN_EXP (-1074)
|
||||
#endif
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#if defined(_SH4)&!defined(_DON)
|
||||
#define DBL_MIN_10_EXP (-308)
|
||||
#else
|
||||
#define DBL_MIN_10_EXP (-323)
|
||||
#endif
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_EXP_DIG 11
|
||||
#if defined(_SH4)&!defined(_RON)
|
||||
#define DBL_POS_EPS 2.2204460492503131e-16
|
||||
#if defined(_DON)
|
||||
#define DBL_NEG_EPS 4.9406564584124655e-324
|
||||
#else
|
||||
#define DBL_NEG_EPS 2.2250738585072014e-308
|
||||
#endif
|
||||
#else
|
||||
#define DBL_POS_EPS 1.1102230246251567e-16
|
||||
#define DBL_NEG_EPS 5.5511151231257834e-17
|
||||
#endif
|
||||
#define DBL_POS_EPS_EXP (-52)
|
||||
#ifdef _SH4
|
||||
#ifdef _RON
|
||||
#define DBL_NEG_EPS_EXP (-53)
|
||||
#else
|
||||
#ifdef _DON
|
||||
#define DBL_NEG_EPS_EXP (-1023)
|
||||
#else
|
||||
#define DBL_NEG_EPS_EXP (-1022)
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define DBL_NEG_EPS_EXP (-53)
|
||||
#endif
|
||||
|
||||
#ifdef _FPD
|
||||
#define FLT_RADIX DBL_RADIX
|
||||
#define FLT_ROUNDS DBL_ROUNDS
|
||||
#define FLT_GUARD DBL_GUARD
|
||||
#define FLT_NORMALIZE DBL_NORMALIZE
|
||||
#define FLT_MAX _DBL_MAX_VAL
|
||||
#define FLT_MIN _DBL_MIN_VAL
|
||||
#define FLT_MAX_EXP DBL_MAX_EXP
|
||||
#define FLT_MIN_EXP DBL_MIN_EXP
|
||||
#define FLT_MAX_10_EXP DBL_MAX_10_EXP
|
||||
#define FLT_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define FLT_DIG DBL_DIG
|
||||
#define FLT_MANT_DIG DBL_MANT_DIG
|
||||
#define FLT_EXP_DIG DBL_EXP_DIG
|
||||
#define FLT_POS_EPS DBL_POS_EPS
|
||||
#define FLT_NEG_EPS DBL_NEG_EPS
|
||||
#define FLT_POS_EPS_EXP DBL_POS_EPS_EXP
|
||||
#define FLT_NEG_EPS_EXP DBL_NEG_EPS_EXP
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _FLT
|
||||
#define LDBL_RADIX 2
|
||||
#define LDBL_ROUNDS 1
|
||||
#define LDBL_GUARD 1
|
||||
#define LDBL_NORMALIZE 1
|
||||
#define LDBL_MAX _LDBL_MAX_VAL
|
||||
#define LDBL_MIN _LDBL_MIN_VAL
|
||||
#define LDBL_MAX_EXP 1023
|
||||
#define LDBL_MIN_EXP (-1074)
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
#define LDBL_MIN_10_EXP (-323)
|
||||
#define LDBL_DIG 15
|
||||
#define LDBL_MANT_DIG 53
|
||||
#define LDBL_EXP_DIG 11
|
||||
#define LDBL_POS_EPS 1.1102230246251567e-16
|
||||
#define LDBL_NEG_EPS 5.5511151231257834e-17
|
||||
#define LDBL_POS_EPS_EXP (-52)
|
||||
#define LDBL_NEG_EPS_EXP (-53)
|
||||
#else
|
||||
#define LDBL_RADIX DBL_RADIX
|
||||
#define LDBL_ROUNDS DBL_ROUNDS
|
||||
#define LDBL_GUARD DBL_GUARD
|
||||
#define LDBL_NORMALIZE DBL_NORMALIZE
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_EXP_DIG DBL_EXP_DIG
|
||||
#define LDBL_POS_EPS DBL_POS_EPS
|
||||
#define LDBL_NEG_EPS DBL_NEG_EPS
|
||||
#define LDBL_POS_EPS_EXP DBL_POS_EPS_EXP
|
||||
#define LDBL_NEG_EPS_EXP DBL_NEG_EPS_EXP
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,60 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//
|
||||
// Embeded C++ Library Header <iomanip>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: iomanip
|
||||
// Purpose: Definition of class iomanip
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _IOMANIP_
|
||||
#define _IOMANIP_
|
||||
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
//Class
|
||||
class smanip{
|
||||
private:
|
||||
union{
|
||||
int val_i;
|
||||
char val_c;
|
||||
ios_base::fmtflags val_f;
|
||||
};
|
||||
union{
|
||||
ios_base& (*pfi)(ios_base&,int);
|
||||
ios_base& (*pfc)(ios_base&,char);
|
||||
ios_base& (*pff)(ios_base&,ios_base::fmtflags);
|
||||
};
|
||||
enum _ec2p_smanip_t{
|
||||
_ec2p_smanip_i,_ec2p_smanip_c ,_ec2p_smanip_f
|
||||
}_ec2p_smanip_data;
|
||||
|
||||
public:
|
||||
smanip(ios_base& (*pf)(ios_base&,int),int arg)
|
||||
:pfi(pf),val_i(arg),_ec2p_smanip_data(_ec2p_smanip_i){}
|
||||
|
||||
smanip(ios_base& (*pf)(ios_base&,char),char arg)
|
||||
:pfc(pf),val_c(arg),_ec2p_smanip_data(_ec2p_smanip_c){}
|
||||
|
||||
smanip(ios_base& (*pf)(ios_base&,ios_base::fmtflags),ios_base::fmtflags arg)
|
||||
:pff(pf),val_f(arg),_ec2p_smanip_data(_ec2p_smanip_f){}
|
||||
|
||||
friend ostream& operator << (ostream&,smanip);
|
||||
friend istream& operator >> (istream&,smanip);
|
||||
};
|
||||
|
||||
//Manipulators
|
||||
smanip resetiosflags(ios_base::fmtflags);
|
||||
smanip setiosflags(ios_base::fmtflags);
|
||||
smanip setbase(int);
|
||||
smanip setfill(char);
|
||||
smanip setprecision(int);
|
||||
smanip setw(int);
|
||||
|
||||
#endif
|
192
include/ios
192
include/ios
|
@ -1,192 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
//
|
||||
// Embeded C++ Class Library Header <ios>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: ios
|
||||
// Purpose: Definition of class ios
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _IOS_
|
||||
#define _IOS_
|
||||
|
||||
class streambuf;
|
||||
class ostream;
|
||||
|
||||
typedef long POS_T;
|
||||
typedef long INT_T;
|
||||
typedef long SZ_T;
|
||||
typedef long OFF_T;
|
||||
|
||||
typedef OFF_T streamoff;
|
||||
typedef SZ_T streamsize;
|
||||
typedef INT_T int_type;
|
||||
typedef POS_T pos_type;
|
||||
typedef OFF_T off_type;
|
||||
|
||||
class ios_base {
|
||||
public:
|
||||
typedef long fmtflags;
|
||||
static const fmtflags boolalpha;
|
||||
static const fmtflags dec;
|
||||
static const fmtflags fixed;
|
||||
static const fmtflags hex;
|
||||
static const fmtflags internal;
|
||||
static const fmtflags left;
|
||||
static const fmtflags oct;
|
||||
static const fmtflags right;
|
||||
static const fmtflags scientific;
|
||||
static const fmtflags showbase;
|
||||
static const fmtflags showpoint;
|
||||
static const fmtflags showpos;
|
||||
static const fmtflags skipws;
|
||||
static const fmtflags unitbuf;
|
||||
static const fmtflags uppercase;
|
||||
static const fmtflags adjustfield;
|
||||
static const fmtflags basefield;
|
||||
static const fmtflags floatfield;
|
||||
typedef int iostate;
|
||||
static const iostate badbit;
|
||||
static const iostate eofbit;
|
||||
static const iostate failbit;
|
||||
static const iostate goodbit;
|
||||
typedef int openmode;
|
||||
static const openmode app;
|
||||
static const openmode ate;
|
||||
static const openmode binary;
|
||||
static const openmode in;
|
||||
static const openmode out;
|
||||
static const openmode trunc;
|
||||
typedef int seekdir;
|
||||
static const seekdir beg;
|
||||
static const seekdir cur;
|
||||
static const seekdir end;
|
||||
|
||||
class Init;
|
||||
|
||||
fmtflags flags() const {return (fmtflags)fmtfl;}
|
||||
fmtflags flags(fmtflags);
|
||||
fmtflags setf(fmtflags) ;
|
||||
fmtflags setf(fmtflags, fmtflags);
|
||||
void unsetf(fmtflags);
|
||||
char fill() const {
|
||||
return (char)fillch;
|
||||
}
|
||||
char fill(char);
|
||||
int precision() const {
|
||||
return prec;
|
||||
}
|
||||
streamsize precision(streamsize);
|
||||
streamsize width() const {return wide;}
|
||||
streamsize width(streamsize);
|
||||
|
||||
// static int xalloc() {return index++;} // Not implemented
|
||||
// long & ipword(int); // Not implemented
|
||||
// long * &pword(int); // Not implemented
|
||||
|
||||
~ios_base(){} // destructor
|
||||
|
||||
// callbacks -- exposition only
|
||||
enum event {
|
||||
erase_event,
|
||||
imbue_event,
|
||||
copyfmt_event
|
||||
};
|
||||
typedef void (*event_callback)(event, ios_base&, int index);
|
||||
void register_callback(event_callback fn, int index);
|
||||
static bool sync_with_stdio(bool sync = true){ return true; }
|
||||
|
||||
class Init{
|
||||
public:
|
||||
Init(){init_cnt++;}
|
||||
~Init(){init_cnt--;}
|
||||
private:
|
||||
static int init_cnt;
|
||||
};
|
||||
|
||||
protected:
|
||||
ios_base(){Init::Init();}
|
||||
void _ec2p_init_base();
|
||||
void _ec2p_copy_base(ios_base &);
|
||||
static const fmtflags _fmtmask;
|
||||
static const iostate _statemask;
|
||||
private:
|
||||
fmtflags fmtfl; // format flag
|
||||
streamsize prec; // number of after floating point
|
||||
streamsize wide; // field width
|
||||
char fillch; // fill charactor
|
||||
|
||||
// static int index; // exposition only
|
||||
// long *iarray; // exposition only
|
||||
// void **parray; // exposition only
|
||||
};
|
||||
|
||||
class ios : public ios_base {
|
||||
public:
|
||||
// Types:
|
||||
// typedef INT_T int_type;
|
||||
// typedef POS_T pos_type;
|
||||
// typedef OFF_T off_type;
|
||||
|
||||
operator void*() const {
|
||||
return (void*)!fail();
|
||||
}
|
||||
bool operator!() const{return (bool)fail();}
|
||||
iostate rdstate () const{return (iostate)state;}
|
||||
void clear(iostate = goodbit);
|
||||
void setstate(iostate);
|
||||
bool good() const {return (bool)(state==goodbit);}
|
||||
bool eof() const {return (bool)(state&eofbit);}
|
||||
bool fail() const {return (bool)(state&(badbit|failbit));}
|
||||
bool bad() const {return (bool)(state&badbit);}
|
||||
|
||||
iostate exceptions() const; // exposition only
|
||||
void exceptions(iostate); // exposition only
|
||||
|
||||
ios(streambuf *sbptr){ // Constructor
|
||||
init(sbptr);
|
||||
}
|
||||
virtual ~ios(){}; // Destructor
|
||||
ostream *tie() const {return tiestr;}
|
||||
ostream *tie(ostream*);
|
||||
streambuf *rdbuf() const{return sb;}
|
||||
streambuf *rdbuf(streambuf*);
|
||||
ios & copyfmt(const ios &);
|
||||
ios(){init(0);}
|
||||
void init(streambuf*);
|
||||
private:
|
||||
streambuf *sb; // pointer to streambuf object
|
||||
ostream *tiestr; // pointer to ostream object
|
||||
int state; // status
|
||||
};
|
||||
|
||||
//Manipulators
|
||||
ios_base & boolalpha(ios_base&);
|
||||
ios_base & noboolalpha(ios_base&);
|
||||
ios_base & showbase(ios_base&);
|
||||
ios_base & noshowbase(ios_base&);
|
||||
ios_base & showpoint(ios_base&);
|
||||
ios_base & noshowpoint(ios_base&);
|
||||
ios_base & showpos(ios_base&);
|
||||
ios_base & noshowpos(ios_base&);
|
||||
ios_base & skipws(ios_base&);
|
||||
ios_base & noskipws(ios_base&);
|
||||
ios_base & uppercase(ios_base&);
|
||||
ios_base & nouppercase(ios_base&);
|
||||
//Adjustfield
|
||||
ios_base & internal(ios_base&);
|
||||
ios_base & left(ios_base&);
|
||||
ios_base & right(ios_base&);
|
||||
//Basefield
|
||||
ios_base & dec(ios_base&);
|
||||
ios_base & hex(ios_base&);
|
||||
ios_base & oct(ios_base&);
|
||||
//floatfield
|
||||
ios_base & fixed(ios_base&);
|
||||
ios_base & scientific(ios_base&);
|
||||
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//
|
||||
// Standard iostream objects
|
||||
// Embeded C++ Library Header <iostream>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: iostream
|
||||
// Purpose: Definition of class iostream
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _IOSTREAM_
|
||||
#define _IOSTREAM_
|
||||
|
||||
#include <mystrbuf>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
extern istream cin;
|
||||
extern ostream cout;
|
||||
// extern ostream cerr; // EC++, not implemented
|
||||
|
||||
#endif
|
112
include/istream
112
include/istream
|
@ -1,112 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//====================================================================
|
||||
// File: istream
|
||||
// Purpose: Definition of class istream
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _ISTREAM_
|
||||
#define _ISTREAM_
|
||||
|
||||
#include <streambuf>
|
||||
|
||||
class istream : public ios {
|
||||
public:
|
||||
// Types (inherited from ios):
|
||||
// typedef INT_T int_type;
|
||||
// typedef POS_T pos_type;
|
||||
// typedef OFF_T off_type;
|
||||
|
||||
istream(streambuf *sb)
|
||||
:chcount(0),ios(sb){} // Constructor
|
||||
virtual ~istream(){} // Destructor
|
||||
class sentry; // Prefix/Suffix
|
||||
|
||||
// Formatted input
|
||||
istream& operator >>(istream& (*pf)(istream&)){
|
||||
return ((*pf)(*this)); }
|
||||
istream& operator >>(ios& (*pf)(ios&)){
|
||||
(*pf)(* (ios *)this); return (*this); }
|
||||
istream& operator>> (ios_base& (*pf)(ios_base&)){
|
||||
(*pf)(* (ios*)this); return (*this); }
|
||||
istream & operator >>(bool &n);
|
||||
istream & operator >>(short &n);
|
||||
istream & operator >>(unsigned short &n);
|
||||
istream & operator >>(int &n);
|
||||
istream & operator >>(unsigned int &n);
|
||||
istream & operator >>(long &n);
|
||||
istream & operator >>(unsigned long &n);
|
||||
istream & operator >>(float &f);
|
||||
istream & operator >>(double &f);
|
||||
istream & operator >>(long double &f);
|
||||
istream & operator >>(void * &p);
|
||||
istream & operator >>(streambuf *sb);
|
||||
|
||||
// Unformatted input
|
||||
streamsize gcount() const{return chcount;}
|
||||
int_type get();
|
||||
istream & get( char& c );
|
||||
istream & get( signed char& c );
|
||||
istream & get( unsigned char& c );
|
||||
istream & get( char* s, streamsize n);
|
||||
istream & get( char* s, streamsize n, char delim );
|
||||
istream & get( signed char* s, streamsize n);
|
||||
istream & get( signed char* s, streamsize n, char delim );
|
||||
istream & get( unsigned char* s, streamsize n);
|
||||
istream & get( unsigned char* s, streamsize n, char delim );
|
||||
istream & get( streambuf& sb);
|
||||
istream & get( streambuf& sb, char delim );
|
||||
istream & getline( char* s, streamsize n);
|
||||
istream & getline( char* s, streamsize n, char delim );
|
||||
istream & getline( signed char* s, streamsize n );
|
||||
istream & getline( signed char* s, streamsize n, char delim );
|
||||
istream & getline( unsigned char* s, streamsize n );
|
||||
istream & getline( unsigned char* s, streamsize n, char delim );
|
||||
istream & ignore( streamsize n=1, int_type delim=streambuf::eof );
|
||||
int_type peek();
|
||||
istream & read( char* s, streamsize n );
|
||||
istream & read( signed char* s, streamsize n );
|
||||
istream & read( unsigned char* s, streamsize n );
|
||||
streamsize readsome( char* s, streamsize n );
|
||||
streamsize readsome( signed char* s, streamsize n );
|
||||
streamsize readsome( unsigned char* s, streamsize n );
|
||||
istream & putback( char c );
|
||||
istream & unget();
|
||||
int sync();
|
||||
pos_type tellg();
|
||||
istream & seekg( pos_type pos );
|
||||
istream & seekg( off_type off, ios_base::seekdir dir );
|
||||
|
||||
private:
|
||||
streamsize chcount;
|
||||
streamsize _ec2p_gets( char* s, streamsize n, char delim, int mode );
|
||||
int _ec2p_getistr(char* str, unsigned int dig, int mode);
|
||||
int _ec2p_getfstr(char* str, unsigned int dig);
|
||||
unsigned long _ec2p_strtoul(char *nptr, char **endptr, int base);
|
||||
long _ec2p_extlong();
|
||||
unsigned long _ec2p_extulong();
|
||||
};
|
||||
|
||||
class istream::sentry {
|
||||
public:
|
||||
sentry(istream& is, bool noskipws = false);
|
||||
~sentry(){}
|
||||
operator bool() { return ok_; }
|
||||
private:
|
||||
bool ok_;
|
||||
};
|
||||
|
||||
// character extraction templates:
|
||||
istream& operator>>(istream&, char&);
|
||||
istream& operator>>(istream&, unsigned char&);
|
||||
istream& operator>>(istream&, signed char&);
|
||||
istream& operator>>(istream&, char*);
|
||||
istream& operator>>(istream&, unsigned char*);
|
||||
istream& operator>>(istream&, signed char*);
|
||||
|
||||
// Manipulator
|
||||
istream& ws(istream& is );
|
||||
#endif
|
|
@ -1,35 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = limits.h : */
|
||||
/* */
|
||||
/* FUNC = this module do the following functions */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
#ifndef _LIMITS
|
||||
#define _LIMITS
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define CHAR_MAX 127
|
||||
#define CHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define SCHAR_MIN (-128)
|
||||
#define UCHAR_MAX 255
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-32768)
|
||||
#define USHRT_MAX 65535
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-2147483647-1)
|
||||
#define UINT_MAX 4294967295u
|
||||
#define LONG_MAX 2147483647
|
||||
#define LONG_MIN (-2147483647L-1L)
|
||||
#define ULONG_MAX 4294967295u
|
||||
|
||||
#endif
|
|
@ -1,23 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = machine.h : */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _MACHINE
|
||||
#define _MACHINE
|
||||
|
||||
#include <smachine.h>
|
||||
#include <umachine.h>
|
||||
|
||||
#endif
|
111
include/math.h
111
include/math.h
|
@ -1,111 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = math : */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _MATH
|
||||
#define _MATH
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <builtin.h>
|
||||
#endif
|
||||
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 1100
|
||||
#endif
|
||||
|
||||
#ifndef EDOM
|
||||
#define EDOM 1101
|
||||
#endif
|
||||
|
||||
#ifndef ENUM
|
||||
#define ENUM 1208
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern volatile int _errno;
|
||||
extern const double _HUGE_VAL;
|
||||
#define HUGE_VAL _HUGE_VAL
|
||||
|
||||
extern double frexp(double, int *);
|
||||
extern double ldexp(double, int );
|
||||
extern double modf(double, double *);
|
||||
extern double ceil(double);
|
||||
|
||||
#ifdef _SH4
|
||||
#ifdef _FPS
|
||||
#define fabs _builtin_fabsf
|
||||
#else
|
||||
#define fabs _builtin_fabs
|
||||
#endif
|
||||
#else
|
||||
#if defined(_SH2E)|defined(_SH3E)
|
||||
#ifdef _FLT
|
||||
#define fabs _builtin_fabsf
|
||||
#else
|
||||
extern double fabs(double);
|
||||
#endif
|
||||
#else
|
||||
extern double fabs(double);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern double floor(double);
|
||||
extern double fmod(double, double);
|
||||
|
||||
extern double acos(double);
|
||||
extern double asin(double);
|
||||
extern double atan(double);
|
||||
extern double atan2(double,double);
|
||||
extern double cos(double);
|
||||
extern double sin(double);
|
||||
extern double tan(double);
|
||||
extern double cosh(double);
|
||||
extern double tanh(double);
|
||||
extern double sinh(double);
|
||||
extern double exp(double);
|
||||
extern double log(double);
|
||||
extern double log10(double);
|
||||
extern double pow(double,double);
|
||||
|
||||
#ifdef _COMPLEX_
|
||||
extern double sqrt(double);
|
||||
#else
|
||||
#ifdef _SH4
|
||||
#ifdef _FPS
|
||||
#define sqrt _builtin_sqrtf
|
||||
#else
|
||||
#define sqrt _builtin_sqrt
|
||||
#endif
|
||||
#else
|
||||
#ifdef _SH3E
|
||||
#ifdef _FLT
|
||||
#define sqrt _builtin_sqrtf
|
||||
#else
|
||||
extern double sqrt(double);
|
||||
#endif
|
||||
#else
|
||||
extern double sqrt(double);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,66 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.1 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = mathf */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _MATHF
|
||||
#define _MATHF
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include <builtin.h>
|
||||
#endif
|
||||
extern float frexpf(float, int *);
|
||||
extern float ldexpf(float, int);
|
||||
extern float modff(float, float *);
|
||||
extern float ceilf(float);
|
||||
#if defined(_SH2E)|defined(_SH3E)|defined(_SH4)
|
||||
#ifdef _FPD
|
||||
#define fabsf _builtin_fabs
|
||||
#else
|
||||
#define fabsf _builtin_fabsf
|
||||
#endif
|
||||
#else
|
||||
extern float fabsf(float);
|
||||
#endif
|
||||
extern float floorf(float);
|
||||
extern float fmodf(float, float);
|
||||
extern float acosf(float);
|
||||
extern float asinf(float);
|
||||
extern float atanf(float);
|
||||
extern float atan2f(float,float);
|
||||
extern float cosf(float);
|
||||
extern float sinf(float);
|
||||
extern float tanf(float);
|
||||
extern float coshf(float);
|
||||
extern float tanhf(float);
|
||||
extern float sinhf(float);
|
||||
extern float expf(float);
|
||||
extern float logf(float);
|
||||
extern float log10f(float);
|
||||
extern float powf(float,float);
|
||||
#if defined(_SH3E)|defined(_SH4)
|
||||
#ifdef _FPD
|
||||
#define sqrtf _builtin_sqrt
|
||||
#else
|
||||
#define sqrtf _builtin_sqrtf
|
||||
#endif
|
||||
#else
|
||||
extern float sqrtf(float);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,53 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
//
|
||||
// Embeded C++ Library <mystrbuf>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: mystrbuf
|
||||
// Purpose: Definition of class mystrbuf
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _MYSTRBUF_
|
||||
#define _MYSTRBUF_
|
||||
|
||||
#ifdef _EC2P_GPP
|
||||
#define _bufbase _base
|
||||
#define _bufptr _ptr
|
||||
#define _bufcnt _cnt
|
||||
// #define _buflen _bufsiz
|
||||
#define _ioflag1 _flag
|
||||
#endif
|
||||
|
||||
#include <streambuf>
|
||||
struct _f_type;
|
||||
class mystrbuf : public streambuf {
|
||||
public:
|
||||
mystrbuf(){_file_Ptr = 0;}
|
||||
mystrbuf(void *_fp){_Init((_f_type*)_fp);}
|
||||
virtual ~mystrbuf(){close();}
|
||||
void *myfptr() const{return _file_Ptr;}
|
||||
mystrbuf *open(const char *, int);
|
||||
mystrbuf *close();
|
||||
protected:
|
||||
virtual streambuf *setbuf(char *, streamsize);
|
||||
virtual pos_type seekoff(off_type, ios_base::seekdir,
|
||||
ios_base::openmode=(ios_base::openmode)(ios_base::in|ios_base::out));
|
||||
virtual pos_type seekpos(pos_type sp,
|
||||
ios_base::openmode=(ios_base::openmode)(ios_base::in|ios_base::out));
|
||||
virtual int sync();
|
||||
virtual int showmanyc(){return 0;}
|
||||
virtual int_type underflow();
|
||||
virtual int_type pbackfail(int_type=streambuf::eof);
|
||||
virtual int_type overflow(int_type=streambuf::eof);
|
||||
private:
|
||||
void _Init(_f_type *);
|
||||
_f_type *_file_Ptr;
|
||||
#ifdef _EC2P_GPP
|
||||
long _buflen_wk;
|
||||
#endif
|
||||
};
|
||||
#endif
|
31
include/new
31
include/new
|
@ -1,31 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 6.0 */
|
||||
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = new : */
|
||||
/* */
|
||||
/* FUNC = Include file for C++ default operator new . */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef __NEW__
|
||||
#define __NEW__
|
||||
|
||||
#ifdef __embedded_cplusplus
|
||||
|
||||
#include <new_ecpp.h> // include Embeded C++ Library Header
|
||||
|
||||
#else
|
||||
|
||||
#include <new_edg.h> // include ANSI C++ Library Header
|
||||
|
||||
#endif /* ifdef __embedded_cplusplus */
|
||||
|
||||
#endif /* ifndef __NEW__ */
|
|
@ -1,41 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//
|
||||
// Dynamic memory management
|
||||
// Embeded C++ Library Header <new>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: new
|
||||
// Purpose: Definition of class new
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _NEW_
|
||||
#define _NEW_
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// Storage allocation and deallocation
|
||||
void *operator new(size_t);
|
||||
void *operator new[] (size_t);
|
||||
void *operator new(size_t,void *);
|
||||
void *operator new[](size_t,void *);
|
||||
|
||||
void operator delete(void *);
|
||||
void operator delete[](void *);
|
||||
// void operator delete(void *, void *); // Not implemented
|
||||
// void operator delete[](void *, void *); // Not implemented
|
||||
|
||||
// Type new_handler
|
||||
typedef void (*new_handler)();
|
||||
|
||||
// set_new_handler
|
||||
new_handler set_new_handler(new_handler new_P);
|
||||
|
||||
// new_handler
|
||||
extern new_handler _ec2p_new_handler;
|
||||
|
||||
#endif
|
|
@ -1,122 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 6.0 */
|
||||
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = new_edg.h : */
|
||||
/* */
|
||||
/* FUNC = Include file for C++ default operator new . */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef __NEW_H
|
||||
#define __NEW_H
|
||||
|
||||
#ifndef _STDDEF
|
||||
#include <stddef.h>
|
||||
#endif /* ifndef _STDDEF */
|
||||
#ifndef _EXCEPTION_H
|
||||
#include <exception.h>
|
||||
#endif /* _EXCEPTION_H */
|
||||
|
||||
#ifndef __EDG_STD_NAMESPACE
|
||||
/* If not already defined, define a macro that expands to the namespace
|
||||
containing the standard library. */
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
#define __EDG_STD_NAMESPACE std
|
||||
#else /* ifndef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
#define __EDG_STD_NAMESPACE /* nothing */
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
#endif /* ifdef __EDG_STD_NAMESPACE */
|
||||
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
namespace std {
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
/* This lets users disable the EDG supplied exception classes. */
|
||||
#ifndef __NO_EDG_EXCEPTION_CLASSES
|
||||
|
||||
class bad_alloc : public exception {
|
||||
public:
|
||||
bad_alloc() throw();
|
||||
bad_alloc(const bad_alloc&) throw();
|
||||
bad_alloc& operator=(const bad_alloc&) throw();
|
||||
virtual ~bad_alloc() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
|
||||
|
||||
typedef void (*new_handler)();
|
||||
new_handler set_new_handler(new_handler);
|
||||
struct nothrow_t { };
|
||||
// Declaration of object nothrow to permit the use of the placement new
|
||||
// syntax: new (nothrow) T;
|
||||
const nothrow_t nothrow = {};
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
} /* namespace std */
|
||||
|
||||
#ifdef __EDG_IMPLICIT_USING_STD
|
||||
/* Implicitly include a using directive for the STD namespace when this
|
||||
preprocessing flag is TRUE. */
|
||||
using namespace std;
|
||||
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
|
||||
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
/* Normal operator new. */
|
||||
void *operator new(size_t) throw(__EDG_STD_NAMESPACE::bad_alloc);
|
||||
|
||||
/* Normal operator delete. */
|
||||
void operator delete(void*) throw ();
|
||||
|
||||
/* Nothrow version of operator new. */
|
||||
void *operator new(size_t, const __EDG_STD_NAMESPACE::nothrow_t&) throw();
|
||||
|
||||
/* Nothrow version of operator delete. */
|
||||
void operator delete(void*, const __EDG_STD_NAMESPACE::nothrow_t&) throw();
|
||||
|
||||
/* Placement new. */
|
||||
void *operator new(size_t, void*) throw();
|
||||
|
||||
/* Placement delete. */
|
||||
#ifdef __PLACEMENT_DELETE
|
||||
void operator delete(void*, void*) throw();
|
||||
#endif /* ifdef __PLACEMENT_DELETE */
|
||||
|
||||
#ifdef __ARRAY_OPERATORS
|
||||
|
||||
/* Array new. */
|
||||
void *operator new[](size_t) throw(__EDG_STD_NAMESPACE::bad_alloc);
|
||||
|
||||
/* Array delete. */
|
||||
void operator delete[](void*) throw ();
|
||||
|
||||
/* Placement array new. */
|
||||
void *operator new[](size_t, void*) throw();
|
||||
|
||||
/* Placement array delete. */
|
||||
#ifdef __PLACEMENT_DELETE
|
||||
void operator delete[](void*, void*) throw();
|
||||
#endif /* ifdef __PLACEMENT_DELETE */
|
||||
|
||||
/* Nothrow version of array new. */
|
||||
void *operator new[](size_t,
|
||||
const __EDG_STD_NAMESPACE::nothrow_t&) throw();
|
||||
|
||||
/* Nothrow version of array delete. */
|
||||
void operator delete[](void*,
|
||||
const __EDG_STD_NAMESPACE::nothrow_t&) throw();
|
||||
#endif /* __ARRAY_OPERATORS */
|
||||
|
||||
// EC++ use new_handler
|
||||
extern __EDG_STD_NAMESPACE::new_handler _ec2p_new_handler;
|
||||
|
||||
#endif /* ifndef __NEW_H */
|
|
@ -1,87 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//====================================================================
|
||||
// File: ostream
|
||||
// Purpose: Definition of class ostream
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _OSTREAM_
|
||||
#define _OSTREAM_
|
||||
|
||||
#include <streambuf>
|
||||
|
||||
class ostream : public ios {
|
||||
public:
|
||||
// Types (inherited from ios):
|
||||
// typedef INT_T int_type;
|
||||
// typedef POS_T pos_type;
|
||||
// typedef OFF_T off_type;
|
||||
|
||||
ostream(streambuf *sbptr) : ios(sbptr){}
|
||||
virtual ~ostream(){}
|
||||
class sentry; // Prefix/Suffix
|
||||
ostream& operator <<(ostream& (*pf)(ostream&)){
|
||||
return (*pf)(*this); }
|
||||
ostream& operator <<(ios& (*pf)(ios&)){
|
||||
(*pf)(*(ios*)this); return *this; }
|
||||
ostream& operator<< (ios_base& (*pf)(ios_base&)){
|
||||
(*pf)(*(ios*)this); return *this; }
|
||||
ostream & operator <<(bool n){
|
||||
*this<<(int)n; return *this; }
|
||||
ostream & operator <<(short);
|
||||
ostream & operator <<(unsigned short);
|
||||
ostream & operator <<(int);
|
||||
ostream & operator <<(unsigned int);
|
||||
ostream & operator <<(long);
|
||||
ostream & operator <<(unsigned long);
|
||||
ostream & operator <<(float);
|
||||
ostream & operator <<(double);
|
||||
ostream & operator <<(long double);
|
||||
ostream & operator <<(void *);
|
||||
ostream & operator <<(streambuf *);
|
||||
ostream & put(char);
|
||||
ostream & write(const char *, streamsize);
|
||||
ostream & write(const signed char *, streamsize);
|
||||
ostream & write(const unsigned char *, streamsize);
|
||||
ostream & flush();
|
||||
pos_type tellp();
|
||||
ostream& seekp( pos_type );
|
||||
ostream& seekp( off_type , ios_base::seekdir );
|
||||
|
||||
int _ec2p_strput(const char*);
|
||||
private:
|
||||
void _ec2p_IntPrint(const char*, short);
|
||||
void _ec2p_FloatPrint(const char*, short);
|
||||
void _ec2p_DataPut(const char*, int, int, int, int);
|
||||
void _ec2p_int_fmtparam(const char*, char*);
|
||||
void _ec2p_flt_fmtparam(const char*, char*);
|
||||
};
|
||||
|
||||
// Class ostream::sentry
|
||||
class ostream::sentry {
|
||||
public:
|
||||
sentry(ostream& os);
|
||||
~sentry();
|
||||
operator bool() { return ok_; }
|
||||
private:
|
||||
bool ok_;
|
||||
ostream* __ec2p_os;
|
||||
};
|
||||
|
||||
// character inserters
|
||||
ostream& operator<<(ostream&, char);
|
||||
ostream& operator<<(ostream&, const char*);
|
||||
// signed and unsigned
|
||||
ostream& operator<<(ostream&, signed char);
|
||||
ostream& operator<<(ostream&, unsigned char);
|
||||
// signed and unsigned
|
||||
ostream& operator<<(ostream&, const signed char*);
|
||||
ostream& operator<<(ostream&, const unsigned char*);
|
||||
|
||||
ostream & endl( ostream & );
|
||||
ostream & ends( ostream & );
|
||||
ostream & flush( ostream & );
|
||||
#endif
|
|
@ -1,48 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = setjmp.h : ; */
|
||||
/* */
|
||||
/* FUNC = this module do the following functions ; */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
#ifndef _SETJMP
|
||||
#define _SETJMP
|
||||
|
||||
#if defined(_SH2E)|defined(_SH3E)||defined(_SH4)
|
||||
typedef int jmp_buf[38];
|
||||
#else
|
||||
typedef int jmp_buf[20];
|
||||
#endif
|
||||
#ifdef _SH4
|
||||
typedef int jmp_buf_a[54];
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int setjmp(jmp_buf);
|
||||
extern void longjmp(jmp_buf, int);
|
||||
#ifdef _SH4
|
||||
extern int setjmp_a(jmp_buf);
|
||||
extern void longjmp_a(jmp_buf, int);
|
||||
#endif
|
||||
|
||||
extern volatile int _errno;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SEQERR
|
||||
#define SEQERR 1108
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,28 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 3.0 */
|
||||
/* Copyright (c) 1992,1995 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = smachine.h : */
|
||||
/* FUNC = ; */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _SMACHINE
|
||||
#define _SMACHINE
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <builtin.h>
|
||||
#endif
|
||||
|
||||
#define set_imask(mask) _builtin_set_imask(mask)
|
||||
#define get_imask() _builtin_get_imask()
|
||||
#define set_cr(cr) _builtin_set_cr(cr)
|
||||
#define get_cr() _builtin_get_cr()
|
||||
#define set_vbr(base) _builtin_set_vbr(base)
|
||||
#define get_vbr() _builtin_get_vbr()
|
||||
#define sleep() _builtin_sleep()
|
||||
|
||||
#endif
|
|
@ -1,36 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = stdarg : */
|
||||
/* FUNC = this module do the following finctions ; */
|
||||
/* */
|
||||
/* (1) initialize parameter pointer */
|
||||
/* (2) set parameter pointer to next parameter */
|
||||
/* */
|
||||
/* */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _STDARG
|
||||
#define _STDARG
|
||||
|
||||
typedef char *va_list ;
|
||||
|
||||
#define va_start(ap,param) (void)((ap)=(int)\
|
||||
((char *) &(param)+sizeof(param))%4u?\
|
||||
(char *) &(param)+sizeof(param)+(4u-(sizeof(param)%4u)):\
|
||||
(char *) &(param)+sizeof(param))
|
||||
|
||||
#define va_arg(ap,type) (*((ap)=((int)((ap)+sizeof(type))%4u?\
|
||||
(ap)+sizeof(type)+(4u-(sizeof(type)%4u)):\
|
||||
(ap)+sizeof(type)),\
|
||||
(type *)((int)((ap)-sizeof(type))%4u?\
|
||||
(ap)-sizeof(type)-(4u-(sizeof(type)%4u)):\
|
||||
(ap)-sizeof(type))))
|
||||
|
||||
#define va_end(ap)
|
||||
|
||||
#endif
|
|
@ -1,46 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = stddef : */
|
||||
/* */
|
||||
/* FUNC = this module do the following functions */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
#ifndef _STDDEF
|
||||
#define _STDDEF
|
||||
|
||||
#ifndef _PTRDIFF_T
|
||||
#define _PTRDIFF_T
|
||||
typedef int ptrdiff_t;
|
||||
#endif
|
||||
|
||||
#ifndef _SIZE_T
|
||||
#define _SIZE_T
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL (0)
|
||||
#else
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(type,id) ((char *)(&(((type *)NULL)->id)) - \
|
||||
(char *)((type *)NULL))
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
#define errno _errno
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,47 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = stdexcept.h : */
|
||||
/* */
|
||||
/* FUNC = Include file for exception handling (see 19.1.1) */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef _STDEXCEPT_H
|
||||
#define _STDEXCEPT_H
|
||||
|
||||
/* This lets users disable the EDG supplied exception classes. */
|
||||
#ifndef __NO_EDG_EXCEPTION_CLASSES
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
namespace std {
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
class exception {
|
||||
public:
|
||||
exception() throw();
|
||||
exception& operator=(const exception&) throw();
|
||||
virtual ~exception() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
} /* namespace std */
|
||||
|
||||
#ifdef __EDG_IMPLICIT_USING_STD
|
||||
/* Implicitly include a using directive for the STD namespace when this
|
||||
preprocessing flag is TRUE. */
|
||||
using namespace std;
|
||||
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
|
||||
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
|
||||
|
||||
#endif /* _STDEXCEPT_H */
|
||||
|
146
include/stdio.h
146
include/stdio.h
|
@ -1,146 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = stdio : header file for standard I/O function ; */
|
||||
/* */
|
||||
/* FUNC = this header file do the following functions; */
|
||||
/* (1) file entry table define; */
|
||||
/* (2) I/O macro define; */
|
||||
/* (3) symbol define; */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
#ifndef _STDIO
|
||||
#define _STDIO
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _NFILE 20
|
||||
#define SYS_OPEN 20
|
||||
extern struct _iobuf {
|
||||
unsigned char *_bufptr; /* buffer pointer */
|
||||
long _bufcnt; /* buffer count */
|
||||
unsigned char *_bufbase; /* buffer base pointer */
|
||||
long _buflen; /* buffer length */
|
||||
char _ioflag1; /* I/O control flag 1 */
|
||||
char _ioflag2; /* I/O control flag 2 */
|
||||
char _iofd;
|
||||
} _iob[_NFILE];
|
||||
|
||||
extern volatile int _errno;
|
||||
|
||||
typedef struct _iobuf FILE; /* define FILE of file-stream */
|
||||
|
||||
/* define function of prototype */
|
||||
extern int _fillbuf(FILE*);
|
||||
extern int _flshbuf(int,FILE*);
|
||||
extern void _putcsub(FILE*);
|
||||
extern int fclose(FILE *);
|
||||
extern int fflush(FILE *);
|
||||
extern FILE *fopen(const char *, const char *);
|
||||
extern FILE *freopen(const char *, const char *, FILE *);
|
||||
extern void setbuf(FILE *, char *);
|
||||
extern int setvbuf(FILE *, char *, int, size_t);
|
||||
extern int fprintf(FILE *, const char *, ...);
|
||||
extern int fscanf(FILE *, const char *, ...);
|
||||
extern int printf(const char * ,...);
|
||||
extern int scanf(const char * ,...);
|
||||
extern int sprintf(char *, const char * ,...);
|
||||
extern int sscanf(const char *, const char * ,...);
|
||||
extern int vfprintf(FILE *, const char *, char *);
|
||||
extern int vprintf(const char *, char *);
|
||||
extern int vsprintf(char *, const char *, char *);
|
||||
extern int fgetc(FILE *);
|
||||
extern char *fgets(char *, int, FILE *);
|
||||
extern int fputc(int , FILE *);
|
||||
extern int fputs(const char *, FILE *);
|
||||
extern int getc(FILE *);
|
||||
extern int getchar(void);
|
||||
extern char *gets(char *);
|
||||
extern int putc(int, FILE *);
|
||||
extern int putchar(int);
|
||||
extern int puts(const char *);
|
||||
extern int ungetc(int, FILE *);
|
||||
extern size_t fread(void *, size_t, size_t, FILE *);
|
||||
extern size_t fwrite(const void *, size_t, size_t, FILE *);
|
||||
extern int fseek(FILE *, long int, int);
|
||||
extern long ftell(FILE *);
|
||||
extern void rewind(FILE *);
|
||||
extern void clearerr(FILE *);
|
||||
extern int feof(FILE *);
|
||||
extern int ferror(FILE *);
|
||||
extern void perror(const char *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define _IOFBF 1 /* define _IOFBF of full buffering */
|
||||
#define _IOLBF 2 /* define _IOLBF of line buffering */
|
||||
#define _IONBF 3 /* define _IONBF of non buffering */
|
||||
|
||||
#define SEEK_SET 0 /* allocate top position */
|
||||
#define SEEK_CUR 1 /* allocate current position */
|
||||
#define SEEK_END 2 /* allocate bottom position */
|
||||
|
||||
#define BUFSIZ 512 /* default buffer size */
|
||||
|
||||
/* error number define */
|
||||
#ifndef EBADF
|
||||
#define EBADF 1302 /* I/O operation error */
|
||||
#endif
|
||||
|
||||
#ifndef PTRERR
|
||||
#define PTRERR 1106 /* fp null */
|
||||
#endif
|
||||
|
||||
#ifndef ECSPEC
|
||||
#define ECSPEC 1304 /* format err */
|
||||
#endif
|
||||
|
||||
#ifndef NOTOPN
|
||||
#define NOTOPN 1300 /* file not open */
|
||||
#endif
|
||||
|
||||
/* I/O flags for _ioflag1 */
|
||||
#define _IOREAD 1 /* only read or update read */
|
||||
#define _IOWRITE 2 /* only write or update write */
|
||||
#define _IORW 4 /* update file */
|
||||
#define _IOUNBUF 8 /* unbffering I/O */
|
||||
#define _IOBGBUF 16 /* automatic buffer allocate */
|
||||
#define _IOEOF 32 /* end of file */
|
||||
#define _IOERR 64 /* I/O error */
|
||||
#define _IOBIN 128 /* binaly file */
|
||||
#define _UNGTC 1 /* ungetc issued (_ioflag2) */
|
||||
#define _IOLINBUF 2 /* line buffering */
|
||||
|
||||
#define EOF (-1)
|
||||
#define _EOL (0X0A) /* end of line */
|
||||
|
||||
#define stdin (&_iob[0]) /* standard input file */
|
||||
#define stdout (&_iob[1]) /* standard output file */
|
||||
#define stderr (&_iob[2]) /* standard error output file */
|
||||
|
||||
#define getc(fp) ((fp)->_ioflag2&=~_UNGTC,(((fp)->_ioflag1&(_IORW|_IOWRITE))==\
|
||||
(_IORW|_IOWRITE))&&(fp)->_bufcnt==(fp)->_buflen?(_fillbuf(fp)):\
|
||||
--(fp)->_bufcnt>=0 ?((int)*(fp)->_bufptr++):_fillbuf(fp))
|
||||
#define putc(x,fp) (((((fp)->_ioflag1&_IORW)!=0&&((fp)->_ioflag1&_IOWRITE)==0)\
|
||||
?_putcsub(fp):(void)0),((((fp)->_bufcnt==0)||((((fp)->_ioflag2&_IOLINBUF)!=0)\
|
||||
&& ((fp)->_bufbase!=(fp)->_bufptr)&&(*((fp)->_bufptr-1)==_EOL)))\
|
||||
?_flshbuf((int)(x),(fp)):\
|
||||
(((fp)->_bufcnt--),((int)(*(fp)->_bufptr++=(unsigned char)(x))))))
|
||||
#define getchar() getc(stdin)
|
||||
#define putchar(x) putc(x,stdout)
|
||||
#define feof(fp) ((fp)->_ioflag1&_IOEOF)
|
||||
#define ferror(fp) ((fp)->_ioflag1&_IOERR)
|
||||
#define clearerr(fp) ((void)((fp)->_ioflag1&=~(_IOEOF|_IOERR)))
|
||||
|
||||
#endif
|
|
@ -1,97 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
//
|
||||
// Embeded C++ Library <streambuf>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: streambuf
|
||||
// Purpose: Definition of class streambuf
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _STREAMBUF_
|
||||
#define _STREAMBUF_
|
||||
|
||||
#include <ios>
|
||||
class streambuf {
|
||||
public:
|
||||
virtual ~streambuf(){}
|
||||
streambuf *pubsetbuf(char *cptr, streamsize nnum){
|
||||
return setbuf(cptr, nnum);
|
||||
}
|
||||
pos_type pubseekoff(off_type off,ios_base::seekdir way,
|
||||
ios_base::openmode which
|
||||
=(ios_base::openmode)
|
||||
(ios_base::in|ios_base::out)){
|
||||
return seekoff(off, way, which);
|
||||
}
|
||||
pos_type pubseekpos(pos_type sp,
|
||||
ios_base::openmode which
|
||||
=(ios_base::openmode)
|
||||
(ios_base::in|ios_base::out)){
|
||||
return seekpos(sp, which);
|
||||
}
|
||||
int pubsync(){
|
||||
return sync();
|
||||
}
|
||||
streamsize in_avail(){
|
||||
return ((gptr()!=0)&&(gptr()<egptr()) ?
|
||||
egptr()-gptr(): showmanyc());
|
||||
}
|
||||
int_type snextc() {return ((sbumpc()==eof) ? eof:sgetc());}
|
||||
int_type sbumpc();
|
||||
int_type sgetc();
|
||||
int sgetn(char* cptr, streamsize nnum) {return xsgetn( cptr, nnum);}
|
||||
int_type sputbackc(char);
|
||||
int sungetc();
|
||||
int sputc(char);
|
||||
int_type sputn(const char *cptr, streamsize nnum)
|
||||
{return xsputn( cptr, nnum);}
|
||||
enum {eof=-1};
|
||||
protected:
|
||||
streambuf();
|
||||
char *eback() const {return *B_beg_pptr;}
|
||||
char *gptr() const {return *B_next_pptr;}
|
||||
char *egptr() const {return (*B_next_pptr+(*_B_cnt_ptr));}
|
||||
void gbump(int nptr);
|
||||
void setg(char *gbeg, char *gnext, char *gend)
|
||||
{*B_beg_pptr = gbeg;*B_next_pptr = gnext;B_end_ptr = gend;
|
||||
*_B_cnt_ptr=gend-gnext;*_B_len_ptr=gend-gbeg;}
|
||||
char *pbase() const {return *B_beg_pptr;}
|
||||
char *pptr() const {return *B_next_pptr;}
|
||||
char *epptr() const {return (*B_beg_pptr+(*_B_len_ptr));}
|
||||
char *_ec2p_getflag() const { return ((char*)C_flg_ptr);}
|
||||
void pbump(int nptr);
|
||||
void setp(char *pbeg, char *pend)
|
||||
{*B_beg_pptr = pbeg;*B_next_pptr = pbeg;B_end_ptr = pend;
|
||||
*_B_cnt_ptr=pend-pbeg;*_B_len_ptr=pend-pbeg;}
|
||||
virtual streambuf *setbuf(char *, streamsize){ return this; }
|
||||
virtual pos_type seekoff(off_type, ios_base::seekdir,
|
||||
ios_base::openmode=(ios_base::openmode)
|
||||
(ios_base::in|ios_base::out)){ return -1; }
|
||||
virtual pos_type seekpos(pos_type, ios_base::openmode=
|
||||
(ios_base::openmode)(ios_base::in|ios_base::out)){
|
||||
return -1; }
|
||||
virtual int sync(){ return 0; }
|
||||
virtual int showmanyc(){ return 0; }
|
||||
virtual streamsize xsgetn(char *, streamsize);
|
||||
virtual int_type underflow(){ return eof; }
|
||||
virtual int_type uflow();
|
||||
virtual int_type pbackfail(int_type=eof){ return eof; }
|
||||
virtual streamsize xsputn(const char *, streamsize);
|
||||
virtual int_type overflow(int_type=eof){ return eof; }
|
||||
char *& _ec2p_gnptr(){ return (char *&)*B_next_pptr;}
|
||||
char *& _ec2p_pnptr(){ return (char *&)*B_next_pptr;}
|
||||
void _ec2p_bcntplus(){(*_B_cnt_ptr)++;}
|
||||
void _ec2p_bcntminus(){(*_B_cnt_ptr)--;}
|
||||
void _ec2p_setbPtr(char**, char**, long*, long*,char*);
|
||||
private:
|
||||
long *_B_cnt_ptr, *_B_len_ptr;
|
||||
char *B_beg_ptr, *B_next_ptr, *B_end_ptr;
|
||||
char **B_beg_pptr, **B_next_pptr;
|
||||
char *C_flg_ptr;
|
||||
};
|
||||
|
||||
#endif
|
213
include/string
213
include/string
|
@ -1,213 +0,0 @@
|
|||
//Embedded C++ Library
|
||||
//Copyright (c) Hitachi,Ltd. 1997
|
||||
//Licensed material of Hitachi,Ltd
|
||||
|
||||
//
|
||||
// Strings library / String classes
|
||||
// Embedded C++ Library Header <string>
|
||||
//
|
||||
|
||||
//====================================================================
|
||||
// File: string
|
||||
// Purpose: Definition of class string
|
||||
// Create: 1997.09.20 Rev. 1.0
|
||||
//====================================================================
|
||||
|
||||
#ifndef _STRING_
|
||||
#define _STRING_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
class string;
|
||||
|
||||
string operator + (const string &lhs,const string &rhs);
|
||||
string operator + (const char *lhs,const string &rhs);
|
||||
string operator + (char lhs,const string &rhs);
|
||||
string operator + (const string &lhs,const char *rhs);
|
||||
string operator + (const string &lhs,char rhs);
|
||||
|
||||
bool operator == (const string &lhs,const string &rhs);
|
||||
bool operator == (const char *lhs,const string &rhs);
|
||||
bool operator == (const string &lhs,const char *rhs);
|
||||
bool operator != (const string &lhs,const string &rhs);
|
||||
bool operator != (const char *lhs,const string &rhs);
|
||||
bool operator != (const string &lhs,const char *rhs);
|
||||
|
||||
bool operator < (const string &lhs,const string &rhs);
|
||||
bool operator < (const char *lhs,const string &rhs);
|
||||
bool operator < (const string &lhs,const char *rhs);
|
||||
bool operator > (const string &lhs,const string &rhs);
|
||||
bool operator > (const char *lhs,const string &rhs);
|
||||
bool operator > (const string &lhs,const char *rhs);
|
||||
|
||||
bool operator <= (const string &lhs,const string &rhs);
|
||||
bool operator <= (const char *lhs,const string &rhs);
|
||||
bool operator <= (const string &lhs,const char *rhs);
|
||||
bool operator >= (const string &lhs,const string &rhs);
|
||||
bool operator >= (const char *lhs,const string &rhs);
|
||||
bool operator >= (const string &lhs,const char *rhs);
|
||||
|
||||
void swap(string &lhs, string &rhs);
|
||||
|
||||
istream & operator >> (istream &is,string &str);
|
||||
ostream & operator << (ostream &os,const string &str);
|
||||
istream & getline (istream &is,string &str,char delim);
|
||||
istream & getline (istream &is,string &str);
|
||||
|
||||
class string {
|
||||
public:
|
||||
typedef char* iterator;
|
||||
typedef const char* const_iterator;
|
||||
|
||||
static const size_t npos;
|
||||
|
||||
string(void) {
|
||||
_ec2p_getmem(NULL, 0, NULL, false);
|
||||
}
|
||||
string(const string& str, size_t pos = 0, size_t n = npos) {
|
||||
size_t wkpos = pos > str.size() ? str.size() : pos;
|
||||
size_t rlen = (n > (str.size() - wkpos)) ? str.size() - wkpos : n;
|
||||
_ec2p_getmem(&str.c_str()[wkpos], rlen, NULL, false);
|
||||
}
|
||||
string(const char* s, size_t n) {
|
||||
_ec2p_getmem(s, n, NULL, false);
|
||||
}
|
||||
string(const char* s) {
|
||||
_ec2p_getmem(s, strlen(s), NULL, false);
|
||||
}
|
||||
string(size_t n, char c) {
|
||||
_ec2p_getmem(NULL, n, c, true);
|
||||
}
|
||||
#ifdef _EC2P_GPP
|
||||
string(char c) {
|
||||
_ec2p_getmem(NULL, 1, c, true);
|
||||
}
|
||||
#endif
|
||||
~string() {
|
||||
if (s_ptr != NULL) {
|
||||
delete [] s_ptr;
|
||||
s_ptr = NULL;
|
||||
}
|
||||
}
|
||||
string& operator=(const string& str);
|
||||
string& operator=(const char* s);
|
||||
string& operator=(char c);
|
||||
|
||||
iterator begin() { return((iterator)s_ptr); }
|
||||
const_iterator begin() const { return((const_iterator)s_ptr); }
|
||||
iterator end() { return((iterator)&s_ptr[s_len]); }
|
||||
const_iterator end() const { return((const_iterator)&s_ptr[s_len]);}
|
||||
|
||||
size_t size() const { return(s_len); }
|
||||
size_t length() const { return(s_len); }
|
||||
size_t max_size() const { return(s_res); }
|
||||
void resize(size_t n, char c);
|
||||
void resize(size_t n);
|
||||
size_t capacity() const { return(s_res); }
|
||||
void reserve(size_t res_arg = 0);
|
||||
void clear();
|
||||
bool empty() const { return( s_len == 0 ? true : false ); }
|
||||
|
||||
const char & operator[](size_t pos) const;
|
||||
char & operator[](size_t pos);
|
||||
const char & at(size_t n) const;
|
||||
char & at(size_t n);
|
||||
|
||||
string& operator+=(const string& str);
|
||||
string& operator+=(const char* s);
|
||||
string& operator+=(char c);
|
||||
string& append(const string& str);
|
||||
string& append(const string& str, size_t pos, size_t n);
|
||||
string& append(const char* s, size_t n);
|
||||
string& append(const char* s);
|
||||
string& append(size_t n, char c);
|
||||
|
||||
string& assign(const string&);
|
||||
string& assign(const string& str, size_t pos, size_t n);
|
||||
string& assign(const char* s, size_t n);
|
||||
string& assign(const char* s);
|
||||
string& assign(size_t n, char c);
|
||||
|
||||
string& insert(size_t pos1, const string& str);
|
||||
string& insert(size_t pos1, const string& str,
|
||||
size_t pos2, size_t n);
|
||||
string& insert(size_t pos, const char* s, size_t n);
|
||||
string& insert(size_t pos, const char* s);
|
||||
string& insert(size_t pos, size_t n, char c);
|
||||
iterator insert(iterator p, char c = char());
|
||||
void insert(iterator p, size_t n, char c);
|
||||
|
||||
string& erase(size_t pos = 0, size_t n = npos);
|
||||
iterator erase(iterator position);
|
||||
iterator erase(iterator first, iterator last);
|
||||
|
||||
string& replace(size_t pos1, size_t n1, const string& str);
|
||||
string& replace(size_t pos1, size_t n1, const string& str,
|
||||
size_t pos2, size_t n2);
|
||||
string& replace(size_t pos, size_t n1, const char* s, size_t n2);
|
||||
string& replace(size_t pos, size_t n1, const char* s);
|
||||
string& replace(size_t pos, size_t n1, size_t n2, char c);
|
||||
string& replace(iterator i1, iterator i2, const string& str);
|
||||
string& replace(iterator i1, iterator i2, const char* s, size_t n);
|
||||
string& replace(iterator i1, iterator i2, const char* s);
|
||||
string& replace(iterator i1, iterator i2, size_t n, char c);
|
||||
|
||||
size_t copy(char* s, size_t n, size_t pos = 0) const;
|
||||
void swap(string&);
|
||||
const char* c_str() const { return(s_ptr); }
|
||||
const char* data() const {
|
||||
if (s_len == 0) {
|
||||
s_ptr[0] = '\0';
|
||||
}
|
||||
return(s_ptr);
|
||||
}
|
||||
|
||||
size_t find (const string& str, size_t pos = 0) const;
|
||||
size_t find (const char* s, size_t pos, size_t n) const;
|
||||
size_t find (const char* s, size_t pos = 0) const;
|
||||
size_t find (char c, size_t pos = 0) const;
|
||||
size_t rfind(const string& str, size_t pos = npos) const;
|
||||
size_t rfind(const char* s, size_t pos, size_t n) const;
|
||||
size_t rfind(const char* s, size_t pos = npos) const;
|
||||
size_t rfind(char c, size_t pos = npos) const;
|
||||
|
||||
size_t find_first_of(const string& str, size_t pos = 0) const;
|
||||
size_t find_first_of(const char* s, size_t pos, size_t n) const;
|
||||
size_t find_first_of(const char* s, size_t pos = 0) const;
|
||||
size_t find_first_of(char c, size_t pos = 0) const;
|
||||
size_t find_last_of (const string& str, size_t pos = npos) const;
|
||||
size_t find_last_of (const char* s, size_t pos, size_t n) const;
|
||||
size_t find_last_of (const char* s, size_t pos = npos) const;
|
||||
size_t find_last_of (char c, size_t pos = npos) const;
|
||||
|
||||
size_t find_first_not_of(const string& str, size_t pos = 0) const;
|
||||
size_t find_first_not_of(const char* s, size_t pos, size_t n) const;
|
||||
size_t find_first_not_of(const char* s, size_t pos = 0) const;
|
||||
size_t find_first_not_of(char c, size_t pos = 0) const;
|
||||
size_t find_last_not_of (const string& str, size_t pos = npos) const;
|
||||
size_t find_last_not_of (const char* s, size_t pos, size_t n) const;
|
||||
size_t find_last_not_of (const char* s, size_t pos = npos) const;
|
||||
size_t find_last_not_of (char c, size_t pos = npos) const;
|
||||
|
||||
string substr(size_t pos = 0, size_t n = npos) const;
|
||||
int compare(const string& str) const;
|
||||
int compare(size_t pos1, size_t n1, const string& str) const;
|
||||
int compare(size_t pos1, size_t n1, const string& str,
|
||||
size_t pos2, size_t n2) const;
|
||||
int compare(const char* s) const;
|
||||
int compare(size_t pos1, size_t n1,
|
||||
const char* s, size_t n2 = npos) const;
|
||||
private:
|
||||
char *s_ptr;
|
||||
size_t s_len, s_res;
|
||||
void _ec2p_getmem(const char *s, size_t n, char c, bool flg=false);
|
||||
char *_ec2p_extmem(size_t n);
|
||||
static const char _ec2p_at;
|
||||
};
|
||||
#endif
|
|
@ -1,57 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = string : */
|
||||
/* FUNC = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* CLAS = UNIT ; */
|
||||
/* LINK = */
|
||||
/* NOTE = */
|
||||
/* ; */
|
||||
/* */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _STRING
|
||||
#define _STRING
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include <builtin.h>
|
||||
#endif
|
||||
extern void *memcpy(void *, const void *, size_t);
|
||||
extern void *memmove(void *, const void *, size_t);
|
||||
extern char *strcpy(char *, const char *);
|
||||
extern char *strncpy(char *, const char *, size_t);
|
||||
extern char *strcat(char *, const char *);
|
||||
extern char *strncat(char *, const char *,size_t);
|
||||
extern int memcmp(const void *, const void *,size_t);
|
||||
extern int strcmp(const char *, const char *);
|
||||
extern int strncmp(const char *, const char *, size_t);
|
||||
extern void *memchr(const void *, int, size_t);
|
||||
extern char *strchr(const char *, int);
|
||||
extern size_t strcspn(const char *, const char *);
|
||||
extern char *strpbrk(const char *, const char *);
|
||||
extern char *strrchr(const char *, int);
|
||||
extern size_t strspn(const char *, const char *);
|
||||
extern char *strstr(const char *, const char *);
|
||||
extern char *strtok(char *, const char *);
|
||||
extern void *memset(void *, int, size_t);
|
||||
extern char *strerror(int);
|
||||
extern size_t strlen(const char *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define strcpy(s1,s2) _builtin_strcpy(s1,s2)
|
||||
#define strcmp(s1,s2) _builtin_strcmp(s1,s2)
|
||||
|
||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 1.0 */
|
||||
/* Copyright (c) 1992 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/***********************************************************************/
|
||||
/* SPEC; */
|
||||
/* NAME = typeinfo.h : */
|
||||
/* */
|
||||
/* FUNC = Include file for type information (18.5.1) */
|
||||
/* */
|
||||
/* CLAS = UNIT; */
|
||||
/* */
|
||||
/* END; */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef _TYPEINFO_H
|
||||
#define _TYPEINFO_H
|
||||
|
||||
#include <stdexcept.h>
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
namespace std {
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
/*
|
||||
If bool is not supported, use a typedef for bool.
|
||||
*/
|
||||
#ifdef _BOOL
|
||||
typedef bool __bool;
|
||||
#else /* ifndef _BOOL */
|
||||
typedef int __bool;
|
||||
#endif /* ifdef _BOOL */
|
||||
|
||||
/* The following pragma is used so that the compiler knows that this definition
|
||||
of type_info is the one that corresponds to the type returned by typeid. */
|
||||
#pragma define_type_info
|
||||
class type_info {
|
||||
public:
|
||||
virtual ~type_info();
|
||||
__bool operator==(const type_info&) const;
|
||||
__bool operator!=(const type_info&) const;
|
||||
__bool before(const type_info&) const;
|
||||
const char* name() const;
|
||||
private:
|
||||
type_info& operator=(const type_info&); // Not actually defined
|
||||
protected:
|
||||
// Protected instead of private to suppress the "no accessible
|
||||
// constructor" warning
|
||||
type_info(const type_info&); // Not actually defined
|
||||
};
|
||||
|
||||
class bad_cast : public exception {
|
||||
public:
|
||||
bad_cast() throw();
|
||||
bad_cast(const bad_cast&) throw();
|
||||
bad_cast& operator=(const bad_cast&) throw();
|
||||
virtual ~bad_cast() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
class bad_typeid : public exception {
|
||||
public:
|
||||
bad_typeid() throw();
|
||||
bad_typeid(const bad_typeid&) throw();
|
||||
bad_typeid& operator=(const bad_typeid&) throw();
|
||||
virtual ~bad_typeid() throw();
|
||||
virtual const char* what() const throw();
|
||||
};
|
||||
|
||||
#ifdef __EDG_RUNTIME_USES_NAMESPACES
|
||||
} /* namespace std */
|
||||
|
||||
#ifdef __EDG_IMPLICIT_USING_STD
|
||||
/* Implicitly include a using directive for the STD namespace when this
|
||||
preprocessing flag is TRUE. */
|
||||
using namespace std;
|
||||
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
|
||||
|
||||
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
|
||||
|
||||
#endif /* _TYPEINFO_H */
|
|
@ -1,55 +0,0 @@
|
|||
/*------------------------------------------------------*/
|
||||
/* SH SERIES C Compiler Ver. 3.0 */
|
||||
/* Copyright (c) 1992, 1995 Hitachi,Ltd. */
|
||||
/* Licensed material of Hitachi,Ltd. */
|
||||
/*------------------------------------------------------*/
|
||||
/*****************************************************************/
|
||||
/* SPEC ; */
|
||||
/* NAME = umachine.h : */
|
||||
/* FUNC = ; */
|
||||
/* CLAS = UNIT ; */
|
||||
/* END ; */
|
||||
/*****************************************************************/
|
||||
#ifndef _UMACHINE
|
||||
#define _UMACHINE
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <builtin.h>
|
||||
#endif
|
||||
|
||||
#define set_gbr(base) _builtin_set_gbr(base)
|
||||
#define get_gbr() _builtin_get_gbr()
|
||||
#define gbr_read_byte(offset) _builtin_gbr_read_byte(offset)
|
||||
#define gbr_read_word(offset) _builtin_gbr_read_word(offset)
|
||||
#define gbr_read_long(offset) _builtin_gbr_read_long(offset)
|
||||
#define gbr_write_byte(offset,data) _builtin_gbr_write_byte(offset,data)
|
||||
#define gbr_write_word(offset,data) _builtin_gbr_write_word(offset,data)
|
||||
#define gbr_write_long(offset,data) _builtin_gbr_write_long(offset,data)
|
||||
#define gbr_and_byte(offset,mask) _builtin_gbr_and_byte(offset,mask)
|
||||
#define gbr_or_byte(offset,mask) _builtin_gbr_or_byte(offset,mask)
|
||||
#define gbr_xor_byte(offset,mask) _builtin_gbr_xor_byte(offset,mask)
|
||||
#define gbr_tst_byte(offset,mask) _builtin_gbr_tst_byte(offset,mask)
|
||||
#define tas(addr) _builtin_tas(addr)
|
||||
#define trapa(trap_no) _builtin_trapa(trap_no)
|
||||
#define macw(ptr1, ptr2, count) _builtin_macw(ptr1, ptr2, count)
|
||||
#define macwl(ptr1, ptr2, count, mask) _builtin_macwl(ptr1, ptr2, count, mask)
|
||||
#define macl(ptr1, ptr2, count) _builtin_macl(ptr1, ptr2, count)
|
||||
#define macll(ptr1, ptr2, count, mask) _builtin_macll(ptr1, ptr2, count, mask)
|
||||
#define trapa_svc _builtin_trapa_svc
|
||||
#define prefetch _builtin_prefetch
|
||||
#define set_fpscr(cr) _builtin_set_fpscr(cr)
|
||||
#define get_fpscr() _builtin_get_fpscr()
|
||||
#define fipr(vec1, vec2) _builtin_fipr(vec1, vec2)
|
||||
#define ftrv(vec1, vec2) _builtin_ftrv(vec1, vec2)
|
||||
#define ftrvadd(vec1, vec2, vec3) _builtin_ftrvadd(vec1, vec2, vec3)
|
||||
#define ftrvsub(vec1, vec2, vec3) _builtin_ftrvsub(vec1, vec2, vec3)
|
||||
#define mtrx4mul(mx1, mx2) _builtin_mtrx4mul(mx1, mx2)
|
||||
#define mtrx4muladd(mx1, mx2, mx3) _builtin_mtrx4muladd(mx1, mx2, mx3)
|
||||
#define mtrx4mulsub(mx1, mx2, mx3) _builtin_mtrx4mulsub(mx1, mx2, mx3)
|
||||
#define ld_ext(mx) _builtin_ld_ext(mx)
|
||||
#define st_ext(mx) _builtin_st_ext(mx)
|
||||
#define add4(vec1, vec2, vec3) _builtin_add4(vec1, vec2, vec3)
|
||||
#define sub4(vec1, vec2, vec3) _builtin_sub4(vec1, vec2, vec3)
|
||||
#define trace(tv) _builtin_trace(tv)
|
||||
|
||||
#endif
|
Binary file not shown.
After Width: | Height: | Size: 326 B |
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -1,34 +1,16 @@
|
|||
#include "fxlib.h"
|
||||
#include <fxlib.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "addresses.h"
|
||||
#include "Sound4Calc.h"
|
||||
#include <addresses.h>
|
||||
#include <Sound4Calc.h>
|
||||
|
||||
#include "syscall.h"
|
||||
#include <syscall.h>
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
#define PI 3.14159265358
|
||||
|
||||
/*#define SH7305_PJDR ((volatile unsigned char*)0xA4050130)
|
||||
#define SH7305_PJCR ((volatile unsigned short*)0xA4050110)
|
||||
#define SH7305_PUCR ((volatile unsigned short*)0xA4050142)
|
||||
#define SH7305_PUDR ((volatile unsigned char*)0xA4050162)
|
||||
#define SH7305_MSTPCR0 ((volatile unsigned int*)0xA4150030)
|
||||
#define SH7305_SCSCR ((volatile unsigned short*)0xA4410008)
|
||||
|
||||
//SH3 addresses
|
||||
#define SH7337_STBCR3 ((volatile unsigned int*)0xA40A0000)
|
||||
#define SH7337_SCSCR2 ((volatile unsigned int*)0xA4410008)
|
||||
#define SH7337_PGCR ((volatile unsigned int*)0xA400010C)
|
||||
#define SH7337_PLCR ((volatile unsigned int*)0xA4000114)
|
||||
#define SH7337_SCPCR ((volatile unsigned int*)0xA4000116)
|
||||
#define SH7337_PGDR ((volatile unsigned int*)0xA400012C)
|
||||
#define SH7337_SCPDR ((volatile unsigned int*)0xA4000136)*/
|
||||
|
||||
//typedef unsigned volatile;
|
||||
|
||||
char *itoa(int n, unsigned char* str, int base)
|
||||
{
|
||||
int i=1, j=0, x;
|
Loading…
Reference in New Issue