diff --git a/LICENSE.doominati b/LICENSE.doominati deleted file mode 100644 index bcdb36d..0000000 --- a/LICENSE.doominati +++ /dev/null @@ -1,340 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE 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. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/LICENSE.gdcc b/LICENSE.gdcc deleted file mode 100644 index fd5c35c..0000000 --- a/LICENSE.gdcc +++ /dev/null @@ -1,345 +0,0 @@ - -This program is licensed under the GNU General Public License version 2 as -described below. Permission is not granted for use under any other version. - -------------------------------------------------------------------------------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE 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. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/LICENSE.gdcc-lib b/LICENSE.gdcc-lib deleted file mode 100644 index 4362b49..0000000 --- a/LICENSE.gdcc-lib +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/LICENSE b/LICENSE.lithos3 similarity index 100% rename from LICENSE rename to LICENSE.lithos3 diff --git a/fonts/SmallFont/ɢ.png b/fonts/SmallFont/ɢ.png deleted file mode 100644 index cc525f1..0000000 Binary files a/fonts/SmallFont/ɢ.png and /dev/null differ diff --git a/fonts/SmallFont/ᴜ.png b/fonts/SmallFont/ᴜ.png deleted file mode 100644 index 5e26d9d..0000000 Binary files a/fonts/SmallFont/ᴜ.png and /dev/null differ diff --git a/fonts/SmallFont/♥.png b/fonts/SmallFont/♥.png deleted file mode 100644 index 4caaf63..0000000 Binary files a/fonts/SmallFont/♥.png and /dev/null differ diff --git a/fonts/SmallFont/、.png b/fonts/SmallFont/、.png deleted file mode 100644 index 60f3dc4..0000000 Binary files a/fonts/SmallFont/、.png and /dev/null differ diff --git a/fonts/SmallFont/。.png b/fonts/SmallFont/。.png deleted file mode 100644 index 7a3af9d..0000000 Binary files a/fonts/SmallFont/。.png and /dev/null differ diff --git a/fonts/SmallFont/〜.png b/fonts/SmallFont/〜.png deleted file mode 100644 index aa40fc2..0000000 Binary files a/fonts/SmallFont/〜.png and /dev/null differ diff --git a/fonts/SmallFont/え.png b/fonts/SmallFont/え.png deleted file mode 100644 index e8c5955..0000000 Binary files a/fonts/SmallFont/え.png and /dev/null differ diff --git a/fonts/SmallFont/が.png b/fonts/SmallFont/が.png deleted file mode 100644 index a90a517..0000000 Binary files a/fonts/SmallFont/が.png and /dev/null differ diff --git a/fonts/SmallFont/き.png b/fonts/SmallFont/き.png deleted file mode 100644 index 66e3d1b..0000000 Binary files a/fonts/SmallFont/き.png and /dev/null differ diff --git a/fonts/SmallFont/じ.png b/fonts/SmallFont/じ.png deleted file mode 100644 index b5a7772..0000000 Binary files a/fonts/SmallFont/じ.png and /dev/null differ diff --git a/fonts/SmallFont/ず.png b/fonts/SmallFont/ず.png deleted file mode 100644 index d835382..0000000 Binary files a/fonts/SmallFont/ず.png and /dev/null differ diff --git a/fonts/SmallFont/せ.png b/fonts/SmallFont/せ.png deleted file mode 100644 index 3658c7e..0000000 Binary files a/fonts/SmallFont/せ.png and /dev/null differ diff --git a/fonts/SmallFont/ぞ.png b/fonts/SmallFont/ぞ.png deleted file mode 100644 index ddf7939..0000000 Binary files a/fonts/SmallFont/ぞ.png and /dev/null differ diff --git a/fonts/SmallFont/た.png b/fonts/SmallFont/た.png deleted file mode 100644 index da6e4f3..0000000 Binary files a/fonts/SmallFont/た.png and /dev/null differ diff --git a/fonts/SmallFont/て.png b/fonts/SmallFont/て.png deleted file mode 100644 index 73e2b66..0000000 Binary files a/fonts/SmallFont/て.png and /dev/null differ diff --git a/fonts/SmallFont/ど.png b/fonts/SmallFont/ど.png deleted file mode 100644 index 0118cd5..0000000 Binary files a/fonts/SmallFont/ど.png and /dev/null differ diff --git a/fonts/SmallFont/な.png b/fonts/SmallFont/な.png deleted file mode 100644 index 7197f16..0000000 Binary files a/fonts/SmallFont/な.png and /dev/null differ diff --git a/fonts/SmallFont/に.png b/fonts/SmallFont/に.png deleted file mode 100644 index e72cd71..0000000 Binary files a/fonts/SmallFont/に.png and /dev/null differ diff --git a/fonts/SmallFont/ぬ.png b/fonts/SmallFont/ぬ.png deleted file mode 100644 index 9aa66fd..0000000 Binary files a/fonts/SmallFont/ぬ.png and /dev/null differ diff --git a/fonts/SmallFont/の.png b/fonts/SmallFont/の.png deleted file mode 100644 index 9fc64bf..0000000 Binary files a/fonts/SmallFont/の.png and /dev/null differ diff --git a/fonts/SmallFont/は.png b/fonts/SmallFont/は.png deleted file mode 100644 index ce1e2cb..0000000 Binary files a/fonts/SmallFont/は.png and /dev/null differ diff --git a/fonts/SmallFont/ひ.png b/fonts/SmallFont/ひ.png deleted file mode 100644 index 51615c7..0000000 Binary files a/fonts/SmallFont/ひ.png and /dev/null differ diff --git a/fonts/SmallFont/へ.png b/fonts/SmallFont/へ.png deleted file mode 100644 index ca8eef1..0000000 Binary files a/fonts/SmallFont/へ.png and /dev/null differ diff --git a/fonts/SmallFont/ほ.png b/fonts/SmallFont/ほ.png deleted file mode 100644 index 0fadbfc..0000000 Binary files a/fonts/SmallFont/ほ.png and /dev/null differ diff --git a/fonts/SmallFont/む.png b/fonts/SmallFont/む.png deleted file mode 100644 index 7a93531..0000000 Binary files a/fonts/SmallFont/む.png and /dev/null differ diff --git a/fonts/SmallFont/も.png b/fonts/SmallFont/も.png deleted file mode 100644 index 064d441..0000000 Binary files a/fonts/SmallFont/も.png and /dev/null differ diff --git a/fonts/SmallFont/ら.png b/fonts/SmallFont/ら.png deleted file mode 100644 index 6689f0e..0000000 Binary files a/fonts/SmallFont/ら.png and /dev/null differ diff --git a/fonts/SmallFont/り.png b/fonts/SmallFont/り.png deleted file mode 100644 index 1a93393..0000000 Binary files a/fonts/SmallFont/り.png and /dev/null differ diff --git a/fonts/SmallFont/る.png b/fonts/SmallFont/る.png deleted file mode 100644 index bc7a530..0000000 Binary files a/fonts/SmallFont/る.png and /dev/null differ diff --git a/fonts/SmallFont/れ.png b/fonts/SmallFont/れ.png deleted file mode 100644 index cbad6c2..0000000 Binary files a/fonts/SmallFont/れ.png and /dev/null differ diff --git a/fonts/SmallFont/を.png b/fonts/SmallFont/を.png deleted file mode 100644 index 1d4d271..0000000 Binary files a/fonts/SmallFont/を.png and /dev/null differ diff --git a/fonts/SmallFont/ァ.png b/fonts/SmallFont/ァ.png deleted file mode 100644 index 5216df7..0000000 Binary files a/fonts/SmallFont/ァ.png and /dev/null differ diff --git a/fonts/SmallFont/ア.png b/fonts/SmallFont/ア.png deleted file mode 100644 index 8442767..0000000 Binary files a/fonts/SmallFont/ア.png and /dev/null differ diff --git a/fonts/SmallFont/ィ.png b/fonts/SmallFont/ィ.png deleted file mode 100644 index 1170f1b..0000000 Binary files a/fonts/SmallFont/ィ.png and /dev/null differ diff --git a/fonts/SmallFont/イ.png b/fonts/SmallFont/イ.png deleted file mode 100644 index 88c687b..0000000 Binary files a/fonts/SmallFont/イ.png and /dev/null differ diff --git a/fonts/SmallFont/ゥ.png b/fonts/SmallFont/ゥ.png deleted file mode 100644 index c81d865..0000000 Binary files a/fonts/SmallFont/ゥ.png and /dev/null differ diff --git a/fonts/SmallFont/ウ.png b/fonts/SmallFont/ウ.png deleted file mode 100644 index 2ae2527..0000000 Binary files a/fonts/SmallFont/ウ.png and /dev/null differ diff --git a/fonts/SmallFont/ェ.png b/fonts/SmallFont/ェ.png deleted file mode 100644 index b3ce710..0000000 Binary files a/fonts/SmallFont/ェ.png and /dev/null differ diff --git a/fonts/SmallFont/エ.png b/fonts/SmallFont/エ.png deleted file mode 100644 index dda5828..0000000 Binary files a/fonts/SmallFont/エ.png and /dev/null differ diff --git a/fonts/SmallFont/ォ.png b/fonts/SmallFont/ォ.png deleted file mode 100644 index f88ca2b..0000000 Binary files a/fonts/SmallFont/ォ.png and /dev/null differ diff --git a/fonts/SmallFont/オ.png b/fonts/SmallFont/オ.png deleted file mode 100644 index b951d12..0000000 Binary files a/fonts/SmallFont/オ.png and /dev/null differ diff --git a/fonts/SmallFont/カ.png b/fonts/SmallFont/カ.png deleted file mode 100644 index 0d58ba1..0000000 Binary files a/fonts/SmallFont/カ.png and /dev/null differ diff --git a/fonts/SmallFont/キ.png b/fonts/SmallFont/キ.png deleted file mode 100644 index 71f84d2..0000000 Binary files a/fonts/SmallFont/キ.png and /dev/null differ diff --git a/fonts/SmallFont/ク.png b/fonts/SmallFont/ク.png deleted file mode 100644 index b2cdc74..0000000 Binary files a/fonts/SmallFont/ク.png and /dev/null differ diff --git a/fonts/SmallFont/ケ.png b/fonts/SmallFont/ケ.png deleted file mode 100644 index a3fc417..0000000 Binary files a/fonts/SmallFont/ケ.png and /dev/null differ diff --git a/fonts/SmallFont/コ.png b/fonts/SmallFont/コ.png deleted file mode 100644 index a952374..0000000 Binary files a/fonts/SmallFont/コ.png and /dev/null differ diff --git a/fonts/SmallFont/サ.png b/fonts/SmallFont/サ.png deleted file mode 100644 index d97e7fb..0000000 Binary files a/fonts/SmallFont/サ.png and /dev/null differ diff --git a/fonts/SmallFont/シ.png b/fonts/SmallFont/シ.png deleted file mode 100644 index 8d18ce5..0000000 Binary files a/fonts/SmallFont/シ.png and /dev/null differ diff --git a/fonts/SmallFont/ス.png b/fonts/SmallFont/ス.png deleted file mode 100644 index 9109cad..0000000 Binary files a/fonts/SmallFont/ス.png and /dev/null differ diff --git a/fonts/SmallFont/セ.png b/fonts/SmallFont/セ.png deleted file mode 100644 index 0f71d60..0000000 Binary files a/fonts/SmallFont/セ.png and /dev/null differ diff --git a/fonts/SmallFont/ソ.png b/fonts/SmallFont/ソ.png deleted file mode 100644 index 0e6998a..0000000 Binary files a/fonts/SmallFont/ソ.png and /dev/null differ diff --git a/fonts/SmallFont/タ.png b/fonts/SmallFont/タ.png deleted file mode 100644 index 68c4ed2..0000000 Binary files a/fonts/SmallFont/タ.png and /dev/null differ diff --git a/fonts/SmallFont/チ.png b/fonts/SmallFont/チ.png deleted file mode 100644 index ea96e0a..0000000 Binary files a/fonts/SmallFont/チ.png and /dev/null differ diff --git a/fonts/SmallFont/ッ.png b/fonts/SmallFont/ッ.png deleted file mode 100644 index 7958adf..0000000 Binary files a/fonts/SmallFont/ッ.png and /dev/null differ diff --git a/fonts/SmallFont/ツ.png b/fonts/SmallFont/ツ.png deleted file mode 100644 index bae77c6..0000000 Binary files a/fonts/SmallFont/ツ.png and /dev/null differ diff --git a/fonts/SmallFont/テ.png b/fonts/SmallFont/テ.png deleted file mode 100644 index 4a56e8c..0000000 Binary files a/fonts/SmallFont/テ.png and /dev/null differ diff --git a/fonts/SmallFont/ト.png b/fonts/SmallFont/ト.png deleted file mode 100644 index 1c6bfb4..0000000 Binary files a/fonts/SmallFont/ト.png and /dev/null differ diff --git a/fonts/SmallFont/ド.png b/fonts/SmallFont/ド.png deleted file mode 100644 index 1180bf6..0000000 Binary files a/fonts/SmallFont/ド.png and /dev/null differ diff --git a/fonts/SmallFont/ナ.png b/fonts/SmallFont/ナ.png deleted file mode 100644 index d72c218..0000000 Binary files a/fonts/SmallFont/ナ.png and /dev/null differ diff --git a/fonts/SmallFont/ニ.png b/fonts/SmallFont/ニ.png deleted file mode 100644 index 23680ac..0000000 Binary files a/fonts/SmallFont/ニ.png and /dev/null differ diff --git a/fonts/SmallFont/ヌ.png b/fonts/SmallFont/ヌ.png deleted file mode 100644 index 8cd8326..0000000 Binary files a/fonts/SmallFont/ヌ.png and /dev/null differ diff --git a/fonts/SmallFont/ネ.png b/fonts/SmallFont/ネ.png deleted file mode 100644 index e07d0c2..0000000 Binary files a/fonts/SmallFont/ネ.png and /dev/null differ diff --git a/fonts/SmallFont/ノ.png b/fonts/SmallFont/ノ.png deleted file mode 100644 index 028026e..0000000 Binary files a/fonts/SmallFont/ノ.png and /dev/null differ diff --git a/fonts/SmallFont/ハ.png b/fonts/SmallFont/ハ.png deleted file mode 100644 index c40ce29..0000000 Binary files a/fonts/SmallFont/ハ.png and /dev/null differ diff --git a/fonts/SmallFont/ヒ.png b/fonts/SmallFont/ヒ.png deleted file mode 100644 index 5551e48..0000000 Binary files a/fonts/SmallFont/ヒ.png and /dev/null differ diff --git a/fonts/SmallFont/フ.png b/fonts/SmallFont/フ.png deleted file mode 100644 index bcc90ba..0000000 Binary files a/fonts/SmallFont/フ.png and /dev/null differ diff --git a/fonts/SmallFont/ヘ.png b/fonts/SmallFont/ヘ.png deleted file mode 100644 index 90a880e..0000000 Binary files a/fonts/SmallFont/ヘ.png and /dev/null differ diff --git a/fonts/SmallFont/ホ.png b/fonts/SmallFont/ホ.png deleted file mode 100644 index 15de393..0000000 Binary files a/fonts/SmallFont/ホ.png and /dev/null differ diff --git a/fonts/SmallFont/マ.png b/fonts/SmallFont/マ.png deleted file mode 100644 index 22a8680..0000000 Binary files a/fonts/SmallFont/マ.png and /dev/null differ diff --git a/fonts/SmallFont/ミ.png b/fonts/SmallFont/ミ.png deleted file mode 100644 index bdd1cbf..0000000 Binary files a/fonts/SmallFont/ミ.png and /dev/null differ diff --git a/fonts/SmallFont/ム.png b/fonts/SmallFont/ム.png deleted file mode 100644 index d0db321..0000000 Binary files a/fonts/SmallFont/ム.png and /dev/null differ diff --git a/fonts/SmallFont/メ.png b/fonts/SmallFont/メ.png deleted file mode 100644 index d36921a..0000000 Binary files a/fonts/SmallFont/メ.png and /dev/null differ diff --git a/fonts/SmallFont/モ.png b/fonts/SmallFont/モ.png deleted file mode 100644 index 934ee0b..0000000 Binary files a/fonts/SmallFont/モ.png and /dev/null differ diff --git a/fonts/SmallFont/ャ.png b/fonts/SmallFont/ャ.png deleted file mode 100644 index 07df11d..0000000 Binary files a/fonts/SmallFont/ャ.png and /dev/null differ diff --git a/fonts/SmallFont/ヤ.png b/fonts/SmallFont/ヤ.png deleted file mode 100644 index e59a42e..0000000 Binary files a/fonts/SmallFont/ヤ.png and /dev/null differ diff --git a/fonts/SmallFont/ュ.png b/fonts/SmallFont/ュ.png deleted file mode 100644 index 5805db6..0000000 Binary files a/fonts/SmallFont/ュ.png and /dev/null differ diff --git a/fonts/SmallFont/ユ.png b/fonts/SmallFont/ユ.png deleted file mode 100644 index 62d13dc..0000000 Binary files a/fonts/SmallFont/ユ.png and /dev/null differ diff --git a/fonts/SmallFont/ョ.png b/fonts/SmallFont/ョ.png deleted file mode 100644 index c8f3638..0000000 Binary files a/fonts/SmallFont/ョ.png and /dev/null differ diff --git a/fonts/SmallFont/ヨ.png b/fonts/SmallFont/ヨ.png deleted file mode 100644 index 64df924..0000000 Binary files a/fonts/SmallFont/ヨ.png and /dev/null differ diff --git a/fonts/SmallFont/ラ.png b/fonts/SmallFont/ラ.png deleted file mode 100644 index 1e6090b..0000000 Binary files a/fonts/SmallFont/ラ.png and /dev/null differ diff --git a/fonts/SmallFont/リ.png b/fonts/SmallFont/リ.png deleted file mode 100644 index 6409fd3..0000000 Binary files a/fonts/SmallFont/リ.png and /dev/null differ diff --git a/fonts/SmallFont/ル.png b/fonts/SmallFont/ル.png deleted file mode 100644 index 14c98f4..0000000 Binary files a/fonts/SmallFont/ル.png and /dev/null differ diff --git a/fonts/SmallFont/レ.png b/fonts/SmallFont/レ.png deleted file mode 100644 index a7b7d06..0000000 Binary files a/fonts/SmallFont/レ.png and /dev/null differ diff --git a/fonts/SmallFont/ロ.png b/fonts/SmallFont/ロ.png deleted file mode 100644 index f849d6d..0000000 Binary files a/fonts/SmallFont/ロ.png and /dev/null differ diff --git a/fonts/SmallFont/ワ.png b/fonts/SmallFont/ワ.png deleted file mode 100644 index 15ae7eb..0000000 Binary files a/fonts/SmallFont/ワ.png and /dev/null differ diff --git a/fonts/SmallFont/ヲ.png b/fonts/SmallFont/ヲ.png deleted file mode 100644 index fa99043..0000000 Binary files a/fonts/SmallFont/ヲ.png and /dev/null differ diff --git a/fonts/SmallFont/ン.png b/fonts/SmallFont/ン.png deleted file mode 100644 index 161a968..0000000 Binary files a/fonts/SmallFont/ン.png and /dev/null differ diff --git a/fonts/SmallFont/・.png b/fonts/SmallFont/・.png deleted file mode 100644 index 385e91a..0000000 Binary files a/fonts/SmallFont/・.png and /dev/null differ diff --git a/fonts/SmallFont/ー.png b/fonts/SmallFont/ー.png deleted file mode 100644 index a7d11d6..0000000 Binary files a/fonts/SmallFont/ー.png and /dev/null differ diff --git a/fonts/SmallFont/世.png b/fonts/SmallFont/世.png deleted file mode 100644 index 9f00579..0000000 Binary files a/fonts/SmallFont/世.png and /dev/null differ diff --git a/fonts/SmallFont/今.png b/fonts/SmallFont/今.png deleted file mode 100644 index 69b4f99..0000000 Binary files a/fonts/SmallFont/今.png and /dev/null differ diff --git a/fonts/SmallFont/夢.png b/fonts/SmallFont/夢.png deleted file mode 100644 index aadf05c..0000000 Binary files a/fonts/SmallFont/夢.png and /dev/null differ diff --git a/fonts/SmallFont/奥.png b/fonts/SmallFont/奥.png deleted file mode 100644 index c012c59..0000000 Binary files a/fonts/SmallFont/奥.png and /dev/null differ diff --git a/fonts/SmallFont/山.png b/fonts/SmallFont/山.png deleted file mode 100644 index 82903a7..0000000 Binary files a/fonts/SmallFont/山.png and /dev/null differ diff --git a/fonts/SmallFont/常.png b/fonts/SmallFont/常.png deleted file mode 100644 index 1f652fb..0000000 Binary files a/fonts/SmallFont/常.png and /dev/null differ diff --git a/fonts/SmallFont/我.png b/fonts/SmallFont/我.png deleted file mode 100644 index 5127a1f..0000000 Binary files a/fonts/SmallFont/我.png and /dev/null differ diff --git a/fonts/SmallFont/散.png b/fonts/SmallFont/散.png deleted file mode 100644 index d770b8a..0000000 Binary files a/fonts/SmallFont/散.png and /dev/null differ diff --git a/fonts/SmallFont/日.png b/fonts/SmallFont/日.png deleted file mode 100644 index 8f59713..0000000 Binary files a/fonts/SmallFont/日.png and /dev/null differ diff --git a/fonts/SmallFont/有.png b/fonts/SmallFont/有.png deleted file mode 100644 index e492920..0000000 Binary files a/fonts/SmallFont/有.png and /dev/null differ diff --git a/fonts/SmallFont/浅.png b/fonts/SmallFont/浅.png deleted file mode 100644 index 50c695a..0000000 Binary files a/fonts/SmallFont/浅.png and /dev/null differ diff --git a/fonts/SmallFont/為.png b/fonts/SmallFont/為.png deleted file mode 100644 index 4edea46..0000000 Binary files a/fonts/SmallFont/為.png and /dev/null differ diff --git a/fonts/SmallFont/色.png b/fonts/SmallFont/色.png deleted file mode 100644 index 2401f89..0000000 Binary files a/fonts/SmallFont/色.png and /dev/null differ diff --git a/fonts/SmallFont/見.png b/fonts/SmallFont/見.png deleted file mode 100644 index 102241e..0000000 Binary files a/fonts/SmallFont/見.png and /dev/null differ diff --git a/fonts/SmallFont/越.png b/fonts/SmallFont/越.png deleted file mode 100644 index fd56f29..0000000 Binary files a/fonts/SmallFont/越.png and /dev/null differ diff --git a/fonts/SmallFont/酔.png b/fonts/SmallFont/酔.png deleted file mode 100644 index 3b1f4eb..0000000 Binary files a/fonts/SmallFont/酔.png and /dev/null differ diff --git a/fonts/SmallFont/(.png b/fonts/SmallFont/(.png deleted file mode 100644 index 240911d..0000000 Binary files a/fonts/SmallFont/(.png and /dev/null differ diff --git a/fonts/SmallFont/).png b/fonts/SmallFont/).png deleted file mode 100644 index 2097e4b..0000000 Binary files a/fonts/SmallFont/).png and /dev/null differ diff --git a/lithos_c/inc/Lth.h b/lithos_c/inc/Lth.h new file mode 100644 index 0000000..08d339a --- /dev/null +++ b/lithos_c/inc/Lth.h @@ -0,0 +1,35 @@ +//----------------------------------------------------------------------------- +// +// Copyright © 2016-2017 Project Golan +// +// See "LICENSE.lithos3" for more information. +// +//----------------------------------------------------------------------------- +// +// Main header file. +// +//----------------------------------------------------------------------------- + +#ifndef lithos3__Lth_h +#define lithos3__Lth_h + +// Types +#include "Lth_types.h" + +// stdlib (requires: Types) +#include "Lth_stdlib.h" + +// HashMap (requires: stdlib) +#include "Lth_hashmap.h" + +// Token (requires: stdlib) +#include "Lth_token.h" + +// TokenStream (requires: Token, stdlib) +#include "Lth_tokenstream.h" + +// Manifest (requires: TokenStream, HashMap) +#include "Lth_manifest.h" + +#endif//lithos3__Lth_h + diff --git a/lithos_c/lithos3/inc/Lth_hashmap.h b/lithos_c/inc/Lth_hashmap.h similarity index 79% rename from lithos_c/lithos3/inc/Lth_hashmap.h rename to lithos_c/inc/Lth_hashmap.h index 8e048f5..9715e02 100644 --- a/lithos_c/lithos3/inc/Lth_hashmap.h +++ b/lithos_c/inc/Lth_hashmap.h @@ -1,12 +1,10 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan, Team Doominati // -// See "LICENSE" for more information. +// Code by Team Doominati has been relicensed with consent. // -// Copyright © 2016 Team Doominati -// -// See "LICENSE.doominati" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -17,6 +15,11 @@ #ifndef lithos3__Lth_hashmap_h #define lithos3__Lth_hashmap_h +#include "Lth_stdlib.h" + +#include +#include + #define Lth_GenFind(hashexpr) \ Lth_HashMapElem *elem = Lth_HashFindItr(map, (hashexpr)); \ if(elem == NULL) return NULL; \ @@ -24,14 +27,14 @@ #define Lth_HashMapFind(map, expr) \ _Generic((expr)+0, \ - __str: Lth_HashMapFind_str, \ - char *: Lth_HashMapFind_char, \ - char const *: Lth_HashMapFind_char, \ - wchar_t *: Lth_HashMapFind_wchar, \ - wchar_t const *: Lth_HashMapFind_wchar, \ - size_t: Lth_HashMapFind_hash, \ - wchar_t: Lth_HashMapFind_hash, \ - int: Lth_HashMapFind_hash)((map), (expr)) + char __str_ars const *: Lth_HashMapFind_str, \ + char *: Lth_HashMapFind_char, \ + char const *: Lth_HashMapFind_char, \ + wchar_t *: Lth_HashMapFind_wchar, \ + wchar_t const *: Lth_HashMapFind_wchar, \ + size_t: Lth_HashMapFind_hash, \ + wchar_t: Lth_HashMapFind_hash, \ + int: Lth_HashMapFind_hash)((map), (expr)) // Type Definitions ----------------------------------------------------------| @@ -141,7 +144,8 @@ static inline void *Lth_HashMapFind_char(Lth_HashMap *map, char const *key) // // Lth_HashMapFind_str // -static inline void *Lth_HashMapFind_str(Lth_HashMap *map, __str key) +static inline void *Lth_HashMapFind_str(Lth_HashMap *map, + char __str_ars const *key) { Lth_GenFind(Lth_Hash_str(key)); } diff --git a/lithos_c/lithos3/inc/Lth_linklist.h b/lithos_c/inc/Lth_linklist.h similarity index 95% rename from lithos_c/lithos3/inc/Lth_linklist.h rename to lithos_c/inc/Lth_linklist.h index 3cac0b2..cb23d1e 100644 --- a/lithos_c/lithos3/inc/Lth_linklist.h +++ b/lithos_c/inc/Lth_linklist.h @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -16,22 +16,26 @@ #define Lth_ListForEach(tmpv, lst) \ for(Lth_LinkList *list = (lst); list; list = list->next) \ __with(tmpv = list->owner;) + #define Lth_ListFor(tmpv, lst) \ for(Lth_LinkList *list = (lst); list;) \ __with(Lth_LinkList *next = list->next, **prev = list->prev; \ tmpv = list->owner;) + #define Lth_ListInsert(list, object, head) \ (void) \ ( \ Lth_ListLink((list), (head)), \ (list)->owner = object \ ) + #define Lth_ListInsertTail(list, object, head, tail) \ (void) \ ( \ Lth_ListLinkTail((list), (head), (tail)), \ (list)->owner = object \ ) + #define Lth_ListMove(list, head) \ (void) \ ( \ diff --git a/lithos_c/lithos3/inc/Lth_manifest.h b/lithos_c/inc/Lth_manifest.h similarity index 81% rename from lithos_c/lithos3/inc/Lth_manifest.h rename to lithos_c/inc/Lth_manifest.h index f70c334..7afee83 100644 --- a/lithos_c/lithos3/inc/Lth_manifest.h +++ b/lithos_c/inc/Lth_manifest.h @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -13,6 +13,12 @@ #ifndef lithos3__Lth_manifest_h #define lithos3__Lth_manifest_h +#include "Lth_types.h" +#include "Lth_hashmap.h" + +#include +#include + #define Lth_ManifestNew(...) \ ((Lth_Manifest[]){ \ __VA_ARGS__, \ @@ -22,7 +28,7 @@ #define Lth_Resource(name, val) \ _Generic((val)+0, \ int: Lth_ManifestNew_Integ, \ - _Accum: Lth_ManifestNew_Fixed, \ + accum: Lth_ManifestNew_Fixed, \ char *: Lth_ManifestNew_Strng, \ char const *: Lth_ManifestNew_Strng)((name), (val)) @@ -45,13 +51,14 @@ typedef enum Lth_ResourceType // typedef struct Lth_Manifest { - int type; + int type; size_t keyhash; + union { - int integ; - _Accum fixed; - char *strng; + int integ; + accum fxval; + char *strng; }; } Lth_Manifest; @@ -61,7 +68,7 @@ typedef struct Lth_Manifest typedef struct Lth_ResourceMap { Lth_Vector(int) vecInteg; - Lth_Vector(_Accum) vecFixed; + Lth_Vector(accum) vecFixed; Lth_Vector(char *) vecStrng; Lth_HashMap map; } Lth_ResourceMap; @@ -75,7 +82,7 @@ Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_extern(char const *fname); Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_static(Lth_Manifest *manifest); Lth_Manifest Lth_ManifestNew_Integ(char const *key, int value); -Lth_Manifest Lth_ManifestNew_Fixed(char const *key, _Accum value); +Lth_Manifest Lth_ManifestNew_Fixed(char const *key, accum value); Lth_Manifest Lth_ManifestNew_Strng(char const *key, char const *value); #endif//lithos3__Lth_manifest_h diff --git a/lithos_c/lithos3/inc/Lth_stdlib.h b/lithos_c/inc/Lth_stdlib.h similarity index 82% rename from lithos_c/lithos3/inc/Lth_stdlib.h rename to lithos_c/inc/Lth_stdlib.h index 232a891..0616776 100644 --- a/lithos_c/lithos3/inc/Lth_stdlib.h +++ b/lithos_c/inc/Lth_stdlib.h @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -13,6 +13,14 @@ #ifndef lithos3__Lth_stdlib_h #define lithos3__Lth_stdlib_h +#include "Lth_types.h" + +#include +#include +#include +#include +#include + #define Lth_isidenti(c) \ (isalnum(c) || c == '_' || c == '$' || c == '\'' || c > 0x80) @@ -42,8 +50,8 @@ wchar_t *Lth_wcsdupstr(char const *s); size_t Lth_mbslen(char const *s); // accum -int Lth_ceilk(_Accum n); -_Accum Lth_fractk(_Accum n); +int Lth_ceilk(accum n); +accum Lth_fractk(accum n); // Print void Lth_PrintString(char const *s); diff --git a/lithos_c/lithos3/inc/Lth_token.h b/lithos_c/inc/Lth_token.h similarity index 93% rename from lithos_c/lithos3/inc/Lth_token.h rename to lithos_c/inc/Lth_token.h index b622b17..e4e8960 100644 --- a/lithos_c/lithos3/inc/Lth_token.h +++ b/lithos_c/inc/Lth_token.h @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -37,6 +37,8 @@ Lth_X(LnEnd ) // \n #elif !defined(lithos3__Lth_token_h) #define lithos3__Lth_token_h +#include + #define Lth_TokenSet(out, tok) \ ((out)->str = NULL, (out)->type = Lth_TOK_##tok) diff --git a/lithos_c/lithos3/inc/Lth_tokenstream.h b/lithos_c/inc/Lth_tokenstream.h similarity index 81% rename from lithos_c/lithos3/inc/Lth_tokenstream.h rename to lithos_c/inc/Lth_tokenstream.h index 15d6188..ee24770 100644 --- a/lithos_c/lithos3/inc/Lth_tokenstream.h +++ b/lithos_c/inc/Lth_tokenstream.h @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -13,6 +13,10 @@ #ifndef lithos3__Lth_tokenstream_h #define lithos3__Lth_tokenstream_h +#include "Lth_token.h" + +#include + // Type Definitions ----------------------------------------------------------| @@ -25,8 +29,8 @@ // filled // // read-write -// skipeol: Skip line end tokens. -// skipspc: Skip whitespace tokens. +// skipeol: Skip line end tokens. Defaults to true. +// skipspc: Skip whitespace tokens. Defaults to true. // typedef struct Lth_TokenStream { diff --git a/lithos_c/lithos3/inc/Lth_types.h b/lithos_c/inc/Lth_types.h similarity index 83% rename from lithos_c/lithos3/inc/Lth_types.h rename to lithos_c/inc/Lth_types.h index 2849cde..ae035b5 100644 --- a/lithos_c/lithos3/inc/Lth_types.h +++ b/lithos_c/inc/Lth_types.h @@ -1,12 +1,12 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // -// Basic type handling. +// Basic types and convenience macros. // //----------------------------------------------------------------------------- @@ -17,7 +17,7 @@ #define Lth_OptArgs(n) [[__optional_args(n)]] #define Lth_Inherits(name) [[__anonymous]] name _super -#define Lth_Mixin(name) [[__anonymous]] name _##name +#define Lth_Mixin(name) [[__anonymous]] name _##name #define Lth_Vector(type) struct { type *data; size_t size, bufsz; } #define Lth_VectorForEach(type, vec) \ @@ -38,17 +38,6 @@ typedef int Lth_HID; typedef char __str_ars const Lth__strchar; -// -// Lth_Signal -// -typedef enum Lth_Signal -{ -#define Lth_X(sig, name, ret, ...) \ - Lth_##sig, -#include "Lth_callback.h" - Lth_SIGMAX -} Lth_Signal; - // // Lth_Rect // diff --git a/lithos_c/lithos3/Makefile b/lithos_c/lithos3/Makefile deleted file mode 100644 index 3f195bc..0000000 --- a/lithos_c/lithos3/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -##----------------------------------------------------------------------------- -## -## Copyright © 2016 Project Golan -## -## See "LICENSE" for more information. -## -##----------------------------------------------------------------------------- -## -## Main Makefile. -## -##----------------------------------------------------------------------------- - -## -## Definitions -## - -## Compiler - -CC=gdcc-cc -LD=gdcc-ld -MAKELIB=gdcc-makelib - -## Directories - -BIN=../../acs -SRC=src -INC=inc -IR=../bin - -## Compiler flags - -TARGET=--bc-target=ZDoom -LFLAGS=$(TARGET) --bc-zdacs-init-delay --bc-zdacs-chunk-STRE -CFLAGS=$(TARGET) -iinc -ALLOCMIN=--alloc-min Sta "" - -## Sources - -SOURCES= \ - $(SRC)/context.c \ - $(SRC)/control.c \ - $(SRC)/draw.c \ - $(SRC)/fontrun.c \ - $(SRC)/fontnew.c \ - $(SRC)/main.c \ - $(SRC)/manifest.c \ - $(SRC)/stdlib.c \ - $(SRC)/token.c \ - $(SRC)/tokenstream.c \ - $(SRC)/window.c \ - $(SRC)/winman.c - -HEADERS= \ - $(INC)/Lth.h \ - $(INC)/Lth_assert.h \ - $(INC)/Lth_callback.h \ - $(INC)/Lth_context.h \ - $(INC)/Lth_control.h \ - $(INC)/Lth_draw.h \ - $(INC)/Lth_font.h \ - $(INC)/Lth_hashmap.h \ - $(INC)/Lth_linklist.h \ - $(INC)/Lth_manifest.h \ - $(INC)/Lth_stdfix.h \ - $(INC)/Lth_stdlib.h \ - $(INC)/Lth_token.h \ - $(INC)/Lth_tokenstream.h \ - $(INC)/Lth_types.h \ - $(INC)/Lth_window.h \ - $(INC)/Lth_winman.h - -## Output - -OUTPUT=$(SOURCES:$(SRC)/%.c=$(IR)/%.ir) - -## -## Rules -## - -## all - -all: $(BIN)/lithos3.bin - -## bin/lithos3.bin - -$(BIN)/lithos3.bin: $(OUTPUT) $(IR)/libc.ir $(IR)/libGDCC.ir - $(LD) $(LFLAGS) $(ALLOCMIN) 7000000000 $^ -o $@ - -## ir/*.ir - -$(IR)/%.ir: $(SRC)/%.c $(HEADERS) - $(CC) $(CFLAGS) -c $< -o $@ - -## irlib/lib*.ir - -$(IR)/libc.ir: - $(MAKELIB) $(TARGET) -c libc -o $@ - -$(IR)/libGDCC.ir: - $(MAKELIB) $(TARGET) -c libGDCC -o $@ - -## EOF diff --git a/lithos_c/lithos3/inc/Lth.h b/lithos_c/lithos3/inc/Lth.h deleted file mode 100644 index ffb579b..0000000 --- a/lithos_c/lithos3/inc/Lth.h +++ /dev/null @@ -1,62 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Main header file. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_h -#define lithos3__Lth_h - -#include "Lth_stdfix.h" -#include -#include -#include -#include -#include - -#include - -// Types, Assert -#include "Lth_types.h" -#include "Lth_assert.h" - -// stdlib -#include "Lth_stdlib.h" - -// LinkList, HashMap -#include "Lth_linklist.h" -#include "Lth_hashmap.h" - -// Token -#include "Lth_token.h" - -// TokenStream -#include "Lth_tokenstream.h" - -// Manifest -#include "Lth_manifest.h" - -// Context -#include "Lth_context.h" - -// Draw -#include "Lth_draw.h" - -// Font -#include "Lth_font.h" - -// Control -#include "Lth_callback.h" -#include "Lth_control.h" - -// Control Types -#include "Lth_window.h" -#include "Lth_winman.h" - -#endif//lithos3__Lth_h diff --git a/lithos_c/lithos3/inc/Lth_assert.h b/lithos_c/lithos3/inc/Lth_assert.h deleted file mode 100644 index 9093de2..0000000 --- a/lithos_c/lithos3/inc/Lth_assert.h +++ /dev/null @@ -1,27 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Assertions. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_assert_h -#define lithos3__Lth_assert_h - -#ifdef NDEBUG -#define Lth_assert(expression) ((void)0) -#else -#define Lth_assert(expression) \ - if(!(expression)) \ - fprintf(stderr, "[lithos3] Assertion failed in %s (%s:%i): %s\n", \ - __func__, __FILE__, __LINE__, #expression); \ - else \ - ((void)0) -#endif - -#endif//lithos3__Lth_assert_h diff --git a/lithos_c/lithos3/inc/Lth_callback.h b/lithos_c/lithos3/inc/Lth_callback.h deleted file mode 100644 index 0f825d8..0000000 --- a/lithos_c/lithos3/inc/Lth_callback.h +++ /dev/null @@ -1,74 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Callbacks. -// -// If an x-macro is defined, this file will give info about callback types. -// Format: (sig, name, ret, arguments...) -// sig - Signal name. -// name - Identifier. -// ret - Return value of callback. -// arguments - Arguments of callback (vararg). -// -//----------------------------------------------------------------------------- - -#if defined(Lth_X) - -Lth_X(SigDestroy, destroy, void, struct Lth_Control *) -Lth_X(SigClicked, click, void, struct Lth_Control *) -Lth_X(SigDraw , draw, void, struct Lth_Control *) -Lth_X(SigDrawPst, drawpost, void, struct Lth_Control *) -Lth_X(SigUpdate , update, void, struct Lth_Control *) - -#undef Lth_X - -#elif !defined(lithos3__Lth_callback_h) -#define lithos3__Lth_callback_h - -#define Lth_Callback(name) ((Lth_Callback_t)(name)) - -#define Lth_Call(name, ...) \ - do \ - { \ - if((name).data != NULL) \ - for(size_t cbIter = 0; cbIter < (name).size; cbIter++) \ - (name).data[cbIter](__VA_ARGS__); \ - } \ - while(0) - -#define Lth_CallReverse(name, ...) \ - do \ - { \ - if((name).data != NULL) \ - for(size_t cbIter = (name).size; cbIter > 0; cbIter--) \ - (name).data[cbIter - 1](__VA_ARGS__); \ - } \ - while(0) - - -// Type Definitions ----------------------------------------------------------| - -struct Lth_Control; - -typedef void (*Lth_Callback_t)(void); - -#define Lth_X(sig, name, ret, ...) \ - typedef ret (*Lth_##sig##_t)(__VA_ARGS__); -#include "Lth_callback.h" - -// -// Lth_CallbackSet -// -typedef struct Lth_CallbackSet -{ -#define Lth_X(sig, name, ret, ...) \ - Lth_Vector(Lth_##sig##_t) name; -#include "Lth_callback.h" -} Lth_CallbackSet; - -#endif//lithos3__Lth_callback_h diff --git a/lithos_c/lithos3/inc/Lth_context.h b/lithos_c/lithos3/inc/Lth_context.h deleted file mode 100644 index 185e9d7..0000000 --- a/lithos_c/lithos3/inc/Lth_context.h +++ /dev/null @@ -1,72 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Context for drawing. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_context_h -#define lithos3__Lth_context_h - -#define Lth_ContextManifestLoad_extern(ctx, ...) \ - ( \ - ((ctx)->rsrc ? (Lth_ResourceMapDestroy((ctx)->rsrc)) : (void)0), \ - (ctx)->rsrc = Lth_ManifestLoad_extern(__VA_ARGS__) \ - ) - -#define Lth_ContextManifestLoad_static(ctx, ...) \ - ( \ - ((ctx)->rsrc ? (Lth_ResourceMapDestroy((ctx)->rsrc)) : (void)0), \ - (ctx)->rsrc = Lth_ManifestLoad_static(__VA_ARGS__) \ - ) - - -// Type Definitions ----------------------------------------------------------| - -// -// Lth_Context -// -// internal data -// clip -// rsrcBase -// rsrc -// -// read-only -// scale: current draw scale -// w: width of screen -// h: height of screen -// -// read-write -// hid: HUD ID range -// -typedef struct Lth_Context -{ - struct { Lth_Rect rects[16]; size_t num; } clip; - Lth_ResourceMap *rsrcBase, *rsrc; - - _Accum scale; - int w, h; - - Lth_HIDRange hid; -} Lth_Context; - - -// Extern Functions ----------------------------------------------------------| - -Lth_Context *Lth_ContextNew(int w, int h, Lth_HID hidBase, Lth_HID hidEnd); -void Lth_ContextDestroy(Lth_Context *ctx); -void Lth_ContextRun(Lth_Context *ctx); - -void Lth_ContextClipPush(Lth_Context *ctx, int x, int y, int w, int h); -void Lth_ContextClipPop(Lth_Context *ctx); - -void *Lth_ContextResource(Lth_Context *ctx, char const *key); - -void Lth_ContextScale(Lth_Context *ctx, _Accum s); - -#endif//lithos3__Lth_context_h diff --git a/lithos_c/lithos3/inc/Lth_control.h b/lithos_c/lithos3/inc/Lth_control.h deleted file mode 100644 index ef7254b..0000000 --- a/lithos_c/lithos3/inc/Lth_control.h +++ /dev/null @@ -1,82 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Controls. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_control_h -#define lithos3__Lth_control_h - -#define Lth_ControlFontRunPlain(ctrl, ...) \ - Lth_FontRunPlain((ctrl)->ctx, Lth_ControlFont((ctrl)), __VA_ARGS__) - -#define Lth_ControlInit(type) \ - type *ctrl = calloc(1, sizeof(type)); \ - Lth_assert(ctrl != NULL); \ - \ - ctrl->ctx = ctx - -#define Lth_VirtControl (void *)ctrl - - -// Type Definitions ----------------------------------------------------------| - -// -// Lth_Control -// -// Has members of Lth_Rect (read-write). -// -// internal data -// cb -// descHead -// descTail -// link -// -// read-only -// vtable: virtual functions for overrides -// parent: control's parent (NULL if none) -// -// read-write -// ctx: pointer to associated context -// font: default font for drawing -// userdata: opaque pointer for the user to use -// -// -typedef struct Lth_Control -{ - Lth_CallbackSet cb; - - struct - { - Lth_Font *(*getFont)(struct Lth_Control *); - } vtable; - - Lth_LinkList *descHead, *descTail, link; - - struct Lth_Control *parent; - - Lth_Context *ctx; - Lth_Font *font; - void *userdata; - - Lth_Mixin(Lth_Rect); -} Lth_Control; - - -// Extern Functions ----------------------------------------------------------| - -void Lth_ControlRun(void *ctrl_); -void Lth_ControlConnect(void *ctrl_, Lth_Signal signal, Lth_Callback_t cb); -void Lth_ControlDestroy(void *ctrl_); -void Lth_ControlAttach(void *ctrl_, void *ctrlS_); -void Lth_ControlAttachTail(void *ctrl_, void *ctrlS_); - -Lth_Font *Lth_ControlFont(void *ctrl_); - -#endif//lithos3__Lth_control_h diff --git a/lithos_c/lithos3/inc/Lth_draw.h b/lithos_c/lithos3/inc/Lth_draw.h deleted file mode 100644 index 41c58ef..0000000 --- a/lithos_c/lithos3/inc/Lth_draw.h +++ /dev/null @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Drawing. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_draw_h -#define lithos3__Lth_draw_h - -#define Lth_HudMessageBegin() ACS_BeginPrint() - -#define Lth_TICK (0.029k) // One gametic, in seconds. - -#define Lth_A_Cen (0.0k) -#define Lth_A_Lef (0.1k) -#define Lth_A_Rig (0.2k) -#define Lth_A_Top (0.1k) -#define Lth_A_Bot (0.2k) -#define Lth_A_TCe (0.4k) -#define Lth_A_TLe (0.5k) -#define Lth_A_TRi (0.6k) - - -// Extern Functions ----------------------------------------------------------| - -Lth_OptArgs(1) void Lth_HudMessageEnd(Lth_Context *ctx, _Accum x, _Accum y, _Accum a); -Lth_OptArgs(1) void Lth_DrawSprite(Lth_Context *ctx, __str name, _Accum x, _Accum y, _Accum a); - -void Lth_DrawRectAndClip(Lth_Context *ctx, int x, int y, int w, int h, _Accum alpha); -void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, _Accum alpha); - -#endif//lithos3__Lth_draw_h diff --git a/lithos_c/lithos3/inc/Lth_font.h b/lithos_c/lithos3/inc/Lth_font.h deleted file mode 100644 index 2b9d252..0000000 --- a/lithos_c/lithos3/inc/Lth_font.h +++ /dev/null @@ -1,89 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Font layout handling. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_font_h -#define lithos3__Lth_font_h - -#define Lth_FontRunBegin() ACS_BeginPrint() - - -// Type Definitions ----------------------------------------------------------| - -struct Lth_Context; - -enum -{ - Lth_AX_Lef = 1, - Lth_AX_Rig, - Lth_AX_Cen, - - Lth_AY_Top = 1, - Lth_AY_Bot, - Lth_AY_Cen -}; - -// -// Lth_FontCasing -// -typedef enum Lth_FontCasing -{ - Lth_Case_Both, - Lth_Case_Uppr, - Lth_Case_Lowr -} Lth_FontCasing; - -// -// Lth_GlyphLookupType -// -typedef enum Lth_GlyphLookupType -{ - Lth_GT_Chara, - Lth_GT_Codep, - Lth_GT_Digit -} Lth_GlyphLookupType; - -// -// Lth_Glyph -// -typedef struct Lth_Glyph -{ - Lth_Inherits(Lth_Rect); - __str fname; - _Accum s; - wchar_t ch; - char mb[MB_CUR_MAX + 1]; -} Lth_Glyph; - -// -// Lth_Font -// -typedef struct Lth_Font -{ - Lth_FontCasing casing; - __str baseName; - int spaceWidth; - int height; - __str fnamePref; - __str fnameSuff; - Lth_HashMap glyphs; - Lth_Vector(Lth_Glyph) glyphV; -} Lth_Font; - - -// Extern Functions ----------------------------------------------------------| - -Lth_ScriptCall Lth_Font *Lth_FontNew(char const *fname); -void Lth_FontDestroy(Lth_Font *font); - -Lth_OptArgs(2) void Lth_FontRunPlain(struct Lth_Context *ctx, Lth_Font *font, int x, int y, int ax, int ay); - -#endif//lithos3__Lth_font_h diff --git a/lithos_c/lithos3/inc/Lth_stdfix.h b/lithos_c/lithos3/inc/Lth_stdfix.h deleted file mode 100644 index 30b8a6f..0000000 --- a/lithos_c/lithos3/inc/Lth_stdfix.h +++ /dev/null @@ -1,20 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Define fixed because it breaks our code. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_stdfix_h -#define lithos3__Lth_stdfix_h - -#define fixed -#include -#undef fixed - -#endif//lithos3__Lth_stdfix_h diff --git a/lithos_c/lithos3/inc/Lth_window.h b/lithos_c/lithos3/inc/Lth_window.h deleted file mode 100644 index fb583bf..0000000 --- a/lithos_c/lithos3/inc/Lth_window.h +++ /dev/null @@ -1,39 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Window control. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_window_h -#define lithos3__Lth_window_h - - -// Type Definitions ----------------------------------------------------------| - -// -// Lth_Window -// -// Inherits Lth_Control (read-write). -// -// read-only -// title: title of window (see also: Lth_WindowSetTitle) -// -typedef struct Lth_Window -{ - Lth_Inherits(Lth_Control); - char *title; -} Lth_Window; - - -// Extern Functions ----------------------------------------------------------| - -Lth_OptArgs(2) Lth_Window *Lth_WindowNew(Lth_Context *ctx, char const *title, int x, int y, int w, int h); -void Lth_WindowSetTitle(Lth_Window *ctrl, char const *title); - -#endif//lithos3__Lth_window_h diff --git a/lithos_c/lithos3/inc/Lth_winman.h b/lithos_c/lithos3/inc/Lth_winman.h deleted file mode 100644 index 05377d1..0000000 --- a/lithos_c/lithos3/inc/Lth_winman.h +++ /dev/null @@ -1,45 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Window management. -// -//----------------------------------------------------------------------------- - -#ifndef lithos3__Lth_winman_h -#define lithos3__Lth_winman_h - - -// Type Definitions ----------------------------------------------------------| - -// -// Lth_WindowManager -// -// Inherits Lth_Control (read-write) -// -// internal data -// lastmap -// -// read-write -// mapspace: space between newly mapped windows that are auto-positioned -// -typedef struct Lth_WindowManager -{ - Lth_Inherits(Lth_Control); - - Lth_IVec2 lastmap; - - Lth_IVec2 mapspace; -} Lth_WindowManager; - - -// Extern Functions ----------------------------------------------------------| - -Lth_WindowManager *Lth_WMNew(Lth_Context *ctx); -void Lth_WMMap(Lth_WindowManager *wm, Lth_Window *window); - -#endif//lithos3__Lth_winman_h diff --git a/lithos_c/lithos3/src/context.c b/lithos_c/lithos3/src/context.c deleted file mode 100644 index 40d3f7f..0000000 --- a/lithos_c/lithos3/src/context.c +++ /dev/null @@ -1,114 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Context functions. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_ContextNew -// -Lth_Context *Lth_ContextNew(int w, int h, Lth_HID hidBase, Lth_HID hidEnd) -{ - Lth_Context *ctx = calloc(1, sizeof(Lth_Context)); - - ctx->scale = 1.0k; - ctx->w = w; - ctx->h = h; - ctx->hid.cur = ctx->hid.base = hidBase; - ctx->hid.end = hidEnd; - - ctx->rsrcBase = Lth_ManifestLoad_static(Lth_ManifestNew( - Lth_Resource("Base.DefaultFont", "lithos_fs/Fonts/SmallFontJP.lthm") - )); - - return ctx; -} - -// -// Lth_ContextDestroy -// -void Lth_ContextDestroy(Lth_Context *ctx) -{ - if(ctx == NULL) return; - - Lth_ResourceMapDestroy(ctx->rsrc); - Lth_ResourceMapDestroy(ctx->rsrcBase); - - free(ctx); -} - -// -// Lth_ContextRun -// -void Lth_ContextRun(Lth_Context *ctx) -{ - Lth_Rect rect = ctx->clip.rects[ctx->clip.num]; - - ACS_SetHudSize(ctx->w, ctx->h, true); - ACS_SetHudClipRect(rect.x, rect.y, rect.w, rect.h); - - ctx->hid.cur = ctx->hid.base; -} - -// -// Lth_ContextClipPush -// -void Lth_ContextClipPush(Lth_Context *ctx, int x, int y, int w, int h) -{ - Lth_Rect rect = ctx->clip.rects[ctx->clip.num++]; - - if(!(rect.x == 0 && rect.y == 0 && rect.w == 0 && rect.h == 0)) - { - if(rect.x < x) rect.x = x; - if(rect.y < y) rect.y = y; - if(rect.x + rect.w > x + w) rect.w = w; - if(rect.y + rect.h > y + h) rect.h = h; - } - else - rect = (Lth_Rect){ x, y, w, h }; - - ctx->clip.rects[ctx->clip.num] = rect; - ACS_SetHudClipRect(rect.x, rect.y, rect.w, rect.h); -} - -// -// Lth_ContextClipPop -// -void Lth_ContextClipPop(Lth_Context *ctx) -{ - Lth_Rect rect = ctx->clip.rects[--ctx->clip.num]; - ACS_SetHudClipRect(rect.x, rect.y, rect.w, rect.h); -} - -// -// Lth_ContextResource -// -void *Lth_ContextResource(Lth_Context *ctx, char const *key) -{ - void *p = NULL; - if(ctx->rsrc) p = Lth_HashMapFind(&ctx->rsrc->map, key); - if(p) return p; - else return Lth_HashMapFind(&ctx->rsrcBase->map, key); -} - -// -// Lth_ContextScale -// -void Lth_ContextScale(Lth_Context *ctx, _Accum s) -{ - ctx->scale = s; - ACS_SetHudSize(ctx->w / ctx->scale, ctx->h / ctx->scale, true); -} - -// EOF diff --git a/lithos_c/lithos3/src/control.c b/lithos_c/lithos3/src/control.c deleted file mode 100644 index e2dfc27..0000000 --- a/lithos_c/lithos3/src/control.c +++ /dev/null @@ -1,120 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Control functions. -// -// # of rewrites because of DavidPH: 2 -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - -#include - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_ControlRun -// -void Lth_ControlRun(void *ctrl_) -{ - Lth_Control *ctrl = ctrl_; - - Lth_ListForEach(Lth_Control *owner, ctrl->descHead) - Lth_ControlRun(owner); - - Lth_Call(ctrl->cb.update, ctrl); - Lth_Call(ctrl->cb.draw, ctrl); - Lth_Call(ctrl->cb.drawpost, ctrl); -} - -// -// Lth_ControlConnect -// -void Lth_ControlConnect(void *ctrl_, Lth_Signal signal, Lth_Callback_t cb) -{ - Lth_assert(signal < Lth_SIGMAX && signal >= 0); - - Lth_Control *ctrl = ctrl_; - - switch(signal) - { -#define Lth_X(sig, name, ret, ...) \ - case Lth_##sig: \ - ctrl->cb.name.data = realloc(ctrl->cb.name.data, \ - sizeof(Lth_##sig##_t) * (ctrl->cb.name.size + 1)); \ - ctrl->cb.name.data[ctrl->cb.name.size++] = (Lth_##sig##_t)cb; \ - break; -#include "Lth_callback.h" - } -} - -// -// Lth_ControlDestroy -// -void Lth_ControlDestroy(void *ctrl_) -{ - if(ctrl_ == NULL) return; - - Lth_Control *ctrl = ctrl_; - - Lth_ListFor(Lth_Control *owner, ctrl->descHead) - { - Lth_ControlDestroy(owner); - list = next; - } - - Lth_CallReverse(ctrl->cb.destroy, ctrl); - Lth_ListRemove(&ctrl->link); - -#define Lth_X(sig, name, ret, ...) \ - free(ctrl->cb.name.data); -#include "Lth_callback.h" - - free(ctrl); -} - -// -// Lth_ControlAttach -// -void Lth_ControlAttach(void *ctrl_, void *ctrlS_) -{ - Lth_Control *ctrl = ctrl_, *ctrlS = ctrlS_; - Lth_ListInsert(&ctrlS->link, ctrlS, &ctrl->descHead); - ctrlS->ctx = ctrl->ctx; - ctrlS->parent = ctrl; -} - -// -// Lth_ControlAttachTail -// -void Lth_ControlAttachTail(void *ctrl_, void *ctrlS_) -{ - Lth_Control *ctrl = ctrl_, *ctrlS = ctrlS_; - Lth_ListInsertTail(&ctrlS->link, ctrlS, &ctrl->descHead, &ctrl->descTail); - ctrlS->ctx = ctrl->ctx; - ctrlS->parent = ctrl; -} - -// -// Lth_ControlFont -// -Lth_Font *Lth_ControlFont(void *ctrl_) -{ - Lth_Control *ctrl = ctrl_; - - if(ctrl->font || (ctrl->vtable.getFont && ctrl->vtable.getFont(ctrl))) - return ctrl->font; - else if(ctrl->parent) - return Lth_ControlFont(ctrl->parent); - else - return NULL; -} - -// EOF diff --git a/lithos_c/lithos3/src/draw.c b/lithos_c/lithos3/src/draw.c deleted file mode 100644 index e56b48e..0000000 --- a/lithos_c/lithos3/src/draw.c +++ /dev/null @@ -1,76 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Context drawing functions. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_HudMessageEnd -// -void Lth_HudMessageEnd(Lth_Context *ctx, _Accum x, _Accum y, _Accum a) -{ - int flags = HUDMSG_PLAIN | HUDMSG_NOTWITHFULLMAP; - - if(ctx->scale != 1) - { - long _Accum xn = (int)x / (long _Accum)ctx->w; - long _Accum yn = (int)y / (long _Accum)ctx->h; - x = (xn * (ctx->w / ctx->scale)) + Lth_fractk(x); - y = (yn * (ctx->h / ctx->scale)) + Lth_fractk(y); - } - - if(a) flags |= HUDMSG_ALPHA; - - ACS_MoreHudMessage(); - ACS_OptHudMessage(flags, ctx->hid.cur--, CR_UNTRANSLATED, x, y, Lth_TICK); - if(a) ACS_EndHudMessage(a); - else ACS_EndHudMessage(); -} - -// -// Lth_DrawSprite -// -void Lth_DrawSprite(Lth_Context *ctx, __str name, _Accum x, _Accum y, _Accum a) -{ - ACS_SetFont(name); - - Lth_HudMessageBegin(); - ACS_PrintChar('A'); - Lth_HudMessageEnd(ctx, x, y, a); -} - -// -// Lth_DrawRectAndClip -// -void Lth_DrawRectAndClip(Lth_Context *ctx, int x, int y, int w, int h, - _Accum alpha) -{ - Lth_ContextClipPush(ctx, x, y, w, h); - - for(int ix = 0; ix < w; ix += 128) - for(int iy = 0; iy < h; iy += 128) - Lth_DrawSprite(ctx, s"lithos_gfx/Base/Black128.png", - x + ix + Lth_A_Lef, y + iy + Lth_A_Top, alpha); -} - -// -// Lth_DrawRect -// -void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, _Accum alpha) -{ - Lth_DrawRectAndClip(ctx, x, y, w, h, alpha); - Lth_ContextClipPop(ctx); -} - -// EOF diff --git a/lithos_c/lithos3/src/fontnew.c b/lithos_c/lithos3/src/fontnew.c deleted file mode 100644 index 9006614..0000000 --- a/lithos_c/lithos3/src/fontnew.c +++ /dev/null @@ -1,250 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Font creation. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - -#include -#include -#include - -#define GenFontData() \ - char const **base = Lth_HashMapFind(&rsrc->map, "Font.Base"); \ - char const **casing = Lth_HashMapFind(&rsrc->map, "Font.Case"); \ - char const **extraDir = Lth_HashMapFind(&rsrc->map, "Font.ExtraDir"); \ - char const **glyphList = Lth_HashMapFind(&rsrc->map, "Font.Glyphs"); \ - int const *height = Lth_HashMapFind(&rsrc->map, "Font.Height"); \ - char const **prefix = Lth_HashMapFind(&rsrc->map, "Font.Prefix"); \ - int const *spaceWidth = Lth_HashMapFind(&rsrc->map, "Font.SpaceWidth"); \ - char const **suffix = Lth_HashMapFind(&rsrc->map, "Font.Suffix"); \ - char const **typeStr = Lth_HashMapFind(&rsrc->map, "Font.Type"); - -#define FontError(err) \ - if(1) \ - { \ - fprintf(stderr, "%s: %s\n", __func__, err); \ - longjmp(FontJmpBuf, FontJmpBufToken); \ - } \ - else ((void)0) - - -// Static Objects ------------------------------------------------------------| - -static jmp_buf FontJmpBuf; -static int const FontJmpBufToken = 31; - - -// Static Functions ----------------------------------------------------------| - -// -// FontValidate -// -static void FontValidate(Lth_ResourceMap *rsrc) -{ - GenFontData(); - - if(!glyphList) FontError("Font definition must have a glyph list."); - if(!base && !extraDir) FontError("Font definition doesn't have a font."); - if(!height) FontError("Font definition doesn't have a height."); -} - -// -// FontLoadGlyphs -// -static void FontLoadGlyphs(Lth_Font volatile *font, Lth_ResourceMap *rsrc, - int type) -{ - char const **glyphList = Lth_HashMapFind(&rsrc->map, "Font.Glyphs"); - - wchar_t *tmpkey = Lth_wcsdup(L"Font.GlyphData. _ "); - wchar_t *keyl = wcschr(tmpkey, ' '); - wchar_t *keyr = wcsrchr(tmpkey, ' '); - - __with(mbstate_t state; size_t i = 0; memset(&state, 0, sizeof(state));) - for(char const *sptr = *glyphList; *sptr; i++) - { - wchar_t wc; - int ret = mbrtowc(&wc, sptr, 4, &state); - if(ret <= 0) FontError("Error parsing Unicode sequence."); - - Lth_Glyph glyph = { .ch = wc }; - memmove(glyph.mb, sptr, ret); - - (*keyl = wc); - int *x = (*keyr = 'x', Lth_HashMapFind(&rsrc->map, tmpkey)); - int *y = (*keyr = 'y', Lth_HashMapFind(&rsrc->map, tmpkey)); - int *w = (*keyr = 'w', Lth_HashMapFind(&rsrc->map, tmpkey)); - int *h = (*keyr = 'h', Lth_HashMapFind(&rsrc->map, tmpkey)); - _Accum *s = (*keyr = 's', Lth_HashMapFind(&rsrc->map, tmpkey)); - - if(x) glyph.x = *x; - if(y) glyph.y = *y; - if(w) glyph.w = *w; - if(h) glyph.h = *h; - if(s) glyph.s = *s; - - if(wc > 0x7F) - { - ACS_BeginPrint(); - - ACS_PrintString(font->fnamePref); - - switch(type) - { - case Lth_GT_Chara: Lth_PrintString(glyph.mb); break; - case Lth_GT_Codep: ACS_PrintHex(glyph.ch); break; - case Lth_GT_Digit: ACS_PrintInt(glyph.ch); break; - } - - ACS_PrintString(font->fnameSuff); - - glyph.fname = ACS_EndStrParam(); - } - - font->glyphV.data[i] = glyph; - font->glyphs.elem.data[i].keyhash = (size_t)wc; - font->glyphs.elem.data[i].value = &font->glyphV.data[i]; - - sptr += ret; - } - - free(tmpkey); - - Lth_HashMapBuild((Lth_HashMap *)&font->glyphs); -} - -// -// FontSetup -// -static void FontSetup(Lth_Font volatile *font, Lth_ResourceMap *rsrc) -{ - GenFontData(); - - int type; - - if(typeStr) - if(Lth_stricmp(*typeStr, "Character") == 0) type = Lth_GT_Chara; - else if(Lth_stricmp(*typeStr, "Codepoint") == 0) type = Lth_GT_Codep; - else if(Lth_stricmp(*typeStr, "Digit") == 0) type = Lth_GT_Digit; - else FontError("Invalid Font.Type"); - else - type = Lth_GT_Chara; - - font->height = *height; - - if(base) - font->baseName = Lth_strentdup(*base); - - if(extraDir) - { - ACS_BeginPrint(); - - Lth_PrintString(*extraDir); - - if((*extraDir)[strlen(*extraDir)] != '/') - ACS_PrintChar('/'); - - if(prefix) - Lth_PrintString(*prefix); - - font->fnamePref = ACS_EndStrParam(); - - if(suffix) font->fnameSuff = Lth_strentdup(*suffix); - else font->fnameSuff = s".png"; - } - - if(spaceWidth) font->spaceWidth = *spaceWidth; - else font->spaceWidth = 4; - - if(casing) - if(Lth_stricmp(*casing, "Both") == 0) - font->casing = Lth_Case_Both; - else if(Lth_stricmp(*casing, "UpperOnly") == 0) - font->casing = Lth_Case_Uppr; - else if(Lth_stricmp(*casing, "LowerOnly") == 0) - font->casing = Lth_Case_Lowr; - else - FontError("Invalid Font.Case"); - else - font->casing = Lth_Case_Both; - - font->glyphV.size = Lth_mbslen(*glyphList); - Lth_HashMapAlloc((Lth_HashMap *)&font->glyphs, font->glyphV.size); - Lth_VectorAlloc(Lth_Glyph, font->glyphV); - - FontLoadGlyphs(font, rsrc, type); -} - -// -// FontPrint -// -// [debug] Print characters out. -// -Lth_ScriptCall static void FontPrint(Lth_Font *font) -{ - for(size_t i = 0; i < font->glyphs.elem.size; i++) - __with(Lth_Glyph *glyph = font->glyphs.elem.data[i].value;) - printf("glyph %X (%s)\t\tx: %i\ty: %i\tw: %i\n", - glyph->ch, glyph->mb, glyph->x, glyph->y, glyph->w); -} - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_FontNew -// -Lth_ScriptCall Lth_Font *Lth_FontNew(char const *fname) -{ - Lth_Font volatile *font = NULL; - Lth_ResourceMap *rsrc = NULL; - - // Set up error handler. - if(setjmp(FontJmpBuf) == FontJmpBufToken) - { - if(font) Lth_FontDestroy((Lth_Font *)font); - if(rsrc) Lth_ResourceMapDestroy(rsrc); - - return NULL; - } - - rsrc = Lth_ManifestLoad_extern(fname); - - if(rsrc == NULL) - FontError("Couldn't load resource manifest."); - - FontValidate(rsrc); - - font = calloc(1, sizeof(Lth_Font)); - - if(font == NULL) - FontError("Failed to allocate font."); - - FontSetup(font, rsrc); - - Lth_ResourceMapDestroy(rsrc); - - return (Lth_Font *)font; -} - -// -// Lth_FontDestroy -// -void Lth_FontDestroy(Lth_Font *font) -{ - if(font == NULL) return; - - Lth_HashMapDestroy(&font->glyphs); - free(font->glyphV.data); - free(font); -} - -// EOF diff --git a/lithos_c/lithos3/src/fontrun.c b/lithos_c/lithos3/src/fontrun.c deleted file mode 100644 index 0df3259..0000000 --- a/lithos_c/lithos3/src/fontrun.c +++ /dev/null @@ -1,330 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Font rendering. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - -#include -#include -#include "Lth_stdfix.h" - -#define FontCheckASCII(rst) if((rst)->asciiPrint) FontRenderAPr((rst)) - - -// Type Definitions ----------------------------------------------------------| - -typedef struct FontRenderState -{ - Lth_Context *ctx; - Lth_Font *font; - bool asciiPrint; - _Accum ax, ay; - int x, y; - int tmpx; - int origx, origy; -} FontRenderState; - - -// Static Objects ------------------------------------------------------------| - -static Lth_Glyph FontReplacementGlyph = { - .fname = s"lithos_gfx/ReplacementCharacter.png", - .ch = 0xFFFD, - .mb = u8"�", - .w = 32, - .h = 32, - .s = -1 -}; - - -// Static Functions ----------------------------------------------------------| - -// -// ASCII Character -// Advance Line -// ASCII Print -// Advance Space -// Advance Tabulator -// Character -// Finish -// Glyph -// Return Line -// Wide Character -// -static void FontRenderACh(FontRenderState *rst, Lth_Glyph *glyph); -static void FontRenderALn(FontRenderState *rst); -static void FontRenderAPr(FontRenderState *rst); -static void FontRenderASp(FontRenderState *rst, int amt); -static void FontRenderATa(FontRenderState *rst); -static void FontRenderChr(FontRenderState *rst, wchar_t wc); -static void FontRenderFin(FontRenderState *rst); -static void FontRenderGly(FontRenderState *rst, Lth_Glyph *glyph); -static void FontRenderRLn(FontRenderState *rst); -static void FontRenderWCh(FontRenderState *rst, wchar_t wc, bool noascii); - -// -// FontRenderACh -// -static void FontRenderACh(FontRenderState *rst, Lth_Glyph *glyph) -{ - if(!rst->asciiPrint) - { - Lth_HudMessageBegin(); - rst->asciiPrint = true; - } - - rst->tmpx += glyph->w; - ACS_PrintChar(glyph->ch); - -#if Lth_DEBUG_FONTRUN - printf("ASCII_CHAR[%c] ", glyph->ch); -#endif -} - -// -// FontRenderALn -// -static void FontRenderALn(FontRenderState *rst) -{ - FontCheckASCII(rst); - - rst->y += rst->font->height; - -#if Lth_DEBUG_FONTRUN - printf("NEWLINE "); -#endif -} - -// -// FontRenderAPr -// -static void FontRenderAPr(FontRenderState *rst) -{ - rst->asciiPrint = false; - - if(rst->font->baseName) - { - _Accum x = rst->x + rst->ax; - _Accum y = rst->y + rst->ay; - -#if Lth_DEBUG_FONTRUN - printf("ASCII_PRINT[%.2k, %.2k] ", x, y); -#endif - - ACS_SetFont(rst->font->baseName); - Lth_HudMessageEnd(rst->ctx, x, y); - - rst->x += rst->tmpx; - rst->tmpx = 0; - } - else - { - __str s = ACS_EndStrParam(); - int len = ACS_StrLen(s); - - for(int i = 0; i < len; i++) - FontRenderWCh(rst, s[i], true); - } -} - -// -// FontRenderASp -// -static void FontRenderASp(FontRenderState *rst, int amt) -{ - FontCheckASCII(rst); - - rst->x += rst->font->spaceWidth * amt; - -#if Lth_DEBUG_FONTRUN - printf("SPACE[%i] ", amt); -#endif -} - -// -// FontRenderATa -// -static void FontRenderATa(FontRenderState *rst) -{ - FontCheckASCII(rst); - - int tabw = rst->font->spaceWidth * 8; - rst->x = Lth_ceilk(rst->x / (_Accum)tabw) * tabw; - -#if Lth_DEBUG_FONTRUN - printf("TABULATOR "); -#endif -} - -// -// FontRenderChr -// -static void FontRenderChr(FontRenderState *rst, wchar_t wc) -{ - switch(wc) - { - case L' ': FontRenderASp(rst, 1); break; - case 0x3000: FontRenderASp(rst, 2); break; - case L'\t': FontRenderATa(rst); break; - case L'\n': FontRenderALn(rst); - case L'\r': FontRenderRLn(rst); break; - default: FontRenderWCh(rst, wc, false); break; - } -} - -// -// FontRenderFin -// -static void FontRenderFin(FontRenderState *rst) -{ - FontCheckASCII(rst); - -#if Lth_DEBUG_FONTRUN - printf("DONE\n"); -#endif -} - -// -// FontRenderGly -// -static void FontRenderGly(FontRenderState *rst, Lth_Glyph *glyph) -{ - FontCheckASCII(rst); - - _Accum w = glyph->w; - - _Accum scale = 0; - - if(glyph->s != 0) - { - if(glyph->s < 0) scale = rst->font->height / (_Accum)glyph->h; - else scale = glyph->s; - - w *= scale; - } - - if(scale) - Lth_ContextScale(rst->ctx, scale); - - _Accum x = (rst->x + glyph->x) + rst->ax; - _Accum y = (rst->y + glyph->y) + rst->ax; - -#if Lth_DEBUG_FONTRUN - printf("GLYPH[%s][%.2k, %.2k] ", glyph->mb, x, y); -#endif - - Lth_DrawSprite(rst->ctx, glyph->fname, x, y); - - if(scale) - Lth_ContextScale(rst->ctx, 1); - - rst->x += w; -} - -// -// FontRenderRLn -// -static void FontRenderRLn(FontRenderState *rst) -{ - FontCheckASCII(rst); - - rst->x = rst->origx; - -#if Lth_DEBUG_FONTRUN - printf("RET_LINE "); -#endif -} - -// -// FontRenderWCh -// -static void FontRenderWCh(FontRenderState *rst, wchar_t wc, bool noascii) -{ - switch(rst->font->casing) - { - case Lth_Case_Both: default: break; - case Lth_Case_Uppr: if(wc >= L'a' && wc <= L'z') wc -= 0x20; break; - case Lth_Case_Lowr: if(wc >= L'A' && wc <= L'Z') wc += 0x20; break; - } - -#if Lth_DEBUG_FONTRUN - printf("CH "); -#endif - - Lth_Glyph *glyph = Lth_HashMapFind(&rst->font->glyphs, wc); - if(glyph == NULL) glyph = &FontReplacementGlyph; - - if(glyph->ch > 0x7F || noascii) FontRenderGly(rst, glyph); - else FontRenderACh(rst, glyph); -} - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_FontRunPlain -// -void Lth_FontRunPlain(Lth_Context *ctx, Lth_Font *font, int x, int y, - int ax, int ay) -{ - if(font == NULL) - { - ACS_EndStrParam(); - return; - } - - FontRenderState rst = { - .ctx = ctx, - .font = font, - .x = x, .y = y, - .origx = x, .origy = y - }; - - switch(ax) - { - default: case Lth_AX_Lef: rst.ax = 0.1k; break; - case Lth_AX_Rig: rst.ax = 0.2k; break; - case Lth_AX_Cen: rst.ax = 0.0k; break; - } - - switch(ay) - { - default: case Lth_AY_Top: rst.ay = 0.1k; break; - case Lth_AY_Bot: rst.ay = 0.2k; break; - case Lth_AY_Cen: rst.ay = 0.0k; break; - } - - char *str = Lth_strdup_str(ACS_EndStrParam()); - - Lth_WithMbState() - for(char const *sptr = str; *sptr;) - { - wchar_t wc; - int ret = mbrtowc(&wc, sptr, 4, &state); - -#if Lth_DEBUG_FONTRUN - printf("%i: ", ret); -#endif - - if(ret > 0) FontRenderChr(&rst, wc), sptr += ret; - else FontRenderGly(&rst, &FontReplacementGlyph), sptr += -ret; - -#if Lth_DEBUG_FONTRUN - printf("\n"); -#endif - } - - FontRenderFin(&rst); - - free(str); -} - -// EOF diff --git a/lithos_c/lithos3/src/window.c b/lithos_c/lithos3/src/window.c deleted file mode 100644 index 56699f4..0000000 --- a/lithos_c/lithos3/src/window.c +++ /dev/null @@ -1,87 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Window functions. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - -#include - - -// Static Functions ----------------------------------------------------------| - -// -// Lth_WindowDraw -// -static void Lth_WindowDraw(Lth_Window *ctrl) -{ - Lth_DrawRectAndClip(ctrl->ctx, ctrl->x, ctrl->y, ctrl->w, 8, 0.35k); - - Lth_FontRunBegin(); - Lth_PrintString(ctrl->title); - Lth_ControlFontRunPlain(ctrl, ctrl->x, ctrl->y); - - Lth_ContextClipPop(ctrl->ctx); - - Lth_DrawRectAndClip(ctrl->ctx, ctrl->x, ctrl->y + 8, ctrl->w, ctrl->h, 0.5k); -} - -// -// Lth_WindowDrawPost -// -static void Lth_WindowDrawPost(Lth_Window *ctrl) -{ - Lth_ContextClipPop(ctrl->ctx); -} - -// -// Lth_WindowDestroy -// -static void Lth_WindowDestroy(Lth_Window *ctrl) -{ - if(ctrl->title) - free(ctrl->title); -} - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_WindowNew -// -Lth_Window *Lth_WindowNew(Lth_Context *ctx, char const *title, int x, int y, int w, int h) -{ - Lth_ControlInit(Lth_Window); - - ctrl->x = x; - ctrl->y = y; - ctrl->w = w; - ctrl->h = h; - - Lth_WindowSetTitle(ctrl, title); - Lth_ControlConnect(ctrl, Lth_SigDraw, Lth_Callback(Lth_WindowDraw)); - Lth_ControlConnect(ctrl, Lth_SigDrawPst, Lth_Callback(Lth_WindowDrawPost)); - Lth_ControlConnect(ctrl, Lth_SigDestroy, Lth_Callback(Lth_WindowDestroy)); - - return ctrl; -} - -// -// Lth_WindowSetTitle -// -void Lth_WindowSetTitle(Lth_Window *ctrl, char const *title) -{ - if(title != NULL) - ctrl->title = Lth_strdup(title); - else - ctrl->title = Lth_strdup(""); -} - -// EOF diff --git a/lithos_c/lithos3/src/winman.c b/lithos_c/lithos3/src/winman.c deleted file mode 100644 index 016bb3f..0000000 --- a/lithos_c/lithos3/src/winman.c +++ /dev/null @@ -1,68 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Window management. -// -//----------------------------------------------------------------------------- - -#include "Lth.h" - - -// Static Functions ----------------------------------------------------------| - -// -// WMFont -// -static Lth_Font *WMFont(Lth_Control *ctrl) -{ - Lth_WindowManager *wm = Lth_VirtControl; - - if(wm->font == NULL) - { - char const **name = Lth_ContextResource(wm->ctx, "Base.DefaultFont"); - if(name != NULL) - wm->font = Lth_FontNew(*name); - } - - return wm->font; -} - - -// Extern Functions ----------------------------------------------------------| - -// -// Lth_WMNew -// -Lth_WindowManager *Lth_WMNew(Lth_Context *ctx) -{ - Lth_ControlInit(Lth_WindowManager); - - ctrl->vtable.getFont = WMFont; - - ctrl->lastmap.x = ctrl->lastmap.y = -1; - ctrl->mapspace.x = 24; - ctrl->mapspace.y = 16; - - return ctrl; -} - -// -// Lth_WMMap -// -void Lth_WMMap(Lth_WindowManager *wm, Lth_Window *ctrl) -{ - if(ctrl->x == -1) ctrl->x = wm->lastmap.x += wm->mapspace.x; - else wm->lastmap.x = ctrl->x; - - if(ctrl->y == -1) ctrl->y = wm->lastmap.y += wm->mapspace.y; - else wm->lastmap.y = ctrl->y; - - Lth_ControlAttachTail(wm, ctrl); -} - -// EOF diff --git a/lithos_c/lithos3/src/manifest.c b/lithos_c/src/manifest.c similarity index 88% rename from lithos_c/lithos3/src/manifest.c rename to lithos_c/src/manifest.c index 68e690a..e6bfae6 100644 --- a/lithos_c/lithos3/src/manifest.c +++ b/lithos_c/src/manifest.c @@ -1,6 +1,6 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // // See "LICENSE" for more information. // @@ -15,7 +15,7 @@ #include #include #include -#include "Lth_stdfix.h" +#include #define GenAlloc(name, type) \ if(rsrc->vec##name.size) \ @@ -109,12 +109,12 @@ static void ManifestGetFixed(ManifestState *repr, size_t key, char const *str) { // fixed-constant char *end; - _Accum value = strtofxk(str, &end); + accum value = strtofxk(str, &end); if(*end != '\0') ManifestError(repr, "bad fixed-point value"); - GenValueGetter(Fixed, fixed, value); + GenValueGetter(Fixed, fxval, value); } // @@ -143,9 +143,13 @@ static void ManifestGetStrng(ManifestState *repr, size_t key) // static void ManifestGetHeaderNameSequence(ManifestState *repr) { - // header-name-sequence: + // header-identifier: // identifier - // header-name-sequence . identifier + // number-constant + + // header-name-sequence: + // header-identifier + // header-name-sequence . header-identifier ACS_BeginPrint(); @@ -153,8 +157,8 @@ static void ManifestGetHeaderNameSequence(ManifestState *repr) { Lth_Token const *tok = Lth_TokenStreamPeek(repr->stream); - // identifier - if(tok->type != Lth_TOK_Identi) + // header-identifier + if(tok->type != Lth_TOK_Identi && tok->type != Lth_TOK_Number) ManifestError(repr, "expected identifier"); Lth_PrintString(tok->str); @@ -165,13 +169,20 @@ static void ManifestGetHeaderNameSequence(ManifestState *repr) } // -// ManifestGetInitializer +// ManifestGetConstantValue // -static void ManifestGetInitializer(ManifestState *repr, size_t key) +static void ManifestGetConstantValue(ManifestState *repr, size_t key) { - // initializer: + // boolean-constant: + // true + // false + + // number-constant: // integer-constant // fixed-constant + + // constant-value: + // number-constant // boolean-constant switch(Lth_TokenStreamPeek(repr->stream)->type) @@ -184,17 +195,14 @@ static void ManifestGetInitializer(ManifestState *repr, size_t key) ManifestGetFixed(repr, key, str); break; case Lth_TOK_Identi: - // boolean-constant: - // true - // false __with(char const *str = Lth_TokenStreamBump(repr->stream)->str;) - if(strcmp(str, "true") == 0) GenValueGetter(Integ, integ, 1); + if(strcmp(str, "true") == 0) GenValueGetter(Integ, integ, 1); else if(strcmp(str, "false") == 0) GenValueGetter(Integ, integ, 0); else goto unexpect; break; unexpect: default: - ManifestError(repr, "expected initializer"); + ManifestError(repr, "expected constant-value"); break; } } @@ -213,7 +221,7 @@ static void ManifestGetDecl_Object(ManifestState *repr) // ; // object-declaration: - // object-name = initializer object-decl-terminator + // object-name = constant-value object-decl-terminator // object-name = string-constant-seq // identifier @@ -221,7 +229,7 @@ static void ManifestGetDecl_Object(ManifestState *repr) Lth_TokenStreamPeek(repr->stream)->type != Lth_TOK_Identi) ManifestError(repr, "exptected object-name"); - // Build the key name. Format is: "blockname.identifier" + // Build the key name. Serialized as "blockname.identifier" __with(char const *name = Lth_TokenStreamBump(repr->stream)->str;) { ACS_BeginPrint(); @@ -237,12 +245,16 @@ static void ManifestGetDecl_Object(ManifestState *repr) if(!Lth_TokenStreamDrop(repr->stream, Lth_TOK_Equals)) ManifestError(repr, "expected '='"); - // initializer - if(Lth_TokenStreamPeek(repr->stream)->type != Lth_TOK_String) + // string-constant-seq + if(Lth_TokenStreamPeek(repr->stream)->type == Lth_TOK_String) + ManifestGetStrng(repr, key); + + // constant-value + else { repr->stream->skipeol = false; - ManifestGetInitializer(repr, key); + ManifestGetConstantValue(repr, key); // object-decl-terminator if(!Lth_TokenStreamDrop(repr->stream, Lth_TOK_LnEnd) && @@ -251,10 +263,6 @@ static void ManifestGetDecl_Object(ManifestState *repr) repr->stream->skipeol = true; } - - // string-constant-seq - else - ManifestGetStrng(repr, key); } // @@ -299,7 +307,7 @@ Lth_ScriptCall static void ManifestGetDecl(ManifestState *repr) // static void ManifestClose(ManifestState *repr) { - Lth_TokenStreamClose(repr->stream); + if(repr->stream) Lth_TokenStreamClose(repr->stream); free(repr->data); free(repr->block); free(repr->manifest.data); @@ -341,10 +349,8 @@ Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_extern(char const *fname) ManifestState repr = {}; - repr.fname = fname; - repr.data = Lth_strdup_str(Lth_strlocal(Lth_strentdup(repr.fname))); - repr.stream = Lth_TokenStreamOpen(repr.data, strlen(repr.data)); - repr.block = Lth_strdup("Base"); + repr.fname = fname; + repr.data = Lth_strdup_str(Lth_strlocal(Lth_strentdup(repr.fname))); if(strcmp(repr.data, repr.fname) == 0) { @@ -353,6 +359,9 @@ Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_extern(char const *fname) return NULL; } + repr.stream = Lth_TokenStreamOpen(repr.data, strlen(repr.data)); + repr.block = Lth_strdup("Base"); + if(setjmp(ManifestJmpBuf) != ManifestJmpBufToken) for(;;) if(Lth_TokenStreamPeek(repr.stream)->type != Lth_TOK_EOF) @@ -393,7 +402,7 @@ Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_static(Lth_Manifest *manifest) // Allocate each data vector and make an iterator for it. GenAlloc(Integ, int); - GenAlloc(Fixed, _Accum); + GenAlloc(Fixed, accum); GenAlloc(Strng, char *); // Allocate the hash map. @@ -406,7 +415,7 @@ Lth_ScriptCall Lth_ResourceMap *Lth_ManifestLoad_static(Lth_Manifest *manifest) switch(iter->type) { GenRsrcCase(Integ, integ, i); - GenRsrcCase(Fixed, fixed, i); + GenRsrcCase(Fixed, fxval, i); GenRsrcCase(Strng, strng, i); } @@ -426,9 +435,9 @@ Lth_Manifest Lth_ManifestNew_Integ(char const *key, int value) // // Lth_ManifestNew_Fixed // -Lth_Manifest Lth_ManifestNew_Fixed(char const *key, _Accum value) +Lth_Manifest Lth_ManifestNew_Fixed(char const *key, accum value) { - return GenManifestValue(Fixed, fixed, value); + return GenManifestValue(Fixed, fxval, value); } // diff --git a/lithos_c/lithos3/src/stdlib.c b/lithos_c/src/stdlib.c similarity index 82% rename from lithos_c/lithos3/src/stdlib.c rename to lithos_c/src/stdlib.c index a5469ec..9836c8f 100644 --- a/lithos_c/lithos3/src/stdlib.c +++ b/lithos_c/src/stdlib.c @@ -1,8 +1,8 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan // -// See "LICENSE" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -12,22 +12,13 @@ #include "Lth.h" -#include // OH GOD +#include #include #include #include -#include "Lth_stdfix.h" - -#define GenStrHash() \ - if(s == NULL) return 0; \ - \ - size_t ret = 0; \ - \ - while(*s) \ - ret = ret * 101 + ((unsigned char)(*s++) & 0xff); \ - \ - return ret +#include +#include // Extern Functions ----------------------------------------------------------| @@ -50,7 +41,7 @@ int Lth_fpeekc(FILE *fp) char *Lth_strdup(char const *s) { size_t len = strlen(s); - char *ret = malloc(len + 1); + char *ret = malloc(len + 1); memmove(ret, s, len); ret[len] = '\0'; return ret; @@ -64,7 +55,7 @@ char *Lth_strdup(char const *s) char *Lth_strdup_str(__str s) { size_t len = ACS_StrLen(s); - char *ret = malloc(len + 1); + char *ret = malloc(len + 1); ACS_StrArsCpyToGlobalCharRange((int)ret, __GDCC__Sta, 0, len, s); ret[len] = '\0'; return ret; @@ -77,7 +68,6 @@ char *Lth_strdup_str(__str s) // __str Lth_strentdup(char const *s) { - size_t len = strlen(s); ACS_BeginPrint(); Lth_PrintString(s); return ACS_EndStrParam(); @@ -133,15 +123,11 @@ bool Lth_strcontains(char const *s, char ch) // int Lth_stricmp(char const *s1, char const *s2) { - char a, b; - while(*s1 && *s2) - { - if((a = toupper(*s1)) != (b = toupper(*s2))) + for(; *s1 && *s2; s1++, s2++) + if(toupper(*s1) != toupper(*s2)) break; - s1++, s2++; - } - a = toupper(*s1), b = toupper(*s2); - return (int)a - (int)b; + + return (int)toupper(*s1) - (int)toupper(*s2); } // @@ -190,9 +176,9 @@ size_t Lth_mbslen(char const *s) // // Lth_ceilk // -int Lth_ceilk(_Accum n) +int Lth_ceilk(accum n) { - union { int_k_t i; _Accum a; } u = { .a = n }; + union {int_k_t i; accum a;} u = {.a = n}; if(u.i & 0xFFF1) return u.i &= 0xFFFF0000, u.a + 1; else @@ -202,9 +188,9 @@ int Lth_ceilk(_Accum n) // // Lth_fractk // -_Accum Lth_fractk(_Accum n) +accum Lth_fractk(accum n) { - union { int_k_t i; _Accum a; } u = { .a = n }; + union {int_k_t i; accum a;} u = {.a = n}; u.i &= 0xFFFF; return u.a; } @@ -224,7 +210,12 @@ void Lth_PrintString(char const *s) // size_t Lth_Hash_char(char const *s) { - GenStrHash(); + if(s == NULL) return 0; + + size_t ret = 0; + while(*s) + ret = ret * 101 + ((unsigned char)(*s++) & 0xff); + return ret; } // @@ -232,7 +223,12 @@ size_t Lth_Hash_char(char const *s) // size_t Lth_Hash_str(Lth__strchar *s) { - GenStrHash(); + if(s == NULL) return 0; + + size_t ret = 0; + while(*s) + ret = ret * 101 + ((unsigned char)(*s++) & 0xff); + return ret; } // diff --git a/lithos_c/lithos3/src/token.c b/lithos_c/src/token.c similarity index 93% rename from lithos_c/lithos3/src/token.c rename to lithos_c/src/token.c index 03373b1..a626d0f 100644 --- a/lithos_c/lithos3/src/token.c +++ b/lithos_c/src/token.c @@ -1,12 +1,10 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan, David Hill // -// See "LICENSE" for more information. +// Code by David Hill has been relicensed with consent. // -// Copyright © 2016 David Hill -// -// See "LICENSE.gdcc" and "LICENSE.gdcc-lib" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -20,6 +18,7 @@ #include #include +#include // Extern Functions ----------------------------------------------------------| @@ -130,7 +129,7 @@ void Lth_TokenGet(FILE *fp, Lth_Token *out) return; } - char chrseq[2] = { ch, '\0' }; + char chrseq[2] = {ch, '\0'}; out->str = Lth_strdup(chrseq); out->type = Lth_TOK_ChrSeq; } diff --git a/lithos_c/lithos3/src/tokenstream.c b/lithos_c/src/tokenstream.c similarity index 79% rename from lithos_c/lithos3/src/tokenstream.c rename to lithos_c/src/tokenstream.c index 65f6035..0883a81 100644 --- a/lithos_c/lithos3/src/tokenstream.c +++ b/lithos_c/src/tokenstream.c @@ -1,12 +1,10 @@ //----------------------------------------------------------------------------- // -// Copyright © 2016 Project Golan +// Copyright © 2016-2017 Project Golan, David Hill // -// See "LICENSE" for more information. +// Code by David Hill has been relicensed with consent. // -// Copyright © 2016 David Hill -// -// See "LICENSE.gdcc" and "LICENSE.gdcc-lib" for more information. +// See "LICENSE.lithos3" for more information. // //----------------------------------------------------------------------------- // @@ -19,6 +17,12 @@ #include "Lth.h" +// Static Functions ----------------------------------------------------------| + +static int Lth_TokenFileStream_getc(struct Lth_TokenStreamBuf *cookie); +static int Lth_TokenFileStream_bumpc(struct Lth_TokenStreamBuf *cookie); + + // Type Definitions ----------------------------------------------------------| // @@ -28,8 +32,9 @@ typedef struct Lth_TokenStreamBuf { char *beg, *itr, *end; size_t len; - int (*getc)(struct Lth_TokenStreamBuf *); - int (*bumpc)(struct Lth_TokenStreamBuf *); + + __prop getc {call: Lth_TokenFileStream_getc(this)} + __prop bumpc {call: Lth_TokenFileStream_bumpc(this)} } Lth_TokenStreamBuf; @@ -68,29 +73,29 @@ static ssize_t Lth_TokenFileStream_read(void *cookie_, char *buf, size_t size) for(ssize_t i = 0; i < size;) { - if(cookie->getc(cookie) == '/') + if(cookie->getc() == '/') { - cookie->bumpc(cookie); - if(cookie->getc(cookie) == '*') + cookie->bumpc(); + if(cookie->getc() == '*') { - for(cookie->bumpc(cookie); !(cookie->bumpc(cookie) == '*' && cookie->getc(cookie) == '/');) - if(cookie->getc(cookie) == EOF) + for(cookie->bumpc(); !(cookie->bumpc() == '*' && cookie->getc() == '/');) + if(cookie->getc() == EOF) return i; buf[i++] = ' '; } - else if(cookie->getc(cookie) == '/') + else if(cookie->getc() == '/') { - do if(cookie->bumpc(cookie) == EOF) return i; - while(cookie->getc(cookie) != '\n'); + do if(cookie->bumpc() == EOF) return i; + while(cookie->getc() != '\n'); buf[i++] = ' '; } else buf[i++] = '/'; } - else if(cookie->getc(cookie) == EOF) + else if(cookie->getc() == EOF) return i; else - buf[i++] = cookie->bumpc(cookie); + buf[i++] = cookie->bumpc(); } return size; @@ -99,9 +104,8 @@ static ssize_t Lth_TokenFileStream_read(void *cookie_, char *buf, size_t size) // // Lth_TokenFileStream_close // -static int Lth_TokenFileStream_close(void *cookie_) +static int Lth_TokenFileStream_close(void *cookie) { - Lth_TokenStreamBuf *cookie = cookie_; free(cookie); return 0; } @@ -123,8 +127,6 @@ static FILE *Lth_TokenFileStreamOpen(void *data, size_t size) cookie->beg = data; cookie->itr = data; cookie->end = cookie->beg + size; - cookie->getc = Lth_TokenFileStream_getc; - cookie->bumpc = Lth_TokenFileStream_bumpc; return fopencookie(cookie, "r", io_funcs); } diff --git a/lithos_fs/fonts/SmallFontJP.lthm b/lithos_fs/fonts/SmallFontJP.lthm deleted file mode 100644 index 80cdb3f..0000000 --- a/lithos_fs/fonts/SmallFontJP.lthm +++ /dev/null @@ -1,274 +0,0 @@ -//----------------------------------------------------------------------------- -// -// Copyright © 2016 Project Golan -// -// See "LICENSE" for more information. -// -//----------------------------------------------------------------------------- -// -// Default small font, with Japanese Katakana glyphs made by Toooooasty. -// -//----------------------------------------------------------------------------- - -[Font] - -// -// Base -// -// Base font for ASCII glyphs. -// If not supplied, all glyphs will be treated as Unicode. -// -Base = "SMALLFNT" - -// -// Case -// -// Case-sensitivity for font. -// If not supplied, defaults to Both -// -// Both -// Both upper and lower case supported. -// -// UpperOnly -// Any lower case characters printed will be converted to upper-case. -// -// LowerOnly -// Any upper case characters printed will be converted to lower-case. -// -Case = "UpperOnly" - -// -// ExtraDir -// -// Directory for Unicode glyphs. -// If not supplied, no Unicode glyphs will be loaded. -// -ExtraDir = "fonts/SmallFont" - -// -// Suffix -// -// Filename suffix for Unicode glyphs. -// If not supplied, defaults to ".png". -// -Suffix = ".png" - -// -// Type -// -// Filename suffix type for Unicode glyphs. -// If not supplied, defaults to Character. -// -// Character -// Takes the glyph as the suffix. -// Example: た = fonts/SmallFont/STCFNた.png -// -// Codepoint -// Takes the glyph's codepoint as the suffix. -// Example: た = fonts/SmallFont/STCFN305F.png -// -// Digit -// Takes the glyph's base-10 codepoint as the suffix. -// Example: た = fonts/SmallFont/STCFN12383.png -// -Type = "Character" - -// -// Glyphs -// -// A list of all glyphs available in this font. -// -Glyphs = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_" - "ンえョのコドトにイハシォナウッは)ツどてリた" - "カルなゥヒマらサ、ミタエオモれほヌきメホキじテ" - "るク♥ュィぬセ。ずノニヨユへァ(ーが・ャラを" - "ヘせヤレネりワロソヲもェスチむフひアケ" - "〜ぞム世今夢奥山常我散日有浅為色見越酔ɢᴜ" - -// -// SpaceWidth -// -// If not supplied, defaults to 4. -// -SpaceWidth = 4 - -// -// Height -// -// Required. -// -Height = 8 - -[Font.GlyphData] -"!_w"=4 -"\"_w"=7 -"#_w"=7 -"$_w"=7 -"%_w"=9 -"&_w"=8 -"'_w"=4 -"(_w"=7 -")_w"=7 -"*_w"=7 -"+_w"=5 -",_w"=4 -"-_w"=6 -"._w"=4 -"/_w"=7 -"0_w"=8 -"1_w"=5 -"2_w"=8 -"3_w"=8 -"4_w"=7 -"5_w"=7 -"6_w"=8 -"7_w"=8 -"8_w"=8 -"9_w"=8 -":_w"=4 -";_w"=4 -"<_w"=5 -"=_w"=5 -">_w"=5 -"?_w"=8 -"@_w"=9 -"A_w"=8 -"B_w"=8 -"C_w"=8 -"D_w"=8 -"E_w"=8 -"F_w"=8 -"G_w"=8 -"H_w"=8 -"I_w"=4 -"J_w"=8 -"K_w"=8 -"L_w"=8 -"M_w"=9 -"N_w"=8 -"O_w"=8 -"P_w"=8 -"Q_w"=8 -"R_w"=8 -"S_w"=7 -"T_w"=8 -"U_w"=8 -"V_w"=7 -"W_w"=9 -"X_w"=9 -"Y_w"=8 -"Z_w"=7 -"[_w"=5 -"\_w"=7 -"]_w"=5 -"^_w"=7 -"__w"=8 -"ン_w"=8 -"え_w"=32;"え_h"=32;"え_s"=-1 -"ョ_w"=8 -"の_w"=32;"の_h"=32;"の_s"=-1 -"コ_w"=8 -"ド_w"=8 -"ト_w"=8 -"に_w"=32;"に_h"=32;"に_s"=-1 -"イ_w"=8 -"ハ_w"=8 -"シ_w"=8 -"ォ_w"=8 -"ナ_w"=8 -"ウ_w"=8 -"ッ_w"=8 -"は_w"=32;"は_h"=32;"は_s"=-1 -")_w"=8 -"ツ_w"=8 -"ど_w"=32;"ど_h"=32;"ど_s"=-1 -"て_w"=32;"て_h"=32;"て_s"=-1 -"リ_w"=8 -"た_w"=32;"た_h"=32;"た_s"=-1 -"カ_w"=8 -"ル_w"=8 -"な_w"=32;"な_h"=32;"な_s"=-1 -"ゥ_w"=8 -"ヒ_w"=8 -"マ_w"=8 -"ら_w"=32;"ら_h"=32;"ら_s"=-1 -"サ_w"=8 -"、_w"=8 -"ミ_w"=8 -"タ_w"=8 -"エ_w"=8 -"オ_w"=8 -"モ_w"=8 -"れ_w"=32;"れ_h"=32;"れ_s"=-1 -"ほ_w"=32;"ほ_h"=32;"ほ_s"=-1 -"ヌ_w"=8 -"き_w"=32;"き_h"=32;"き_s"=-1 -"メ_w"=8 -"ホ_w"=8 -"キ_w"=8 -"じ_w"=32;"じ_h"=32;"じ_s"=-1 -"テ_w"=8 -"る_w"=32;"る_h"=32;"る_s"=-1 -"ク_w"=8 -"♥_w"=8 -"ュ_w"=8 -"ィ_w"=8 -"ぬ_w"=32;"ぬ_h"=32;"ぬ_s"=-1 -"セ_w"=8 -"。_w"=8 -"ず_w"=32;"ず_h"=32;"ず_s"=-1 -"ノ_w"=8 -"ニ_w"=8 -"ヨ_w"=8 -"ユ_w"=8 -"へ_w"=32;"へ_h"=32;"へ_s"=-1 -"ァ_w"=8 -"(_w"=8 -"ー_w"=8 -"が_w"=32;"が_h"=32;"が_s"=-1 -"・_w"=32;"・_h"=32;"・_s"=-1 -"ャ_w"=8 -"ラ_w"=8 -"を_w"=32;"を_h"=32;"を_s"=-1 -"ヘ_w"=8 -"せ_w"=32;"せ_h"=32;"せ_s"=-1 -"ヤ_w"=8 -"レ_w"=8 -"ネ_w"=8 -"り_w"=32;"り_h"=32;"り_s"=-1 -"ワ_w"=8 -"ロ_w"=8 -"ソ_w"=8 -"ヲ_w"=8 -"も_w"=32;"も_h"=32;"も_s"=-1 -"ェ_w"=8 -"ス_w"=8 -"チ_w"=8 -"む_w"=32;"む_h"=32;"む_s"=-1 -"フ_w"=8 -"ひ_w"=32;"ひ_h"=32;"ひ_s"=-1 -"ア_w"=8 -"ケ_w"=8 -"〜_w"=8 -"ぞ_w"=32;"ぞ_h"=32;"ぞ_s"=-1 -"ム_w"=8 -"世_w"=32;"世_h"=32;"世_s"=-1 -"今_w"=32;"今_h"=32;"今_s"=-1 -"夢_w"=32;"夢_h"=32;"夢_s"=-1 -"奥_w"=32;"奥_h"=32;"奥_s"=-1 -"山_w"=32;"山_h"=32;"山_s"=-1 -"常_w"=32;"常_h"=32;"常_s"=-1 -"我_w"=32;"我_h"=32;"我_s"=-1 -"散_w"=32;"散_h"=32;"散_s"=-1 -"日_w"=32;"日_h"=32;"日_s"=-1 -"有_w"=32;"有_h"=32;"有_s"=-1 -"浅_w"=32;"浅_h"=32;"浅_s"=-1 -"為_w"=32;"為_h"=32;"為_s"=-1 -"色_w"=32;"色_h"=32;"色_s"=-1 -"見_w"=32;"見_h"=32;"見_s"=-1 -"越_w"=32;"越_h"=32;"越_s"=-1 -"酔_w"=32;"酔_h"=32;"酔_s"=-1 -"ɢ_w"=32;"ɢ_h"=32;"ɢ_s"=-1 -"ᴜ_w"=43;"ᴜ_h"=28;"ᴜ_s"=-1 - -// EOF diff --git a/lithos_tools/classlayout.txt b/lithos_tools/classlayout.txt deleted file mode 100644 index c8d20ac..0000000 --- a/lithos_tools/classlayout.txt +++ /dev/null @@ -1,5 +0,0 @@ -Lth_Rect -\-Lth_Control -| |-Lth_Button -\ \-Lth_Window - diff --git a/loadacs.txt b/loadacs.txt deleted file mode 100644 index e1ca317..0000000 --- a/loadacs.txt +++ /dev/null @@ -1 +0,0 @@ -lithos3