author | Mystery Man <unknown@mandriva.org> | 2003-03-28 17:06:34 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-03-28 17:06:34 +0000 |
commit | 58b47dd22440429495a586a13bf975fad4a5645e (patch) | |
tree | 59002ba00fba5bc9c3a3ad339dd18848e87895c3 | |
parent | 22aa34691eda7885218ec1b19543ed44ac9b7417 (diff) | |
download | drakx-58b47dd22440429495a586a13bf975fad4a5645e.tar drakx-58b47dd22440429495a586a13bf975fad4a5645e.tar.gz drakx-58b47dd22440429495a586a13bf975fad4a5645e.tar.bz2 drakx-58b47dd22440429495a586a13bf975fad4a5645e.tar.xz drakx-58b47dd22440429495a586a13bf975fad4a5645e.zip |
diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 2a8035f11..000000000 --- a/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -docs -images -unused -drakxtools.tar.bz2 -isolinux diff --git a/Makefile b/Makefile deleted file mode 100644 index bf3be1501..000000000 --- a/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -ROOTDEST = /export - -DIRS = tools kernel mdk-stage1 perl-install rescue - - -ARCH := $(patsubst i%86,i386,$(shell uname -m)) -ARCH := $(patsubst sparc%,sparc,$(ARCH)) - -ifeq (i386,$(ARCH)) - BOOT_IMG = cdrom.img hd.img hdcdrom_usb.img network.img network_gigabit_usb.img blank.img pcmcia.img -endif -ifeq (sparc,$(ARCH)) - BOOT_IMG = cdrom.img hd.img network.img live.img tftp.img tftprd.img - BOOT_IMG += cdrom64.img hd64.img network64.img live64.img tftp64.img tftprd64.img -endif -ifeq (ppc,$(ARCH)) - BOOT_IMG = all.img -endif -ifeq (ia64,$(ARCH)) - BOOT_IMG = all.img -endif - -FBOOT_IMG = $(BOOT_IMG:%=images/%) -FBOOT_RDZ = $(FBOOT_IMG:%.img=%.rdz) images/all.rdz - -.PHONY: dirs install - -install: dirs images rescue install_only - -dirs: - @for n in $(DIRS); do $(MAKE) -C $$n all || exit 1 ; done - -images: $(FBOOT_IMG) images/all.rdz # all.rdz is needed to update isolinux - -$(FBOOT_RDZ): kernel/all.modules - ./make_boot_img $@ `basename $(@:%.rdz=%)` - -$(FBOOT_IMG): %.img: %.rdz - ./make_boot_img $@ `basename $(@:%.img=%)` - -tar: clean - rpm -qa > needed_rpms.lst - cd .. ; tar cfj gi.tar.bz2 gi - rm needed_rpms.lst - -install_only: - for i in images misc Mandrake Mandrake/base Mandrake/share; do install -d $(ROOTDEST)/$$i ; done - ifneq (ppc,$(ARCH)) - for i in $(FBOOT_IMG); do cp -f $${i}* $(ROOTDEST)/images; done - endif - ifeq (alpha,$(ARCH)) - for i in $(FBOOT_RDZ); do cp -f $${i}* $(ROOTDEST)/boot; done - cp -f vmlinux.gz $(ROOTDEST)/boot/instboot.gz - make -C tools/$(ARCH)/cd install ROOTDEST=$(ROOTDEST) - endif - cd $(ROOTDEST)/images; rm -rf alternatives - if [ `ls $(ROOTDEST)/images/*.img-* 2>/dev/null | wc -l` -gt 0 ]; then \ - cd $(ROOTDEST)/images; mkdir alternatives; cd alternatives; mv ../*.img-* .; md5sum *.img-* > MD5SUM; \ - fi - cd $(ROOTDEST)/images; md5sum *.img* > MD5SUM - - ifeq (i386,$(ARCH)) - rm -rf $(ROOTDEST)/isolinux - cp -af isolinux $(ROOTDEST) - cp -f images/cdrom-changedisk.img $(ROOTDEST)/images - endif - - install live_update $(ROOTDEST)/live_update - make -C perl-install full_stage2 - make -C perl-install/share/advertising install - make -C rescue install - -clean: - rm -rf images all.modules all.modules64 - for i in $(DIRS); do make -C $$i clean; done - find . -name "*~" -o -name ".#*" | xargs rm -f - -check: - @badrights=`find $(ROOTDEST)/Mandrake/mdkinst | perl -lne 'print if !((stat)[2] & 4)'`; [ -z "$$badrights" ] || { echo "bad rights for files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$badrights" ; echo "bad rights for files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; } - @missing_kb=`find -name "Entries" | xargs perl -F/ -alne 'print $$ARGV =~ m|(.*)/CVS|, "/$$F[1]" if $$F[1] =~ /\.(png|gif|bmp|xcf|gz|bz2|tar|rdz|so|a|o|mar|img|exe)$$/ && $$F[4] ne "-kb"'` ; [ -z "$$missing_kb" ] || { echo "missing -kb in CVS for files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$missing_kb" ; echo "missing -kb in CVS for files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; } - $(MAKE) -C perl-install check - -upload: - $(MAKE) clean - -# # done before make install to increment ChangeLog version - tools/addchangelog.pl tools/cvslog2changelog.pl | tools/mailchangelog.pl & - - $(MAKE) install - $(MAKE) check - $(MAKE) upload_only - -upload_only: - function upload() { rsync -qSavz --verbose --exclude '*~' -e ssh --delete $(ROOTDEST)/$$1/$$2 mandrake@ken:/c/cooker/$$1; } ;\ - upload Mandrake/mdkinst '' ;\ - upload Mandrake/base compssUsers* ;\ - upload Mandrake/base rpmsrate ;\ - upload Mandrake/base *_stage2.bz2 ;\ - upload Mandrake/share/advertising '' ;\ - upload misc gendistrib ;\ - upload misc make_mdkinst_stage2 ;\ - upload misc packdrake ;\ - upload misc packdrake.pm ;\ - upload misc rpmtools.pm ;\ - upload misc auto ;\ - upload '' live_update ;\ - upload images MD5SUM ;\ - upload images *.img* ;\ - upload images/alternatives '' ;\ - upload isolinux '' ;\ - echo diff --git a/docs/.cvsignore b/docs/.cvsignore deleted file mode 100644 index a0593a470..000000000 --- a/docs/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -pictures diff --git a/docs/9.0_errata.txt b/docs/9.0_errata.txt deleted file mode 100644 index 4fec8885c..000000000 --- a/docs/9.0_errata.txt +++ /dev/null @@ -1,108 +0,0 @@ -# This file contains all the bugs/glitches/inconsistencies shipped in -# 9.0 (Dolphin) Mandrake Linux Release. - -# Feel free to add your entry and if possible the fixes and status of -# the errata. - - o Drakxtools: - ========== - - widget libraries: - - In both XFdrake and printerdrake pop up small, empty, gray windows when - clicking in the main menu. STATUS: Not fixed. - - Scroll bars and widget sizes often not correct (visible primarily in the - printer options step of the "Add printer" wizard of printerdrake. STATUS: - Not fixed. - - harddrake: - - logdrake: - IS: Send the alert mail when service is stopped but the mail - is empty. - SHOULD BE: incorporate a text on which service is stopped. - Status: not fixed. - - o Drakconf: - ========= - IS: locale nl_NL, sl and zh_CN prevent drakconf from starting with - a "cannot call set_active on undefined values" error. - - SHOULD BE: work well in all locales. - - a workaround has been comitted - - o Drakfont: - ========= - - drakfont get stopped in stat64("/mnt/nt/winnt/fonts/8514oem.fon", - ...) on ntfs partitions. - there's a bug in ntfs.o fs module of the kernel - - o Install: - ======== - - o urpmi: - ====== - - "urpmi mplayer" shows a list of libraries it needs and asks whether - to install all this, after saying "y", it says that all these - packages are missing and fails (I have shown it to François and he - says that is a bug with the "contribs". He had to regenerate the - hdlists somehow. STATUS: Not fixed. - - o XFree 4.2.x: - ============ - - Touchpad mouse on my Asus S8600 notebook. Worked out-of-the-box - with Mandrake 8.2, but in 9.0 I cannot do any dragging operation - with the PS/2-"Standard" mouse setting. I switched to "Glidepoint" - with mousedrake and then dragging works, but the emulation of the - third button by pressing both buttons not. Adding the lines - - Option "Emulate3Buttons" - Option "Emulate3Timeout" "50" - - to the mouse section of /etc/X11/XF86Config-4 manually fixes the - middle-button problem. STATUS: Not fixed. - - - - Sometimes, XFree86 can cause sound glitches because of intensive - pci bus usage. - Adding the line - - Option "PciRetry" "true" - - to the "Device" section /etc/X11/XF86Config-4 fixes these boxes. - - - I810 driver is bogus: when Xrender extension is in use (antialiased - fonts), X11 may crash upon vt switch. - is fixed in devel branch of cvs - - - o Printer drivers: - ================ - - "Best Grayscale" mode of HP DeskJet 6xx and Apollo printers does - not work. STATUS: Fixed on linuxprinting.org, needs to be packaged - in "printer-drivers". - -o kernel: - ======= - - Sometimes reboot stops on "illegal seek" message (having /usr on / - fs fix it) - - Sometimes process get blocked in D-state on ntfs partitions (see - drakfont) - - i810_audio mistakely say to modules.pm through modules.*map it - handles nforces whereas it lacks some workaround nvidia and alsa - uses. - workaround: perl-install/patch/patch-nforce.pl - - snd-via686 is said to produce background noise since alsa-0.9.0rc3 - workaround: switch to via82cxxx_audio (oss driver) through draksound diff --git a/docs/9.1_errata.txt b/docs/9.1_errata.txt deleted file mode 100644 index fa73c200e..000000000 --- a/docs/9.1_errata.txt +++ /dev/null @@ -1,65 +0,0 @@ -# This file contains all the bugs/glitches/inconsistencies shipped in -# 9.1 (Bamboo) Mandrake Linux Release. - -# Feel free to add your entry and if possible the fixes and status of -# the errata. - - - o DrakConf: - ========= - - - #2439: menudrake failled to run for users other than root and - xserver owner - - - #3415: do not kill "explicitely non embeddable" processes when - killing embedded tools - - both fixed in 9.1-12mdk - - - - o DrakxTools: - =========== - - drakconnect: - o ltmodem support is missing from mdk9.1 [added in hp release] - o various other fixes came into mdk4hp release - - - explanations: most common ones are not logged because of a - standalone.pm vs common.pm methods overloading bug [not yet - fixed] - - - harddrake-ui: - o menu entry starts logdrake instead of harddrake's gui [fixed in - cvs] - o status bar is not cleared on config tool exit [fixed in cvs] - o title bar miss some spaces in french locale [fixed in cvs] - - - harddrake service: 5 second timeout was too short so it was - increased up to 25 seconds [in hp release] - - - localedrake/drakx: legal problem with rpc vs hong-kong||taiwan - [fixed in hp release] - - - - o Kernel: - ======= - - - ntfs driver has a hang, additionally also causing 100% cpu usage - if either the size of the ntfs filesystem or the number of MFT - entries fell to a certain range and statfs() system call was - invoked by an application (e.g. df, gnome system monitor, etc). - see #3353 - - it got fixed quickly but unfortunately too late for us - - the probability one hits this bug is 0.2% or every 512th users. - - updated ntfs driver (2.1.2a) is at the usual place, - - http://linux-ntfs.sourceforge.net/ - - or more precisely, - - http://sourceforge.net/project/showfiles.php?group_id=13956 - diff --git a/docs/BUGS b/docs/BUGS deleted file mode 100644 index 1d154fcf1..000000000 --- a/docs/BUGS +++ /dev/null @@ -1,10 +0,0 @@ -doInstallStep: if there's not enough room, error, but packages are marked installed :( - -when you click directly on setupFilesystems and you have scsi, you're fucked. -Even if you go to setupSCSI, you won't be able to have partitions again. - -bug non reproductible: -- /etc/passwd is empty after `root passwd' stage :( -- reboot at the end of package installation with a lot of error messages from -gtk about the progressbar - diff --git a/docs/COPYING b/docs/COPYING deleted file mode 100644 index 60549be51..000000000 --- a/docs/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 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 Library 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) 19yy 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. - - <signature of Ty Coon>, 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 Library General -Public License instead of this License. diff --git a/docs/HACKING b/docs/HACKING deleted file mode 100644 index b5844c846..000000000 --- a/docs/HACKING +++ /dev/null @@ -1,126 +0,0 @@ --=-=-- -DrakX is a very big project, and it needs special setups to work. -The purpose of this file is to explain how you can setup your box to make it -compile and run. --=-=-- - -Beware, don't try this on a production machine with important data. - - --------------------------------------------------------------------------- -Sources installation: - - First grab the gi.tar.bz2 archive and untar it in your home directory, -for example from DrakX-*.src.rpm on your Mandrake Linux distribution. - -cd to gi -for i in `du -a | grep CVS/Root | cut -f 2` -do - sed -e 's/prigaux/anoncvs/' $i > $i.tmp - mv $i.tmp $i -done - -Then, log yourself into the cvs: -% export CVS_RSH=ssh -% export CVSROOT=:ext:anoncvs@cvs.mandrakesoft.com:/cooker -% cvs checkout gi - (passwd: 'cvs') -And update the gi package: -cvs update -P -d - - --------------------------------------------------------------------------- -Preparing the compilation process: - -(1) target directory - -create a /export directory and copy a recent Mandrake Linux CD in there. -(You don't have to put have all the RPMS...) ; you'll need roughly 1.5 -Gbytes for a full install. - -[gc@obiwan ~/cvs/gi] su -c "mkdir /export" - - -(2) devel packages - -you need quite a few devel packages to run the stuff; roughly: gcc, make, -glibc-devel, perl-devel, XFree86-devel, libglib-devel, libgtk+-devel, -perl-GTK, ldetect*, libslang-devel, libnewt-devel, e2fsprogs, dosfstools, -rpm-devel, popt-devel, rpmtools, libbzip2*, libncurses*. - -you may need a few others I forgot to mention. if the compilation -fails, try to understand the message and install any necessary -remaining package. - - -(3) sudo - -never build or run DrakX as root; install package sudo, and set up -relevant permissions; the following should be enough: (in your -/etc/sudoers) - -gc ALL=(root) NOPASSWD:/usr/bin/patch,NOPASSWD:/bin/rpm,NOPASSWD:/bin/mount,NOPASSWD:/bin/cp,NOPASSWD:/bin/umount,NOPASSWD:/usr/bin/install,NOPASSWD:/bin/rm,NOPASSWD:/bin/mv,NOPASSWD:/bin/tar,NOPASSWD:/bin/cpio,NOPASSWD:/bin/chown,NOPASSWD:/bin/mkdir,NOPASSWD:/usr/bin/strip,NOPASSWD:/bin/mknod - - -(4) boot kernel - -you need one or more kernels and (all?) their modules. it's located in -subdirectory "all.kernels" in DrakX-*.src.rpm ; if you ever grab (or -build) another boot kernel, replace or add an entry in "all.kernels" as: - - (a) create your modules subdir (useful to describe the - VERSION_RELEASE) and untar your kernel - -[gc@obiwan ~/cvs/gi/all.kernels] mkdir 2.4.1-BOOTcustom -[gc@obiwan ~/cvs/gi/all.kernels] cd 2.4.1-BOOTcustom -[gc@obiwan ~/cvs/gi/all.kernels/2.4.1-BOOTcustom] tar jxvf ~/mycustomkernel.tar.bz2 -[gc@obiwan ~/cvs/gi/all.kernels/2.4.1-BOOTcustom] ls -boot/ cardmgr/ lib/ - - (c) build kernel/modules stuff for stage1 and stage2 -[gc@obiwan ~/cvs/gi] ./update_kernel - - -(5) pray - -[gc@obiwan ~/cvs/gi] make - - ---------------------------------------------------------------------------- -The comments written with #- are automatically stripped out at install. - - ---------------------------------------------------------------------------- -testing all: - - go to the perl-install directory and execute ./g_auto_install --test - - You should be able to test the whole thing in a non-destructive way. - -NEVER compile and/or execute DrakX as root! - - - - -Here is how I (dams) made it work on my computer. -------------------------------------------------- - -- get the sources -- install the librairies needed included newt-devel gtk+-devel popt-devel popt gtk-engines -- cd path/to/gi -- make -- mkdir /usr/share/gtk -- ln -s path/to/gi/perl-install/share/themes /usr/share/gtk -- ln -s path/to/gi/perl-install/share/step-* /usr/share -- ln -s path/to/gi/perl-install/share/help.xpm /usr/share -- ln -s path/to/gi/perl-install/share/isdn* /etc/sysconfdir/network-scripts -- have a cd architecture linked on /export -- ln -s /export /tmp/rhimage -- export PERL_INSTALL_TEST=1 -- cd path/to/gi/perl-install -- gendistrib --noclean --distrib /export -- ./install2 in root (dangerous) or chmod a+r /dev/hd* and ./install2 in user - - - -address all bugreports to dave@null.com diff --git a/docs/Partition-ends-after-end-of-disk.txt b/docs/Partition-ends-after-end-of-disk.txt deleted file mode 100644 index 3da57d561..000000000 --- a/docs/Partition-ends-after-end-of-disk.txt +++ /dev/null @@ -1,66 +0,0 @@ - Cylinder/Head/Size Hell Is Not Over - - pixel@mandrakesoft.com - $Date$ - - -Nowadays, you can boot Linux without ever relying on CHS -(Cylinder/Head/Size): - -- CHS information on partition table is obsolete and not used anymore. -It was causing the 1024th cylinder limitation: - - disallowing partitions above 8GiG. Problem overcome using 28bits Linear - Block Addressing (LBA) in partition table. - - disallowing to boot on partition above 8GiG (due to int13 limitation used - in bootloaders). Problem overcome using int13 extensions (EDD) - -Logical CHS (Cylinder/Head/Size) and physical CHS are not related anymore. -Especially the size of a hard drive is not a multiple of the number of -Cylinders. - - -The problem is that many tools still rely somewhat heavily on CHS information. -- most tools adjust partitions on cylinder boundary -- some tools compute the size of the disk based on CHS (eg: fdisk) - - -Resulting problems in various tools: - -- last partition not cylinder boundary adjusted, and overrun CHS computed size - - fdisk - > Total allocated sectors %d greater than the maximum %d - - cfdisk (need confirmation) - > FATAL ERROR: Bad primary partition %d: Partition ends after end-of-disk - or - > FATAL ERROR: Bad logical partition %d: Partition ends after end-of-disk - - Partition Magic (version?) - > Error #109: Partition ends after end of disk - - Windows <= 98se, Windows Me - (doesn't like it, what error message?) - - Tools handling it correctly: - - parted and so diskdruid in RedHat >= 7.2 (or is it 7.x?) - - diskdrake >= Mandrake 8.2 - - Windows XP (need confirmation) - - Tools using the full size of the disk, and so causing pbs with fdisk/cfdisk/...: - - diskdrake == Mandrake 8.2 - -- disagreement between CHS and linear address - - parted - > "Warning: Unable to align partition properly. This probably means that - > another partitioning tool generated an - > incorrect partition table, because it didn't have the correct BIOS - > geometry. It is safe to ignore,but - > ignoring may cause (fixable) problems with some boot loaders. - > Ignore Cancel ? C - - lilo - > Warning: Kernel & BIOS return differing head/sector geometries for device 0x80 - > Kernel: 38792 cylinders, 16 heads, 63 sectors - > BIOS: 1023 cylinders, 255 heads, 63 sectors - > Device 0x2100: Inconsistent partition table, 2nd entry - > CHS address in PT: 48:0:1 --> LBA (771120) - > LBA address in PT: 48384 --> CHS (3:3:1) - > The partition table is *NOT* being adjusted. - - diff --git a/docs/README b/docs/README deleted file mode 100644 index 79c62f6bb..000000000 --- a/docs/README +++ /dev/null @@ -1,381 +0,0 @@ -Well here is a little description of what DrakX needs to work in comparison -to the RH newt install. - -******************************************************************************** -* CVS ************************************************************************** -******************************************************************************** -Like all good free software, DrakX is in CVS :) - -You can access it at http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/gi - -or via - -export CVS_RSH=ssh -export CVSROOT=:ext:anoncvs@cvs.mandrakesoft.com:/cooker -cvs checkout gi - (enter password 'cvs') - - -This is only read-only access. If you want more, tell me (pixel@mandrakesoft.com) - -Alas, all is not in CVS as a lot of things are binary files. - -For the boot kernel, see https://kenobi.mandrakesoft.com/~chmou/kernel/BOOT/ -or build your own: -- install the kernel-*.src.rpm from -- go to the /usr/src/RPM/SPECS/ (or any others topdir you have configured). -- type rpm -ba --with BOOT kernel-2.4.spec. -Then see function install_kernel() at the end of gi/update_kernel. - -For the other things, take SRPMS/DrakX-*.src.rpm - -Please note that redoing *all* the stuff is not for the faint of heart. I myself -sometimes wonder what the whole make does :-% -Instead, changing some .pm files is quite easy (nice interpreted language) - -******************************************************************************** -* Making your custom install *************************************************** -******************************************************************************** -If you have your own rpms you want to add, or make your own updated cdrom, you -just have to issue: - -% gendistrib --noclean --distrib <DIRS> - -Where <DIRS> is the root of all the media that the install will see, this first -one is the main one : - -(1) network or 1-cdrom installs - DIRS == the root directory of the Distribution - -(2) multi-cdrom install - DIRS == the root directories of all the media that the install will see - -``gendistrib'' will scan the file Mandrake/base/hdlists in the main root -directory (the first one in DIRS) to search for all media used. Typically you -use Mandrake/RPMS* for RPM packages repository. -For multi-cd, please use Mandrake/RPMS or Mandrake/RPMS1, Mandrake/RPMS2, etc. -For one CD or a network/hd volume, please use Mandrake/RPMS. - -Optionnally, you can modify ``Mandrake/base/rpmsrate''; this file manages -the relative importance of the files, and thus their installation or not. - -Also, mdkinst_stage2.gz must be remade if you modify files in Mandrake/mdkinst. -See below for information about these files. - -******************************************************************************** -* FILES ************************************************************************ -******************************************************************************** -First here are the different things needed : - -Mandrake/base/hdlists - description of the available install media. - format is one line for one medium as - <hdlist_name> <rpms_directory> <description> - <hdlist_name> should be match regexp /hdlist\S*.cz2?/ - for example (two cd install) you get - hdlist1.cz Mandrake/RPMS1 Boot CD - hdlist2.cz Mandrake/RPMS2 Extension CD - -Mandrake/base/hdlist*.cz - table of rpm's headers, referred by ``hdlists'' - their contents can be listed using ``packdrake -l <hdlist_file>'' or - or ``parsehdlist <hdlist_file>''. - ! Need to be remade when Mandrake/RPMS* changes (with ``gendistrib'') ! - -Mandrake/base/depslist.ordered - for each packages, tell which package it depends on. Also contains the - size for some (obscure) bloody reasons. - ! Need to be remade when Mandrake/RPMS* changes ! - (with ``gendistrib --noclean --distrib .'') - -Mandrake/base/compss - obsoletes comps. It store packages in different categories, generated - from the %{GROUP} field - ! Need to be remade when Mandrake/RPMS* changes ! - (with ``gendistrib --noclean --distrib .'') - -Mandrake/base/rpmsrate - ranks and classify packages, so that the installer will know which - ones to install. format is : - <intern_group> - <level> <packages> - where <intern_group> is a symbolic name used in Mandrake/base/compssUsers* files, - and <level> defines importance level as described below : - 5 must have - 4 important - 3 very nice - 2 nice - 1 maybe - by default (for non expert), group selects packages for level 4 (important) - and 5 (must have). export mode add 3 (very nice) level. other level (below 2) - can only be selected using individual package selection. - -Mandrake/mdkinst - live system used on certain installs. See ``Ramdisk or not'' below for - more. - -Mandrake/base/mdkinst_stage2.bz2 - for the ramdisk. live sytem in ext2 filesystem bzipped2. - generated from Mandrake/mdkinst tree using misc/make_mdkinst_stage2 - See ``Ramdisk or not'' below for more. - -Mandrake/base/rescue_stage2.bz2 - rescue ramdisk. live sytem in ext2 filesystem bzipped2. - this is the ramdisk loaded when typing rescue on boot prompt. - there is no live system available, only the ramdisk is used. - -images/*.img - boot images to use with DrakX. Use: - - cdrom for cdrom install - - network for ftp/nfs install (non-pcmcia devices) - - hd for hard-disk install - - pcmcia for pcmcia install (see ``PCMCIA install'' below for more) - - the following modules have been removed from: - network.img: acenic sk98lin de4x5 - cdrom.img and hd.img: BusLogic seagate fdomain g_NCR5380 dc395x_trm tmscsim - hd.img: dpt_i2o eata eata_pio eata_dma - cdrom.img: aztcd gscd isp16 mcd mcdx optcd cm206 sjcd - pcmcia.img: apa1480_cb - they are now in "other.img", - - blank.img is a blank boot image without a kernel nor initrd. this image - can be used to generate custom boot disk (to use it: - compile your custom kernel with everything needed - compiled in the kernel, not as a module (loop.o, ext3.o - if needed, usb stuff, etc) and put the "vmlinuz" on the - blank.img, then boot on it) - - if you think one of those modules is used a lot, tell me, i may find some room - to put it back on the main floppies. - - -******************************************************************************** -* logs ************************************************************************* -******************************************************************************** -During install, a lot of interesting stuff can be found in different places: -in consoles and in files. To switch to console 2 for example, do Ctrl-Alt-F2 -from the X install. -- alt-F1: the stdout of the install. Not very interesting stuff -- alt-F2: simple shell. Quite a lot of commands are available but as they are -written in perl (for space), they do not handle the very same options as normal. -After install, you can do ``chroot /mnt'' to see your system just like after -rebooting. ``rpm -qa'' works for example. -- alt-F3: a lot of interesting things. Be carefull, some ``ERROR'' messages are -not interesting. -- alt-F4: kernel's place. aka the output of dmesg. -- alt-F7: the graphical install lives there - -- command "bug" puts on floppy lots of interesting stuff. -- /tmp/stage1.log: same as alt-F3 part when stage1 run (e.g. actions - before graphical install really begins) -- /tmp/ddebug.log: (nearly the) same as latter alt-F3 part -- /tmp/syslog: same as alt-F4 -- /mnt/root/drakx/ddebug.log: at the end of each step, DrakX tries to backup - /tmp/ddebug.log to /mnt/root/drakx. Available only after mounting of /. -- /mnt/root/drakx/install.log: the log of the installation (or upgrade) of the rpms -(just like rpm's /mnt/tmp/(install|upgrade).log) -- /mnt/root/drakx/auto_inst.cfg.pl: a kickstart file generated at the end of each -step. Can be used in 2 ways: kickstart install or ``defcfg'' install. Hopefully -you know about kickstart. ``defcfg'' is a way to customize the default values in -install. For example, French can be the default language with a qwerty keyboard, -the auto-partitionning partitions can be changed, the default user class can be -set to developer (!)... - -******************************************************************************** -* po translation files ********************************************************* -******************************************************************************** -DrakX uses .po files for its translation. A script takes the different -strings out of the .pm files. It generates the DrakX.pot file which contains -all the english strings to translate. -To add a new language, you just have to add it to lang.pm (if it's not there -already) and put the .po in the perl-install/po directory (see ``Ramdisk or -not'' to know if you have to regenerate the mdkinst_stage2.gz) - -******************************************************************************** -* PCMCIA install *************************************************************** -******************************************************************************** -If the media you use to install is a pcmcia device, use the pcmcia boot disk. - -******************************************************************************** -* Ramdisk or not *************************************************************** -******************************************************************************** -The DrakX install is much bigger than the newt one. So the ramdisk which was -used is getting big, and costs a lot in memory -(eg: the mdkinst_stage2 is 14MB - 23/09/99) -(update! now size is 21MB - 24/01/01) -(update! now size is 19MB - 26/04/01) - -| | newt | DrakX -|-------+---------+---------------------------------------------------------- -| nfs | live | live -| ftp | ramdisk | ramdisk -| http | ramdisk | ramdisk -| hd | ramdisk | live if Mandrake/mdkinst/usr/bin/runinstall2 is a link, -| | | ramdisk otherwise -| cdrom | ramdisk | live if memory < 52MB, ramdisk otherwise - -Where ramdisk is needed, if detected memory is below the limit allowed for -ramdisk (maintained in file gi/mdk-stage1/config-stage1.h; currently 52 Mb), -a failure dialog will be printed explaining that there is not enough memory -to perform the installation. - -When i say live, it means that the stage1 will *mount* the -Mandrake/mdkinst and use it that way. - -The ramdisk is used in place of the live in some cases. This ramdisk is filled -with mdkinst_stage2.gz - -For cdrom install, the ramdisk is used to speed up things (access time is quite -high on cdrom drives) - -For pcmcia, it depends on the type of install. - - -******************************************************************************** -* modules ********************************************************************** -******************************************************************************** -Modules can be found in at least 2 places: -- in /modules/modules.mar -- in /lib/modules.cz<KERNEL_VERSION_RELEASE> - -/modules/modules.mar is used in mdk-stage1. It contains only modules -interesting for one kind of install. For example in an hd install, it -contains scsi modules. For a network install, it contains network card -modules. (To create, extract or view files in a ``mar'' archive, please -use gi/mdk-stage1/mar/mar; this is basically an archive format meant to -be minimalistic) - -/lib/modules.cz<KERNEL_VERSION_RELEASE> contains all modules, it is used -in stage2. - - -To install a module, use modprobe which is in /usr/bin. It's a perl wrapper -around /usr/bin/insmod. It uses the dependencies found in -/modules/modules.dep (stage1). - -/usr/bin/insmod is a wrapper around /usr/bin/insmod_. It just extracts the -module out of /lib/modules.cz in /tmp. Then it calls insmod_. - -/usr/bin/insmod_ is the real prog (which you usually find in /sbin/). You need -to give it the complete path. - -******************************************************************************** -* Making screenshots *********************************************************** -******************************************************************************** -1. easy solution: press "F2"! - -2. On a test machine, make a network install, switch to console (ctrl-alt-F2), enter: -% xhost+ -then, on another computer: -% DISPLAY=test_machine:0 xwd -root | convert - screenshot.png - -******************************************************************************** -* Miscellaneous **************************************************************** -******************************************************************************** -> o Media access methods: nfs, ftp, http, hd, cdrom -> o Stages: init, stage1, stage2 -> - What exactly each stage does - -init loads stage1 -stage1 loads stage2, on various medium type - -stage2 is too big to fit on a floppy, that's why stage1 exists - -> - How each stage relates to the various media access methods - -stage1 knows only how to access to the media is compiled for. It contains only -the kernel modules needed for that media. For eg, the nfs/ftp/http stage1 -doesn't contain scsi modules nor ide. - -> - How one stage terminates and another begins. i.e., How does -> stage1 find, mount, and launch stage2? - -/sbin/init just starts /sbin/stage1 -/sbin/stage1 takes care of mounting stage2 (in ramdisk if necessary) - then it runs /usr/bin/runinstall2 - -> o Text and Graphic mode installers -> - Architectural overview of each - -have a look at gi/docs/object_class.fig - - -******************************************************************************** -* OEM ************************************************************************** -******************************************************************************** -> I am a system OEM in Bangalore,India selling systems bundled with -> Mandrake Linux. The problem is that with every system I sell, I need to -> install & configure the system which takes HOURS!. Can I do a diskcopy -> instead? -> -> Please Help. This is a major bottleneck for me. - -many solutions: - -- make an install on drive hdb, then : - dd if=/dev/hdb of=/dev/hdc - but you should make sure the hardware is *REALLY* identical. - -- try the oem feature - 3. - burn a cd out of *latest* cooker or 8.0 and above. - - boot on it telling "oem" to syslinux - !! it will destroy every data on the harddrive or - resize (or use free space) if *ONLY* one fat partition is defined !! - - you now have a very automated install matrix - (duplicate it with "dd if=/dev/hdb of=/dev/hdc bs=1M count=730") - - put the harddrive in the oem box, the user will now have an *very* automated - install, just asking the root password and user password, and some other - question according its hardware. - - 4. just like 3. but you may have to mount /cdrom after typing rescue on - syslinux prompt (oem script do it automatically if a automatic boot nfs - network has been done as server is known). under /cdrom may be anything - as long as it provides an installation tree of Mandrake Linux. - after that run oem script by typing "/etc/oem -f" for normal installation - or "/etc/oem -f server" for server installation (normal with server installed). - - 5. (just like 3. without burning a cd, doing the first part by hand) - have a look at the /etc/oem script on the rescue and do it by hand... - - -cu Pixel, fpons. - - -comments: -1. maybe copy unnecessary things -> take too long - solution -> use bs=8k count=xxxx -2. kernel_reread can be found on the new rescue, source is also at end of this -mail. This solution works with one partition. Can be easily enhanced to many -primary partitions... For extended partitions, more complicated, but not much :) -3. has just been added in latest cooker. It may still have some pb. The main -current limitation is IDE only, though it can be fixed easily for special cases. - --------------------------------------------------------------------------------- -#include <stdio.h> -#include <sys/mount.h> -#include <fcntl.h> - -void die(char *msg) -{ - perror(msg); - exit(1); -} - -void kernel_read(char *dev) -{ - int fd; - if ((fd = open(dev, O_RDONLY)) == -1) die("can't open device"); - ioctl(fd, BLKRRPART, 0); - close(fd); -} - -int main(int argc, char **argv) -{ - if (argc != 2) { - fprintf(stderr, "usage: kernel_read_part <hard drive device>\n"); - exit(1); - } - kernel_read(argv[1]); -} diff --git a/docs/README.devel b/docs/README.devel deleted file mode 100644 index 989946de9..000000000 --- a/docs/README.devel +++ /dev/null @@ -1,252 +0,0 @@ -Well here is a little description of how DrakX can be modified or extended. -Please refer to README file for getting DrakX code source and to known more -exactly how it works and what it can do. - - -******************************************************************************** -* Execution of DrakX *********************************************************** -******************************************************************************** -DrakX has originally be written by pixel in perl and C. -entry point for stage2 is /usr/bin/runinstall2 which is typically a link to -/usr/bin/install2 which simply load module install2.pm and execute -install2::main with @ARGV. - -install2::main parse command line arguments, prepare installation, find the right -install_interactive class (take a look at gi/docs/object_class.fig) according to -command line, memory available and if the interactive chosen is initializing -correctly, else it will try a less-demanding interactive object. -Once done, $::o is set to this install & interactive object and main runs the -various step of install2 defined in $o->{steps}, starting with $o->{steps}{first} -and iterating with method install_any::getNextStep(). -while running step, it trap any errors that may arise and use perl exception to -change step. - -******************************************************************************** -* DrakX modules descriptions *************************************************** -******************************************************************************** -Here is a brief description of what each modules of DrakX is doing. - -install2: main module of DrakX as described above, main loop execution of DrakX. - -install_steps: generic installation module containing steps definition, all steps - should always be defined here as some methods may be used on automatic mode. - there is no interactivity available. typically are defined base operation for - configuring each step according to $o. - -install_steps_interactive: generic installation module with generic interative - methods. typically are found all interactive code of DrakX for each steps. - -install_steps_auto_install: implementation installation module without interactive - methods to match auto_install mode. this is the simplest as almost no method are - redefined (inherit module install_steps only, compared to other implementation - modules described below). - -install_steps_stdio: implementation installation module with interactive stdio - methods to match stdio mode. inherit modules install_steps_interactive and - interactive_stdio. - -install_steps_newt: implementation installation module with interactive newt - methods to match newt mode. inherit modules install_steps_interactive and - interactive_newt. - -install_steps_gtk: implementation installation module with interactive gtk - methods to match gtk mode. inherit modules install_steps_interactive and - interactive_gtk. - -install_any: contains various methods using generic interactive interface but - not used by standalone tools. - -install_gtk: contains various methods using gtk interface but not used by - standalone tools. - -interactive_stdio: implementation methods for interactivity in stdio mode. - inherit module interactive. - -interactive_newt: implementation methods for interactivity in newt mode. - inherit module interactive. - -interactive_gtk: implementation methods for interactivity in gtk mode. - inherit module interactive. - -my_gtk: basic gtk access methods. - -any: contains various methods using generic interactive interface. to compare - against install_any module as this one is available for standalone tools. - -class_discard: simple module that implement every methods undefined to return - nothing. this trick is used to ensure no undefined method can arise when using - code that reference interactive method which are not defined. - -common: contains very simple and very usefull (common) methods to do various task. - some methods inspired by functionnal language. - -c: contains wrapper to C definition of methods used by DrakX, use of C is necessary - for C extern libraries interface (rpmlib, ldetect), kernel interface, XFree - interface. - -commands: implement some un*x commands, conflicting name with perl contains - trailing underscore (_). this module is used by commands perl script that - determine which command to run according to $0 (this is used this way when DrakX - is running). - -run_program: allow running a program with redirection but without using a shell. - allow rooted execution. - -help: contains all help message displayed by DrakX. - -log: log facility methods. - -lang: language manipulation methods, get and set sysconfig file, load po. - -keyboard: keyboard manipulation methods, get and set sysconfig file, set console - keyboard mapping. - -mouse: mouse manipulation methods, get and set sysconfig file, change mouse. - -timezone: time zone manipulation methods, get and set timezone. - -services: services manipulation methods, activate or delete services (see - /etc/rc.d/init.d directories). - -detect_devices: manage detection of various class of hardware. - -devices: manage device file, create device special according device name. - -partition_table: base partition table management methods, it manages - appriopriate partition_table_XXX object according to what has been read - as XXX partition table type. - -partition_table::bsd: matches a BSD partition table. - -partition_table::dos: matches a DOS partition table. - -partition_table::emtpy: matches an empty partition table. - -partition_table::mac: matches an Apple partition table. - -partition_table::raw: generic class for the following partition_table::XXX. - -partition_table::sun: matches a Sun Label partition table. - -fs: read and write /etc/fstab file, mount and umount, format. - -fsedit: manage (modyfy, edit) mount point associated to partition (like editing - /etc/fstab). - -swap: swap management methods, format and mount (activation). - -raid: raid (software only) management methods. - -lvm: lvm (Logical Volume Manager) management methods. - -loopback: loopback management methods, used for lnx4win type installation or using - a file as a partition. - -diskdrake: diskdrake itself, disk graphical (using gtk) manipulation tools. - -ftp: ftp mangement methods, used when using ftp install. - -http: http management methods, used when using http install. - -modparm: kernel modules options management, allow building nice dialog with each - module parameter available. - -modules: kernel modules management, allow loading or unloading (ala modprobe or - insmod). - -printer: printer management methods, read and write both LPR or CUPS configuration. - -printerdrake: interactive printer management methods. - -network: network management methods, get and set sysconfig file. - -netconnect: network configuration wizard. - -netconnect_const: network configuration wirard data. - -Xconfig: X configuration (monitor + already existing config file) management. - -Xconfigurator: X configuration wizard. - -Xconfigurator_const: X configuration wizard data. - -booloader: bootloader (LILO, GRUB, LOADLIN, SILO) configuration management methods. - -pkgs: rpm package and hdlist, depslist management methods, allow selecting or - unselecting packages, manage rpmsrate file and select group, installation and - removal methods of rpm file. - -crypto: *obsoleted* module to manage crypto site and rpm file. - -standalone: standalone only, allow defining a standalone tools. - -bootlook: standalone only, interface with DrakConf to configure bootloader options. - -drakfirewall: standalone only, interface with DrakConf to configure a tiny firewall. - -******************************************************************************** -* DrakX FAT resizer module description ***************************************** -******************************************************************************** -here is a fat resizer written in perl and C used by DrakX (diskdrake) to resize -FAT16/FAT32 partition. it moves clusters to make sure a shrink can be done on the -limit of the partition itself, if no cluster need to be moved, only boot sector -partition limit are modified. - -any: various methods to flag cluster, compute min size. - -boot_sector: boot sector management methods. - -c_rewritten: originally resize_fat was only perl, this contains code section that - are the most sensible to speed or memory contraints and have been rewritten to C - using perl extension. - -dir_entry: manage directory structure. - -directory: traverse directory recursively, needed to move correctly cluster. - -fat: manage fat structure. - -info_sector: manage info sector. - -io: manage I/O on disk (need to take care of big file as partition size may be - larger than 2GB). - -main: main resizer algortihm. if needed allocate new clusters, copy files, copy - directories. update boot sector info. - -******************************************************************************** -* Adding a new step to DrakX *************************************************** -******************************************************************************** -Say we want to add a question for setting "alawindows" option. -We put it pretty early in the install, let's say after "Select Installation -Class". - -1. in install2.pm - -add - - selectAlawindows => [ __("A la windows or not"), 0, 1, '' ], - -after - - selectInstallClass => [ __("Select installation class"), 1, 1, '' ], - -the 0, 1, '' means not "redoable", "skip on error", "don't hide" - -2. add your function selectAlawindows in install2.pm - -sub selectAlawindows { $o->selectAlawindows } - -3. add your function selectAlawindows in install_steps_interactive.pm - -sub selectAlawindows { - my ($o) = @_; - $o->{alawindows} = $o->ask_yesorno('', _("Throw everything away as windobe does?"), 1); -} - -4. add your function selectAlawindows in install_steps.pm (not needed in that -case, except for auto_install) - -sub selectAlawindows {} - - diff --git a/docs/README.pxe b/docs/README.pxe deleted file mode 100644 index 2ddd205fe..000000000 --- a/docs/README.pxe +++ /dev/null @@ -1,133 +0,0 @@ -Here is a short description to configure a PXE server using dhcpd and tftpd. -This allows a network boot for your ethernet card conforming to the Interl -PXE specification. - -******************************************************************************** -********** General overview ************ -******************************************************************************** - -You need a dhcp server and a tftp server on one or two machines to allow the -network boot. We are not using a PXE server to achieve this as it is not -mandatory. -You can install tftp-server and dhcp-server package from the Mandrake -distribution for example. - -On the server machine at 192.168.2.1, you will find a "/etc/dhcpd.conf" sample -file written by Florin Grad <florin@mandrakesoft.com>, where "mydomain.com" is -assumed to be your domain name, and 192.168.1.1 a name server. All install are -done on subnet 192.168.2.0. - -All the files that will be downloaded by the tftp daemon are located under -"/tftpboot" : - "/tftpboot/pxelinux.0" is a program that is loaded directly by the machine - where a network boot will be done, this program comes - from the SYSLINUX package by H. Peter Anvin. (look at - http://syslinux.zytor.com/pxe.php for more information) - "/tftpboot/pxelinux.cfg/" is a directory where all configuration file for - pxelinux.0 will be found, pxelinux.0 will download - these file by itself. It searches first for a file - named accordind to the machine IP address in - hexadecimal, for example for 192.168.2.20, it - looks for "C0A80214" first, then "C0A8021" and so - on down to "C0", "C" and "default". - "/tftpboot/network.rdz" is the standard network initrd for Mandrake installation. - "/tftpboot/vmlinuz" is the boot kernel for installation. - "/tftpboot/help.msg" is the message displayed by pxelinux.0, note that currently - graphical message (as for install using SYSLINUX 1.48 with - graphic patch by Mandrake) is not supported. - -All file "network.rdz", "vmlinuz", "help.msg" can be found by mounting "network.img", -or the network floppy disk used for install, "pxelinux.cfg" is just an adaptation -of the file found on the "network.img" called "syslinux.cfg" but without the reference -to boot.msg (as it is not currently supported). - -Update network configuration for your needs and start dhcp server on the machine and -tftp server and this should work. - -******************************************************************************** -* /etc/dhcpd.conf ************************************************************** -******************************************************************************** -ddns-update-style ad-hoc; - -authoritative; - -option space PXE; -option PXE.mtftp-ip code 1 = ip-address; -option PXE.mtftp-cport code 2 = unsigned integer 16; -option PXE.mtftp-sport code 3 = unsigned integer 16; -option PXE.mtftp-tmout code 4 = unsigned integer 8; -option PXE.mtftp-delay code 5 = unsigned integer 8; -option PXE.discovery-control code 6 = unsigned integer 8; -option PXE.discovery-mcast-addr code 7 = ip-address; - -default-lease-time 28800; -max-lease-time 86400; - -option domain-name "mydomain.com"; -option domain-name-servers 192.168.1.1; - -class "PXE" { - match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; - option vendor-class-identifier "PXEClient"; - - vendor-option-space PXE; - option PXE.mtftp-ip 0.0.0.0; - next-server 192.168.2.1; #tftp server location - - filename "pxelinux.0"; # standard TFTP - -} - -shared-network "mynetwork" { - subnet 192.168.2.0 netmask 255.255.255.0 { - option subnet-mask 255.255.255.0; - option routers 192.168.2.1; - - ddns-domainname = "mydomain.com"; - - pool { - range 192.168.2.10 192.168.2.20; - allow members of "PXE"; - } - } -} -******************************************************************************** -* /tftpboot/pxelinux.cfg/default *********************************************** -******************************************************************************** -default linux -prompt 1 -timeout 72 -display help.msg -label linux - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=788 -label vgalo - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=785 -label vgahi - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=791 -label vga16 - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga16 -label text - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 text -label patch - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 patch vga=788 -label expert - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 expert vga=788 -label rescue - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 rescue rw -label oem - kernel vmlinuz - append ramdisk_size=32000 initrd=network.rdz automatic=method:cdrom root=/dev/ram3 rescue oem rw -******************************************************************************** -* Usefull linkst *************************************************************** -******************************************************************************** - -http://syslinux.zytor.com/pxe.php -http://www.kano.org.uk/projects/pxe/ diff --git a/docs/SHORTCUTS b/docs/SHORTCUTS deleted file mode 100644 index 93a7133db..000000000 --- a/docs/SHORTCUTS +++ /dev/null @@ -1,51 +0,0 @@ -******************************************************************************** -main shortcuts - -F1 -> help -F2 -> take a screenshot -F11 -> previous step -F12 -> next (reachable) step - -******************************************************************************** -diskdrake - -taken directly from diskdrake.pm: - - "a" => \&Active, - "b" => \&Move, - "c" => \&Create, - "d" => \&Delete, - "f" => \&Format, - "m" => \&Mount_point, - "M" => \&Mount, - "n" => \&Create, - "o" => \&ReadFromFile, - "s" => \&SaveInFile, - "q" => \&Exit, - "r" => \&Resize, - "t" => \&Type, - "u" => \&Unmount, - "w" => \&WritePartitions, - "W" => \&WriteFstab, - -hopefully it is explicit enough :) - -******************************************************************************** -list choice - -- acceleration a la windows (default): enter a letter and the selection will move to the -first entry beginning with that letter. If you enter another letter it will try -to find the entry beginning with the 2 letters you have given. In case it fails -the starting_word is reset. -- incremental search a la emacs: searches trough the list - -Use control-s to use incremental search and then to search next occurence - -******************************************************************************** -in case of complete mouse sh**t - -XFree86 provides a way of moving the mouse pointer: -- first, press Ctrl-Shift-NumLock -- then move the pointer with the keypad arrows -- press button is ``0'' (aka Inser) -- release button is ``.'' (aka Suppr) diff --git a/docs/TODO b/docs/TODO deleted file mode 100644 index cb9399f82..000000000 --- a/docs/TODO +++ /dev/null @@ -1,515 +0,0 @@ --URGENT--------------------------------------------------------------------------------- -check for fpons/pixel BOTH that resize_fat is clean for current version -relative to 7.0-2. - -heavy testing of diskdrake to avoid corrupting partition table, current version -should be available to fix bogus partition table, writing enabled only when -partition is Ok (fixme? allow primary partition inside extended one, but with -warning on diskdrake startup, made them as warning ?). - --features------------------------------------------------------------------------------- -add rpmdrake in menu - -(7.1 or later) clean SCSI CDROM autoboot. -(done,gc,8.0) stage1 & cdrom: add ability in expert to choose the scsi cdrom drive to use - -(7.1)better help for partitioning in newbie - -(7.1)Improved network configuration (PPP and/or Ethernet) -PPPoE install and configuration (SuSE includes it, DHCP-like) -(7.1)standalone applications for configuration (netdrake, timetool, authentificationconf, soundcard) - ----- -(7.2) replace normal with standard (in the installClass's) - -(7.2 or later)horizontal sub-steps - -(7.2 or later)diskdrake in text mode - -ask "do you have SCSI?" before asking "probe PCI or not" - -(?) paride in stage1 -(done,gc,8.0) stage1 & network: add ability to choose the network interface to use - -(?) msec custom - -(?)firewall configuration (instant firewalling?) - -(?)widget for displaying fdisk (dindinx) -add fdisk using the zvt widget (taken in gnome-libs) - -(?)help in some configuration files. - -ability to add nfs/weird_fs entries in fstab - -size of packages in crypto - --to test-------------------------------------------------------------------------------- -what's lseek64? - -ensure installClass is set to something in auto install. - -for axp, swriteboot -f1 if swriteboot failed. -axp with swap part sigsegv - -tree for choosing monitors (buggy?) - -what happens if a module fails to insmod (scsi step), in beginner/normal/expert - -fstab must be sorted (/usr/local after /usr) - -RAID upgrades - -add choice clean /tmp or not in expert - -kernel chosen by default must be the one according to supermount/secure - -bug if ide-scsi, no more hdX, but scd0 (aka sr0) - (and add alias block-major-11 ide-scsi ?) - -check on update for conf.modules and modules.conf ! - -with /usr, /usr/local and /usr/local/e mount points i get an error at step mounting local filesystems - --easy fixes----------------------------------------------------------------------------- -rpmdrake proposition for cdrom labels - -use option nocheck to mount for upgrades - --fixes needing thinking----------------------------------------------------------------- -bug: changing mem= in miscellaneous doesn't modify lilo conf if you backtrack - -ask network configuration only if NIC found? - -configure DHCP for newbies if ethernet & DHCP card available - -xvidtune like screen configuration (see SuSE's yast) - -live cdrom for alpha (sparc?) - -network boot - -get the error when getting/reading .rpm files fail -better timeout handling for network installs - -handle not enough room for update -(fpons)verify the free space is big enough. - -the XFdrake test does not handle the fontset - -> Here I go into the printer configuration select 'HP Deskjet 722C Colour', -> print a test ASCII page, pressing 'No' when prompted to indicate the page did -> not print OK and then hitting cancel when prompted to choose a printer type -> again. -> ask_from_list cancel at /usr/lib/libDrakX/my_gtk.pm line 504. - -diskdrake: take from parted mklabel, hide(?) - -bug in kde desktop if keeps home but not an upgrade - -bug in users: mandrake user is added twice in strange installs -(mixed of security 0 + ???) - -bugs rpmdrake: -- just after installing a package, switch to `Installed', the package has wrong name -- refresh the kde desktop after package installation in rpmdrake -(restart kpanel) -- rpmdrake and same name packages - -urpmi: pb if XXX-devel requires XXX = 1.2.3 and we updgrade XXX-1.2.3 - -bug in defcfg in with lang=fr_FR, display is buggy - -bug keyboard focus: after switch in console at Xconfig step - - - --to look at-------------------------------------------------------------------------- -adduserdrake to remove/update users - -(???)free provider auto configuration facility (to be discussed). -auto ppp-configure with free provider - -(?)on laptop, configure the MMU to use swap not very often - -(?)checkboxes in groups based on compssList (and availableSpace?) - -(?)see what can be done with nvram (50 bytes to save information) - -better wacom support - -(fpons)bug: CANON BJC 4X00 do not work with current rhs-printfilters - (work with magicfilters (debian)) - (should be handled by ghostscript BJC600's driver) - -(pix)install text on mem=8M, mem=16M? - -(pix)kickstart -partitioning? raid? -X configuration and bootloader in kickstart - -XFdrake chooseResolutions with ask_from_list do not permit ``Show all'' - -(?) options in mkfs, progress bar when formatting - -(?) when some error occurs, partition must be unset isFormatted - --hardware------------------------------------------------------------------------------- -- with no floppy drive, mkbootdisk step fails badly -- with bad floppy or write protected, mkbootdisk doesn't say anything -- try detect_devices::floppies (and how are scsi floppies handled?) -maybe: do a iotcl FDGETPRM to detect fd1, fd0. - -need a simple solution to precise mouse type (syslinux option?) - -ELSA Gloria has bad ddc info - -token ring is tr0 not eth0 - -I have Mandrake 6.1 installed and working on a ThinkPad 770. -To enable the PCMCIA Token ring I have to append the following line to -/etc/pcmcia/config.opts -module "ibmtr_cs" opts "mmiobase=0xd2000 srambase=0xd4000" - -smp not detected (mhoward@memphisonline.com on cooker, bios=BP6PW) - -UDMA66 (ultra66.o for promise) - -aha152x needs "insmod aha152x.o aha152x=0x140,11,7" - -(obsolete) usb module not removed if no mouse found - -(fpons)handle dat drives - -hibernation on laptop -> clock not restored - -# in 2.3.15 "Silicon Integrated Systems [SiS]|SiS900 10/100 Ethernet" is handled - -(?)enable the testing of the mouse type (under X) (wheel) -possibility to specify the mouse - --(?)--------------------------------------------------------------------------------- -(?) handle NT (add entry for it in lilo, put it in fstab) - -(?) lilo-0.22-19mdk is buggy with boot=/dev/hde & root=/dev/sda13, it needs -disk=/dev/hde bios=0x80 & disk=/dev/sda bios=0x81 - -(?)using setxkb, enable the testing of the keyboard - -(?)XFdrake does not handle fbdev - -(?) Je viens de faire une installation sur une machine où seul Be était -installé. Je l'ai supprimé et installé (mode recommandé) Oxygen. Au -redémarrage, le boot manager de Be apparaît et il est impossible de -démarrer Linux. -Pourquoi ne pas installer LILO si on supprime toutes les partitions ? - -(?)initrd in bzip2 - -(?)smaller zsh (or ash in initrd) - -(?)is configureNetworkNet needed with dhcp/bootp? - -(?)bug in upgrade: install from hda1:/usr/local/blah with hda1:/ - -(?)mandrake_desk was not installed while kdebase it there on upgrade - -(?)when clicking on X configuration, installation of packages is not displayed - -(?)maybe remove commented lines in /usr/lib/perl5/... files - -(?)timezone using a picture (pb: how to delimit zones) -when asking GMT or not, display the time for each possibility -the list is too big for USA - -(?)ability to select the type of install when booting of cdrom -(?)use the ability of el torito to handle 2.88MB or more - -(obsolete)lilo-deinstallation in case of lilo auto-installation for beginners - -(?)loadFont sucks - -(obsolete)trash on the screen when X first starts - -(?)remove the gray line surrounding the logo - -(?)cleanup /etc/services & /etc/protocols - -(?)strange: no scsi of type 'fd', only 'tape' - -(?)remount ro before X test. - -(?)remove every << and >> (doesn't handle > 32bits) - - --done--------------------------------------------------------------------------------- -(7.1,done,fpons) improve printerdrake to at least have the same functionalities as printtool. - -(done,fpons)diskdrake can olverlap partitions (resize lower, resize original typically -after clear all and auto allocate, try maximal size available). - -(done,fpons)rewrite mouseconfig in perl? - -(done,pix)kudzu or not in miscellaneous - -(done,pix)warn the user if not enough ram to fulfill install - -(done,fpons)test after printer config - -(done,pix)ask for more than the memory size detected - -(done,fpons)modem config - -(done,pix)call kudzu in batch to initialize its list - -(done,pix)standalone generator of mdkinst_stage2.gz - -(done,pix)text install - -(done,pix) if u choose mouse usb != found mouse, it fails at X config - -(done,pix) diskdrake bug: saved information on floppy contains isMounted. - -(done,pix) update devices.c from modules.pm - -(done,pix) in lilo.conf, put -disk=/dev/hdb - bios=0x80 - -(done,pix) diskdrake -auto_partitions -suggested partition tables must be better foreach installClass - -(done,pix) update the list of modules (in update_kernel) - -(done,pix) language support: only choose the right locales and upmark the packages requiring it - -(done,pix) move security question before isntallation of packages - -(done,pix) install ssh - -(done,fpons,pix) change the boot message of syslinux (have something different from RedHat) - -(done,pix) install_steps.pm: 569 (128M + 3) - -(done,pix) bug: mouse freeze just before network configuration (mouse primax) - (was kudzu) - -(done,pix) signal 11 in stage1 nfs kickstart mount failed - -(done,pix) ask supermount or not, no supermount with kernel-secure - -(done,pix) fix bug in g_auto_install (can't go through all) - -(done,pix) bug: install from ciril.fr fails - -(done,pix)wizard for partitioning in case of one full vfat - -(done,dindinx)app for choosing drakxtools (drakxconf) -(done,pix)verify being root -(done,pix)log::l -> initlog - -(done,pix)install apmd for laptops (maybe not start apmd though) -(done,pix)icewm apm (sh icewm_apm) -(done,pix)kde apm (put Kapm.kdelnk in ~/Desktop/Autostart) - -(done,pix)bug in adduserdrake: missing pwconv in md5 -(done,pix)correct the default value of draksec (cp draksec) -(done,pix)in draksec, (and maybe others) have --expert as default if /etc/sysconfig/system has TYPE=expert - -(done,pix)bug in XFdrake in install, cancel in choose Card do not close the window - -(done,pix)in XFdrake, testing should not overwrite /etc/X11/XF86Config - -(done,pix) hwiz and supermount and eject :( - -(done(replaced by msec's),pix) bug: usermod -G urpmi a not done (full install) - -(done,pix)perl and .ph's - -(done,pix) BUG bootp in network install sigsegv - -(done,pix) move the last done stuff before Xconfiguration if possible - -(done,pix)draksec is buggy, don't try security >= 4 - -(done,pix)install apmd on laptops?? (maybe ask emcweb@btinernet.com (see alix)) - -(done,pix)missing alias ll for root - -(done,pix)urpmi.addmedia: |gzip instead of doing it afterwards - -(done,pix)locale (and fonts?) buggy in case ramdisk is used - -(done,pix)rpmdrake: Installed packages not in hdlist should be there - -(done)in ftp install, locale not installed properly - -(done,pix)pcmcia.img does not handle hd/cdrom - -(done,pix)cyrillic font buggy in DrakX - -(done,fred)remove xfs user from kdm - -(done,pix)bug with 2 cdrom drives (.kdelnk to there for 1st drive) - -(done,pix(works))test ramdisk stage2 and romanian - -(done,pix)kfmrc - -(done,pix)on laptop, default to 1024x768 - -(done,pix)mkinitrd and deps - -(done,fred(removed the call))XFdrake and mousedrake freeze if lothar launches them - -(done,pix)crypto message - -(done,pix)test bug with lilo and windows (if not on mbr) - -(done,pix)removed icons come back later (kde desktop) - -(done,pix(was bug in upgrade reading old config)) - segfault in linuxconf (adapter 1 empty) - (test with the sysconfig sent) - -(done,fpons)bug: Lrosqu'on effectue une mise à jour et que /etc/lilo.conf -contient la variable « default » positionnée sur autre chose que -« linux » ou « windows », DrakX est incapable de générer LILO. - -(done,fpons)bug: GeForce and hd.img? - -(done,fpons)for upgrade in expert, give choice of packages to install - choosing packages available in upgrade? - -(done,pix)rpmdrake: pb uninstalling package with dependencies (rpmdrake is killed?!) (as root too) - -(done,pix)noatime option for ext2 fs on laptops (do not wake up the hd) - Do not update inode access times on this - file system (e.g, for faster access on the - news spool to speed up news servers). - -(done,pix)kde's icons: 28 horiz and 25 vert grid for big icons - -(done,pix)bug: DrakConf don't follow the charset -> add setlocale(LC_ALL, "") -(done,pix)for ko|ja|zh, gnome-terminal should point to rxvt (-CLE) -(done,pix)group cdrom in /etc/group (gid=22) -(done,pix)drakxtools should require urpmi -(done,pix)bug: gdm unset LANG -(done,pix) zip with automount -> ppa not autoloaded -(done,pix)when you set the kde icons to Large, maybe it'd be good to chown the .kderc -(done,pix)lilo in russian/japaneese is horrible -(ok,pix)test ide burners -(ok)test check bad blocks optional for mke2fs -(done,pix)hd install: no umount is done at the end of install :( - -just before release: -(done,pix)- mandrake_doc-xx, the symlink is no good in /usr/doc/mandrake as -(done,pix)- crypto dependencies to update -(done,pix)- update kudzu's pcitable -(done,pix)- update pcitable for 86C368 if 3.3.6 (and other S3 3D's) - ("ATI|3D Rage P/M Mobility AGP 2x" -> changed to Server:Mach64) - -(done,pix)with 2MB of video ram, chooses 8bpp instead of 16bpp - -(done,pix) replace - { device => "loop7", type => 0x83, size => ((cat_('/dos/lnx4win/size.txt'))[0]*2048), mntpoint => "/", isFormatted => 1, isMounted => 1 }, -by - { device => "loop7", type => 0x83, size => cat_('/dos/lnx4win/size.txt') * 2048, mntpoint => "/", isFormatted => 1, isMounted => 1 }, - -(done,fpons)in ftp install, bug with X server install with wu-ftpd 2.6 (see http://www.wu-ftpd.org/broken-clients.html) - -(done,pix)ask package installation languages (must be put in RPM_INSTALL_LANG) - -(done,pix)bug (by dadou): Si la partition racine est trop petite pour installer le système, un -message d'erreur apparaît pour signaler le problème (bien) mais on ne -peut en sortir. La seule solution est de redémarrer. - -(obsolete)bug when selecting compssUsers, do not deselect after (if u deselect) - -(done,pix)detect ide burners and then add hdX=ide-scsi to kernel cmdline - -(done,pix)urpmi: handle many args on cmd-line - -(done,pix)fix any // in path to ftp server otherwise windobe server bug :( - -(done,pix)diskdrake and auto partitioning, may have the last creation of partition rejected, -try to figure why? - -(done,pix)in chooseResolutions: display the graphic card found - -(done,pix)with pcmcia, need ONBOOT=no - -(fpons,done) XFree: handle by card options -eg: SIS6326 needs "no_bitblt" "no_bltimage" and 24bpp instead of 32bpp - -(done,pix) Xconfiguration: if "can't open fixed font", relaunch xfs. - -(obsolete) pb with dependencies ``missing'': icewm do not require XFree86 and so you can have icewm but no X server - -(obsolete) bug in ext2resizing (no sparse superbloc, don't finish properly) - -(done,pix,7.1)manage a lot of language (ergonomic issue as it already exists) - -(done,pix,7.1)tree for choosing things like timezone, monitors, graphic cards, modules, mice, keyboard? ... - -(done,pix,7.1)sound config, although very simple, no dedicated steps and only PCI (or maybe ISA-PNP if time left ?) - -(done,pix,7.1)partitioning, keyboard shortcut. - -(done,fpons,7.1)index/compress hdlist? (for multi-cd) -! for multi-cd live is mandatory, small transaction are mandatory too. - -(done,pix,7.1?)loopback partitions (even root one) - -(done,pix)in ok_cancel, focus has 3 states, should be 2 (ask dindinx) - -(done,pix,7.1)Generally improved package selection /ergonmic issue. -Tree -> CTree, ``all'' branch with all packages -show the value associated (100->a must, 90->great, 80->nice, ... 10->useless, 0->do not install) - -(done,pix)let diskdrake have dos/win partition automatically set up with mount point, -this will help loopback too. - -(done,pix,7.1)grub - -(done,pix,7.1)feature missing: cancel installation - -(obsolete) bug in diskdrake: can in strange cases create a primary partition at sector #0 - -(done,pix(partly, protection against bugging))bug in diskdrake: -in expert: blank, create hda5 at beginning, create hda6 at the end, create hda7 -in the middle, remove the first one. Result hda5 at the end and bug. - -(obsolete) have a better time estimation of the remaining time in install packages - -(done,dindinx+pix)ask_many_from_list can't keyboard scroll - -(done,pix,7.1)individual package selection: double click is tiring... - -(done,fpons,7.1) sparc ehancement, avoid V7+ machine target (div and mul not in v7 standard) - -(done,fpons,7.1)syslinux in graphical mode to be improved for heavily bogus BIOSes. - -(done,pix)missing feature in lilo configuration: can't give hda2 with /boot/vmlinuz if -already hda1 with /boot/vmlinuz - -(done,pix)in 640x480 install box is to small (cuz of 'Cancel' button beeing added) - -(done,pix)chooseGroup with individual alone - -(done)(7.1) rewrite crypto stuff -(done)crypto: add a cancel & progress bar while downloading -(done)error handling (like reading hdlist) -(done)(7.1)progression bar on crypto. - -(done, daouda&pix,7.1, other persons)rescue: -- small modification for stage1 to get the rescue stage2 -- create a stage2 with many tools (fdisk, bash...) -the rescue could be on another cd (if multi-cd) -! care must be taken about modules (if ide is in module...) - -(done,7.1)install in 800x600 -- need handling of both 640x480 (mostly for VGA16) and 800x600 - -(done,NEED 7.1) auto-install for corporate, very important (need consolidation). diff --git a/docs/advocacy b/docs/advocacy deleted file mode 100644 index 9e7f00b6b..000000000 --- a/docs/advocacy +++ /dev/null @@ -1,87 +0,0 @@ -a little DrakX history: - -june 1999: - i start rewriting redhat's install in perl, partly for the fun of it. I'm - still working for the army - -5 july 1999: - i start full time job at mandrakesoft. But we don't have many computers and i - must share the accounting computer with Merieme who is working half-time. No - test machine (i test on others box, and destroyed Jacques partitions once), - guess how it slows things down? - -august 1999: - at last computers, even test one - first DrakX version which can install things, very very rough - -september 1999: - a friend of mine help me 2 weeks on DrakX relayed by Francois - -november 1999: - first released version of DrakX (goldpack). Not really stable yet. - -january 2000: - 7.0 is out, with a DrakX quite stable - -july 2000: - dams starts working on draknet - -mid-october -> mid-january 2000: - gc rewrites the stage1 to win every kb we can - -> size divided by 7 (!) for cdrom - - -The DrakX team is also doing a lot of other things: -- drakxtools -- urpmi, early MandrakeUpdate, early rpmdrake... -- Mandrake Control Center (new DrakConf) -- packages maintenance/enhancing (esp. ghostscript, 3D-wrappers, lilo) -- fixing core packages to make them installable -- scoring packages, sorting them, flagging them... (compssList, rpmsrate) -- reading/answering cooker and other MLs -- helping non-perl gurus :) - -That doesn't give much. Me being the one more working on plain DrakX. It gives 2 -people working for 1.5 years. IMO it isn't ``spending an enormous amount of -resources''. -And what do you mean by ``compared to the code base size''??? DrakX is currently -around 28K lines, which is big IMO. You can compare it with linuxconf which is -170K lines. I think the achievement of DrakX is comparable (a 6 times code size -win from dumb C++ to expressive perl is normal imo). - - -Also it seems like we don't have the same understanding of the word -"maintenance". -DrakX functionalities have evolved *a lot* since the beginning: - -- hardware detection, configuration, debugging, work-arounding (multi-kernel installs...) -- making things prettier - - more bitmaps - - "advanced" button - - syslinux graphical boot -- making it work with latest versions of software (eg: switching to rpm4) -- finding out the best way to use rpmlib -- multi-cd -- draknet: configuring every piece of stupid protocols -- diskdrake: raid, loopback, LVM, resizing, checking stupid users entry -- XFdrake: multi-mice, multi-heads, 3D-accel -- porting to axp/sparc/ppc (with Stew's help) -- always more i18n -- keeping things small - - .cz format - - moving to .png - - getFile on demand from mdkinst for ramdisk installs - -[...] - -> You don't believe the books ? Count yourself; see the man/months spent -> in 'pure' developoment in drakX, and the resources put in mantainance -> of the code base; as far as i know, your count should confirm what the -> books says; more probabily, you will discover that our numbers are -> even worse. - -if you count enhancements, adding features... in maintenance, i confirm the -numbers, and find them quite normal. - -if you only count bug fixing, the time would be much shorter (around 30%). - diff --git a/docs/advocacy-interactive b/docs/advocacy-interactive deleted file mode 100644 index 99036008e..000000000 --- a/docs/advocacy-interactive +++ /dev/null @@ -1,60 +0,0 @@ - -> > We already have some functional backends, frontends, that works great, and has -> > not been thrown away since 1 year. We use it during install, post install, mcc -> > and so. -> -> But aren't generic enough. - -DrakX handles: -- buttons -- bool values (checkboxes) -- ranges -- entries -- combo boxes (editable or not) -- lists / radio boxes -- tree lists -- iconlist -- wait messages - -Features: -- all the entries above can be mixed -- nice separation between data and displayed data (eg: choose in list of -objects representing hda/hdb/... but displayed nicely with size...) -- keyboard handled nicely in GTK frontend -- callback on events: - ok pressed => check before the dialog is hidden - focus changed => - * enables pre-setting things based on other entries - * value checking on the fly -- simple/advance toggle -- shadowing of entries -- tooltips -- size of windows computed the best possible -- perl-based - -Misfeatures: -- display not flexible (though i don't know any of the tools we're talking -about that is flexible => nice) -- quite a few features are gtk only (simple/advance toggle, shadowing of -entries, certain events, tooltips). -- a stdio front-end exist but handle only certain entries. It would need a -week-work to finish it -- a http front-end could be done (mod-perl needed) -- perl-based - -The DrakX frontend (called "interactive") could be moved out of DrakX. - -eg of use: - -<#part type="text/plain" filename="~/bin/perl/imessage" disposition=attachment> -<#/part> - -[...] - -> > -provides a lot of frontends -> -> And you ideally have to provide a frontend by widget set. - -nope. The interface is completly standardised, even if it include some -gtk-like niceties. The *complete* newt (and not just entries and radioboxes -like bus) binding takes 241 lines. diff --git a/docs/comparisons b/docs/comparisons deleted file mode 100644 index f399a9e84..000000000 --- a/docs/comparisons +++ /dev/null @@ -1,288 +0,0 @@ -redhat 6.1 (fr?), install 766MB, df 900MB, 35min (asked for all groups except "everything") - -upgrade to redhat 6.2, sum 757MB, df 936MB, 20min - -mandrake 7.1, install 755MB, df 1091MB, 17min (asked install size 910MB), 515 packages - -upgrade to cooker, sum 1000MB, df 1404MB, 35min - - -redhat 7.0b, install 815MB, df 960MB, 18min -redhat 7.0, install 995MB, df MB, 26min - -7.2b, 3.3GB 2h26 - - -7.2b: (lang fr) -compssLevel df rpm time fs df/time - -100 64 59 0:59 ext2 500M 1.08 - 90 132 127 1:50 ext2 500M 1.20 - 80 226 218 3:26 ext2 500M 1.10 - 70 449 387 5:52 ext2 1G 1.28 - 60 614 541 8:36 ext2 1G 1.19 - 50 1113 943 17:40 ext2 2G 1.05 - 40 1193 1013 20:39 ext2 2G 0.96 - 30 1262 1072 22:28 ext2 2G 0.94 - 20 1445 1219 27:34 ext2 2G 0.87 - 10 1649 1394 36:58 ext2 2G 0.74 - 0 1943 1638 48:02 ext2 2G 0.67 --10 2957 2519 101:49 ext2 4G 0.48 - -7.2b: (lang all) -compssLevel df rpm time fs df/time - -100 70 59 1:04 ext2 500M 1.09 - 90 289 281 4:20 ext2 500M 1.11 - 80 373 361 5:41 ext2 500M 1.09 - 70 890 794 13:28 ext2 1G 1.10 - - -mem used 7.2cooker -gtk: runinstall2 13608(data 9572) + FBDev 2984(data 1544) -newt: runinstall2 9516(data 7528) -stdio: runinstall2 9160(data 7372) - -8.0rc1: (lang fr) - -rpmsrate - -4 () 175 139 3:25 reiserfs 2G 0.85 -4 all 831 786 18:08 reiserfs 2G 0.76 - -8.1b - -5 () 77 66 1:24 ext2 300M - -8.1pre_rc1 rpm df time/rpm rpm/df - -6 () 82 66 1:26 ext2 500M 1.05 1.24 -5 () 89 71 1:38 ext2 500M 1.10 1.25 -3 () 94 77 1:46 ext2 500M 1.13 1.22 -5 X 145 127 2:09 ext2 500M 0.89 1.14 -3 X 231 217 3:26 ext2 500M 0.89 1.06 -4 kde 393 316 4:31 ext2 2G 0.69 1.24 -4 kde 393 316 4:41 ext2 2G 0.72 1.24 -4 kde 393 316 4:43 ext2 4G 0.72 1.24 -5 all 367 337 5:02 ext2 500M 0.82 1.09 -4 kde+gnome 454 370 5:50 ext2 4G 0.77 1.23 -4 kde+gnome 454 370 6:10 ext2 4G 0.81 1.23 -4 kde+gnome 454 370 6:24 ext2 4G 0.85 1.23 -5 all 489 406 5:55 ext2 4G 0.73 1.20 -5 all 490 406 5:18 ext2 1G 0.65 1.21 -4 kd+gn+dsk 594 494 7:31 ext2 4G 0.76 1.20 -4 prev+dev 827 696 10:27 ext2 4G 0.76 1.19 -4 all 1100 988 19:34 ext2 1G 1.07 1.11 -3 all 1640 1331 31:33 ext2 2G 1.15 1.23 -3 all 1740 1434 39:38 ext2 4G 1.37 1.21 -2 all 2252 1843 54:40 ext2 4G 1.46 1.22 --1 all 2490 2048 61:02 ext2 4G 1.47 1.22 - -# perl -alpe '$F[4] =~ /(.*):(.*)/; $r = ($1 * 60 + $2) / $F[2]; s|\S+(\s+\S+)\s*$|sprintf("%.2f", $r) . "$1"|e;' -# perl -ape '$r = $F[2] / $F[3]; s|\S+\s*$|sprintf "%.2f\n", $r|e;' - -9.0beta1 - -5 () 89 71 1:35 ext2 500M -3 X 240 231 3:41 ext2 500M -5 all 306 293 3:36 ext2 500M -4 all 808 731 6:48 ext2 1G -4 all 1433 1331 21:44 ext2 2G -4 X+kde 822 749 6:05 ext2 2G -4 X+gnome 369 319 5:58 ext2 2G - - -redhat 7.3: -- do not halt the box when "halt" is used -- no sysreq -- kdm has gnome entry whereas gnome is not installed - => choosing gnome gives a flashing black screen and kdm reruns - -- repartition of packages on various CDs is crap - -- bootloader: handling of multiple disks is more powerful in redhat, but more -dangerous (proposed to everyone, but not proposed especially to people having -a dangerous combinaison) -- why still asking about lba32!! - -* anaconda 7.3 vs 7.3.92 - - skipddc option (locks some machines) ?? - maybe because it's done at the beginning of their install? - - - LVM - - lvm_dialog_gui.py - - Physical Extent 1MB 2MB 4MB ... 16GB - (vgcreate -s ${PhysicalExtentSize}k) - - see lvm_sanity_checks.txt, take them - - lvm on / (mkinitrd) - - handle upgrade when lvm on / - - vgcreate -An (ie --autobackup no) ?? - (also for lvcreate vgchange lvremove - - see clampPVSize in lvm.py - - - RAID - - Number of spares ?? - - mkraid --dangerous-no-resync ?? - - - progress bar in ext2 formatting - - - ctrl-alt-suppr during install => reboots - - - user names: the regexp is [a-zA-Z][^\0-\x20:,\n]* or [A-Za-z][A-Za-z0-9]{0,7} (depending on wether you're in text mode or graphic mode :) - - check the user name created is not a system one (see systemUsers) - - - SMB authentification - - cloneDrive ? - - - edd dropped (was to detect lba32 capability, which was dumb) - - - reconfig type of installed removed (was something between install & upgrade) - - - ddcprobe code removed -> moved to kudzu - changes: sigprocmask and movl added around lrmi_vm86 - - - $ENV{GDK_USE_XFT} = 0 - -* kudzu 0.99.52 vs 0.99.55 - - blacklisting modules.pcimap e100 and bcm5700 - -* hwdata 0.14 vs 0.32 - - dropped XFree86 3.3.6 support - - - upgradelist: list of (old_module => new_module) for upgrades - (a simpler way would be to drop entries in modules.conf that concern - obsolete (and not available anymore) modules, relying on auto-detection to - add the new one) - - - CardMonitorCombos (for laptops) - -redhat 8.0: - - (legend: + pros - cons / notice) - - Install steps difference - + firewall wizard - + md5sum check when booting install - - no upgrade packages installation during install - - no services configuration (chkconfig) - - no printer configuration - - no autologin - - no real small installation - - no small packages (groff-for-man, perl-base...) - / still propose non-MD5 or non-shadow passwords - / post install tool (firstconfig) - - General install behaviour, eye-candiness - + package selection a la Windows - + in language selection languages displayed in native language - + candy timezone selection - + help uses bold/italic/big-font - - no one CD install - / not using fb at install - / python + gtk2 vs perl + gtk - / ask many things before doing anything (esp. delayed partitioning, swap not available when selecting packages!(?)) - - more width-hard-coded dialog boxes (harder for translations) - / use a loopback file from the CD then copied on system - - Partitioning - - no diskdruid after install - - no partitioning wizard - - no devfs - - no xfs (but now has reiserfs/jfs) - - no loopback crypted fs - - no file swap (?) - - no supermount - + LABELed entries in fstab - + progress bar while formatting - - Bootloader - + bootloader configuration less awkward - - no automatic handling of bios ordering with many harddrives - - propose to manually change bios ordering even with one harddrive - - LBA32 checkbox - / defaults to grub - - Network - - awkward question apropos hostname when using DHCP - - no default choice for netmask/gateway/DNS based on IP - - XFree - - no wacom configuration - - no graphic card multi-head configuration - - no ATI tvout configuration - - no prompt for logout after changing X config - - VideoRam prompted for everybody - / no XFree3 - / no Utah GLX - / load module "fbdevhw" "record", but not "v4l" - / always load module "glx" and "dri" - - Keyboard - - many non useful keyboard entries (eg: latin0) - - no way to choose the toggle key to choose between latin/non-latin keyboard - - no loadkeys done during install for console - - Mouse - - no way to test mouse choice - - mouse choices include many non-useful choices, badly sorted - (Intellimouse must be sought in Microsoft whereas it's used by many others) - - Multimedia - - no bttv configuration (including webcams) - - missing audio modules (alsa, audigy...) - -* anaconda 8.0 (rel. 4) vs 8.0.92 - - use vte instead of gnome.zvt - - add alpha (axp) partitioning code - - remove label "nofb" and options "devfs=nomount ramdisk_size=9216" from syslinux.cfg - - edd (ddc probe) moved to kudzu - - add "-Odir_index" option to ext3 tunefs - - screenshoting in directory /root/anaconda-screenshots/ instead of using exported display - - assembler code change in cpuid, smp.c - - there is some code to read the "raid superblock" (see doGetRaidSuperblock in isys/isys.c) - - new code for choosing to upgrade or not - - hack to remove /var/lib/rpm/__db.00[123] (with comment "make sure that the rpmdb doesn't have stale locks :/") - -* anaconda 8.0.92 vs 8.0.93 (rel. 0.20030108205243) - - drop xmode (bring up text mode in a remote xterm) - - code available to check the ability to do a mkbootdisk - (check size of vmlinuz + initrd, check size of floppy) - - drop "-Odir_index" option to ext3 tunefs - (with comment "add back -Odir_index when htree is safe") - - waitForLink added to loader2/net.c using added ethtool thingy (get_ethtool_link_status, get_link_status) - - OS390 fdasd & z/IPL changes - - for kickstart, new option "--ignoremissing", (there were --ignoredeps and --resolvedeps) - - /usr/kerberos/lib in LD_LIBRARY_PATH - - these are symlinks so you cant make them mount points - otherexcept = ['/var/mail', '/usr/bin/X11', '/usr/lib/X11', '/usr/tmp'] - - elif self.mountpoint in otherexcept: - return _("The mount point %s cannot be used. It must " - "be a symbolic link for proper system " - "operation. Please select a different " - "mount point.") % (self.mountpoint,) - - -* hwdata 0.47 (redhat 8.0) vs 0.62 (redhat 8.1 beta1 phoebe) - - pcitable & upgradelist - - replace eepro100 with e100 - - switch 0x1106 0x3059 "via82cxxx_audio" to "unknown" - - Cards - - remove most swcursor with comment: - # mharris - Nov 23, 2002 - Commented out the swcursor option, if it is still - # needed, then lets disable it right in the driver completely, or possibly - # fix it. - - using driver "nv" for GeForce4 and Quadro4 with comment: - # mharris - Nov 23, 2002 - enabling "nv" driver for GeForce 4 and Quadro 4 as - # CVS XFree86 support them now in 4.2.99.2 - - special options "externDisp" and "internDisp" for NeoMagic cards - together with CHIPSET - -* kudzu 0.99.69 (redhat 8.0) vs 0.99.83 (redhat 8.1 beta1 phoebe) - - don't read eepro100 entries from the pcitable - - handle compressed modules - - many changes in PS/2 mouse detection, and handle "intellips/2" mouse - - changes in PnP serial modem detection - - use "udf,iso9660" option for cdrom entry in fstab - (note that comma separated choice of filesystems *is* allowed, though not - documented in fstab(5)) diff --git a/docs/diskdrake.TODO b/docs/diskdrake.TODO deleted file mode 100644 index e6f2da038..000000000 --- a/docs/diskdrake.TODO +++ /dev/null @@ -1,23 +0,0 @@ -- test what windows can handle (the number of partitions) -- better keyboard focus handling -- end sector in Create -- add warnings for scsi drives if you create more than sdx15 -- the information put in save/restore partitions must be cleaned -(remove mounted/formatted/..., also remove the Data::Dumper dependency) -- test, test, test -- do not allow swap partitions above 2Gigs -- wanting the first partition to be extended is not used -- maybe warn if a mounted partition change of dev number -- text version -- better error handling (what to do if we find a bad partition table?) -- display the information about the correspondance color2type -- handle the partition labels (missing information here) -- add comments in the code -- add documentation -- handle the `luke' case (main extended partition must be extended) -- ability to batch actions (like chained moves) -- add a verification after fdiskReadPartitionTable that the start_cyl, -end_cyl... do correspond to start and start+size. For the moment, this -information is just discarded :( -This verif can't be done in fdiskReadPartitionTable as start is relative in -extended partitions diff --git a/docs/drakfont/Makefile b/docs/drakfont/Makefile deleted file mode 100644 index b70b4a0c8..000000000 --- a/docs/drakfont/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# -# Project : Projet Libre -# file : pki.tex -# Date : Thu Jun 21 19:26:19 CEST 2001 -# (o- Id : DUPONT Sebastien -# /\ mail : <dupont_s@epita.fr> -# Y_/___________________________________________ -# - -RM = @rm -f - -CD = @cd - -ECHO = @echo - -PRINTF = @echo -n - -FILE = drakfont - -DVI = @dvips -j0 -Pcmz -Pamz -o - -PS = @ps2pdf - -LATEX = @latex - -normal : - $(ECHO) '[35m/*--LATEX--*/[0m' - $(LATEX) $(FILE).tex - -all : - $(ECHO) '/*----------latex -> dvi -> ps -> pdf------------' - $(ECHO) '[35m/*--LATEX--*/[0m' - $(LATEX) $(FILE).tex - $(ECHO) '[35m/*--DVI -> PS--*/[0m' - $(DVI) $(FILE).ps $(FILE).dvi - $(ECHO) '[35m/*--PS -> PDF--*/[0m' - $(PS) $(FILE).ps - $(ECHO) '[35m/*--That s all--*/[0m' - - -ps : normal - $(ECHO) '[35m/*--DVI -> PS--*/[0m' - $(DVI) $(FILE).ps $(FILE).dvi - $(ECHO) '[35m/*--That s all--*/[0m' - -pdf : ps - $(ECHO) '[35m/*--PS -> PDF--*/[0m' - $(PS) $(FILE).ps - $(ECHO) '[35m/*--That s all--*/[0m' - -clean : - $(RM) $(FILE).toc $(FILE).log $(FILE).aux *~ - -fclean : - make clean - $(RM) $(FILE).ps $(FILE).pdf $(FILE).dvi diff --git a/docs/drakfont/dia_srcs/drakfont.dia b/docs/drakfont/dia_srcs/drakfont.dia Binary files differdeleted file mode 100644 index c4502a12e..000000000 --- a/docs/drakfont/dia_srcs/drakfont.dia +++ /dev/null diff --git a/docs/drakfont/dia_srcs/drakfont_install.dia b/docs/drakfont/dia_srcs/drakfont_install.dia Binary files differdeleted file mode 100644 index 737c19b9f..000000000 --- a/docs/drakfont/dia_srcs/drakfont_install.dia +++ /dev/null diff --git a/docs/drakfont/dia_srcs/drakfont_uninstall.dia b/docs/drakfont/dia_srcs/drakfont_uninstall.dia Binary files differdeleted file mode 100644 index c06f92dd6..000000000 --- a/docs/drakfont/dia_srcs/drakfont_uninstall.dia +++ /dev/null diff --git a/docs/drakfont/drakfont.jpg b/docs/drakfont/drakfont.jpg Binary files differdeleted file mode 100644 index 898dfe440..000000000 --- a/docs/drakfont/drakfont.jpg +++ /dev/null diff --git a/docs/drakfont/drakfont.tex b/docs/drakfont/drakfont.tex deleted file mode 100644 index bbc936e5b..000000000 --- a/docs/drakfont/drakfont.tex +++ /dev/null @@ -1,152 +0,0 @@ -%\documentclass[pdftex]{article} \usepackage{hyperref} . -%\documentclass[pdftex,onecolumn,11pt,oneside]{article} -\documentclass[onecolumn,11pt,oneside]{article}%seminar} -%\usepackage[pdftex]{hyperref} -\usepackage{isolatin1} -%\ifx\pdfoutput\undefined - -\usepackage[dvips]{graphicx} -%\else -%\usepackage[pdftex]{graphicx} -%\usepackage[pdftex]{hyperref} -%\usepackage{type1cm} -%\fi -%\pdfoutput=1 -\usepackage{color,graphicx,shortvrb,epsfig,verbatim,tabularx} -\usepackage{url} -\usepackage{hyperref} -\urlstyle{sf} -\usepackage{fancyheadings} -\usepackage{program} -\usepackage{ulem} -\usepackage{amsfonts} -\usepackage{xspace} -\usepackage[english,francais]{babel} -\pagestyle{fancy} -\newcommand{\trtitle}{Drakfont\\ fonts importation for mandrake linux} -\DeclareGraphicsRule{.ps}{eps}{.ps}{} -\DeclareGraphicsExtensions{.ps} -\renewcommand\star{{\ttfamily*}} -\let\package\textsf -\newlength{\gxlen} -\settowidth{\gxlen}{\package{graphicx}: } -\newcommand\gs{\makebox[\gxlen][l]{\package{graphics}:}} -\newcommand\gx{\makebox[\gxlen][l]{\package{graphicx}:}} -\MakeShortVerb{\|} -\begin{document} -\title{$Drakfont$ fonts importation for mandrake linux} - -\begin{figure}%[ht] -\begin{center} -%\caption{Exemple d'image} -\mbox{\epsfig{file=mandrake.ps}}\\ %,height=1in,width=2in}}\\ -%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}} -\end{center} -\end{figure} -%\begin{figure} -%\begin{center} - -%\end{center} -%\end{figure} -\author{Dupont Sebastien \\ sdupont@mandrakesoft.com} -\date{05/10/2001} -\pagestyle{myheadings} -\markright{\scriptsize \trtitle} -\title{\bf \trtitle} -\maketitle -\section{drakfont Future Overview} - -\paragraph{Fonts import :\\} -\begin{itemize} -\item pfb ( Adobe Type 1 binary ) -\item pfa ( Adobe Type 1 ASCII ) -\item ttf ( True-Type ) -\item pcf.gz -\item Speedo -\item pfa ( Adobe Type 1 ASCII ) -\item ttf ( True-Type ) -\item and Bitmap (PCF, BDF, and SNF) -\end{itemize} - - -\paragraph{Features} -\begin{itemize} -\item Install fonts from any directory -\item Get windows fonts on any vfat partitions -\item UN-installation of any fonts (even if not installed through drakfont) -\end{itemize} - - -\paragraph{Support} -\begin{itemize} -\item Xfs -\item ghostscript \& printer -\item Staroffice \& printer -\item abiword -\item Koffice, Gnumeric, ... studying -\item all fonts supported by printer -\item ( aliases by RENDER in Xfree86 .... -> later ) -\end{itemize} - - -\section{Window interface:} -\begin{itemize} -\item -\item Fontselectiondialog widget -\item Command buttons under Fontselectiondialog (like the actual frontend). -\item Commands buttons: -\item import from windows partition. -\item import from all fat32 partitions and look for winnt/windows/font -\item and import all (delete doublon) but don't import if already exist. -\item import from directory -\item look for if it exist before for each font and not delete the original. -\item (replace all, no, none) -\item expert options: -\item ask the directory, and look for if it exist before -\item if it exist ask: (replace all, no, none) -\item uninstall with list per font type -\item Expert additional switch -\item option support: ghostscript, Staroffice, etc... -\item check-button. (by default all check) -\item Printer Application Fonts Support... -\item check-button. (by default all check) -\end{itemize} - -\section{Command line} -\paragraph{Font Importation and monitoring application\\} -\-\-windows\_import : import from all available windows partitions. \\ -\-\-strong : strong verification of font.\\ -\-\-install : accept any font file and any directory.\\ -\-\-uninstall : uninstall any font or any directory of font.\\ -\-\-replace : replace all font if already exist\\ -\-\-application : 0 none application.\\ - : 1 all application available supported.\\ - : name\_of\_application" like staroffice for only this one.\\ - -\section{Graphics} - -to visualize the conceptual graphics please see:\\ -drakfont.jpg\\ -drakfont\_install\.jpg\\ -\& drakfont\_uninstall.jpg\\ - - - -%\begin{figure}%[ht] -%\begin{center} -%\caption{Exemple d'image} -%\mbox{\epsfig{file=drakfont_install.ps}}\\ %,height=1in,width=2in}}\\ -%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}} -%\end{center} -%\end{figure} - - -%\begin{figure}%[ht] -%\begin{center} -%\caption{Exemple d'image} -%\mbox{\epsfig{file=drakfont_uninstall.eps}}\\ %,height=1in,width=2in}}\\ -%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}} -%\end{center} -%\end{figure} - -\end{document} diff --git a/docs/drakfont/drakfont_install.jpg b/docs/drakfont/drakfont_install.jpg Binary files differdeleted file mode 100644 index 795a5a711..000000000 --- a/docs/drakfont/drakfont_install.jpg +++ /dev/null diff --git a/docs/drakfont/drakfont_uninstall.jpg b/docs/drakfont/drakfont_uninstall.jpg Binary files differdeleted file mode 100644 index 711f28e77..000000000 --- a/docs/drakfont/drakfont_uninstall.jpg +++ /dev/null diff --git a/docs/drakfont/mandrake.ps b/docs/drakfont/mandrake.ps deleted file mode 100644 index 1af9d5bb4..000000000 --- a/docs/drakfont/mandrake.ps +++ /dev/null @@ -1,534 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner -%%Title: /home/seb/drakfont/mandrake.ps -%%CreationDate: Fri Oct 5 18:28:29 2001 -%%DocumentData: Clean7Bit -%%LanguageLevel: 2 -%%Pages: 1 -%%BoundingBox: 14 14 424 84 -%%EndComments -%%BeginProlog -% Use own dictionary to avoid conflicts -10 dict begin -%%EndProlog -%%Page: 1 1 -% Translate for offset -14.173228 14.173228 translate -% Translate to begin of first scanline -0.000000 69.000000 translate -409.000000 -69.000000 scale -% Image geometry -409 69 8 -% Transformation matrix -[ 409 0 0 69 0 0 ] -% Strings to hold RGB-samples per scanline -/rstr 409 string def -/gstr 409 string def -/bstr 409 string def -{currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} -true 3 -%%BeginData: 29637 ASCII Bytes -colorimage -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -bl7e@q"4E6s+13Ds*t~> -bl7e@m,@els+13Ds*t~> -bl7e@T5=@Ts+13Ds*t~> -c2RqDnG2D<JcC<$U&TW~> -c2RqDl/9_PJcC<$U&TW~> -c2RqD]71%QJcC<$U&TW~> -cMn+JnG;n/i;S<-JcDJEJ,~> -cMn+JmbuTmh#;m)JcDJEJ,~> -cMn+Jie^A<a8UYiJcDJEJ,~> -cMn+DnbMk)f)($uJcDJEJ,~> -cMn+DjkIhQchi:nJcDJEJ,~> -cMn+DST5n_V>GiDJcDJEJ,~> -ci47Jn+l_KeBdl?s+13Es*t~> -ci47Jkhjh)WP\C\s+13Es*t~> -ci47J^4K&h%!hSus+13Es*t~> -d/OCNnbW%Rn_2+VJcC<$UAo`~> -d/OCNn);p@^TP0>JcC<$UAo`~> -d/OCNj+q1n%LcV6JcC<$UAo`~> -d/OCHnG2eMo&%LUJcC<$UAo`~> -d/OCHjkS+u^p135JcC<$UAo`~> -d/OCHTl`:/%Lk8_JcC<$UAo`~> -lMgqbp\sLY$2s;fp\"1NjN$P:s+13Es*t~> -lMgqbp\sLY$2s,He&K8A[BAeGs+13Es*t~> -lMgqbq>T^[$2r)%;B-/V%3+S`s+13Es*t~> -li.(dk/mMerri>mqY9a_oE+4!k(3P`s.]OD~> -li.(dk/mMersJbqin;Gk_SWgdk(3P`s.]OD~> -li.(dmFhC'rsJbkMeO[R%M'!Pk(3P`s.]OD~> -m/I4fjeV8=m/I1an+l\UoE4C(gAQU&JcDMFJ,~> -m/I4fje_>>m/I4bjk\5#rk\cKUso9ns+13Fs*t~> -m/I4flbMl_m/IIiWH^N?%Ls!Y%&s2Vs+13Fs*t~> -mJd@ggl^4WrU'UfrU9RVp&4Lbm*a;WJcC<$U]5i~> -mJd@gglg:XrU'UfrTiCk`r3aV];N^FJcC<$U]5i~> -mJd@gjg<_0rU'UfrR6L%+8lZO%1J$fJcC<$U]5i~> -mf*Iik)["5qX+:crq-'^p&+Famb#_TJcC<$U]5i~> -mf*Iik)d(6qX+:drq#.'b/=1p"21eLoR[$ns.fUE~> -mf*IilEnChqX+:drp>Y\/e\'l!Xrf8JcC<$U]5i~> -n,F"!nYD2sp&>!hp%nOYp@\.TrV6BpqX41Qqt(!\hT52;s+13Fs*t~> -n,F"!nYM8tp&>!hm-F!$l0Rm2rV6BqqW?VZ`;IIS^p(69JcC<$U]5i~> -n,F"!o>7BVp&>!h[uQH0T!cSkrV6BqqQkK3(&JIB%70K7s+13Fs*t~> -n,FI)^NR3SrVuomhY$U:q"X[\qY0^VpA+[ds82B`p\"CT!oq>fJcC<$U]5i~> -n,FI)^j!BUrVuomg;hIdf%Jg6kNM-qn+?PWs82-AeAqF&!jo2uJcC<$U]5i~> -n,FI)d@e5>rVuom_BM'9>A8)$G_hZm`nC%as80]m<Zq5K!Y$ODJcC<$U]5i~> -nG`[jf8YC8q>UBuqVJd?m.L&NpAajeq#1!kp%eIZp%e4]kKW1@s+13Fs*t~> -nG`[jf8YC8q>UC0qVJQ`]>_n8c-Xnhg"Y?>kiqElf#bi+_?.6OkCNYas.fUE~> -nG`[jhm8^'q>UC0qVI;C%2gQM4%)eE@rZaAKVFlk?7QZc%Kd4N"m:I:JcDMFJ,~> -nc&gmm]UN9m/I"a#6+8C]\r,HrUg-_rq??c!VZ3]oE4O8iVnE.JcDPGJ,~> -nc&gmm]UQ:m/I"a(&mjRYd1mV_SX4/`lQ?JcdC7lcH*p!_?7KSh>W!*JcDPGJ,~> -nc&gmnApp+m/I"a(&mjRCCL^_%M'-d*@NX&6:t6X5:%$?%Km:P%*&9ts+13Gs*t~> -nc&dibD(8oq>C6srp\(Nj6cI(oE4^PjnOE,JcDPGJ,~> -nc&dibD(;pq>C6srp\(:[(O6N_?7]o`5D>d"2VXrpjrHrs.o[F~> -nc&dif<14fq>C6qrp\&r%J^M6%g3L](D78P%KT)pJcC<$V#Pr~> -o)Apnm'1H"lMg\\#6!f&dH0iglLY2OnG*"XrsA\uq"XjgqtB^[JcC<$\c70~> -o)ApnmBLT$lMg\\#6!f&\@0,fm(rqD`5^X+rqQL"rpo1Err;l[jSON.JcE:\J,~> -o)Apnm`LrrlMg\\"T@T$+q<fI"VDOmC#f3frsA\WEU3W(qji66JcC<$\c70~> -o)Amjb*?Map%eUlqr>9CjmVg,oEY'_p\"4Rr;QWo$2s&VmeZnNp>>Uqs+13\s*t~> -o)Amjb*?Pbp%eUlqr>2i[_BTE_?e'"cIM%Anb`=`rsAYegtV](lHe5ZJcC<$\c70~> -o)Amjf"$U`p%eUjqr=df%I4K1%hp3M>Ci]roD\[f$2s$mBDVSN(rc6#s+13\s*t~> -o)Am`[;pHKrV6BrptE13kO@d/(%q:pq"X[Yp%\Lcs8M65p?qSEe(skOs+13\s*t~> -o)Am`[W6TMrV6BrptE!V\A.@H(;n2:dFR%+k3DR:s8W)^b0fDEf>-5=JcC<$\c70~> -o)Am`bFssSrV6BqptC`;%I4K?%hp-C8mQ7RKs0)+s8W)^Q8?5H>YX&NJcC<$\c70~> -oD]!me>?o:lhCD`rq+[OhWjXqo`+Uap(-omq"aUUq=E"uo]5Yem/DS9JcE:\J,~> -oD]!meYd,>lhCD`rq+[DZ+@a9_A'o,aNMlWf%T6KmIg(uccXqbaR&nWs+13\s*t~> -oD]!mgr,DGlhCD_rq+ZT%1VS4'b:op,r7b[?>XPE\DZu+?7Vct]^5WKs+13\s*t~> -oD]!f^6W?3nb2terp\+KipH=!o`+Uap($ilq"O+(guI)Go(DbUrdk*#s1JA^~> -oD]!f^6`H5nb2terp\+:Zb4-;_@si+aNVuZf\>QHa2#=.eDfTZqu20HJcEC_J,~> -oD]!fcFJk?nb2tcrp\*'%H\-7%h]a,2F:;PDg@Us1*L+oT;9Krrdk*#s1JA^~> -oD]!]YCC#np\"OjrThAHk3qp%o_nFnp@?/4i8NJDeEQYKc-"5QrlP;YVY^&e!rCEmrQ58a`3ciI -d/OCNp#k&U\;/o>h#@ZZp#k&V\rFr4iVs>cn`8KObf\)MdFe!gir92]puU2Tbl5cb^&\&$s*t~> -oD]!]YCC#np\"OjrThA1\%]]>_A'o-aN2ZXdCHg.]=keag\&b7bKS30b6#MWqY1!kqUNslb6?&0 -`3ciId/OCNp#k&U\VT)@h#@ZZp#k&V]8k/7iVs>cn`8KObfe/NdFn'hir9DcpuU2Tbfe2P^V9T9 -s*t~> -oD]!]aJt!3p\"OhrTh?P%H@p+%hp!3-mB]:J%7BArWNL]p"S9UgY;_]!n>*`p\t<kinaRe"PMAM -b59Qc#laScjPJ7fjo4'8#laScjPS@lgAU"1%0#nbjk\\Fg=b?Co`!kM"oe>aj5&JhgAfS$qjmb;~> -o`#-pfr/arg&(FA"oIDohWO@goFpf^hTE^[d+I+3\@B)hioYiBMk'a<!fM0fq#:d$hS6+`T:M*e -C1Mkcdf0[Qg;:S9ZD;SVjSds8$N8Ym]Xb>FH>(\%jSoMbptsB7]<eK2rgs@hW2mGdrT4%`rTDG@ -ZDXGrT)saenX]]1~> -o`#-pfr/asg&(FA"oIDmZ+.O/_@s_sYb@bpYJAE'\@B)hioYlDMk'a<!fM3gq#:d$hS?1aT:M*e -C1Mnddf0[Qg;:V:ZD;SWjSds8$N8Ym]XkDGH>1b&jSoMbptsE9]<eK2rgs@hW3!MerT4%`rTDG@ -ZDXGrT)safnX]]1~> -o`#-phSl(>g&(FA"T.;a%1V;,rs]MI#nAC@F#gb?\]3XkXJrM=rP&E>SaH4P%/o8;a1oC'[\K.H -S+>#-$N9&:eC)RXUQ4F6hZ!r]j3uH'bep?>eGA8+#laY_hUg0!`PMPg"iA7"cKP5grs&Ggh:9`f -_>_1NY+"mOs*t~> -o`#-k`1LULi;W?J"o6r`jR)O$oH!MhhT2q%V6%_Zamms?io]goWKMCCDf9T7A7i^Wq>Uls_PM^# -EG/W[H],6!df0[K[s3%5GACN#iVq^6$MV#aF)?#9>[lFajo6"lim#-6Ob7puCMe$3G'nq%P-t2M -rseqc_lA`EF(f,p@pNR+qYpZso@s5Bs*t~> -o`#-k`1U[Ni;W?J"o6r[[Cj?=_B$G(Yb-l2RA-dea2uK^io]goWfhOEDf9T7A7i^Wq>Uls_PM^# -EG/W[H]5<"df0[K[s<.7GACN$iVq^6$MV&bFDc2;>[uLbjo6"lim#-6Ob7puCMe$3G'nq%PICAO -rseqd_lA`EF(f,p@pNU,qYpZso@s5Bs*t~> -o`#-kd(bp"i;W?J"8U`5%HJ$!%2'$U$Vu+1*4lc6i8Wnik-LYHT`1PdTU(S\rV?I%p=$pYT:h[3 -H]"0#n'_4CpW&ntT;8$8L>i-grsJMAUn"!NSr/*QqrRhkr9<%c`3ueET:MRGTqnTfZa\-TkPl"i -kL[_[W1f]IQ'I8]k5,)[rq>LQW;hA~> -o`#*d[?tH4iq!*Orq+U^kO]kem,#gfX.uc3c/-+Vg@4Y3s8V`JaII`jBOk^aA?5P&rseqYZA*4- -An"tc][5[4df0XJgUa)+DIZpqkM?.FpYNZaKQL^.E9$r[rtYF__PW-/@pN2?>?b?@A7fLoF`b+j -kl1kZ]qg0nA7#49!`N1[rVm*#m+]aaPkD!TJ,~> -o`#*d[?tH5iq!*Qrq+UM_o(`U+2GLmT8\SmWkcK^ZHL,*n,E@eo\RZZIq35'An#;Pq>1+#rR\?0 -D.R<g>][R)iqLn$$2<2cTmU`f>^5GfrsJMW^Sup0@p<p4roX4qqq/c_LiHp1=B\p5>[_/TBQ/*: -\,>Ii%J7B1J8/V$='/O*;cr&Xrs&Gggrugaor.n@~> -o`#*daL[Uhiq!*Qrq+T=&eX=;rs]qU$49S'^m5IRb>Su4rr<#jhT2duQC+#+P`30KqYq$'hor9p -R$j.jL:kmmpX9'JpY39ST:_@%Np#6u$MWDlWLorNKS\[fk5Q1nimu&PTTkChKS>2>Od;B(T;/.& -r94.io[1OUS<f1eIXHKcG2iK##6"&QgW-\oW;hA~> -o`#*_Y**4%ipm$Orp7u)p$;5no'G5SYcFP#`80S<da$mpg!]Zqs8DcYY`!(2BkCmdRIp@U%J7;r -C2Rg"@9\fPp%n[9rsAYqkKfKE@U+lYh>[f[o]t&"L1=JFlK8*_qpN'DH"C;]<*!I??<^cDA7fIh -AT[29lMhb#f;aXCARA><Dg6PQL$&F8rp%YE[[qAdm&9r7~> -o`#*_Y**4&ipm$Orp7_N`p:Jb^q6hCN/3h#`80S%YKl1M]Wh22s8DcYY`!(3BkCmdRIp@U%J7;r -C2Rg"@9eoRp%n[9rsAYqkKfNF@U+lYh>[f[o]t&#L1=JFlK8*_qpW-EH"C;]<**RB?X-rFA7fIh -AT[29lMh1hf;aXCARA><DuP"jL?AO9rp%YE[[qAem&9r7~> -o`#*__mY_]ipm$Orp619+6j@9%3>la$;[D7h<&&XcK!"r-M[W@rV>`pZBLK>R$E]4o_SRso[(%8 -R%0S,JXtfnqYnqC$2sJYcaTp<K:M;arsAYrld`SMP_,=gk5Q7phU/s3R#QQ;FaJO^I"dTHR$jJ2 -Rd9t<rsAY\`iu#$O*Z#%reLuJk5YJ\mb?C>^7Lk]W;hA~> -o`#*ZUkW8cipcsMp"fB8mIV+`m,#gfX.uc7h=(70ftQD>j2T+,rVm5nY_6SBEG/onK^em=$iSSQ -AoDX/BO>#Io$.1>roKu.@9o]!gA_B@WJ4hdV"!RI)#`C(R!*(K;HJLGZF-p8L1t./AnPUc]DUso -)>M+?H=pbn?DG-N`Pp?ss8VuHXd"9O@X..9s*t~> -o`#*ZV1rAeipcsMp"%[8mD9RQ]<IodLmP-[h=(70^o$&bj1r.lrVm5nZ%Q\DEG/onK^em=$iSSQ -AoDX/BO>&Jo$.1>roKu.@:#c"gA_B@WeOqfV"!RI)#`C)R!*(K;HJLGZF-p8LM:70AnPUd]_q'p -)>M+@H=pbn?DG-N`Pp?ss8VuHXd"9O@X74:s*t~> -o`#*Z_lo/TipcsMorV=Eljj%)&ISpQ:SPe`n,)Q69AoU*Sm:^^rsJ57Xc8[=R[9,,nGE4nrS5>X -Od;]1Ne"S/c2S%Jjhn-]K!+Xtrs%],YE=C=nE9fgrT2G=UmR0gG)iE)[BQToO-H$"R?WcQr9F;" -ps6[OR?rbYV7X[b`ROGXs81Tm\#Gs[PNf%GJ,~> -o`#*USpk'WipcsMo^2GHmdq7aj3"U,UTDDin,*+anBoYPs7bI*nbrIpl)/<.WHrAm@s759rsSJ2 -I:ACfH"^Ghc1oQ`#Q</JHsU*ip"TKOrR.Hg?!Y;?kPlCl^8$'h@ola#aP>qAk2+1GFD,9!@UY`" -lMhao^RTFYA7Bc1lgXH7o_\[gps#U\B4YY(l)=W4~> -o`#*UT710YipcsMo\e<Am_T^R[@rP8Q`A![n,*+anBoYPs7bI*nbrIpl)8B/WI&Gn@s@;:rsSJ2 -I:JIhH"^Ghc1oQ`#Q</JHsU-jp"TKOrR7Qi?!Y>@kPlCl^8$'h@ola$aP>qAk2+1HF_GB"@UYc# -lMhao^moOZA7Bf2lgXH7o_\[gps#U\B4YY)l)=W4~> -o`#*U^T!9KipcsMoS[$&m1'g>$OR5:U;YmVqu6WbdF%F_pYacqrVm5h`LVjeVOa*;PjJ;I$hVcD -Ln(08RYu[Aps&gDrS#,eNe"q<g]%NWg;9eIJ&_3FrttFU_PirgJp*g.gudh_hT2LdS!f\/M6-I: -ru(IQ]q_!^O-@uWnF?&@qu?]ke&%uMR$+!(W;hA~> -o`#-TSpXpVgA^[C"T@]_p\""I$M!,kX.uc7h=(7?rr39#nF?DUrqQ0`rr3B*gRr(l_2W\Q@;"d$ -rs\kUW+'bVOa^kHB&<L2rs/AEVfl9Mg%sJ'#Pc0+F'E),qrn%trnXZ6D.[6aLXGVgrr<#sm`B`\ ->$>!/P4JSO$NB_ai7ci8j6?C=rVn,AnE]E#]pj(TASZtFkNV-or9Wb8k/F0@AnGb*cfjZYk3)`H -s*t~> -o`#-TT6t$XgA^[C"T@N>dDbRk$Ga!9LmP-[h=(7?rr39#nF?DUrqQ0`rr3B*gS&.n_2`bR@;+j% -rs\kUW+'eWP($tIBAWU3rs/AEVfl9Ng%sJ'#Pc0,F'E,-qrn%trnX]7D.[6bLXGVgrr<#sm`Bc] ->$>!/P4JSO$NB_ai7cl:j6?C=rVn,AnE]E#]ps.UASd(HkN_3pr9`h9k/F3AAnGb*cfjZZk3)`H -s*t~> -o`#-T^Sd0Lh#?mE"T?Pj8f@%,#n77L:SPe`n,*+`rs8Jjnb`@cq"=O`rsSh_^m'YkXJMAJMs($<% -/o#$Nf(?RWL/KohYk_!#PlogUksTSqV2#Tps-RHLk+4Vkl2P"ilJBrR?NDkdI@&4s8W&caeauPL -OslIo)8RqrqGmFjQ#7bn,!%^s!.O8nF5Vd]qLj]S#+d)n*KQAnaQ&6d_hlKR@9u)mdKW2mf'BhJ -,~> -p&>9rfUI1qAAA*6rr_uaq"=(I#jTO4W5RN\qu6*b%/\5;@X67aIVN;&b5VD?%K>h.I9iVgS:>$Q -E97)srseu&j4W#8g[4q*f#-ePrVm?+nD;IBrVulhiRu`LrqQL&rp\gma3WGQSnqYIiVrfU$iTGD -a6`g)o\S-WrVQU'rTr7if@K0ao\.C>rVlg-o=(-$>B&X%s8W)nimu]Zq>V-,le:"AlMgh`q8/\K -BP(dkW9sT^rr`5OC0CL:32Q3Grq"sk`4`U`XfSb5[(FcZrr;`7_S!FWKl(F7COr.a[$dWS`50!q -Y)I=3B52a`ZFI90PP;6[J,~> -p&>9rfUI1qA\\37rri&Tfuh5$_?d`GLo&&Gn,*+Rrs\eJS76chQ@<RWB$1,Prsetr]7!t[aII`i ->B/d(r;R6*puL,ZfA#]jm+92@rr)j+rp\difDYaKo\nKRn,E+^%K>kSdE'\f^7T4HCZ59krsSel -f>m7Wrq,'tir/cS!r_K>rmqA<rUegbg&:pM&+d8uBNoH9rr<#tpu9oVrV?I,rTi4kf'<87s7sR( -H>$o$D5ck$r;Qltf5"Rg=?*/Js8MWGcG[H+YcY"3['dNop&>!cb/:m&VhJu"B5<*mZa?0pm)?fO -]!%'3AnPk)S[,f5R[!QLs*t~> -p&>9rgq9PJM9,Ydrri%ZC+^+e%L<LO$BrEan,*+Rrs\eS]T/*!ZDj@WMUDG&rsetsc_uAqb.Xg> -KSegir;R6*q<I#!ioT_.nD`!err)j+rq#=.ir/oVp?CVroD\Ob%K>t_hUpZCcbH$,L#N%0rsSeq -in3f#rq>O6lM^V[!r_WLro+.MrV#=)jSf)X&+dlSRtQUXrr<#tq<Hu!rV?I,rUAn.iU?dGs7t$U -Vja$?QaH/Zr;QltfoULXFuZ\rs8M]Rh:U3%b/hWGc-=Vmp\t3eg"4[!`N>`"R@UCobg!f8m+Bn9 -dE/\dR@0SC^<FsK]X.@8s*t~> -p&>9qe<bGiA\.^/rri;fq=jRMoEO?eX3pA4rpKdpp:Z]!N7jqXD.7%`qYpL'qp)$GD:$7nHsp9; -li$i-rqG-bVh9;XWO9ORQuhZnrpJ^ob/:HB[J'1A`k&CNP0Nt&ruh:,e%:laFG6?XK4J52kPk5< -g!RmUUOqY(gr[+(Ls#\qrsnq`b-[7VNMEen_5D=oqYpL+m]_pd>`%bGs8D-*^8cn'rVca4rqG*\ -UR%RPTs=LpoX0j'AnG[iJ'@WcrVlruke@"p3O[W8qqfH+UlpI\G'/(ZK85MVUXoD3Z^lo'H#IA. -B52C3Jph<eeu=peJpMEMAnPdpG_(KqBRfHQs*t~> -p&>9qeX1VkB"Rm1rri;ahU9C2_?RE4UXAN,rpKdpp:Z]!N7jqXD.7(aqYpL'qp)$GD:$7oHsp9; -li$i-rqG-bVh9>YWO9RTQuq`orpJ^ob/:HB[J'1Aa1ALOPKj('ruh:,e@_)dFbQHYK4J53kPk5< -g!RmVUP%_)grd1)M9Gksrsnqab-[7VNMEen_5D@qqYpL+m]i!e>`%bGs8D-*^T*"(rVca4rqG*\ -Um@[QU9XUqoX0j'AnG[iJ'@WcrVlruke@"p3O[W8qqfK,UlpI\G'/(ZK85MWUt5M4[%3#(H#IA. -B52C3Jph<feuG!fJpMEMAnPdpG_(KqBRfHQs*t~> -p&>9qft+#DNPkS`rri;GI7tRI%L*@LG1#aTrpKdpp<0q%SCt?PSs,,KqYpL'qq8lGL!\,[W02b$ -li$i-rqPR,`2olF`Qm#^\sr*crpo:3gXjTRanGAcg!Rs[\(^fXruh:0i6o0.Trl)DXHnR#kPk;D -j58S@_Q2qsjkJ/#Yh8pRrsnqigWd+&Zbjr8e\n',qYpL+m_u]%Jskp(s8D<?eAeW;rVca,rqPO' -_R[J$_9)TSoYn85rg<nYWS.(GrVlruke@"p3O[W8qrZY\_R?YIUnaccXKT%E_;Y@\aM+mZV4X3E -R@BhGX/VG]f#G5%X/DV[R@0P9V5p_tQ^[?Fs*t~> -p&>9qh3`IuAXiDbrr_rbq"=%H"QI&9o)A"U*:U4g@'&CoM/d$8Re?^\rp@4;=eXcaRs8=HV""B` -,Q6oOY@q-TL6-A%LjW]Uk5P%GR[TP$I!M[1Y`jQ^I!fUSo_e_Fqq]5`?s\8GL2:U?@9ecXrRd?u -QBI#DJ()9=P_4-kL%YKFp!UC%?<qlDE-@"k@q49irr3PoWJFtfV""E_i5)4IFCTpprr4)=jN*g$ -D1d%QHuQ7cnZ7LaAnG^mH'tnN`mNB$me,iCi[s?cpsm0RKlLX0=^#'8?=RSaG_1XmkFcNo?"%;V -An>FX>?Y-1Gg1_G>$PKHralFG?X-c<=BBS.Y5a"~> -p&>9qh3iP!AXrJcrri#Ufuh5#_?@3>b4>PuruCO6LL@4DZANX3A"3/ks8MDqFBYBr\XRhO?DR)i -s!.L-bcb\bCPIpiI#*/[G38esTUVC9N-orM`j(_WH$k!QI.[@:1]-"IT3tuSP_O!hCLLJ,m/>S$ -PEqAeEe)WUY`sc`AqfpXrq4^MJR2W/QuR;)L1=cKqYpL+l)KPJ?)6uirSYPgMf`H\o`"k4rT)%i -AT!0GEdVi/qsgbCDe<TpCjDGQ^W+[PkjJ-.rSfElo_?tPTnRJs?<LH:>[CoPD0UYebNGR5>[:cL -AnGU`?<^T8=*`&@?s6fDAH$0H@p`JE>$+jJl)t&:~> -p&>9qh7BGJO0/-Irri"VC+^+d%Km4Eb4>PuruCOJYD'@D^TaArN32dQs8MH3UO9'!ah4I3K!+VB -s!.L1grc+;Js;grVm*+\O66H7^q@=jZ`'b5eB>>$V5L5[Sb2j[1]-:d^Q<o(S=,b7SW\Vqm/>nQ -\%/rNTr-Gkb.+RLPbIdMrq>6rX,)+]TUDUZYEajsqYpL+l,KrjJZeMBrTDbLZ(mDOo`"k4rT`+M -OGT3hTr=U#qshD(T:)+9SYj!@e(<I8mIKr7rSfj#o_@Cq_6'AqNJ3%>LlR^eSu&Kjg#oo6Mi<gc -R@0G,NerOFIZr$VOGJgWQC+)-Q&gfYLP:29l)t&:~> -p&>9ri0S\"A;0RGrri;fq=jRLoE4*fhYld?6gCXi@*J&VNH8W?MXg`Hqok^>C=;@PQZHJ=](Q+' -rp%Lt?rMQ_`P77JBOP/&l2U+CMfW]JAS$."@r6'lA7f4[l2CX3qprKA=]_$-c+SaGB4,#@nb_+7 -M/R3CCN#8KEbJrj>'B93oZXOW<,AJK_jGIX@p<^+rVuosf;*h$?,H=6hQhEB?sHc`mJm4bi5(4Q -EjE?WHZ!A@o('&0AS#IdBP_jEO-ucBZ*q3U`p!F%s81?YR<W=O<Duq-Am\kN&Rf6aDJsd;KO7ef -@q'%^@p2q3<t'#lAm/8?A79%]AR/=6<rm7(Y5a"~> -p&>9ri0\b#A;9XHrri;`hU0=0_?70AhYld?6gCXi@*J&VNcS`AMt-iIqok^>CXVIQQucS?](Q+' -rp%Lt?rVZa`P77JBOP/&l2U+CN,rfKAS$."A8Z6nA7f4\l2CX3qprKA=]_$-c+SdHB4,&Anb_+7 -MK!BECN,AMEbJrj>'K?4oZaUX<,AJK_jPRZ@p<a,rVuosf;3n%?GcF7hm.NC?sHfbmJm4bi5(4R -F0`HXHu<JBo(')2AS#IdBP_jEO-ucBZ*q3U`p!F%s81BZR<W=O<Dut/B4,%P&Rf6aDJsg<Kj\"j -@q'%^@p2q3=:B/nB3SJCART.^AR/=6=93C*Y5a"~> -p&>9ri4>bPOe;19rri;8HV,1C%Kd.DhYld?6gDU_K$Nf-Z_<_HU%/0_qq&W>K$ro&\tP+6_"Ia- -rpACTOEHPj`P8(;RZ`8jl2U+TT9u1=Q^+/*LkgkKQ'm\hl2CX$qr-#2L3B3*c+Td@R?3$'nb_4I -SX,h7S=?^MQBIJoJro?up"[`^H\&04_kiuoQ%k"NrVuosh8?4OJB%<]jijTgOG\IOmJm4bkLHeg -KsJ@mVk0*@o('PkR$a;0R[p7U[(F2obKeJ^fC&Y<ruh3rdCZ6COFVLsH[U3kM34-nStDk)UOdT> -N0K]tQ%s\aFps/NMgBPoMisHqQ]-:hFodB_Y5a"~> -o`#-UP]^SJEpNAts7??ep$D;Pj2'a@s$ZkAU1IrnpXt[MAn6;Vs8MDpDHa4-l`?4a>@#qYs8MT- -Uh!JR`T-LO]o6r=>bplho%(RBIqiCm<HOn>XaY%t?!u^ls"s]2]Tc]&S^Zrtj/n,S?<t/8rU&.L -P(%.V@TRN?IUlARM<ju\Z$BA\]%ZT=bE7$Y?%_A?s!RZ_T6+:JgA'O+AS-3k;,aC]s8ColO^)V7 -i9Sg_H!=\@pX=Lu@:]@L6"akGDfpAVKo(nYS%ALrl+*7-B44b;GbVLOYFBWC@qB:fBnaC,WMYDh -BP(^[H)@R?YKGP5WMueYFD>Du?YQ>8W<09Gn#l\@~> -o`#-UP]^SJF6iJu"SCd-ai!M_!jnlbli0BPgnSFnhY5]cF(Ss2mJm1Q[r,BQl0GF5CKk,uqZ$Qc -`2$pDIDt7:kIupq?sTSts74aUQ[`aY<`X@9ZE8UlAmJj*rr4hRhS#.Z=.Rh,o]**2D-gP[p&4:. -^6="\A7AY\T7:BM:l=T7bcuFoA\-U`m)tQ:@U4WMrr4AB`h.?WA_Qq9XCZ!i>#A4rn,N@F^l_l9 -^>S>*T6XXLl1`YT@:<^GAjL'CC2\6@J;&iAR%1bbropt^G\:Ga;L,"B[BH'B@Uit^C2&C<YGnCS -E+iim??rEIWNXIt^T"31P'(MOA7')Iri#t&b3uM5J,~> -o`#-U[\T=SPO%l@"S@FZ.M;%X!Y#=mli0BPhnbV3hY5^3U6q+2mJm1Rc(B?gl0H9rSV_jLqZ$Qd -f>Eo"N5aiIkJ4BrO+FJ's74aUW2c>LJ9QgEZE9[fR#H[Xrr4hRjO:SrG,*OQo]*EbSrJ99p&4:. -^8S$$QAg6HTotC_ELH.gg<6=BICe/#m)uW0PD,:crr4DCdD)H4L"c=`a-)"2J9>q:n,N@Le[C3_ -^>S>*];CF;l1`YtO-,crrg?$?S=cRSWi`M5]"H>crp.qDV4!KrEJUEr[BH3^Ng,p!S!g%fYGnCg -T:;74KnuV*WNXIt^T"31S>)L@QAU6hri#t&b3uM5J,~> -o`#0XQ?d.RC=`CXrr`5dq=a^X#P.6Ah:prSnbMeYji6<Gs*X^eS76L"rSWl_B4,B:s81'6??Olp -kbj/H>\i<ts8'mAH<=RmlhpeYbaWf_?,?77r:T0RP&"9(NPF*,fq*h.>@QXms8MN%Tk.;IdI[A; -oXpN1>@#qYrqlBKViGOu<-5k$Z=$^Xbja>pN*KGaiVEKOiLka1>F"XUs"!`PRr)P[i7t\PD5jp_ -B:%6Erp[^p@9KJfqu,0MEE[;BrTCV-?<UZD@qGOL3bN,AF*`26p!9XhC1LLJLVhd-kiC=+Iq`J+ -BObeoj5S[aL2U[5?]*IpioKLtl/L^YZ\rm:A7'B*ro+"?mJ=!cJ,~> -o`#0XQ?d.RC=`CXrri;^h9a+<_?[lg['-X=]"n-Y!k,,gli2A0bFN*_jo+,%G%Y2rl2UY*TO2lo -punZ2AR'$0rr;i<YBj;Z_s@7#q95@Q?=(MBs8;QOY**R)=H1)Ijk68YAm8d*s8W)f^7f+?Fj]g[ -s7EsjEEcc&qYpBbj/@uR>uc!\d'@(]H-Gd3[u=QoWo<dQrSaH$@9f)crr4M@\XRGDI,NeeB5X`W -EbLilp\sZtSmbg"j88f-YAm`bjo+ANE*c^S@:NmGAiaR<CNFfKX7af>JSJ_!<JSHFk31mW\pnF* -AnY[i_W0Y-Tn[Jt@UG#Eio9%do',/nh6`,^An57idf/5-jR)fHs*t~> -o`#0XZDF%TOkTg.rri;6GXNAF%fQn=$k3[@%K[(Cip6Vlqp`<?MWOfp[%s+OMs:9=fYE<!fD+RK -YEt#uiVrlRfZL+DHc,1Is7t*VUlBoEpAb'`jhS?rLj56#fB(\kXI4lrj8]/Yo$Y@AI>H;Brr;W3 -\Y+e/g%t^Fp#EcnSVqcK^<j<AFc+E4iQnfeGcp$$rr(fjX-/%/mf*5;oZ=b;N0iJ`c'<p^[>9=) -fD#:7e\@5mXQ03Vh8u@BLZSKt\W)?!NKKHlR/<:3R[p1NVo/2[a/b\qLj#!!g?.V[f".<;R$jD. -P0)bDf<h]QR?NDqfAbfNmIKN$in_;RTp_4(MphUa!p&bFY5a"~> -o`#0\SpbBcC8q('s8V]lq"=XY%.`iKfuLG"XLZ^>n+6GK"6[b[rp9Y=p:Z`"MX1<)Q?m4QA^gVB -[r,BTm/>M0IUZQ1kl:YD[?G'&OQ-0;s7sX)F';l'qu6UAn$/*h>B%aLq>TigP@e$<jo>AXd]\:. -=gIAms8V`'Rr2JHiVriV+7#tfA63'HjRh6#W5n/m\tE_>E7O^_s8LoOJ6uQaoD\bEn#qskCQ?fU -NHDegi5i[anbr@/Y'aSseG&t.`0FV+L["j6hQqZ;=^"s4>$P?@@V#IM->.(*HI]WtFCnucBufQ: -rr;umj0s>IAnPXcTDANWY`Ed9@UPDiq>U`q`g(a[A70WGW;hA~> -o`#0\T7(KdC9%.(rr_oSfZF-0%)KWdXe(W3Q'8&Q^;9]`"1Y&Urp9Y=p:Z`"MX1<)Q[3=RB%-_C -\8GNVm/>M1IUZT3kl:YD[?G'&OQ-0;s7sX)F';o(qu6UAn$/*h>B%aLq>TigP@e$=jo>AXe$"C/ -=gIAms8V`'Rr2JHiVriV+7#tfA63*IjRh6$W5n/m\tE_>E7O^_s8LoPJ6uQaoD\bEn$&$lCQHlV -NHMkhi5i[anbr@0Y'aSteG&t.`0FV+M!=s7hQqZ<=^"s4>$P?@@V#IM->.(*He#`uFCnucC<,Z; -rr;umj0sAJAnPXcT_\WXY`Ed9@UPDiq>U`q`g1g\A70ZHW;hA~> -o`#0\[&KU_Q+HhcrrhtK@jhld%L<LP$OR1D$4IC>%Kd.J\,Pao0_W]"MONl2k-LqSP)Iuklcu,M -[d<tJ_5WZQP3DrFkg$Z$I@K6ns8VoA^7pF4gACmL-1Aj`R"U19l1t>I_7,hcM<4d;qqK5oML)_s -rr<#jah44$L#N%1ru^RG[$H5f\`ED<WN+#'n^"t>JVDYKs8W)W_Q&ZH[e'Lu1@N2lSX6>,e$G.J -h;HAhf(&_9fZC(LMq%M#maeq,FI27lptiE>I=$HqL51YFO->otrg>(&RAS]_]q_!ZJq:u.qu6Wp -puAo]R@'D.NjAK\n\MT+R?WN'nbN1jps-FGR?ieol)=W4~> -o`#0bY^gP%AUF"BrtYM!q=aIQn`o#X]W8'.Uo1&mdH'cfr:C*SaOC%Qs!@0?Lg[%Js6HG3Cgq%n -ouW_1FkQTeb+Eug>E%qKqSoF\>[52<rr35r]:3S@DrUcqru1.$M.9eIk5G>[n#qsd>`%bGs7Edj -C0PN+q>UBun?A-h>^,B1ruh="Vh8A[No'X3o&/HpqV830@9]8err<#sd%GYh?IeiMs$GtLMJI3l -WL\$Lh"gg9me6VZn[4^#D4p%Yf"HrE;.[o@s8McQa0:YNB4=qD<`r[6@:a%_B4Z"YTnR;p@9eiS -rVZ[/q:UdLB4b[`MXpf;Y`Ed9@UPDiq>U`q`g(a[A70WGW;hA~> -o`#0bY^pV&AUO(CrtYLoh9a*W^Ug\GQ&(ZkTr4WYVR=.Sr5&QGT?[9"s!@0?Lgd+Ks6HG3Cgq(o -ouWb3G1l]fb+O&h>E/"LqT#L]>[52<rr35r]:3S@E8plrru1.%M.9eIk5G>[n$&$e>`%bGs7Egk -C0PQ,q>UBun?A-h>^5H2ruh="W.SJ\O5Ba4o&/HpqV861@9f>frr<#sd%P_i?e+rNs$GtLMJI3l -WL\$Lh"gg9me6VZn[=d$D4p%Yf"HrE;.[o@s8McQa0:\OB4G%F='8d7@:a%_B4Z"YTnR;p@9noT -rVZ[/q:UdLB4b[aMt6o<Y`Ed9@UPDiq>U`q`g1g\A70ZHW;hA~> -o`#0b]W7TkQC[U@rtG@EGXN>X%LijU$ORA5O/J%.$k<%C!t>X6qs=>/nA_\eY42JW[]>s`O3@4I -]n_Htq>/RTVNHG#m/Qq2`2AK?`Uj*/#PH6PSV;mZrr2p9l,KrlJskd"s8VQ,\<_`7lMpnVbe9O" -K\-&!rs%u3\=&&2kPkK(ro:quO+!JRqYp'Di:$O$aKUeVVX"0\s8CQbV2BfRq#::Ll,9itTWQ2I -TTe1,qXEqHrVuE4\t5=nk4.H[Z&!FLb4>T3pZ';uR#$3<G'/"VK8PhYrg=.\T"De@SXGUlSE9_I -rtG4]XJ2,NQB%[0s7*q4Tp_.$V"+9\#l)]UUm[O-Om/hEJ,~> -o`#3jbCF>>ASnsUq#CBd'DV7gjOV8SX/2Yr_q3baZ*MsCnGMn\kK)$Fm/JBsWH)@^pAaWdLi?m? -V;AUk=gIDnot?l=?X0]'s7*C\C0YK.qu6U"n?A-g>_D;?rs/PTUjlcWV"+Ha&F-<R@9]Mrs8M,[ -M.9eHkl1S]#4&4H@pFuZrr3`3dA)"m>f6.3s8DinrqXF(H<spup&=t,pq`M@>@ugls8W)RV1E2e -Dfg)5C;'TDs!%ElW.SVlHC1@VA6;lY^#f.ks8Mocj4)&ZZE0a]K6:j;@fBsHA8HgPF(f/o@'0"s -rtGCrV1reuA70`Ns7*=SEFrZfPO\JK#l)E)G@kAnGNl(+J,~> -o`#3jbCOD?AT#$Vq#;*$jOhPe[Ao^TLm4C4_q3baZ)=V2^\kqN\=^n<m/JBsWH)@_pAaWdLi?m@ -V;AUk=gIDnot?l=?X9c(s7*F]C0YN/qu6U"n?A-g>_MA@rs/PTV12lYV"+Ha&F-?S@9fVts8M,\ -M.9eHkl1S]#4&7I@pFuZrr3`3dA2(n>f6.3s8DinrqXF(H<st!p&=t,pq`PA>A)mms8W)RVL`;f -Dfg)5CVKcFs!%EmWIn_mHC:IYAQW#[^#f.ks8Mocj4)&ZZE0a]KQV!=@fBsHA8HjQF(f/o@BK+t -rtGCrV1reuA70cOs7*=SEFrZfPO\JK#l)E*G@kAnGj21,J,~> -o`#3jcDmA%R$u+pq#;'#L1;M>%1EUO$8Q4s_q3bg[V$!Xq[N];$_d@^s!?sKU4UDYs7!b+T9bhU -iQdg:[d="dbIs^4J@+nIn]AA4LP4I[rr32l`OM7fQ0J;J#QEPsWfVe7nc&P"lGg)kJ?JDAro_;* -P_,:drr2p%lbg&oK:M<-rtYLb_PW3<`Ua$.rVQQmq9ZpSNI].Drr3c/cG#s,KAc_.s8LonX-f*A -U8+-@b5M8<0`BeGXI#0H]>1J/H?G(Xjno)Xrql6GeA]#)XJ;/DLPLnSR$jA-RA@$\R[K:l[IX4p -'E77+Y+:uHN0N`0n\MT+R?WN'nbN1jps-FGR?ieol)=W4~> -o`#6qhi2JbBP;n\rqcX2rTs@QiQJ^2WMHN)cJe6bqt/mh\(g-:rU^3Ub0]qNs!Ia#U1@`equ?<% -MfWKKPI?KVHeJ5pn?A-r?!bbLs66G:A6jWHrr2p%l`,nQ?(CB_ru1aRT6O[J_=mp/rn!uq?!YVI -s8C?>I:6K`nbrIlk,*c>?)7#irs/;5So@qLh#%!K#P"s\DHgE%r;Q^#o!Oiu>B]0.rs\eJTm:$G -@q]FcB8?0Xs"O5]RWMk;>[1HHEJ1:2jQkXVf\"]ol1a`6kMtCKbe^K:DeN`p@V0q-C1_'eA@D7/ -rt=e+P]:;G?Ztc8nZ\'oAn#/3nbN1jpr8SCAn5:nl)=W4~> -o`#6qhi;SdBP;n\rqcX2rT2eVZ_ES<PaA5XcJe6bqt/mhXKK+KrPAZITum)ss!Ia#UL[lgqu?<& -N,rTLPdc]YI+e>qn?A-r?!khMs66J;A6s`Jrr2p%l`,nQ?(CB_ru1aRT6O[K_Y4$0rn+)s?!b\J -s8C?>I:6NanbrIlk,3i??DR,jrs/;5So@qMh#%!K#P"s\DHgH&r;Q^#o!Oiu>Bf6/rs\eJU3U-H -@qfLdB8?0Xs"O5]RWMk;?!UZLEJ1:2jQkXVg"Fosl1a`6kMtCKbe^K;DeN`p@V0q-C1_'eA[_@0 -rt=e,P]:;G?[(i9nZ\'oAn#/3nbN1jpr8VDAn5:ol)=W4~> -o`#6qhl337R[Kr<rqcX1rOd/&%1ERN(Jp@-cJe6cqt/mhBabIK%Kd.JT_RpS-N;o=Q%@Zds7F@; -TpVIXag?_[g%k[;`jhY!JBmohl,BilL6Ca!rr32g_m>PYW:0`c)Z%jrV2^#FpAb0lh8?4MJ'@Ze -rRercObC(2rVm)a`3#/RY4;Mk#PZKWT883VqtpBun\qu/Lk"4Xrr32na1@^nNTU6?%/\PiV2p+[ -Ng,rtV=jcd0_il(UQ'_NI<pEsOK-@^n)i]kj5ASXp[RS4j5&80_69B$S!f\.OI;f4R@07s^A%L( -'(<]HTp_1&OmE&;_6fo(P_c.*q>U`qcFKa=Q].'kW;hA~> -o`#6sm&bA@AnZ4XqYL4/o^_[uY,e@pZGkP^oAlm+n,)qIb.c]qnc&._lHdfNmJeL0bFE$\j8T)R -d>r?]DM3^N?+fV)s6HVBB3Sj$rVkNCIUccGm/I"iro']*?X'c,rr3o/\XRSB?/#2Us8'd/F'N>5 -r;ZQ,R<N(I[.aM!#Q<)DHsU*ip&=srn["Qp>^,?0qu6oeV28knEo[/urs%npP@RmUli-nnp:Zu8 ->$@)HDJ!EsdJj+E(\4npDI@4VWi`_GcJS-cftXqsXe:!`qu6U*rr)WambP(/EFrcg@#Aq&AclRU -U\FWb'(</mEFrZbHKtP#Y`Ed9@UPDiq>U`q`g(a[AR]oKW;hA~> -o`#6sm&bDAAnZ7YqYL4/o\[]`MhmXjZGkP^oAlp-n,)qIb-/"Z^])(P\u!F@mJeL0bFN*]j8T)R -d?&E^DM3aO?+fV)s6HYCB3Sm%rVkNDIUccHm/I"iro'`+?X0i-rr3o/\sm\C?J>;Vs8'd/F'N>5 -r;ZQ,R<N(J[.aM!#Q<)EHsU-jp&=srn[+Wq>^5E1qu6oeVMStoF6!9!rs%npP@RmUli-nnp:Zu8 ->$@)HDJ!EtdJj+E(\4qqDI@7WWi`_GcJS-cftXqsXe:$aqu6U*rr)WambP+1EFrcg@#Aq&AclRV -U\FWb'(</mEFrZbHKtP#Y`Ed9@UPDiq>U`q`g1g\AR]rLW;hA~> -o`#6sm'rdWR@Bk\qYL4.oOf9T$48nBZGkP^oBO;snb`.Kb#AfZr=/o=%$LAPs!@Ql]oS!0rr;cB -[%`t\XKIS0^@)"#lbg&sLk4C\rnbDhP_bsurr36&j27pYJ%5.Mru1OP]V((0gACpMqU30RLP"@[ -s7jjNUlgAEpAY'srRnubNe"q<rr35na1@[mNop?<rs.l(Z'pW1j8T&X#4BF=Q%>Fjrr3H$bIsO& -H'jtfR?j2mrr)j5o#.u.N.\"-XgZ'khsgC!eBZ.V^S]QYrr3`4rV6$Qh7C%fR@&tgR[ok6R?iuB -p\On&n&Mu4R?N>dlMpCj[%WnPLnsS:rs8DF\YPX[Ng&_+s*t~> -oD]-ke:VIHBQ8U'qu$I:rTWITVkg?,e)^&okeDar]C5b!rThG=gZ\2"o^'uIp$Mc*p:Z`#M<b-@ -rS<QWAnZ$h=G#B*s8V5ZK4J5,jSo&"Q[*(NPOSSO#Q<&EH<ab,q>UC4n$&$i?#\g&s8V`&S8)8O -jo5;PZ]K6:A%;=5rs/A=T64CFg%t^J#4&=M@pFuZqYpcaU5*JnGNf#*#3i+C@9ou)rr3GsYa/m* -FiV=FB4bkDq#14/nZ\'nA9QD\jQZ+*qu6<(TS@c=F)SS`q>Ufm^R]IY@olp:Ir>6t!b[5Xqu7?/ -k-U(`Amef#m/QU[O)\c@@$C-Vrs8D=Q$-bOA9[::s*t~> -oD]-ke:_OIBQA^*qu$I:rSk;MPaSMbe)^&okeMjt]C5b!rThG+Y.;<a_Rl\Wp$Mc*p:Z`#MX(6A -rS<TXAnZ$h=G#B*s8V5[K4J5,jSo&"R!E1OPjn\P#Q<&FH<ae-q>UC4n$/*j?#em's8V`&S8)8P -jo5;PZ]K6:A%;=5rs/A>T64CGg%t^J#4&=M@pFuZqYpcaUPESoGj,,+#3i+C@:$&*rr3GsZ'K!, -G/qFHB4bnEq#14/nZ\'nA9QD\jQZ+*qu6<(TS@c=F)\Yaq>Ufm^R]IY@ols;J8Y?u!b[8Yqu7?/ -k-^.aAmef$m/QU[O)\c@@$C-Vrs8D>Q$-bOA9d@;s*t~> -oD]-ke>&FuR\?e"qu$I3rNm"@+BkGPe)^&omF&)'_XIL(rThEe$k<1G!t>ZQp$Mc*p<0t'Rd0qQ -rS=fSR@Bb/I$*7]s8V6#Xd+TsjSo&*\tt[NV==Ka#Q<;kVM]lSq>UC4n&Dl+LPb$is8V`6]pj_8 -jo5;P`3c8%M88ocrs/AH^S?[:g%t^J#4'78Q%PUnqYpca]W[fdP3DlE#3j.3P(C"1rr3Gs`jqIi -M9!H.R@0DFq#14/n\DN(Oc\#NjQZ+*qu6<6^TXQ5Tps$rq>Ufmcb?0BP_4CfTUu.N!g]SOqu7?/ -kKU<'R?2ogm/QUl[%WnPLnsS:rs8DF\>5O[PEtI3s*t~> -oD]3skbrH1ASZOGVsOE^ruh3s_Psrbh<an5ikpgsNPF3?rr<#qkeY$ekje<3d)>MBs!@0?M.*4L -s8W)ZQ?m4V@TQdJnG`Idd\;/!>_MAAq9"eAAS-kirr35u`hIN\CuG9krs%_dLh'b>l2L\om]Vgb ->`7qJs73CMEFWXdp\t1)oYR8@?>SU"s8W)WVh8D`V"+<]#3hh8Cgq>Hrr36&goH!5?c2X;rsn@p -N+6(Lk2;MDBOu/=rr2p%nZ@^h@Vk9*rri>h\rUh0Acl_$li-e]')U1eNc&E6<-H<EEFrfrAoc)n -r;RH,bc6,*A6N-Ao)J6aO)\c@@$C-VrsAJ=OEG/JA9?`.WW.J~> -oD]3skbrK2ASZOHW9jN_ruh3o[%t+Oh<an5il$q!Nka<@rr<#qkeXC'\\H"nVRQ-`s!@0?M.3:M -s8W)ZQ[3=W@TQdJnG`Idd\D5">_VGBq9"hBAS6tkrr35u`hRT]D;bBlrs%_dLh'e@l2L\om]Vgb ->`A"Ks73CNEFW[fp\t1)oYR8@?>\[#s8W)WW.SMbV"+<]#3hk9CgqAIrr36&goQ'6?c2X;rsn@p -N+6(Lk2;MDBOu2>rr2p%nZIdi@Vt?+rri>h\rUh0Acl_$li-e]')U4fNc&E6<HlKGEFrfrAol/o -r;RH,c)Z;,A6N0Bo)J6aO)\c@@$C-VrsAJ=O`b8KA9Hf/WW.J~> -oD]3skd-eER%:(W_XRR(ruh3V>_of0h<an5l.*2,SA3eNrr<#qkeTIl%1WjW$tf(ts!@0SZ%oLO -s8W)ZZDO(YP_"%onG`IdftjYOKU:s'q9cUFR$496rr35udD;Q7LuA72rs%`,Ya'p*l2L\om`)`% -Jt20,s73t0TTtVPp\t1)oZk7FMMU6js8W)Y`3#2SY4;Ag#3i_%SWf6#rr36&hoMjZK#m]crsnA4 -Z]p$0k2<83R[9K&rr2p%n\;?&PEP/,rri>ja0_K<R0/nXmf*+`')US3Z_!MAH&BY@TUD4:R%Dn- -r;RH,fZ0t[Q\^!uo)J6r[%WnPLnsS:rsAJF[A0.XQ_!.8WW.J~> -o)Bg*dtqgLAnlF@S]^I$s82'2fB2Z"kL6u'D0r;*jnJcQrsJYc_8"[ena+Z@na6>[lE,>?]Cl1' --L%4TCLpdPK&6D)s7jL(H!t'Mn,N:<N,WB>GO5A0rpIXpE+4(Trr36&gSB=->`J.Mru1+#LLXkt -nc/X]]7k-6BpJ>js8M,mP\afRkPkJdrR%Bf?<t/8qYqf)RXT$_DT;YTs8(!>H=1:<qu?]qiMM68 ->cdMc]Qe%$C6\Mmrs/(sK5P7<\,H:*55jQB]74L*AnZ")S^HX!rqc!<cF9']AR88;ZerB<A7]Cg -DMZI5s8W)mf!pl_ARAAEfD5I:Y`Ed9@UPDiq>Us#c&-IPB4u1McIg^bb5JLCJ,~> -o)Bg*du%mMAnlFAT$$R%s82'2fB2Z"kL@&)DLAJ,jnJcQrsJYc_6'iM^UpANna6>[lE,>@]Cl1' --L%7UCLpdPK&6D)s7jL(H!t'Nn,N:<NGrK?GjPJ1rpIXpE+4(Trr36&gSB=->`S4Nru1+#LLXkt -nc/X]]7k-6C6nMls8M,mP\afRkPkJdrR%Eg?=(59qYqf)Rso-`DT;YTs8(!>H=1==qu?]qiMV<9 -?**Vd]Qn+%C6\Mmrs/(sK5P7<\,H:*55jQB]7=R+AnZ")T$lg#rqc!<cFB-^AR88;ZerB=A7]Cg -DMZI5s8W)mf!pl_ARAAFfD5I:Y`Ed9@UPDiq>Us#c&6OQB4u1NcIgacbPeUDJ,~> -o)Bg*e"E%mR%0kP^=i/Xs82'2fB2Z"mGQ<uP`W&jjnJcQrsJYc_*8>;%LihXna6>[lGocU_=dg- --L%t?SX5:\Ol$!8s7jpTV36P3n,N:<Z_*YOSF$:Urp\=LT9#/urr36&hSQ:UJtDB/ru1+@YEb!S -nc/X]`NGf"R'-)]s8M92\=J\DkPkJdrReucNe"q<qYqf)[],gaR*bg3s8(?dViZ_hqu?]qj2A$\ -J@+n:_5*KeR^)Yers/)/XIbfI`r5l955jcd_Q'&lR@9\C^#&/Trql3IgsER+R#ZK:\)4upQC+)0 -T<HoFs8W)niR#$+R#ZK?fD5I:_6fo(P_c.*q>Us#d^#L4R@BhYgZ%2BgAS2SJ,~> -o)Ba/m(IUQ@qB=nJ![1Jce7C<f@J6]Vg;umQbhDFr;-F"qrY`0g$%bO`:<9q#6*J_F)'D)rr4>5 -W.f+u<a*6,rr<#i^n5aYBXIF3ro&]MAnPt[p&*jhVh8bsIHgb2-2YoZH='sZo)Jagd@G\sD6rp8 -s7k,rBP(q$_Ya,_]:+%ZAprqCrs/;6Soe1Bg%tRFEU03?BP2(>lM^"mYDdF1DqY-is8CB@HsL(& -p\NU&D.[I&_>XE6oYc)fAncbIrVui^c'`OhJ7iA'B4u::SZ]T?_S<LQLiHp0:fES5o@f+9@:a(g -H'PYSbKe,8P]gVF;H'1Mrr;MmO)\c@@$C-Vrsnq]JnS_-BPrBkWhXj:p9+FG~> -o)Ba/m(IXR@qB=nJ![4Ld+[R>f[e?_W-W)oR).MGr;-F"qrY_sXgu'C\+/nd#6*J`F)0J*rr4>5 -W.f+u<a*6,rr<#i^n5aYBXIF3ro&`NAnQ"\p&*jiVh8bsId-k3-2YoZH='sZo)Jagd@PbtDR9$9 -s7k,sBP(q%_Ya,_]UF.[Aq'"Drs/;6Soe1Cg%tRFEU06@BP2(?lM^"mYDdF1E7t6js8CBAHsL+' -p\NU&DJ!R'_YsN7oYl2hAnceKrVui^cC/akJS/J(B4u::T!,fC_nWURLiHp0:fES5o@f.:@:a(g -H'Y_Tbg4;:P]gVF;H'1Mrr;MmO)\c@@$C-Vrsnq]K4nh.BPrBkWhXj:p9+FG~> -o)Ba/m(f'QPaIr5Wk-3th;mk`iSiSA`MSQHT>B7Nr;-F"qrY^Z$k3XSAb#3g#6*T(U6+()rr4>5 -]<.ZgJ9Sfurr<#ic+g$<OM1;dro'oKR$jP^p\a=.`N>\rT'?7S-2Z3-VN6;8o)JagfY4>OR)&Cp -s7k-ER[BS?dJNb#d_)KIQ(I7>rs/;D^8$O7g%tRFEU0s,R[KYMmeuV/ag.P'QJDK>s8CWfVi6/O -p\NUASXGq?dJa+FoZ="uR%()6rVuicgq/okT9bb0R@BkN^<+gRf@8*^Yb78=GB9;0o@fq'P*_T. -VRXe#gYLQ.\"oCPHul1Jrr;N)[%WnPLnsS:rsnq]W0s!?R\$Rn`knUap9+FG~> -nc'R)iM^Kt?t<kbFFfLGWNrn2QuunCBp6-WlhUPTrs8Ma_8"[bf>[7Ks(;9#lH6&KFN!>@s8VZ# -MJQNsK&6D(o^(GHP&OuPU>PtMl(Ds(AT*="XcddEAS,Ll[+3%=oXpK)>?o)?s8Vr8NH&QBIE]p? -q;R?H@V9bCWMY2mBP(geDm\'3d-e,uA6Na,rqcY7o"B-RA8?UbXdaBWB4YXiRa]EmoY-W)=^g.b -rp-Y+@qKV2^>dMmfnj<LAp9TQaMOii?&[14CgCFYAS>n&J;9&@Km[`H>uXU'PgK""m_s9V?".A\ -G(l6RSs"Y@@Tu]-MUV7us7*1@@piSIP4AAJ%fYUXB3\hR@qB=iA7:epY5a"~> -nc'R)iM^Kt?t<kbFFfLGWj9"4R<E(FC6Q6XlhUPTrs8Ma_6'iJX0hBcs(;9#lH6)LFN!>@s8VZ$ -MelWtK&6D(o^(JIP&OuPU>PtMl(Ds(AT*@$Y**pHAS,Ll[+<.@oXpK)>?o)?s8Vr8NH&QBIEg!A -q;RBJ@V9bDWMb8oBkCpfDm\*5d-e0!A6Nd-rqcY7o"B0SA8?UcY+0QZB4YXiS(#QpoY-W)=^p4c -rp-\,@qKV2^>dMmfnsENAp9WRaMXrk?B!:5CgCFYAS>n&J;9&@Km[`H>uXX(Q-f+#m_s<W?".A\ -G(l6RSs"Y@@Tu]-MUV7us7*1@@piSIP4AAJ%fYUXBO"qS@qB=iA7:epY5a"~> -nc'R)iNJ<#OHu<*UT:f<`lu]J];(@6JXa7"lhUPTrs8Ma_*8>;$r-6\s(;9'maoFRT$Qg's8VZ- -Z(6brOl$!7p@74k\"B%Y\E<ejl*-V?R%LS"agRq4QC+&1a5PS)oZOe8LjmD=s8VrAZ_<bSVqKhH -q;S9;PF8/P`l+mNQ'[l*S]B^>h<r7hQ\C.PrqcX&o#%)_QCY"hah=C>rg7/a\DQ#goZXk7Kn/"X -rp.%bQ'n5Fd-9EIfqXaoRAILAf[[p/JXOolOc#3bR$sS@Wir\4Y,IqVMgf_kSC$j*m_tEKN0BX" -Uoq8B^:()5P_j[*Q.,F+s7*h'Q&poVU[e0[%fYUjOc,9aQ'[r1Q&;L1Y5a"~> -nc'L+p",mS?!CTA?t!MS@pr\J=&s:,]$fg9rUp0qqrY`/eBP_pnc)Gai3TGCAR/\cG-UrEpW.Sa -:gh?5rqO73TQadJ>$Z,lPPXprG@4QW>$G08OFL_B=^#BOBs$TcB3S;>h#%-Oq9*kc=]o$FBP6f& -^2mU`r`Tq;CS5cU=]np>C2'g1M.KgeFQ`K"55O#m@p3&?>$>'WQ=jB(=^c&ZNT?L@>>]7urr;`B -JRDVb>\S1mVWGI1?<^]DBP:jZBq*B3fqN.d>?bE@rEq6b?!C?/;-%Y9dd[58qr>,4?<^T=?X[DR -@UNJD<)HhTbjYN1s7)^m>$"^$O7E#F"nKol?WgM1=Thf*;NL@Ns*t~> -nc'L+p",pU?!CTA?t!MS@pr\J=''C.]$fg9rUp0qqrY_rWM?N]nc)GaiO#VEAR/\dGI%,GpW7\c -:gqE6rqO:5TQadJ>$Z,mPPXprG[OZX>$G08OFLbC=^#BOBs$TcB3S;?h#%-Oq9*nd=]o$FBP?l' -^2mXar`Tq;CnPoW=]np>C2'g1MIfpfFm&T#55O#nA6N/@>$G-YQ=sH)=^c&[NoZXB>>];!rr;`B -Jmhed>\S4oVrbR3?<^]DBP:m[C7EK4fqN1e>?bE@rEq6b?!C?/;HIk<dd[58qr>,5?X-c??X[DR -@UNJD<)HhUbjYN1s7)an>$"^$OR`,G"nKol?WpS2=Thf*;NUFOs*t~> -nc'L+p"-."K85AFOHG`kQ'.)ZH$+e2]$fg9rUp0qqrY^Z$k+u[nc*5"kKV#QQ].!!UW332pW]Ol -GC.C"rqOsb^nm-KLl@n"ZMO4<QAC6NLk^D*R$!;]L51hRO1shcQA'R/h#%-Oq9YalL4tJJP)Sku -^lsS.Lkp_3Jte9^L5(JEPE3H<Y*4EZMWag855O$,MhHkAL4OW0S;i;YL5_=YW8t@QKQVt/rr;`B -S;W,XMjBou]&gYfKnbMJR@&t_J>(6Pfr9aYKo(eMrK&XlN/3%2F*3/;dd[58qr>2JJqSo;O-,Wj -PE:]UHZF=pbjYN1s7*LXJ9uQ_TCM^V"nKp)Jpr4KJHUIKF.`!*s*t~> -nGa:'o@UL#@Tc`5=&r:!<*O-jVSC^HpAOR^#5dQ!\[\s2nc&ag`,8sbrDsP4R.UFUgM'bkOQ-0; -mYPO[qc>FQG45Cl\:.[a='g0Qa1$"i='KBoY1hojD.[F1jo5;[qr!`H='&mRNP4]TiO!b,<tf%s -]Zd<l='&U?LT]@gI;<G.R-aYK+TCiPO^M6l>Ap1P`IV;r=(lrVd,:%)An[7ks8W&_]Qa?V)J"5b -dI?,&I:$&S='K[-]%6?Io@LF+AQW&8r`9J.<)cdtAq$SmhXpdGrtP7f_j,4H='&F(=&r:!<F0sM -cL(T0rrVc"K`65uJ$AM=rrr>daJ+0"rFQ.II^&CGs*t~> -nG`^lo@UL#@p8k5$s$>+<Ej6lVSC^HpAOR^#5dQ!Vim_=nc&ag`,B'erE'V6R.UFUgM0knOQ-0; -mYPR]qcGLSGOPLm\:.^c=C6BTa1$"j=BoTrYM/#lDJ*X5jo5;[qr!`I=BK*VNP4]TiO!e-=;,2! -]Zd<m=BJgCLTfFhIV`Y2R-aYK+TCiPO^V?o>]?@R`IV>t=D</Yd,:(*B5*Ins8W&_]QjEX)J+;d -dI?,&IUH8V=Boj/]%6?Io@LF+Am&5:r`9J.<)lk!B7HbohXpdGrtP7f_j,7J='&F(=&r:"<F:'P -cL(T0rrVc"K`65uJ$AM=rrr>daJ+3$rFZ4JJ$ALHs*t~> -nG`[ko@UL4J,Xa'H[9mXFEi=sW5$pJpAOR^#5dQ!57013nc&agc]s*,rH8`sWV$5fgQ-Q%S)X>F -m\bqiqfXW:O73&0\rV,[G']"Ia1@.PG'JS&ZJ+?3LOO]6jo5;[qr"5uG'87gR(r"aiO4XCFq]7c -]ZdR7G'8+]Pd9$#RY6-?V!RpW:&aV(S:#L'G_;d/`KY^mG(5INd,:gXIXdpSs8W&_^5[>[G(,FI -eF;G+NdGqjG'J\/]%6?Io@LF7IsH<cH@(!bGBItMIZ12@hXpdGrtP7f_juO.G^4U^H[9jVFaAnF -cL(T0rrVc+Q2ZR@Nk"ZTrrr>daJY#JrI+j!Nk"Y_s*t~> -n,EUkpZ'?$Q[esZ#_\MH]Zo="q#9a^"oIH!ZG#VprrW&S\bi?:[++aJroh(qZdSLGs6n+6qPbL= -b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN<VTkOIBBXfAS8 -akZCObIG'sg%G.?)>idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&K4e -YeS]Op\t3lp>sQ-SrS-pGmK4fX16=.meZq]rs/Q"m+&kSOb<RW#)SnWa5?IdrVlroim%JA!mTa" -p\tBnn(c("rO;sCb2W3!s*t~> -n,EUkpZ'?$Q[esZ#_\MH]Zo="q#9a^"oIH!VmYm]rrW&S\bi?:[++aJroh(qZdSLGs6n+6qPbL= -b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN<VTkOIBBXfAS8 -akZCObIG'sg%G.?)>idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&K4e -YeS]Op\t3lp>sQ-Sr\3rGmSeROK5n6h<t.=rVm-%qWubIYE=M:GmAYPS[6Aoo)8Oe!r1d"rl"r` -iqW9J"T.ZCb.dha"22k:poaXI~> -n,EUkpZ'?$SW*N'#`tOY]Zo="q#9a^"oIH!@u'F@rrW&S\bi?:[++aJroh(qZdSLGs6n+6qPbL= -b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN<VTkOIBBXfAS8 -akZCObIG'sg%G.?)>idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&KLm -YeS]Op\t3lp>sQ-U6^Z7L^Ap$R&da>h<t.=rVm-%qWubIYF1IML^/d#TsMeso)8Oe!r1d"rl"r` -iqW9J"T.ZCb.dha"22k:poaXI~> -mJd^oo&\KIa2Q$<cIh1Do_\XSrri5`f&$)irrW/kkkj?Mk4/?Ks7kj<kOSTOs8)-DqViOVmJ?k^ -qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[ -l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i -"o\)WgsX=C`<XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-<j" -lKn'9rN?0N~> -mJd^oo&\KIa2Q$<cIh1Do_\XSrri5`f&$)irrW/kkkj?Mk4/?Ks7kj<kOSTOs8)-DqViOVmJ?k^ -qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[ -l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i -"o\)WgsX=C`<XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-<j" -lKn'9rN?0N~> -mJd^oo&\KIa2Q$<cIh1Do_\XSrri5`f&$)irrW/kkkj?Mk4/?Ks7kj<kOSTOs8)-DqViOVmJ?k^ -qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[ -l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i -"o\)WgsX=C`<XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-<j" -lKn'9rN?0N~> -li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq>Kma"9&&fo)A.]o(Mt[LAuc~> -li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq>Kma"9&&fo)A.]o(Mt[LAuc~> -li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq>Kma"9&&fo)A.]o(Mt[LAuc~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -JcC<$JcFs6J,~> -%%EndData -showpage -%%Trailer -end -%%EOF diff --git a/docs/draknet_advanced_doc.txt b/docs/draknet_advanced_doc.txt deleted file mode 100644 index a0c0c63e0..000000000 --- a/docs/draknet_advanced_doc.txt +++ /dev/null @@ -1,165 +0,0 @@ -This document details the entry points you can call without the DrakX graohical -toolkit. First, the general variables you will encounter further. If you don't -know wht a variable is, look here. Any additional locally variables are -commented 'in place' - ------------------------------- -Special types (in upper cases) ------------------------------- - DB_FILE : file storing the ISDN ISP database. see share/isdndb.txt : file of lines in 'Unlisted - edit manually' or /^(.*)\|(.*)\|(.*)=>([0-9]*)=>(.*)=>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})=>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ where $1=Land $2=City $3=ISP_name $4=phone_number $5=hostname $6=dns1 $7=dns2 - ---------------------------------------------------------------------------------------- -Summary of common variables used (local variables are described in the function itself) ---------------------------------------------------------------------------------------- -notation : keys : description : type : format (regexp or enumeration. `...' means it's not exhaustive - $prefix : prefix path (empty in post-install) : string : path - $isLaptop : flag for laptop : boolean or int : guess - $isdn : hash table containing isdn infos - $isdn->{login} : cnx login : string - $isdn->{passwd} : cnx passwd : string - $isdn->{phone_in} : user phone : /^[0-9]*$/ - $isdn->{phone_out} : ISP phone : /^[0-9]*$/ - $isdn->{dialing_mode} : dialing mode : "auto" or "manual" - $isdn->{driver} : driver used for the card : "hisax" or "b1pci" or ... - $isdn->{type} : type of card, used for the driver, see netconnect_consts : integer : /^[1-22]|[24-37]$/ - $isdn->{irq} : irq of the ISA card : integer | - $isdn->{mem} : mem of the ISA card : string | - $isdn->{io} : io of the ISA card : string | see netconnect_consts for examples. - $isdn->{io0} : io0 of the ISA card : string | - $isdn->{io1} : i01 of the ISA card : string | - $isdn->{idl} : amount of time after the cnx times out in secs : int - $isdn->{user_name} : not used anymore. Not explicit. It represented the name of the connexion. - $isdn->{card_type} : card type : string : "isa" or "pci" or "pcmcia" - $isdn->{protocol} : cnx protocol : int : 1|2|3 : 1 for old german specific (not used anymore), 2 for europe, 3 for rest of the world - $isdn->{id} : card id. Associated with vendor, identify strictly the card. see pcitable : integer - $isdn->{description} : card description from pcitable : string - $isdn->{vendor} : card vendor : integer - $isdn->{passwd2} : passwd verification : string - $modem : hash table containing modem infos - $modem->{device} : device of the modem : string : /ttyS[0-9]/ - $adsl : hash table containing modem infos - $adsl->{login} : cnx login : string - $adsl->{passwd} : cnx passwd : string - $adsl->{atboot} : - $netc : hash table containing system-wide networking infos (maybe not true, correct this) : - $netc->{NET_DEVICE} - $netc->{dnsServer2} - $netc->{dnsServer3} - $netc->{DOMAINNAME2} - $netc->{NET_INTERFACE} is set to "ppp0" - $in : interactive object - ------------- -Entry points ------------- - -isdn_write_config_backend : write isdn info, only for ippp0 -> ask_connect_now -input : - $prefix - $isdn -$isdn input: - $isdn->{login} $isdn->{passwd} $isdn->{phone_in} $isdn->{phone_out} $isdn->{dialing_mode} - $isdn->{driver} $isdn->{type} $isdn->{irq} $isdn->{mem} $isdn->{io} $isdn->{io0} $isdn->{io1} - -write_secret_backend : write login and passwd into /etc/ppp/{chap, pap}-secrets. Replace old passwd only if same login -input : - $a : login : string : /^.*$/ - $b : passwd : string : /^.*$/ - -connect_backend : launch the cnx script -input : $prefix - -connect_backend : launch the cnx script -input : $prefix - -read_providers_backend : build the tree of isdn ISP -input : - $file : 1st location of the file : ISDN_DB_FILE - $file2 : 2nd location of the file : ISDN_DB_FILE -output : the list of ISP : array of strings : array of /^(.*)\|(.*)\|(.*)$/ where $1=Land $2=City $3=ISP_name - -get_info_isdn_backend : fills the infos from the line of the tree returned into $isdn and $netc -input : - $isdn - $netc - $name : the line choosen in the tree of ISP : string : /^(.*)\|(.*)\|(.*)$/ with $1=Land $2=City $3=ISP_name - $file : 1st location of the file : ISDN_DB_FILE - $file2 : 2nd location of the file : ISDN_DB_FILE -$isdn ouput - $isdn->{user_name}, $isdn->{phone_out}, $netc->{DOMAINNAME2}, $netc->{dnsServer2}, $netc->{dnsServer3}, -$netc output - $netc->{DOMAINNAME2}, $netc->{dnsServer2}, $netc->{dnsServer3} - -isdn_detect_backend : detects isdn pci card and fills the infos in $isdn : only detects one card -input - $isdn -$isdn output: - $isdn->{description} $isdn->{vendor} $isdn->{id} $isdn->{driver} $isdn->{card_type} $isdn->{type} - -isdn_get_list : return isdn cards descriptions list. This function is not use internally. -output : descriptions : list of strings - -isdn_get_info : return isdn card infos. This function is not use internally. -input : the description of the card (see isdn_get_list) -output : a reference on the decription of the card. : ref on a hash(description,type,irq,mem,io,io0,io1card,) - -conf_network_card_backend : configure the network cards and return the list of them, or configure one specified interface : WARNING, you have to setup the ethernet cards, by calling setup_thiskind($in, 'net', !$::expert, 1) or setup_thiskind_backend before calling this function. Basically, you call this function in 2 times. -input - $prefix - $netc - $intf - $type : type of interface, must be given if $interface is : string : "static" or "dhcp" - $interface : facultative, if given, set this interface and return it in a proper form. If not, return @all_cards - $ipadr : facultative, ip address of the interface : string - $netadr : facultative, netaddress of the interface : string -when $interface is given, informations are written in $intf and $netc. If not, @all_cards is returned. -$intf output: $device is the result of - $intf->{$device}->{DEVICE} : which device is concerned : $device is the result of $interface =~ /(eth[0-9]+)/; my $device = $1;; - $intf->{$device}->{BOOTPROTO} : $type - $intf->{$device}->{NETMASK} : '255.255.255.0' - $intf->{$device}->{NETWORK} : $netadr - $intf->{$device}->{ONBOOT} : "yes" -$netc output: - $netc->{nb_cards} : nb of ethernet cards - $netc->{NET_DEVICE} : this is used to indicate that this eth card is used to connect to internet : $device -output: - $all_cards : a list of a list ( (eth1, module1), ... , (ethn, modulen)). Pass the ethx as $interface in further call. - $device : only returned in case $interface was given it's $interface, but filtered by /eth[0-9+]/ : string : /eth[0-9+]/ - -adsl_conf_backend : write adsl configuration -input : - $prefix - $adsl - $netc - $adsl_type : type of cnx : string : "pptp" or "pppoe" -$adsl input: - $adsl->{login}, $adsl->{passwd}, $adsl->{atboot} -$netc input: - $netc->{NET_DEVICE} - $netc->{dnsServer2} - $netc->{dnsServer3} - $netc->{DOMAINNAME2} -$netc output: - $netc->{NET_INTERFACE} is set to "ppp0" - -modem_detect_backend : detects modem on serial ports and fills the infos in $modem : detects only one card -input - $modem - $mouse : facultative, hash containing device to exclude not to test mouse port : ( device => /ttyS[0-9]/ ) -output: - $modem->{device} : device where the modem were detected - -get_net_device : return the device choosen for the net cnx -no input -output : name of the internet device. - -read_net_conf : read the information stored in $prefix/etc/sysconfig/draknet and $prefix/etc/sysconfig/draknet.`type` -input: - $prefix - $netcnx - $netc - -set_net_conf : set the information from netcnx in $prefix/etc/sysconfig/draknet and $prefix/etc/sysconfig/draknet.`type` - $prefix - $netcnx - $netc : useless! REMOVE ME diff --git a/docs/interactive/ask_from b/docs/interactive/ask_from deleted file mode 100755 index dad69247e..000000000 --- a/docs/interactive/ask_from +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/perl -# Yves Duret <yduret at mandrakesoft.com> -# license: GPL - -use lib qw(/usr/lib/libDrakX); -use interactive; - -my $irq=1; -my $login; -my $login2="editable"; -my $check; -my $range=57; - -my $in = 'interactive'->vnew(undef, 'default'); - -$in->ask_from("window title - ask_from", - "message\nexamples of utilisation of ask_from", - [ - { label => "enter scalar", val => \$irq }, - { label => "combo (type=>combo optionnal)", val => \$login, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], type => 'combo'}, - { label => "choose from list editable and sorted", val => \$login2, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], not_edit => 0, sort => 1}, - { label => "check box", val => \$check, type => "bool", text => "text" }, - { label => "range", val => \$range, type => 'range', min => 0, max => 100 }, - ], - complete => sub { print "complete\n";print "$irq\n$login\n$range\n"; }, -# focus_out => sub { print "focus_out\n"}, -# changed => sub { print "changed\n"; }, - ) or $in->exit(0); -$in->exit(0); diff --git a/docs/interactive/ask_from_list b/docs/interactive/ask_from_list deleted file mode 100755 index 63c0ee996..000000000 --- a/docs/interactive/ask_from_list +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl -# Yves Duret <yduret at mandrakesoft.com> -# license: GPL - -use lib qw(/usr/lib/libDrakX); -use common; -use interactive; - -my %l = ( - 0 => "Welcome To Crackers", - 1 => "Poor", - 2 => "Low", - 3 => "Medium", - 4 => "High", - 5 => "Paranoid", - ); - -my $in = 'interactive'->vnew(undef, 'default'); - -my $level = $in->ask_from_list("window title - ask_from_list", - "radio button\nexamples of utilisation of ask_from_list", - [ values %l ], $l{2} - ) or $in->exit(0); - -print "$level\n"; -$in->exit(0); - diff --git a/docs/interactive/ask_from_listf b/docs/interactive/ask_from_listf deleted file mode 100755 index 077540b49..000000000 --- a/docs/interactive/ask_from_listf +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl -# Yves Duret <yduret at mandrakesoft.com> -# license: GPL - -use lib qw(/usr/lib/libDrakX); -use interactive; -use Data::Dumper; - -my $in = 'interactive'->vnew(undef, 'default'); - -my @m=( - { description => "dhcpcd", - c => 1}, - { description => "dhcpxd", - c => 3}, - { description => "dhcp-client", - c => 4}, - ); -my $f = $in->ask_from_listf(_("ask_from_listf"), - _("Which dhcp client do you want to use?\nDefault is dhcpcd"), - sub { $_[0]{description} }, - \@m ); - -print Data::Dumper->Dump([$f],['f']) . "\n"; - -$in->exit(0); - diff --git a/docs/interactive/ask_from_treelist b/docs/interactive/ask_from_treelist deleted file mode 100755 index ade7141d4..000000000 --- a/docs/interactive/ask_from_treelist +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl -# Yves Duret <yduret at mandrakesoft.com> -# license: GPL - -use lib qw(/usr/lib/libDrakX); -use common; -use interactive; - -my $in = 'interactive'->vnew(undef, 'default'); -my $foo = $in->ask_from_treelist("window title - ask_from_treelist", - "message\nexamples of utilisation of ask_from_treelist", - '|', - ['Custom', - 'Other|Unlisted', - 'Matrox|Millennium II=>Matrox Millennium II', - 'Matrox|Millennium G200=>Matrox Millennium G200', - 'Matrox|Millennium G400=>Matrox Millennium G400', - 'Matrox|Millennium G450=>Matrox Millennium G450', - 'Matrox|Millennium G550=>Matrox Millennium G550', - 'Sun|FFB 67MHz Creator=>Sun FFB 67MHz Creator', - 'Sun|FFB 67MHz Creator 3D=>Sun FFB 67MHz Creator 3D', - 'Sun|FFB 75MHz Creator 3D=>Sun FFB 75MHz Creator 3D', - ], - 'Custom' - ) or $in->exit(0); -print "$foo\n"; -$in->exit(0); diff --git a/docs/interactive/wait_message b/docs/interactive/wait_message deleted file mode 100755 index 0caec4471..000000000 --- a/docs/interactive/wait_message +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/perl -# Yves Duret <yduret at mandrakesoft.com> -# license: GPL - -use lib qw(/usr/lib/libDrakX); -use interactive; - -my $in = 'interactive'->vnew(undef, 'default'); -my $wait = $in->wait_message('wainting title', _("Moving files to the new partition")); -sleep(3); -$wait->set(_("Removing")); -sleep(3); -$in->exit(0); diff --git a/docs/mdk-9.2 b/docs/mdk-9.2 deleted file mode 100644 index 1d5a06494..000000000 --- a/docs/mdk-9.2 +++ /dev/null @@ -1,129 +0,0 @@ --*- outline -*- - - todo list for mdk9.2 - (mainly gtk+ oriented for now) - -* erratas -** put them in gi/perl-install/patch/mdk_9.1 -** move mdk9.1 ones from gi/perl-install/patch into gi/perl-install/patch/mdk_9.0 - - -* libDrakX -** document internals through docbook like kernel-2.5.x does - -* mcc vs tools communication -** faster tools embedding in mcc (gc idea) - move gui into gui/<sg>.pm so that mcc can just do require on them - instead of doing slow fork+perl startup (same idea as fast_cgi, - perl_mod and the like) -** told apps to ask user whether to save their changes or to discard them on cancel (#1437) -** to let diskdrake fit better when embedded, we should write "formated - mounted" rather than "formated\nmounted" -** "testing mode" option in options menu so that we pass --testing to our tools ? - -* ugtk2 & tools guies: -** cleanups: -*** $o->flush() should be sub { $_[0]->window->process_updates(1) } - see logdrake::parse_file()'s progress bar as an example -** saner/cleaner usage of gtk+-2.2 widgets: -*** use MessageDialog for modal windows (cleaner) - especially for wait/error messages so that one uses std gtk+ icons for info/error/warning and the like events -*** use button boxes everywhere when we have several buttons for saner gui (as per gnome specs/recommendations) -*** gtk::combo => gtk::optionMenu (as per gtk+-2 doc) -*** use size::group to let things be smoother in some places (eg: clock.pl from mcc) - -* tools -** all: -*** provide menu entries for more gui tools (?): for now, only harddrake2 and logdrake have one -*** explanations of std standalone.pm functions are broken due to common.pm overloading -*** have a button or a menu to access help (was already part of mdk9.1 specs) - only harddrake2, mcc and rpmdrake have one for now - policy might be: "most users access tools via the mcc, so let handle help, bug reports and co only in mcc" -*** rename and provide compatibility links: -**** adduserdrake => drakeuseradd -**** diskdrake => drakdisk -**** harddrake => drakhw -**** keyboarddrake => drakkeyboard -**** localedrake => draklocale -**** logdrake => draklog -**** menudrake => drakmenu [fredc] -**** mousedrake => drakmouse -**** printerdrake => drakprinter -**** userdrake => drakuser [deush] -**** XFdrake => drakx11 -** drakboot: -*** should prevent the user to insert a space in a kernel label (#2826) -*** fix "Display theme under console" setting from current theme config file (#2662) -** drakconnect -*** does not show up zeroconf as a valid mode in "configuring lan" window in embedded mode -** drakedm: -*** restart dm service ? -** harddrake: -*** colorize the internal help -*** add raw description (or join('|', vendor, descr)) for mass medias (see drakx bug #3???) -*** use pure gtk+ instead of interactive for "fields description" or alter interactive so that it creates modal windows -** logdrake: -*** search field does not get focus when embedded -*** we may disable the search button when one deselect all explanation files -** mcc: -*** make tool names be black or blue (like in rpmdrake & harddrake2 guies) (#2695) -*** hide non executable programs instead of warning at runtime if program isn't executable -*** make more program being options rather than depandancies (ie like rpmdrake and drakwizard) -*** add scrollbars if root window is below 800x600 (#2961) -*** add scrollbars for too big translated messages (but how to detect it) -*** move drakedm from hardware to system section -*** enhance mcc descriptions (#3265) -** rpmdrake -*** save mode (sort by group, mdk choice, ...) -**** sa serait cool que tu sauve la position (aka choix mdk, tri/alpha, par - groupe, par taille, ...) et que tu la restaure -*** m-q accelerator to quit -*** if package is unselectable, explain why -*** si conflit, proposer de deselectionner le package en question +tot que de - devoir se taper l'arborescence pour le deselectionner (a - que la - recherche e perde pas la selection de package en cours) -*** some windows are still non modal, like: - o tout ce qui se rapporte aux dependances "des paquetages - supplementaires sont necessaires", ... tu oublie de passer "{ - transient => $w->{rwindow} }" - o toutes les fenetres grpmi. faudrait voir si on peut foutre le - core de grpmi dans un package pour faire "use grpmi" et seter - le nouveau $::main_window pour corriger ca. -*** we need access to urpmi options like "no gpg signature check" -*** bug 1 -1) selectionner des packages a installer - -2) rpmdrake dit que X doit etres vier - -3) rpmdrake le vire - -4) rpmdrake passe a l'update/isntall proprement dite - -5) rpmdrake failled - -rpmdrake re-tentera d'enlever le package X du 1 en cas de reessai -alors qu'il n'est + la - -** scannerdrake/sane-find-scanner -*** do not detect every usb devices as scanner -** urpmi -*** --repair-system: add missing dependancies for currently installed packages - - -* packages -** main package updates: -*** rpm-4.2 -*** kernel-2.6 (if availlable and stabilized: not probable) ? - at least, keep kernel-2.4.x -** add new packages: -*** kernel-mosix -*** dvb related packages: vcr, vdr, ... -** icewm/windowmaker/other wm -*** export BROWSER like gnome/kde (look at /etc/gnome/gnomerc) - -* hardware support -** kernel: update alsa, bttv, dvb & saa7134 drivers for better hardware support (the laters from http://bytesex.org) -*** add "REGISTER ^dvb/adapter[0-9]+/[^/]+$ PERMISSIONS root.video 0660" to devfsd -*** update oss audigy driver from pserver:anonymous@cvs.sourceforge.net:/cvsroot/emu10k1 cvs -** add cx88 sound driver from http://bytesex.org/snapshot -** isa detection/probing in ldetect ? (#118, #497) => need some old hw in order to test - probably not diff --git a/docs/mdk-vs-redhat b/docs/mdk-vs-redhat deleted file mode 100644 index 4d0de8223..000000000 --- a/docs/mdk-vs-redhat +++ /dev/null @@ -1,43 +0,0 @@ -+ Open Development (at least DrakX) -+ UDMA66 (HPT366) -+ gamerz -+ number of packages -+ better packages(?) -+ no automatic handling of ide burners -+ urpmi/rpmdrake -+ XFdrake -+ no newbie install -+ reiserfs -+ fat resizing -+ 3D handling (eg: Voodoo3) -+ diskdrake (vs diskdruid) -+ usb storage (?) -+ KDE2 -+ faces in kdm/gdm -+ menu -+ alternatives -+ /etc/emacs/site-start.d -+ default config -+ i18n (bootloader keyboard) - -+ More user-friendliness in general: - + you can choose between multiple net devices when more than one are - detected - + you are presented with the media descriptions (disks, cdrom's) - when you must choose between multiple media, and not only "sda", - "hdc", .. - + when installing from a disk partition, you are presented with an - extract of the directory contents when you fail to give the - correct location, which is very helpful to correct the input - instead of simply rebooting to remember where on earth you - mirrored the distribution on your disks - -+ Automatic mode (Redhat's equivalent is called "kickstart") is not - performed according to a file on the floppy but from kernel parameters, - which have many pros, among them: (1) we don't need the vfat filesystem - for that purpose, and (2) with advanced bootloaders such as grub and - lilo you can edit parameters on the fly at boot time. - -- no LABEL= in fstab (for auto renumbering of devices) -- kerberos -- LDAP diff --git a/docs/net_object_class.fig b/docs/net_object_class.fig deleted file mode 100644 index 19f7f5318..000000000 --- a/docs/net_object_class.fig +++ /dev/null @@ -1,73 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4050 4162 675 338 4050 4162 4725 4500 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 5700 3112 675 338 5700 3112 6375 3450 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 7275 4087 675 338 7275 4087 7950 4425 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4800 1462 975 487 4800 1462 5775 1950 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 2700 3112 675 338 2700 3112 3375 3450 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4875 5887 975 487 4875 5887 5850 6375 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 9450 5062 675 338 9450 5062 10125 5400 -1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4654 4038 3900 3225 4654 4038 754 813 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 4125 1875 3225 2850 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 4575 1950 4200 3750 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5250 1950 5475 2775 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 3000 3450 3600 3900 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5925 3450 6675 3900 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 2700 3450 4050 5550 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 4125 4500 4575 5400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5625 3450 5025 5400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5775 1575 9450 4725 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7800 4275 9000 4800 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 4800 1950 4800 5400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9000 975 9450 4725 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 7500 75 10687 75 10687 975 7500 975 7500 75 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7500 375 5400 1050 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5550 1800 7200 3675 -4 0 0 50 0 0 12 0.0000 4 135 885 4350 1500 Netconnect\001 -4 0 0 50 0 0 12 0.0000 4 135 435 2475 3150 ISDN\001 -4 0 0 50 0 0 12 0.0000 4 135 720 3675 4200 MODEM\001 -4 0 0 50 0 0 12 0.0000 4 135 960 6825 4125 ETHERNET\001 -4 0 0 50 0 0 12 0.0000 4 135 480 5400 3150 ADSL\001 -4 0 0 50 0 0 12 0.0000 4 135 420 4650 5925 Tools\001 -4 0 0 50 0 0 12 0.0000 4 135 660 9150 5100 Network\001 -4 0 0 50 0 0 12 0.0000 4 135 1305 8400 375 Rest of the world\001 -4 0 0 50 0 0 12 0.0000 4 180 2595 7725 600 (draknet, printerdrake, tinyfirewall\001 -4 0 0 50 0 0 12 0.0000 4 180 2310 7725 825 ftp, http, net_monitor, drakgw)\001 -4 0 0 50 0 0 12 0.0000 4 195 2760 3525 6825 Global variables $in, $prefix, $install\001 -4 0 0 50 0 0 12 0.0000 4 180 2340 3525 7050 shared with the module globals\001 diff --git a/docs/object_class.fig b/docs/object_class.fig deleted file mode 100644 index 44fd3fe89..000000000 --- a/docs/object_class.fig +++ /dev/null @@ -1,32 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 2625 1200 2625 1725 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 7575 1125 7575 1650 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 7575 2100 4350 3225 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 5025 2025 4350 3225 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 2625 2100 4350 3225 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 5025 2025 6075 4125 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 2625 1200 4950 1725 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 7575 1125 4950 1725 -4 0 0 100 0 0 12 0.0000 4 180 1755 1800 1050 install_steps_gtk\001 -4 0 0 100 0 0 12 0.0000 4 180 1440 6900 975 install_steps_stdio\001 -4 0 0 100 0 0 12 0.0000 4 180 1140 2100 1950 interactive_gtk\001 -4 0 0 100 0 0 12 0.0000 4 180 1275 6900 1950 interactive_stdio\001 -4 0 0 100 0 0 12 0.0000 4 180 1875 4125 1950 install_steps_interactive\001 -4 0 0 100 0 0 12 0.0000 4 135 810 3975 3450 interactive\001 -4 0 0 100 0 0 12 0.0000 4 180 975 5625 4350 install_steps\001 diff --git a/docs/porting-ugtk b/docs/porting-ugtk deleted file mode 100755 index a72faabb6..000000000 --- a/docs/porting-ugtk +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -pi -# -# $Id$ -# -# This is not an automatic gtk+-1.x to gtk+-2.x port tool, -# just a tool that ease perl apps' gtk2 port. -# you'll have to fix all remaining problems, beginning by spotted warnings -# it'll save you basic conversion work -# -# if you used Gtk::Text, a little more work will be needed (look at logdrake gtk2 port) -# if you used Gtk::CTree, Gtk::CList or worse, Gtk::Tree, you'll need quite a lot of exhausting work :-( -# -# usage: porting-ugtk <file> -# -# hint: always use strict - -# switch to gtk2 : -s!Gtk:!Gtk2:!g; -/(use|require) Gtk/ and print STDERR "Warning: if this (bad) app that did not use my_gtk, you'll have a hard time :-)\n if not, using both Gtk && my_gtk was misdesigned ...\n"; -s!(use|require) Gtk.*!!g; # -s!my_gtk!ugtk2!g; - -# one should pass the right ":stuff" to "use ugtk2 qw();" -/ugtk::/ and print STDERR "Warning: you'll have to passe eiter :ask, :create, :helpers or :wrappers to ugtk\n"; -s!ugtk::!!g; -# if my_gtk wasn't used, this'll be spotted by the lack of "use ugtk2;" anyway -s!(require|use) ugtk.*!!g; - - -# deprecated : -/::(CTree|CList|Text[^V])/ and print STDERR "Warning: CTree, CList and Text widgets are deprecated... Good luck :-(\n"; -/gtkcreate_(png|xpm)/ and print STDERR "Warning: new Gtk::Pixmap(gtkcreate_(png|xpm)) should be replaced by gtkcreate_img\n"; -/set_policy/ and print STDERR "Warning: ->set_policy() should be replaced by allow_shrink/allow_grow/set_resizable\n"; - -# obsoletes methods||functions : -s!set_usize!set_size_request!g; -s!gtkset_set_border_width!gtkset_border_width!g; -s!border_width!set_border_width!g; -s!-(end|spread|extended|start|single)!'\1'!g; -s!createScrolledWindow!create_scrolled_window!g; -# quite a lot less usefull with gtk+2 but who knows... : -s!set_position\(1\)!set_position('center')!g; -s!gtkpng!gtkcreate_img!g; -# hacky but usefull in ->set_pixmap() context; else that'll be spoted at run time : -s!gtkcreate_png!gtkcreate_img!g; -# usefull sometimes but not in most cases : -#s!new GtkVBox!create_vbox!g; -#s!new GtkHBox!create_hbox!g; diff --git a/docs/spec-DrakX-8.0.html b/docs/spec-DrakX-8.0.html deleted file mode 100644 index 3fd545447..000000000 --- a/docs/spec-DrakX-8.0.html +++ /dev/null @@ -1,405 +0,0 @@ -<html><head><title>DrakX Specification for Linux-Mandrake 8.0</title></head> -<body bgcolor="#FFFFFF" link="#0066FF" vlink="#0066FF" alink="#FF0000"> -<table border="0" cellpadding="0" cellspacing="0" width="100%"> -<tr> -<td bgcolor="#99AAFF"><h2 align="left">DrakX Specification for Linux-Mandrake 8.0</h2></td></tr> -<tr><td valign="top"> -Current team of Install group is : -<p> -<table cellpadding="2" cellspacing="2" border="1" width="30%"> -<tbody> -<tr valign="Top"> -<td valign="Top">gc - -</td> -</tr> -<tr valign="Top"> -<td valign="Top">damien - -</td> -</tr> -<tr valign="Top"> -<td valign="Top">fpons - -</td> -</tr> -<tr valign="Top"> -<td valign="Top">pixel - -</td> -</tr> -</tbody> -</table> -<p> - -<pre> - - <b>Boot process (stage1)</b> - - Installation begin by booting from CD-ROM or Diskette. From CD-ROM all -installation method are available (CD, HD, NFS, FTP, HTTP) on options. From -Diskette according to image selected, only some related method (network or cdrom -or hd) are available and module managed due to size limitation to 1.44Mb. - Options are always available by pressing on F1. - - <b>DrakX process (stage2)</b> - - DrakX installation organized in steps (execution sequence described below). -Steps listed on left side and help available on bottom right side. most of the -screen is available for various dialog for interacting with the user. Steps -execution sequence is automated and described below. - -Mouse is probed and if none has been found or if the mouse has not moved, a -specific mouse configuration is displayed at the begining. - - -Before the graphical steps, there is a detection step. It detects various -hardware, including modems (from tty0 to tty7), mouse (serial, usb, ps/2) and -tablets. - - <b>Steps</b> - - <i>Choose Your language</i>: step always displayed. default choice is previous one or -<font color="#000080"><i>English</i></font>. After choosing a language, a license splash screen translated in the -chosen language is displayed with <font color="#000080"><i>Accept</i></font> and <font color="#000080"><i>Refuse</i></font> buttons. <font color="#000080"><i>Refuse</i></font> should -stop installation. <font color="#000080"><i>Accept</i></font> validate language choice which are propagated to all -DrakX visible widget. Advanced mode allow to select other language available to -be installed. Advanced mode allow to select language which will be installed on -system. - If step is redone, the license is no more displayed. - - <font color="#000080"><i>Select Install Class</i></font>: step always displayed. default choice is previous one -or <font color="#000080"><i>Recommended</i></font>. Only one other option available is <font color="#000080"><i>Customized</i></font>. Two buttons -available are <font color="#000080"><i>Install</i></font> or <font color="#000080"><i>Upgrade</i></font>. Available steps (left side) are changed -according to installation class selected, where the default is the one of -<font color="#000080"><i>Recommended</i></font> with <font color="#000080"><i>Install</i></font>. - - <font color="#000080"><i>Hard Drive Detection</i></font>: step always displayed. In recommended mode, -automatically done. In Customized mode, all modules that manage SCSI/IDE cards -are loaded automatically and a question asking for other module to load is -displayed. - If clicked later or if to the question to load other module the -answer is <font color="#000080"><i>Yes</i></font>, a list of module is displayed (or if the question to other -module to load is. When a module is chosen, two options are available -<font color="#000080"><i>Autoprobe</i></font> and <font color="#000080"><i>Specify options</i></font>. Autoprobe try to load the module without any -other user options (default module parameter). Specify options allow user to -give module parameters individually in a list for all known parameters. At this -point <font color="#000080"><i>Ok</i></font> or <font color="#000080"><i>Cancel</i></font> are available, Cancel should stop the module installation -and go to next step. If any error occurs during module installation, a question -asking to try with other parameter is displayed, the same module is still used. - - <font color="#000080"><i>Setup filesystems</i></font>: step always displayed. display a list of available choice -accoding to what has been probed. May contains <font color="#000080"><i>Use free space</i></font>, "Use existing -partition<font color="#000080"><i>, </i></font>Use the window partition for loopback<font color="#000080"><i>, </i></font>Use the free space on the -Windows partition<font color="#000080"><i>, </i></font>Remove Windows(TM)<font color="#000080"><i>|</i></font>Erase entire disk" (according to disk -configuration => only one big fat for the first case only), "Custom disk -partitioning". - If <font color="#000080"><i>Use free space</i></font> mode, auto allocation in available on available disk. - If <font color="#000080"><i>Use existing partition</i></font> mode, a list of partition named in Linux -scheme are displayed with their approximate size in Mb and propose mount point -to choose in list boxes for each partitions available on hard drive. - If <font color="#000080"><i>Use the window partition for loopback</i></font> mode, DrakX use available size -on the windows partition to create a root file and a swap file which will be -used in loopback, this means this is a lnx4win installation. - If <font color="#000080"><i>Use the free space on the Windows partition</i></font> mode, DrakX will resize -the windows partition and allocate true linux filesystem (at least / and swap). - If <font color="#000080"><i>Remove Windows(TM)</i></font>|<font color="#000080"><i>Erase entire disk</i></font> mode, DrakX clean the -partition table before auto allocating partition. - If <font color="#000080"><i>Custom disk partitioning</i></font> mode, diskdrake is launch. TO BE DEFINED to -change make diskdrake use only advanced mode. -Diskdrake show all partition of all non-removable disk graphically. All special -partition are hidden, only user accessible partition are visible: this remove -extended partition, whole disk partition on sparc platform. Clicking on a disk -notebook tab show all his partitions. Clicking on a partition show all actions -available for this partition (depend if customized or advanced mode) as well as -information on this partition (depend if customized or advanced mode). Most -diskdrake operation are done without writing on disk (exception are Resizing -partitions) and everything is written once on the disk when exiting diskdrake, -at any time if writing partition table is necessary, there are always a dialog -box asking the user to confirm the write. If no operation are modifying -partition table, no dialog is displayed on exit (for example if giving mount -point to partition). General action are available too: - <font color="#000080"><i>Clear All</i></font>: clear all partition of the given disk. - <font color="#000080"><i>Auto allocate</i></font>: try to allocate partition in available disk (not the -seen disk). - <font color="#000080"><i>Undo</i></font>: undo last operation. - <font color="#000080"><i>Done</i></font>: quit and save changes. -Other operations are available in advanced mode: - <font color="#000080"><i>Rescue partition table</i></font>: try to rescue a lost partition table, -absolutely no garantee to succeed and may destroy what could be saveable by -another tools. - <font color="#000080"><i>Reload</i></font>: reload partition table from disk, erasing all changes in -memory done by the user. - <font color="#000080"><i>Wizard</i></font>: go to partition wizard, that the partition filesystems default -behaviour on startup. - <font color="#000080"><i>Restore from floppy</i></font>: restore a partition table from previously saved -partition table from diskdrake. - <font color="#000080"><i>Save to floppy</i></font>: save partition table to floppy. - <font color="#000080"><i>Options</i></font>: global options available for filesystem configuration. This -include <font color="#000080"><i>Removable media automouting supermount</i></font> check box disabled by default. - Operation available on partition are: - <font color="#000080"><i>Mount point</i></font>: change or define mount point for partition, only -available for true filesystem partition. - <font color="#000080"><i>Resize</i></font>: resize partition, if a specific algorithm to keep data is -used no data may be lost, else all data are lost but nothing is written by -diskdrake on the partition data in this last case (this means data can be -restored by restoring original size and location). - <font color="#000080"><i>Delete</i></font>: delete partition, if the same partition is created (same type, -location, size) all data can be restored as diskdrake doesn't write on partition -data. - Operation available on partition table but in advanced mode are: - <font color="#000080"><i>Type</i></font>: change type of partition, all data will be lost but diskdrake as -above does not destroy them, and everyting can be restored. - <font color="#000080"><i>Format</i></font>: format partition, at this point, all data ARE LOST. - <font color="#000080"><i>Mount</i></font>: mount partition now, usefull for swap to increase memory -capacity for machine low on resource that are not available to complete setup -filesystem step correctly (problably if a resize partition is used on FAT fs). -allow Mounting swap on customized mode too. - A legend for partition type colors is available -(Ext2,ReiserFS,Swap,FAT,Other,Empty). It has additionnal features to create a -partition or change its type (only available in advanced mode). - - <font color="#000080"><i>Format partitions</i></font>: step always displayed. display list of partition to -format with click boxes. Some are defined according to type of partitions and if -the partition has been created or taken back. -If a partition has already been formated, it is not proposed, or if it should -not be proposed (alrady existing partition like /mnt/windows). -On Advanced tag, an additional dialog is displayed to select partition to format -(all available partition listed) and to format them with bad block checking. - - <font color="#000080"><i>Choose packages</i></font>: step always displayed. default selection done to be -<font color="#000080"><i>correct</i></font> according to size available, Install or Upgrade, Hardware available. -This selection is done according to <font color="#000080"><i>Mandrake first choice</i></font> of packages. -On all mode, display groups and main desktop used (KDE or Gnome), an -individual package selection check box is available to allow selecting package -individually. In this case, a dialog displaying a tree with groups, (Mandrake -first choice/alternatives) and packages is shown on the left part, a description -window for each packages is shown on the right part. - - <font color="#000080"><i>Install system</i></font>: step always displayed. no interactive and display -installation progression. include if available and on a CD basis a spash screen -of advertising and other (pub!). - - <font color="#000080"><i>Hardware panel</i></font>: step always displayed. show current configuration for -Mouse, Keyboard, TimeZone, Graphic/TV Card, Monitor. -At each values chosen (list boxes displayed a -synthesis description) the current dialog is removed from screen and specific -configuration panels are displayed (like currently for mouse, keyboard ...). -And end of these specific configuration panels, this one is remapped on screen -to be accepted in general. - - <b>Sub steps of Hardware panel:</b> - - <font color="#000080"><i>Configure mouse</i></font>: displayed on request or if the mouse has not been -moved (so unsafe detection), but have to be displayed earlier. A mouse tree -selection for type is displayed with default case as what is probed or -<font color="#000080"><i>serial/Generic 2 button Mouse</i></font> if none has been probed. <font color="#000080"><i>Cancel</i></font> disable mouse -modification and <font color="#000080"><i>Ok</i></font> allow next mouse configuration dialog. Then comes a serial -port dialog for serial mice (default mouse connected to COM1 if nothing found). -Then a mouse screen control is chown (according to mouse capacity: 3 buttons -with or without mouse, need 7 buttons checking ?). Here <font color="#000080"><i>Ok</i></font> validate to go to -next step and <font color="#000080"><i>Cancel</i></font> to first mouse dialog displayed (mouse tree selection for -type). - - <font color="#000080"><i>Configure keyboard</i></font>: displayed on request. default is set according to -TimeZone definition (itself defaulting to language selection at the beginning). -A list of keyboard is shown to the user and <font color="#000080"><i>Ok</i></font> validates change and return to -<font color="#000080"><i>Hardware panel</i></font> dialog with enabled change. <font color="#000080"><i>Cancel</i></font> abort any modification and -return to the same <font color="#000080"><i>Hardware panel</i></font> dialog. - - <font color="#000080"><i>Configure timezone</i></font>: displayed on request. default is set according to -language selection. A timezone tree selection is shown with only the subtree -corresponding to the current selection expanded (as other tree dialog). <font color="#000080"><i>Ok</i></font> -validates change and return to <font color="#000080"><i>Hardware panel</i></font> dialog whereas <font color="#000080"><i>Cancel</i></font> avoid -the change before returning to the same main dialog. - - <font color="#000080"><i>Graphic Card</i></font>: display graphic card probed. No change available. - - <font color="#000080"><i>TV Card</i></font>: display TV/Tuner card probed. No change available. - - <font color="#000080"><i>Monitor</i></font>: need execution of ddcxinfos at this point. Only Size, Max -resolution and depth displayed. No change available. - - - Miscellaneous step have been removed and dispatched to other steps. "Use -hard drive optimisation<font color="#000080"><i> and </i></font>Enable num lock at startup<font color="#000080"><i> are removed. </i></font>Choose -security level<font color="#000080"><i> is moved to security step. </i></font>Precise RAM size if needed" and -<font color="#000080"><i>Clean /tmp at each boot</i></font> are moved to bootloader step. -<font color="#000080"><i>Removable media automouting</i></font> is moved to diskdrake options. - - <font color="#000080"><i>Security</i></font>: step displayed only in customized mode. TO BE DEFINED. should -display at least securty level to choose. level are <font color="#000080"><i>Low</i></font>, <font color="#000080"><i>Medium</i></font>, <font color="#000080"><i>High</i></font> and -for advanced there are <font color="#000080"><i>Welcome To Crackers</i></font>, <font color="#000080"><i>Poor</i></font>, <font color="#000080"><i>Paranoid</i></font> too. - - <font color="#000080"><i>Configure networking</i></font>: step always displayed. dialog always displayed in -both <font color="#000080"><i>Recommended</i></font> and <font color="#000080"><i>Customized</i></font> mode. A list of network configuration -entries are shown with the following: - <font color="#000080"><i>Configure a normal modem connection</i></font> - <font color="#000080"><i>Configure an ISDN connection</i></font> - "Configure a DSL (or ADSL) connection - <font color="#000080"><i>Configure a cable connection</i></font> - <font color="#000080"><i>Configure local network</i></font>|<font color="#000080"><i>Reconfigure local network</i></font> - <font color="#000080"><i>Disable networking</i></font>|<font color="#000080"><i>Enable networking</i></font> - <font color="#000080"><i>Done</i></font> - By cliking on a specific item, another dialog is displayed to configure -some specific part of the network. - <font color="#000080"><i>Configure a normal modem connection</i></font>: display a question to probe for a -modem if not already detected, then if none are found or probe has been refused -a list of possible serial device are listed (in the form ttySx / COM(x+1) with -the current mouse device removed if it is serial). After that a dialog including -all parameters than can be used is shown. This includes <font color="#000080"><i>Connection Name</i></font>, -<font color="#000080"><i>Phone number</i></font>, <font color="#000080"><i>Login ID</i></font>, <font color="#000080"><i>Password</i></font>, <font color="#000080"><i>Authentication</i></font>, <font color="#000080"><i>Domain name</i></font>, <font color="#000080"><i>DNS 1</i></font> -and <font color="#000080"><i>DNS 2</i></font>. Authentication is a combo of <font color="#000080"><i>PAP</i></font>, <font color="#000080"><i>Termina-Based</i></font> and -<font color="#000080"><i>Script-Based</i></font> (It seems necessary to get CHAP back on this one, no way of -testing TO BE DEFINED). If no DNS are given, the connection is configured to try -using provider DNS. <font color="#000080"><i>Ok</i></font> and <font color="#000080"><i>Cancel</i></font> button are available. - <font color="#000080"><i>Configure an ISDN connection</i></font>: -Try to detect some PCI card. If not detected, asks if it's a ISA/pcmcia or PCI -card, and gives the list of the cards. Information are then asked: -<font color="#000080"><i>Card IRQ</i></font> only if ISA/pcmcia -<font color="#000080"><i>Card mem (DMA)</i></font> only if ISA/pcmcia -<font color="#000080"><i>Card IO</i></font> only if ISA/pcmcia -<font color="#000080"><i>Card IO_0</i></font> only if ISA/pcmcia with io0 -<font color="#000080"><i>Card IO_1</i></font> only if ISA/pcmcia with io1 -<font color="#000080"><i>Your personal phone number</i></font> phone -<font color="#000080"><i>Provider name (ex provider.net)</i></font> -<font color="#000080"><i>Provider phone number</i></font> -<font color="#000080"><i>Provider dns 1</i></font> -<font color="#000080"><i>Provider dns 2</i></font> -<font color="#000080"><i>Dialing mode</i></font> auto or manual -<font color="#000080"><i>Account Login (user name)</i></font> -<font color="#000080"><i>Account Password</i></font> hided -<font color="#000080"><i>Confirm Password</i></font> again - <font color="#000080"><i>Configure a DLS (or ADSL) connection</i></font>: -The user chooses between pptp, pppoe and dhcp. If dhcp, redirection to LAN. -If there is more than one ethernet card, The user must choose the card to use -(displayed with the module). After that, some informations are asked: -<font color="#000080"><i>Provider name (ex provider.net)</i></font> -<font color="#000080"><i>Provider dns 1</i></font> -<font color="#000080"><i>Provider dns 2</i></font> -<font color="#000080"><i>Account Login (user name)</i></font> -<font color="#000080"><i>Account Password</i></font> hided -<font color="#000080"><i>Confirm Password</i></font> again - <font color="#000080"><i>Configure a cable connection</i></font>: redirection to LAN - <font color="#000080"><i>Configure local network</i></font>: display what has been probed with a question -about using another module and <font color="#000080"><i>Yes</i></font>, <font color="#000080"><i>No</i></font> and <font color="#000080"><i>See hardware info</i></font> buttons. -<font color="#000080"><i>No</i></font> is the default. If <font color="#000080"><i>Yes</i></font> is clicked a list of modules is displayed with -<font color="#000080"><i>Ok</i></font> or <font color="#000080"><i>Cancel</i></font> buttons available. <font color="#000080"><i>Cancel</i></font> should go back to previous -question. If <font color="#000080"><i>See hardware info</i></font> is clicked a list of probed hardware is -displayed. If <font color="#000080"><i>Yes</i></font> is clicked, for each ethernet interface, a dialog asking for -IP address, Netmask and Automatic IP check box (DHCP/BOOTP) is displayed. Then -if DHCP has been chosen, only a dialog asking for Host name and another for HTTP -proxy and FTP proxy if any. If DHCP has not been chosen, an IP address has to be -defined and a dialog including <font color="#000080"><i>Host name</i></font>, <font color="#000080"><i>DNS server</i></font>, <font color="#000080"><i>Gateway</i></font> and "Gateway -device" is displayed. Then the same HTTP proxy and FTP proxy dialog as above. As -network configuration may to have been reworked a bit it has TO BE DEFINED if -this is kept like that or not. - <font color="#000080"><i>Disable networking</i></font>|<font color="#000080"><i>Enable networking</i></font> is just a way to toggle -networking on or off, may be to be accessible only for advanced mode. - <font color="#000080"><i>Quit</i></font> exit the network step. - -<b>NETWORK ADVANCED DOCUMENTATION:</b> -Here is a list of entry points available in post install without using the ugly -install graphic toolkit: - -<a href=<font color="#000080"><i>http://www.mandrakesoft.com/~damien/html/draknet_advanced_doc.txt</i></font>>http://www.mandrakesoft.com/~damien/html/draknet_advanced_doc.txt</a> - - <font color="#000080"><i>Configure Printer</i></font>: step always displayed. In recommended mode, only -activated if a local printer is detected, else no printer are configured by -default. In customized mode or if the step has been clicked a list of printer -already configured is displayed and the possibility to add or exit the -configuration. It allow configuration of printers for both LPR and CUPS -individually (available by advanced mode when adding a printer). Printer -protocol managed are local/usb/samba/ncp/lpd for LPR and -local/usb/serial/samba/lpd/cups_network for CUPS. - - <font color="#000080"><i>Set root password</i></font>: step always displayed for Install only. In -recommended mode display only a <font color="#000080"><i>Password</i></font> entry and a <font color="#000080"><i>Password (again)</i></font> entry -to select the root password. In advanced mode, a Use NIS (yellow pages) check -boxes and Use MD5 check box are available. <font color="#000080"><i>Ok</i></font> validate root password and "No -password<font color="#000080"><i> avoid setting a password. </i></font>No password<font color="#000080"><i> is only available in </i></font>Low" -security level or less. The length of the minimal password depend upon security level. - -In corporate firewall : - <font color="#000080"><i>Set admin password</i></font>: step always displayed for Install only. It only - displays a <font color="#000080"><i>Password</i></font> entry and a <font color="#000080"><i>Password (again)</i></font> entry -to select the admin password. -The length of the minimal password depend upon security level. (double of the - security level) - - <font color="#000080"><i>Add a user</i></font>: step always displayed for Install Only. In recommend mode -display <font color="#000080"><i>Real name</i></font>, <font color="#000080"><i>User name</i></font>, <font color="#000080"><i>Password</i></font>, <font color="#000080"><i>Password (again)</i></font> and icon -choices as graphical. For customized mode a shell combo is available to choose a -specific shell for the user depending on the package installed. The real name is -the user friendly name of the user whereas user name is its login id name. The -box display user that have already been added below the title. <font color="#000080"><i>Accept user</i></font> -button allow the creation of the user and <font color="#000080"><i>Done</i></font> finish this step. High or -higher security level implies the creation of at least one user. Password length -are subject to same restriction according to security level. In advanced mode, -allow to choose the user in auto login mode. - - <font color="#000080"><i>Create a boot disk</i></font>: step always displayed. In recommended mode this -step is automatically done by doing nothing. If clicked or customized mode, the -user is prompted to allow building a boot disk (default is yes). In advanced -mode allow selection of floppy drive. - - <font color="#000080"><i>Install boot loader</i></font>: step always displayed. In recommended mode this -step is automatically done. In customized mode, a combo <font color="#000080"><i>Boot device</i></font> list the -various boot device that can be used where the bootloader can be installed. The -boot device can the Linux description of the whole disk available (ex: /dev/hda) -or partition available in these disk or floppy drives. Other platform -specificity are not listed here. - LBA check box is displayed in advanced mode (enabled by default) to -allow using LBA addressing if available (PC with LILO). bootloader combo to -select a given bootloader to use, available choice are <font color="#000080"><i>Grub</i></font>, "LILO with text -menu<font color="#000080"><i>, </i></font>LILO with graphical menu<font color="#000080"><i>. default chosen is </i></font>LILO -with graphical menu<font color="#000080"><i>. </i></font>Delay before booting default image" entry -field is available with default value current setting (upgrade) or 5 else. -<font color="#000080"><i>Precise RAM size if needed (found xx MB)</i></font> entry is displayed too, -<font color="#000080"><i>clean /tmp</i></font> check box is disabled by default too. -Boot in graphical mode (init 5) is available here in advanced mode too -(previously in X configuration). <font color="#000080"><i>Video mode</i></font> combo, <font color="#000080"><i>Password</i></font>, <font color="#000080"><i>Password (again)</i></font>, -<font color="#000080"><i>Restrict command line options</i></font> check box is displayed. -Video mode combo list text mode and video mode used for frame buffer, video mode -used for frame buffer are available only if the install managed to boot with -frame buffer activated. Password are restricted according to security level as -other password. Password are mandatory according to security level TO BE DEFINED. - - <font color="#000080"><i>Configure X</i></font>: step always displayed. By default on recommended mode, -everything is done automatically if possible up to test of graphic card, and if -the user accept the settings no more question are asked to him. In customized -mode a dialog is displayed to choose resolution, color depth and which version -of XFree (with 3D optionally) is available for the current card where only a -short description is displayed. <font color="#000080"><i>Ok</i></font> button allow to jump to test phase (for the -first time only) if available. <font color="#000080"><i>Cancel</i></font> return to main XFree configuration -window allowing to change Monitor, Graphic card, Server options or Resolution -with X version to choose. <font color="#000080"><i>Show all</i></font> extend resolution list to more resolutions -according to card (with onboard memory) only and no more monitor capabilities. - The main dialog is a list of command to change some X configuration aspect -according to advanced mode or not : - <font color="#000080"><i>Change Monitor</i></font>: display a tree selection of monitors where default one -is selected. <font color="#000080"><i>Ok</i></font> and <font color="#000080"><i>Cancel</i></font> buttons are available. - <font color="#000080"><i>Change Graphic card</i></font>: display a tree selection of graphic card where -default one is selected. <font color="#000080"><i>Ok</i></font> and <font color="#000080"><i>Cancel</i></font> buttons are available. If <font color="#000080"><i>Unlisted</i></font> -is chosen, then a tree of server/driver is displayed containing available server -for XF3 or driver for XF4. <font color="#000080"><i>Cancel</i></font> return to main window and <font color="#000080"><i>Ok</i></font> validates -change. - <font color="#000080"><i>Change Server options</i></font>: available only in advanced mode. display list -of check boxes options for server currently used. <font color="#000080"><i>Ok</i></font> and <font color="#000080"><i>Cancel</i></font> available. - <font color="#000080"><i>Change Resolution</i></font>: change resolution and depth including with X server -version chosen (relative to Xdrakres too). - <font color="#000080"><i>Show Information</i></font>: display an information dialog showing current -configuration internals of X. - <font color="#000080"><i>Test again</i></font>: restart test with current configuration of X. - <font color="#000080"><i>Quit</i></font>: exit X configuration main window. Other question about autologin -and window manager to use are asked on Add user step. - - <font color="#000080"><i>Exit install</i></font>: step displayed only in customized mode but always -executed. Only a text is displayed with a <font color="#000080"><i>Ok</i></font> button. If clicked and some step -have not been executed/completed correctly, a question dialog ask the user if he -really want to quit now, default answer is <font color="#000080"><i>No</i></font>. Advanced switch let user access -to do the previously <font color="#000080"><i>Auto install floppy</i></font> step in DrakX < 8.0. This is just a -question asking the user to generate an auto install floppy automatically. -</pre> -</body> -</html> diff --git a/docs/wizard.doc b/docs/wizard.doc deleted file mode 100644 index 0bbf8d254..000000000 --- a/docs/wizard.doc +++ /dev/null @@ -1,31 +0,0 @@ -How to handle wizard? - -to switch in wizard mode: -set $::isWizard to true; -if $::Wizard_no_previous is set to true, the wizard won't display the previous button. Usefull for first step -if $::Wizard_finished is set to true, the wizard will display Finish instead of Next. Usefull for last step - -how to code: -Code as if there were no wizard. -OK button is displayed as Next -Cancel is displayed as Previous -a additional button Cancel is added, xhich die with the exception 'wizard_cancelled' - -You have to handle the previous button. For example: - -step 1: -ask_from list( blablablabl) or return; -step2: -ask_from list( blablablabl) or goto step1; -step3: -ask_from list( blablablabl) or goto step2; - -etc... You don't have to handle the wizard Cancel button as it send an exception. - -Understood? If yes, you'll see that there is a pb with ask_yesorno. In this case, yes+next returns true, no+next returns false, Cancel send the exception 'wizard_canceled' and previous send the exception 'wizard previous'. So you have to handle the previous button manually. - -plop. - -dam's, pour vous servir - - diff --git a/isolinux-graphic.bmp b/isolinux-graphic.bmp Binary files differdeleted file mode 100644 index 819656c3d..000000000 --- a/isolinux-graphic.bmp +++ /dev/null diff --git a/kernel/.cvsignore b/kernel/.cvsignore deleted file mode 100644 index 827e0ba13..000000000 --- a/kernel/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -modules.description -all.modules -all.kernels diff --git a/kernel/Makefile b/kernel/Makefile deleted file mode 100644 index 90fad04b6..000000000 --- a/kernel/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: all.modules - -all.modules: ../mdk-stage1/mar/mar update_kernel list_modules.pm - `../tools/specific_arch ./update_kernel` - -../mdk-stage1/mar/mar: - make -C `dirname $@` - -clean: - rm -rf *~ modules.description all.modules all.modules64 - -check: - perl modules.pl check > /dev/null diff --git a/kernel/check_mar.pl b/kernel/check_mar.pl deleted file mode 100755 index c288d83bd..000000000 --- a/kernel/check_mar.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/perl - -use MDK::Common; - -my $mar = '../mdk-stage1/mar/mar'; --x $mar or die "ERROR: Sorry, need $mar binary\n"; - -my %sanity_check = ( - hd => [ - if_(arch() !~ /x86_64/, 'aic7xxx'), - qw(sym53c8xx initio), - if_(arch() !~ /ppc/, 'advansys'), - ], - network => [ - qw(3c59x eepro100 tulip via-rhine ne2k-pci 8139too), - if_(arch() !~ /ppc|x86_64/, 'e100'), - if_(arch() !~ /ppc|ia64/, 'tlan'), - ], -); - -my $main_version = chomp_(cat_("all.kernels/.main")); - -foreach (keys %sanity_check) { - my $marfile = "all.modules/$main_version/${_}_modules.mar"; - -e $marfile or die "ERROR: missing $marfile\n"; - - my @l = map { /(\S+)\.o/ } `$mar -l $marfile`; - my @pbs = difference2($sanity_check{$_}, \@l); - - @pbs and die "ERROR: sanity check should prove that " . join(" ", @pbs) . " be part of $marfile\n"; -} diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm deleted file mode 100644 index c1569c6a8..000000000 --- a/kernel/list_modules.pm +++ /dev/null @@ -1,208 +0,0 @@ -package list_modules; - -use MDK::Common; - -our @ISA = qw(Exporter); -our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories); - -# the categories have 2 purposes -# - choosing modules to include on stage1's (cf update_kernel and mdk-stage1/pci-resource/update-pci-ids.pl) -# - performing a load_category or probe_category (modules.pm and many files in perl-install) - -our %l = ( - ################################################################################ - network => - { - main => [ - if_(arch() =~ /ppc/, qw(mace bmac gmac airport)), - if_(arch() =~ /^sparc/, qw(sunbmac sunhme sunqe)), - if_(arch() !~ /alpha/ && arch() !~ /sparc/, - qw(3c501 3c503 3c505 3c507 3c509 3c515 3c90x), - qw(82596 abyss ac3200 acenic aironet4500_card at1700 atp com20020-pci), - qw(cs89x0 de600 de620), - qw(defxx orinoco_plx), # most unused - qw(depca dgrs dmfe e100 e2100 eepro eepro100 eexpress epic100 eth16i), - qw(ewrk3 hamachi hp hp-plus hp100 ibmtr), - qw(lance natsemi ne ne2k-pci ni5010 ni52 ni65 nvnet olympic pcnet32 plip rcpci), - qw(sb1000 sis900 smc-ultra smc9194 starfire tlan tmspci tulip via-rhine), - qw(wd winbond-840), - qw(fealnx 3c990 3c990fx bcm4400), - qw(skfp tc35815 lanstreamer farsync sdladrv orinoco_pci prism2_plx), - - qw(iph5526), #- fibre channel - ), - qw(3c59x 8139too 8139cp sundance), #rtl8139 - ], - gigabit => [ - qw(dl2k myri_sbus yellowfin ns83820 r8169 tg3 e1000 sk98lin), - qw(bcm5820 bcm5700), #- encrypted - ], - - raw => [ - qw(ppp_generic ppp_async), - ], - pcmcia => [ - qw(3c574_cs 3c589_cs airo airo_cs aironet4500_cs axnet_cs fmvj18x_cs), - qw(ibmtr_cs orinoco_cs netwave_cs nmclan_cs pcnet_cs ray_cs smc91c92_cs wavelan_cs wvlan_cs), - qw(xirc2ps_cs xircom_cb xircom_tulip_cb), - ], - usb => [ - qw(pegasus kaweth usbnet catc CDCEther usbvnet_rfmd), - ], - isdn => [ - qw(b1pci c4 hisax hisax_fcpcipnp hysdn t1pci tpam), - ], - }, - - ################################################################################ - disk => - { - scsi => [ - if_(arch() =~ /ppc/, qw(mesh mac53c94)), - if_(arch() =~ /^sparc/, qw(qlogicpti)), - if_(arch() !~ /alpha/ && arch() !~ /sparc/, - qw(3w-xxxx AM53C974 BusLogic NCR53c406a a100u2w advansys aha152x aha1542 aha1740), - qw(atp870u dc395x_trm dtc g_NCR5380 in2000 initio pas16 pci2220i psi240i fdomain), - qw(qla1280 qla2x00 qlogicfas qlogicfc), - qw(seagate wd7000 sim710 sym53c416 t128 tmscsim u14-34f ultrastor), - qw(eata eata_pio eata_dma mptscsih nsp32), - ), - '53c7,8xx', - qw(aic7xxx aic7xxx_old pci2000 qlogicisp sym53c8xx), # ncr53c8xx - ], - hardware_raid => [ - if_(arch() =~ /^sparc/, qw(pluto)), - if_(arch() !~ /alpha/ && arch() !~ /sparc/, - qw(DAC960 dpt_i2o megaraid aacraid cciss cpqarray gdth i2o_block), - qw(cpqfc qla2200 qla2300 ataraid hptraid silraid pdcraid), - qw(ips ppa imm), - ), - ], - pcmcia => [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs) ], #ide_cs - raw => [ qw(scsi_mod sd_mod) ], - usb => [ qw(usb-storage) ], - firewire => [ qw(sbp2) ], - cdrom => [ qw(ide-cd cdrom sr_mod) ], - }, - - ################################################################################ - - bus => - { - usb => [ qw(usbcore usb-uhci usb-ohci ehci-hcd usbkbd keybdev input) ], - firewire => [ qw(ohci1394 ieee1394) ], - pcmcia => [ - if_(arch() !~ /^sparc/, qw(pcmcia_core tcic ds i82365 yenta_socket)), # cb_enabler - ], - #serial_cs - #ftl_cs 3c575_cb apa1480_cb epic_cb serial_cb tulip_cb iflash2+_mtd iflash2_mtd - #cb_enabler - }, - - fs => - { - network => [ qw(af_packet nfs lockd sunrpc) ], - cdrom => [ qw(isofs) ], - loopback => [ qw(isofs loop) ], - local => [ - if_(arch() =~ /^i.86/, qw(vfat fat)), - if_(arch() =~ /^ppc/, qw(hfs)), - qw(reiserfs), - ], - various => [ qw(smbfs romfs jbd xfs) ], - - }, - - ################################################################################ - multimedia => - { - sound => [ - if_(arch() =~ /ppc/, qw(dmasound_pmac)), - if_(arch() !~ /^sparc/, - qw(ad1816 ad1848 ad1889 ali5455 awe_wave audigy cmpci cs46xx cs4232 cs4281 emu10k1 es1370 es1371 esssolo1 forte), - qw(gus i810_audio ice1712 mad16 maestro maestro3 mpu401 msnd_pinnacle nvaudio opl3 opl3sa opl3sa2 nm256_audio), - qw(pas2 pss rme96xx sb sgalaxy sam9407 sonicvibes sscape trident via82cxxx_audio wavefront ymfpci), - qw(snd-ali5451 snd-als100 snd-als4000 snd-azt2320 snd-azt3328 snd-cmi8330 snd-cmipci), - qw(snd-cs4231 snd-cs4232 snd-cs4236 snd-cs46xx snd-dt0197h snd-cs4281 snd-emu10k1), - qw(snd-ad1816a snd-ad1848 snd-gusclassic snd-gusextreme snd-gusmax snd-interwave), - qw(snd-mpu401 snd-opti93x snd-rme9652 snd-sb8 snd-sbawe), - qw(snd-ens1370 snd-ens1371 snd-es18xx snd-es968 snd-es1938 snd-es1968 snd-es1688), - qw(snd-fm801 snd-hdsp snd-ice1712 snd-intel8x0 snd-korg1212 snd-maestro3), - qw(snd-nm256 snd-rme96 snd-rme32 snd-opl3sa2 snd-sb16 snd-sgalaxy snd-sonicvibes), - qw(snd-trident snd-usb-audio snd-via82xx snd-wavefront snd-ymfpci), - ), - ], - tv => [ qw(bttv cpia_usb ibmcam mod_quickcam ov511 ov518_decomp ultracam usbvideo cyber2000fb saa7134) ], - photo => [ qw(dc2xx mdc800) ], - radio => [ qw(radio-maxiradio) ], - scanner => [ qw(scanner microtek) ], - joystick => [ qw(ns558 emu10k1-gp iforce) ], - }, - - various => - # just here for classification, unused categories (nor auto-detect, nor load_thiskind) - { - raid => [ - qw(linear raid0 raid1 raid5 lvm-mod md multipath xor), - ], - mouse => [ - qw(busmouse msbusmouse logibusmouse serial qpmouse atixlmouse), - ], - char => [ - qw(amd768_rng applicom n_r3964 nvram pc110pad ppdev), - qw(mxser moxa isicom wdt_pci epca synclink istallion sonypi i810-tco sx), #- what are these??? - ], - other => [ - qw(agpgart defxx i810_rng i810fb ide-floppy ide-scsi ide-tape loop lp nbd sg st), - qw(parport parport_pc parport_serial), - qw(btaudio), - - #- these need checking - qw(pcilynx sktr rrunner meye 3c559 buz paep), - ], - }, -); - -my %dependencies; - -sub load_dependencies { - my ($file) = @_; - - %dependencies = map { - my ($f, $deps) = split ':'; - $f => [ split ' ', $deps ]; - } cat_($file); -} - -sub dependencies_closure { - my @l = map { dependencies_closure($_) } @{$dependencies{$_[0]} || []}; - (@l, $_[0]); -} - -sub category2modules { - map { - my ($t1, $t2s) = m|(.*)/(.*)|; - map { - my $l = $l{$t1}{$_} or die "bad category $t1/$_\n" . backtrace(); - @$l; - } split('\|', $t2s); - } split(' ', $_[0]); -} - -sub module2category { - my ($module) = @_; - foreach my $t1 (keys %l) { - my $h = $l{$t1}; - foreach my $t2 (keys %$h) { - $module eq $_ and return "$t1/$t2" foreach @{$h->{$t2}}; - } - } - return; -} - -sub sub_categories { - my ($t1) = @_; - keys %{$l{$t1}}; -} - -1; diff --git a/kernel/modules.pl b/kernel/modules.pl deleted file mode 100644 index 71de970ad..000000000 --- a/kernel/modules.pl +++ /dev/null @@ -1,196 +0,0 @@ -use strict; - - -BEGIN { - #- for testing purpose - (my $f = __FILE__) =~ s|/[^/]*$||; - push @INC, $f; -} - -use MDK::Common; -use list_modules; - -#- seldom used modules -#- we don't bother making a special floppy for those -my %modules_only_for_all_img = ( - - 'network/main' => [ - qw(olympic acenic), - qw(aironet4500_card com20020-pci hamachi starfire winbond-840), - qw(fealnx 3c990 3c990fx prism2_plx dgrs), - - # token ring - qw(tmspci ibmtr abyss), - - qw(3c501 3c503 3c505 3c507 3c515), # unused, hopefully? - qw(eepro 82596 de620 depca ewrk3 cs89x0), - - if_(arch() =~ /alpha|ppc/, qw(sb1000)), - qw(iph5526), - - qw(ac3200 at1700 atp ni5010 ni52 ni65), #- unused from Jeff - ], - - 'disk/scsi' => [ - # ISA cards: - qw(NCR53c406a aha152x psi240i qlogicfas qlogicfc wd7000 sim710 t128 ultrastor), '53c7,8xx', - qw(qla2x00 in2000 pas16 a100u2w seagate g_NCR5380), - qw(AM53C974), # deprecated by tmscsim - qw(u14-34f), #- duplicate from ultrastor.o - #- still used, keeping them: qw(aha1542 sym53c416), - - qw(dc395x_trm mptscsih BusLogic fdomain), - qw(pci2220i eata eata_pio eata_dma), - ], - - 'disk/hardware_raid' => [ - qw(i2o_block qla2200 qla2300 cpqfc DAC960), - ], -); - -#- modules that will only be available in stage2 -#- those modules are NOT in all.img, network.img... -#- there should only be modules that can't be used on stage1 -#- completly unused modules should be removed directly from the kernel -#- (and so be removed from stage2 too) -my %modules_removed_from_stage1 = ( - 'network/main' => [ - 'plip' - ], - - 'disk/hardware_raid' => [ - qw(imm ppa), - qw(ataraid hptraid silraid pdcraid), # ad-hoc raid which is unsupported in stage1 anyway - ], -); - -my @modules_always_on_stage1 = qw(floppy); - - -sub flatten_and_check { - my ($h) = @_; - map { - my $category = $_; - my @l = @{$h->{$category}}; - if (my @bad = difference2(\@l, [ category2modules($category) ])) { - foreach (@bad) { - if (my $cat = module2category($_)) { - warn "ERROR in modules.pl: module $_ is in category $cat, not in $category\n"; - } else { - warn "ERROR in modules.pl: unknown module $_\n"; - } - } - exit 1; - } - @l; - } keys %$h; -} - -my @modules_only_for_all_img = flatten_and_check(\%modules_only_for_all_img); -my @modules_removed_from_stage1 = flatten_and_check(\%modules_removed_from_stage1); - - -my %images = ( - network_gigabit_usb - => 'fs/network network/raw bus/usb network/gigabit|usb', - network => 'fs/network network/raw bus/pcmcia network/main', - hd => 'disk/raw fs/local|loopback disk/scsi|hardware_raid', - hdcdrom_usb - => 'disk/cdrom|raw fs/local|loopback|cdrom bus/usb disk/usb bus/firewire disk/firewire', - pcmcia => 'fs/cdrom disk/cdrom|raw|pcmcia bus/pcmcia fs/network network/pcmcia|raw', - cdrom => 'fs/cdrom disk/cdrom|raw|scsi', - all => 'fs/cdrom disk/cdrom|raw bus/usb disk/usb|scsi fs/loopback|local bus/pcmcia disk/pcmcia|hardware_raid fs/network network/main|pcmcia|usb|raw bus/firewire disk/firewire', -); - -load_dependencies(glob("all.modules/2.4*/modules.dep")); - -my $verbose = "@ARGV" =~ /-v/; -images() if "@ARGV" =~ /images/; -check() if "@ARGV" =~ /check/; -pci_modules4stage1($1) if "@ARGV" =~ /pci_modules4stage1:(.*)/; - -sub images { - while (my ($image, $l) = each %images) { - my @modules = @modules_always_on_stage1; - foreach (split(' ', $l)) { - push @modules, category2modules($_); - } - - @modules = difference2(\@modules, \@modules_removed_from_stage1); - - if ($image !~ /all/) { - @modules = difference2(\@modules, \@modules_only_for_all_img); - } - @modules = uniq(map { dependencies_closure($_) } @modules); - printf qq(%s_modules="%s"\n), $image, join(" ", map { "$_.o" } @modules); - } -} - -sub pci_modules4stage1 { - print "$_\n" foreach uniq(map { dependencies_closure($_) } difference2([ category2modules($_[0]) ], \@modules_removed_from_stage1)); -} - -sub check { - my $error; - my %listed; - while (my ($t1, $l) = each %list_modules::l) { - while (my ($t2, $l) = each %$l) { - ref $l or die "bad $l in $t1/$t2"; - foreach (@$l) { - $listed{$_} = 1; - } - } - } - - my %module2category; - my %deprecated_modules = %listed; - my $not_listed = sub { - my ($msg, $verbose, @l) = @_; - my %not_listed; - foreach (@l) { - my ($mod) = m|([^/]*)\.o(\.gz)?$| or next; - delete $deprecated_modules{$mod}; - next if $listed{$mod}; - s|.*?mdk(BOOT)?/||; - s|kernel/||; s|drivers/||; s|3rdparty/||; - $_ = dirname $_; - $_ = dirname $_ if $mod eq basename($_); - $module2category{$mod} = $_; - push @{$not_listed{$_}}, $mod; - } - if ($verbose) { - print "$msg $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; - } - }; - $not_listed->('NOT LISTED', 1, `cd all.kernels/2.4* ; find -name "*.o" -o -name "*.o.gz"`); - $not_listed->('not listed', $verbose, `rpm -qpl /RPMS/kernel-2.4*`); - print "bad/old modules : ", join(" ", sort keys %deprecated_modules), "\n" if %deprecated_modules; - - { - require '/usr/bin/merge2pcitable.pl'; - my $pcitable = read_pcitable("/usr/share/ldetect-lst/pcitable"); - my $usbtable = read_pcitable("/usr/share/ldetect-lst/usbtable"); - - my @l1 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$pcitable; - if (my @l = difference2(\@l1, [ keys %listed ])) { - my %not_listed; - push @{$not_listed{$module2category{$_}}}, $_ foreach @l; - if (my $l = delete $not_listed{''}) { - print "bad/old pcitable modules : ", join(" ", @$l), "\n"; - } - print STDERR "PCITABLE MODULES NOT LISTED $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; - #$error = 1; - } - - my @l2 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$usbtable; - if (my @l = difference2(\@l2, [ keys %listed ])) { - my %not_listed; - push @{$not_listed{$module2category{$_}}}, $_ foreach @l; - if ($verbose) { - print "usbtable modules not listed $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; - } - } - } - - exit $error; -} diff --git a/kernel/update_kernel b/kernel/update_kernel deleted file mode 100755 index 1fbb97297..000000000 --- a/kernel/update_kernel +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash - -ALL_KERNELS="all.kernels" - -# move stuff to this new "kernel" directory -if [ ! -d all.kernels ]; then - mv ../all.kernels . - rm -rf ../all.modules -fi - -function create_marfile() { - marfile=$1 - shift - $GIBASEDIR/mdk-stage1/mar/mar -c $marfile $* -} - -function create_modules() { - kernel_path=$1 - kern=$2 - echo "Updating modules in '`pwd`' for kernel '$kern'" - cp -f `find $kernel_path/lib/modules/ -name "*.o"` . - /sbin/depmod -F $kernel_path/boot/System.map* -e *.o | perl -pe 's/\\\n//' \ - | perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep - perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep - - /sbin/modinfo -f '%{filename} %{description}\n' *.o | perl -lne 'print "$1\t$2" if /(.*?)\.o "(.*)"/' > modules.description -} - -function create_modules_mar() { - echo -n "packdrake $kern: " - ls *.o | packdrake -b9s "modules.cz" 400000 - echo "done" - mv modules.cz ../modules.cz-$kern - for i in network network_gigabit_usb cdrom hd hdcdrom_usb pcmcia all; do - modules_var="${i}_modules" - eval "create_marfile ${i}_modules.mar \$$modules_var" - done - echo -} - -[ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main) - -rpm=$(rpm -qpl /export/Mandrake/RPMS/kernel-BOOT-*.rpm | perl -lne 'm|/boot/vmlinuz-(.*)| and print $1') -if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then - [ -n "$main" ] && rm -rf $ALL_KERNELS/$main - cd $ALL_KERNELS - rm -rf $rpm ; mkdir $rpm - cd $rpm - rpm2cpio /export/Mandrake/RPMS/kernel-BOOT-*.rpm | cpio -id - find -type f -name "*.o.gz" | xargs gunzip - cd ../.. - - for dir in /tftpboot /var/lib/tftpboot; do - rm -f $dir/{vmlinuz,network.rdz} - done -fi - -[ -n "$main" -a -e $ALL_KERNELS/$main ] || { - cd $ALL_KERNELS - main=$(echo 2.* | sed 's/.* //') - echo "Choosing $main" - echo $main > .main - cd .. -} - -ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'` - -if [ "$ARCH" == "i386" ]; then - for i in $ALL_KERNELS/*/boot/vmlinuz*; do - #disable any existing resolution!!! - /usr/sbin/rdev -v $i 65535 #788 #785 - done -else - if [ "$ARCH" == "ppc" ]; then - cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux . - else - cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz . - fi -fi - - -GIBASEDIR=`pwd`/.. - -rm -rf all.modules ; mkdir all.modules -for i in $ALL_KERNELS/*; do - kern=`basename $i` - ( - mkdir all.modules/$kern - cd all.modules/$kern - - create_modules ../../$i $kern - ) || exit 1 -done -cp -f all.modules/$main/modules.description . - -l=`perl modules.pl images` || exit 1 -eval $l - -for i in $ALL_KERNELS/*; do - kern=`basename $i` - ( - cd all.modules/$kern - - if [ "$kern" = "$main" ]; then - create_modules_mar ../../$i $kern - else - echo "$kern ($main)" - create_modules_mar ../../$i $kern 2>/dev/null - fi - ) || exit 1 -done - - -./check_mar.pl diff --git a/live_update b/live_update deleted file mode 100644 index 0778b4ae8..000000000 --- a/live_update +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -message=/usr/X11R6/bin/gmessage -[ -x $message ] || message=/usr/X11R6/bin/xmessage -[ -x $message ] || unset message - -if [ "$UID" -ne 0 ]; then - if [ -x "$message" ]; then - case "$LANG" in - fr*) buttons="Arrêter:0" - msg="Mise à jour en direct de Mandrake Linux. - -Vous devez être l'utilisateur root pour lancer cette application." ;; - *) buttons="Abort:0" - msg="Mandrake Linux live upgrade. - -You need to be root to start this program." ;; - esac - $message -buttons "$buttons" -print "$msg" - else - echo >&2 "You need to be root to start this program." - fi - exit 3 -fi - -distrib=`pwd`; -if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then - distrib="/mnt/cdrom" -fi -if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then - if [ -x "$message" ]; then - case "$LANG" in - fr*) buttons="Arrêter:0" - msg="Mise à jour en direct de Mandrake Linux. - -Impossible de trouver le Cédérom d'installation de Mandrake Linux dans le premier lecteur." ;; - *) buttons="Abort:0" - msg="Mandrake Linux live upgrade. - -Unable to find Mandrake Linux Installation Cd-Rom in the first drive." ;; - esac - $message -buttons "$buttons" -print "$msg" - else - echo >&2 "Unable to find Mandrake Linux Installation Cd-Rom in the first drive." - fi - exit 2 -fi - -if [ -x "$message" ]; then - case "$LANG" in - fr*) buttons="Mise à jour:0,Annuler:1" - msg="Mise à jour en direct de Mandrake Linux. - -Appuyez sur \"Mise à jour\" pour lancer la mise à jour de votre système, -cela prendra quelques minutes avant que l'écran de DrakX apparaisse. - -Appuyez sur \"Annuler\" pour ne pas mettre à jour votre système de cette manière." ;; - *) buttons="Upgrade:0,Cancel:1" - msg="Mandrake Linux live upgrade. - -Press \"Upgrade\" to start live upgrade on your system, note this will -take some time to prepare the system before DrakX screen appears. - -Press \"Cancel\" to avoid upgrading your system this way." ;; - esac - default=`echo $buttons | cut -d: -f1` - $message -buttons "$buttons" -default "$default" -print "$msg" - [ $? -ne 0 ] && exit 1 -else - echo >&2 "Press ENTER to start live upgrade on your system, note this will -take some time to prepare the system before DrakX screen appears. - -Press CTRL-C to avoid upgrading your system this way." -fi - -cd "$distrib/Mandrake/mdkinst/usr/bin/perl-install" && exec ./live_install -exit 2 diff --git a/make_boot_img b/make_boot_img deleted file mode 100755 index 6d7ac0af0..000000000 --- a/make_boot_img +++ /dev/null @@ -1,697 +0,0 @@ -#!/usr/bin/perl - -@ARGV >= 2 or die "usage: $0 <image> all|cdrom|hd|hdcdrom_usb|network|network_gigabit_usb|blank|pcmcia|live|tftp|tftprd\n"; - -use Config; -use MDK::Common; -Config->import; -my ($arch) = $Config{archname} =~ /(.*?)-/; - -($img, $type) = @ARGV; - -# move stuff to new "kernel" directory --d 'kernel' or die "directory kernel is missing\n"; -rename 'all.kernels', 'kernel/all.kernels'; -rename 'all.modules', 'kernel/all.modules'; - -$default_append = "ramdisk_size=128000 root=/dev/ram3"; -$default_acpi = "acpi=off"; -$default_vga = "vga=788"; - -$instdir = "mdk-stage1"; -$mnt = "/tmp/drakx_mnt"; -$mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1"; - -if ($>) { - $sudo = "sudo"; - $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; -} - -sub __ { print @_, "\n"; system(@_); } -sub _ { __ @_; $? and die; } - -_ "$sudo mkdir $mnt" unless -e $mnt; -_ "$sudo mkdir ${mnt}2" unless -e "${mnt}2"; - -$install = $ {{ - all => "stage1-full", - blank => "stage1-full", - live => "stage1-full", - tftp => "stage1-full", - tftprd => "stage1-full", - pcmcia => "stage1-full", - network => "stage1-network", - network_gigabit_usb => "stage1-network-usb", - cdrom => "stage1-cdrom", - hd => "stage1-disk", - hdcdrom_usb => "stage1-medias-usb", - live64 => "stage1-full", - tftp64 => "stage1-full", - tftprd64 => "stage1-full", - pcmcia64 => "stage1-full", - network64 => "stage1-network", - cdrom64 => "stage1-cdrom", - hd64 => "stage1-disk", -}}{$type} or die; - -mkdir "images"; -chomp($main = `cat kernel/all.kernels/.main`); - -if ($img =~ /blank|pcmcia/) { - @kernels = $main; -} else { - @kernels = map { m|kernel/all.kernels/(.*)| } glob('kernel/all.kernels/*'); - $img =~ /usb/ and @kernels = grep { $_ !~ /2\.2\.14/ } @kernels; #- 2.2.14 is too old, usb support was not working properly -} - -foreach (@kernels) { - if ($img =~ /rdz$/) { - initrd($mnt, "$img-$_"); - } else { - print STDERR "calling boot_img_$arch\n"; - $::{"boot_img_$arch"}->($mnt, "$img-$_", glob("kernel/all.kernels/$_/boot/vmlinu*")); - rename("$img-$main", "$img"); - } -} -if ($arch =~ /i.86/ && $img =~ /all/) { - isolinux($main, @kernels); - - my ($img, $img_sav) = ("images/cdrom.img-$main", 'images/cdrom.img-sav'); - rename($img, $img_sav); - $type = 'cdrom'; - boot_img_i386($mnt, $img, "kernel/all.kernels/$main/boot/vmlinu*", sub { $_[0] =~ s/\bautomatic=\S+\b//; "$_[0] changedisk" }); - rename($img, 'images/cdrom-changedisk.img'); - rename($img_sav, $img); -} - -if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) { - system("/bin/cp -f kernel/all.kernels/$main/boot/vmlinu* $tftpboot/vmlinuz 2>/dev/null"); - system("/bin/cp -f images/network.rdz-$main $tftpboot/network.rdz 2>/dev/null"); -} - -sub install_stripped { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" } - -sub initrd { - my ($mnt, $img) = @_; - my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type; - my $tmp = "$ENV{HOME}/tmp/initrd"; - my $tar = "$instdir/stage1-data/stage1.tar.bz2"; - - __ "$sudo umount $tmp $mnt 2>/dev/null"; - _ "dd if=/dev/zero of=$tmp bs=1k count=" . ($arch =~ /ia64/ ? ($type eq "all" ? 16386 : 16384) : ($type eq "all" ? 4000 : 2000)); - _ "$mke2fs $tmp"; - _ "$sudo mount -t ext2 $tmp $mnt -o loop"; - - _ "$sudo tar xjC $mnt -f $tar"; - install_stripped("$instdir/init", "$mnt/sbin"); - install_stripped("$instdir/$install", "$mnt/sbin/stage1"); - - if (member($type, qw(network network_gigabit_usb all blank))) { - install_stripped("$instdir/ppp/pppd-bin", "$mnt/sbin/pppd"); - install_stripped("$instdir/rp-pppoe/pppoe-bin", "$mnt/sbin/pppoe"); - _ "$sudo mknod $mnt/dev/ppp c 108 0"; - _ "$sudo mknod $mnt/dev/ptyp0 c 2 0"; - _ "$sudo mknod $mnt/dev/ttyp0 c 3 0"; - } - - if (member($type, qw(pcmcia all network)) && $arch !~ /ppc/ && $arch !~ /ia64/) { - _ "$sudo cp -a /etc/pcmcia $mnt/etc"; - _ "cp $mnt/etc/pcmcia/config /tmp/pcmcia_config_tmp"; - _ "tools/patch_pcmcia_config.pl /tmp/pcmcia_config_tmp kernel/all.modules/$main/modules.dep"; - _ "sudo mv /tmp/pcmcia_config_tmp $mnt/etc/pcmcia/config"; - } - my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)"; - $modz = "kernel/all.modules$I/$ext"; - if ($type !~ /blank/) { - _ "$sudo cp -f $modz/${ltype}_modules.mar $mnt/modules/modules$I.mar" ; - _ "$sudo cp -f $modz/modules.dep $mnt/modules/"; - } - _ "$sudo umount $mnt"; - - -# Workaround for vfat-loop bug (quite touchy) - _ "gzip -9f $tmp"; - _ "cp -f $tmp.gz $img"; - _ "rm -f $tmp.gz"; -# _ "gzip -9 -c $tmp > $img"; -# _ "rm -f $tmp"; -} - -sub entries_append { - my ($type) = @_; - - my $automatic = ""; - $automatic = "automatic=method:cdrom" if ($type eq "cdrom"); - $automatic = "automatic=method:disk" if ($type eq "hd"); - - my @simple_entries = ( - linux => "$default_vga", - vgalo => "vga=785", - vgahi => "vga=791", - vga16 => "vga16", - text => "text", - patch => "patch $default_vga", - expert => "expert $default_vga", - rescue => "rescue rw", - ); - my @entries = ( - (map { $_->[0] => "$automatic $default_acpi $_->[1]" } group_by2(@simple_entries)), - acpi => "$automatic $default_vga", - if_(member($type, "cdrom", "all"), oem => "automatic=method:cdrom $default_vga $default_acpi rescue oem rw",), - if_($type eq "all", all => "pcmcia $default_vga $default_acpi"), - ); - - map { [ $_->[0], "$default_append $_->[1]" ] } - group_by2(@entries); -} - -sub boot_img_i386 { - my ($mnt, $img, $kernel, $args_callback) = @_; - - __ "$sudo umount $mnt 2>/dev/null"; - - if ($type eq "hd") { - _ "bunzip2 -c $instdir/init-data/msgboot.img.bz2 > $img"; - } elsif ($type eq "all") { - _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo-2880.img.bz2 > $img"; - } elsif ($type eq "blank") { - _ "bunzip2 -c $instdir/init-data/msgboot-blank.img.bz2 > $img"; - } else { - _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo.img.bz2 > $img"; - } - - - _ "$sudo mount -t vfat -o umask=0 $img $mnt -o loop"; - _ "cat $kernel > $mnt/vmlinuz" if $type !~ /blank/; - - my $rdz = $img; $rdz =~ s/\.img/.rdz/; - initrd("${mnt}2", $rdz) if !-e $rdz; - my $short_type = substr($type, 0, 8); - eval { _ "cp -f $rdz $mnt/$short_type.rdz" }; - if ($@) { - unlink "$mnt/$short_type.rdz"; - my $avail = (split ' ', `df $mnt`)[-3]; - my $s = int((-s $rdz) / 1024); - die sprintf("not enough room for $rdz: need %dKB (available %dKB < needed %dKB)\n", $s - $avail, $avail, $s); - } - - my $timeout = 72; - output "$mnt/syslinux.cfg", -"default linux -prompt 1 -timeout $timeout -display boot.msg -F1 help.msg -F2 advanced.msg -F3 boot.msg -" . join('', map { - my $args = $args_callback ? $args_callback->($_->[1]) : $_->[1]; -"label $_->[0] - kernel vmlinuz - append initrd=$short_type.rdz $args -" } entries_append($type)); - - _ "sync"; - _ "df $mnt"; -} - -sub boot_img_alpha { - my ($mnt, $img) = @_; - - __ "$sudo umount $mnt 2>/dev/null"; - _ "dd if=/dev/zero of=$img bs=1k count=1440"; - _ "$mke2fs $img"; - _ "/sbin/e2writeboot $img /boot/bootlx"; - _ "$sudo mount -t ext2 $img $mnt -o loop"; - _ "cp -f vmlinux.gz $mnt" if $type !~ /blank/; - -f "$type.rdz" ? _ "cp -f $type.rdz $mnt" : initrd("${mnt}2", "$mnt/$type.rdz"); - - mkdir "$mnt/etc", 0777; - output("$mnt/etc/aboot.conf", -"0:vmlinux.gz initrd=$type.rdz rw $default_append $type -1:vmlinux.gz initrd=$type.rdz rw $default_append text $type -"); - _ "sync"; - _ "df $mnt"; -} - -sub boot_img_ia64 { - my ($mnt, $img, $kernel) = @_; - my $rdz = $img; $rdz =~ s/\.img/.rdz/; - - __ "$sudo umount $mnt 2>/dev/null"; - _ "dd if=/dev/zero of=$img bs=1k count=16384"; - _ "mkdosfs $img"; - _ "$sudo mount -t vfat $img $mnt -o loop,umask=000"; - _ "$sudo cp -f $kernel $mnt/vmlinux"; - _ "cp -f $rdz $mnt/$type.rdz"; - _ "$sudo cp -f tools/ia64/elilo.efi $mnt"; - output("$mnt/elilo.conf", " -prompt -timeout=50 - -image=vmlinux - label=linux - root=/dev/ram3 - initrd=$type.rdz - append=\" ramdisk_size=120000\" - read-only - -image=vmlinux - label=rescue - root=/dev/ram3 - initrd=$type.rdz - append=\" rescue ramdisk_size=120000\" -"); - _ "sync"; - _ "df $mnt"; - -} - -sub boot_img_sparc { - my ($mnt, $img) = @_; - if ($type =~ /^live(.*)/) { - #- hack to produce directly into /export the needed file for cdrom boot. - my $dir = "/export"; - my $boot = "boot"; #- non-absolute pathname only! - - _ "mkdir -p $dir/$boot"; - _ "cp -f /boot/cd.b /boot/second.b $dir/$boot"; - _ "cp -f vmlinux$1 $dir/$boot/vmlinux$1"; - -f "live$1.rdz" ? _ "cp -f live$1.rdz $dir/$boot" : initrd("${mnt}2", "$dir/$boot/live$1.rdz"); - - output("$dir/$boot/silo.conf", " -partition=1 -default=linux -timeout=100 -read-write -message=/$boot/boot.msg -image=\"cat /$boot/boot.msg\" - label=1 - single-key -image=\"cat /$boot/general.msg\" - label=2 - single-key -image=\"cat /$boot/expert.msg\" - label=3 - single-key -image=\"cat /$boot/rescue.msg\" - label=4 - single-key -image=\"cat /$boot/kickit.msg\" - label=5 - single-key -image=\"cat /$boot/param.msg\" - label=6 - single-key -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=linux - alias=install - initrd=/$boot/live.rdz - append=\"ramdisk_size=128000 root=/dev/ram3\" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=text - initrd=/$boot/live.rdz - append=\"ramdisk_size=128000 text root=/dev/ram3\" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=expert - initrd=/$boot/live.rdz - append=\"ramdisk_size=128000 expert root=/dev/ram3\" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=ks - initrd=/$boot/live.rdz - append=\"ramdisk_size=128000 ks root=/dev/ram3\" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=rescue - initrd=/$boot/live.rdz - append=\"ramdisk_size=128000 rescue rw root=/dev/ram3\" -image[sun4u]=/$boot/vmlinux64 - label=linux - alias=install - initrd=/$boot/live64.rdz - append=\"ramdisk_size=128000 root=/dev/ram3\" -image[sun4u]=/$boot/vmlinux64 - label=text - initrd=/$boot/live64.rdz - append=\"ramdisk_size=128000 text root=/dev/ram3\" -image[sun4u]=/$boot/vmlinux64 - label=expert - initrd=/$boot/live64.rdz - append=\"ramdisk_size=128000 expert root=/dev/ram3\" -image[sun4u]=/$boot/vmlinux64 - label=ks - initrd=/$boot/live64.rdz - append=\"ramdisk_size=128000 ks root=/dev/ram3\" -image[sun4u]=/$boot/vmlinux64 - label=rescue - initrd=/$boot/live64.rdz - append=\"ramdisk_size=128000 rescue rw root=/dev/ram3\" -"); - - output("$dir/$boot/README", " -To Build a Bootable CD-ROM, try: - mkisofs -R -o t.iso -s /$boot/silo.conf /export -"); - } elsif ($type =~ /^tftprd(.*)/) { - my $dir = "/export"; - my $boot = "images"; - my $setarch = $1 ? "sparc64" : "sparc32"; - - _ "mkdir -p $dir/$boot"; - -f "$type.rdz" or initrd("${mnt}2", "$type.rdz"); - _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; - _ "$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz"; - } elsif ($type =~ /^tftp(.*)/) { - my $dir = "/export"; - my $boot = "images"; - - _ "mkdir -p $dir/$boot"; - _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; - } else { - my $dir = "floppy"; - my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type; - - __ "$sudo umount $mnt 2>/dev/null"; - _ "rm -rf $dir"; - _ "mkdir -p $dir"; - _ "cp -f /boot/fd.b /boot/second.b $dir"; - _ "cp -f vmlinuz$I $dir/vmlinux$I.gz" if $type !~ /blank/; - -f "$type.rdz" ? _ "cp -f $type.rdz $dir" : initrd("${mnt}2", "$dir/$type.rdz"); - - output("$dir/boot.msg", " -Welcome to Mandrake Linux 7.1 - -Press <Enter> to install or upgrade a system 7mMandrake Linux7m -"); - - output("$dir/silo.conf", " -partition=1 -default=linux -timeout=100 -read-write -message=/boot.msg -image=/vmlinux$I.gz - label=linux - initrd=/$type.rdz - append=\"ramdisk_size=128000 $ltype root=/dev/ram3\" -"); - _ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V \'DrakX boot disk\'"; - _ "$sudo mount -t romfs /dev/ram $mnt"; - _ "silo -r $mnt -F -i /fd.b -b /second.b -C /silo.conf"; - _ "$sudo umount $mnt"; - _ "dd if=/dev/ram of=$type.img bs=1440k count=1"; - _ "sync"; - _ "$sudo mount -t romfs /dev/ram $mnt"; - _ "df $mnt"; - } -} - -sub boot_img_ppc { - my (@kernels) = @_; - #- hack to produce directly into /export the needed file for cdrom boot. - my $dir = "/export"; - my $boot = "boot"; #- non-absolute pathname only! - _ "rm -rf $dir/$boot"; mkdir "$dir/$boot", 0777; - foreach (glob("kernel/all.kernels/*")) { - my $ext = basename($_); - if ($ext =~ /2.4/) { - _ "cp $_/boot/vmlinux $dir/$boot/vmlinux"; - _ "cp images/all.rdz-$ext $dir/$boot/all.gz"; - } - if ($ext =~ /2.2/) { - _ "cp $_/boot/vmlinux $dir/$boot/vmlinux-2.2"; - _ "cp images/all.rdz-$ext $dir/$boot/all-2.2.gz"; - } - } - _ "cp -f /usr/lib/yaboot/yaboot $dir/$boot/yaboot"; - - output("$dir/$boot/ofboot.b", "<CHRP-BOOT> -<COMPATIBLE> -MacRISC -</COMPATIBLE> -<DESCRIPTION> -Mandrake Linux PPC bootloader -</DESCRIPTION> -<BOOT-SCRIPT> -\" screen\" output -dev screen -\" \"(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)\" drop 0 8 set-colors -\" \"(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)\" drop 8 8 set-colors -device-end -3 to foreground-color -0 to background-color -\" \"(0C)\" fb8-write drop -\" Booting Mandrake Linux PPC...\" fb8-write drop 100 ms -boot cd:2,\\\\yaboot -</BOOT-SCRIPT> -<OS-BADGE-ICONS> -1010 -000000000000F8FEACF6000000000000 -0000000000F5FFFFFEFEF50000000000 -00000000002BFAFEFAFCF70000000000 -0000000000F65D5857812B0000000000 -0000000000F5350B2F88560000000000 -0000000000F6335708F8FE0000000000 -00000000005600F600F5FD8100000000 -00000000F9F8000000F5FAFFF8000000 -000000008100F5F50000F6FEFE000000 -000000F8F700F500F50000FCFFF70000 -00000088F70000F50000F5FCFF2B0000 -0000002F582A00F5000008ADE02C0000 -00090B0A35A62B0000002D3B350A0000 -000A0A0B0B3BF60000505E0B0A0B0A00 -002E350B0B2F87FAFCF45F0B2E090000 -00000007335FF82BF72B575907000000 -000000000000ACFFFF81000000000000 -000000000081FFFFFFFF810000000000 -0000000000FBFFFFFFFFAC0000000000 -000000000081DFDFDFFFFB0000000000 -000000000081DD5F83FFFD0000000000 -000000000081DDDF5EACFF0000000000 -0000000000FDF981F981FFFF00000000 -00000000FFACF9F9F981FFFFAC000000 -00000000FFF98181F9F981FFFF000000 -000000ACACF981F981F9F9FFFFAC0000 -000000FFACF9F981F9F981FFFFFB0000 -00000083DFFBF981F9F95EFFFFFC0000 -005F5F5FDDFFFBF9F9F983DDDD5F0000 -005F5F5F5FDD81F9F9E7DF5F5F5F5F00 -0083DD5F5F83FFFFFFFFDF5F835F0000 -000000FBDDDFACFBACFBDFDFFB000000 -000000000000FFFFFFFF000000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFFFF00000000 -00000000FFFFFFFFFFFFFFFFFF000000 -00000000FFFFFFFFFFFFFFFFFF000000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFF000000 -</OS-BADGE-ICONS> -</CHRP-BOOT> -"); - - output("$dir/$boot/yaboot.conf", " -init-message = \"\\nWelcome to Mandrake Linux PPC!\\nHit <TAB> for boot options.\\n\\n\" -timeout = 150 -default = install-gui -message=cd:,\\\\\\\\yaboot.msg - -image = cd:,\\\\\\\\vmlinux - label = install-gui - root = /dev/ram3 - initrd = cd:,\\\\\\\\all.gz - initrd-size = 34000 - -image = cd:,\\\\\\\\vmlinux-2.2 - label = install-gui-2.2 - root = /dev/ram3 - initrd = cd:,\\\\\\\\all-2.2.gz - initrd-size = 34000 - -image = cd:,\\\\\\\\vmlinux - label = install-text - root = /dev/ram3 - initrd = cd:,\\\\\\\\all.gz - initrd-size = 34000 - append = \" text video=ofonly\" - -image = cd:,\\\\\\\\vmlinux-2.2 - label = install-text-2.2 - root = /dev/ram3 - initrd = cd:,\\\\\\\\all-2.2.gz - initrd-size = 34000 - append = \" text video=ofonly\" - -image = cd:,\\\\\\\\vmlinux - label = install-gui-old - root = /dev/ram3 - initrd = cd:,\\\\\\\\all.gz - initrd-size = 34000 - append = \" gui-old video=ofonly\" - -image = cd:,\\\\\\\\vmlinux-2.2 - label = install-gui-old-2.2 - root = /dev/ram3 - initrd = cd:,\\\\\\\\all-2.2.gz - initrd-size = 34000 - append = \" gui-old video=ofonly\" - -image = enet:0,vmlinux - label = install-net - root = /dev/ram3 - initrd = enet:0,all.gz - initrd-size = 34000 - append = \" video=ofonly\" - -image = enet:0,vmlinux-2.2 - label = install-net-2.2 - root = /dev/ram3 - initrd = enet:0,all-2.2.gz - initrd-size = 34000 - append = \" video=ofonly\" - -image = enet:0,vmlinux - label = install-net-text - root = /dev/ram3 - initrd = enet:0,all.gz - initrd-size = 34000 - append = \" text video=ofonly\" - -image = enet:0,vmlinux-2.2 - label = install-net-text-2.2 - root = /dev/ram3 - initrd = enet:0,all-2.2.gz - initrd-size = 34000 - append = \" text video=ofonly\" - -image = cd:,\\\\\\\\vmlinux - label = rescue - root = /dev/ram3 - initrd = cd:,\\\\\\\\all.gz - initrd-size = 34000 - append = \" rescue video=ofonly\" - -image = enet:0,vmlinux - label = rescue-net - root = /dev/ram3 - initrd = enet:0,all.gz - initrd-size = 34000 - append = \" rescue video=ofonly\" -"); - - output("$dir/$boot/yaboot.msg", " -Thanks for choosing Mandrake Linux PPC. The following is a short -explanation of the various options for booting the install CD. - -All options ending with \"2.2\" will use the 2.2.20-9mdkBOOT kernel. -The default syntax with no suffix uses the 2.4.18-4mdkBOOT kernel. -The default if you just hit enter is \"install-gui\". - -install-gui: uses XFree86 fbdev mode -install-text: text based install -install-gui-old: old Xpmac gui -install-net: allows you to use a minimal boot CD, - pulling the rest of the install from - a network server -install-net-text: text mode network install -rescue: boots the rescue image -rescue-net: boots the rescue image from a network server - -"); - -} - -sub isolinux { - my ($main, @kernels) = @_; - @kernels = ($main, grep { $_ ne $main } @kernels); - _ "rm -rf isolinux"; mkdir "isolinux", 0777; - my $i = 0; - foreach (@kernels) { - mkdir "isolinux/alt$i", 0777; - my ($kernel) = glob("kernel/all.kernels/$_/boot/vmlinu*"); - _ "cp $kernel isolinux/alt$i/vmlinuz"; - _ "cp images/all.rdz-$_ isolinux/alt$i/all.rdz"; - $i++; - } - if (-e "isolinux-graphic.bmp") { - #- change here for newer picture isolinux-graphic.bmp and newer parameters. - _ "lilo-bmp2mdk mode:0x103 progress:425,173,16,7,64+21 clear:600,800,64+59 pos:0,0 <isolinux-graphic.bmp >isolinux/boot.msg"; - } - _ "cp /usr/lib/syslinux/isolinux.bin isolinux/isolinux.bin"; - output "isolinux/isolinux.cfg", " -default linux -prompt 1 -timeout 150 -" . (-e "isolinux/boot.msg" ? "display boot.msg" : "display help.msg") . " -F1 help.msg -F2 advanced.msg -" . (-e "isolinux/boot.msg" && "F3 boot.msg") . " -" . join('', map { -"label $_->[0] - kernel alt0/vmlinuz - append initrd=alt0/all.rdz $_->[1] automatic=method:cdrom -" } entries_append('all')) - . join('', map_index { -"label alt$::i - kernel alt$::i/vmlinuz - append initrd=alt$::i/all.rdz $default_append $default_acpi $default_vga -" } @kernels); - - output "isolinux/help.msg", (-e "isolinux/boot.msg" && pack "C*", 0x0E, 0x80, 0x03, 0x00) . -" - 0aWelcome to 09Mandrake Linux0a install help07 - -In most cases, the best way to get started is to simply press the 0e<Enter>07 key. -If you experience problems with standard install, try one of the following -install types (type the highlighted text and press 0e<Enter>07): - - o 0fvgalo07 for low resolution graphical installation. - o 0ftext07 for text installation instead of the graphical one. - o 0flinux07 for standard graphical installation at normal resolution. - o 0fexpert07 for expert graphical installation at normal resolution. - - -To use this CD to repair an already installed system type 0frescue07 -followed by 0e<Enter>07. - -You can also pass some 0f<specific kernel options>07 to the Linux kernel. -For example, try 0flinux mem=128M07 if your system has 128Mb of RAM but the default -kernel ($main) does not detect it correctly. -0cNOTE07: You cannot pass options to modules (SCSI, ethernet card) or devices -such as CD-ROM drives in this way. If you need to do so, use expert mode. - -" . (-e "isolinux/boot.msg" ? - "0c[F1-Help] [F2-Advanced Help] [F3-Main]07" : - "0c[F1-Help] [F2-Advanced Help]07") . "\n"; - - output "isolinux/advanced.msg", (-e "isolinux/boot.msg" && pack "C*", 0x0E, 0x80, 0x03, 0x00) . -" -The following install types may be used instead of previously notified : - o 0fvgahi07 for high resolution graphical installation. - o 0fvga1607 for 640x480 in 16 colors graphical installation. - -The following options may be added on the command line : - o 0freadonly=107 to disable editing disk partitions. - o 0fdisplay=ackbar:007 to export display to 09ackbar07 machine screen 0 during - installation. - o 0fnoauto07 to disable automatic detection (generally used with 0fexpert07). - o 0fsecurity=n07 to set security level to value 09n07. - o 0fupdatemodules07 to use the special update floppy containing modules updates. - o 0fpatch07 to use a patch from the floppy (file named 09patch.pl07). - o 0fauto_install=floppy07 to enable auto_install using 09auto_inst.cfg07 file on the - floppy. - -You can choose the following kernels : -" . join('', map_index { " o 0falt$::i07 is kernel $_\n" } @kernels) . " -" . (-e "isolinux/boot.msg" ? - "0c[F1-Help] [F2-Advanced Help] [F3-Main]07" : - "0c[F1-Help] [F2-Advanced Help]07") . "\n"; -} diff --git a/mdk-stage1/.cvsignore b/mdk-stage1/.cvsignore deleted file mode 100644 index d6a8a8434..000000000 --- a/mdk-stage1/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -init -stage1-full -stage1-cdrom -stage1-disk -stage1-medias-usb -stage1-network -stage1-network-usb -debug.log -.depend -*.rdz* -mkinitrd_helper.tar.bz2 -hack_* -rescue-gui diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile deleted file mode 100644 index bc0ea6056..000000000 --- a/mdk-stage1/Makefile +++ /dev/null @@ -1,273 +0,0 @@ - #****************************************************************************** - # - # mdk-stage1 - the program that will load second-stage install - # - # $Id$ - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2000 MandrakeSoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - # Portions from Erik Troan (ewt@redhat.com) Copyright 1996 Red Hat Software - # - #***************************************************************************** - # - # Currently: - # - # ix86 - # init with minilibc - # stage1 with dietlibc - # - # ppc - # init with dietlibc - # stage1 with glibc - # - # ia64 - # init with glibc - # stage1 with glibc - # - #***************************************************************************** - - -VERSION = 9.1 - -top_dir = . - -include $(top_dir)/Makefile.common - - -DEFS = -DVERSION=\"$(VERSION)\" -DSPAWN_SHELL - -COMPILE = $(CC) $(DEFS) $(CFLAGS) - - - #- stage1 "loader" -ifeq (i386, $(ARCH)) -INITSRC = minilibc.c init.c -INIT_DEFS = -DINIT_HEADERS=\"minilibc.h\" -fno-builtin -else -INITSRC = init.c -ifeq (ia64, $(ARCH)) -INIT_DEFS = -DINIT_HEADERS=\"init-libc-headers.h\" $(GLIBC_INCLUDES) -else -INIT_DEFS = -DINIT_HEADERS=\"init-libc-headers.h\" $(DIETLIBC_INCLUDES) -endif -endif - -INITOBJS = $(subst .c,.o,$(INITSRC)) - - - #- frontends -NEWT_FRONTEND_SRC = newt-frontend.c -GLIBC_NEWT_FRONTEND_LIBS = newt/libnewt.a slang/libslang.a -DIETLIBC_NEWT_FRONTEND_LIBS = $(subst .a,-DIET.a,$(GLIBC_NEWT_FRONTEND_LIBS)) - -STDIO_FRONTEND_SRC = stdio-frontend.c -GLIBC_STDIO_FRONTEND_LIBS = -DIETLIBC_STDIO_FRONTEND_LIBS = - - -FRONTEND_OBJS = $(subst .c,.o,$($(F)_FRONTEND_SRC)) - -FRONTEND_LINK = $(FRONTEND_OBJS) $($(L)_$(F)_FRONTEND_LIBS) - -ifeq (i386, $(ARCH)) -INSMOD = insmod-busybox -else -INSMOD = insmod-modutils -endif - -GLIBC_STAGE1_OWN_LIBS = $(INSMOD)/libinsmod.a mar/libmar.a bzlib/libbzlib.a -DIETLIBC_STAGE1_OWN_LIBS = $(subst .a,-DIET.a,$(GLIBC_STAGE1_OWN_LIBS)) -STAGE1_OWN_LIBS = $($(L)_STAGE1_OWN_LIBS) - - -ifeq (DIETLIBC, $(L)) -STAGE1_NETWORK_LIBS = $(top_dir)/dietlibc/bin-$(ARCH)/librpc.a -endif - -ifeq (GLIBC, $(L)) -STAGE1_NETWORK_LIBS = /usr/lib/libresolv.a -endif - - #- stage1 itself -STAGE1SRC = stage1.c log.c tools.c modules.c probing.c mount.c automatic.c frontend-common.c -CDROMSRC = cdrom.c -DISKSRC = disk.c lomount.c -NETWORKSRC = network.c nfsmount.c dhcp.c url.c dns.c adsl.c - -ALLSRC = $(INITSRC) $(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC) - - - -STAGE1OBJS-CDROM = $(subst .c,-CDROM.o,$(STAGE1SRC) $(CDROMSRC)) - -CDROM_DEFS = -DDISABLE_DISK -DDISABLE_NETWORK - - -STAGE1OBJS-DISK = $(subst .c,-DISK.o,$(STAGE1SRC) $(DISKSRC)) - -DISK_DEFS = -DDISABLE_CDROM -DDISABLE_NETWORK - - -STAGE1OBJS-MEDIAS-USB = $(subst .c,-MEDIAS-USB.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC)) - -MEDIAS-USB_DEFS = -DDISABLE_NETWORK - - -STAGE1OBJS-NETWORK = $(subst .c,-NETWORK.o,$(STAGE1SRC) $(NETWORKSRC)) -STAGE1OBJS-NETWORK-USB = $(subst .c,-NETWORK-USB.o,$(STAGE1SRC) $(NETWORKSRC)) - -NETWORK_DEFS = -DDISABLE_CDROM -DDISABLE_DISK - - -STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC)) - - -ifeq (i386, $(ARCH)) -LDFLAGS_INIT = -static -nostdlib /usr/lib/crt1.o -else -ifeq (ia64, $(ARCH)) -LDFLAGS_INIT = $(GLIBC_LDFLAGS_STAGE1) -INIT_LIBC = $(GLIBC_LIBC) -else -LDFLAGS_INIT = $(DIETLIBC_LDFLAGS_STAGE1) -INIT_LIBC = $(DIETLIBC_LIBC) -endif -endif - - -BINS = init stage1-full - -ifeq (i386, $(ARCH)) -BINS += stage1-cdrom stage1-disk stage1-network stage1-network-usb stage1-medias-usb -endif - -ifneq (ia64, $(ARCH)) -DIRS = dietlibc -endif -DIRS += mar pci-resource usb-resource bzlib $(INSMOD) slang newt ppp/pppd rp-pppoe/src -ifeq (i386,$(ARCH)) -DIRS += pcmcia_ -endif - - -ifeq (i386,$(ARCH)) -GLIBC_PCMCIA_LIB = pcmcia_/libpcmcia.a -DIETLIBC_PCMCIA_LIB = $(subst .a,-DIET.a,$(GLIBC_PCMCIA_LIB)) -PCMCIA_LIB = $($(L)_PCMCIA_LIB) -PCMCIA_DEFS = -DENABLE_PCMCIA -endif - - -USB_DEFS_GEN = -DENABLE_USB -USB_DEFS = -DENABLE_USB -DDISABLE_PCIADAPTERS - -all: dirs $(BINS) - -dirs: - @for n in . $(DIRS); do \ - [ "$$n" = "." ] || make -C $$n || exit 1 ;\ - done - -init: $(INITOBJS) $(INIT_LIBC) - $(CC) $(LDFLAGS_INIT) -o $@ $^ - $(STRIPCMD) $@ - -stage1-cdrom: $(STAGE1OBJS-CDROM) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - -stage1-disk: $(STAGE1OBJS-DISK) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - -stage1-medias-usb: $(STAGE1OBJS-MEDIAS-USB) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - -stage1-network: $(STAGE1OBJS-NETWORK) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - -stage1-network-usb: $(STAGE1OBJS-NETWORK-USB) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - -stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - - -$(INITOBJS): %.o: %.c - $(COMPILE) $(INIT_DEFS) -c $< - -$(STAGE1OBJS-CDROM): %-CDROM.o: %.c - $(COMPILE) $(INCLUDES) $(CDROM_DEFS) -c $< -o $@ - -$(STAGE1OBJS-DISK): %-DISK.o: %.c - $(COMPILE) $(INCLUDES) $(DISK_DEFS) -c $< -o $@ - -$(STAGE1OBJS-MEDIAS-USB): %-MEDIAS-USB.o: %.c - $(COMPILE) $(INCLUDES) $(MEDIAS-USB_DEFS) $(USB_DEFS_GEN) -c $< -o $@ - -$(STAGE1OBJS-NETWORK): %-NETWORK.o: %.c - $(COMPILE) $(INCLUDES) $(NETWORK_DEFS) $(PCMCIA_DEFS) -c $< -o $@ - -$(STAGE1OBJS-NETWORK-USB): %-NETWORK-USB.o: %.c - $(COMPILE) $(INCLUDES) $(NETWORK_DEFS) $(USB_DEFS_GEN) -c $< -o $@ - -$(STAGE1OBJS-FULL): %-FULL.o: %.c - $(COMPILE) $(INCLUDES) $(USB_DEFS_GEN) $(PCMCIA_DEFS) -c $< -o $@ - -.c.o: - $(COMPILE) $(INCLUDES) -c $< - - -clean: - @for n in $(DIRS); do \ - (cd $$n; make clean) \ - done - rm -f *.o .depend *.rdz *.img rescue-gui $(BINS) - - -tar-mkinitrd_helper: clean - rm -rf mkinitrd_helper-subdir - mkdir mkinitrd_helper-subdir - cd mkinitrd_helper-subdir ; cp -a ../dietlibc ../insmod-busybox ../Makefile.common ../insmod.h ../log.h . ; \ - cp ../Makefile.mkinitrd_helper Makefile - tar cfj mkinitrd_helper.tar.bz2 mkinitrd_helper-subdir --exclude CVS - rm -rf mkinitrd_helper-subdir - -rescue-gui: rescue-gui.o frontend-common.o $(FRONTEND_LINK) $(STAGE1_LIBC) - $(CC) $(LDFLAGS_STAGE1) -o $@ $^ - $(STRIPCMD) $@ - - -.depend: - $(CPP) $(CFLAGS) -M $(ALLSRC) > .depend - -ifeq (.depend,$(wildcard .depend)) -include .depend -endif - - -*-CDROM.o: %-CDROM.o: %.o - -*-DISK.o: %-DISK.o: %.o - -*-MEDIAS-USB.o: %-MEDIAS-USB.o: %.o - -*-NETWORK.o: %-NETWORK.o: %.o - -*-NETWORK-USB.o: %-NETWORK-USB.o: %.o - -*-FULL.o: %-FULL.o: %.o - diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common deleted file mode 100644 index 7506c1381..000000000 --- a/mdk-stage1/Makefile.common +++ /dev/null @@ -1,57 +0,0 @@ - # -*- makefile -*- - #****************************************************************************** - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2000 MandrakeSoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - -ARCH := $(patsubst i%86,i386,$(shell uname -m)) -ARCH := $(patsubst sparc%,sparc,$(ARCH)) - - #- default lib is dietlibc (honoured by main Makefile whenever possible) -L = DIETLIBC -#L = GLIBC - - #- default frontend is newt (honoured by main Makefile whenever possible) -F = NEWT -# F = STDIO - - #- override in some situations -ifeq (ia64, $(ARCH)) -L = GLIBC -endif -ifeq (ppc, $(ARCH)) -L = GLIBC -endif - - - #- flags used by all stuff -ifeq (ppc, $(ARCH)) -CFLAGS = -Os -pipe -Wall -fomit-frame-pointer -else -CFLAGS = -Os -pipe -Wall -Werror -W -fomit-frame-pointer -endif - -DIETLIBC_INCLUDES = -I$(top_dir)/dietlibc/include -I. -I$(top_dir)/bzlib -GLIBC_INCLUDES = -I. -I$(top_dir)/bzlib -INCLUDES = $($(L)_INCLUDES) - -GLIBC_LDFLAGS_STAGE1 = -static -DIETLIBC_LDFLAGS_STAGE1 = -nostdlib $(top_dir)/dietlibc/bin-$(ARCH)/start.o -LDFLAGS_STAGE1 = $($(L)_LDFLAGS_STAGE1) - -GLIBC_LIBC = -DIETLIBC_LIBC = $(top_dir)/dietlibc/bin-$(ARCH)/dietlibc.a -STAGE1_LIBC = $($(L)_LIBC) - -STRIPCMD = strip -R .note -R .comment - diff --git a/mdk-stage1/Makefile.mkinitrd_helper b/mdk-stage1/Makefile.mkinitrd_helper deleted file mode 100644 index 72bef595f..000000000 --- a/mdk-stage1/Makefile.mkinitrd_helper +++ /dev/null @@ -1,30 +0,0 @@ - #****************************************************************************** - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2000 MandrakeSoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - - -DIRS = dietlibc insmod-busybox - - -all: dirs - -dirs: - @for n in . $(DIRS); do \ - [ "$$n" = "." ] || make -C $$n ;\ - done - -clean: - @for n in $(DIRS); do \ - (cd $$n; make clean) \ - done diff --git a/mdk-stage1/adsl.c b/mdk-stage1/adsl.c deleted file mode 100644 index d542f2f35..000000000 --- a/mdk-stage1/adsl.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include <stdlib.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <string.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <sys/ioctl.h> -#include <errno.h> -#include <stdio.h> -#include <resolv.h> -#include <signal.h> - -#include "stage1.h" -#include "log.h" -#include "network.h" -#include "modules.h" -#include "tools.h" -#include "frontend.h" -#include "automatic.h" - -#include "adsl.h" - - -static enum return_type adsl_connect(char * net_device, char * username, char * password) -{ - char pppoe_call[500]; - char * pppd_launch[] = { "/sbin/pppd", "pty", pppoe_call, "noipdefault", "noauth", "default-asyncmap", "defaultroute", - "hide-password", "nodetach", "usepeerdns", "local", "mtu", "1492", "mru", "1492", "noaccomp", - "noccp", "nobsdcomp", "nodeflate", "nopcomp", "novj", "novjccomp", "user", username, - "password", password, "lcp-echo-interval", "20", "lcp-echo-failure", "3", "lock", "persist", NULL }; - int fd; - int retries = 10; - char * tty_adsl = "/dev/tty6"; - enum return_type status = RETURN_ERROR; - pid_t ppp_pid; - - snprintf(pppoe_call, sizeof(pppoe_call), "/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I %s -T 80 -U -m 1412", net_device); - - - fd = open(tty_adsl, O_RDWR); - if (fd == -1) { - log_message("cannot open tty -- no pppd"); - return RETURN_ERROR; - } - else if (access(pppd_launch[0], X_OK)) { - log_message("cannot open pppd - %s doesn't exist", pppd_launch[0]); - return RETURN_ERROR; - } - - if (!(ppp_pid = fork())) { - dup2(fd, 0); - dup2(fd, 1); - dup2(fd, 2); - - close(fd); - setsid(); - if (ioctl(0, TIOCSCTTY, NULL)) - log_perror("could not set new controlling tty"); - - printf("\t(exec of pppd)\n"); - execve(pppd_launch[0], pppd_launch, grab_env()); - log_message("execve of %s failed: %s", pppd_launch[0], strerror(errno)); - exit(-1); - } - close(fd); - while (retries > 0 && kill(ppp_pid, 0) == 0) { - FILE * f; - if ((f = fopen("/var/run/pppd.tdb", "rb"))) { - while (1) { - char buf[500]; - if (!fgets(buf, sizeof(buf), f)) - break; - if (strstr(buf, "IPLOCAL=")) - status = RETURN_OK; - } - fclose(f); - if (status == RETURN_OK) { - log_message("PPP: connected!"); - break; - } - } - retries--; - log_message("PPP: <sleep>"); - sleep(2); - } - - if (status != RETURN_OK) { - log_message("PPP: could not connect"); - kill(ppp_pid, SIGTERM); - sleep(1); - kill(ppp_pid, SIGKILL); - sleep(1); - } - return status; -} - - -enum return_type perform_adsl(struct interface_info * intf) -{ - struct in_addr addr; - char * questions[] = { "Username", "Password", NULL }; - char * questions_auto[] = { "adsluser", "adslpass", NULL }; - static char ** answers = NULL; - enum return_type results; - - inet_aton("10.0.0.10", &addr); - memcpy(&intf->ip, &addr, sizeof(addr)); - - inet_aton("255.255.255.0", &addr); - memcpy(&intf->netmask, &addr, sizeof(addr)); - - *((uint32_t *) &intf->broadcast) = (*((uint32_t *) &intf->ip) & - *((uint32_t *) &intf->netmask)) | ~(*((uint32_t *) &intf->netmask)); - - intf->is_ptp = 0; - - if (configure_net_device(intf)) { - stg1_error_message("Could not configure.."); - return RETURN_ERROR; - } - - results = ask_from_entries_auto("Please enter the username and password for your ADSL account.\n" - "(Warning! only PPPoE protocol is supported)", - questions, &answers, 40, questions_auto, NULL); - if (results != RETURN_OK) - return results; - - intf->boot_proto = BOOTPROTO_ADSL_PPPOE; - - wait_message("Waiting for ADSL connection to show up..."); - my_insmod("ppp_generic", ANY_DRIVER_TYPE, NULL); - my_insmod("ppp_async", ANY_DRIVER_TYPE, NULL); - my_insmod("ppp", ANY_DRIVER_TYPE, NULL); - results = adsl_connect(intf->device, answers[0], answers[1]); - remove_wait_message(); - - if (results != RETURN_OK) { - wait_message("Retrying the ADSL connection..."); - results = adsl_connect(intf->device, answers[0], answers[1]); - remove_wait_message(); - } else { - intf->user = strdup(answers[0]); - intf->pass = strdup(answers[1]); - } - - if (results != RETURN_OK) { - stg1_error_message("I could not connect to the ADSL network."); - return perform_adsl(intf); - } - - sleep(1); - res_init(); /* reinit the resolver, pppd modified /etc/resolv.conf */ - - return RETURN_OK; -} diff --git a/mdk-stage1/adsl.h b/mdk-stage1/adsl.h deleted file mode 100644 index 9d32cc631..000000000 --- a/mdk-stage1/adsl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * View the homepage: http://us.mandrakesoft.com/~gc/html/stage1.html - * - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * Portions from GRUB -- GRand Unified Bootloader - * Copyright (C) 2000 Free Software Foundation, Inc. - * - * Itself based on etherboot-4.6.4 by Martin Renters. - * - */ - -#ifndef _ADSL_H_ -#define _ADSL_H_ - -#include "stage1.h" -#include "network.h" - -enum return_type perform_adsl(struct interface_info * intf); - -#endif diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c deleted file mode 100644 index 1c6e021a0..000000000 --- a/mdk-stage1/automatic.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * This is supposed to replace the redhat "kickstart", by name but - * also by design (less code pollution). - * - */ - - -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include "tools.h" -#include "stage1.h" -#include "frontend.h" -#include "log.h" - -#include "automatic.h" - - -static struct param_elem * automatic_params; -static char * value_not_bound = ""; - -void grab_automatic_params(char * line) -{ - int i, p; - struct param_elem tmp_params[50]; - - i = 0; p = 0; - while (line[i] != '\0') { - char *name, *value; - int k; - int j = i; - while (line[i] != ':' && line[i] != '\0') - i++; - name = memdup(&line[j], i-j + 1); - name[i-j] = 0; - - k = i+1; - i++; - while (line[i] != ',' && line[i] != '\0') - i++; - value = memdup(&line[k], i-k + 1); - value[i-k] = 0; - - tmp_params[p].name = name; - tmp_params[p].value = value; - p++; - if (line[i] == '\0') - break; - i++; - } - - tmp_params[p++].name = NULL; - automatic_params = memdup(tmp_params, sizeof(struct param_elem) * p); - - log_message("AUTOMATIC MODE: got %d params", p-1); -} - - -char * get_auto_value(char * auto_param) -{ - struct param_elem * ptr = automatic_params; - - struct param_elem short_aliases[] = - { { "method", "met" }, { "network", "netw" }, { "interface", "int" }, { "gateway", "gat" }, - { "netmask", "netm" }, { "adsluser", "adslu" }, { "adslpass", "adslp" }, { "hostname", "hos" }, - { "domain", "dom" }, { "server", "ser" }, { "directory", "dir" }, { "user", "use" }, - { "pass", "pas" }, { "disk", "dis" }, { "partition", "par" }, { NULL, NULL } }; - struct param_elem * ptr_alias = short_aliases; - while (ptr_alias->name) { - if (streq(auto_param, ptr_alias->name)) - break; - ptr_alias++; - } - - while (ptr->name) { - if (streq(ptr->name, auto_param) - || (ptr_alias->name && streq(ptr_alias->value, ptr->name))) - return ptr->value; - ptr++; - } - - return value_not_bound; -} - - -enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, char * auto_param, char ** elems_auto) -{ - if (!IS_AUTOMATIC) - return ask_from_list(msg, elems, choice); - else { - char ** sav_elems = elems; - char * tmp = get_auto_value(auto_param); - while (elems && *elems) { - if (!strcmp(tmp, *elems_auto)) { - *choice = *elems; - log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems); - return RETURN_OK; - } - elems++; - elems_auto++; - } - unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */ - return ask_from_list(msg, sav_elems, choice); - } -} - -enum return_type ask_from_list_comments_auto(char *msg, char ** elems, char ** elems_comments, char ** choice, char * auto_param, char ** elems_auto) -{ - if (!IS_AUTOMATIC) - return ask_from_list_comments(msg, elems, elems_comments, choice); - else { - char ** sav_elems = elems; - char * tmp = get_auto_value(auto_param); - while (elems && *elems) { - if (!strcmp(tmp, *elems_auto)) { - *choice = *elems; - log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems); - return RETURN_OK; - } - elems++; - elems_auto++; - } - unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */ - return ask_from_list_comments(msg, sav_elems, elems_comments, choice); - } -} - - -enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** answers, int entry_size, char ** questions_auto, void (*callback_func)(char ** strings)) -{ - if (!IS_AUTOMATIC) - return ask_from_entries(msg, questions, answers, entry_size, callback_func); - else { - char * tmp_answers[50]; - int i = 0; - while (questions && *questions) { - tmp_answers[i] = get_auto_value(*questions_auto); - log_message("AUTOMATIC: question %s answers %s because of param %s", *questions, tmp_answers[i], *questions_auto); - i++; - questions++; - questions_auto++; - - } - *answers = memdup(tmp_answers, sizeof(char *) * i); - return RETURN_OK; - } -} diff --git a/mdk-stage1/automatic.h b/mdk-stage1/automatic.h deleted file mode 100644 index c2ac0a73d..000000000 --- a/mdk-stage1/automatic.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * This is supposed to replace the redhat "kickstart", by name but - * also by design (no code pollution). - * - */ - -#ifndef _AUTOMATIC_H_ -#define _AUTOMATIC_H_ - -#include "stage1.h" - -void grab_automatic_params(char * line); - -enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, char * auto_param, char ** elems_auto); -enum return_type ask_from_list_comments_auto(char *msg, char ** elems, char ** elems_comments, char ** choice, char * auto_param, char ** elems_auto); -enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** answers, int entry_size, char ** questions_auto, void (*callback_func)(char ** strings)); - -#endif diff --git a/mdk-stage1/bzlib/Makefile b/mdk-stage1/bzlib/Makefile deleted file mode 100644 index 03a2c254b..000000000 --- a/mdk-stage1/bzlib/Makefile +++ /dev/null @@ -1,55 +0,0 @@ - #****************************************************************************** - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2000 MandrakeSoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - -top_dir = .. - -include $(top_dir)/Makefile.common - - -LIBNAME = libbzlib - -OBJS = blocksort.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o - -DEFS = - -INCS = - - -TARGETS = $(LIBNAME).a - -ifeq (DIETLIBC, $(L)) -TARGETS += $(LIBNAME)-DIET.a -endif - -all: $(TARGETS) - -clean: - rm -f *.o *.a - -OBJS-DIET = $(subst .o,-DIET.o,$(OBJS)) - -$(LIBNAME).a: $(OBJS) - ar -cru $@ $^ - ranlib $@ - -$(LIBNAME)-DIET.a: $(OBJS-DIET) - ar -cru $@ $^ - ranlib $@ - -$(OBJS): %.o: %.c - $(CC) $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $< -o $@ - -$(OBJS-DIET): %-DIET.o: %.c - $(CC) $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -c $< -o $@ diff --git a/mdk-stage1/bzlib/blocksort.c b/mdk-stage1/bzlib/blocksort.c deleted file mode 100644 index c1b78c483..000000000 --- a/mdk-stage1/bzlib/blocksort.c +++ /dev/null @@ -1,1138 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Block sorting machinery ---*/ -/*--- blocksort.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. - - To get some idea how the block sorting algorithms in this file - work, read my paper - On the Performance of BWT Sorting Algorithms - in Proceedings of the IEEE Data Compression Conference 2000, - Snowbird, Utah, USA, 27-30 March 2000. The main sort in this - file implements the algorithm called cache in the paper. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "bzlib_private.h" - -/*---------------------------------------------*/ -/*--- Fallback O(N log(N)^2) sorting ---*/ -/*--- algorithm, for repetitive blocks ---*/ -/*---------------------------------------------*/ - -/*---------------------------------------------*/ -static -__inline__ -void fallbackSimpleSort ( UInt32* fmap, - UInt32* eclass, - Int32 lo, - Int32 hi ) -{ - Int32 i, j, tmp; - UInt32 ec_tmp; - - if (lo == hi) return; - - if (hi - lo > 3) { - for ( i = hi-4; i >= lo; i-- ) { - tmp = fmap[i]; - ec_tmp = eclass[tmp]; - for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 ) - fmap[j-4] = fmap[j]; - fmap[j-4] = tmp; - } - } - - for ( i = hi-1; i >= lo; i-- ) { - tmp = fmap[i]; - ec_tmp = eclass[tmp]; - for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ ) - fmap[j-1] = fmap[j]; - fmap[j-1] = tmp; - } -} - - -/*---------------------------------------------*/ -#define fswap(zz1, zz2) \ - { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } - -#define fvswap(zzp1, zzp2, zzn) \ -{ \ - Int32 yyp1 = (zzp1); \ - Int32 yyp2 = (zzp2); \ - Int32 yyn = (zzn); \ - while (yyn > 0) { \ - fswap(fmap[yyp1], fmap[yyp2]); \ - yyp1++; yyp2++; yyn--; \ - } \ -} - - -#define fmin(a,b) ((a) < (b)) ? (a) : (b) - -#define fpush(lz,hz) { stackLo[sp] = lz; \ - stackHi[sp] = hz; \ - sp++; } - -#define fpop(lz,hz) { sp--; \ - lz = stackLo[sp]; \ - hz = stackHi[sp]; } - -#define FALLBACK_QSORT_SMALL_THRESH 10 -#define FALLBACK_QSORT_STACK_SIZE 100 - - -static -void fallbackQSort3 ( UInt32* fmap, - UInt32* eclass, - Int32 loSt, - Int32 hiSt ) -{ - Int32 unLo, unHi, ltLo, gtHi, n, m; - Int32 sp, lo, hi; - UInt32 med, r, r3; - Int32 stackLo[FALLBACK_QSORT_STACK_SIZE]; - Int32 stackHi[FALLBACK_QSORT_STACK_SIZE]; - - r = 0; - - sp = 0; - fpush ( loSt, hiSt ); - - while (sp > 0) { - - AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 ); - - fpop ( lo, hi ); - if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) { - fallbackSimpleSort ( fmap, eclass, lo, hi ); - continue; - } - - /* Random partitioning. Median of 3 sometimes fails to - avoid bad cases. Median of 9 seems to help but - looks rather expensive. This too seems to work but - is cheaper. Guidance for the magic constants - 7621 and 32768 is taken from Sedgewick's algorithms - book, chapter 35. - */ - r = ((r * 7621) + 1) % 32768; - r3 = r % 3; - if (r3 == 0) med = eclass[fmap[lo]]; else - if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else - med = eclass[fmap[hi]]; - - unLo = ltLo = lo; - unHi = gtHi = hi; - - while (1) { - while (1) { - if (unLo > unHi) break; - n = (Int32)eclass[fmap[unLo]] - (Int32)med; - if (n == 0) { - fswap(fmap[unLo], fmap[ltLo]); - ltLo++; unLo++; - continue; - }; - if (n > 0) break; - unLo++; - } - while (1) { - if (unLo > unHi) break; - n = (Int32)eclass[fmap[unHi]] - (Int32)med; - if (n == 0) { - fswap(fmap[unHi], fmap[gtHi]); - gtHi--; unHi--; - continue; - }; - if (n < 0) break; - unHi--; - } - if (unLo > unHi) break; - fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--; - } - - AssertD ( unHi == unLo-1, "fallbackQSort3(2)" ); - - if (gtHi < ltLo) continue; - - n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n); - m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m); - - n = lo + unLo - ltLo - 1; - m = hi - (gtHi - unHi) + 1; - - if (n - lo > hi - m) { - fpush ( lo, n ); - fpush ( m, hi ); - } else { - fpush ( m, hi ); - fpush ( lo, n ); - } - } -} - -#undef fmin -#undef fpush -#undef fpop -#undef fswap -#undef fvswap -#undef FALLBACK_QSORT_SMALL_THRESH -#undef FALLBACK_QSORT_STACK_SIZE - - -/*---------------------------------------------*/ -/* Pre: - nblock > 0 - eclass exists for [0 .. nblock-1] - ((UChar*)eclass) [0 .. nblock-1] holds block - ptr exists for [0 .. nblock-1] - - Post: - ((UChar*)eclass) [0 .. nblock-1] holds block - All other areas of eclass destroyed - fmap [0 .. nblock-1] holds sorted order - bhtab [ 0 .. 2+(nblock/32) ] destroyed -*/ - -#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) -#define WORD_BH(zz) bhtab[(zz) >> 5] -#define UNALIGNED_BH(zz) ((zz) & 0x01f) - -static -void fallbackSort ( UInt32* fmap, - UInt32* eclass, - UInt32* bhtab, - Int32 nblock, - Int32 verb ) -{ - Int32 ftab[257]; - Int32 ftabCopy[256]; - Int32 H, i, j, k, l, r, cc, cc1; - Int32 nNotDone; - Int32 nBhtab; - UChar* eclass8 = (UChar*)eclass; - - /*-- - Initial 1-char radix sort to generate - initial fmap and initial BH bits. - --*/ - if (verb >= 4) - VPrintf0 ( " bucket sorting ...\n" ); - for (i = 0; i < 257; i++) ftab[i] = 0; - for (i = 0; i < nblock; i++) ftab[eclass8[i]]++; - for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i]; - for (i = 1; i < 257; i++) ftab[i] += ftab[i-1]; - - for (i = 0; i < nblock; i++) { - j = eclass8[i]; - k = ftab[j] - 1; - ftab[j] = k; - fmap[k] = i; - } - - nBhtab = 2 + (nblock / 32); - for (i = 0; i < nBhtab; i++) bhtab[i] = 0; - for (i = 0; i < 256; i++) SET_BH(ftab[i]); - - /*-- - Inductively refine the buckets. Kind-of an - "exponential radix sort" (!), inspired by the - Manber-Myers suffix array construction algorithm. - --*/ - - /*-- set sentinel bits for block-end detection --*/ - for (i = 0; i < 32; i++) { - SET_BH(nblock + 2*i); - CLEAR_BH(nblock + 2*i + 1); - } - - /*-- the log(N) loop --*/ - H = 1; - while (1) { - - if (verb >= 4) - VPrintf1 ( " depth %6d has ", H ); - - j = 0; - for (i = 0; i < nblock; i++) { - if (ISSET_BH(i)) j = i; - k = fmap[i] - H; if (k < 0) k += nblock; - eclass[k] = j; - } - - nNotDone = 0; - r = -1; - while (1) { - - /*-- find the next non-singleton bucket --*/ - k = r + 1; - while (ISSET_BH(k) && UNALIGNED_BH(k)) k++; - if (ISSET_BH(k)) { - while (WORD_BH(k) == 0xffffffff) k += 32; - while (ISSET_BH(k)) k++; - } - l = k - 1; - if (l >= nblock) break; - while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++; - if (!ISSET_BH(k)) { - while (WORD_BH(k) == 0x00000000) k += 32; - while (!ISSET_BH(k)) k++; - } - r = k - 1; - if (r >= nblock) break; - - /*-- now [l, r] bracket current bucket --*/ - if (r > l) { - nNotDone += (r - l + 1); - fallbackQSort3 ( fmap, eclass, l, r ); - - /*-- scan bucket and generate header bits-- */ - cc = -1; - for (i = l; i <= r; i++) { - cc1 = eclass[fmap[i]]; - if (cc != cc1) { SET_BH(i); cc = cc1; }; - } - } - } - - if (verb >= 4) - VPrintf1 ( "%6d unresolved strings\n", nNotDone ); - - H *= 2; - if (H > nblock || nNotDone == 0) break; - } - - /*-- - Reconstruct the original block in - eclass8 [0 .. nblock-1], since the - previous phase destroyed it. - --*/ - if (verb >= 4) - VPrintf0 ( " reconstructing block ...\n" ); - j = 0; - for (i = 0; i < nblock; i++) { - while (ftabCopy[j] == 0) j++; - ftabCopy[j]--; - eclass8[fmap[i]] = (UChar)j; - } - AssertH ( j < 256, 1005 ); -} - -#undef SET_BH -#undef CLEAR_BH -#undef ISSET_BH -#undef WORD_BH -#undef UNALIGNED_BH - - -/*---------------------------------------------*/ -/*--- The main, O(N^2 log(N)) sorting ---*/ -/*--- algorithm. Faster for "normal" ---*/ -/*--- non-repetitive blocks. ---*/ -/*---------------------------------------------*/ - -/*---------------------------------------------*/ -static -__inline__ -Bool mainGtU ( UInt32 i1, - UInt32 i2, - UChar* block, - UInt16* quadrant, - UInt32 nblock, - Int32* budget ) -{ - Int32 k; - UChar c1, c2; - UInt16 s1, s2; - - AssertD ( i1 != i2, "mainGtU" ); - /* 1 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 2 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 3 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 4 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 5 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 6 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 7 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 8 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 9 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 10 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 11 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - /* 12 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - i1++; i2++; - - k = nblock + 8; - - do { - /* 1 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 2 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 3 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 4 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 5 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 6 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 7 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - /* 8 */ - c1 = block[i1]; c2 = block[i2]; - if (c1 != c2) return (c1 > c2); - s1 = quadrant[i1]; s2 = quadrant[i2]; - if (s1 != s2) return (s1 > s2); - i1++; i2++; - - if (i1 >= nblock) i1 -= nblock; - if (i2 >= nblock) i2 -= nblock; - - k -= 8; - (*budget)--; - } - while (k >= 0); - - return False; -} - - -/*---------------------------------------------*/ -/*-- - Knuth's increments seem to work better - than Incerpi-Sedgewick here. Possibly - because the number of elems to sort is - usually small, typically <= 20. ---*/ -static -Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280, - 9841, 29524, 88573, 265720, - 797161, 2391484 }; - -static -void mainSimpleSort ( UInt32* ptr, - UChar* block, - UInt16* quadrant, - Int32 nblock, - Int32 lo, - Int32 hi, - Int32 d, - Int32* budget ) -{ - Int32 i, j, h, bigN, hp; - UInt32 v; - - bigN = hi - lo + 1; - if (bigN < 2) return; - - hp = 0; - while (incs[hp] < bigN) hp++; - hp--; - - for (; hp >= 0; hp--) { - h = incs[hp]; - - i = lo + h; - while (True) { - - /*-- copy 1 --*/ - if (i > hi) break; - v = ptr[i]; - j = i; - while ( mainGtU ( - ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { - ptr[j] = ptr[j-h]; - j = j - h; - if (j <= (lo + h - 1)) break; - } - ptr[j] = v; - i++; - - /*-- copy 2 --*/ - if (i > hi) break; - v = ptr[i]; - j = i; - while ( mainGtU ( - ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { - ptr[j] = ptr[j-h]; - j = j - h; - if (j <= (lo + h - 1)) break; - } - ptr[j] = v; - i++; - - /*-- copy 3 --*/ - if (i > hi) break; - v = ptr[i]; - j = i; - while ( mainGtU ( - ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { - ptr[j] = ptr[j-h]; - j = j - h; - if (j <= (lo + h - 1)) break; - } - ptr[j] = v; - i++; - - if (*budget < 0) return; - } - } -} - - -/*---------------------------------------------*/ -/*-- - The following is an implementation of - an elegant 3-way quicksort for strings, - described in a paper "Fast Algorithms for - Sorting and Searching Strings", by Robert - Sedgewick and Jon L. Bentley. ---*/ - -#define mswap(zz1, zz2) \ - { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } - -#define mvswap(zzp1, zzp2, zzn) \ -{ \ - Int32 yyp1 = (zzp1); \ - Int32 yyp2 = (zzp2); \ - Int32 yyn = (zzn); \ - while (yyn > 0) { \ - mswap(ptr[yyp1], ptr[yyp2]); \ - yyp1++; yyp2++; yyn--; \ - } \ -} - -static -__inline__ -UChar mmed3 ( UChar a, UChar b, UChar c ) -{ - UChar t; - if (a > b) { t = a; a = b; b = t; }; - if (b > c) { - b = c; - if (a > b) b = a; - } - return b; -} - -#define mmin(a,b) ((a) < (b)) ? (a) : (b) - -#define mpush(lz,hz,dz) { stackLo[sp] = lz; \ - stackHi[sp] = hz; \ - stackD [sp] = dz; \ - sp++; } - -#define mpop(lz,hz,dz) { sp--; \ - lz = stackLo[sp]; \ - hz = stackHi[sp]; \ - dz = stackD [sp]; } - - -#define mnextsize(az) (nextHi[az]-nextLo[az]) - -#define mnextswap(az,bz) \ - { Int32 tz; \ - tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \ - tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \ - tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; } - - -#define MAIN_QSORT_SMALL_THRESH 20 -#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT) -#define MAIN_QSORT_STACK_SIZE 100 - -static -void mainQSort3 ( UInt32* ptr, - UChar* block, - UInt16* quadrant, - Int32 nblock, - Int32 loSt, - Int32 hiSt, - Int32 dSt, - Int32* budget ) -{ - Int32 unLo, unHi, ltLo, gtHi, n, m, med; - Int32 sp, lo, hi, d; - - Int32 stackLo[MAIN_QSORT_STACK_SIZE]; - Int32 stackHi[MAIN_QSORT_STACK_SIZE]; - Int32 stackD [MAIN_QSORT_STACK_SIZE]; - - Int32 nextLo[3]; - Int32 nextHi[3]; - Int32 nextD [3]; - - sp = 0; - mpush ( loSt, hiSt, dSt ); - - while (sp > 0) { - - AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 ); - - mpop ( lo, hi, d ); - if (hi - lo < MAIN_QSORT_SMALL_THRESH || - d > MAIN_QSORT_DEPTH_THRESH) { - mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget ); - if (*budget < 0) return; - continue; - } - - med = (Int32) - mmed3 ( block[ptr[ lo ]+d], - block[ptr[ hi ]+d], - block[ptr[ (lo+hi)>>1 ]+d] ); - - unLo = ltLo = lo; - unHi = gtHi = hi; - - while (True) { - while (True) { - if (unLo > unHi) break; - n = ((Int32)block[ptr[unLo]+d]) - med; - if (n == 0) { - mswap(ptr[unLo], ptr[ltLo]); - ltLo++; unLo++; continue; - }; - if (n > 0) break; - unLo++; - } - while (True) { - if (unLo > unHi) break; - n = ((Int32)block[ptr[unHi]+d]) - med; - if (n == 0) { - mswap(ptr[unHi], ptr[gtHi]); - gtHi--; unHi--; continue; - }; - if (n < 0) break; - unHi--; - } - if (unLo > unHi) break; - mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--; - } - - AssertD ( unHi == unLo-1, "mainQSort3(2)" ); - - if (gtHi < ltLo) { - mpush(lo, hi, d+1 ); - continue; - } - - n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n); - m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m); - - n = lo + unLo - ltLo - 1; - m = hi - (gtHi - unHi) + 1; - - nextLo[0] = lo; nextHi[0] = n; nextD[0] = d; - nextLo[1] = m; nextHi[1] = hi; nextD[1] = d; - nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1; - - if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); - if (mnextsize(1) < mnextsize(2)) mnextswap(1,2); - if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); - - AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" ); - AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" ); - - mpush (nextLo[0], nextHi[0], nextD[0]); - mpush (nextLo[1], nextHi[1], nextD[1]); - mpush (nextLo[2], nextHi[2], nextD[2]); - } -} - -#undef mswap -#undef mvswap -#undef mpush -#undef mpop -#undef mmin -#undef mnextsize -#undef mnextswap -#undef MAIN_QSORT_SMALL_THRESH -#undef MAIN_QSORT_DEPTH_THRESH -#undef MAIN_QSORT_STACK_SIZE - - -/*---------------------------------------------*/ -/* Pre: - nblock > N_OVERSHOOT - block32 exists for [0 .. nblock-1 +N_OVERSHOOT] - ((UChar*)block32) [0 .. nblock-1] holds block - ptr exists for [0 .. nblock-1] - - Post: - ((UChar*)block32) [0 .. nblock-1] holds block - All other areas of block32 destroyed - ftab [0 .. 65536 ] destroyed - ptr [0 .. nblock-1] holds sorted order - if (*budget < 0), sorting was abandoned -*/ - -#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8]) -#define SETMASK (1 << 21) -#define CLEARMASK (~(SETMASK)) - -static -void mainSort ( UInt32* ptr, - UChar* block, - UInt16* quadrant, - UInt32* ftab, - Int32 nblock, - Int32 verb, - Int32* budget ) -{ - Int32 i, j, k, ss, sb; - Int32 runningOrder[256]; - Bool bigDone[256]; - Int32 copyStart[256]; - Int32 copyEnd [256]; - UChar c1; - Int32 numQSorted; - UInt16 s; - if (verb >= 4) VPrintf0 ( " main sort initialise ...\n" ); - - /*-- set up the 2-byte frequency table --*/ - for (i = 65536; i >= 0; i--) ftab[i] = 0; - - j = block[0] << 8; - i = nblock-1; - for (; i >= 3; i -= 4) { - quadrant[i] = 0; - j = (j >> 8) | ( ((UInt16)block[i]) << 8); - ftab[j]++; - quadrant[i-1] = 0; - j = (j >> 8) | ( ((UInt16)block[i-1]) << 8); - ftab[j]++; - quadrant[i-2] = 0; - j = (j >> 8) | ( ((UInt16)block[i-2]) << 8); - ftab[j]++; - quadrant[i-3] = 0; - j = (j >> 8) | ( ((UInt16)block[i-3]) << 8); - ftab[j]++; - } - for (; i >= 0; i--) { - quadrant[i] = 0; - j = (j >> 8) | ( ((UInt16)block[i]) << 8); - ftab[j]++; - } - - /*-- (emphasises close relationship of block & quadrant) --*/ - for (i = 0; i < BZ_N_OVERSHOOT; i++) { - block [nblock+i] = block[i]; - quadrant[nblock+i] = 0; - } - - if (verb >= 4) VPrintf0 ( " bucket sorting ...\n" ); - - /*-- Complete the initial radix sort --*/ - for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1]; - - s = block[0] << 8; - i = nblock-1; - for (; i >= 3; i -= 4) { - s = (s >> 8) | (block[i] << 8); - j = ftab[s] -1; - ftab[s] = j; - ptr[j] = i; - s = (s >> 8) | (block[i-1] << 8); - j = ftab[s] -1; - ftab[s] = j; - ptr[j] = i-1; - s = (s >> 8) | (block[i-2] << 8); - j = ftab[s] -1; - ftab[s] = j; - ptr[j] = i-2; - s = (s >> 8) | (block[i-3] << 8); - j = ftab[s] -1; - ftab[s] = j; - ptr[j] = i-3; - } - for (; i >= 0; i--) { - s = (s >> 8) | (block[i] << 8); - j = ftab[s] -1; - ftab[s] = j; - ptr[j] = i; - } - - /*-- - Now ftab contains the first loc of every small bucket. - Calculate the running order, from smallest to largest - big bucket. - --*/ - for (i = 0; i <= 255; i++) { - bigDone [i] = False; - runningOrder[i] = i; - } - - { - Int32 vv; - Int32 h = 1; - do h = 3 * h + 1; while (h <= 256); - do { - h = h / 3; - for (i = h; i <= 255; i++) { - vv = runningOrder[i]; - j = i; - while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) { - runningOrder[j] = runningOrder[j-h]; - j = j - h; - if (j <= (h - 1)) goto zero; - } - zero: - runningOrder[j] = vv; - } - } while (h != 1); - } - - /*-- - The main sorting loop. - --*/ - - numQSorted = 0; - - for (i = 0; i <= 255; i++) { - - /*-- - Process big buckets, starting with the least full. - Basically this is a 3-step process in which we call - mainQSort3 to sort the small buckets [ss, j], but - also make a big effort to avoid the calls if we can. - --*/ - ss = runningOrder[i]; - - /*-- - Step 1: - Complete the big bucket [ss] by quicksorting - any unsorted small buckets [ss, j], for j != ss. - Hopefully previous pointer-scanning phases have already - completed many of the small buckets [ss, j], so - we don't have to sort them at all. - --*/ - for (j = 0; j <= 255; j++) { - if (j != ss) { - sb = (ss << 8) + j; - if ( ! (ftab[sb] & SETMASK) ) { - Int32 lo = ftab[sb] & CLEARMASK; - Int32 hi = (ftab[sb+1] & CLEARMASK) - 1; - if (hi > lo) { - if (verb >= 4) - VPrintf4 ( " qsort [0x%x, 0x%x] " - "done %d this %d\n", - ss, j, numQSorted, hi - lo + 1 ); - mainQSort3 ( - ptr, block, quadrant, nblock, - lo, hi, BZ_N_RADIX, budget - ); - numQSorted += (hi - lo + 1); - if (*budget < 0) return; - } - } - ftab[sb] |= SETMASK; - } - } - - AssertH ( !bigDone[ss], 1006 ); - - /*-- - Step 2: - Now scan this big bucket [ss] so as to synthesise the - sorted order for small buckets [t, ss] for all t, - including, magically, the bucket [ss,ss] too. - This will avoid doing Real Work in subsequent Step 1's. - --*/ - { - for (j = 0; j <= 255; j++) { - copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK; - copyEnd [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1; - } - for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) { - k = ptr[j]-1; if (k < 0) k += nblock; - c1 = block[k]; - if (!bigDone[c1]) - ptr[ copyStart[c1]++ ] = k; - } - for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) { - k = ptr[j]-1; if (k < 0) k += nblock; - c1 = block[k]; - if (!bigDone[c1]) - ptr[ copyEnd[c1]-- ] = k; - } - } - - AssertH ( copyStart[ss]-1 == copyEnd[ss], 1007 ); - - for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK; - - /*-- - Step 3: - The [ss] big bucket is now done. Record this fact, - and update the quadrant descriptors. Remember to - update quadrants in the overshoot area too, if - necessary. The "if (i < 255)" test merely skips - this updating for the last bucket processed, since - updating for the last bucket is pointless. - - The quadrant array provides a way to incrementally - cache sort orderings, as they appear, so as to - make subsequent comparisons in fullGtU() complete - faster. For repetitive blocks this makes a big - difference (but not big enough to be able to avoid - the fallback sorting mechanism, exponential radix sort). - - The precise meaning is: at all times: - - for 0 <= i < nblock and 0 <= j <= nblock - - if block[i] != block[j], - - then the relative values of quadrant[i] and - quadrant[j] are meaningless. - - else { - if quadrant[i] < quadrant[j] - then the string starting at i lexicographically - precedes the string starting at j - - else if quadrant[i] > quadrant[j] - then the string starting at j lexicographically - precedes the string starting at i - - else - the relative ordering of the strings starting - at i and j has not yet been determined. - } - --*/ - bigDone[ss] = True; - - if (i < 255) { - Int32 bbStart = ftab[ss << 8] & CLEARMASK; - Int32 bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart; - Int32 shifts = 0; - - while ((bbSize >> shifts) > 65534) shifts++; - - for (j = bbSize-1; j >= 0; j--) { - Int32 a2update = ptr[bbStart + j]; - UInt16 qVal = (UInt16)(j >> shifts); - quadrant[a2update] = qVal; - if (a2update < BZ_N_OVERSHOOT) - quadrant[a2update + nblock] = qVal; - } - AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 ); - } - - } - - if (verb >= 4) - VPrintf3 ( " %d pointers, %d sorted, %d scanned\n", - nblock, numQSorted, nblock - numQSorted ); -} - -#undef BIGFREQ -#undef SETMASK -#undef CLEARMASK - - -/*---------------------------------------------*/ -/* Pre: - nblock > 0 - arr2 exists for [0 .. nblock-1 +N_OVERSHOOT] - ((UChar*)arr2) [0 .. nblock-1] holds block - arr1 exists for [0 .. nblock-1] - - Post: - ((UChar*)arr2) [0 .. nblock-1] holds block - All other areas of block destroyed - ftab [ 0 .. 65536 ] destroyed - arr1 [0 .. nblock-1] holds sorted order -*/ -void BZ2_blockSort ( EState* s ) -{ - UInt32* ptr = s->ptr; - UChar* block = s->block; - UInt32* ftab = s->ftab; - Int32 nblock = s->nblock; - Int32 verb = s->verbosity; - Int32 wfact = s->workFactor; - UInt16* quadrant; - Int32 budget; - Int32 budgetInit; - Int32 i; - - if (nblock < 10000) { - fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb ); - } else { - /* Calculate the location for quadrant, remembering to get - the alignment right. Assumes that &(block[0]) is at least - 2-byte aligned -- this should be ok since block is really - the first section of arr2. - */ - i = nblock+BZ_N_OVERSHOOT; - if (i & 1) i++; - quadrant = (UInt16*)(&(block[i])); - - /* (wfact-1) / 3 puts the default-factor-30 - transition point at very roughly the same place as - with v0.1 and v0.9.0. - Not that it particularly matters any more, since the - resulting compressed stream is now the same regardless - of whether or not we use the main sort or fallback sort. - */ - if (wfact < 1 ) wfact = 1; - if (wfact > 100) wfact = 100; - budgetInit = nblock * ((wfact-1) / 3); - budget = budgetInit; - - mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget ); - if (verb >= 3) - VPrintf3 ( " %d work, %d block, ratio %5.2f\n", - budgetInit - budget, - nblock, - (float)(budgetInit - budget) / - (float)(nblock==0 ? 1 : nblock) ); - if (budget < 0) { - if (verb >= 2) - VPrintf0 ( " too repetitive; using fallback" - " sorting algorithm\n" ); - fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb ); - } - } - - s->origPtr = -1; - for (i = 0; i < s->nblock; i++) - if (ptr[i] == 0) - { s->origPtr = i; break; }; - - AssertH( s->origPtr != -1, 1003 ); -} - - -/*-------------------------------------------------------------*/ -/*--- end blocksort.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/bzlib.c b/mdk-stage1/bzlib/bzlib.c deleted file mode 100644 index b1fc85236..000000000 --- a/mdk-stage1/bzlib/bzlib.c +++ /dev/null @@ -1,1567 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Library top-level functions. ---*/ -/*--- bzlib.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -/*-- - CHANGES - ~~~~~~~ - 0.9.0 -- original version. - - 0.9.0a/b -- no changes in this file. - - 0.9.0c - * made zero-length BZ_FLUSH work correctly in bzCompress(). - * fixed bzWrite/bzRead to ignore zero-length requests. - * fixed bzread to correctly handle read requests after EOF. - * wrong parameter order in call to bzDecompressInit in - bzBuffToBuffDecompress. Fixed. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - - -#include "bzlib_private.h" - - -/*---------------------------------------------------*/ -/*--- Compression stuff ---*/ -/*---------------------------------------------------*/ - - -/*---------------------------------------------------*/ -#ifndef BZ_NO_STDIO -void BZ2_bz__AssertH__fail ( int errcode ) -{ - fprintf(stderr, - "\n\nbzip2/libbzip2: internal error number %d.\n" - "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@acm.org. If this happened\n" - "when you were using some program which uses libbzip2 as a\n" - "component, you should also report this bug to the author(s)\n" - "of that program. Please make an effort to report this bug;\n" - "timely and accurate bug reports eventually lead to higher\n" - "quality software. Thanks. Julian Seward, 21 March 2000.\n\n", - errcode, - BZ2_bzlibVersion() - ); - exit(3); -} -#endif - - -/*---------------------------------------------------*/ -static -int bz_config_ok ( void ) -{ - if (sizeof(int) != 4) return 0; - if (sizeof(short) != 2) return 0; - if (sizeof(char) != 1) return 0; - return 1; -} - - -/*---------------------------------------------------*/ -static -void* default_bzalloc ( void* opaque __attribute__ ((unused)), Int32 items, Int32 size ) -{ - void* v = malloc ( items * size ); - return v; -} - -static -void default_bzfree ( void* opaque __attribute__ ((unused)), void* addr ) -{ - if (addr != NULL) free ( addr ); -} - - -/*---------------------------------------------------*/ -static -void prepare_new_block ( EState* s ) -{ - Int32 i; - s->nblock = 0; - s->numZ = 0; - s->state_out_pos = 0; - BZ_INITIALISE_CRC ( s->blockCRC ); - for (i = 0; i < 256; i++) s->inUse[i] = False; - s->blockNo++; -} - - -/*---------------------------------------------------*/ -static -void init_RL ( EState* s ) -{ - s->state_in_ch = 256; - s->state_in_len = 0; -} - - -static -Bool isempty_RL ( EState* s ) -{ - if (s->state_in_ch < 256 && s->state_in_len > 0) - return False; else - return True; -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzCompressInit) - ( bz_stream* strm, - int blockSize100k, - int verbosity, - int workFactor ) -{ - Int32 n; - EState* s; - - if (!bz_config_ok()) return BZ_CONFIG_ERROR; - - if (strm == NULL || - blockSize100k < 1 || blockSize100k > 9 || - workFactor < 0 || workFactor > 250) - return BZ_PARAM_ERROR; - - if (workFactor == 0) workFactor = 30; - if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; - if (strm->bzfree == NULL) strm->bzfree = default_bzfree; - - s = BZALLOC( sizeof(EState) ); - if (s == NULL) return BZ_MEM_ERROR; - s->strm = strm; - - s->arr1 = NULL; - s->arr2 = NULL; - s->ftab = NULL; - - n = 100000 * blockSize100k; - s->arr1 = BZALLOC( n * sizeof(UInt32) ); - s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) ); - s->ftab = BZALLOC( 65537 * sizeof(UInt32) ); - - if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) { - if (s->arr1 != NULL) BZFREE(s->arr1); - if (s->arr2 != NULL) BZFREE(s->arr2); - if (s->ftab != NULL) BZFREE(s->ftab); - if (s != NULL) BZFREE(s); - return BZ_MEM_ERROR; - } - - s->blockNo = 0; - s->state = BZ_S_INPUT; - s->mode = BZ_M_RUNNING; - s->combinedCRC = 0; - s->blockSize100k = blockSize100k; - s->nblockMAX = 100000 * blockSize100k - 19; - s->verbosity = verbosity; - s->workFactor = workFactor; - - s->block = (UChar*)s->arr2; - s->mtfv = (UInt16*)s->arr1; - s->zbits = NULL; - s->ptr = (UInt32*)s->arr1; - - strm->state = s; - strm->total_in_lo32 = 0; - strm->total_in_hi32 = 0; - strm->total_out_lo32 = 0; - strm->total_out_hi32 = 0; - init_RL ( s ); - prepare_new_block ( s ); - return BZ_OK; -} - - -/*---------------------------------------------------*/ -static -void add_pair_to_block ( EState* s ) -{ - Int32 i; - UChar ch = (UChar)(s->state_in_ch); - for (i = 0; i < s->state_in_len; i++) { - BZ_UPDATE_CRC( s->blockCRC, ch ); - } - s->inUse[s->state_in_ch] = True; - switch (s->state_in_len) { - case 1: - s->block[s->nblock] = (UChar)ch; s->nblock++; - break; - case 2: - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - break; - case 3: - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - break; - default: - s->inUse[s->state_in_len-4] = True; - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = (UChar)ch; s->nblock++; - s->block[s->nblock] = ((UChar)(s->state_in_len-4)); - s->nblock++; - break; - } -} - - -/*---------------------------------------------------*/ -static -void flush_RL ( EState* s ) -{ - if (s->state_in_ch < 256) add_pair_to_block ( s ); - init_RL ( s ); -} - - -/*---------------------------------------------------*/ -#define ADD_CHAR_TO_BLOCK(zs,zchh0) \ -{ \ - UInt32 zchh = (UInt32)(zchh0); \ - /*-- fast track the common case --*/ \ - if (zchh != zs->state_in_ch && \ - zs->state_in_len == 1) { \ - UChar ch = (UChar)(zs->state_in_ch); \ - BZ_UPDATE_CRC( zs->blockCRC, ch ); \ - zs->inUse[zs->state_in_ch] = True; \ - zs->block[zs->nblock] = (UChar)ch; \ - zs->nblock++; \ - zs->state_in_ch = zchh; \ - } \ - else \ - /*-- general, uncommon cases --*/ \ - if (zchh != zs->state_in_ch || \ - zs->state_in_len == 255) { \ - if (zs->state_in_ch < 256) \ - add_pair_to_block ( zs ); \ - zs->state_in_ch = zchh; \ - zs->state_in_len = 1; \ - } else { \ - zs->state_in_len++; \ - } \ -} - - -/*---------------------------------------------------*/ -static -Bool copy_input_until_stop ( EState* s ) -{ - Bool progress_in = False; - - if (s->mode == BZ_M_RUNNING) { - - /*-- fast track the common case --*/ - while (True) { - /*-- block full? --*/ - if (s->nblock >= s->nblockMAX) break; - /*-- no input? --*/ - if (s->strm->avail_in == 0) break; - progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); - s->strm->next_in++; - s->strm->avail_in--; - s->strm->total_in_lo32++; - if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; - } - - } else { - - /*-- general, uncommon case --*/ - while (True) { - /*-- block full? --*/ - if (s->nblock >= s->nblockMAX) break; - /*-- no input? --*/ - if (s->strm->avail_in == 0) break; - /*-- flush/finish end? --*/ - if (s->avail_in_expect == 0) break; - progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); - s->strm->next_in++; - s->strm->avail_in--; - s->strm->total_in_lo32++; - if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; - s->avail_in_expect--; - } - } - return progress_in; -} - - -/*---------------------------------------------------*/ -static -Bool copy_output_until_stop ( EState* s ) -{ - Bool progress_out = False; - - while (True) { - - /*-- no output space? --*/ - if (s->strm->avail_out == 0) break; - - /*-- block done? --*/ - if (s->state_out_pos >= s->numZ) break; - - progress_out = True; - *(s->strm->next_out) = s->zbits[s->state_out_pos]; - s->state_out_pos++; - s->strm->avail_out--; - s->strm->next_out++; - s->strm->total_out_lo32++; - if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; - } - - return progress_out; -} - - -/*---------------------------------------------------*/ -static -Bool handle_compress ( bz_stream* strm ) -{ - Bool progress_in = False; - Bool progress_out = False; - EState* s = strm->state; - - while (True) { - - if (s->state == BZ_S_OUTPUT) { - progress_out |= copy_output_until_stop ( s ); - if (s->state_out_pos < s->numZ) break; - if (s->mode == BZ_M_FINISHING && - s->avail_in_expect == 0 && - isempty_RL(s)) break; - prepare_new_block ( s ); - s->state = BZ_S_INPUT; - if (s->mode == BZ_M_FLUSHING && - s->avail_in_expect == 0 && - isempty_RL(s)) break; - } - - if (s->state == BZ_S_INPUT) { - progress_in |= copy_input_until_stop ( s ); - if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) { - flush_RL ( s ); - BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) ); - s->state = BZ_S_OUTPUT; - } - else - if (s->nblock >= s->nblockMAX) { - BZ2_compressBlock ( s, False ); - s->state = BZ_S_OUTPUT; - } - else - if (s->strm->avail_in == 0) { - break; - } - } - - } - - return progress_in || progress_out; -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) -{ - Bool progress; - EState* s; - if (strm == NULL) return BZ_PARAM_ERROR; - s = strm->state; - if (s == NULL) return BZ_PARAM_ERROR; - if (s->strm != strm) return BZ_PARAM_ERROR; - - preswitch: - switch (s->mode) { - - case BZ_M_IDLE: - return BZ_SEQUENCE_ERROR; - - case BZ_M_RUNNING: - if (action == BZ_RUN) { - progress = handle_compress ( strm ); - return progress ? BZ_RUN_OK : BZ_PARAM_ERROR; - } - else - if (action == BZ_FLUSH) { - s->avail_in_expect = strm->avail_in; - s->mode = BZ_M_FLUSHING; - goto preswitch; - } - else - if (action == BZ_FINISH) { - s->avail_in_expect = strm->avail_in; - s->mode = BZ_M_FINISHING; - goto preswitch; - } - else - return BZ_PARAM_ERROR; - - case BZ_M_FLUSHING: - if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR; - if (s->avail_in_expect != s->strm->avail_in) - return BZ_SEQUENCE_ERROR; - progress = handle_compress ( strm ); - if (s->avail_in_expect > 0 || !isempty_RL(s) || - s->state_out_pos < s->numZ) return BZ_FLUSH_OK; - s->mode = BZ_M_RUNNING; - return BZ_RUN_OK; - - case BZ_M_FINISHING: - if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR; - if (s->avail_in_expect != s->strm->avail_in) - return BZ_SEQUENCE_ERROR; - progress = handle_compress ( strm ); - if (!progress) return BZ_SEQUENCE_ERROR; - if (s->avail_in_expect > 0 || !isempty_RL(s) || - s->state_out_pos < s->numZ) return BZ_FINISH_OK; - s->mode = BZ_M_IDLE; - return BZ_STREAM_END; - } - return BZ_OK; /*--not reached--*/ -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) -{ - EState* s; - if (strm == NULL) return BZ_PARAM_ERROR; - s = strm->state; - if (s == NULL) return BZ_PARAM_ERROR; - if (s->strm != strm) return BZ_PARAM_ERROR; - - if (s->arr1 != NULL) BZFREE(s->arr1); - if (s->arr2 != NULL) BZFREE(s->arr2); - if (s->ftab != NULL) BZFREE(s->ftab); - BZFREE(strm->state); - - strm->state = NULL; - - return BZ_OK; -} - - -/*---------------------------------------------------*/ -/*--- Decompression stuff ---*/ -/*---------------------------------------------------*/ - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzDecompressInit) - ( bz_stream* strm, - int verbosity, - int small ) -{ - DState* s; - - if (!bz_config_ok()) return BZ_CONFIG_ERROR; - - if (strm == NULL) return BZ_PARAM_ERROR; - if (small != 0 && small != 1) return BZ_PARAM_ERROR; - if (verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR; - - if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; - if (strm->bzfree == NULL) strm->bzfree = default_bzfree; - - s = BZALLOC( sizeof(DState) ); - if (s == NULL) return BZ_MEM_ERROR; - s->strm = strm; - strm->state = s; - s->state = BZ_X_MAGIC_1; - s->bsLive = 0; - s->bsBuff = 0; - s->calculatedCombinedCRC = 0; - strm->total_in_lo32 = 0; - strm->total_in_hi32 = 0; - strm->total_out_lo32 = 0; - strm->total_out_hi32 = 0; - s->smallDecompress = (Bool)small; - s->ll4 = NULL; - s->ll16 = NULL; - s->tt = NULL; - s->currBlockNo = 0; - s->verbosity = verbosity; - - return BZ_OK; -} - - -/*---------------------------------------------------*/ -static -void unRLE_obuf_to_output_FAST ( DState* s ) -{ - UChar k1; - - if (s->blockRandomised) { - - while (True) { - /* try to finish existing run */ - while (True) { - if (s->strm->avail_out == 0) return; - if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; - BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); - s->state_out_len--; - s->strm->next_out++; - s->strm->avail_out--; - s->strm->total_out_lo32++; - if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; - } - - /* can a new run be started? */ - if (s->nblock_used == s->save_nblock+1) return; - - - s->state_out_len = 1; - s->state_out_ch = s->k0; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 2; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 3; - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - s->state_out_len = ((Int32)k1) + 4; - BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; - s->k0 ^= BZ_RAND_MASK; s->nblock_used++; - } - - } else { - - /* restore */ - UInt32 c_calculatedBlockCRC = s->calculatedBlockCRC; - UChar c_state_out_ch = s->state_out_ch; - Int32 c_state_out_len = s->state_out_len; - Int32 c_nblock_used = s->nblock_used; - Int32 c_k0 = s->k0; - UInt32* c_tt = s->tt; - UInt32 c_tPos = s->tPos; - char* cs_next_out = s->strm->next_out; - unsigned int cs_avail_out = s->strm->avail_out; - /* end restore */ - - UInt32 avail_out_INIT = cs_avail_out; - Int32 s_save_nblockPP = s->save_nblock+1; - unsigned int total_out_lo32_old; - - while (True) { - - /* try to finish existing run */ - if (c_state_out_len > 0) { - while (True) { - if (cs_avail_out == 0) goto return_notr; - if (c_state_out_len == 1) break; - *( (UChar*)(cs_next_out) ) = c_state_out_ch; - BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); - c_state_out_len--; - cs_next_out++; - cs_avail_out--; - } - s_state_out_len_eq_one: - { - if (cs_avail_out == 0) { - c_state_out_len = 1; goto return_notr; - }; - *( (UChar*)(cs_next_out) ) = c_state_out_ch; - BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); - cs_next_out++; - cs_avail_out--; - } - } - /* can a new run be started? */ - if (c_nblock_used == s_save_nblockPP) { - c_state_out_len = 0; goto return_notr; - }; - c_state_out_ch = c_k0; - BZ_GET_FAST_C(k1); c_nblock_used++; - if (k1 != c_k0) { - c_k0 = k1; goto s_state_out_len_eq_one; - }; - if (c_nblock_used == s_save_nblockPP) - goto s_state_out_len_eq_one; - - c_state_out_len = 2; - BZ_GET_FAST_C(k1); c_nblock_used++; - if (c_nblock_used == s_save_nblockPP) continue; - if (k1 != c_k0) { c_k0 = k1; continue; }; - - c_state_out_len = 3; - BZ_GET_FAST_C(k1); c_nblock_used++; - if (c_nblock_used == s_save_nblockPP) continue; - if (k1 != c_k0) { c_k0 = k1; continue; }; - - BZ_GET_FAST_C(k1); c_nblock_used++; - c_state_out_len = ((Int32)k1) + 4; - BZ_GET_FAST_C(c_k0); c_nblock_used++; - } - - return_notr: - total_out_lo32_old = s->strm->total_out_lo32; - s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); - if (s->strm->total_out_lo32 < total_out_lo32_old) - s->strm->total_out_hi32++; - - /* save */ - s->calculatedBlockCRC = c_calculatedBlockCRC; - s->state_out_ch = c_state_out_ch; - s->state_out_len = c_state_out_len; - s->nblock_used = c_nblock_used; - s->k0 = c_k0; - s->tt = c_tt; - s->tPos = c_tPos; - s->strm->next_out = cs_next_out; - s->strm->avail_out = cs_avail_out; - /* end save */ - } -} - - - -/*---------------------------------------------------*/ -__inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab ) -{ - Int32 nb, na, mid; - nb = 0; - na = 256; - do { - mid = (nb + na) >> 1; - if (indx >= cftab[mid]) nb = mid; else na = mid; - } - while (na - nb != 1); - return nb; -} - - -/*---------------------------------------------------*/ -static -void unRLE_obuf_to_output_SMALL ( DState* s ) -{ - UChar k1; - - if (s->blockRandomised) { - - while (True) { - /* try to finish existing run */ - while (True) { - if (s->strm->avail_out == 0) return; - if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; - BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); - s->state_out_len--; - s->strm->next_out++; - s->strm->avail_out--; - s->strm->total_out_lo32++; - if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; - } - - /* can a new run be started? */ - if (s->nblock_used == s->save_nblock+1) return; - - - s->state_out_len = 1; - s->state_out_ch = s->k0; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 2; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 3; - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; - k1 ^= BZ_RAND_MASK; s->nblock_used++; - s->state_out_len = ((Int32)k1) + 4; - BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; - s->k0 ^= BZ_RAND_MASK; s->nblock_used++; - } - - } else { - - while (True) { - /* try to finish existing run */ - while (True) { - if (s->strm->avail_out == 0) return; - if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; - BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); - s->state_out_len--; - s->strm->next_out++; - s->strm->avail_out--; - s->strm->total_out_lo32++; - if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; - } - - /* can a new run be started? */ - if (s->nblock_used == s->save_nblock+1) return; - - s->state_out_len = 1; - s->state_out_ch = s->k0; - BZ_GET_SMALL(k1); s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 2; - BZ_GET_SMALL(k1); s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - s->state_out_len = 3; - BZ_GET_SMALL(k1); s->nblock_used++; - if (s->nblock_used == s->save_nblock+1) continue; - if (k1 != s->k0) { s->k0 = k1; continue; }; - - BZ_GET_SMALL(k1); s->nblock_used++; - s->state_out_len = ((Int32)k1) + 4; - BZ_GET_SMALL(s->k0); s->nblock_used++; - } - - } -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) -{ - DState* s; - if (strm == NULL) return BZ_PARAM_ERROR; - s = strm->state; - if (s == NULL) return BZ_PARAM_ERROR; - if (s->strm != strm) return BZ_PARAM_ERROR; - - while (True) { - if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR; - if (s->state == BZ_X_OUTPUT) { - if (s->smallDecompress) - unRLE_obuf_to_output_SMALL ( s ); else - unRLE_obuf_to_output_FAST ( s ); - if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) { - BZ_FINALISE_CRC ( s->calculatedBlockCRC ); - if (s->verbosity >= 3) - VPrintf2 ( " {0x%x, 0x%x}", s->storedBlockCRC, - s->calculatedBlockCRC ); - if (s->verbosity >= 2) VPrintf0 ( "]" ); - if (s->calculatedBlockCRC != s->storedBlockCRC) - return BZ_DATA_ERROR; - s->calculatedCombinedCRC - = (s->calculatedCombinedCRC << 1) | - (s->calculatedCombinedCRC >> 31); - s->calculatedCombinedCRC ^= s->calculatedBlockCRC; - s->state = BZ_X_BLKHDR_1; - } else { - return BZ_OK; - } - } - if (s->state >= BZ_X_MAGIC_1) { - Int32 r = BZ2_decompress ( s ); - if (r == BZ_STREAM_END) { - if (s->verbosity >= 3) - VPrintf2 ( "\n combined CRCs: stored = 0x%x, computed = 0x%x", - s->storedCombinedCRC, s->calculatedCombinedCRC ); - if (s->calculatedCombinedCRC != s->storedCombinedCRC) - return BZ_DATA_ERROR; - return r; - } - if (s->state != BZ_X_OUTPUT) return r; - } - } - - AssertH ( 0, 6001 ); - - return 0; /*NOTREACHED*/ -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) -{ - DState* s; - if (strm == NULL) return BZ_PARAM_ERROR; - s = strm->state; - if (s == NULL) return BZ_PARAM_ERROR; - if (s->strm != strm) return BZ_PARAM_ERROR; - - if (s->tt != NULL) BZFREE(s->tt); - if (s->ll16 != NULL) BZFREE(s->ll16); - if (s->ll4 != NULL) BZFREE(s->ll4); - - BZFREE(strm->state); - strm->state = NULL; - - return BZ_OK; -} - - -#ifndef BZ_NO_STDIO -/*---------------------------------------------------*/ -/*--- File I/O stuff ---*/ -/*---------------------------------------------------*/ - -#define BZ_SETERR(eee) \ -{ \ - if (bzerror != NULL) *bzerror = eee; \ - if (bzf != NULL) bzf->lastErr = eee; \ -} - -typedef - struct { - FILE* handle; - Char buf[BZ_MAX_UNUSED]; - Int32 bufN; - Bool writing; - bz_stream strm; - Int32 lastErr; - Bool initialisedOk; - } - bzFile; - - -/*---------------------------------------------*/ -static Bool myfeof ( FILE* f ) -{ - return feof(f) ? True : False; -} - - -/*---------------------------------------------------*/ -BZFILE* BZ_API(BZ2_bzWriteOpen) - ( int* bzerror, - FILE* f, - int blockSize100k, - int verbosity, - int workFactor ) -{ - Int32 ret; - bzFile* bzf = NULL; - - BZ_SETERR(BZ_OK); - - if (f == NULL || - (blockSize100k < 1 || blockSize100k > 9) || - (workFactor < 0 || workFactor > 250) || - (verbosity < 0 || verbosity > 4)) - { BZ_SETERR(BZ_PARAM_ERROR); return NULL; }; - - if (ferror(f)) - { BZ_SETERR(BZ_IO_ERROR); return NULL; }; - - bzf = malloc ( sizeof(bzFile) ); - if (bzf == NULL) - { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; - - BZ_SETERR(BZ_OK); - bzf->initialisedOk = False; - bzf->bufN = 0; - bzf->handle = f; - bzf->writing = True; - bzf->strm.bzalloc = NULL; - bzf->strm.bzfree = NULL; - bzf->strm.opaque = NULL; - - if (workFactor == 0) workFactor = 30; - ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, - verbosity, workFactor ); - if (ret != BZ_OK) - { BZ_SETERR(ret); free(bzf); return NULL; }; - - bzf->strm.avail_in = 0; - bzf->initialisedOk = True; - return bzf; -} - - - -/*---------------------------------------------------*/ -void BZ_API(BZ2_bzWrite) - ( int* bzerror, - BZFILE* b, - void* buf, - int len ) -{ - Int32 n, n2, ret; - bzFile* bzf = (bzFile*)b; - - BZ_SETERR(BZ_OK); - if (bzf == NULL || buf == NULL || len < 0) - { BZ_SETERR(BZ_PARAM_ERROR); return; }; - if (!(bzf->writing)) - { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; - if (ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return; }; - - if (len == 0) - { BZ_SETERR(BZ_OK); return; }; - - bzf->strm.avail_in = len; - bzf->strm.next_in = buf; - - while (True) { - bzf->strm.avail_out = BZ_MAX_UNUSED; - bzf->strm.next_out = bzf->buf; - ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); - if (ret != BZ_RUN_OK) - { BZ_SETERR(ret); return; }; - - if (bzf->strm.avail_out < BZ_MAX_UNUSED) { - n = BZ_MAX_UNUSED - bzf->strm.avail_out; - n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), - n, bzf->handle ); - if (n != n2 || ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return; }; - } - - if (bzf->strm.avail_in == 0) - { BZ_SETERR(BZ_OK); return; }; - } -} - - -/*---------------------------------------------------*/ -void BZ_API(BZ2_bzWriteClose) - ( int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in, - unsigned int* nbytes_out ) -{ - BZ2_bzWriteClose64 ( bzerror, b, abandon, - nbytes_in, NULL, nbytes_out, NULL ); -} - - -void BZ_API(BZ2_bzWriteClose64) - ( int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in_lo32, - unsigned int* nbytes_in_hi32, - unsigned int* nbytes_out_lo32, - unsigned int* nbytes_out_hi32 ) -{ - Int32 n, n2, ret; - bzFile* bzf = (bzFile*)b; - - if (bzf == NULL) - { BZ_SETERR(BZ_OK); return; }; - if (!(bzf->writing)) - { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; - if (ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return; }; - - if (nbytes_in_lo32 != NULL) *nbytes_in_lo32 = 0; - if (nbytes_in_hi32 != NULL) *nbytes_in_hi32 = 0; - if (nbytes_out_lo32 != NULL) *nbytes_out_lo32 = 0; - if (nbytes_out_hi32 != NULL) *nbytes_out_hi32 = 0; - - if ((!abandon) && bzf->lastErr == BZ_OK) { - while (True) { - bzf->strm.avail_out = BZ_MAX_UNUSED; - bzf->strm.next_out = bzf->buf; - ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); - if (ret != BZ_FINISH_OK && ret != BZ_STREAM_END) - { BZ_SETERR(ret); return; }; - - if (bzf->strm.avail_out < BZ_MAX_UNUSED) { - n = BZ_MAX_UNUSED - bzf->strm.avail_out; - n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), - n, bzf->handle ); - if (n != n2 || ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return; }; - } - - if (ret == BZ_STREAM_END) break; - } - } - - if ( !abandon && !ferror ( bzf->handle ) ) { - fflush ( bzf->handle ); - if (ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return; }; - } - - if (nbytes_in_lo32 != NULL) - *nbytes_in_lo32 = bzf->strm.total_in_lo32; - if (nbytes_in_hi32 != NULL) - *nbytes_in_hi32 = bzf->strm.total_in_hi32; - if (nbytes_out_lo32 != NULL) - *nbytes_out_lo32 = bzf->strm.total_out_lo32; - if (nbytes_out_hi32 != NULL) - *nbytes_out_hi32 = bzf->strm.total_out_hi32; - - BZ_SETERR(BZ_OK); - BZ2_bzCompressEnd ( &(bzf->strm) ); - free ( bzf ); -} - - -/*---------------------------------------------------*/ -BZFILE* BZ_API(BZ2_bzReadOpen) - ( int* bzerror, - FILE* f, - int verbosity, - int small, - void* unused, - int nUnused ) -{ - bzFile* bzf = NULL; - int ret; - - BZ_SETERR(BZ_OK); - - if (f == NULL || - (small != 0 && small != 1) || - (verbosity < 0 || verbosity > 4) || - (unused == NULL && nUnused != 0) || - (unused != NULL && (nUnused < 0 || nUnused > BZ_MAX_UNUSED))) - { BZ_SETERR(BZ_PARAM_ERROR); return NULL; }; - - if (ferror(f)) - { BZ_SETERR(BZ_IO_ERROR); return NULL; }; - - bzf = malloc ( sizeof(bzFile) ); - if (bzf == NULL) - { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; - - BZ_SETERR(BZ_OK); - - bzf->initialisedOk = False; - bzf->handle = f; - bzf->bufN = 0; - bzf->writing = False; - bzf->strm.bzalloc = NULL; - bzf->strm.bzfree = NULL; - bzf->strm.opaque = NULL; - - while (nUnused > 0) { - bzf->buf[bzf->bufN] = *((UChar*)(unused)); bzf->bufN++; - unused = ((void*)( 1 + ((UChar*)(unused)) )); - nUnused--; - } - - ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); - if (ret != BZ_OK) - { BZ_SETERR(ret); free(bzf); return NULL; }; - - bzf->strm.avail_in = bzf->bufN; - bzf->strm.next_in = bzf->buf; - - bzf->initialisedOk = True; - return bzf; -} - - -/*---------------------------------------------------*/ -void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b ) -{ - bzFile* bzf = (bzFile*)b; - - BZ_SETERR(BZ_OK); - if (bzf == NULL) - { BZ_SETERR(BZ_OK); return; }; - - if (bzf->writing) - { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; - - if (bzf->initialisedOk) - (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); - free ( bzf ); -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzRead) - ( int* bzerror, - BZFILE* b, - void* buf, - int len ) -{ - Int32 n, ret; - bzFile* bzf = (bzFile*)b; - - BZ_SETERR(BZ_OK); - - if (bzf == NULL || buf == NULL || len < 0) - { BZ_SETERR(BZ_PARAM_ERROR); return 0; }; - - if (bzf->writing) - { BZ_SETERR(BZ_SEQUENCE_ERROR); return 0; }; - - if (len == 0) - { BZ_SETERR(BZ_OK); return 0; }; - - bzf->strm.avail_out = len; - bzf->strm.next_out = buf; - - while (True) { - - if (ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return 0; }; - - if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { - n = fread ( bzf->buf, sizeof(UChar), - BZ_MAX_UNUSED, bzf->handle ); - if (ferror(bzf->handle)) - { BZ_SETERR(BZ_IO_ERROR); return 0; }; - bzf->bufN = n; - bzf->strm.avail_in = bzf->bufN; - bzf->strm.next_in = bzf->buf; - } - - ret = BZ2_bzDecompress ( &(bzf->strm) ); - - if (ret != BZ_OK && ret != BZ_STREAM_END) - { BZ_SETERR(ret); return 0; }; - - if (ret == BZ_OK && myfeof(bzf->handle) && - bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) - { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; }; - - if (ret == BZ_STREAM_END) - { BZ_SETERR(BZ_STREAM_END); - return len - bzf->strm.avail_out; }; - if (bzf->strm.avail_out == 0) - { BZ_SETERR(BZ_OK); return len; }; - - } - - return 0; /*not reached*/ -} - - -/*---------------------------------------------------*/ -void BZ_API(BZ2_bzReadGetUnused) - ( int* bzerror, - BZFILE* b, - void** unused, - int* nUnused ) -{ - bzFile* bzf = (bzFile*)b; - if (bzf == NULL) - { BZ_SETERR(BZ_PARAM_ERROR); return; }; - if (bzf->lastErr != BZ_STREAM_END) - { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; - if (unused == NULL || nUnused == NULL) - { BZ_SETERR(BZ_PARAM_ERROR); return; }; - - BZ_SETERR(BZ_OK); - *nUnused = bzf->strm.avail_in; - *unused = bzf->strm.next_in; -} -#endif - - -/*---------------------------------------------------*/ -/*--- Misc convenience stuff ---*/ -/*---------------------------------------------------*/ - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzBuffToBuffCompress) - ( char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int blockSize100k, - int verbosity, - int workFactor ) -{ - bz_stream strm; - int ret; - - if (dest == NULL || destLen == NULL || - source == NULL || - blockSize100k < 1 || blockSize100k > 9 || - verbosity < 0 || verbosity > 4 || - workFactor < 0 || workFactor > 250) - return BZ_PARAM_ERROR; - - if (workFactor == 0) workFactor = 30; - strm.bzalloc = NULL; - strm.bzfree = NULL; - strm.opaque = NULL; - ret = BZ2_bzCompressInit ( &strm, blockSize100k, - verbosity, workFactor ); - if (ret != BZ_OK) return ret; - - strm.next_in = source; - strm.next_out = dest; - strm.avail_in = sourceLen; - strm.avail_out = *destLen; - - ret = BZ2_bzCompress ( &strm, BZ_FINISH ); - if (ret == BZ_FINISH_OK) goto output_overflow; - if (ret != BZ_STREAM_END) goto errhandler; - - /* normal termination */ - *destLen -= strm.avail_out; - BZ2_bzCompressEnd ( &strm ); - return BZ_OK; - - output_overflow: - BZ2_bzCompressEnd ( &strm ); - return BZ_OUTBUFF_FULL; - - errhandler: - BZ2_bzCompressEnd ( &strm ); - return ret; -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzBuffToBuffDecompress) - ( char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int small, - int verbosity ) -{ - bz_stream strm; - int ret; - - if (dest == NULL || destLen == NULL || - source == NULL || - (small != 0 && small != 1) || - verbosity < 0 || verbosity > 4) - return BZ_PARAM_ERROR; - - strm.bzalloc = NULL; - strm.bzfree = NULL; - strm.opaque = NULL; - ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); - if (ret != BZ_OK) return ret; - - strm.next_in = source; - strm.next_out = dest; - strm.avail_in = sourceLen; - strm.avail_out = *destLen; - - ret = BZ2_bzDecompress ( &strm ); - if (ret == BZ_OK) goto output_overflow_or_eof; - if (ret != BZ_STREAM_END) goto errhandler; - - /* normal termination */ - *destLen -= strm.avail_out; - BZ2_bzDecompressEnd ( &strm ); - return BZ_OK; - - output_overflow_or_eof: - if (strm.avail_out > 0) { - BZ2_bzDecompressEnd ( &strm ); - return BZ_UNEXPECTED_EOF; - } else { - BZ2_bzDecompressEnd ( &strm ); - return BZ_OUTBUFF_FULL; - }; - - errhandler: - BZ2_bzDecompressEnd ( &strm ); - return ret; -} - - -/*---------------------------------------------------*/ -/*-- - Code contributed by Yoshioka Tsuneo - (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp), - to support better zlib compatibility. - This code is not _officially_ part of libbzip2 (yet); - I haven't tested it, documented it, or considered the - threading-safeness of it. - If this code breaks, please contact both Yoshioka and me. ---*/ -/*---------------------------------------------------*/ - -/*---------------------------------------------------*/ -/*-- - return version like "0.9.0c". ---*/ -const char * BZ_API(BZ2_bzlibVersion)(void) -{ - return BZ_VERSION; -} - - -#ifndef BZ_NO_STDIO -/*---------------------------------------------------*/ - -#if defined(_WIN32) || defined(OS2) || defined(MSDOS) -# include <fcntl.h> -# include <io.h> -# define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif -static -BZFILE * bzopen_or_bzdopen - ( const char *path, /* no use when bzdopen */ - int fd, /* no use when bzdopen */ - const char *mode, - int open_mode) /* bzopen: 0, bzdopen:1 */ -{ - int bzerr; - char unused[BZ_MAX_UNUSED]; - int blockSize100k = 9; - int writing = 0; - char mode2[10] = ""; - FILE *fp = NULL; - BZFILE *bzfp = NULL; - int verbosity = 0; - int workFactor = 30; - int smallMode = 0; - int nUnused = 0; - - if (mode == NULL) return NULL; - while (*mode) { - switch (*mode) { - case 'r': - writing = 0; break; - case 'w': - writing = 1; break; - case 's': - smallMode = 1; break; - default: - if (isdigit((int)(*mode))) { - blockSize100k = *mode-'0'; - } - } - mode++; - } - strcat(mode2, writing ? "w" : "r" ); - strcat(mode2,"b"); /* binary mode */ - - if (open_mode==0) { - if (path==NULL || strcmp(path,"")==0) { - fp = (writing ? stdout : stdin); - SET_BINARY_MODE(fp); - } else { - fp = fopen(path,mode2); - } - } else { -#ifdef BZ_STRICT_ANSI - fp = NULL; -#else - fp = fdopen(fd,mode2); -#endif - } - if (fp == NULL) return NULL; - - if (writing) { - /* Guard against total chaos and anarchy -- JRS */ - if (blockSize100k < 1) blockSize100k = 1; - if (blockSize100k > 9) blockSize100k = 9; - bzfp = BZ2_bzWriteOpen(&bzerr,fp,blockSize100k, - verbosity,workFactor); - } else { - bzfp = BZ2_bzReadOpen(&bzerr,fp,verbosity,smallMode, - unused,nUnused); - } - if (bzfp == NULL) { - if (fp != stdin && fp != stdout) fclose(fp); - return NULL; - } - return bzfp; -} - - -/*---------------------------------------------------*/ -/*-- - open file for read or write. - ex) bzopen("file","w9") - case path="" or NULL => use stdin or stdout. ---*/ -BZFILE * BZ_API(BZ2_bzopen) - ( const char *path, - const char *mode ) -{ - return bzopen_or_bzdopen(path,-1,mode,/*bzopen*/0); -} - - -/*---------------------------------------------------*/ -BZFILE * BZ_API(BZ2_bzdopen) - ( int fd, - const char *mode ) -{ - return bzopen_or_bzdopen(NULL,fd,mode,/*bzdopen*/1); -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzread) (BZFILE* b, void* buf, int len ) -{ - int bzerr, nread; - if (((bzFile*)b)->lastErr == BZ_STREAM_END) return 0; - nread = BZ2_bzRead(&bzerr,b,buf,len); - if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) { - return nread; - } else { - return -1; - } -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzwrite) (BZFILE* b, void* buf, int len ) -{ - int bzerr; - - BZ2_bzWrite(&bzerr,b,buf,len); - if(bzerr == BZ_OK){ - return len; - }else{ - return -1; - } -} - - -/*---------------------------------------------------*/ -int BZ_API(BZ2_bzflush) (BZFILE *b __attribute__ ((unused))) -{ - /* do nothing now... */ - return 0; -} - - -/*---------------------------------------------------*/ -void BZ_API(BZ2_bzclose) (BZFILE* b) -{ - int bzerr; - FILE *fp = ((bzFile *)b)->handle; - - if (b==NULL) {return;} - if(((bzFile*)b)->writing){ - BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL); - if(bzerr != BZ_OK){ - BZ2_bzWriteClose(NULL,b,1,NULL,NULL); - } - }else{ - BZ2_bzReadClose(&bzerr,b); - } - if(fp!=stdin && fp!=stdout){ - fclose(fp); - } -} - - -/*---------------------------------------------------*/ -/*-- - return last error code ---*/ -static char *bzerrorstrings[] = { - "OK" - ,"SEQUENCE_ERROR" - ,"PARAM_ERROR" - ,"MEM_ERROR" - ,"DATA_ERROR" - ,"DATA_ERROR_MAGIC" - ,"IO_ERROR" - ,"UNEXPECTED_EOF" - ,"OUTBUFF_FULL" - ,"CONFIG_ERROR" - ,"???" /* for future */ - ,"???" /* for future */ - ,"???" /* for future */ - ,"???" /* for future */ - ,"???" /* for future */ - ,"???" /* for future */ -}; - - -const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum) -{ - int err = ((bzFile *)b)->lastErr; - - if(err>0) err = 0; - *errnum = err; - return bzerrorstrings[err*-1]; -} -#endif - - -/*-------------------------------------------------------------*/ -/*--- end bzlib.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/bzlib.h b/mdk-stage1/bzlib/bzlib.h deleted file mode 100644 index c9447a295..000000000 --- a/mdk-stage1/bzlib/bzlib.h +++ /dev/null @@ -1,319 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Public header file for the library. ---*/ -/*--- bzlib.h ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - - -#ifndef _BZLIB_H -#define _BZLIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define BZ_RUN 0 -#define BZ_FLUSH 1 -#define BZ_FINISH 2 - -#define BZ_OK 0 -#define BZ_RUN_OK 1 -#define BZ_FLUSH_OK 2 -#define BZ_FINISH_OK 3 -#define BZ_STREAM_END 4 -#define BZ_SEQUENCE_ERROR (-1) -#define BZ_PARAM_ERROR (-2) -#define BZ_MEM_ERROR (-3) -#define BZ_DATA_ERROR (-4) -#define BZ_DATA_ERROR_MAGIC (-5) -#define BZ_IO_ERROR (-6) -#define BZ_UNEXPECTED_EOF (-7) -#define BZ_OUTBUFF_FULL (-8) -#define BZ_CONFIG_ERROR (-9) - -typedef - struct { - char *next_in; - unsigned int avail_in; - unsigned int total_in_lo32; - unsigned int total_in_hi32; - - char *next_out; - unsigned int avail_out; - unsigned int total_out_lo32; - unsigned int total_out_hi32; - - void *state; - - void *(*bzalloc)(void *,int,int); - void (*bzfree)(void *,void *); - void *opaque; - } - bz_stream; - - -#ifndef BZ_IMPORT -#define BZ_EXPORT -#endif - -#ifdef _WIN32 -# include <stdio.h> -# include <windows.h> -# ifdef small - /* windows.h define small to char */ -# undef small -# endif -# ifdef BZ_EXPORT -# define BZ_API(func) WINAPI func -# define BZ_EXTERN extern -# else - /* import windows dll dynamically */ -# define BZ_API(func) (WINAPI * func) -# define BZ_EXTERN -# endif -#else -# define BZ_API(func) func -# define BZ_EXTERN extern -#endif - - -/*-- Core (low-level) library functions --*/ - -BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( - bz_stream* strm, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN int BZ_API(BZ2_bzCompress) ( - bz_stream* strm, - int action - ); - -BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( - bz_stream* strm - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( - bz_stream *strm, - int verbosity, - int small - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( - bz_stream* strm - ); - -BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( - bz_stream *strm - ); - - - -/*-- High(er) level library functions --*/ - -#ifndef BZ_NO_STDIO -#define BZ_MAX_UNUSED 5000 - -typedef void BZFILE; - -BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( - int* bzerror, - FILE* f, - int verbosity, - int small, - void* unused, - int nUnused - ); - -BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( - int* bzerror, - BZFILE* b - ); - -BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( - int* bzerror, - BZFILE* b, - void** unused, - int* nUnused - ); - -BZ_EXTERN int BZ_API(BZ2_bzRead) ( - int* bzerror, - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( - int* bzerror, - FILE* f, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN void BZ_API(BZ2_bzWrite) ( - int* bzerror, - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in, - unsigned int* nbytes_out - ); - -BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in_lo32, - unsigned int* nbytes_in_hi32, - unsigned int* nbytes_out_lo32, - unsigned int* nbytes_out_hi32 - ); -#endif - - -/*-- Utility functions --*/ - -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( - char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int blockSize100k, - int verbosity, - int workFactor - ); - -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( - char* dest, - unsigned int* destLen, - char* source, - unsigned int sourceLen, - int small, - int verbosity - ); - - -/*-- - Code contributed by Yoshioka Tsuneo - (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp), - to support better zlib compatibility. - This code is not _officially_ part of libbzip2 (yet); - I haven't tested it, documented it, or considered the - threading-safeness of it. - If this code breaks, please contact both Yoshioka and me. ---*/ - -BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( - void - ); - -#ifndef BZ_NO_STDIO -BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( - const char *path, - const char *mode - ); - -BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( - int fd, - const char *mode - ); - -BZ_EXTERN int BZ_API(BZ2_bzread) ( - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN int BZ_API(BZ2_bzwrite) ( - BZFILE* b, - void* buf, - int len - ); - -BZ_EXTERN int BZ_API(BZ2_bzflush) ( - BZFILE* b - ); - -BZ_EXTERN void BZ_API(BZ2_bzclose) ( - BZFILE* b - ); - -BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( - BZFILE *b, - int *errnum - ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -/*-------------------------------------------------------------*/ -/*--- end bzlib.h ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/bzlib_private.h b/mdk-stage1/bzlib/bzlib_private.h deleted file mode 100644 index fb51c7a1d..000000000 --- a/mdk-stage1/bzlib/bzlib_private.h +++ /dev/null @@ -1,530 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Private header file for the library. ---*/ -/*--- bzlib_private.h ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - - -#ifndef _BZLIB_PRIVATE_H -#define _BZLIB_PRIVATE_H - -#include <stdlib.h> - -#ifndef BZ_NO_STDIO -#include <stdio.h> -#include <ctype.h> -#include <string.h> -#endif - -#include "bzlib.h" - - - -/*-- General stuff. --*/ - -#define BZ_VERSION "1.0.1, 23-June-2000" - -typedef char Char; -typedef unsigned char Bool; -typedef unsigned char UChar; -typedef int Int32; -typedef unsigned int UInt32; -typedef short Int16; -typedef unsigned short UInt16; - -#define True ((Bool)1) -#define False ((Bool)0) - -#ifndef __GNUC__ -#define __inline__ /* */ -#endif - -#ifndef BZ_NO_STDIO -extern void BZ2_bz__AssertH__fail ( int errcode ); -#define AssertH(cond,errcode) \ - { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); } -#if BZ_DEBUG -#define AssertD(cond,msg) \ - { if (!(cond)) { \ - fprintf ( stderr, \ - "\n\nlibbzip2(debug build): internal error\n\t%s\n", msg );\ - exit(1); \ - }} -#else -#define AssertD(cond,msg) /* */ -#endif -#define VPrintf0(zf) \ - fprintf(stderr,zf) -#define VPrintf1(zf,za1) \ - fprintf(stderr,zf,za1) -#define VPrintf2(zf,za1,za2) \ - fprintf(stderr,zf,za1,za2) -#define VPrintf3(zf,za1,za2,za3) \ - fprintf(stderr,zf,za1,za2,za3) -#define VPrintf4(zf,za1,za2,za3,za4) \ - fprintf(stderr,zf,za1,za2,za3,za4) -#define VPrintf5(zf,za1,za2,za3,za4,za5) \ - fprintf(stderr,zf,za1,za2,za3,za4,za5) -#else -extern void bz_internal_error ( int errcode ); -#define AssertH(cond,errcode) \ - { if (!(cond)) bz_internal_error ( errcode ); } -#define AssertD(cond,msg) /* */ -#define VPrintf0(zf) /* */ -#define VPrintf1(zf,za1) /* */ -#define VPrintf2(zf,za1,za2) /* */ -#define VPrintf3(zf,za1,za2,za3) /* */ -#define VPrintf4(zf,za1,za2,za3,za4) /* */ -#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */ -#endif - - -#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1) -#define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp)) - - -/*-- Constants for the back end. --*/ - -#define BZ_MAX_ALPHA_SIZE 258 -#define BZ_MAX_CODE_LEN 23 - -#define BZ_RUNA 0 -#define BZ_RUNB 1 - -#define BZ_N_GROUPS 6 -#define BZ_G_SIZE 50 -#define BZ_N_ITERS 4 - -#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE)) - - - -/*-- Stuff for randomising repetitive blocks. --*/ - -extern Int32 BZ2_rNums[512]; - -#define BZ_RAND_DECLS \ - Int32 rNToGo; \ - Int32 rTPos \ - -#define BZ_RAND_INIT_MASK \ - s->rNToGo = 0; \ - s->rTPos = 0 \ - -#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0) - -#define BZ_RAND_UPD_MASK \ - if (s->rNToGo == 0) { \ - s->rNToGo = BZ2_rNums[s->rTPos]; \ - s->rTPos++; \ - if (s->rTPos == 512) s->rTPos = 0; \ - } \ - s->rNToGo--; - - - -/*-- Stuff for doing CRCs. --*/ - -extern UInt32 BZ2_crc32Table[256]; - -#define BZ_INITIALISE_CRC(crcVar) \ -{ \ - crcVar = 0xffffffffL; \ -} - -#define BZ_FINALISE_CRC(crcVar) \ -{ \ - crcVar = ~(crcVar); \ -} - -#define BZ_UPDATE_CRC(crcVar,cha) \ -{ \ - crcVar = (crcVar << 8) ^ \ - BZ2_crc32Table[(crcVar >> 24) ^ \ - ((UChar)cha)]; \ -} - - - -/*-- States and modes for compression. --*/ - -#define BZ_M_IDLE 1 -#define BZ_M_RUNNING 2 -#define BZ_M_FLUSHING 3 -#define BZ_M_FINISHING 4 - -#define BZ_S_OUTPUT 1 -#define BZ_S_INPUT 2 - -#define BZ_N_RADIX 2 -#define BZ_N_QSORT 12 -#define BZ_N_SHELL 18 -#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2) - - - - -/*-- Structure holding all the compression-side stuff. --*/ - -typedef - struct { - /* pointer back to the struct bz_stream */ - bz_stream* strm; - - /* mode this stream is in, and whether inputting */ - /* or outputting data */ - Int32 mode; - Int32 state; - - /* remembers avail_in when flush/finish requested */ - UInt32 avail_in_expect; - - /* for doing the block sorting */ - UInt32* arr1; - UInt32* arr2; - UInt32* ftab; - Int32 origPtr; - - /* aliases for arr1 and arr2 */ - UInt32* ptr; - UChar* block; - UInt16* mtfv; - UChar* zbits; - - /* for deciding when to use the fallback sorting algorithm */ - Int32 workFactor; - - /* run-length-encoding of the input */ - UInt32 state_in_ch; - Int32 state_in_len; - BZ_RAND_DECLS; - - /* input and output limits and current posns */ - Int32 nblock; - Int32 nblockMAX; - Int32 numZ; - Int32 state_out_pos; - - /* map of bytes used in block */ - Int32 nInUse; - Bool inUse[256]; - UChar unseqToSeq[256]; - - /* the buffer for bit stream creation */ - UInt32 bsBuff; - Int32 bsLive; - - /* block and combined CRCs */ - UInt32 blockCRC; - UInt32 combinedCRC; - - /* misc administratium */ - Int32 verbosity; - Int32 blockNo; - Int32 blockSize100k; - - /* stuff for coding the MTF values */ - Int32 nMTF; - Int32 mtfFreq [BZ_MAX_ALPHA_SIZE]; - UChar selector [BZ_MAX_SELECTORS]; - UChar selectorMtf[BZ_MAX_SELECTORS]; - - UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - /* second dimension: only 3 needed; 4 makes index calculations faster */ - UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4]; - - } - EState; - - - -/*-- externs for compression. --*/ - -extern void -BZ2_blockSort ( EState* ); - -extern void -BZ2_compressBlock ( EState*, Bool ); - -extern void -BZ2_bsInitWrite ( EState* ); - -extern void -BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 ); - -extern void -BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 ); - - - -/*-- states for decompression. --*/ - -#define BZ_X_IDLE 1 -#define BZ_X_OUTPUT 2 - -#define BZ_X_MAGIC_1 10 -#define BZ_X_MAGIC_2 11 -#define BZ_X_MAGIC_3 12 -#define BZ_X_MAGIC_4 13 -#define BZ_X_BLKHDR_1 14 -#define BZ_X_BLKHDR_2 15 -#define BZ_X_BLKHDR_3 16 -#define BZ_X_BLKHDR_4 17 -#define BZ_X_BLKHDR_5 18 -#define BZ_X_BLKHDR_6 19 -#define BZ_X_BCRC_1 20 -#define BZ_X_BCRC_2 21 -#define BZ_X_BCRC_3 22 -#define BZ_X_BCRC_4 23 -#define BZ_X_RANDBIT 24 -#define BZ_X_ORIGPTR_1 25 -#define BZ_X_ORIGPTR_2 26 -#define BZ_X_ORIGPTR_3 27 -#define BZ_X_MAPPING_1 28 -#define BZ_X_MAPPING_2 29 -#define BZ_X_SELECTOR_1 30 -#define BZ_X_SELECTOR_2 31 -#define BZ_X_SELECTOR_3 32 -#define BZ_X_CODING_1 33 -#define BZ_X_CODING_2 34 -#define BZ_X_CODING_3 35 -#define BZ_X_MTF_1 36 -#define BZ_X_MTF_2 37 -#define BZ_X_MTF_3 38 -#define BZ_X_MTF_4 39 -#define BZ_X_MTF_5 40 -#define BZ_X_MTF_6 41 -#define BZ_X_ENDHDR_2 42 -#define BZ_X_ENDHDR_3 43 -#define BZ_X_ENDHDR_4 44 -#define BZ_X_ENDHDR_5 45 -#define BZ_X_ENDHDR_6 46 -#define BZ_X_CCRC_1 47 -#define BZ_X_CCRC_2 48 -#define BZ_X_CCRC_3 49 -#define BZ_X_CCRC_4 50 - - - -/*-- Constants for the fast MTF decoder. --*/ - -#define MTFA_SIZE 4096 -#define MTFL_SIZE 16 - - - -/*-- Structure holding all the decompression-side stuff. --*/ - -typedef - struct { - /* pointer back to the struct bz_stream */ - bz_stream* strm; - - /* state indicator for this stream */ - Int32 state; - - /* for doing the final run-length decoding */ - UChar state_out_ch; - Int32 state_out_len; - Bool blockRandomised; - BZ_RAND_DECLS; - - /* the buffer for bit stream reading */ - UInt32 bsBuff; - Int32 bsLive; - - /* misc administratium */ - Int32 blockSize100k; - Bool smallDecompress; - Int32 currBlockNo; - Int32 verbosity; - - /* for undoing the Burrows-Wheeler transform */ - Int32 origPtr; - UInt32 tPos; - Int32 k0; - Int32 unzftab[256]; - Int32 nblock_used; - Int32 cftab[257]; - Int32 cftabCopy[257]; - - /* for undoing the Burrows-Wheeler transform (FAST) */ - UInt32 *tt; - - /* for undoing the Burrows-Wheeler transform (SMALL) */ - UInt16 *ll16; - UChar *ll4; - - /* stored and calculated CRCs */ - UInt32 storedBlockCRC; - UInt32 storedCombinedCRC; - UInt32 calculatedBlockCRC; - UInt32 calculatedCombinedCRC; - - /* map of bytes used in block */ - Int32 nInUse; - Bool inUse[256]; - Bool inUse16[16]; - UChar seqToUnseq[256]; - - /* for decoding the MTF values */ - UChar mtfa [MTFA_SIZE]; - Int32 mtfbase[256 / MTFL_SIZE]; - UChar selector [BZ_MAX_SELECTORS]; - UChar selectorMtf[BZ_MAX_SELECTORS]; - UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - - Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 minLens[BZ_N_GROUPS]; - - /* save area for scalars in the main decompress code */ - Int32 save_i; - Int32 save_j; - Int32 save_t; - Int32 save_alphaSize; - Int32 save_nGroups; - Int32 save_nSelectors; - Int32 save_EOB; - Int32 save_groupNo; - Int32 save_groupPos; - Int32 save_nextSym; - Int32 save_nblockMAX; - Int32 save_nblock; - Int32 save_es; - Int32 save_N; - Int32 save_curr; - Int32 save_zt; - Int32 save_zn; - Int32 save_zvec; - Int32 save_zj; - Int32 save_gSel; - Int32 save_gMinlen; - Int32* save_gLimit; - Int32* save_gBase; - Int32* save_gPerm; - - } - DState; - - - -/*-- Macros for decompression. --*/ - -#define BZ_GET_FAST(cccc) \ - s->tPos = s->tt[s->tPos]; \ - cccc = (UChar)(s->tPos & 0xff); \ - s->tPos >>= 8; - -#define BZ_GET_FAST_C(cccc) \ - c_tPos = c_tt[c_tPos]; \ - cccc = (UChar)(c_tPos & 0xff); \ - c_tPos >>= 8; - -#define SET_LL4(i,n) \ - { if (((i) & 0x1) == 0) \ - s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \ - s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \ - } - -#define GET_LL4(i) \ - ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF) - -#define SET_LL(i,n) \ - { s->ll16[i] = (UInt16)(n & 0x0000ffff); \ - SET_LL4(i, n >> 16); \ - } - -#define GET_LL(i) \ - (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16)) - -#define BZ_GET_SMALL(cccc) \ - cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ - s->tPos = GET_LL(s->tPos); - - -/*-- externs for decompression. --*/ - -extern Int32 -BZ2_indexIntoF ( Int32, Int32* ); - -extern Int32 -BZ2_decompress ( DState* ); - -extern void -BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*, - Int32, Int32, Int32 ); - - -#endif - - -/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/ - -#ifdef BZ_NO_STDIO -#ifndef NULL -#define NULL 0 -#endif -#endif - - -/*-------------------------------------------------------------*/ -/*--- end bzlib_private.h ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/compress.c b/mdk-stage1/bzlib/compress.c deleted file mode 100644 index 58d5abe7c..000000000 --- a/mdk-stage1/bzlib/compress.c +++ /dev/null @@ -1,720 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Compression machinery (not incl block sorting) ---*/ -/*--- compress.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -/*-- - CHANGES - ~~~~~~~ - 0.9.0 -- original version. - - 0.9.0a/b -- no changes in this file. - - 0.9.0c - * changed setting of nGroups in sendMTFValues() so as to - do a bit better on small files ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - - -#include "bzlib_private.h" - - -/*---------------------------------------------------*/ -/*--- Bit stream I/O ---*/ -/*---------------------------------------------------*/ - -/*---------------------------------------------------*/ -void BZ2_bsInitWrite ( EState* s ) -{ - s->bsLive = 0; - s->bsBuff = 0; -} - - -/*---------------------------------------------------*/ -static -void bsFinishWrite ( EState* s ) -{ - while (s->bsLive > 0) { - s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24); - s->numZ++; - s->bsBuff <<= 8; - s->bsLive -= 8; - } -} - - -/*---------------------------------------------------*/ -#define bsNEEDW(nz) \ -{ \ - while (s->bsLive >= 8) { \ - s->zbits[s->numZ] \ - = (UChar)(s->bsBuff >> 24); \ - s->numZ++; \ - s->bsBuff <<= 8; \ - s->bsLive -= 8; \ - } \ -} - - -/*---------------------------------------------------*/ -static -__inline__ -void bsW ( EState* s, Int32 n, UInt32 v ) -{ - bsNEEDW ( n ); - s->bsBuff |= (v << (32 - s->bsLive - n)); - s->bsLive += n; -} - - -/*---------------------------------------------------*/ -static -void bsPutUInt32 ( EState* s, UInt32 u ) -{ - bsW ( s, 8, (u >> 24) & 0xffL ); - bsW ( s, 8, (u >> 16) & 0xffL ); - bsW ( s, 8, (u >> 8) & 0xffL ); - bsW ( s, 8, u & 0xffL ); -} - - -/*---------------------------------------------------*/ -static -void bsPutUChar ( EState* s, UChar c ) -{ - bsW( s, 8, (UInt32)c ); -} - - -/*---------------------------------------------------*/ -/*--- The back end proper ---*/ -/*---------------------------------------------------*/ - -/*---------------------------------------------------*/ -static -void makeMaps_e ( EState* s ) -{ - Int32 i; - s->nInUse = 0; - for (i = 0; i < 256; i++) - if (s->inUse[i]) { - s->unseqToSeq[i] = s->nInUse; - s->nInUse++; - } -} - - -/*---------------------------------------------------*/ -static -void generateMTFValues ( EState* s ) -{ - UChar yy[256]; - Int32 i, j; - Int32 zPend; - Int32 wr; - Int32 EOB; - - /* - After sorting (eg, here), - s->arr1 [ 0 .. s->nblock-1 ] holds sorted order, - and - ((UChar*)s->arr2) [ 0 .. s->nblock-1 ] - holds the original block data. - - The first thing to do is generate the MTF values, - and put them in - ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ]. - Because there are strictly fewer or equal MTF values - than block values, ptr values in this area are overwritten - with MTF values only when they are no longer needed. - - The final compressed bitstream is generated into the - area starting at - (UChar*) (&((UChar*)s->arr2)[s->nblock]) - - These storage aliases are set up in bzCompressInit(), - except for the last one, which is arranged in - compressBlock(). - */ - UInt32* ptr = s->ptr; - UChar* block = s->block; - UInt16* mtfv = s->mtfv; - - makeMaps_e ( s ); - EOB = s->nInUse+1; - - for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0; - - wr = 0; - zPend = 0; - for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i; - - for (i = 0; i < s->nblock; i++) { - UChar ll_i; - AssertD ( wr <= i, "generateMTFValues(1)" ); - j = ptr[i]-1; if (j < 0) j += s->nblock; - ll_i = s->unseqToSeq[block[j]]; - AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" ); - - if (yy[0] == ll_i) { - zPend++; - } else { - - if (zPend > 0) { - zPend--; - while (True) { - if (zPend & 1) { - mtfv[wr] = BZ_RUNB; wr++; - s->mtfFreq[BZ_RUNB]++; - } else { - mtfv[wr] = BZ_RUNA; wr++; - s->mtfFreq[BZ_RUNA]++; - } - if (zPend < 2) break; - zPend = (zPend - 2) / 2; - }; - zPend = 0; - } - { - register UChar rtmp; - register UChar* ryy_j; - register UChar rll_i; - rtmp = yy[1]; - yy[1] = yy[0]; - ryy_j = &(yy[1]); - rll_i = ll_i; - while ( rll_i != rtmp ) { - register UChar rtmp2; - ryy_j++; - rtmp2 = rtmp; - rtmp = *ryy_j; - *ryy_j = rtmp2; - }; - yy[0] = rtmp; - j = ryy_j - &(yy[0]); - mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++; - } - - } - } - - if (zPend > 0) { - zPend--; - while (True) { - if (zPend & 1) { - mtfv[wr] = BZ_RUNB; wr++; - s->mtfFreq[BZ_RUNB]++; - } else { - mtfv[wr] = BZ_RUNA; wr++; - s->mtfFreq[BZ_RUNA]++; - } - if (zPend < 2) break; - zPend = (zPend - 2) / 2; - }; - zPend = 0; - } - - mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++; - - s->nMTF = wr; -} - - -/*---------------------------------------------------*/ -#define BZ_LESSER_ICOST 0 -#define BZ_GREATER_ICOST 15 - -static -void sendMTFValues ( EState* s ) -{ - Int32 v, t, i, j, gs, ge, totc, bt, bc, iter; - Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; - Int32 nGroups, nBytes; - - /*-- - UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - is a global since the decoder also needs it. - - Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; - are also globals only used in this proc. - Made global to keep stack frame size small. - --*/ - - - UInt16 cost[BZ_N_GROUPS]; - Int32 fave[BZ_N_GROUPS]; - - UInt16* mtfv = s->mtfv; - - if (s->verbosity >= 3) - VPrintf3( " %d in block, %d after MTF & 1-2 coding, " - "%d+2 syms in use\n", - s->nblock, s->nMTF, s->nInUse ); - - alphaSize = s->nInUse+2; - for (t = 0; t < BZ_N_GROUPS; t++) - for (v = 0; v < alphaSize; v++) - s->len[t][v] = BZ_GREATER_ICOST; - - /*--- Decide how many coding tables to use ---*/ - AssertH ( s->nMTF > 0, 3001 ); - if (s->nMTF < 200) nGroups = 2; else - if (s->nMTF < 600) nGroups = 3; else - if (s->nMTF < 1200) nGroups = 4; else - if (s->nMTF < 2400) nGroups = 5; else - nGroups = 6; - - /*--- Generate an initial set of coding tables ---*/ - { - Int32 nPart, remF, tFreq, aFreq; - - nPart = nGroups; - remF = s->nMTF; - gs = 0; - while (nPart > 0) { - tFreq = remF / nPart; - ge = gs-1; - aFreq = 0; - while (aFreq < tFreq && ge < alphaSize-1) { - ge++; - aFreq += s->mtfFreq[ge]; - } - - if (ge > gs - && nPart != nGroups && nPart != 1 - && ((nGroups-nPart) % 2 == 1)) { - aFreq -= s->mtfFreq[ge]; - ge--; - } - - if (s->verbosity >= 3) - VPrintf5( " initial group %d, [%d .. %d], " - "has %d syms (%4.1f%%)\n", - nPart, gs, ge, aFreq, - (100.0 * (float)aFreq) / (float)(s->nMTF) ); - - for (v = 0; v < alphaSize; v++) - if (v >= gs && v <= ge) - s->len[nPart-1][v] = BZ_LESSER_ICOST; else - s->len[nPart-1][v] = BZ_GREATER_ICOST; - - nPart--; - gs = ge+1; - remF -= aFreq; - } - } - - /*--- - Iterate up to BZ_N_ITERS times to improve the tables. - ---*/ - for (iter = 0; iter < BZ_N_ITERS; iter++) { - - for (t = 0; t < nGroups; t++) fave[t] = 0; - - for (t = 0; t < nGroups; t++) - for (v = 0; v < alphaSize; v++) - s->rfreq[t][v] = 0; - - /*--- - Set up an auxiliary length table which is used to fast-track - the common case (nGroups == 6). - ---*/ - if (nGroups == 6) { - for (v = 0; v < alphaSize; v++) { - s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v]; - s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v]; - s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v]; - } - } - - nSelectors = 0; - totc = 0; - gs = 0; - while (True) { - - /*--- Set group start & end marks. --*/ - if (gs >= s->nMTF) break; - ge = gs + BZ_G_SIZE - 1; - if (ge >= s->nMTF) ge = s->nMTF-1; - - /*-- - Calculate the cost of this group as coded - by each of the coding tables. - --*/ - for (t = 0; t < nGroups; t++) cost[t] = 0; - - if (nGroups == 6 && 50 == ge-gs+1) { - /*--- fast track the common case ---*/ - register UInt32 cost01, cost23, cost45; - register UInt16 icv; - cost01 = cost23 = cost45 = 0; - -# define BZ_ITER(nn) \ - icv = mtfv[gs+(nn)]; \ - cost01 += s->len_pack[icv][0]; \ - cost23 += s->len_pack[icv][1]; \ - cost45 += s->len_pack[icv][2]; \ - - BZ_ITER(0); BZ_ITER(1); BZ_ITER(2); BZ_ITER(3); BZ_ITER(4); - BZ_ITER(5); BZ_ITER(6); BZ_ITER(7); BZ_ITER(8); BZ_ITER(9); - BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14); - BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19); - BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24); - BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29); - BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34); - BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39); - BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44); - BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49); - -# undef BZ_ITER - - cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16; - cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16; - cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16; - - } else { - /*--- slow version which correctly handles all situations ---*/ - for (i = gs; i <= ge; i++) { - UInt16 icv = mtfv[i]; - for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv]; - } - } - - /*-- - Find the coding table which is best for this group, - and record its identity in the selector table. - --*/ - bc = 999999999; bt = -1; - for (t = 0; t < nGroups; t++) - if (cost[t] < bc) { bc = cost[t]; bt = t; }; - totc += bc; - fave[bt]++; - s->selector[nSelectors] = bt; - nSelectors++; - - /*-- - Increment the symbol frequencies for the selected table. - --*/ - if (nGroups == 6 && 50 == ge-gs+1) { - /*--- fast track the common case ---*/ - -# define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++ - - BZ_ITUR(0); BZ_ITUR(1); BZ_ITUR(2); BZ_ITUR(3); BZ_ITUR(4); - BZ_ITUR(5); BZ_ITUR(6); BZ_ITUR(7); BZ_ITUR(8); BZ_ITUR(9); - BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14); - BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19); - BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24); - BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29); - BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34); - BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39); - BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44); - BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49); - -# undef BZ_ITUR - - } else { - /*--- slow version which correctly handles all situations ---*/ - for (i = gs; i <= ge; i++) - s->rfreq[bt][ mtfv[i] ]++; - } - - gs = ge+1; - } - if (s->verbosity >= 3) { - VPrintf2 ( " pass %d: size is %d, grp uses are ", - iter+1, totc/8 ); - for (t = 0; t < nGroups; t++) - VPrintf1 ( "%d ", fave[t] ); - VPrintf0 ( "\n" ); - } - - /*-- - Recompute the tables based on the accumulated frequencies. - --*/ - for (t = 0; t < nGroups; t++) - BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]), - alphaSize, 20 ); - } - - - AssertH( nGroups < 8, 3002 ); - AssertH( nSelectors < 32768 && - nSelectors <= (2 + (900000 / BZ_G_SIZE)), - 3003 ); - - - /*--- Compute MTF values for the selectors. ---*/ - { - UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp; - for (i = 0; i < nGroups; i++) pos[i] = i; - for (i = 0; i < nSelectors; i++) { - ll_i = s->selector[i]; - j = 0; - tmp = pos[j]; - while ( ll_i != tmp ) { - j++; - tmp2 = tmp; - tmp = pos[j]; - pos[j] = tmp2; - }; - pos[0] = tmp; - s->selectorMtf[i] = j; - } - }; - - /*--- Assign actual codes for the tables. --*/ - for (t = 0; t < nGroups; t++) { - minLen = 32; - maxLen = 0; - for (i = 0; i < alphaSize; i++) { - if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; - if (s->len[t][i] < minLen) minLen = s->len[t][i]; - } - AssertH ( !(maxLen > 20), 3004 ); - AssertH ( !(minLen < 1), 3005 ); - BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]), - minLen, maxLen, alphaSize ); - } - - /*--- Transmit the mapping table. ---*/ - { - Bool inUse16[16]; - for (i = 0; i < 16; i++) { - inUse16[i] = False; - for (j = 0; j < 16; j++) - if (s->inUse[i * 16 + j]) inUse16[i] = True; - } - - nBytes = s->numZ; - for (i = 0; i < 16; i++) - if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0); - - for (i = 0; i < 16; i++) - if (inUse16[i]) - for (j = 0; j < 16; j++) { - if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0); - } - - if (s->verbosity >= 3) - VPrintf1( " bytes: mapping %d, ", s->numZ-nBytes ); - } - - /*--- Now the selectors. ---*/ - nBytes = s->numZ; - bsW ( s, 3, nGroups ); - bsW ( s, 15, nSelectors ); - for (i = 0; i < nSelectors; i++) { - for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1); - bsW(s,1,0); - } - if (s->verbosity >= 3) - VPrintf1( "selectors %d, ", s->numZ-nBytes ); - - /*--- Now the coding tables. ---*/ - nBytes = s->numZ; - - for (t = 0; t < nGroups; t++) { - Int32 curr = s->len[t][0]; - bsW ( s, 5, curr ); - for (i = 0; i < alphaSize; i++) { - while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ }; - while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ }; - bsW ( s, 1, 0 ); - } - } - - if (s->verbosity >= 3) - VPrintf1 ( "code lengths %d, ", s->numZ-nBytes ); - - /*--- And finally, the block data proper ---*/ - nBytes = s->numZ; - selCtr = 0; - gs = 0; - while (True) { - if (gs >= s->nMTF) break; - ge = gs + BZ_G_SIZE - 1; - if (ge >= s->nMTF) ge = s->nMTF-1; - AssertH ( s->selector[selCtr] < nGroups, 3006 ); - - if (nGroups == 6 && 50 == ge-gs+1) { - /*--- fast track the common case ---*/ - UInt16 mtfv_i; - UChar* s_len_sel_selCtr - = &(s->len[s->selector[selCtr]][0]); - Int32* s_code_sel_selCtr - = &(s->code[s->selector[selCtr]][0]); - -# define BZ_ITAH(nn) \ - mtfv_i = mtfv[gs+(nn)]; \ - bsW ( s, \ - s_len_sel_selCtr[mtfv_i], \ - s_code_sel_selCtr[mtfv_i] ) - - BZ_ITAH(0); BZ_ITAH(1); BZ_ITAH(2); BZ_ITAH(3); BZ_ITAH(4); - BZ_ITAH(5); BZ_ITAH(6); BZ_ITAH(7); BZ_ITAH(8); BZ_ITAH(9); - BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14); - BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19); - BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24); - BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29); - BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34); - BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39); - BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44); - BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49); - -# undef BZ_ITAH - - } else { - /*--- slow version which correctly handles all situations ---*/ - for (i = gs; i <= ge; i++) { - bsW ( s, - s->len [s->selector[selCtr]] [mtfv[i]], - s->code [s->selector[selCtr]] [mtfv[i]] ); - } - } - - - gs = ge+1; - selCtr++; - } - AssertH( selCtr == nSelectors, 3007 ); - - if (s->verbosity >= 3) - VPrintf1( "codes %d\n", s->numZ-nBytes ); -} - - -/*---------------------------------------------------*/ -void BZ2_compressBlock ( EState* s, Bool is_last_block ) -{ - if (s->nblock > 0) { - - BZ_FINALISE_CRC ( s->blockCRC ); - s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31); - s->combinedCRC ^= s->blockCRC; - if (s->blockNo > 1) s->numZ = 0; - - if (s->verbosity >= 2) - VPrintf4( " block %d: crc = 0x%8x, " - "combined CRC = 0x%8x, size = %d\n", - s->blockNo, s->blockCRC, s->combinedCRC, s->nblock ); - - BZ2_blockSort ( s ); - } - - s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]); - - /*-- If this is the first block, create the stream header. --*/ - if (s->blockNo == 1) { - BZ2_bsInitWrite ( s ); - bsPutUChar ( s, 'B' ); - bsPutUChar ( s, 'Z' ); - bsPutUChar ( s, 'h' ); - bsPutUChar ( s, (UChar)('0' + s->blockSize100k) ); - } - - if (s->nblock > 0) { - - bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 ); - bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 ); - bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 ); - - /*-- Now the block's CRC, so it is in a known place. --*/ - bsPutUInt32 ( s, s->blockCRC ); - - /*-- - Now a single bit indicating (non-)randomisation. - As of version 0.9.5, we use a better sorting algorithm - which makes randomisation unnecessary. So always set - the randomised bit to 'no'. Of course, the decoder - still needs to be able to handle randomised blocks - so as to maintain backwards compatibility with - older versions of bzip2. - --*/ - bsW(s,1,0); - - bsW ( s, 24, s->origPtr ); - generateMTFValues ( s ); - sendMTFValues ( s ); - } - - - /*-- If this is the last block, add the stream trailer. --*/ - if (is_last_block) { - - bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 ); - bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 ); - bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 ); - bsPutUInt32 ( s, s->combinedCRC ); - if (s->verbosity >= 2) - VPrintf1( " final combined CRC = 0x%x\n ", s->combinedCRC ); - bsFinishWrite ( s ); - } -} - - -/*-------------------------------------------------------------*/ -/*--- end compress.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/crctable.c b/mdk-stage1/bzlib/crctable.c deleted file mode 100644 index c0ea3f769..000000000 --- a/mdk-stage1/bzlib/crctable.c +++ /dev/null @@ -1,148 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Table for doing CRCs ---*/ -/*--- crctable.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "bzlib_private.h" - -/*-- - I think this is an implementation of the AUTODIN-II, - Ethernet & FDDI 32-bit CRC standard. Vaguely derived - from code by Rob Warnock, in Section 51 of the - comp.compression FAQ. ---*/ - -UInt32 BZ2_crc32Table[256] = { - - /*-- Ugly, innit? --*/ - - 0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L, - 0x130476dcL, 0x17c56b6bL, 0x1a864db2L, 0x1e475005L, - 0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L, - 0x350c9b64L, 0x31cd86d3L, 0x3c8ea00aL, 0x384fbdbdL, - 0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L, - 0x5f15adacL, 0x5bd4b01bL, 0x569796c2L, 0x52568b75L, - 0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L, - 0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL, - 0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL, 0x95609039L, - 0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L, - 0xbe2b5b58L, 0xbaea46efL, 0xb7a96036L, 0xb3687d81L, - 0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL, - 0xd4326d90L, 0xd0f37027L, 0xddb056feL, 0xd9714b49L, - 0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L, - 0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L, - 0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL, 0xec7dd02dL, - 0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL, - 0x278206abL, 0x23431b1cL, 0x2e003dc5L, 0x2ac12072L, - 0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L, - 0x018aeb13L, 0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL, - 0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL, - 0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L, - 0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L, 0x53dc6066L, - 0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL, - 0xaca5c697L, 0xa864db20L, 0xa527fdf9L, 0xa1e6e04eL, - 0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L, - 0x8aad2b2fL, 0x8e6c3698L, 0x832f1041L, 0x87ee0df6L, - 0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL, - 0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL, - 0xf3b06b3bL, 0xf771768cL, 0xfa325055L, 0xfef34de2L, - 0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L, - 0xd5b88683L, 0xd1799b34L, 0xdc3abdedL, 0xd8fba05aL, - 0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L, - 0x7a089632L, 0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL, - 0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL, - 0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L, - 0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L, 0x285e1d47L, - 0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL, - 0x0315d626L, 0x07d4cb91L, 0x0a97ed48L, 0x0e56f0ffL, - 0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L, - 0xf12f560eL, 0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L, - 0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL, - 0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL, - 0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L, 0xc960ebb3L, - 0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L, - 0xae3afba2L, 0xaafbe615L, 0xa7b8c0ccL, 0xa379dd7bL, - 0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL, - 0x8832161aL, 0x8cf30badL, 0x81b02d74L, 0x857130c3L, - 0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L, - 0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL, - 0x7b827d21L, 0x7f436096L, 0x7200464fL, 0x76c15bf8L, - 0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L, - 0x119b4be9L, 0x155a565eL, 0x18197087L, 0x1cd86d30L, - 0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL, - 0x3793a651L, 0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L, - 0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L, - 0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L, - 0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL, 0xdbee767cL, - 0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L, - 0xf0a5bd1dL, 0xf464a0aaL, 0xf9278673L, 0xfde69bc4L, - 0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L, - 0x9abc8bd5L, 0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL, - 0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L, - 0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L -}; - - -/*-------------------------------------------------------------*/ -/*--- end crctable.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/decompress.c b/mdk-stage1/bzlib/decompress.c deleted file mode 100644 index 65cf75d8f..000000000 --- a/mdk-stage1/bzlib/decompress.c +++ /dev/null @@ -1,664 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Decompression machinery ---*/ -/*--- decompress.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "bzlib_private.h" - - -/*---------------------------------------------------*/ -static -void makeMaps_d ( DState* s ) -{ - Int32 i; - s->nInUse = 0; - for (i = 0; i < 256; i++) - if (s->inUse[i]) { - s->seqToUnseq[s->nInUse] = i; - s->nInUse++; - } -} - - -/*---------------------------------------------------*/ -#define RETURN(rrr) \ - { retVal = rrr; goto save_state_and_return; }; - -#define GET_BITS(lll,vvv,nnn) \ - case lll: s->state = lll; \ - while (True) { \ - if (s->bsLive >= nnn) { \ - UInt32 v; \ - v = (s->bsBuff >> \ - (s->bsLive-nnn)) & ((1 << nnn)-1); \ - s->bsLive -= nnn; \ - vvv = v; \ - break; \ - } \ - if (s->strm->avail_in == 0) RETURN(BZ_OK); \ - s->bsBuff \ - = (s->bsBuff << 8) | \ - ((UInt32) \ - (*((UChar*)(s->strm->next_in)))); \ - s->bsLive += 8; \ - s->strm->next_in++; \ - s->strm->avail_in--; \ - s->strm->total_in_lo32++; \ - if (s->strm->total_in_lo32 == 0) \ - s->strm->total_in_hi32++; \ - } - -#define GET_UCHAR(lll,uuu) \ - GET_BITS(lll,uuu,8) - -#define GET_BIT(lll,uuu) \ - GET_BITS(lll,uuu,1) - -/*---------------------------------------------------*/ -#define GET_MTF_VAL(label1,label2,lval) \ -{ \ - if (groupPos == 0) { \ - groupNo++; \ - if (groupNo >= nSelectors) \ - RETURN(BZ_DATA_ERROR); \ - groupPos = BZ_G_SIZE; \ - gSel = s->selector[groupNo]; \ - gMinlen = s->minLens[gSel]; \ - gLimit = &(s->limit[gSel][0]); \ - gPerm = &(s->perm[gSel][0]); \ - gBase = &(s->base[gSel][0]); \ - } \ - groupPos--; \ - zn = gMinlen; \ - GET_BITS(label1, zvec, zn); \ - while (1) { \ - if (zn > 20 /* the longest code */) \ - RETURN(BZ_DATA_ERROR); \ - if (zvec <= gLimit[zn]) break; \ - zn++; \ - GET_BIT(label2, zj); \ - zvec = (zvec << 1) | zj; \ - }; \ - if (zvec - gBase[zn] < 0 \ - || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \ - RETURN(BZ_DATA_ERROR); \ - lval = gPerm[zvec - gBase[zn]]; \ -} - - -/*---------------------------------------------------*/ -Int32 BZ2_decompress ( DState* s ) -{ - UChar uc; - Int32 retVal; - Int32 minLen, maxLen; - bz_stream* strm = s->strm; - - /* stuff that needs to be saved/restored */ - Int32 i; - Int32 j; - Int32 t; - Int32 alphaSize; - Int32 nGroups; - Int32 nSelectors; - Int32 EOB; - Int32 groupNo; - Int32 groupPos; - Int32 nextSym; - Int32 nblockMAX; - Int32 nblock; - Int32 es; - Int32 N; - Int32 curr; - Int32 zt; - Int32 zn; - Int32 zvec; - Int32 zj; - Int32 gSel; - Int32 gMinlen; - Int32* gLimit; - Int32* gBase; - Int32* gPerm; - - if (s->state == BZ_X_MAGIC_1) { - /*initialise the save area*/ - s->save_i = 0; - s->save_j = 0; - s->save_t = 0; - s->save_alphaSize = 0; - s->save_nGroups = 0; - s->save_nSelectors = 0; - s->save_EOB = 0; - s->save_groupNo = 0; - s->save_groupPos = 0; - s->save_nextSym = 0; - s->save_nblockMAX = 0; - s->save_nblock = 0; - s->save_es = 0; - s->save_N = 0; - s->save_curr = 0; - s->save_zt = 0; - s->save_zn = 0; - s->save_zvec = 0; - s->save_zj = 0; - s->save_gSel = 0; - s->save_gMinlen = 0; - s->save_gLimit = NULL; - s->save_gBase = NULL; - s->save_gPerm = NULL; - } - - /*restore from the save area*/ - i = s->save_i; - j = s->save_j; - t = s->save_t; - alphaSize = s->save_alphaSize; - nGroups = s->save_nGroups; - nSelectors = s->save_nSelectors; - EOB = s->save_EOB; - groupNo = s->save_groupNo; - groupPos = s->save_groupPos; - nextSym = s->save_nextSym; - nblockMAX = s->save_nblockMAX; - nblock = s->save_nblock; - es = s->save_es; - N = s->save_N; - curr = s->save_curr; - zt = s->save_zt; - zn = s->save_zn; - zvec = s->save_zvec; - zj = s->save_zj; - gSel = s->save_gSel; - gMinlen = s->save_gMinlen; - gLimit = s->save_gLimit; - gBase = s->save_gBase; - gPerm = s->save_gPerm; - - retVal = BZ_OK; - - switch (s->state) { - - GET_UCHAR(BZ_X_MAGIC_1, uc); - if (uc != 'B') RETURN(BZ_DATA_ERROR_MAGIC); - - GET_UCHAR(BZ_X_MAGIC_2, uc); - if (uc != 'Z') RETURN(BZ_DATA_ERROR_MAGIC); - - GET_UCHAR(BZ_X_MAGIC_3, uc) - if (uc != 'h') RETURN(BZ_DATA_ERROR_MAGIC); - - GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) - if (s->blockSize100k < '1' || - s->blockSize100k > '9') RETURN(BZ_DATA_ERROR_MAGIC); - s->blockSize100k -= '0'; - - if (s->smallDecompress) { - s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); - s->ll4 = BZALLOC( - ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) - ); - if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); - } else { - s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); - if (s->tt == NULL) RETURN(BZ_MEM_ERROR); - } - - GET_UCHAR(BZ_X_BLKHDR_1, uc); - - if (uc == 0x17) goto endhdr_2; - if (uc != 0x31) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_BLKHDR_2, uc); - if (uc != 0x41) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_BLKHDR_3, uc); - if (uc != 0x59) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_BLKHDR_4, uc); - if (uc != 0x26) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_BLKHDR_5, uc); - if (uc != 0x53) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_BLKHDR_6, uc); - if (uc != 0x59) RETURN(BZ_DATA_ERROR); - - s->currBlockNo++; - if (s->verbosity >= 2) - VPrintf1 ( "\n [%d: huff+mtf ", s->currBlockNo ); - - s->storedBlockCRC = 0; - GET_UCHAR(BZ_X_BCRC_1, uc); - s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_BCRC_2, uc); - s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_BCRC_3, uc); - s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_BCRC_4, uc); - s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); - - GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1); - - s->origPtr = 0; - GET_UCHAR(BZ_X_ORIGPTR_1, uc); - s->origPtr = (s->origPtr << 8) | ((Int32)uc); - GET_UCHAR(BZ_X_ORIGPTR_2, uc); - s->origPtr = (s->origPtr << 8) | ((Int32)uc); - GET_UCHAR(BZ_X_ORIGPTR_3, uc); - s->origPtr = (s->origPtr << 8) | ((Int32)uc); - - if (s->origPtr < 0) - RETURN(BZ_DATA_ERROR); - if (s->origPtr > 10 + 100000*s->blockSize100k) - RETURN(BZ_DATA_ERROR); - - /*--- Receive the mapping table ---*/ - for (i = 0; i < 16; i++) { - GET_BIT(BZ_X_MAPPING_1, uc); - if (uc == 1) - s->inUse16[i] = True; else - s->inUse16[i] = False; - } - - for (i = 0; i < 256; i++) s->inUse[i] = False; - - for (i = 0; i < 16; i++) - if (s->inUse16[i]) - for (j = 0; j < 16; j++) { - GET_BIT(BZ_X_MAPPING_2, uc); - if (uc == 1) s->inUse[i * 16 + j] = True; - } - makeMaps_d ( s ); - if (s->nInUse == 0) RETURN(BZ_DATA_ERROR); - alphaSize = s->nInUse+2; - - /*--- Now the selectors ---*/ - GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); - GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); - for (i = 0; i < nSelectors; i++) { - j = 0; - while (True) { - GET_BIT(BZ_X_SELECTOR_3, uc); - if (uc == 0) break; - j++; - if (j >= nGroups) RETURN(BZ_DATA_ERROR); - } - s->selectorMtf[i] = j; - } - - /*--- Undo the MTF values for the selectors. ---*/ - { - UChar pos[BZ_N_GROUPS], tmp, v; - for (v = 0; v < nGroups; v++) pos[v] = v; - - for (i = 0; i < nSelectors; i++) { - v = s->selectorMtf[i]; - tmp = pos[v]; - while (v > 0) { pos[v] = pos[v-1]; v--; } - pos[0] = tmp; - s->selector[i] = tmp; - } - } - - /*--- Now the coding tables ---*/ - for (t = 0; t < nGroups; t++) { - GET_BITS(BZ_X_CODING_1, curr, 5); - for (i = 0; i < alphaSize; i++) { - while (True) { - if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR); - GET_BIT(BZ_X_CODING_2, uc); - if (uc == 0) break; - GET_BIT(BZ_X_CODING_3, uc); - if (uc == 0) curr++; else curr--; - } - s->len[t][i] = curr; - } - } - - /*--- Create the Huffman decoding tables ---*/ - for (t = 0; t < nGroups; t++) { - minLen = 32; - maxLen = 0; - for (i = 0; i < alphaSize; i++) { - if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; - if (s->len[t][i] < minLen) minLen = s->len[t][i]; - } - BZ2_hbCreateDecodeTables ( - &(s->limit[t][0]), - &(s->base[t][0]), - &(s->perm[t][0]), - &(s->len[t][0]), - minLen, maxLen, alphaSize - ); - s->minLens[t] = minLen; - } - - /*--- Now the MTF values ---*/ - - EOB = s->nInUse+1; - nblockMAX = 100000 * s->blockSize100k; - groupNo = -1; - groupPos = 0; - - for (i = 0; i <= 255; i++) s->unzftab[i] = 0; - - /*-- MTF init --*/ - { - Int32 ii, jj, kk; - kk = MTFA_SIZE-1; - for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) { - for (jj = MTFL_SIZE-1; jj >= 0; jj--) { - s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj); - kk--; - } - s->mtfbase[ii] = kk + 1; - } - } - /*-- end MTF init --*/ - - nblock = 0; - GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); - - while (True) { - - if (nextSym == EOB) break; - - if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { - - es = -1; - N = 1; - do { - if (nextSym == BZ_RUNA) es = es + (0+1) * N; else - if (nextSym == BZ_RUNB) es = es + (1+1) * N; - N = N * 2; - GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym); - } - while (nextSym == BZ_RUNA || nextSym == BZ_RUNB); - - es++; - uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ]; - s->unzftab[uc] += es; - - if (s->smallDecompress) - while (es > 0) { - if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); - s->ll16[nblock] = (UInt16)uc; - nblock++; - es--; - } - else - while (es > 0) { - if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); - s->tt[nblock] = (UInt32)uc; - nblock++; - es--; - }; - - continue; - - } else { - - if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); - - /*-- uc = MTF ( nextSym-1 ) --*/ - { - Int32 ii, jj, kk, pp, lno, off; - UInt32 nn; - nn = (UInt32)(nextSym - 1); - - if (nn < MTFL_SIZE) { - /* avoid general-case expense */ - pp = s->mtfbase[0]; - uc = s->mtfa[pp+nn]; - while (nn > 3) { - Int32 z = pp+nn; - s->mtfa[(z) ] = s->mtfa[(z)-1]; - s->mtfa[(z)-1] = s->mtfa[(z)-2]; - s->mtfa[(z)-2] = s->mtfa[(z)-3]; - s->mtfa[(z)-3] = s->mtfa[(z)-4]; - nn -= 4; - } - while (nn > 0) { - s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; - }; - s->mtfa[pp] = uc; - } else { - /* general case */ - lno = nn / MTFL_SIZE; - off = nn % MTFL_SIZE; - pp = s->mtfbase[lno] + off; - uc = s->mtfa[pp]; - while (pp > s->mtfbase[lno]) { - s->mtfa[pp] = s->mtfa[pp-1]; pp--; - }; - s->mtfbase[lno]++; - while (lno > 0) { - s->mtfbase[lno]--; - s->mtfa[s->mtfbase[lno]] - = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1]; - lno--; - } - s->mtfbase[0]--; - s->mtfa[s->mtfbase[0]] = uc; - if (s->mtfbase[0] == 0) { - kk = MTFA_SIZE-1; - for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) { - for (jj = MTFL_SIZE-1; jj >= 0; jj--) { - s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; - kk--; - } - s->mtfbase[ii] = kk + 1; - } - } - } - } - /*-- end uc = MTF ( nextSym-1 ) --*/ - - s->unzftab[s->seqToUnseq[uc]]++; - if (s->smallDecompress) - s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else - s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]); - nblock++; - - GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); - continue; - } - } - - /* Now we know what nblock is, we can do a better sanity - check on s->origPtr. - */ - if (s->origPtr < 0 || s->origPtr >= nblock) - RETURN(BZ_DATA_ERROR); - - s->state_out_len = 0; - s->state_out_ch = 0; - BZ_INITIALISE_CRC ( s->calculatedBlockCRC ); - s->state = BZ_X_OUTPUT; - if (s->verbosity >= 2) VPrintf0 ( "rt+rld" ); - - /*-- Set up cftab to facilitate generation of T^(-1) --*/ - s->cftab[0] = 0; - for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; - for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; - - if (s->smallDecompress) { - - /*-- Make a copy of cftab, used in generation of T --*/ - for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i]; - - /*-- compute the T vector --*/ - for (i = 0; i < nblock; i++) { - uc = (UChar)(s->ll16[i]); - SET_LL(i, s->cftabCopy[uc]); - s->cftabCopy[uc]++; - } - - /*-- Compute T^(-1) by pointer reversal on T --*/ - i = s->origPtr; - j = GET_LL(i); - do { - Int32 tmp = GET_LL(j); - SET_LL(j, i); - i = j; - j = tmp; - } - while (i != s->origPtr); - - s->tPos = s->origPtr; - s->nblock_used = 0; - if (s->blockRandomised) { - BZ_RAND_INIT_MASK; - BZ_GET_SMALL(s->k0); s->nblock_used++; - BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; - } else { - BZ_GET_SMALL(s->k0); s->nblock_used++; - } - - } else { - - /*-- compute the T^(-1) vector --*/ - for (i = 0; i < nblock; i++) { - uc = (UChar)(s->tt[i] & 0xff); - s->tt[s->cftab[uc]] |= (i << 8); - s->cftab[uc]++; - } - - s->tPos = s->tt[s->origPtr] >> 8; - s->nblock_used = 0; - if (s->blockRandomised) { - BZ_RAND_INIT_MASK; - BZ_GET_FAST(s->k0); s->nblock_used++; - BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; - } else { - BZ_GET_FAST(s->k0); s->nblock_used++; - } - - } - - RETURN(BZ_OK); - - - - endhdr_2: - - GET_UCHAR(BZ_X_ENDHDR_2, uc); - if (uc != 0x72) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_ENDHDR_3, uc); - if (uc != 0x45) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_ENDHDR_4, uc); - if (uc != 0x38) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_ENDHDR_5, uc); - if (uc != 0x50) RETURN(BZ_DATA_ERROR); - GET_UCHAR(BZ_X_ENDHDR_6, uc); - if (uc != 0x90) RETURN(BZ_DATA_ERROR); - - s->storedCombinedCRC = 0; - GET_UCHAR(BZ_X_CCRC_1, uc); - s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_CCRC_2, uc); - s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_CCRC_3, uc); - s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); - GET_UCHAR(BZ_X_CCRC_4, uc); - s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); - - s->state = BZ_X_IDLE; - RETURN(BZ_STREAM_END); - - default: AssertH ( False, 4001 ); - } - - AssertH ( False, 4002 ); - - save_state_and_return: - - s->save_i = i; - s->save_j = j; - s->save_t = t; - s->save_alphaSize = alphaSize; - s->save_nGroups = nGroups; - s->save_nSelectors = nSelectors; - s->save_EOB = EOB; - s->save_groupNo = groupNo; - s->save_groupPos = groupPos; - s->save_nextSym = nextSym; - s->save_nblockMAX = nblockMAX; - s->save_nblock = nblock; - s->save_es = es; - s->save_N = N; - s->save_curr = curr; - s->save_zt = zt; - s->save_zn = zn; - s->save_zvec = zvec; - s->save_zj = zj; - s->save_gSel = gSel; - s->save_gMinlen = gMinlen; - s->save_gLimit = gLimit; - s->save_gBase = gBase; - s->save_gPerm = gPerm; - - return retVal; -} - - -/*-------------------------------------------------------------*/ -/*--- end decompress.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/huffman.c b/mdk-stage1/bzlib/huffman.c deleted file mode 100644 index 8994f0bb9..000000000 --- a/mdk-stage1/bzlib/huffman.c +++ /dev/null @@ -1,232 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Huffman coding low-level stuff ---*/ -/*--- huffman.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "bzlib_private.h" - -/*---------------------------------------------------*/ -#define WEIGHTOF(zz0) ((zz0) & 0xffffff00) -#define DEPTHOF(zz1) ((zz1) & 0x000000ff) -#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3)) - -#define ADDWEIGHTS(zw1,zw2) \ - (WEIGHTOF(zw1)+WEIGHTOF(zw2)) | \ - (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2))) - -#define UPHEAP(z) \ -{ \ - Int32 zz, tmp; \ - zz = z; tmp = heap[zz]; \ - while (weight[tmp] < weight[heap[zz >> 1]]) { \ - heap[zz] = heap[zz >> 1]; \ - zz >>= 1; \ - } \ - heap[zz] = tmp; \ -} - -#define DOWNHEAP(z) \ -{ \ - Int32 zz, yy, tmp; \ - zz = z; tmp = heap[zz]; \ - while (True) { \ - yy = zz << 1; \ - if (yy > nHeap) break; \ - if (yy < nHeap && \ - weight[heap[yy+1]] < weight[heap[yy]]) \ - yy++; \ - if (weight[tmp] < weight[heap[yy]]) break; \ - heap[zz] = heap[yy]; \ - zz = yy; \ - } \ - heap[zz] = tmp; \ -} - - -/*---------------------------------------------------*/ -void BZ2_hbMakeCodeLengths ( UChar *len, - Int32 *freq, - Int32 alphaSize, - Int32 maxLen ) -{ - /*-- - Nodes and heap entries run from 1. Entry 0 - for both the heap and nodes is a sentinel. - --*/ - Int32 nNodes, nHeap, n1, n2, i, j, k; - Bool tooLong; - - Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ]; - Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ]; - Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ]; - - for (i = 0; i < alphaSize; i++) - weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8; - - while (True) { - - nNodes = alphaSize; - nHeap = 0; - - heap[0] = 0; - weight[0] = 0; - parent[0] = -2; - - for (i = 1; i <= alphaSize; i++) { - parent[i] = -1; - nHeap++; - heap[nHeap] = i; - UPHEAP(nHeap); - } - - AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 ); - - while (nHeap > 1) { - n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1); - n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1); - nNodes++; - parent[n1] = parent[n2] = nNodes; - weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]); - parent[nNodes] = -1; - nHeap++; - heap[nHeap] = nNodes; - UPHEAP(nHeap); - } - - AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 ); - - tooLong = False; - for (i = 1; i <= alphaSize; i++) { - j = 0; - k = i; - while (parent[k] >= 0) { k = parent[k]; j++; } - len[i-1] = j; - if (j > maxLen) tooLong = True; - } - - if (! tooLong) break; - - for (i = 1; i < alphaSize; i++) { - j = weight[i] >> 8; - j = 1 + (j / 2); - weight[i] = j << 8; - } - } -} - - -/*---------------------------------------------------*/ -void BZ2_hbAssignCodes ( Int32 *code, - UChar *length, - Int32 minLen, - Int32 maxLen, - Int32 alphaSize ) -{ - Int32 n, vec, i; - - vec = 0; - for (n = minLen; n <= maxLen; n++) { - for (i = 0; i < alphaSize; i++) - if (length[i] == n) { code[i] = vec; vec++; }; - vec <<= 1; - } -} - - -/*---------------------------------------------------*/ -void BZ2_hbCreateDecodeTables ( Int32 *limit, - Int32 *base, - Int32 *perm, - UChar *length, - Int32 minLen, - Int32 maxLen, - Int32 alphaSize ) -{ - Int32 pp, i, j, vec; - - pp = 0; - for (i = minLen; i <= maxLen; i++) - for (j = 0; j < alphaSize; j++) - if (length[j] == i) { perm[pp] = j; pp++; }; - - for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0; - for (i = 0; i < alphaSize; i++) base[length[i]+1]++; - - for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1]; - - for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0; - vec = 0; - - for (i = minLen; i <= maxLen; i++) { - vec += (base[i+1] - base[i]); - limit[i] = vec-1; - vec <<= 1; - } - for (i = minLen + 1; i <= maxLen; i++) - base[i] = ((limit[i-1] + 1) << 1) - base[i]; -} - - -/*-------------------------------------------------------------*/ -/*--- end huffman.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/bzlib/randtable.c b/mdk-stage1/bzlib/randtable.c deleted file mode 100644 index a1fc82cfb..000000000 --- a/mdk-stage1/bzlib/randtable.c +++ /dev/null @@ -1,128 +0,0 @@ - -/*-------------------------------------------------------------*/ -/*--- Table for randomising repetitive blocks ---*/ -/*--- randtable.c ---*/ -/*-------------------------------------------------------------*/ - -/*-- - This file is a part of bzip2 and/or libbzip2, a program and - library for lossless, block-sorting data compression. - - Copyright (C) 1996-2000 Julian R Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Julian Seward, Cambridge, UK. - jseward@acm.org - bzip2/libbzip2 version 1.0 of 21 March 2000 - - This program is based on (at least) the work of: - Mike Burrows - David Wheeler - Peter Fenwick - Alistair Moffat - Radford Neal - Ian H. Witten - Robert Sedgewick - Jon L. Bentley - - For more information on these sources, see the manual. ---*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "bzlib_private.h" - - -/*---------------------------------------------*/ -Int32 BZ2_rNums[512] = { - 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, - 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, - 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, - 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, - 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, - 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, - 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, - 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, - 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, - 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, - 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, - 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, - 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, - 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, - 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, - 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, - 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, - 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, - 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, - 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, - 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, - 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, - 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, - 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, - 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, - 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, - 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, - 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, - 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, - 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, - 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, - 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, - 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, - 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, - 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, - 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, - 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, - 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, - 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, - 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, - 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, - 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, - 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, - 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, - 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, - 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, - 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, - 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, - 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, - 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, - 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, - 936, 638 -}; - - -/*-------------------------------------------------------------*/ -/*--- end randtable.c ---*/ -/*-------------------------------------------------------------*/ diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c deleted file mode 100644 index ba0341b30..000000000 --- a/mdk-stage1/cdrom.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * Portions from Erik Troan (ewt@redhat.com) - * - * Copyright 1996 Red Hat Software - * - */ - -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <stdio.h> -#include <sys/mount.h> -#include "stage1.h" -#include "frontend.h" -#include "modules.h" -#include "probing.h" -#include "log.h" -#include "mount.h" - -#include "cdrom.h" - - -static int mount_that_cd_device(char * dev_name) -{ - char device_fullname[50]; - - strcpy(device_fullname, "/dev/"); - strcat(device_fullname, dev_name); - - return my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0); -} - - -static int test_that_cd() -{ - return access(IMAGE_LOCATION LIVE_LOCATION, R_OK); -} - - -static enum return_type try_with_device(char * dev_name, char * dev_model); - -static enum return_type do_with_device(char * dev_name, char * dev_model) -{ - if (test_that_cd()) { - enum return_type results; - umount(IMAGE_LOCATION); - results = ask_yes_no("That CDROM disc does not seem to be a " DISTRIB_NAME " Installation CDROM.\nRetry with another disc?"); - if (results == RETURN_OK) - return try_with_device(dev_name, dev_model); - return results; - } - - log_message("found a " DISTRIB_NAME " CDROM, good news!"); - - if (IS_SPECIAL_STAGE2 || ramdisk_possible()) - load_ramdisk(); /* we don't care about return code, we'll do it live if we failed */ - - if (IS_RESCUE) - umount(IMAGE_LOCATION); - - method_name = strdup("cdrom"); - return RETURN_OK; -} - -static enum return_type try_with_device(char * dev_name, char * dev_model) -{ - wait_message("Trying to access a CDROM disc (drive %s)", dev_model); - - if (mount_that_cd_device(dev_name) == -1) { - enum return_type results; - char msg[500]; - unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */ - remove_wait_message(); - - snprintf(msg, sizeof(msg), "I can't access a " DISTRIB_NAME " Installation disc in your CDROM drive (%s).\nRetry?", dev_model); - results = ask_yes_no(msg); - if (results == RETURN_OK) - return try_with_device(dev_name, dev_model); - return results; - } - remove_wait_message(); - - return do_with_device(dev_name, dev_model); -} - -int try_automatic(char ** medias, char ** medias_models) -{ - static char * already_tried[50] = { NULL }; - char ** model = medias_models; - char ** ptr = medias; - int i = 0; - while (ptr && *ptr) { - char ** p; - for (p = already_tried; p && *p; p++) - if (streq(*p, *ptr)) - goto try_automatic_already_tried; - *p = strdup(*ptr); - *(p+1) = NULL; - - wait_message("Trying to access " DISTRIB_NAME " CDROM disc (drive %s)", *model); - if (mount_that_cd_device(*ptr) != -1) { - if (!test_that_cd()) { - remove_wait_message(); - return i; - } - else - umount(IMAGE_LOCATION); - } - remove_wait_message(); - - try_automatic_already_tried: - ptr++; - model++; - i++; - } - return -1; -} - -enum return_type cdrom_prepare(void) -{ - char ** medias, ** ptr, ** medias_models; - char * choice; - int i, count = 0; - enum return_type results; - - my_insmod("ide-cd", ANY_DRIVER_TYPE, NULL); - - if (IS_AUTOMATIC) { - get_medias(CDROM, &medias, &medias_models, BUS_IDE); - if ((i = try_automatic(medias, medias_models)) != -1) - return do_with_device(medias[i], medias_models[i]); - - my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL); - get_medias(CDROM, &medias, &medias_models, BUS_SCSI); - if ((i = try_automatic(medias, medias_models)) != -1) - return do_with_device(medias[i], medias_models[i]); - - get_medias(CDROM, &medias, &medias_models, BUS_USB); - if ((i = try_automatic(medias, medias_models)) != -1) - return do_with_device(medias[i], medias_models[i]); - - unset_param(MODE_AUTOMATIC); - } else - my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL); - - - get_medias(CDROM, &medias, &medias_models, BUS_ANY); - ptr = medias; - while (ptr && *ptr) { - count++; - ptr++; - } - - if (count == 0) { - stg1_error_message("No CDROM device found."); - i = ask_insmod(SCSI_ADAPTERS); - if (i == RETURN_BACK) - return RETURN_BACK; - return cdrom_prepare(); - } - - if (count == 1) { - results = try_with_device(*medias, *medias_models); - if (results == RETURN_OK) - return RETURN_OK; - i = ask_insmod(SCSI_ADAPTERS); - if (i == RETURN_BACK) - return RETURN_BACK; - return cdrom_prepare(); - } - - results = ask_from_list_comments("Please choose the CDROM drive to use for the installation.", medias, medias_models, &choice); - if (results == RETURN_OK) { - char ** model = medias_models; - ptr = medias; - while (ptr && *ptr && model && *model) { - if (!strcmp(*ptr, choice)) - break; - ptr++; - model++; - } - results = try_with_device(choice, *model); - } else - return results; - - if (results == RETURN_OK) - return RETURN_OK; - if (results == RETURN_BACK) - return cdrom_prepare(); - - i = ask_insmod(SCSI_ADAPTERS); - if (i == RETURN_BACK) - return RETURN_BACK; - return cdrom_prepare(); -} diff --git a/mdk-stage1/cdrom.h b/mdk-stage1/cdrom.h deleted file mode 100644 index 639487eed..000000000 --- a/mdk-stage1/cdrom.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * Portions from Erik Troan (ewt@redhat.com) - * - * Copyright 1996 Red Hat Software - * - */ - -#ifndef _CDROM_H_ -#define _CDROM_H_ - -#include "stage1.h" - -enum return_type cdrom_prepare(void); - -#endif diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h deleted file mode 100644 index 823694df2..000000000 --- a/mdk-stage1/config-stage1.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _CONFIG_STAGE1_H_ -#define _CONFIG_STAGE1_H_ - -#define _GNU_SOURCE 1 - - -/* If we have more than that amount of memory (in Mbytes), we assume we can load the second stage as a ramdisk */ -#define MEM_LIMIT_RAMDISK 68 - -/* If we have more than that amount of memory (in Mbytes), we assume we can load the rescue as a ramdisk */ -#define MEM_LIMIT_RESCUE 40 - -#define DISTRIB_NAME "Mandrake Linux" - -#define RAMDISK_COMPRESSION_RATIO 1.95 - -#define LIVE_LOCATION "/Mandrake/mdkinst/" -#define RAMDISK_LOCATION "/Mandrake/base/" -#define IMAGE_LOCATION "/tmp/image" -#define STAGE2_LOCATION "/tmp/stage2" - -/* user-definable (in Makefile): DISABLE_NETWORK, DISABLE_DISK, DISABLE_CDROM, DISABLE_PCMCIA */ - - -/* some factorizing for disabling more features */ - -#ifdef DISABLE_DISK -#ifdef DISABLE_CDROM -#define DISABLE_MEDIAS -#endif -#endif - - -#endif diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c deleted file mode 100644 index bae74c9f4..000000000 --- a/mdk-stage1/dhcp.c +++ /dev/null @@ -1,672 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * Portions from Erik Troan (ewt@redhat.com) - * - * Copyright 1996 Red Hat Software - * - */ - -/* - * Portions from GRUB -- GRand Unified Bootloader - * Copyright (C) 2000 Free Software Foundation, Inc. - */ - - -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <sys/socket.h> -#include <sys/ioctl.h> -#include <net/if.h> -#include <arpa/inet.h> -#include <net/route.h> -#include <errno.h> -#include <net/ethernet.h> -#include <netinet/ip.h> -#include <netinet/udp.h> -#include <sys/time.h> -#include <time.h> -#include <fcntl.h> -#include <sys/poll.h> - -#include "stage1.h" -#include "log.h" -#include "network.h" -#include "frontend.h" -#include "automatic.h" - -#include "dhcp.h" - - -typedef int bp_int32; -typedef short bp_int16; - -#define BOOTP_OPTION_NETMASK 1 -#define BOOTP_OPTION_GATEWAY 3 -#define BOOTP_OPTION_DNS 6 -#define BOOTP_OPTION_HOSTNAME 12 -#define BOOTP_OPTION_DOMAIN 15 -#define BOOTP_OPTION_BROADCAST 28 - -#define DHCP_OPTION_REQADDR 50 -#define DHCP_OPTION_LEASE 51 -#define DHCP_OPTION_TYPE 53 -#define DHCP_OPTION_SERVER 54 -#define DHCP_OPTION_OPTIONREQ 55 -#define DHCP_OPTION_MAXSIZE 57 - -#define DHCP_OPTION_CLIENT_IDENTIFIER 61 - -#define BOOTP_CLIENT_PORT 68 -#define BOOTP_SERVER_PORT 67 - -#define BOOTP_OPCODE_REQUEST 1 -#define BOOTP_OPCODE_REPLY 2 - -#define DHCP_TYPE_DISCOVER 1 -#define DHCP_TYPE_OFFER 2 -#define DHCP_TYPE_REQUEST 3 -#define DHCP_TYPE_ACK 5 -#define DHCP_TYPE_RELEASE 7 - -#define BOOTP_VENDOR_LENGTH 64 -#define DHCP_VENDOR_LENGTH 340 - -struct bootp_request { - char opcode; - char hw; - char hwlength; - char hopcount; - bp_int32 id; - bp_int16 secs; - bp_int16 flags; - bp_int32 ciaddr, yiaddr, server_ip, bootp_gw_ip; - char hwaddr[16]; - char servername[64]; - char bootfile[128]; - char vendor[DHCP_VENDOR_LENGTH]; -} ; - -static const char vendor_cookie[] = { 99, 130, 83, 99, 255 }; - - -static unsigned int verify_checksum(void * buf2, int length2) -{ - unsigned int csum = 0; - unsigned short * sp; - - for (sp = (unsigned short *) buf2; length2 > 0; (length2 -= 2), sp++) - csum += *sp; - - while (csum >> 16) - csum = (csum & 0xffff) + (csum >> 16); - - return (csum == 0xffff); -} - - -static int initial_setup_interface(char * device, int s) { - struct sockaddr_in * addrp; - struct ifreq req; - struct rtentry route; - int true = 1; - - addrp = (struct sockaddr_in *) &req.ifr_addr; - - strcpy(req.ifr_name, device); - addrp->sin_family = AF_INET; - addrp->sin_port = 0; - memset(&addrp->sin_addr, 0, sizeof(addrp->sin_addr)); - - req.ifr_flags = 0; /* take it down */ - if (ioctl(s, SIOCSIFFLAGS, &req)) { - log_perror("SIOCSIFFLAGS (downing)"); - return -1; - } - - addrp->sin_family = AF_INET; - addrp->sin_addr.s_addr = htonl(0); - if (ioctl(s, SIOCSIFADDR, &req)) { - log_perror("SIOCSIFADDR"); - return -1; - } - - req.ifr_flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING; - if (ioctl(s, SIOCSIFFLAGS, &req)) { - log_perror("SIOCSIFFLAGS (upping)"); - return -1; - } - - memset(&route, 0, sizeof(route)); - memcpy(&route.rt_gateway, addrp, sizeof(*addrp)); - - addrp->sin_family = AF_INET; - addrp->sin_port = 0; - addrp->sin_addr.s_addr = INADDR_ANY; - memcpy(&route.rt_dst, addrp, sizeof(*addrp)); - memcpy(&route.rt_genmask, addrp, sizeof(*addrp)); - - route.rt_dev = device; - route.rt_flags = RTF_UP; - route.rt_metric = 0; - - if (ioctl(s, SIOCADDRT, &route)) { - if (errno != EEXIST) { - close(s); - log_perror("SIOCADDRT"); - return -1; - } - } - - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, &true, sizeof(true))) { - close(s); - log_perror("setsockopt"); - return -1; - } - - /* I need to sleep a bit in order for kernel to finish init of the - network device; this would allow to not send further multiple - dhcp requests when only one is needed. */ - wait_message("Bringing up networking..."); - sleep(2); - remove_wait_message(); - - return 0; -} - - -void set_missing_ip_info(struct interface_info * intf) -{ - bp_int32 ipNum = *((bp_int32 *) &intf->ip); - bp_int32 nmNum; - - if (intf->netmask.s_addr == 0) - inet_aton(guess_netmask(inet_ntoa(intf->ip)), &intf->netmask); - - nmNum = *((bp_int32 *) &intf->netmask); - - if (intf->broadcast.s_addr == 0) - *((bp_int32 *) &intf->broadcast) = (ipNum & nmNum) | ~(nmNum); - - if (intf->network.s_addr == 0) - *((bp_int32 *) &intf->network) = ipNum & nmNum; -} - -static void parse_reply(struct bootp_request * breq, struct interface_info * intf) -{ - unsigned char * chptr; - unsigned char option, length; - - if (breq->bootfile && strlen(breq->bootfile) > 0) - stage2_kickstart = strdup(breq->bootfile); - - memcpy(&intf->ip, &breq->yiaddr, 4); - - chptr = breq->vendor; - chptr += 4; - while (*chptr != 0xFF && (void *) chptr < (void *) breq->vendor + DHCP_VENDOR_LENGTH) { - char tmp_str[500]; - option = *chptr++; - if (!option) - continue; - length = *chptr++; - - switch (option) { - case BOOTP_OPTION_DNS: - memcpy(&dns_server, chptr, sizeof(dns_server)); - log_message("got dns %s", inet_ntoa(dns_server)); - if (length >= sizeof(dns_server)*2) { - memcpy(&dns_server2, chptr+sizeof(dns_server), sizeof(dns_server2)); - log_message("got dns2 %s", inet_ntoa(dns_server2)); - } - break; - - case BOOTP_OPTION_NETMASK: - memcpy(&intf->netmask, chptr, sizeof(intf->netmask)); - log_message("got netmask %s", inet_ntoa(intf->netmask)); - break; - - case BOOTP_OPTION_DOMAIN: - memcpy(tmp_str, chptr, length); - tmp_str[length] = '\0'; - domain = strdup(tmp_str); - log_message("got domain %s", domain); - break; - - case BOOTP_OPTION_BROADCAST: - memcpy(&intf->broadcast, chptr, sizeof(intf->broadcast)); - log_message("got broadcast %s", inet_ntoa(intf->broadcast)); - break; - - case BOOTP_OPTION_GATEWAY: - memcpy(&gateway, chptr, sizeof(gateway)); - log_message("got gateway %s", inet_ntoa(gateway)); - break; - - } - - chptr += length; - } - - set_missing_ip_info(intf); -} - - -static void init_vendor_codes(struct bootp_request * breq) { - memcpy(breq->vendor, vendor_cookie, sizeof(vendor_cookie)); -} - -static char gen_hwaddr[16]; - -static int prepare_request(struct bootp_request * breq, int sock, char * device) -{ - struct ifreq req; - - memset(breq, 0, sizeof(*breq)); - - breq->opcode = BOOTP_OPCODE_REQUEST; - - strcpy(req.ifr_name, device); - if (ioctl(sock, SIOCGIFHWADDR, &req)) { - log_perror("SIOCSIFHWADDR"); - return -1; - } - - breq->hw = 1; /* ethernet */ - breq->hwlength = IFHWADDRLEN; - memcpy(breq->hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN); - memcpy(gen_hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN); - - breq->hopcount = 0; - - init_vendor_codes(breq); - - return 0; -} - -static int get_vendor_code(struct bootp_request * bresp, unsigned char option, void * data) -{ - unsigned char * chptr; - unsigned int length, theOption; - - chptr = bresp->vendor + 4; - while (*chptr != 0xFF && *chptr != option) { - theOption = *chptr++; - if (!theOption) - continue; - length = *chptr++; - chptr += length; - } - - if (*chptr++ == 0xff) - return 1; - - length = *chptr++; - memcpy(data, chptr, length); - - return 0; -} - - -static unsigned long currticks(void) -{ - struct timeval tv; - unsigned long csecs; - unsigned long ticks_per_csec, ticks_per_usec; - - /* Note: 18.2 ticks/sec. */ - - gettimeofday (&tv, 0); - csecs = tv.tv_sec / 10; - ticks_per_csec = csecs * 182; - ticks_per_usec = (((tv.tv_sec - csecs * 10) * 1000000 + tv.tv_usec) * 182 / 10000000); - return ticks_per_csec + ticks_per_usec; -} - - -#define BACKOFF_LIMIT 7 -#define TICKS_PER_SEC 18 -#define MAX_ARP_RETRIES 4 - -static void rfc951_sleep(int exp) -{ - static long seed = 0; - long q; - unsigned long tmo; - - if (exp > BACKOFF_LIMIT) - exp = BACKOFF_LIMIT; - - if (!seed) - /* Initialize linear congruential generator. */ - seed = (currticks () + *(long *) &gen_hwaddr + ((short *) gen_hwaddr)[2]); - - /* Simplified version of the LCG given in Bruce Scheier's - "Applied Cryptography". */ - q = seed / 53668; - if ((seed = 40014 * (seed - 53668 * q) - 12211 * q) < 0) - seed += 2147483563l; - - /* Compute mask. */ - for (tmo = 63; tmo <= 60 * TICKS_PER_SEC && --exp > 0; tmo = 2 * tmo + 1) - ; - - /* Sleep. */ - log_message("<sleep>"); - - for (tmo = (tmo & seed) + currticks (); currticks () < tmo;); -} - - -static int handle_transaction(int s, struct bootp_request * breq, struct bootp_request * bresp, - struct sockaddr_in * server_addr, int dhcp_type) -{ - struct pollfd polls; - int i, j; - int retry = 1; - int sin; - char eth_packet[ETH_FRAME_LEN]; - struct iphdr * ip_hdr; - struct udphdr * udp_hdr; - unsigned char type; - unsigned long starttime; - int timeout = 1; - - breq->id = starttime = currticks(); - breq->secs = 0; - - sin = socket(AF_PACKET, SOCK_DGRAM, ntohs(ETH_P_IP)); - if (sin < 0) { - log_perror("af_packet socket"); - return -1; - } - - while (retry <= MAX_ARP_RETRIES) { - i = sizeof(*breq); - - if (sendto(s, breq, i, 0, (struct sockaddr *) server_addr, sizeof(*server_addr)) != i) { - close(s); - log_perror("sendto"); - return -1; - } - - polls.fd = sin; - polls.events = POLLIN; - - while (poll(&polls, 1, timeout*1000) == 1) { - - if ((j = recv(sin, eth_packet, sizeof(eth_packet), 0)) == -1) { - log_perror("recv"); - continue; - } - - /* We need to do some basic sanity checking of the header */ - if (j < (signed)(sizeof(*ip_hdr) + sizeof(*udp_hdr))) - continue; - - ip_hdr = (void *) eth_packet; - if (!verify_checksum(ip_hdr, sizeof(*ip_hdr))) - continue; - - if (ntohs(ip_hdr->tot_len) > j) - continue; - - j = ntohs(ip_hdr->tot_len); - - if (ip_hdr->protocol != IPPROTO_UDP) - continue; - - udp_hdr = (void *) (eth_packet + sizeof(*ip_hdr)); - - if (ntohs(udp_hdr->source) != BOOTP_SERVER_PORT) - continue; - - if (ntohs(udp_hdr->dest) != BOOTP_CLIENT_PORT) - continue; - /* Go on with this packet; it looks sane */ - - /* Originally copied sizeof (*bresp) - this is a security - problem due to a potential underflow of the source - buffer. Also, it trusted that the packet was properly - 0xFF terminated, which is not true in the case of the - DHCP server on Cisco 800 series ISDN router. */ - - memset (bresp, 0xFF, sizeof (*bresp)); - memcpy (bresp, (char *) udp_hdr + sizeof (*udp_hdr), j - sizeof (*ip_hdr) - sizeof (*udp_hdr)); - - /* sanity checks */ - if (bresp->id != breq->id) - continue; - if (bresp->opcode != BOOTP_OPCODE_REPLY) - continue; - if (bresp->hwlength != breq->hwlength) - continue; - if (memcmp(bresp->hwaddr, breq->hwaddr, bresp->hwlength)) - continue; - if (get_vendor_code(bresp, DHCP_OPTION_TYPE, &type) || type != dhcp_type) - continue; - if (memcmp(bresp->vendor, vendor_cookie, 4)) - continue; - return 0; - } - rfc951_sleep(retry); - breq->secs = htons ((currticks () - starttime) / 20); - retry++; - timeout *= 2; - if (timeout > 5) - timeout = 5; - } - - return -1; -} - -static void add_vendor_code(struct bootp_request * breq, unsigned char option, unsigned char length, void * data) -{ - unsigned char * chptr; - int theOption, theLength; - - chptr = breq->vendor; - chptr += 4; - while (*chptr != 0xFF && *chptr != option) { - theOption = *chptr++; - if (!theOption) continue; - theLength = *chptr++; - chptr += theLength; - } - - *chptr++ = option; - *chptr++ = length; - memcpy(chptr, data, length); - chptr[length] = 0xff; -} - - -char * dhcp_hostname = NULL; -char * dhcp_domain = NULL; - -enum return_type perform_dhcp(struct interface_info * intf) -{ - int s, i; - struct sockaddr_in server_addr; - struct sockaddr_in client_addr; - struct sockaddr_in broadcast_addr; - struct bootp_request breq, bresp; - unsigned char messageType; - unsigned int lease; - short aShort; - int num_options; - char requested_options[50]; - char * client_id_str, * client_id_hwaddr; - - if (strncmp(intf->device, "eth", 3)) { - stg1_error_message("DHCP available only for Ethernet networking."); - return RETURN_ERROR; - } - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (s < 0) { - log_perror("socket"); - return RETURN_ERROR; - } - - { - enum return_type results; - char * questions[] = { "Host name", "Domain name", NULL }; - char * questions_auto[] = { "hostname", "domain" }; - static char ** answers = NULL; - char * boulet; - - client_id_str = client_id_hwaddr = NULL; - - results = ask_from_entries_auto("If the DHCP server needs to know you by name; please fill in this information. " - "Valid answers are for example: `mybox' for hostname and `mynetwork.com' for " - "domain name, for a machine called `mybox.mynetwork.com' on the Internet.", - questions, &answers, 32, questions_auto, NULL); - if (results == RETURN_OK) - { - dhcp_hostname = answers[0]; - if ((boulet = strchr(dhcp_hostname, '.')) != NULL) - boulet[0] = '\0'; - dhcp_domain = answers[1]; - - if (*dhcp_hostname && *dhcp_domain) { - /* if we have both, then create client id from them */ - client_id_str = malloc(1 + strlen(dhcp_hostname) + 1 + strlen(dhcp_domain) + 1); - client_id_str[0] = '\0'; - sprintf(client_id_str+1, "%s.%s", dhcp_hostname, dhcp_domain); - } - } - } - - if (initial_setup_interface(intf->device, s) != 0) { - close(s); - return RETURN_ERROR; - } - - if (prepare_request(&breq, s, intf->device) != 0) { - close(s); - return RETURN_ERROR; - } - - messageType = DHCP_TYPE_DISCOVER; - add_vendor_code(&breq, DHCP_OPTION_TYPE, 1, &messageType); - - /* add pieces needed to have DDNS/DHCP IP selection based on requested name */ - if (dhcp_hostname && *dhcp_hostname) { /* pick client id form based on absence or presence of domain name */ - if (*dhcp_domain) /* alternate style <hostname>.<domainname> */ - add_vendor_code(&breq, DHCP_OPTION_CLIENT_IDENTIFIER, strlen(client_id_str+1)+1, client_id_str); - else { /* usual style (aka windows / dhcpcd) */ - /* but put MAC in form required for client identifier first */ - client_id_hwaddr = malloc(IFHWADDRLEN+2); - client_id_hwaddr[0] = 1; /* set flag for ethernet */ - memcpy(client_id_hwaddr+1, gen_hwaddr, IFHWADDRLEN); - add_vendor_code(&breq, DHCP_OPTION_CLIENT_IDENTIFIER, IFHWADDRLEN+1, client_id_hwaddr); - } - /* this is the one that the dhcp server really wants for DDNS updates */ - add_vendor_code(&breq, BOOTP_OPTION_HOSTNAME, strlen(dhcp_hostname), dhcp_hostname); - log_message("DHCP: telling server to use name = %s", dhcp_hostname); - } - - memset(&client_addr.sin_addr, 0, sizeof(&client_addr.sin_addr)); - client_addr.sin_family = AF_INET; - client_addr.sin_port = htons(BOOTP_CLIENT_PORT); /* bootp client */ - - if (bind(s, (struct sockaddr *) &client_addr, sizeof(client_addr))) { - log_perror("bind"); - return RETURN_ERROR; - } - - broadcast_addr.sin_family = AF_INET; - broadcast_addr.sin_port = htons(BOOTP_SERVER_PORT); /* bootp server */ - memset(&broadcast_addr.sin_addr, 0xff, sizeof(broadcast_addr.sin_addr)); /* broadcast */ - - log_message("DHCP: sending DISCOVER"); - - wait_message("Sending DHCP request..."); - i = handle_transaction(s, &breq, &bresp, &broadcast_addr, DHCP_TYPE_OFFER); - remove_wait_message(); - - if (i != 0) { - stg1_error_message("No DHCP reply received."); - close(s); - return RETURN_ERROR; - } - - server_addr.sin_family = AF_INET; - server_addr.sin_port = htons(BOOTP_SERVER_PORT); /* bootp server */ - if (get_vendor_code(&bresp, DHCP_OPTION_SERVER, &server_addr.sin_addr)) { - close(s); - log_message("DHCPOFFER didn't include server address"); - return RETURN_ERROR; - } - - init_vendor_codes(&breq); - messageType = DHCP_TYPE_REQUEST; - add_vendor_code(&breq, DHCP_OPTION_TYPE, 1, &messageType); - add_vendor_code(&breq, DHCP_OPTION_SERVER, 4, &server_addr.sin_addr); - add_vendor_code(&breq, DHCP_OPTION_REQADDR, 4, &bresp.yiaddr); - - /* if used the first time, then have to use it again */ - if (dhcp_hostname && *dhcp_hostname) { /* add pieces needed to have DDNS/DHCP IP selection based on requested name */ - if (dhcp_domain && *dhcp_domain) /* alternate style */ - add_vendor_code(&breq, DHCP_OPTION_CLIENT_IDENTIFIER, strlen(client_id_str+1)+1, client_id_str); - else /* usual style (aka windows / dhcpcd) */ - add_vendor_code(&breq, DHCP_OPTION_CLIENT_IDENTIFIER, IFHWADDRLEN+1, client_id_hwaddr); - /* this is the one that the dhcp server really wants for DDNS updates */ - add_vendor_code(&breq, BOOTP_OPTION_HOSTNAME, strlen(dhcp_hostname), dhcp_hostname); - } - - aShort = ntohs(sizeof(struct bootp_request)); - add_vendor_code(&breq, DHCP_OPTION_MAXSIZE, 2, &aShort); - - num_options = 0; - requested_options[num_options++] = BOOTP_OPTION_NETMASK; - requested_options[num_options++] = BOOTP_OPTION_GATEWAY; - requested_options[num_options++] = BOOTP_OPTION_DNS; - requested_options[num_options++] = BOOTP_OPTION_DOMAIN; - requested_options[num_options++] = BOOTP_OPTION_BROADCAST; - add_vendor_code(&breq, DHCP_OPTION_OPTIONREQ, num_options, requested_options); - - /* request a lease of 1 hour */ - i = htonl(60 * 60); - add_vendor_code(&breq, DHCP_OPTION_LEASE, 4, &i); - - log_message("DHCP: sending REQUEST"); - - i = handle_transaction(s, &breq, &bresp, &broadcast_addr, DHCP_TYPE_ACK); - - if (i != 0) { - close(s); - return RETURN_ERROR; - } - - if (get_vendor_code(&bresp, DHCP_OPTION_LEASE, &lease)) { - log_message("failed to get lease time\n"); - return RETURN_ERROR; - } - lease = ntohl(lease); - - close(s); - - intf->netmask.s_addr = 0; - intf->broadcast.s_addr = 0; - intf->network.s_addr = 0; - - parse_reply(&bresp, intf); - - return RETURN_OK; -} diff --git a/mdk-stage1/dhcp.h b/mdk-stage1/dhcp.h deleted file mode 100644 index 71d062e9c..000000000 --- a/mdk-stage1/dhcp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Guillaume Cottenceau (gc@mandrakesoft.com) - * - * Copyright 2000 MandrakeSoft - * - * View the homepage: http://us.mandrakesoft.com/~gc/html/stage1.html - * - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* - * Portions from GRUB -- GRand Unified Bootloader - * Copyright (C) 2000 Free Software Foundation, Inc. - * - * Itself based on etherboot-4.6.4 by Martin Renters. - * - */ - -#ifndef _DHCP_H_ -#define _DHCP_H_ - -#include "stage1.h" -#include "network.h" - -enum return_type perform_dhcp(struct interface_info * intf); - -extern char * dhcp_hostname; - -#endif diff --git a/mdk-stage1/dietlibc/.cvsignore b/mdk-stage1/dietlibc/.cvsignore deleted file mode 100644 index 7c88cb004..000000000 --- a/mdk-stage1/dietlibc/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -t -elftrunc -mapfile -t1 -load -compile -bin-alpha -bin-arm -bin-i386 -bin-mips -bin-ppc -bin-sparc diff --git a/mdk-stage1/dietlibc/AUTHOR b/mdk-stage1/dietlibc/AUTHOR deleted file mode 100644 index 6d8ab1a05..000000000 --- a/mdk-stage1/dietlibc/AUTHOR +++ /dev/null @@ -1 +0,0 @@ -Felix von Leitner <felix-dietlibc@fefe.de> diff --git a/mdk-stage1/dietlibc/Makefile b/mdk-stage1/dietlibc/Makefile deleted file mode 100644 index b6e7b2783..000000000 --- a/mdk-stage1/dietlibc/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -ARCH=$(shell uname -m | sed 's/i[4-9]86/i386/') - -OBJDIR=bin-$(ARCH) - -all: $(OBJDIR) $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a $(OBJDIR)/librpc.a $(OBJDIR)/diet - -CFLAGS=-pipe -CROSS= - -VPATH=lib:libstdio:libugly:libcruft:libcrypt:libshell:liblatin1:librpc:libregex:syscalls.c - -SYSCALLOBJ=$(patsubst syscalls.s/%.S,$(OBJDIR)/%.o,$(wildcard syscalls.s/*.S)) - -LIBOBJ=$(patsubst lib/%.c,$(OBJDIR)/%.o,$(wildcard lib/*.c)) -LIBUGLYOBJ=$(patsubst libugly/%.c,$(OBJDIR)/%.o,$(wildcard libugly/*.c)) -LIBSTDIOOBJ=$(patsubst libstdio/%.c,$(OBJDIR)/%.o,$(wildcard libstdio/*.c)) -LIBCRUFTOBJ=$(patsubst libcruft/%.c,$(OBJDIR)/%.o,$(wildcard libcruft/*.c)) -LIBCRYPTOBJ=$(patsubst libcrypt/%.c,$(OBJDIR)/%.o,$(wildcard libcrypt/*.c)) -LIBSHELLOBJ=$(patsubst libshell/%.c,$(OBJDIR)/%.o,$(wildcard libshell/*.c)) - -LIBRPCOBJ=$(patsubst librpc/%.c,$(OBJDIR)/%.o,$(wildcard librpc/*.c)) -LIBREGEXOBJ=$(patsubst libregex/%.c,$(OBJDIR)/%.o,$(wildcard libregex/*.c)) - -include $(ARCH)/Makefile.add - -ifeq ($(CFLAGS),-pipe) -CFLAGS+=-O -fomit-frame-pointer -endif - -ifneq ($(DEBUG),) -CFLAGS = -g -COMMENT = : -endif -CFLAGS += -Wall -Wno-switch - -PWD=$(shell pwd) - -.SUFFIXES: -.SUFFIXES: .S .c - -$(OBJDIR): - mkdir $@ - -% :: %,v - -$(OBJDIR)/%.o: %.S - $(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: %.c - $(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $< -o $@ - $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@ - -DIETLIBC_OBJ = $(SYSCALLOBJ) $(LIBOBJ) $(LIBSTDIOOBJ) $(LIBUGLYOBJ) \ -$(LIBCRUFTOBJ) $(LIBCRYPTOBJ) $(LIBSHELLOBJ) $(LIBREGEXOBJ) \ -$(OBJDIR)/__longjmp.o $(OBJDIR)/setjmp.o $(OBJDIR)/unified.o \ -$(OBJDIR)/mmap.o $(OBJDIR)/clone.o - -$(OBJDIR)/dietlibc.a: $(DIETLIBC_OBJ) $(OBJDIR)/start.o - $(CROSS)ar cru $@ $(DIETLIBC_OBJ) - -$(OBJDIR)/librpc.a: $(LIBRPCOBJ) - $(CROSS)ar cru $@ $(LIBRPCOBJ) - -LIBLATIN1_OBJS=$(patsubst liblatin1/%.c,$(OBJDIR)/%.o,$(wildcard liblatin1/*.c)) -$(OBJDIR)/liblatin1.a: $(LIBLATIN1_OBJS) - $(CROSS)ar cru $@ $^ - -$(OBJDIR)/libdietc.so: $(OBJDIR)/dietlibc.a - $(CROSS)ld -whole-archive -shared -o $@ $^ - -$(SYSCALLOBJ): syscalls.h - -$(OBJDIR)/diet: diet.c $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a - $(CROSS)$(CC) -Iinclude $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(PWD)\" - $(CROSS)strip -R .comment -R .note $@ - -$(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load - -$(OBJDIR)/compile: - echo 'exec gcc $(CFLAGS) -I$(PWD)/$(OBJDIR)/include -c $${1+"$$@"}' > $@ - chmod 755 $@ - -$(OBJDIR)/load: - echo 'main="$$1"; shift; exec gcc -nostdlib -o "$$main" $(PWD)/$(OBJDIR)/start.o "$$main".o $${1+"$$@"} $(PWD)/$(OBJDIR)/dietlibc.a -lgcc' > $@ - chmod 755 $@ - -clean: - rm -f *.o *.a t t1 compile load exports mapfile libdietc.so - rm -rf bin-* - -tar: clean - rm -f armv4l - ln -sf arm armv4l - cd ..; tar cvvf dietlibc.tar.bz2 dietlibc --use=bzip2 --exclude CVS - -$(OBJDIR)/exports: $(OBJDIR)/dietlibc.a - nm -g $(OBJDIR)/dietlibc.a | grep -w T | awk '{ print $$3 }' | sort -u > $(OBJDIR)/exports - -.PHONY: t t1 -t: - $(CROSS)$(CC) -g $(CFLAGS) -fno-builtin -nostdlib -Iinclude -o t t.c $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a -lgcc -Wl,-Map,mapfile - -t1: - $(CROSS)$(CC) -g -o t1 t.c - -install: $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a $(OBJDIR)/diet - cp $(OBJDIR)/start.o $(INSTALLPREFIX)$(prefix)/lib/dietstart.o - cp $(OBJDIR)/dietlibc.a $(INSTALLPREFIX)$(prefix)/lib/libdietc.a - cp $(OBJDIR)/liblatin1.a $(INSTALLPREFIX)$(prefix)/lib/libdietlatin1.a - cp $(OBJDIR)/diet $(INSTALLPREFIX)$(prefix)/bin/diet - -.PHONY: sparc ppc mips arm alpha i386 - -arm sparc ppc alpha i386: - $(MAKE) ARCH=$@ CROSS=$@-linux- all t bin-$@/libdietc.so - -mips: - $(MAKE) ARCH=$@ CROSS=$@-linux-gnu- all t bin-$@/libdietc.so - -cross: - $(MAKE) arm sparc ppc alpha i386 mips - - -# these depend on dietfeatures.h for large file backward compatibility -$(OBJDIR)/__fstat64.o $(OBJDIR)/__lstat64.o $(OBJDIR)/__stat64.o: dietfeatures.h - -# these depend on dietfeatures.h for thread support -$(OBJDIR)/alloc.o $(OBJDIR)/perror.o $(OBJDIR)/logging.o $(OBJDIR)/unified.o: dietfeatures.h - -# these depend on dietfeatures.h for linker warnings -$(OBJDIR)/assert_fail.o $(OBJDIR)/sprintf.o $(OBJDIR)/vsnprintf.o $(OBJDIR)/___div.o $(OBJDIR)/fflush.o $(OBJDIR)/setvbuf.o $(OBJDIR)/system.o $(OBJDIR)/sendfile.o $(OBJDIR)/setenv.o: dietfeatures.h - -# these depend on dietfeatures.h for buffered stdio -fclose.o $(OBJDIR)/fdglue.o $(OBJDIR)/fflush.o $(OBJDIR)/fgetc.o $(OBJDIR)/fputc.o $(OBJDIR)/fread.o $(OBJDIR)/fseek.o $(OBJDIR)/printf.o $(OBJDIR)/setvbuf.o $(OBJDIR)/stderr.o $(OBJDIR)/stdin.o $(OBJDIR)/stdout.o $(OBJDIR)/fwrite.o $(OBJDIR)/puts.o: dietfeatures.h - -# these depend on dietfeatures.h for fast string routines -strcasecmp.o $(OBJDIR)/strcat.o $(OBJDIR)/strchr.o $(OBJDIR)/strcmp.o $(OBJDIR)/strcpy.o $(OBJDIR)/strlen.o $(OBJDIR)/strncasecmp.o $(OBJDIR)/strncat.o $(OBJDIR)/strrchr.o: dietfeatures.h - -# these depend on dietfeatures.h for /proc -$(OBJDIR)/tty.o: dietfeatures.h - -# these depend on dietfeatures.h for ungetc support ;-) -$(OBJDIR)/ungetc.o: dietfeatures.h - -# these depend on dietfeatures.h for WANT_TZFILE_PARSER -$(OBJDIR)/localtime_r.o: dietfeatures.h diff --git a/mdk-stage1/dietlibc/README b/mdk-stage1/dietlibc/README deleted file mode 100644 index ce9838832..000000000 --- a/mdk-stage1/dietlibc/README +++ /dev/null @@ -1,43 +0,0 @@ -diet libc to statically link programs that don't need all the bloat -from glibc. - -malloc, printf and scanf contributed from Olaf Dreesen. - -To compile: - - $ make - -make should compile the diet libc itself without warnings. In addition -to the diet libc, the default make target includes t, which is a test -program and probably contains code which produces warnings. You can -safely ignore them. - -When make is done, it will have created dietlibc.a in bin-i386 (or -bin-ppc, bin-alpha, bin-sparc, bin-ppc or bin-arm, depending on your -architecture). In that directory you will also find a program called -"diet", which you need to copy in a directory in your $PATH: - - # install bin-i386/diet /usr/local/bin - -Then you can compile programs by prepending diet to the command line, -i.e. - - $ diet gcc -s -Os -pipe -o t t.c - -diet is cross-compiler friendly and can also be used like this: - - $ diet sparc-linux-gcc -o t t.c - -diet will then link against dietlibc.a from bin-sparc, of course. -diet comes with a man page (diet.1), which you can copy to an -appropriate location, too: - - # cp diet.1 /usr/local/man/man1 - -After you compiled the diet libc successfully, I invite you to check out -the embedded utils (http://www.fefe.de/embutils/) and the diet libc -binary repository (ftp://foobar.math.fu-berlin.de/pub/dietlibc/), too. -The embedded utils are small replacements for common utilities like mv, -chown, ls, and even a small tar that can extract tar files. The binary -repository contains a few utilities I linked against the diet libc, for -example gzip, bzip2 and fdisk. diff --git a/mdk-stage1/dietlibc/alpha/Makefile.add b/mdk-stage1/dietlibc/alpha/Makefile.add deleted file mode 100644 index 10ff0faef..000000000 --- a/mdk-stage1/dietlibc/alpha/Makefile.add +++ /dev/null @@ -1,5 +0,0 @@ - -CFLAGS+=-Os -Iinclude -fomit-frame-pointer -fstrict-aliasing -VPATH:=alpha:syscalls.s:$(VPATH) - -LIBOBJ+=$(patsubst %,$(OBJDIR)/%,divq.o divl.o remq.o reml.o seteuid.o __time.o) diff --git a/mdk-stage1/dietlibc/alpha/__longjmp.S b/mdk-stage1/dietlibc/alpha/__longjmp.S deleted file mode 100644 index d86d76717..000000000 --- a/mdk-stage1/dietlibc/alpha/__longjmp.S +++ /dev/null @@ -1,38 +0,0 @@ -#ifdef __alpha__ - -#include <setjmp.h> - -.text -.align 2 - -.global __longjmp -__longjmp: - mov $17, $0 /* a1 -> v0 */ - - ldq $9, (JB_S0*8) ($16) /* s0 */ - ldq $10, (JB_S1*8) ($16) /* s1 */ - ldq $11, (JB_S2*8) ($16) /* s2 */ - ldq $12, (JB_S3*8) ($16) /* s3 */ - ldq $13, (JB_S4*8) ($16) /* s4 */ - ldq $14, (JB_S5*8) ($16) /* s5 */ - - ldq $26, (JB_PC*8) ($16) /* ra */ - ldq $fp, (JB_FP*8) ($16) /* fp */ - ldq $1, (JB_SP*8) ($16) /* sp */ - - ldt $f2, (JB_F2*8) ($16) /* f2 */ - ldt $f3, (JB_F3*8) ($16) /* f3 */ - ldt $f4, (JB_F4*8) ($16) /* f4 */ - ldt $f5, (JB_F5*8) ($16) /* f5 */ - ldt $f6, (JB_F6*8) ($16) /* f6 */ - ldt $f7, (JB_F7*8) ($16) /* f7 */ - ldt $f8, (JB_F8*8) ($16) /* f8 */ - ldt $f9, (JB_F9*8) ($16) /* f9 */ - - cmoveq $0, 0x1, $0 - mov $1, $sp - - ret $31, ($26), 1 - - -#endif diff --git a/mdk-stage1/dietlibc/alpha/__time.c b/mdk-stage1/dietlibc/alpha/__time.c deleted file mode 100644 index 07275e0e3..000000000 --- a/mdk-stage1/dietlibc/alpha/__time.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <time.h> -#include <sys/time.h> - -time_t time(time_t *foo) { - struct timeval tv; - time_t tmp=(time_t)-1; - if (gettimeofday(&tv,0)==0) - tmp=(time_t)tv.tv_sec; - if (foo) *foo=tmp; - return tmp; -} diff --git a/mdk-stage1/dietlibc/alpha/accept.S b/mdk-stage1/dietlibc/alpha/accept.S deleted file mode 100644 index 459c45d7a..000000000 --- a/mdk-stage1/dietlibc/alpha/accept.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(accept,accept,__libc_accept) diff --git a/mdk-stage1/dietlibc/alpha/bind.S b/mdk-stage1/dietlibc/alpha/bind.S deleted file mode 100644 index 86a04cb70..000000000 --- a/mdk-stage1/dietlibc/alpha/bind.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(bind,bind) diff --git a/mdk-stage1/dietlibc/alpha/clone.S b/mdk-stage1/dietlibc/alpha/clone.S deleted file mode 100644 index b7e32d707..000000000 --- a/mdk-stage1/dietlibc/alpha/clone.S +++ /dev/null @@ -1,42 +0,0 @@ -#include "syscalls.h" -#include <asm/errno.h> - -.text -.align 2 -.weak clone -clone: -.global __clone -.type __clone,@function -__clone: - ldiq $0, EINVAL - beq $16, .Lerror - beq $17, .Lerror - - subq $17, 16, $17 - stq $16, 0($17) - stq $19, 8($17) - mov $18, $16 - - lda $0, __NR_clone($31) - callsys - bne $19, .Lerror - - beq $0, .Lstart_thread - - ret $31, ($26), 0x01 - -.Lerror: - jmp error_unified_syscall - -.Lstart_thread: - clr $fp - - ldq $27, 0($sp) - ldq $16, 8($sp) - - jsr $26, ($27), 0x04 - - ldgp $gp, 0($26) - mov $0, $16 - jsr $26, exit - diff --git a/mdk-stage1/dietlibc/alpha/connect.S b/mdk-stage1/dietlibc/alpha/connect.S deleted file mode 100644 index c191ca808..000000000 --- a/mdk-stage1/dietlibc/alpha/connect.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(connect,connect,__libc_connect) diff --git a/mdk-stage1/dietlibc/alpha/divl.S b/mdk-stage1/dietlibc/alpha/divl.S deleted file mode 100644 index 3af22a5e8..000000000 --- a/mdk-stage1/dietlibc/alpha/divl.S +++ /dev/null @@ -1,101 +0,0 @@ -/* taken from glibc 2.2 */ - - .set noreorder - .set noat - - .ent __divlu - .globl __divlu - - .align 3 -__divlu : - lda $30 , - 48 ($30 ) - .frame $30 , 48 , $23 , 0 - .prologue 0 -.Ludiv: - stq $1 , 0($30 ) - zapnot $25 ,15, $1 - stq $2 , 8($30 ) - zapnot $24 ,15, $2 - stq $0 , 16($30 ) - clr $27 - stq $3 , 24($30 ) - ldiq $0 , 1 - stq $4 ,32($30 ) - beq $1 , .Ldivbyzero - - .align 3 - - -1: cmpult $1 , $2 , $at - s8addq $1 , $31 , $1 - s8addq $0 , $31 , $0 - bne $at , 1b - - - -3: addq $27 ,$0 , $4 - srl $0 , 1, $0 - cmpule $1 , $2 , $at - subq $2 , $1 , $3 - cmovne $at ,$4 , $27 - srl $1 , 1, $1 - cmovne $at , $3 , $2 - bne $0 , 3b - -.Ldone: ldq $1 , 0($30 ) - ldq $2 , 8($30 ) - ldq $0 , 16($30 ) - ldq $3 , 24($30 ) - ldq $4 ,32($30 ) - lda $30 , 48 ($30 ) - ret $31 , ($23 ), 1 - -.Ldivbyzero: - mov $16 , $3 - ldiq $16 , -2 - call_pal 170 - mov $3 , $16 - clr $27 - br .Ldone - - .end __divlu - - .ent __divl - .globl __divl - - .align 3 -__divl : - lda $30 , - 48 ($30 ) - .frame $30 , 48 , $23 , 0 - .prologue 0 - or $24 , $25 , $at - sextl $at , $at - bge $at , .Ludiv - - - stq $24 , 0($30 ) - negl $24 , $at - stq $25 , 8($30 ) - cmovge $at , $at , $24 - stq $23 , 16($30 ) - negl $25 , $at - stq $3 , 24($30 ) - cmovge $at , $at , $25 - - - bsr $23 , __divlu - - - ldq $24 , 0($30 ) - ldq $25 , 8($30 ) - xor $24 , $25 , $at - negl $27 , $3 - sextl $at , $at - ldq $23 , 16($30 ) - cmovlt $at , $3 , $27 - ldq $3 , 24($30 ) - - lda $30 , 48 ($30 ) - ret $31 , ($23 ), 1 - - .end __divl diff --git a/mdk-stage1/dietlibc/alpha/divq.S b/mdk-stage1/dietlibc/alpha/divq.S deleted file mode 100644 index cf70862c4..000000000 --- a/mdk-stage1/dietlibc/alpha/divq.S +++ /dev/null @@ -1,102 +0,0 @@ -/* taken from glibc 2.2 */ - - .set noreorder - .set noat - - .ent __divqu - .globl __divqu - - .align 3 -__divqu : - lda $30 , - 48 ($30 ) - .frame $30 , 48 , $23 , 0 - .prologue 0 -$udiv: - stq $1 , 0($30 ) - mov $25 , $1 - stq $2 , 8($30 ) - mov $24 , $2 - stq $0 , 16($30 ) - clr $27 - stq $3 , 24($30 ) - ldiq $0 , 1 - stq $4 ,32($30 ) - beq $1 , $divbyzero - - .align 3 - - -1: cmpult $1 , $2 , $at - blt $1 , 2f - addq $1 , $1 , $1 - addq $0 , $0 , $0 - bne $at , 1b - unop -2: -3: addq $27 ,$0 , $4 - srl $0 , 1, $0 - cmpule $1 , $2 , $at - subq $2 , $1 , $3 - cmovne $at ,$4 , $27 - srl $1 , 1, $1 - cmovne $at , $3 , $2 - bne $0 , 3b - -$done: ldq $1 , 0($30 ) - ldq $2 , 8($30 ) - ldq $0 , 16($30 ) - ldq $3 , 24($30 ) - ldq $4 ,32($30 ) - lda $30 , 48 ($30 ) - ret $31 , ($23 ), 1 - -$divbyzero: - mov $16 , $3 - ldiq $16 , -2 - call_pal 170 - mov $3 , $16 - clr $27 - br $done - - .end __divqu - - .ent __divq - .globl __divq - - .align 3 -__divq : - lda $30 , - 48 ($30 ) - .frame $30 , 48 , $23 , 0 - .prologue 0 - or $24 , $25 , $at - - bge $at , $udiv - - - stq $24 , 0($30 ) - negq $24 , $at - stq $25 , 8($30 ) - cmovge $at , $at , $24 - stq $23 , 16($30 ) - negq $25 , $at - stq $3 , 24($30 ) - cmovge $at , $at , $25 - - - bsr $23 , __divqu - - - ldq $24 , 0($30 ) - ldq $25 , 8($30 ) - xor $24 , $25 , $at - negq $27 , $3 - - ldq $23 , 16($30 ) - cmovlt $at , $3 , $27 - ldq $3 , 24($30 ) - - lda $30 , 48 ($30 ) - ret $31 , ($23 ), 1 - - .end __divq - diff --git a/mdk-stage1/dietlibc/alpha/getegid.S b/mdk-stage1/dietlibc/alpha/getegid.S deleted file mode 100644 index 89c35d45e..000000000 --- a/mdk-stage1/dietlibc/alpha/getegid.S +++ /dev/null @@ -1,11 +0,0 @@ -.text -.align 2 -.global getegid -getegid: - lda $sp,-8($sp) - stq $26, 0($sp) - jsr getgid - ldq $26, 0($sp) - lda $sp, 8($sp) - cmovge $0, $20, $0 - ret diff --git a/mdk-stage1/dietlibc/alpha/geteuid.S b/mdk-stage1/dietlibc/alpha/geteuid.S deleted file mode 100644 index 087ca7348..000000000 --- a/mdk-stage1/dietlibc/alpha/geteuid.S +++ /dev/null @@ -1,11 +0,0 @@ -.text -.align 2 -.global geteuid -geteuid: - lda $sp,-8($sp) - stq $26, 0($sp) - jsr getuid - ldq $26, 0($sp) - lda $sp, 8($sp) - cmovge $0, $20, $0 - ret diff --git a/mdk-stage1/dietlibc/alpha/getgid.S b/mdk-stage1/dietlibc/alpha/getgid.S deleted file mode 100644 index 7350082f3..000000000 --- a/mdk-stage1/dietlibc/alpha/getgid.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getxgid,getgid) diff --git a/mdk-stage1/dietlibc/alpha/getpeername.S b/mdk-stage1/dietlibc/alpha/getpeername.S deleted file mode 100644 index 3b3f48b1a..000000000 --- a/mdk-stage1/dietlibc/alpha/getpeername.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getpeername,getpeername) diff --git a/mdk-stage1/dietlibc/alpha/getpid.S b/mdk-stage1/dietlibc/alpha/getpid.S deleted file mode 100644 index d8b3523b2..000000000 --- a/mdk-stage1/dietlibc/alpha/getpid.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getxpid,getpid) diff --git a/mdk-stage1/dietlibc/alpha/getppid.S b/mdk-stage1/dietlibc/alpha/getppid.S deleted file mode 100644 index e181268c3..000000000 --- a/mdk-stage1/dietlibc/alpha/getppid.S +++ /dev/null @@ -1,11 +0,0 @@ -.text -.align 2 -.global getppid -getppid: - lda $sp,-8($sp) - stq $26, 0($sp) - jsr getpid - ldq $26, 0($sp) - lda $sp, 8($sp) - cmovge $0, $20, $0 - ret diff --git a/mdk-stage1/dietlibc/alpha/getsockname.S b/mdk-stage1/dietlibc/alpha/getsockname.S deleted file mode 100644 index 2727d88da..000000000 --- a/mdk-stage1/dietlibc/alpha/getsockname.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getsockname,getsockname) diff --git a/mdk-stage1/dietlibc/alpha/getsockopt.S b/mdk-stage1/dietlibc/alpha/getsockopt.S deleted file mode 100644 index 44b4a910a..000000000 --- a/mdk-stage1/dietlibc/alpha/getsockopt.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getsockopt,getsockopt) diff --git a/mdk-stage1/dietlibc/alpha/getuid.S b/mdk-stage1/dietlibc/alpha/getuid.S deleted file mode 100644 index fcb5570c2..000000000 --- a/mdk-stage1/dietlibc/alpha/getuid.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(getxuid,getuid) diff --git a/mdk-stage1/dietlibc/alpha/listen.S b/mdk-stage1/dietlibc/alpha/listen.S deleted file mode 100644 index 1102831d4..000000000 --- a/mdk-stage1/dietlibc/alpha/listen.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(listen,listen) diff --git a/mdk-stage1/dietlibc/alpha/mmap.S b/mdk-stage1/dietlibc/alpha/mmap.S deleted file mode 100644 index 2e57fbb74..000000000 --- a/mdk-stage1/dietlibc/alpha/mmap.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(mmap,mmap) diff --git a/mdk-stage1/dietlibc/alpha/msgctl.S b/mdk-stage1/dietlibc/alpha/msgctl.S deleted file mode 100644 index d7caed2cc..000000000 --- a/mdk-stage1/dietlibc/alpha/msgctl.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(msgctl,msgctl) diff --git a/mdk-stage1/dietlibc/alpha/msgget.S b/mdk-stage1/dietlibc/alpha/msgget.S deleted file mode 100644 index 518d67ac4..000000000 --- a/mdk-stage1/dietlibc/alpha/msgget.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(msgget,msgget) diff --git a/mdk-stage1/dietlibc/alpha/msgrcv.S b/mdk-stage1/dietlibc/alpha/msgrcv.S deleted file mode 100644 index ab62e6c30..000000000 --- a/mdk-stage1/dietlibc/alpha/msgrcv.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(msgrcv,msgrcv) diff --git a/mdk-stage1/dietlibc/alpha/msgsnd.S b/mdk-stage1/dietlibc/alpha/msgsnd.S deleted file mode 100644 index 890a996a2..000000000 --- a/mdk-stage1/dietlibc/alpha/msgsnd.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(msgsnd,msgsnd) diff --git a/mdk-stage1/dietlibc/alpha/pipe.S b/mdk-stage1/dietlibc/alpha/pipe.S deleted file mode 100644 index 3dfef10bf..000000000 --- a/mdk-stage1/dietlibc/alpha/pipe.S +++ /dev/null @@ -1,17 +0,0 @@ -#include "syscalls.h" - -.text -.align 2 -.global pipe -.type pipe,@function -pipe: - lda $0, __NR_pipe($31) - callsys - bne $19, .Lerror - stl $0, 0($16) - stl $20, 4($16) - clr $0 - ret $31, ($26), 0x01 -.Lerror: - br error_unified_syscall - diff --git a/mdk-stage1/dietlibc/alpha/recv.S b/mdk-stage1/dietlibc/alpha/recv.S deleted file mode 100644 index 17664f2e2..000000000 --- a/mdk-stage1/dietlibc/alpha/recv.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(recv,recv,__libc_recv) diff --git a/mdk-stage1/dietlibc/alpha/recvfrom.S b/mdk-stage1/dietlibc/alpha/recvfrom.S deleted file mode 100644 index d8e3922af..000000000 --- a/mdk-stage1/dietlibc/alpha/recvfrom.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(recvfrom,recvfrom,__libc_recvfrom) diff --git a/mdk-stage1/dietlibc/alpha/recvmsg.S b/mdk-stage1/dietlibc/alpha/recvmsg.S deleted file mode 100644 index 6ce87eebb..000000000 --- a/mdk-stage1/dietlibc/alpha/recvmsg.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(recvmsg,recvmsg) diff --git a/mdk-stage1/dietlibc/alpha/reml.S b/mdk-stage1/dietlibc/alpha/reml.S deleted file mode 100644 index 2d89e3280..000000000 --- a/mdk-stage1/dietlibc/alpha/reml.S +++ /dev/null @@ -1,101 +0,0 @@ -/* taken from glibc 2.2 */ - - .set noreorder - .set noat - - .ent __remlu - .globl __remlu - - .align 3 -__remlu : - lda $30 , -32($30) - .frame $30 , 32 , $23 , 0 - .prologue 0 -.Ludiv: - stq $1 , 0($30) - zapnot $25 , 15 , $1 - stq $2 , 8($30) - zapnot $24 , 15 , $27 - stq $0 , 16($30) - clr $2 - stq $3 , 24($30) - ldiq $0 , 1 - - beq $1 , .Ldivbyzero - - .align 3 - - -1: cmpult $1 , $27 , $at - s8addq $1 , $31 , $1 - s8addq $0 , $31 , $0 - bne $at , 1b - - - -3: - srl $0 , 1 , $0 - cmpule $1 , $27 , $at - subq $27 , $1 , $3 - - srl $1 , 1 , $1 - cmovne $at , $3 , $27 - bne $0 , 3b - -.Ldone: ldq $1 , 0($30) - ldq $2 , 8($30) - ldq $0 , 16($30) - ldq $3 , 24($30) - - lda $30 , 32($30) - ret $31 , ($23), 1 - -.Ldivbyzero: - mov $16 , $3 - ldiq $16 , -2 - call_pal 170 - mov $3 , $16 - clr $27 - br .Ldone - - .end __remlu - - .ent __reml - .globl __reml - - .align 3 -__reml : - lda $30 , - 32 ($30 ) - .frame $30 , 32 , $23 , 0 - .prologue 0 - or $24 , $25 , $at - sextl $at , $at - bge $at , .Ludiv - - - stq $24 , 0($30 ) - negl $24 , $at - stq $25 , 8($30 ) - cmovge $at , $at , $24 - stq $23 , 16($30 ) - negl $25 , $at - stq $3 , 24($30 ) - cmovge $at , $at , $25 - - - bsr $23 , __remlu - - - ldq $24 , 0($30 ) - ldq $25 , 8($30 ) - mov $24 , $at - negl $27 , $3 - sextl $at , $at - ldq $23 , 16($30 ) - cmovlt $at , $3 , $27 - ldq $3 , 24($30 ) - - lda $30 , 32 ($30 ) - ret $31 , ($23 ), 1 - - .end __reml diff --git a/mdk-stage1/dietlibc/alpha/remq.S b/mdk-stage1/dietlibc/alpha/remq.S deleted file mode 100644 index 713484da3..000000000 --- a/mdk-stage1/dietlibc/alpha/remq.S +++ /dev/null @@ -1,97 +0,0 @@ -/* taken from glibc 2.2 */ - - .set noreorder - .set noat - - .ent __remqu - .globl __remqu - - .align 3 -__remqu : - lda $30 , - 32 ($30 ) - .frame $30 , 32 , $23 , 0 - .prologue 0 -.Ludiv: - stq $1 , 0($30 ) - mov $25 , $1 - stq $2 , 8($30 ) - mov $24 , $27 - stq $0 , 16($30 ) - clr $2 - stq $3 , 24($30 ) - ldiq $0 , 1 - - beq $1 , .Ldivbyzero - - .align 3 - -1: cmpult $1 , $27 , $at - blt $1 , 2f - addq $1 , $1 , $1 - addq $0 , $0 , $0 - bne $at , 1b - unop -2: -3: - srl $0 , 1, $0 - cmpule $1 , $27 , $at - subq $27 , $1 , $3 - - srl $1 , 1, $1 - cmovne $at , $3 , $27 - bne $0 , 3b - -.Ldone: ldq $1 , 0($30 ) - ldq $2 , 8($30 ) - ldq $0 , 16($30 ) - ldq $3 , 24($30 ) - - lda $30 , 32 ($30 ) - ret $31 , ($23 ), 1 - -.Ldivbyzero: - mov $16 , $3 - ldiq $16 , -2 - call_pal 170 - mov $3 , $16 - clr $27 - br .Ldone - - .end __remqu - - .ent __remq - .globl __remq - - .align 3 -__remq : - lda $30 , - 32 ($30 ) - .frame $30 , 32 , $23 , 0 - .prologue 0 - or $24 , $25 , $at - - bge $at , .Ludiv - - stq $24 , 0($30 ) - negq $24 , $at - stq $25 , 8($30 ) - cmovge $at , $at , $24 - stq $23 , 16($30 ) - negq $25 , $at - stq $3 , 24($30 ) - cmovge $at , $at , $25 - - bsr $23 , __remqu - - ldq $24 , 0($30 ) - ldq $25 , 8($30 ) - mov $24 , $at - negq $27 , $3 - - ldq $23 , 16($30 ) - cmovlt $at , $3 , $27 - ldq $3 , 24($30 ) - - lda $30 , 32 ($30 ) - ret $31 , ($23 ), 1 - - .end __remq diff --git a/mdk-stage1/dietlibc/alpha/semctl.S b/mdk-stage1/dietlibc/alpha/semctl.S deleted file mode 100644 index e215ed955..000000000 --- a/mdk-stage1/dietlibc/alpha/semctl.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(semctl,semctl) diff --git a/mdk-stage1/dietlibc/alpha/semget.S b/mdk-stage1/dietlibc/alpha/semget.S deleted file mode 100644 index 67f488546..000000000 --- a/mdk-stage1/dietlibc/alpha/semget.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(semget,semget) diff --git a/mdk-stage1/dietlibc/alpha/semop.S b/mdk-stage1/dietlibc/alpha/semop.S deleted file mode 100644 index 81b6fc606..000000000 --- a/mdk-stage1/dietlibc/alpha/semop.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(semop,semop) diff --git a/mdk-stage1/dietlibc/alpha/send.S b/mdk-stage1/dietlibc/alpha/send.S deleted file mode 100644 index cfd11be2a..000000000 --- a/mdk-stage1/dietlibc/alpha/send.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(send,send,__libc_send) diff --git a/mdk-stage1/dietlibc/alpha/sendmsg.S b/mdk-stage1/dietlibc/alpha/sendmsg.S deleted file mode 100644 index 14646ad68..000000000 --- a/mdk-stage1/dietlibc/alpha/sendmsg.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(sendmsg,sendmsg) diff --git a/mdk-stage1/dietlibc/alpha/sendto.S b/mdk-stage1/dietlibc/alpha/sendto.S deleted file mode 100644 index 17a033011..000000000 --- a/mdk-stage1/dietlibc/alpha/sendto.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(sendto,sendto,__libc_sendto) diff --git a/mdk-stage1/dietlibc/alpha/seteuid.c b/mdk-stage1/dietlibc/alpha/seteuid.c deleted file mode 100644 index a7cf47893..000000000 --- a/mdk-stage1/dietlibc/alpha/seteuid.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <sys/types.h> -#include <unistd.h> - -#undef seteuid -int seteuid(uid_t euid) { - return setreuid(-1,euid); -} diff --git a/mdk-stage1/dietlibc/alpha/setjmp.S b/mdk-stage1/dietlibc/alpha/setjmp.S deleted file mode 100644 index 3768056be..000000000 --- a/mdk-stage1/dietlibc/alpha/setjmp.S +++ /dev/null @@ -1,46 +0,0 @@ -#include <setjmp.h> - -.text -.global __sigsetjmp -__sigsetjmp: - ldgp $gp, 0($gp) - - mov $sp, $1 - lda $sp, -16($sp) - - stq $26, 0($sp) /* save ra */ - - stq $9, (JB_S0*8) ($16) /* s0 */ - stq $10, (JB_S1*8) ($16) /* s1 */ - stq $11, (JB_S2*8) ($16) /* s2 */ - stq $12, (JB_S3*8) ($16) /* s3 */ - stq $13, (JB_S4*8) ($16) /* s4 */ - stq $14, (JB_S5*8) ($16) /* s5 */ - - stq $26, (JB_PC*8) ($16) /* ra */ - stq $fp, (JB_FP*8) ($16) /* fp */ - stq $1, (JB_SP*8) ($16) /* sp */ - - stt $f2, (JB_F2*8) ($16) /* f2 */ - stt $f3, (JB_F3*8) ($16) /* f3 */ - stt $f4, (JB_F4*8) ($16) /* f4 */ - stt $f5, (JB_F5*8) ($16) /* f5 */ - stt $f6, (JB_F6*8) ($16) /* f6 */ - stt $f7, (JB_F7*8) ($16) /* f7 */ - stt $f8, (JB_F8*8) ($16) /* f8 */ - stt $f9, (JB_F9*8) ($16) /* f9 */ - - br $26, __sigjmp_save /* call __sigjmp_save */ - - ldq $26, 0($sp) /* restore ra */ - - lda $sp, 16($sp) - ret $31, ($26), 1 /* back to caller */ - -.weak setjmp -setjmp: -.weak __setjmp -__setjmp: - ldgp $gp, 0($gp) - mov 0, $17 - br __sigsetjmp diff --git a/mdk-stage1/dietlibc/alpha/setsockopt.S b/mdk-stage1/dietlibc/alpha/setsockopt.S deleted file mode 100644 index e3fe1d321..000000000 --- a/mdk-stage1/dietlibc/alpha/setsockopt.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(setsockopt,setsockopt) diff --git a/mdk-stage1/dietlibc/alpha/shmat.S b/mdk-stage1/dietlibc/alpha/shmat.S deleted file mode 100644 index 51248173d..000000000 --- a/mdk-stage1/dietlibc/alpha/shmat.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(shmat,shmat) diff --git a/mdk-stage1/dietlibc/alpha/shmctl.S b/mdk-stage1/dietlibc/alpha/shmctl.S deleted file mode 100644 index d56caace4..000000000 --- a/mdk-stage1/dietlibc/alpha/shmctl.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(shmctl,shmctl) diff --git a/mdk-stage1/dietlibc/alpha/shmdt.S b/mdk-stage1/dietlibc/alpha/shmdt.S deleted file mode 100644 index d9812a799..000000000 --- a/mdk-stage1/dietlibc/alpha/shmdt.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(shmdt,shmdt) diff --git a/mdk-stage1/dietlibc/alpha/shmget.S b/mdk-stage1/dietlibc/alpha/shmget.S deleted file mode 100644 index 82914223f..000000000 --- a/mdk-stage1/dietlibc/alpha/shmget.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(shmget,shmget) diff --git a/mdk-stage1/dietlibc/alpha/shutdown.S b/mdk-stage1/dietlibc/alpha/shutdown.S deleted file mode 100644 index 9b5139325..000000000 --- a/mdk-stage1/dietlibc/alpha/shutdown.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(shutdown,shutdown) diff --git a/mdk-stage1/dietlibc/alpha/signal.S b/mdk-stage1/dietlibc/alpha/signal.S deleted file mode 100644 index ceca0f02d..000000000 --- a/mdk-stage1/dietlibc/alpha/signal.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(osf_signal,signal) diff --git a/mdk-stage1/dietlibc/alpha/sigprocmask.S b/mdk-stage1/dietlibc/alpha/sigprocmask.S deleted file mode 100644 index d9da836c2..000000000 --- a/mdk-stage1/dietlibc/alpha/sigprocmask.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(osf_sigprocmask,sigprocmask,__sigprocmask) diff --git a/mdk-stage1/dietlibc/alpha/socket.S b/mdk-stage1/dietlibc/alpha/socket.S deleted file mode 100644 index 85401f56e..000000000 --- a/mdk-stage1/dietlibc/alpha/socket.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(socket,socket) diff --git a/mdk-stage1/dietlibc/alpha/socketcall.S b/mdk-stage1/dietlibc/alpha/socketcall.S deleted file mode 100644 index b150bd5d5..000000000 --- a/mdk-stage1/dietlibc/alpha/socketcall.S +++ /dev/null @@ -1,5 +0,0 @@ -#include "syscalls.h" - -/* - * Doesn't exist on alpha ( accept, bind, ... are SYSCALLS !?! ) - */ diff --git a/mdk-stage1/dietlibc/alpha/start.S b/mdk-stage1/dietlibc/alpha/start.S deleted file mode 100644 index 00b8e950d..000000000 --- a/mdk-stage1/dietlibc/alpha/start.S +++ /dev/null @@ -1,35 +0,0 @@ -#include "start.h" - -#ifdef __alpha__ - -.text -.align 2 - .set noreorder - -.global __start -__start: -.global _start -_start: - clr $fp /* clear frame pointer */ - - br $gp,.Lstart /* set global pointer */ -.Lstart: - ldgp $gp, 0($gp) - -/* prepare to call main */ - ldl $16, 0($sp) /* argc */ - - lda $17, 8($sp) /* argv */ - - addq $16, 1, $18 /* argp */ - s8addq $18, $17, $18 /* (8*(argc+1))+argv -> argp */ - - stq $18, environ - - mov $0, $21 /* mov v0(dynload) to a5 */ - - jsr $26, main - mov $0, $16 - jsr $26, exit /* YES, CALL! for threads and atexit ! (+4 byte) */ - -#endif diff --git a/mdk-stage1/dietlibc/alpha/strlen.c b/mdk-stage1/dietlibc/alpha/strlen.c deleted file mode 100644 index ac532254a..000000000 --- a/mdk-stage1/dietlibc/alpha/strlen.c +++ /dev/null @@ -1,32 +0,0 @@ -#include <string.h> - -static const unsigned long long magic = 0x0101010101010101LL; - -size_t strlen(const char *s) -{ - const char *t = s; - unsigned long long word; - - if (!s) return 0; - - /* Byte compare up until 64 bit word boundary */ - for (; ((unsigned long long) t & 7); t++) - if (!*t) return t - s; - - /* Word compare */ - do { - word = *((unsigned long long *) t); t += 8; - word = (word - magic) &~ word; - word &= (magic << 7); - } while (word == 0); - - /* word & 0x8080808080808080 == word */ - word = (word - 1) & (magic << 8); - word += (word << 32); - word += (word << 16); - word += (word << 8); - t += word >> 56; - return ((const char *) t) - 8 - s; -} - - diff --git a/mdk-stage1/dietlibc/alpha/time.S b/mdk-stage1/dietlibc/alpha/time.S deleted file mode 100644 index e69de29bb..000000000 --- a/mdk-stage1/dietlibc/alpha/time.S +++ /dev/null diff --git a/mdk-stage1/dietlibc/alpha/unified.S b/mdk-stage1/dietlibc/alpha/unified.S deleted file mode 100644 index 02a1c9bcd..000000000 --- a/mdk-stage1/dietlibc/alpha/unified.S +++ /dev/null @@ -1,29 +0,0 @@ -#include <dietfeatures.h> - -.global __unified_syscall -__unified_syscall: - callsys - bne $19, .Lerror - ret $31, ($26), 0x01 - -.Lerror: -.global error_unified_syscall -error_unified_syscall: -#ifdef WANT_THREAD_SAVE - lda $sp, -16($sp) /* alloc 2 qwords on stack */ - stq $26, 0($sp) /* save ra to stack */ - stq $0, 8($sp) /* save v0 to stack */ - - jsr $26, __errno_location /* call __errno_location */ - - ldq $1, 8($sp) /* write old v0 to errno */ - stl $1, 0($0) - - lda $0, -1($31) /* new return value is -1 */ - ldq $26, 0($sp) /* restore return address */ - lda $sp, 16($sp) /* free 2 qwords on stack */ -#else - lda $1, errno - stl $0, 0($1) -#endif - ret $31, ($26), 0x01 /* return */ diff --git a/mdk-stage1/dietlibc/alpha/utime.S b/mdk-stage1/dietlibc/alpha/utime.S deleted file mode 100644 index a9a8aada6..000000000 --- a/mdk-stage1/dietlibc/alpha/utime.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(utimes,utime) diff --git a/mdk-stage1/dietlibc/alpha/waitpid.S b/mdk-stage1/dietlibc/alpha/waitpid.S deleted file mode 100644 index 6dc1c99db..000000000 --- a/mdk-stage1/dietlibc/alpha/waitpid.S +++ /dev/null @@ -1,10 +0,0 @@ -#include <syscalls.h> - -.text -.align 2 -.weak waitpid -waitpid: -.global __libc_waitpid -__libc_waitpid: - clr $19 - br wait4 diff --git a/mdk-stage1/dietlibc/diet.c b/mdk-stage1/dietlibc/diet.c deleted file mode 100644 index 1de6befc8..000000000 --- a/mdk-stage1/dietlibc/diet.c +++ /dev/null @@ -1,112 +0,0 @@ -#include <string.h> -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> - -/* goal: - * when invoked as - * "diet gcc -c t.c" - * exec - * "gcc -I/path/to/dietlibc/include -c t.c" - * - * when invoked as - * "diet sparc-linux-gcc -o t t.o" - * exec - * "sparc-linux-gcc -nostdlib -static -o t t.o /path/to/dietlibc/bin-sparc/start.o /path/to/dietlibc/bin-sparc/dietlibc.a" -*/ - -void error(const char *message) { - write(2,message,strlen(message)); - exit(1); -} - -int main(int argc,char *argv[]) { - int link=0; - int compile=0; - char diethome[]=DIETHOME; - char platform[1000]=DIETHOME "/bin-"; - char *nostdlib="-nostdlib"; - char *libgcc="-lgcc"; - char dashL[1000]="-L"; - int i; - - if (argc<2) { - error("usage: diet [gcc command line]\n" - "e.g. diet gcc -c t.c\n" - "or diet sparc-linux-gcc -o foo foo.c bar.o\n"); - } - { - char *tmp=strchr(argv[1],0)-2; - char *tmp2; - char *cc=argv[1]; - if (tmp<cc) goto donttouch; - if ((tmp2=strchr(cc,'-'))) { /* cross compiling? */ - int len=strlen(platform); - if (tmp2-cc>90) error("platform name too long!\n"); - memmove(platform+len,argv[1],tmp2-cc); - platform[tmp2-cc+len]=0; -/* printf("found platform %s\n",platform); */ - } else { -#ifdef __sparc__ - strcat(platform,"sparc"); -#endif -#ifdef __ppc__ - strcat(platform,"ppc"); -#endif -#ifdef __i386__ - strcat(platform,"i386"); -#endif -#ifdef __alpha__ - strcat(platform,"alpha"); -#endif -#ifdef __arm__ - strcat(platform,"arm"); -#endif -#ifdef __mips__ - strcat(platform,"mips"); -#endif - } - strcat(dashL,platform); - if (!strcmp(tmp,"cc")) { - char **newargv; - char **dest; - char *a,*b,*c; -/* we need to add -I... if the command line contains -c, -S or -E */ - for (i=2; i<argc; ++i) - if (!strcmp(argv[i],"-c") || !strcmp(argv[i],"-S") || !strcmp(argv[i],"-E")) - compile=1; -/* we need to add -nostdlib if we are not compiling*/ - link=!compile; -#if 0 - for (i=2; i<argc; ++i) - if (!strcmp(argv[i],"-o")) - if (!compile) link=1; -#endif - newargv=alloca(sizeof(char*)*(argc+6)); - a=alloca(strlen(diethome)+20); - b=alloca(strlen(platform)+20); - c=alloca(strlen(platform)+20); - - strcpy(a,"-I"); strcat(a,diethome); strcat(a,"/include"); - strcpy(b,platform); strcat(b,"/start.o"); - strcpy(c,platform); strcat(c,"/dietlibc.a"); - - dest=newargv; - *dest++=argv[1]; - if (link) { *dest++=nostdlib; *dest++=dashL; } - if (compile || link) *dest++=a; - for (i=2; i<argc; ++i) - *dest++=argv[i]; - if (link) { *dest++=b; *dest++=c; *dest++=libgcc; } - *dest=0; - execvp(newargv[0],newargv); - goto error; - } else if (!strcmp(tmp,"ld")) { - } - } -donttouch: - execvp(argv[1],argv+1); -error: - error("execvp failed!\n"); - return 1; -} diff --git a/mdk-stage1/dietlibc/dietdirent.h b/mdk-stage1/dietlibc/dietdirent.h deleted file mode 100644 index d732cf7dc..000000000 --- a/mdk-stage1/dietlibc/dietdirent.h +++ /dev/null @@ -1,6 +0,0 @@ -struct __dirstream { - int fd; - char buf[1024]; - unsigned int num; - unsigned int cur; -}; /* stream data from opendir() */ diff --git a/mdk-stage1/dietlibc/dietfeatures.h b/mdk-stage1/dietlibc/dietfeatures.h deleted file mode 100644 index e1de38577..000000000 --- a/mdk-stage1/dietlibc/dietfeatures.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _DIETFEATURES_H -#define _DIETFEATURES_H - -/* feel free to comment some of these out to reduce code size */ - -//#define WANT_FLOATING_POINT_IN_PRINTF -//#define WANT_FLOATING_POINT_IN_SCANF -#define WANT_CHARACTER_CLASSES_IN_SCANF -#define WANT_NULL_PRINTF - -#define SLASH_PROC_OK - -// #define WANT_BUFFERED_STDIO - -/* use errno_location instead of errno */ -// #define WANT_THREAD_SAFE - -/* make the startcode, etc. dynamic aware */ -/* #undef WANT_DYNAMIC */ - -/* do you want smaller or faster string routines? */ -/* #define WANT_FASTER_STRING_ROUTINES */ - -/* do you want ungetc? makes fgetc more complex */ -#define WANT_UNGETC - -// #define WANT_LINKER_WARNINGS - -/* you need to define this if you want to run your programs with large - * file support on kernel 2.2 or 2.4 */ -// #define WANT_LARGEFILE_BACKCOMPAT - -/* do you want localtime(3) to read /etc/localtime? - * Needed for daylight saving time etc. */ -// #define WANT_TZFILE_PARSER - -/* stop uncommenting here ;-) */ -#ifndef WANT_FASTER_STRING_ROUTINES -#define WANT_SMALL_STRING_ROUTINES -#endif - -#endif diff --git a/mdk-stage1/dietlibc/dietstdarg.h b/mdk-stage1/dietlibc/dietstdarg.h deleted file mode 100644 index 827671b22..000000000 --- a/mdk-stage1/dietlibc/dietstdarg.h +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdarg.h> - -/* this assumes that va_copy() will be a macro, it is on gcc */ -#ifndef va_copy -# ifdef __va_copy -# define va_copy(x, y) __va_copy(x, y) -# else -/* assume copying it works... */ -# define va_copy(x, y) x = y -# endif -#endif - diff --git a/mdk-stage1/dietlibc/dietstdio.h b/mdk-stage1/dietlibc/dietstdio.h deleted file mode 100644 index a1cbeba83..000000000 --- a/mdk-stage1/dietlibc/dietstdio.h +++ /dev/null @@ -1,81 +0,0 @@ -/* diet stdio -- no buffering ;-} */ - -#include "dietfeatures.h" -#include <sys/types.h> -#ifdef WANT_THREAD_SAVE -#include <pthread.h> -#endif - -#define BUFSIZE 128 - -typedef struct __file { - int fd; - int flags; -#ifdef WANT_BUFFERED_STDIO - unsigned int bs; /* read: bytes in buffer */ - unsigned int bm; /* position in buffer */ - char buf[BUFSIZE]; - struct __file *next; /* for fflush */ -#endif - pid_t popen_kludge; -#ifdef WANT_UNGETC - char ungetbuf; - char ungotten; -#endif -#ifdef WANT_THREAD_SAVE - pthread_mutex_t m; -#endif -} FILE; - -extern FILE *__stdio_root; - -#define ERRORINDICATOR 1 -#define EOFINDICATOR 2 -#define BUFINPUT 4 -#define BUFLINEWISE 8 -#define NOBUF 16 -#define UNSEEKABLE 32 - -#define _IONBF 0 -#define _IOLBF 1 -#define _IOFBF 2 - -/* internal function to flush buffer. - * However, if next is BUFINPUT and the buffer is an input buffer, it - * will not be flushed. Vice versa for output */ -extern int __fflush4(FILE *stream,int next); - -FILE *fopen (const char *path, const char *mode); -FILE *fdopen (int fildes, const char *mode); -FILE *freopen (const char *path, const char *mode, FILE *stream); - -int fgetc(FILE *stream); -char *fgets(char *s, int size, FILE *stream); -int getc(FILE *stream); -int getchar(void); -char *gets(char *s); -int ungetc(int c, FILE *stream); - -int fputc(int c, FILE *stream); -int fputs(const char *s, FILE *stream); -int putc(int c, FILE *stream); -int putchar(int c); -int puts(const char *s); - -long fseek( FILE *stream, long offset, int whence); -long ftell( FILE *stream); -void rewind( FILE *stream); -int fgetpos( FILE *stream, fpos_t *pos); -int fsetpos( FILE *stream, fpos_t *pos); - -size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream); - -size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream); - -int fflush(FILE *stream); - -int fclose(FILE *stream); - -extern FILE *stdout, *stderr, *stdin; - -#define EOF (int)(-1) diff --git a/mdk-stage1/dietlibc/dietwarning.h b/mdk-stage1/dietlibc/dietwarning.h deleted file mode 100644 index f7c67a175..000000000 --- a/mdk-stage1/dietlibc/dietwarning.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "dietfeatures.h" - -#ifdef WANT_LINKER_WARNINGS - -#ifndef __ASSEMBLER__ - -#define link_warning(symbol,msg) \ - asm (".section .gnu.warning." symbol "\n\t.string \"" msg "\"\n\t.previous"); - -#else - -#define link_warning(symbol,msg) \ - .section .gnu.warning.##symbol ;\ - .string msg ;\ - .previous - -#endif - -#else - -#define link_warning(foo,bar) - -#endif diff --git a/mdk-stage1/dietlibc/dirstream.h b/mdk-stage1/dietlibc/dirstream.h deleted file mode 100644 index dc8fba79c..000000000 --- a/mdk-stage1/dietlibc/dirstream.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* - * POSIX Standard: 5.1.2 Directory Operations <dirent.h> - */ - -#ifndef _DIRSTREAM_H - -#define _DIRSTREAM_H 1 - -#include <sys/types.h> -#include <dirent.h> -#ifdef _POSIX_THREADS -#include <pthread.h> -#endif - -/* For now, syscall readdir () only supports one entry at a time. It - * will be changed in the future. -#define NUMENT 3 -*/ -#ifndef NUMENT -#define NUMENT 1 -#endif - -#define SINGLE_READDIR 11 -#define MULTI_READDIR 12 -#define NEW_READDIR 13 - -/* Directory stream type. */ -struct __dirstream { - /* file descriptor */ - int dd_fd; - - /* offset of the next dir entry in buffer */ - off_t dd_nextloc; - - /* bytes of valid entries in buffer */ - size_t dd_size; - - /* -> directory buffer */ - struct dirent *dd_buf; - - /* we have to convert */ - struct dirent convbuf; - - /* offset of the next dir entry in directory. */ - off_t dd_nextoff; - - /* total size of buffer */ - size_t dd_max; - - enum {unknown, have_getdents, no_getdents} dd_getdents; - - /* lock */ -#ifdef _POSIX_THREADS - pthread_mutex_t *dd_lock; -#else - void *dd_lock; -#endif -}; /* stream data from opendir() */ - -#endif /* dirent.h */ diff --git a/mdk-stage1/dietlibc/i386/Makefile.add b/mdk-stage1/dietlibc/i386/Makefile.add deleted file mode 100644 index b685cc360..000000000 --- a/mdk-stage1/dietlibc/i386/Makefile.add +++ /dev/null @@ -1,3 +0,0 @@ - -CFLAGS+=-march=i386 -mcpu=i386 -Os -fomit-frame-pointer -VPATH:=i386:syscalls.s:$(VPATH) diff --git a/mdk-stage1/dietlibc/i386/__longjmp.S b/mdk-stage1/dietlibc/i386/__longjmp.S deleted file mode 100644 index 098275037..000000000 --- a/mdk-stage1/dietlibc/i386/__longjmp.S +++ /dev/null @@ -1,18 +0,0 @@ -#include <setjmp.h> - -.text -.global __longjmp -__longjmp: - movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */ - movl 8(%esp), %eax /* Second argument is return value. */ - /* Save the return address now. */ - movl (JB_PC*4)(%ecx), %edx - /* Restore registers. */ - movl (JB_BX*4)(%ecx), %ebx - movl (JB_SI*4)(%ecx), %esi - movl (JB_DI*4)(%ecx), %edi - movl (JB_BP*4)(%ecx), %ebp - movl (JB_SP*4)(%ecx), %esp - /* Jump to saved PC. */ - jmp *%edx -.size __longjmp,.-__longjmp; diff --git a/mdk-stage1/dietlibc/i386/__testandset.S b/mdk-stage1/dietlibc/i386/__testandset.S deleted file mode 100644 index af7b4d5a0..000000000 --- a/mdk-stage1/dietlibc/i386/__testandset.S +++ /dev/null @@ -1,8 +0,0 @@ -.text -.global __testandset -__testandset: - xorl %eax, %eax - movl 0x4(%esp),%edx - incl %eax - xchgl %eax,(%edx) - ret diff --git a/mdk-stage1/dietlibc/i386/clone.S b/mdk-stage1/dietlibc/i386/clone.S deleted file mode 100644 index ac02eb468..000000000 --- a/mdk-stage1/dietlibc/i386/clone.S +++ /dev/null @@ -1,51 +0,0 @@ -#include <asm/unistd.h> - -.text -.weak clone -clone: -.global __clone -__clone: - movl 4(%esp), %ecx /* have non null thread_funcion */ - testl %ecx, %ecx - je .Lclone_error - - movl 8(%esp), %ecx /* have non null child_stack pointer */ - testl %ecx, %ecx - je .Lclone_error - - /* put the parameter on thread stack */ - subl $8, %ecx - - movl 16(%esp), %eax /* arg */ - movl %eax, 4(%ecx) - - movl 4(%esp), %eax /* thread_func */ - movl %eax, 0(%ecx) - - /* the syscall */ - pushl %ebx - movl 16(%esp), %ebx /* flags */ - movl $__NR_clone, %eax - int $0x80 - popl %ebx - - testl %eax, %eax - jl .Lclone_error - je .Lstart_thread - ret - -.Lstart_thread: - xorl %ebp,%ebp - call *%ebx - pushl %eax - call _exit - -.Lclone_error: - negl %eax - pushl %eax - call __errno_location - popl %ecx - movl %ecx, (%eax) - xorl %eax, %eax - decl %eax - ret diff --git a/mdk-stage1/dietlibc/i386/mmap.c b/mdk-stage1/dietlibc/i386/mmap.c deleted file mode 100644 index 26ecb55c0..000000000 --- a/mdk-stage1/dietlibc/i386/mmap.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <linux/types.h> -#include <linux/unistd.h> - -#define __NR__mmap __NR_mmap -_syscall1(int,_mmap,unsigned long *,buffer) - -char *mmap(char *addr, size_t len, int prot, int flags, int fd, unsigned long off) { - unsigned long buffer[6]; - buffer[0] = (unsigned long)addr; - buffer[1] = (unsigned long)len; - buffer[2] = (unsigned long)prot; - buffer[3] = (unsigned long)flags; - buffer[4] = (unsigned long)fd; - buffer[5] = (unsigned long)off; - return (char*) _mmap(buffer); -} diff --git a/mdk-stage1/dietlibc/i386/select.S b/mdk-stage1/dietlibc/i386/select.S deleted file mode 100644 index 9e7066eae..000000000 --- a/mdk-stage1/dietlibc/i386/select.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(_newselect,select,__libc_select) diff --git a/mdk-stage1/dietlibc/i386/setjmp.S b/mdk-stage1/dietlibc/i386/setjmp.S deleted file mode 100644 index 9bfecf565..000000000 --- a/mdk-stage1/dietlibc/i386/setjmp.S +++ /dev/null @@ -1,62 +0,0 @@ -#include <setjmp.h> - -/* setjmp for i386. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -.section .rodata -.text -.weak setjmp -setjmp: -.globl __setjmp -__setjmp: - popl %eax /* Pop return address. */ - popl %ecx /* Pop jmp_buf. */ - pushl $0 /* Push zero argument. */ - pushl %ecx /* Push jmp_buf. */ - pushl %eax /* Push back return address. */ - -.globl __sigsetjmp -__sigsetjmp: - movl 4(%esp), %eax /* User's jmp_buf in %eax. */ - /* Save registers. */ - movl %ebx, (JB_BX*4)(%eax) - movl %esi, (JB_SI*4)(%eax) - movl %edi, (JB_DI*4)(%eax) - movl %ebp, (JB_BP*4)(%eax) - leal 4(%esp), %ecx /* Save SP as it will be after we return. */ - movl %ecx, (JB_SP*4)(%eax) - movl 0(%esp), %ecx /* Save PC we are returning to now. */ - movl %ecx, (JB_PC*4)(%eax) - - /* Make a tail call to __sigjmp_save; it takes the same args. */ -#ifdef PIC - /* We cannot use the PLT, because it requires that %ebx be set, but - we can't save and restore our caller's value. Instead, we do an - indirect jump through the GOT, using for the temporary register - %ecx, which is call-clobbered. */ - call L(here) -L(here): - popl %ecx - addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ecx - movl C_SYMBOL_NAME(__sigjmp_save@GOT)(%ecx), %ecx - jmp *%ecx -#else - jmp __sigjmp_save -#endif -.size __sigsetjmp,.-__sigsetjmp; diff --git a/mdk-stage1/dietlibc/i386/start.S b/mdk-stage1/dietlibc/i386/start.S deleted file mode 100644 index 167bb779c..000000000 --- a/mdk-stage1/dietlibc/i386/start.S +++ /dev/null @@ -1,42 +0,0 @@ -#include "start.h" - -#ifdef __i386__ -.text -.globl _start -_start: -#if 0 - popl %ecx - movl %esp, %esi - leal 4(%esp,%ecx,4),%eax -#else - movl (%esp),%ecx /* %ecx = argc */ - leal 4(%esp),%esi /* %esi = argv */ - - leal 4(%esi,%ecx,4),%eax /* eax = 4*ecx+4 = envp */ -#endif - pushl %eax - pushl %esi - pushl %ecx - movl %eax,environ - -#ifdef WANT_DYNAMIC -/* in %edx we have the dynamic _fini ( register this if non null ) */ - test %edx, %edx - je .Linit - push %edx - call atexit - pop %edx -.Linit: - call _init - push $_fini - call atexit - pop %edx -#endif - - call main - pushl %eax - call exit -.Lfefe: - .size _start,.Lfefe-_start -#endif - diff --git a/mdk-stage1/dietlibc/i386/unified.S b/mdk-stage1/dietlibc/i386/unified.S deleted file mode 100644 index f182bdb4b..000000000 --- a/mdk-stage1/dietlibc/i386/unified.S +++ /dev/null @@ -1,34 +0,0 @@ -#include <dietfeatures.h> - -.text -.global __unified_syscall -__unified_syscall: - movzbl %al, %eax - push %edi - push %esi - push %ebx - movl %esp,%edi - movl 0x10(%edi),%ebx - movl 0x14(%edi),%ecx - movl 0x18(%edi),%edx - movl 0x1c(%edi),%esi - movl 0x20(%edi),%edi - int $0x80 - cmp $-124,%eax - jbe .Lnoerror -#ifdef WANT_THREAD_SAVE - movl %eax,%ebx - call __errno_location - neg %ebx - movl %ebx,(%eax) -#else - neg %eax - mov %eax,errno -#endif - xor %eax,%eax - dec %eax -.Lnoerror: - pop %ebx - pop %esi - pop %edi - ret diff --git a/mdk-stage1/dietlibc/include/alloca.h b/mdk-stage1/dietlibc/include/alloca.h deleted file mode 100644 index e69de29bb..000000000 --- a/mdk-stage1/dietlibc/include/alloca.h +++ /dev/null diff --git a/mdk-stage1/dietlibc/include/arpa/inet.h b/mdk-stage1/dietlibc/include/arpa/inet.h deleted file mode 100644 index 6d5a6dc35..000000000 --- a/mdk-stage1/dietlibc/include/arpa/inet.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _ARPA_INET_H -#define _ARPA_INET_H - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <netinet/in.h> - -int inet_aton(const char *cp, struct in_addr *inp) __THROW; -unsigned long int inet_addr(const char *cp) __THROW; -unsigned long int inet_network(const char *cp) __THROW; -char *inet_ntoa(struct in_addr in) __THROW; -struct in_addr inet_makeaddr(int net, int host) __THROW; -unsigned long int inet_lnaof(struct in_addr in) __THROW; -unsigned long int inet_netof(struct in_addr in) __THROW; - -int inet_pton (int AF, const char* CP, void* BUF) __THROW; -const char* inet_ntop (int AF, const void* CP, char* BUF, size_t LEN) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/arpa/nameser.h b/mdk-stage1/dietlibc/include/arpa/nameser.h deleted file mode 100644 index 1ee048d66..000000000 --- a/mdk-stage1/dietlibc/include/arpa/nameser.h +++ /dev/null @@ -1,217 +0,0 @@ -#ifndef _ARPA_NAMESER_H -#define _ARPA_NAMESER_H - -#include <endian.h> - -#define NS_PACKETSZ 512 /* maximum packet size */ -#define NS_MAXDNAME 1025 /* maximum domain name */ -#define NS_MAXCDNAME 255 /* maximum compressed domain name */ -#define NS_MAXLABEL 63 /* maximum length of domain label */ -#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ -#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */ -#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */ -#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */ -#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */ -#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */ -#define NS_INADDRSZ 4 /* IPv4 T_A */ -#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */ -#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */ -#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */ - -/* - * Currently defined type values for resources and queries. - */ -typedef enum __ns_type { - ns_t_invalid = 0, /* Cookie. */ - ns_t_a = 1, /* Host address. */ - ns_t_ns = 2, /* Authoritative server. */ - ns_t_md = 3, /* Mail destination. */ - ns_t_mf = 4, /* Mail forwarder. */ - ns_t_cname = 5, /* Canonical name. */ - ns_t_soa = 6, /* Start of authority zone. */ - ns_t_mb = 7, /* Mailbox domain name. */ - ns_t_mg = 8, /* Mail group member. */ - ns_t_mr = 9, /* Mail rename name. */ - ns_t_null = 10, /* Null resource record. */ - ns_t_wks = 11, /* Well known service. */ - ns_t_ptr = 12, /* Domain name pointer. */ - ns_t_hinfo = 13, /* Host information. */ - ns_t_minfo = 14, /* Mailbox information. */ - ns_t_mx = 15, /* Mail routing information. */ - ns_t_txt = 16, /* Text strings. */ - ns_t_rp = 17, /* Responsible person. */ - ns_t_afsdb = 18, /* AFS cell database. */ - ns_t_x25 = 19, /* X_25 calling address. */ - ns_t_isdn = 20, /* ISDN calling address. */ - ns_t_rt = 21, /* Router. */ - ns_t_nsap = 22, /* NSAP address. */ - ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ - ns_t_sig = 24, /* Security signature. */ - ns_t_key = 25, /* Security key. */ - ns_t_px = 26, /* X.400 mail mapping. */ - ns_t_gpos = 27, /* Geographical position (withdrawn). */ - ns_t_aaaa = 28, /* Ip6 Address. */ - ns_t_loc = 29, /* Location Information. */ - ns_t_nxt = 30, /* Next domain (security). */ - ns_t_eid = 31, /* Endpoint identifier. */ - ns_t_nimloc = 32, /* Nimrod Locator. */ - ns_t_srv = 33, /* Server Selection. */ - ns_t_atma = 34, /* ATM Address */ - ns_t_naptr = 35, /* Naming Authority PoinTeR */ - ns_t_kx = 36, /* Key Exchange */ - ns_t_cert = 37, /* Certification record */ - ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ - ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ - ns_t_sink = 40, /* Kitchen sink (experimentatl) */ - ns_t_opt = 41, /* EDNS0 option (meta-RR) */ - ns_t_tsig = 250, /* Transaction signature. */ - ns_t_ixfr = 251, /* Incremental zone transfer. */ - ns_t_axfr = 252, /* Transfer zone of authority. */ - ns_t_mailb = 253, /* Transfer mailbox records. */ - ns_t_maila = 254, /* Transfer mail agent records. */ - ns_t_any = 255, /* Wildcard match. */ - ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ - ns_t_max = 65536 -} ns_type; - -/* - * Values for class field - */ -typedef enum __ns_class { - ns_c_invalid = 0, /* Cookie. */ - ns_c_in = 1, /* Internet. */ - ns_c_2 = 2, /* unallocated/unsupported. */ - ns_c_chaos = 3, /* MIT Chaos-net. */ - ns_c_hs = 4, /* MIT Hesiod. */ - /* Query class values which do not appear in resource records */ - ns_c_none = 254, /* for prereq. sections in update requests */ - ns_c_any = 255, /* Wildcard match. */ - ns_c_max = 65536 -} ns_class; - -typedef struct { - unsigned id :16; /* query identification number */ -#if BYTE_ORDER == BIG_ENDIAN - /* fields in third byte */ - unsigned qr: 1; /* response flag */ - unsigned opcode: 4; /* purpose of message */ - unsigned aa: 1; /* authoritive answer */ - unsigned tc: 1; /* truncated message */ - unsigned rd: 1; /* recursion desired */ - /* fields in fourth byte */ - unsigned ra: 1; /* recursion available */ - unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ - unsigned ad: 1; /* authentic data from named */ - unsigned cd: 1; /* checking disabled by resolver */ - unsigned rcode :4; /* response code */ -#endif -#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN - /* fields in third byte */ - unsigned rd :1; /* recursion desired */ - unsigned tc :1; /* truncated message */ - unsigned aa :1; /* authoritive answer */ - unsigned opcode :4; /* purpose of message */ - unsigned qr :1; /* response flag */ - /* fields in fourth byte */ - unsigned rcode :4; /* response code */ - unsigned cd: 1; /* checking disabled by resolver */ - unsigned ad: 1; /* authentic data from named */ - unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */ - unsigned ra :1; /* recursion available */ -#endif - /* remaining bytes */ - unsigned qdcount :16; /* number of question entries */ - unsigned ancount :16; /* number of answer entries */ - unsigned nscount :16; /* number of authority entries */ - unsigned arcount :16; /* number of resource entries */ -} HEADER; - -#define PACKETSZ NS_PACKETSZ -#define MAXDNAME NS_MAXDNAME -#define MAXCDNAME NS_MAXCDNAME -#define MAXLABEL NS_MAXLABEL -#define HFIXEDSZ NS_HFIXEDSZ -#define QFIXEDSZ NS_QFIXEDSZ -#define RRFIXEDSZ NS_RRFIXEDSZ -#define INT32SZ NS_INT32SZ -#define INT16SZ NS_INT16SZ -#define INADDRSZ NS_INADDRSZ -#define IN6ADDRSZ NS_IN6ADDRSZ -#define INDIR_MASK NS_CMPRSFLGS -#define NAMESERVER_PORT NS_DEFAULTPORT - -#define S_ZONE ns_s_zn -#define S_PREREQ ns_s_pr -#define S_UPDATE ns_s_ud -#define S_ADDT ns_s_ar - -#define QUERY ns_o_query -#define IQUERY ns_o_iquery -#define STATUS ns_o_status -#define NS_NOTIFY_OP ns_o_notify -#define NS_UPDATE_OP ns_o_update - -#define NOERROR ns_r_noerror -#define FORMERR ns_r_formerr -#define SERVFAIL ns_r_servfail -#define NXDOMAIN ns_r_nxdomain -#define NOTIMP ns_r_notimpl -#define REFUSED ns_r_refused -#define YXDOMAIN ns_r_yxdomain -#define YXRRSET ns_r_yxrrset -#define NXRRSET ns_r_nxrrset -#define NOTAUTH ns_r_notauth -#define NOTZONE ns_r_notzone - -#define DELETE ns_uop_delete -#define ADD ns_uop_add - -#define T_A ns_t_a -#define T_NS ns_t_ns -#define T_MD ns_t_md -#define T_MF ns_t_mf -#define T_CNAME ns_t_cname -#define T_SOA ns_t_soa -#define T_MB ns_t_mb -#define T_MG ns_t_mg -#define T_MR ns_t_mr -#define T_NULL ns_t_null -#define T_WKS ns_t_wks -#define T_PTR ns_t_ptr -#define T_HINFO ns_t_hinfo -#define T_MINFO ns_t_minfo -#define T_MX ns_t_mx -#define T_TXT ns_t_txt -#define T_RP ns_t_rp -#define T_AFSDB ns_t_afsdb -#define T_X25 ns_t_x25 -#define T_ISDN ns_t_isdn -#define T_RT ns_t_rt -#define T_NSAP ns_t_nsap -#define T_NSAP_PTR ns_t_nsap_ptr -#define T_SIG ns_t_sig -#define T_KEY ns_t_key -#define T_PX ns_t_px -#define T_GPOS ns_t_gpos -#define T_AAAA ns_t_aaaa -#define T_LOC ns_t_loc -#define T_NXT ns_t_nxt -#define T_EID ns_t_eid -#define T_NIMLOC ns_t_nimloc -#define T_SRV ns_t_srv -#define T_ATMA ns_t_atma -#define T_NAPTR ns_t_naptr -#define T_TSIG ns_t_tsig -#define T_IXFR ns_t_ixfr -#define T_AXFR ns_t_axfr -#define T_MAILB ns_t_mailb -#define T_MAILA ns_t_maila -#define T_ANY ns_t_any - -#define C_IN ns_c_in -#define C_CHAOS ns_c_chaos -#define C_HS ns_c_hs -#define C_NONE ns_c_none -#define C_ANY ns_c_any - -#endif diff --git a/mdk-stage1/dietlibc/include/assert.h b/mdk-stage1/dietlibc/include/assert.h deleted file mode 100644 index bb573d0f2..000000000 --- a/mdk-stage1/dietlibc/include/assert.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _ASSERT_H -#define _ASSERT_H - -#include <sys/cdefs.h> - -/* This prints an "Assertion failed" message and aborts. */ -extern void __assert_fail (__const char *__assertion, __const char *__file, - unsigned int __line, __const char *__function) - __THROW __attribute__ ((__noreturn__)); - -#ifdef __PRETTY_FUNCTION__ -#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ -#else -#define __ASSERT_FUNCTION __func__ -#endif - -#undef assert -#ifdef NDEBUG -#define assert(expr) -#else -# define assert(expr) \ - ((void) ((expr) ? 0 : \ - (__assert_fail (#expr, \ - __FILE__, __LINE__, __ASSERT_FUNCTION), 0))) -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/ctype.h b/mdk-stage1/dietlibc/include/ctype.h deleted file mode 100644 index 9322e8c7b..000000000 --- a/mdk-stage1/dietlibc/include/ctype.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _CTYPE_H -#define _CTYPE_H - -#include <sys/cdefs.h> - -extern int isascii (int c) __THROW __attribute__ ((__const__)); -extern int isblank (int c) __THROW __attribute__ ((__const__)); -extern int isalnum (int c) __THROW __attribute__ ((__const__)); -extern int isalpha (int c) __THROW __attribute__ ((__const__)); -extern int isdigit (int c) __THROW __attribute__ ((__const__)); -extern int isspace (int c) __THROW __attribute__ ((__const__)); - -extern int isupper (int c) __THROW __attribute__ ((__const__)); -extern int islower (int c) __THROW __attribute__ ((__const__)); - -extern int tolower(int c) __THROW __attribute__ ((__const__)); -extern int toupper(int c) __THROW __attribute__ ((__const__)); - -extern int isprint(int c) __THROW __attribute__ ((__const__)); -extern int ispunct(int c) __THROW __attribute__ ((__const__)); -extern int iscntrl(int c) __THROW __attribute__ ((__const__)); - -/* fscking GNU extensions! */ -extern int isxdigit(int c) __THROW __attribute__ ((__const__)); - -extern int isgraph(int c) __THROW __attribute__ ((__const__)); - -#endif diff --git a/mdk-stage1/dietlibc/include/daemon.h b/mdk-stage1/dietlibc/include/daemon.h deleted file mode 100644 index 9049f367d..000000000 --- a/mdk-stage1/dietlibc/include/daemon.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _DAEMON_H -#define _DAEMON_H - -extern int daemon (int nochdir,int noclose); - -#endif diff --git a/mdk-stage1/dietlibc/include/dirent.h b/mdk-stage1/dietlibc/include/dirent.h deleted file mode 100644 index b0ad4f5ec..000000000 --- a/mdk-stage1/dietlibc/include/dirent.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _DIRENT_H -#define _DIRENT_H 1 - -#include <sys/cdefs.h> -#include <sys/types.h> - -#include <linux/dirent.h> - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#define _DIRENT_HAVE_D_TYPE - -typedef struct __dirstream DIR; - -DIR *opendir (const char *__name) __THROW; -int closedir (DIR *__dirp) __THROW; -struct dirent *readdir (DIR *__dirp) __THROW; -struct dirent64 *readdir64 (DIR *__dirp) __THROW; -void rewinddir (DIR *__dirp) __THROW; -void seekdir (DIR *__dirp, long int __pos) __THROW; -long int telldir (DIR *__dirp) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/dlfcn.h b/mdk-stage1/dietlibc/include/dlfcn.h deleted file mode 100644 index b96f8f615..000000000 --- a/mdk-stage1/dietlibc/include/dlfcn.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _DLFCN_H -#define _DLFCN_H 1 - -#define RTLD_LAZY 0x00000 -#define RTLD_NOW 0x00001 - -#define RTLD_LOCAL 0x00000 -#define RTLD_GLOBAL 0x10000 - -void *dlopen (const char *filename, int flag); -const char *dlerror(void); -void *dlsym(void *handle, char *symbol); -int dlclose (void *handle); - -#endif diff --git a/mdk-stage1/dietlibc/include/elf.h b/mdk-stage1/dietlibc/include/elf.h deleted file mode 100644 index be09dbee4..000000000 --- a/mdk-stage1/dietlibc/include/elf.h +++ /dev/null @@ -1 +0,0 @@ -#include <linux/elf.h> diff --git a/mdk-stage1/dietlibc/include/endian.h b/mdk-stage1/dietlibc/include/endian.h deleted file mode 100644 index 463c24fff..000000000 --- a/mdk-stage1/dietlibc/include/endian.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _ENDIAN_H -#define _ENDIAN_H - -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 - -#ifdef __i386__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __sparc__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __mips__ -#ifdef __MIPSEB__ -#define __BIG_ENDIAN__ -#endif -#endif - -#ifndef __BYTE_ORDER -#ifdef __BIG_ENDIAN__ -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif -#endif - -#define LITTLE_ENDIAN __LITTLE_ENDIAN -#define BIG_ENDIAN __BIG_ENDIAN -#define BYTE_ORDER __BYTE_ORDER - -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) LO, HI -#elif __BYTE_ORDER == __BIG_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) HI, LO -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/errno.h b/mdk-stage1/dietlibc/include/errno.h deleted file mode 100644 index d1c68f39c..000000000 --- a/mdk-stage1/dietlibc/include/errno.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _ERRNO_H -#define _ERRNO_H - -extern int errno; - -#include <linux/errno.h> - -extern int *__errno_location(void); -extern void __set_errno(int error); - -#endif diff --git a/mdk-stage1/dietlibc/include/fcntl.h b/mdk-stage1/dietlibc/include/fcntl.h deleted file mode 100644 index b792502c1..000000000 --- a/mdk-stage1/dietlibc/include/fcntl.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _FCNTL_H -#define _FCNTL_H - -#include <sys/cdefs.h> - -#include <sys/types.h> -#include <unistd.h> - -#include <asm/fcntl.h> - -extern int fcntl (int __fd, int __cmd, ...) __THROW; -extern int open (const char *__file, int __oflag, ...) __THROW; -extern int open64 (const char *__file, int __oflag, ...) __THROW; -extern int creat (const char *__file, mode_t __mode) __THROW; -extern int creat64 (const char *__file, mode_t __mode) __THROW; -extern int lockf (int __fd, int __cmd, off_t __len) __THROW; -extern int lockf64 (int __fd, int __cmd, off64_t __len) __THROW; - -#define F_ULOCK 0 /* Unlock a previously locked region. */ -#define F_LOCK 1 /* Lock a region for exclusive use. */ -#define F_TLOCK 2 /* Test and lock a region for exclusive use. */ -#define F_TEST 3 /* Test a region for other processes locks. */ - -#endif diff --git a/mdk-stage1/dietlibc/include/features.h b/mdk-stage1/dietlibc/include/features.h deleted file mode 100644 index 5b0283f20..000000000 --- a/mdk-stage1/dietlibc/include/features.h +++ /dev/null @@ -1,3 +0,0 @@ -#warning "someone included features.h, apparently someone is including glibc headers!" - -#define __dietlibc__ diff --git a/mdk-stage1/dietlibc/include/fnmatch.h b/mdk-stage1/dietlibc/include/fnmatch.h deleted file mode 100644 index 762b43ff7..000000000 --- a/mdk-stage1/dietlibc/include/fnmatch.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _FNMATCH_H -#define _FNMATCH_H - -#include <sys/cdefs.h> - -int fnmatch(const char *pattern, const char *string, int flags) __THROW; - -#define FNM_NOESCAPE 1 -#define FNM_PATHNAME 2 -#define FNM_FILE_NAME 2 -#define FNM_PERIOD 4 -#define FNM_LEADING_DIR 8 -#define FNM_CASEFOLD 16 - -#endif diff --git a/mdk-stage1/dietlibc/include/ftw.h b/mdk-stage1/dietlibc/include/ftw.h deleted file mode 100644 index c888f0021..000000000 --- a/mdk-stage1/dietlibc/include/ftw.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _FTW_H -#define _FTW_H - -#include <sys/cdefs.h> -#include <sys/stat.h> - -struct FTW - { - int base; - int level; - }; - -int ftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int depth) __THROW; -int nftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int depth, int flags) __THROW; - -enum -{ - FTW_F, /* Regular file. */ -#define FTW_F FTW_F - FTW_D, /* Directory. */ -#define FTW_D FTW_D - FTW_DNR, /* Unreadable directory. */ -#define FTW_DNR FTW_DNR - FTW_NS, /* Unstatable file. */ -#define FTW_NS FTW_NS - FTW_SL, /* Symbolic link. */ -# define FTW_SL FTW_SL -/* These flags are only passed from the `nftw' function. */ - FTW_DP, /* Directory, all subdirs have been visited. */ -# define FTW_DP FTW_DP - FTW_SLN /* Symbolic link naming non-existing file. */ -# define FTW_SLN FTW_SLN -}; - -typedef int (*__ftw_func_t) (__const char *__filename, - __const struct stat *__status, int __flag) __THROW; - -typedef int (*__nftw_func_t) (__const char *__filename, - __const struct stat *__status, int __flag, - struct FTW *__info) __THROW; - -#ifndef __NO_STAT64 -typedef int (*__ftw64_func_t) (__const char *__filename, - __const struct stat64 *__status, int __flag) __THROW; - -typedef int (*__nftw64_func_t) (__const char *__filename, - __const struct stat64 *__status, - int __flag, struct FTW *__info) __THROW; -#endif - -#endif diff --git a/mdk-stage1/dietlibc/include/getopt.h b/mdk-stage1/dietlibc/include/getopt.h deleted file mode 100644 index ebfc5522d..000000000 --- a/mdk-stage1/dietlibc/include/getopt.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __GETOPT_H__ -#define __GETOPT_H__ - -extern int optind,opterr; -extern char *optarg; -int getopt(int argc, char *argv[], char *options); - -/* the following was taken from GNU getopt, it's not actually supported - * by the diet libc! */ -extern int optopt; - -struct option { - const char* name; - int has_arg; - int* flag; - int val; -}; - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -extern int getopt_long(int argc, char *const *argv, - const char *shortopts, const struct option *longopts, - int *longind); - -extern int getopt_long_only(int argc, char *const *argv, - const char *shortopts, const struct option *longopts, - int *longind); - - -#endif diff --git a/mdk-stage1/dietlibc/include/glob.h b/mdk-stage1/dietlibc/include/glob.h deleted file mode 100644 index 80febbccf..000000000 --- a/mdk-stage1/dietlibc/include/glob.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef _GLOB_H -#define _GLOB_H - - -typedef struct { - size_t gl_pathc; /* Count of paths matched so far */ - char **gl_pathv; /* List of matched pathnames. */ - size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ - int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ -} glob_t; - - -int glob(const char *pattern, int flags, - int errfunc(const char * epath, int eerrno), - glob_t *pglob) __THROW; - -void globfree(glob_t *pglob) __THROW; - - - -/* Bits set in the FLAGS argument to `glob'. */ -#define GLOB_ERR (1 << 0)/* Return on read errors. */ -#define GLOB_MARK (1 << 1)/* Append a slash to each name. */ -#define GLOB_NOSORT (1 << 2)/* Don't sort the names. */ -#define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */ -#define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */ -#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ -#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ -#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ - -#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ -#define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ -#define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ -#define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ -#define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */ -#define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ -#define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error - if the user name is not available. */ -#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ - GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) - - -/* Error returns from `glob'. */ -#define GLOB_NOSPACE 1 /* Ran out of memory. */ -#define GLOB_ABORTED 2 /* Read error. */ -#define GLOB_NOMATCH 3 /* No matches found. */ -#define GLOB_NOSYS 4 /* Not implemented. */ -/* Previous versions of this file defined GLOB_ABEND instead of - GLOB_ABORTED. Provide a compatibility definition here. */ -#define GLOB_ABEND GLOB_ABORTED - - -#endif diff --git a/mdk-stage1/dietlibc/include/grp.h b/mdk-stage1/dietlibc/include/grp.h deleted file mode 100644 index 32bf49afc..000000000 --- a/mdk-stage1/dietlibc/include/grp.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _GRP_H -#define _GRP_H - -#include <sys/cdefs.h> -#include <sys/types.h> - -struct group - { - char *gr_name; /* Group name. */ - char *gr_passwd; /* Password. */ - gid_t gr_gid; /* Group ID. */ - char **gr_mem; /* Member list. */ - }; - -extern struct group *getgrgid (gid_t uid) __THROW; -extern struct group *getgrnam (const char *name) __THROW; - -extern struct group *getgrent(void) __THROW; -extern void setgrent(void) __THROW; -extern void endgrent(void) __THROW; - -extern int setgroups(size_t n, const gid_t *groups) __THROW; -extern int initgroups(const char *user, gid_t group) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/inttypes.h b/mdk-stage1/dietlibc/include/inttypes.h deleted file mode 100644 index e69de29bb..000000000 --- a/mdk-stage1/dietlibc/include/inttypes.h +++ /dev/null diff --git a/mdk-stage1/dietlibc/include/limits.h b/mdk-stage1/dietlibc/include/limits.h deleted file mode 100644 index a333debfd..000000000 --- a/mdk-stage1/dietlibc/include/limits.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _LIMITS_H -#define _LIMITS_H - -#include <linux/limits.h> - -#define __WORDSIZE 32 - -#ifdef __alpha__ -#undef __WORDSIZE -#define __WORDSIZE 64 -#endif - -#ifndef PATH_MAX -#define PATH_MAX 4096 -#endif - -#define CHAR_BIT 8 - -#define SCHAR_MIN (-128) -#define SCHAR_MAX 0x7f -#define UCHAR_MAX 0xff - -#define SHRT_MIN (-SHRT_MAX-1) -#define SHRT_MAX 0x7fff -#define USHRT_MAX 0xffff - -#define INT_MIN (-INT_MAX-1) -#define INT_MAX 0x7fffffff -#define UINT_MAX 0xffffffff - -#if __WORDSIZE == 64 -#define LONG_MAX 9223372036854775807L -#define ULONG_MAX 18446744073709551615UL -#else -#define LONG_MAX 2147483647L -#define ULONG_MAX 4294967295UL -#endif -#define LONG_MIN (-LONG_MAX - 1L) - -#define LLONG_MAX 9223372036854775807LL -#define LLONG_MIN (-LLONG_MAX - 1LL) - -/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ -#define ULLONG_MAX 18446744073709551615ULL - -#define PASS_MAX 256 - -#endif diff --git a/mdk-stage1/dietlibc/include/locale.h b/mdk-stage1/dietlibc/include/locale.h deleted file mode 100644 index acbeec8c1..000000000 --- a/mdk-stage1/dietlibc/include/locale.h +++ /dev/null @@ -1,6 +0,0 @@ -#warning "there is no locale support for diet libc yet" - -#define setlocale(a,b) 0 -#define bindtextdomain -#define textdomain - diff --git a/mdk-stage1/dietlibc/include/malloc.h b/mdk-stage1/dietlibc/include/malloc.h deleted file mode 100644 index c8b49f26d..000000000 --- a/mdk-stage1/dietlibc/include/malloc.h +++ /dev/null @@ -1 +0,0 @@ -#include <stdlib.h> diff --git a/mdk-stage1/dietlibc/include/math.h b/mdk-stage1/dietlibc/include/math.h deleted file mode 100644 index 2f4f2e33f..000000000 --- a/mdk-stage1/dietlibc/include/math.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _MATH_H -#define _MATH_H - -#include <sys/cdefs.h> - -#define M_E 2.7182818284590452354 /* e */ -#define M_LOG2E 1.4426950408889634074 /* log_2 e */ -#define M_LOG10E 0.43429448190325182765 /* log_10 e */ -#define M_LN2 0.69314718055994530942 /* log_e 2 */ -#define M_LN10 2.30258509299404568402 /* log_e 10 */ -#define M_PI 3.14159265358979323846 /* pi */ -#define M_PI_2 1.57079632679489661923 /* pi/2 */ -#define M_PI_4 0.78539816339744830962 /* pi/4 */ -#define M_1_PI 0.31830988618379067154 /* 1/pi */ -#define M_2_PI 0.63661977236758134308 /* 2/pi */ -#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ - -#define M_El 2.7182818284590452353602874713526625L /* e */ -#define M_LOG2El 1.4426950408889634073599246810018922L /* log_2 e */ -#define M_LOG10El 0.4342944819032518276511289189166051L /* log_10 e */ -#define M_LN2l 0.6931471805599453094172321214581766L /* log_e 2 */ -#define M_LN10l 2.3025850929940456840179914546843642L /* log_e 10 */ -#define M_PIl 3.1415926535897932384626433832795029L /* pi */ -#define M_PI_2l 1.5707963267948966192313216916397514L /* pi/2 */ -#define M_PI_4l 0.7853981633974483096156608458198757L /* pi/4 */ -#define M_1_PIl 0.3183098861837906715377675267450287L /* 1/pi */ -#define M_2_PIl 0.6366197723675813430755350534900574L /* 2/pi */ -#define M_2_SQRTPIl 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */ -#define M_SQRT2l 1.4142135623730950488016887242096981L /* sqrt(2) */ -#define M_SQRT1_2l 0.7071067811865475244008443621048490L /* 1/sqrt(2) */ - -double sin(double d) __THROW __attribute__((__const__)); -double cos(double d) __THROW __attribute__((__const__)); -double tan(double d) __THROW __attribute__((__const__)); - -double sinh(double d) __THROW __attribute__((__const__)); -double cosh(double d) __THROW __attribute__((__const__)); -double tanh(double d) __THROW __attribute__((__const__)); - -double asin(double d) __THROW __attribute__((__const__)); -double acos(double d) __THROW __attribute__((__const__)); -double atan(double d) __THROW __attribute__((__const__)); - -double asinh(double d) __THROW __attribute__((__const__)); -double acosh(double d) __THROW __attribute__((__const__)); -double atanh(double d) __THROW __attribute__((__const__)); - -double exp(double d) __THROW __attribute__((__const__)); -double log(double d) __THROW __attribute__((__const__)); -double log10(double d) __THROW __attribute__((__const__)); - -double pow(double x, double y) __THROW __attribute__((__const__)); - -double sqrt(double x) __THROW __attribute__((__const__)); -double fabs(double x) __THROW __attribute__((__const__)); -double fmod(double x, double y) __THROW __attribute__((__const__)); - - -#endif diff --git a/mdk-stage1/dietlibc/include/memory.h b/mdk-stage1/dietlibc/include/memory.h deleted file mode 100644 index 39adee705..000000000 --- a/mdk-stage1/dietlibc/include/memory.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _MEMORY_H -#define _MEMORY_H - -#include <string.h> - -#endif diff --git a/mdk-stage1/dietlibc/include/mntent.h b/mdk-stage1/dietlibc/include/mntent.h deleted file mode 100644 index 301403224..000000000 --- a/mdk-stage1/dietlibc/include/mntent.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _MNTENT_H -#define _MNTENT_H - -#include <sys/cdefs.h> -#include <stdio.h> -#include <paths.h> - -#define MNTTAB _PATH_MNTTAB /* Deprecated alias. */ -#define MOUNTED _PATH_MOUNTED /* Deprecated alias. */ - -/* General filesystem types. */ -#define MNTTYPE_IGNORE "ignore" /* Ignore this entry. */ -#define MNTTYPE_NFS "nfs" /* Network file system. */ -#define MNTTYPE_SWAP "swap" /* Swap device. */ - - -/* Generic mount options. */ -#define MNTOPT_DEFAULTS "defaults" /* Use all default options. */ -#define MNTOPT_RO "ro" /* Read only. */ -#define MNTOPT_RW "rw" /* Read/write. */ -#define MNTOPT_SUID "suid" /* Set uid allowed. */ -#define MNTOPT_NOSUID "nosuid" /* No set uid allowed. */ -#define MNTOPT_NOAUTO "noauto" /* Do not auto mount. */ - -__BEGIN_DECLS - -/* Structure describing a mount table entry. */ -struct mntent - { - char *mnt_fsname; /* Device or server for filesystem. */ - char *mnt_dir; /* Directory mounted on. */ - char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */ - char *mnt_opts; /* Comma-separated options for fs. */ - int mnt_freq; /* Dump frequency (in days). */ - int mnt_passno; /* Pass number for `fsck'. */ - }; - - -/* Prepare to begin reading and/or writing mount table entries from the - beginning of FILE. MODE is as for `fopen'. */ -extern FILE *setmntent (const char *file, const char *mode) __THROW; - -/* Read one mount table entry from STREAM. Returns a pointer to storage - reused on the next call, or null for EOF or error (use feof/ferror to - check). */ -extern struct mntent *getmntent (FILE* stream) __THROW; - -#ifdef __USE_MISC -/* Reentrant version of the above function. */ -extern struct mntent *getmntent_r (FILE* stream, - struct mntent* result, - char* buffer, - int bufsize) __THROW; -#endif - -/* Write the mount table entry described by MNT to STREAM. - Return zero on success, nonzero on failure. */ -extern int addmntent (FILE* stream, - const struct mntent* mnt) __THROW; - -/* Close a stream opened with `setmntent'. */ -extern int endmntent (FILE *stream) __THROW; - -/* Search MNT->mnt_opts for an option matching OPT. - Returns the address of the substring, or null if none found. */ -extern char *hasmntopt (const struct mntent *__mnt, - const char *opt) __THROW; - - -__END_DECLS - -#endif /* mntent.h */ diff --git a/mdk-stage1/dietlibc/include/net/if.h b/mdk-stage1/dietlibc/include/net/if.h deleted file mode 100644 index 88f386f46..000000000 --- a/mdk-stage1/dietlibc/include/net/if.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _NET_IF_H -#define _NET_IF_H - -#include <sys/cdefs.h> - -#include <linux/if.h> - -unsigned int if_nametoindex (const char *ifname) __THROW; -char *if_indextoname (unsigned int ifindex, char *ifname) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/net/if_arp.h b/mdk-stage1/dietlibc/include/net/if_arp.h deleted file mode 100644 index fe37a22dc..000000000 --- a/mdk-stage1/dietlibc/include/net/if_arp.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _NET_IF_ARP_H -#define _NET_IF_ARP_H - -#include <linux/if_arp.h> - -#endif diff --git a/mdk-stage1/dietlibc/include/net/route.h b/mdk-stage1/dietlibc/include/net/route.h deleted file mode 100644 index 5e5db7b1a..000000000 --- a/mdk-stage1/dietlibc/include/net/route.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _NET_IF_ROUTE_H -#define _NET_IF_ROUTE_H - -#include <linux/route.h> - -#endif diff --git a/mdk-stage1/dietlibc/include/netdb.h b/mdk-stage1/dietlibc/include/netdb.h deleted file mode 100644 index e90ea81ac..000000000 --- a/mdk-stage1/dietlibc/include/netdb.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef _NETDB_H -#define _NETDB_H - -#include <sys/cdefs.h> -#include <sys/types.h> - -/* Absolute file name for network data base files. */ -#define _PATH_HEQUIV "/etc/hosts.equiv" -#define _PATH_HOSTS "/etc/hosts" -#define _PATH_NETWORKS "/etc/networks" -#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" -#define _PATH_PROTOCOLS "/etc/protocols" -#define _PATH_SERVICES "/etc/services" - -/* Description of data base entry for a single service. */ -struct servent -{ - char *s_name; /* Official service name. */ - char **s_aliases; /* Alias list. */ - int s_port; /* Port number. */ - char *s_proto; /* Protocol to use. */ -}; - -extern void endservent (void) __THROW; -extern struct servent *getservent (void) __THROW; -extern struct servent *getservbyname (const char *__name, - const char *__proto) __THROW; -extern struct servent *getservbyport (int __port, const char *__proto) - __THROW; - -struct hostent -{ - char *h_name; /* Official name of host. */ - char **h_aliases; /* Alias list. */ - int h_addrtype; /* Host address type. */ - socklen_t h_length; /* Length of address. */ - char **h_addr_list; /* List of addresses from name server. */ -#define h_addr h_addr_list[0] /* Address, for backward compatibility. */ -}; - -extern void endhostent (void) __THROW; -extern struct hostent *gethostent (void) __THROW; -extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len, - int __type) __THROW; -extern struct hostent *gethostbyname (const char *__name) __THROW; -extern struct hostent *gethostbyname2 (const char *__name, int __af) __THROW; - -/* this glibc "invention" is so ugly, I'm going to throw up any minute - * now */ -extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF, - size_t BUFLEN, struct hostent** RESULT, - int* H_ERRNOP) __THROW; - -#define HOST_NOT_FOUND 1 -#define TRY_AGAIN 2 -#define NO_RECOVERY 3 -#define NO_ADDRESS 4 - -extern int gethostbyaddr_r(const char* addr, size_t length, int format, - struct hostent* result, char *buf, size_t buflen, - struct hostent **RESULT, int *h_errnop) __THROW; - -struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol number */ -}; - -struct protoent *getprotoent(void) __THROW; -struct protoent *getprotobyname(const char *name) __THROW; -struct protoent *getprotobynumber(int proto) __THROW; -void setprotoent(int stayopen) __THROW; -void endprotoent(void) __THROW; - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; - -extern struct netent *getnetbyname (__const char *__name) __THROW; - - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/in.h b/mdk-stage1/dietlibc/include/netinet/in.h deleted file mode 100644 index 0569c8289..000000000 --- a/mdk-stage1/dietlibc/include/netinet/in.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _NETINET_IN_H -#define _NETINET_IN_H - -#include <linux/in.h> -#include <linux/in6.h> - -#define IPPORT_RESERVED 1024 - -#endif diff --git a/mdk-stage1/dietlibc/include/netinet/in_systm.h b/mdk-stage1/dietlibc/include/netinet/in_systm.h deleted file mode 100644 index e69de29bb..000000000 --- a/mdk-stage1/dietlibc/include/netinet/in_systm.h +++ /dev/null diff --git a/mdk-stage1/dietlibc/include/netinet/ip.h b/mdk-stage1/dietlibc/include/netinet/ip.h deleted file mode 100644 index 35bf9cc42..000000000 --- a/mdk-stage1/dietlibc/include/netinet/ip.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _NETINET_IP_H -#define _NETINET_IP_H - -#include <linux/ip.h> - -#endif diff --git a/mdk-stage1/dietlibc/include/paths.h b/mdk-stage1/dietlibc/include/paths.h deleted file mode 100644 index 0e36bb10e..000000000 --- a/mdk-stage1/dietlibc/include/paths.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _PATHS_H -#define _PATHS_H - -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/bin:/usr/bin:" - -#define _PATH_DEVNULL "/dev/null" - -#define _PATH_CONSOLE "/dev/console" -#define _PATH_MOUNTED "/etc/mtab" - -#define _PATH_PASSWD "/etc/passwd" -#define _PATH_GROUP "/etc/group" -#define _PATH_SHADOW "/etc/shadow" - -#endif diff --git a/mdk-stage1/dietlibc/include/pthread.h b/mdk-stage1/dietlibc/include/pthread.h deleted file mode 100644 index e922ab28b..000000000 --- a/mdk-stage1/dietlibc/include/pthread.h +++ /dev/null @@ -1,227 +0,0 @@ -#ifndef _PTHREAD_H -#define _PTHREAD_H 1 - -#include <sched.h> -#include <signal.h> -#include <setjmp.h> - -/* arg... kernel haeder... */ -#define ENOTSUP 524 /* Operation is not supported */ - -#define PTHREAD_STACK_SIZE 16384 - -#define PTHREAD_THREADS_MAX 128 - -#define MAX_SPIN_COUNT 50 -#define SPIN_SLEEP_DURATION 2000001 - -#define PTHREAD_KEYS_MAX 7 -#define PTHREAD_DESTRUCTOR_ITERATIONS 10 - -typedef struct _pthread_descr_struct *_pthread_descr; -typedef unsigned long int pthread_t; - -/* Fast locks */ -struct _pthread_fastlock { - int __spinlock; -}; - -/* Mutexes */ -typedef struct { - struct _pthread_fastlock lock; - _pthread_descr owner; - int kind; - unsigned int count; -} pthread_mutex_t; - -enum { - PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK_NP, -}; - -enum -{ - PTHREAD_PROCESS_PRIVATE, -#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE - PTHREAD_PROCESS_SHARED -#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED -}; - -#define PTHREAD_MUTEX_INITIALIZER \ -{{0}, 0, PTHREAD_MUTEX_FAST_NP, 0} - -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ -{{0}, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0} - -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ -{{0}, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0} - -typedef struct { - int __mutexkind; -} pthread_mutexattr_t; - -int pthread_mutex_init(pthread_mutex_t *mutex, - const pthread_mutexattr_t *mutexattr); -int pthread_mutex_lock(pthread_mutex_t *mutex); -int pthread_mutex_unlock(pthread_mutex_t *mutex); -int pthread_mutex_trylock(pthread_mutex_t *mutex); -int pthread_mutex_destroy(pthread_mutex_t *mutex); - -/* Conditions */ -typedef void* pthread_condattr_t; - -typedef struct { - struct _pthread_fastlock lock; - _pthread_descr wait_chain; -} pthread_cond_t; - -#define PTHREAD_COND_INITIALIZER \ -{{0},0} - -int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); -int pthread_cond_destroy(pthread_cond_t *cond); -int pthread_cond_signal(pthread_cond_t *cond); -int pthread_cond_broadcast(pthread_cond_t *cond); -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); - -/* only for completeness (always return NULL) */ -int pthread_condattr_init(pthread_condattr_t *attr); -int pthread_condattr_destroy(pthread_condattr_t *attr); -int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared); -int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared); - -/* thread specific variables */ -typedef unsigned int pthread_key_t; - -int pthread_key_create(pthread_key_t *key, void (*destructor)(const void*)); -int pthread_key_delete(pthread_key_t key); -int pthread_setspecific(pthread_key_t key, const void *value); -const void *pthread_getspecific(pthread_key_t key); - - -/* Attributes for threads. */ -typedef struct -{ - int __detachstate; - int __schedpolicy; - struct sched_param __schedparam; - int __inheritsched; - int __scope; - void * __stackaddr; - unsigned long __stacksize; -} pthread_attr_t; - -enum -{ - PTHREAD_CREATE_JOINABLE, -#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE - PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED -}; - -enum -{ - PTHREAD_EXPLICIT_SCHED, -#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED - PTHREAD_INHERIT_SCHED -#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED -}; - -enum /* for completeness */ -{ - PTHREAD_SCOPE_SYSTEM, -#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM - PTHREAD_SCOPE_PROCESS -#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS -}; - -int pthread_attr_init(pthread_attr_t *attr); -int pthread_attr_destroy(pthread_attr_t *attr); - -int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate); -int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate); - -int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); -int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy); - -int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param); -int pthread_attr_getschedparam(const pthread_attr_t *attr, - struct sched_param *param); - -int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit); -int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit); - -int pthread_attr_setscope(pthread_attr_t *attr, int scope); -int pthread_attr_getscope(const pthread_attr_t *attr, int *scope); - -int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack); -int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stack); - -int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); -int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize); - -/* ONCE */ -typedef int pthread_once_t; -#define PTHREAD_ONCE_INIT 0 - -int __pthread_once(pthread_once_t* once_control, void (*init_routine)(void)); -int pthread_once(pthread_once_t* once_control, void (*init_routine)(void)); - -/* CANCEL */ - -enum { - PTHREAD_CANCEL_ENABLE, -#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE - PTHREAD_CANCEL_DISABLE, -#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE -}; - -enum { - PTHREAD_CANCEL_ASYNCHRONOUS, -#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS - PTHREAD_CANCEL_DEFERRED, -#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED -}; - -#define PTHREAD_CANCELED ((void *) -1) - -int pthread_cancel(pthread_t thread); -int pthread_setcancelstate(int state, int *oldstate); - -int pthread_setcanceltype(int type, int *oldtype); - -void pthread_testcancel(void); - -/* CLEANUP */ - -void pthread_cleanup_push(void (*routine)(void*), void *arg); -void pthread_cleanup_pop (int execute); - -void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg); -void pthread_cleanup_pop_restore_np(int execute); - -/* FORK */ - -pid_t pthread_atfork(void (*prepare)(void), void (*parent)(void), - void (*child)(void)); - -/* THREADS */ -int pthread_create (pthread_t *__thread, - const pthread_attr_t *__attr, - void *(*__start_routine) (void *), - void *__arg); - -void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); - -int pthread_join (pthread_t __th, void **__thread_return); - -int pthread_detach (pthread_t __th); - -pthread_t pthread_self (void); -int pthread_equal (pthread_t __thread1, pthread_t __thread2); - -#endif diff --git a/mdk-stage1/dietlibc/include/pwd.h b/mdk-stage1/dietlibc/include/pwd.h deleted file mode 100644 index e6fb5d0be..000000000 --- a/mdk-stage1/dietlibc/include/pwd.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _PWD_H -#define _PWD_H - -#include <sys/cdefs.h> -#include <sys/types.h> - -struct passwd { - char *pw_name; /* Username. */ - char *pw_passwd; /* Password. */ - uid_t pw_uid; /* User ID. */ - gid_t pw_gid; /* Group ID. */ - char *pw_gecos; /* Real name. */ - char *pw_dir; /* Home directory. */ - char *pw_shell; /* Shell program. */ -}; - -extern struct passwd *getpwuid (uid_t __uid) __THROW; -extern struct passwd *getpwnam (const char *__name) __THROW; - -extern struct passwd *getpwent(void) __THROW; -extern void setpwent(void) __THROW; -extern void endpwent(void) __THROW; - -#endif diff --git a/mdk-stage1/dietlibc/include/regex.h b/mdk-stage1/dietlibc/include/regex.h deleted file mode 100644 index be609d9db..000000000 --- a/mdk-stage1/dietlibc/include/regex.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _REGEX_H -#define _REGEX_H - -#include <sys/cdefs.h> -#include <sys/types.h> - -typedef ptrdiff_t regoff_t; - -typedef struct { - regoff_t rm_so; - regoff_t rm_eo; -} regmatch_t; - -#define REG_EXTENDED 1 -#define REG_ICASE 2 -#define REG_NOSUB 4 -#define REG_NEWLINE 8 - -#define REG_NOTBOL 1 -#define REG_NOTEOL 2 - -#define REG_NOMATCH -1 - -#define RE_DUP_MAX 255 - -struct __regex_t; - -typedef int (*matcher)(void*,const char*,int ofs,struct __regex_t *t,int plus,int eflags); - -typedef struct __regex_t { - struct regex { - matcher m; - void* next; - int pieces; - int num; - struct branch *b; - } r; - int brackets,cflags; - regmatch_t *l; -} regex_t; - -int regcomp(regex_t *preg, const char *regex, int cflags) __THROW; -int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) __THROW; -size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) __THROW; -void regfree(regex_t *preg) __THROW; - -enum __regex_errors { - REG_NOERROR, - REG_BADRPT, /* Invalid use of repetition operators such as using `*' as the first character. */ - REG_BADBR, /* Invalid use of back reference operator. */ - REG_EBRACE, /* Un-matched brace interval operators. */ - REG_EBRACK, /* Un-matched bracket list operators. */ - REG_ERANGE, /* Invalid use of the range operator, eg. the ending point of the - range occurs prior to the starting point. */ - REG_ECTYPE, /* Unknown character class name. */ - REG_ECOLLATE, /* Invalid collating element. */ - REG_EPAREN, /* Un-matched parenthesis group operators. */ - REG_ESUBREG, /* Invalid back reference to a subexpression. */ - REG_EEND, /* Non specific error. This is not defined by POSIX.2. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_BADPAT, /* Invalid use of pattern operators such as group or list. */ - REG_ESIZE, /* Compiled regular expression requires a pattern buffer - larger than 64Kb. This is not defined by POSIX.2. */ - REG_ESPACE, /* regcomp ran out of space */ -}; - -#endif diff --git a/mdk-stage1/dietlibc/include/resolv.h b/mdk-stage1/dietlibc/include/resolv.h deleted file mode 100644 index 4e90799c2..000000000 --- a/mdk-stage1/dietlibc/include/resolv.h +++ /dev/null @@ -1 +0,0 @@ -void res_init(void); diff --git a/mdk-stage1/dietlibc/include/rpc/auth.h b/mdk-stage1/dietlibc/include/rpc/auth.h deleted file mode 100644 index 4aa7d21ce..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth.h +++ /dev/null @@ -1,213 +0,0 @@ -/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - -#ifndef _RPC_AUTH_H - -#define _RPC_AUTH_H 1 -#include <sys/cdefs.h> -#include <rpc/xdr.h> - -__BEGIN_DECLS - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7 /* some unknown reason */ -}; - -union des_block { - struct { - u_int32_t high; - u_int32_t low; - } key; - char c[8]; -}; -typedef union des_block des_block; -extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - -/* - * Auth handle, interface to client side authenticators. - */ -typedef struct AUTH AUTH; -struct AUTH { - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - struct auth_ops { - void (*ah_nextverf) (AUTH *); - int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ - int (*ah_validate) (AUTH *, struct opaque_auth *); - /* validate verifier */ - int (*ah_refresh) (AUTH *); /* refresh credentials */ - void (*ah_destroy) (AUTH *); /* destroy this structure */ - } *ah_ops; - caddr_t ah_private; -}; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - - -extern struct opaque_auth _null_auth; - - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -extern AUTH *authunix_create (char *__machname,uid_t __uid, gid_t __gid, - int __len, gid_t *__aup_gids) __THROW; -extern AUTH *authunix_create_default (void) __THROW; -extern AUTH *authnone_create (void) __THROW; -extern AUTH *authdes_create (const char *__servername, u_int __window, - struct sockaddr *__syncaddr, des_block *__ckey) - __THROW; -extern AUTH *authdes_pk_create (const char *, netobj *, u_int, - struct sockaddr *, des_block *) __THROW; - - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_SYS 1 /* unix style (uid, gids) */ -#define AUTH_UNIX AUTH_SYS -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ -#define AUTH_DH AUTH_DES /* Diffie-Hellman (this is DES) */ -#define AUTH_KERB 4 /* kerberos style */ - -/* - * Netname manipulating functions - * - */ -extern int getnetname (char *) __THROW; -extern int host2netname (char *, __const char *, __const char *) __THROW; -extern int user2netname (char *, __const uid_t, __const char *) __THROW; -extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *) - __THROW; -extern int netname2host (__const char *, char *, __const int) __THROW; - -/* - * - * These routines interface to the keyserv daemon - * - */ -extern int key_decryptsession (char *, des_block *) __THROW; -extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; -extern int key_encryptsession (char *, des_block *) __THROW; -extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; -extern int key_gendes (des_block *) __THROW; -extern int key_setsecret (char *) __THROW; -extern int key_secretkey_is_set (void) __THROW; -extern int key_get_conv (char *, des_block *) __THROW; - -/* - * XDR an opaque authentication struct. - */ -extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; - -__END_DECLS - -#endif /* rpc/auth.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/auth_des.h b/mdk-stage1/dietlibc/include/rpc/auth_des.h deleted file mode 100644 index 198b299e7..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth_des.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _RPC_AUTH_DES_H -#define _RPC_AUTH_DES_H 1 - -#include <sys/cdefs.h> -#include <rpc/auth.h> - -__BEGIN_DECLS - -/* There are two kinds of "names": fullnames and nicknames */ -enum authdes_namekind - { - ADN_FULLNAME, - ADN_NICKNAME - }; - -/* A fullname contains the network name of the client, - a conversation key and the window */ -struct authdes_fullname - { - char *name; /* network name of client, up to MAXNETNAMELEN */ - des_block key; /* conversation key */ - uint32_t window; /* associated window */ - }; - -/* A credential */ -struct authdes_cred - { - enum authdes_namekind adc_namekind; - struct authdes_fullname adc_fullname; - uint32_t adc_nickname; - }; - -/* A timeval replacement for !32bit platforms */ -struct rpc_timeval - { - uint32_t tv_sec; /* Seconds. */ - uint32_t tv_usec; /* Microseconds. */ - }; - -/* A des authentication verifier */ -struct authdes_verf - { - union - { - struct rpc_timeval adv_ctime; /* clear time */ - des_block adv_xtime; /* crypt time */ - } - adv_time_u; - uint32_t adv_int_u; - }; - -/* des authentication verifier: client variety - - adv_timestamp is the current time. - adv_winverf is the credential window + 1. - Both are encrypted using the conversation key. */ -#define adv_timestamp adv_time_u.adv_ctime -#define adv_xtimestamp adv_time_u.adv_xtime -#define adv_winverf adv_int_u - -/* des authentication verifier: server variety - - adv_timeverf is the client's timestamp + client's window - adv_nickname is the server's nickname for the client. - adv_timeverf is encrypted using the conversation key. */ -#define adv_timeverf adv_time_u.adv_ctime -#define adv_xtimeverf adv_time_u.adv_xtime -#define adv_nickname adv_int_u - -/* Map a des credential into a unix cred. */ -extern int authdes_getucred (__const struct authdes_cred * __adc, - uid_t * __uid, gid_t * __gid, - short *__grouplen, gid_t * __groups) __THROW; - -/* Get the public key for NAME and place it in KEY. NAME can only be - up to MAXNETNAMELEN bytes long and the destination buffer KEY should - have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey (__const char *__name, char *__key) __THROW; - -/* Get the secret key for NAME and place it in KEY. PASSWD is used to - decrypt the encrypted key stored in the database. NAME can only be - up to MAXNETNAMELEN bytes long and the destination buffer KEY - should have HEXKEYBYTES + 1 bytes long to fit all characters from - the key. */ -extern int getsecretkey (__const char *__name, char *__key, - __const char *__passwd) __THROW; - -extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, - struct rpc_timeval *__timeout) __THROW; - -__END_DECLS - - -#endif /* rpc/auth_des.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/auth_unix.h b/mdk-stage1/dietlibc/include/rpc/auth_unix.h deleted file mode 100644 index 7a1bfa9f0..000000000 --- a/mdk-stage1/dietlibc/include/rpc/auth_unix.h +++ /dev/null @@ -1,90 +0,0 @@ -/* @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)auth_unix.h 1.5 86/07/16 SMI */ - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -#ifndef _RPC_AUTH_UNIX_H -#define _RPC_AUTH_UNIX_H 1 - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <rpc/types.h> -#include <rpc/auth.h> -#include <rpc/xdr.h> - -__BEGIN_DECLS - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - -/* - * Unix style credentials. - */ -struct authunix_parms - { - u_long aup_time; - char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; - u_int aup_len; - gid_t *aup_gids; - }; - -extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) - __THROW; - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf - { - struct opaque_auth new_cred; - }; - -__END_DECLS - -#endif /* rpc/auth_unix.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/clnt.h b/mdk-stage1/dietlibc/include/rpc/clnt.h deleted file mode 100644 index 60b0fafdf..000000000 --- a/mdk-stage1/dietlibc/include/rpc/clnt.h +++ /dev/null @@ -1,421 +0,0 @@ -/* @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_CLNT_H -#define _RPC_CLNT_H 1 - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <rpc/types.h> -#include <rpc/auth.h> -#include <sys/un.h> - -__BEGIN_DECLS - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - RPC_NOBROADCAST = 21, /* Broadcasting not supported */ - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unknown protocol */ - RPC_UNKNOWNADDR = 19, /* Remote address unknown */ - - /* - * rpcbind errors - */ - RPC_RPCBFAILURE=14, /* portmapper failed in its call */ -#define RPC_PMAPFAILURE RPC_RPCBFAILURE - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - RPC_N2AXLATEFAILURE = 22, /* Name to addr translation failed */ - /* - * unspecified error - */ - RPC_FAILED=16, - RPC_INTR=18, - RPC_TLIERROR=20, - RPC_UDERROR=23, - /* - * asynchronous errors - */ - RPC_INPROGRESS = 24, - RPC_STALERACHANDLE = 25 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* related system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { - u_long low; /* lowest verion supported */ - u_long high; /* highest verion supported */ - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ - long s1; - long s2; - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations, see e.g. rpc_udp.c. - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct CLIENT CLIENT; -struct CLIENT { - AUTH *cl_auth; /* authenticator */ - struct clnt_ops { - enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, - caddr_t, struct timeval); - /* call remote procedure */ - void (*cl_abort) (void); /* abort a call */ - void (*cl_geterr) (CLIENT *, struct rpc_err *); - /* get specific error code */ - bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t); - /* frees results */ - void (*cl_destroy) (CLIENT *); /* destroy this structure */ - bool_t (*cl_control) (CLIENT *, int, char *); - /* the ioctl() of rpc */ - } *cl_ops; - caddr_t cl_private; /* private stuff */ -}; - - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * u_long proc; - * xdrproc_t xargs; - * caddr_t argsp; - * xdrproc_t xres; - * caddr_t resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * caddr_t resp; - */ -#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) -#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * u_int request; - * char *info; - */ -#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) -#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) - -/* - * control operations that apply to all transports - * - * Note: options marked XXX are no-ops in this implementation of RPC. - * The are present in TI-RPC but can't be implemented here since they - * depend on the presence of STREAMS/TLI, which we don't have. - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -#define CLGET_FD 6 /* get connections file descriptor */ -#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) XXX */ -#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */ -#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy*/ -#define CLGET_XID 10 /* Get xid */ -#define CLSET_XID 11 /* Set xid */ -#define CLGET_VERS 12 /* Get version number */ -#define CLSET_VERS 13 /* Set version number */ -#define CLGET_PROG 14 /* Get program number */ -#define CLSET_PROG 15 /* Set program number */ -#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) XXX */ -#define CLSET_PUSH_TIMOD 17 /* push timod if not already present XXX */ -#define CLSET_POP_TIMOD 18 /* pop timod XXX */ -/* - * Connectionless only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessible on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#define RPCTEST_PROGRAM ((u_long)1) -#define RPCTEST_VERSION ((u_long)1) -#define RPCTEST_NULL_PROC ((u_long)2) -#define RPCTEST_NULL_BATCH_PROC ((u_long)3) - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#define NULLPROC ((u_long)0) - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clntraw_create(prog, vers) - * u_long prog; - * u_long vers; - */ -extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) - __THROW; - - -/* - * Generic client creation routine. Supported protocols are "udp", "tcp" and - * "unix" - * CLIENT * - * clnt_create(host, prog, vers, prot) - * char *host; -- hostname - * u_long prog; -- program number - * u_ong vers; -- version number - * char *prot; -- protocol - */ -extern CLIENT *clnt_create (__const char *__host, __const u_long __prog, - __const u_long __vers, __const char *__prot) - __THROW; - - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; - * register int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, u_long __prog, - u_long __version, int *__sockp, u_int __sendsz, - u_int __recvsz) __THROW; - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait_resend; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait_resend; - * int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program, - u_long __version, struct timeval __wait_resend, - int *__sockp) __THROW; -extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, int *__sockp, - u_int __sendsz, u_int __recvsz) __THROW; - - - - -/* - * AF_UNIX based rpc - * CLIENT * - * clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_un *raddr; - * u_long prog; - * u_long version; - * register int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, u_long __program, - u_long __version, int *__sockp, - u_int __sendsz, u_int __recvsz) __THROW; - - -extern int callrpc (__const char *__host, __const u_long __prognum, - __const u_long __versnum, __const u_long __procnum, - __const xdrproc_t __inproc, __const char *__in, - __const xdrproc_t __outproc, char *__out) __THROW; -extern int _rpc_dtablesize (void) __THROW; - -/* - * Print why creation failed - */ -extern void clnt_pcreateerror (__const char *__msg) __THROW; /* stderr */ -extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */ - -/* - * Like clnt_perror(), but is more verbose in its output - */ -extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ - -/* - * Print an English error message, given the client error code - */ -extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW; - /* stderr */ -extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW; - /* string */ - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -extern struct rpc_createerr rpc_createerr; - - - -/* - * Copy error message to buffer. - */ -extern char *clnt_sperrno (enum clnt_stat __num) __THROW; /* string */ - -/* - * get the port number on the host for the rpc program,version and proto - */ -extern int getrpcport (__const char * __host, u_long __prognum, - u_long __versnum, u_int proto) __THROW; - -/* - * get the local host's IP address without consulting - * name service library functions - */ -extern void get_myaddress (struct sockaddr_in *) __THROW; - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -__END_DECLS - -#endif /* rpc/clnt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/des_crypt.h b/mdk-stage1/dietlibc/include/rpc/des_crypt.h deleted file mode 100644 index 6a65887d3..000000000 --- a/mdk-stage1/dietlibc/include/rpc/des_crypt.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * @(#)des_crypt.h 2.1 88/08/11 4.0 RPCSRC; from 1.4 88/02/08 (C) 1986 SMI - * - * des_crypt.h, des library routine interface - * Copyright (C) 1986, Sun Microsystems, Inc. - */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -#ifndef __DES_CRYPT_H__ -#define __DES_CRYPT_H__ 1 - -#include <features.h> - -__BEGIN_DECLS - -#define DES_MAXDATA 8192 /* max bytes encrypted in one call */ -#define DES_DIRMASK (1 << 0) -#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ -#define DES_DECRYPT (1*DES_DIRMASK) /* Decrypt */ - - -#define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ -#define DES_SW (1*DES_DEVMASK) /* Use software device */ - - -#define DESERR_NONE 0 /* succeeded */ -#define DESERR_NOHWDEVICE 1 /* succeeded, but hw device not available */ -#define DESERR_HWERROR 2 /* failed, hardware/driver error */ -#define DESERR_BADPARAM 3 /* failed, bad parameter to call */ - -#define DES_FAILED(err) \ - ((err) > DESERR_NOHWDEVICE) - -/* - * cbc_crypt() - * ecb_crypt() - * - * Encrypt (or decrypt) len bytes of a buffer buf. - * The length must be a multiple of eight. - * The key should have odd parity in the low bit of each byte. - * ivec is the input vector, and is updated to the new one (cbc only). - * The mode is created by oring together the appropriate parameters. - * DESERR_NOHWDEVICE is returned if DES_HW was specified but - * there was no hardware to do it on (the data will still be - * encrypted though, in software). - */ - - -/* - * Cipher Block Chaining mode - */ -extern int cbc_crypt (char *__key, char *__buf, unsigned __len, - unsigned __mode, char *__ivec) __THROW; - -/* - * Electronic Code Book mode - */ -extern int ecb_crypt (char *__key, char *__buf, unsigned __len, - unsigned __mode) __THROW; - -/* - * Set des parity for a key. - * DES parity is odd and in the low bit of each byte - */ -extern void des_setparity (char *__key) __THROW; - -__END_DECLS - -#endif diff --git a/mdk-stage1/dietlibc/include/rpc/key_prot.h b/mdk-stage1/dietlibc/include/rpc/key_prot.h deleted file mode 100644 index 3e2eb7208..000000000 --- a/mdk-stage1/dietlibc/include/rpc/key_prot.h +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _KEY_PROT_H_RPCGEN -#define _KEY_PROT_H_RPCGEN - -#include <rpc/rpc.h> - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -#if 0 -#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" -#endif -/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */ - -/* - * Compiled from key_prot.x using rpcgen. - * DO NOT EDIT THIS FILE! - * This is NOT source code! - */ -#define PROOT 3 -#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" -#define HEXKEYBYTES 48 -#define KEYSIZE 192 -#define KEYBYTES 24 -#define KEYCHECKSUMSIZE 16 - -enum keystatus { - KEY_SUCCESS = 0, - KEY_NOSECRET = 1, - KEY_UNKNOWN = 2, - KEY_SYSTEMERR = 3, -}; -typedef enum keystatus keystatus; -#ifdef __cplusplus -extern "C" bool_t xdr_keystatus(XDR *, keystatus*); -#elif __STDC__ -extern bool_t xdr_keystatus(XDR *, keystatus*); -#else /* Old Style C */ -bool_t xdr_keystatus(); -#endif /* Old Style C */ - - -typedef char keybuf[HEXKEYBYTES]; -#ifdef __cplusplus -extern "C" bool_t xdr_keybuf(XDR *, keybuf); -#elif __STDC__ -extern bool_t xdr_keybuf(XDR *, keybuf); -#else /* Old Style C */ -bool_t xdr_keybuf(); -#endif /* Old Style C */ - - -typedef char *netnamestr; -#ifdef __cplusplus -extern "C" bool_t xdr_netnamestr(XDR *, netnamestr*); -#elif __STDC__ -extern bool_t xdr_netnamestr(XDR *, netnamestr*); -#else /* Old Style C */ -bool_t xdr_netnamestr(); -#endif /* Old Style C */ - - -struct cryptkeyarg { - netnamestr remotename; - des_block deskey; -}; -typedef struct cryptkeyarg cryptkeyarg; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); -#elif __STDC__ -extern bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*); -#else /* Old Style C */ -bool_t xdr_cryptkeyarg(); -#endif /* Old Style C */ - - -struct cryptkeyarg2 { - netnamestr remotename; - netobj remotekey; - des_block deskey; -}; -typedef struct cryptkeyarg2 cryptkeyarg2; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); -#elif __STDC__ -extern bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*); -#else /* Old Style C */ -bool_t xdr_cryptkeyarg2(); -#endif /* Old Style C */ - - -struct cryptkeyres { - keystatus status; - union { - des_block deskey; - } cryptkeyres_u; -}; -typedef struct cryptkeyres cryptkeyres; -#ifdef __cplusplus -extern "C" bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); -#elif __STDC__ -extern bool_t xdr_cryptkeyres(XDR *, cryptkeyres*); -#else /* Old Style C */ -bool_t xdr_cryptkeyres(); -#endif /* Old Style C */ - -#define MAXGIDS 16 - -struct unixcred { - u_int uid; - u_int gid; - struct { - u_int gids_len; - u_int *gids_val; - } gids; -}; -typedef struct unixcred unixcred; -#ifdef __cplusplus -extern "C" bool_t xdr_unixcred(XDR *, unixcred*); -#elif __STDC__ -extern bool_t xdr_unixcred(XDR *, unixcred*); -#else /* Old Style C */ -bool_t xdr_unixcred(); -#endif /* Old Style C */ - - -struct getcredres { - keystatus status; - union { - unixcred cred; - } getcredres_u; -}; -typedef struct getcredres getcredres; -#ifdef __cplusplus -extern "C" bool_t xdr_getcredres(XDR *, getcredres*); -#elif __STDC__ -extern bool_t xdr_getcredres(XDR *, getcredres*); -#else /* Old Style C */ -bool_t xdr_getcredres(); -#endif /* Old Style C */ - - -struct key_netstarg { - keybuf st_priv_key; - keybuf st_pub_key; - netnamestr st_netname; -}; -typedef struct key_netstarg key_netstarg; -#ifdef __cplusplus -extern "C" bool_t xdr_key_netstarg(XDR *, key_netstarg*); -#elif __STDC__ -extern bool_t xdr_key_netstarg(XDR *, key_netstarg*); -#else /* Old Style C */ -bool_t xdr_key_netstarg(); -#endif /* Old Style C */ - - -struct key_netstres { - keystatus status; - union { - key_netstarg knet; - } key_netstres_u; -}; -typedef struct key_netstres key_netstres; -#ifdef __cplusplus -extern "C" bool_t xdr_key_netstres(XDR *, key_netstres*); -#elif __STDC__ -extern bool_t xdr_key_netstres(XDR *, key_netstres*); -#else /* Old Style C */ -bool_t xdr_key_netstres(); -#endif /* Old Style C */ - - -#ifndef opaque -#define opaque char -#endif - - -#define KEY_PROG ((u_long)100029) -#define KEY_VERS ((u_long)1) - -#ifdef __cplusplus -#define KEY_SET ((u_long)1) -extern "C" keystatus * key_set_1(opaque *, CLIENT *); -extern "C" keystatus * key_set_1_svc(opaque *, struct svc_req *); -#define KEY_ENCRYPT ((u_long)2) -extern "C" cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_DECRYPT ((u_long)3) -extern "C" cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_GEN ((u_long)4) -extern "C" des_block * key_gen_1(void *, CLIENT *); -extern "C" des_block * key_gen_1_svc(void *, struct svc_req *); -#define KEY_GETCRED ((u_long)5) -extern "C" getcredres * key_getcred_1(netnamestr *, CLIENT *); -extern "C" getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); - -#elif __STDC__ -#define KEY_SET ((u_long)1) -extern keystatus * key_set_1(opaque *, CLIENT *); -extern keystatus * key_set_1_svc(opaque *, struct svc_req *); -#define KEY_ENCRYPT ((u_long)2) -extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_DECRYPT ((u_long)3) -extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *); -#define KEY_GEN ((u_long)4) -extern des_block * key_gen_1(void *, CLIENT *); -extern des_block * key_gen_1_svc(void *, struct svc_req *); -#define KEY_GETCRED ((u_long)5) -extern getcredres * key_getcred_1(netnamestr *, CLIENT *); -extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *); - -#else /* Old Style C */ -#define KEY_SET ((u_long)1) -extern keystatus * key_set_1(); -extern keystatus * key_set_1_svc(); -#define KEY_ENCRYPT ((u_long)2) -extern cryptkeyres * key_encrypt_1(); -extern cryptkeyres * key_encrypt_1_svc(); -#define KEY_DECRYPT ((u_long)3) -extern cryptkeyres * key_decrypt_1(); -extern cryptkeyres * key_decrypt_1_svc(); -#define KEY_GEN ((u_long)4) -extern des_block * key_gen_1(); -extern des_block * key_gen_1_svc(); -#define KEY_GETCRED ((u_long)5) -extern getcredres * key_getcred_1(); -extern getcredres * key_getcred_1_svc(); -#endif /* Old Style C */ -#define KEY_VERS2 ((u_long)2) - -#ifdef __cplusplus -extern "C" keystatus * key_set_2(opaque *, CLIENT *); -extern "C" keystatus * key_set_2_svc(opaque *, struct svc_req *); -extern "C" cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern "C" cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern "C" des_block * key_gen_2(void *, CLIENT *); -extern "C" des_block * key_gen_2_svc(void *, struct svc_req *); -extern "C" getcredres * key_getcred_2(netnamestr *, CLIENT *); -extern "C" getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); -#define KEY_ENCRYPT_PK ((u_long)6) -extern "C" cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern "C" cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_DECRYPT_PK ((u_long)7) -extern "C" cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern "C" cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_NET_PUT ((u_long)8) -extern "C" keystatus * key_net_put_2(key_netstarg *, CLIENT *); -extern "C" keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); -#define KEY_NET_GET ((u_long)9) -extern "C" key_netstres * key_net_get_2(void *, CLIENT *); -extern "C" key_netstres * key_net_get_2_svc(void *, struct svc_req *); -#define KEY_GET_CONV ((u_long)10) -extern "C" cryptkeyres * key_get_conv_2(opaque *, CLIENT *); -extern "C" cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); - -#elif __STDC__ -extern keystatus * key_set_2(opaque *, CLIENT *); -extern keystatus * key_set_2_svc(opaque *, struct svc_req *); -extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *); -extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *); -extern des_block * key_gen_2(void *, CLIENT *); -extern des_block * key_gen_2_svc(void *, struct svc_req *); -extern getcredres * key_getcred_2(netnamestr *, CLIENT *); -extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *); -#define KEY_ENCRYPT_PK ((u_long)6) -extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_DECRYPT_PK ((u_long)7) -extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *); -extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *); -#define KEY_NET_PUT ((u_long)8) -extern keystatus * key_net_put_2(key_netstarg *, CLIENT *); -extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *); -#define KEY_NET_GET ((u_long)9) -extern key_netstres * key_net_get_2(void *, CLIENT *); -extern key_netstres * key_net_get_2_svc(void *, struct svc_req *); -#define KEY_GET_CONV ((u_long)10) -extern cryptkeyres * key_get_conv_2(opaque *, CLIENT *); -extern cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *); - -#else /* Old Style C */ -extern keystatus * key_set_2(); -extern keystatus * key_set_2_svc(); -extern cryptkeyres * key_encrypt_2(); -extern cryptkeyres * key_encrypt_2_svc(); -extern cryptkeyres * key_decrypt_2(); -extern cryptkeyres * key_decrypt_2_svc(); -extern des_block * key_gen_2(); -extern des_block * key_gen_2_svc(); -extern getcredres * key_getcred_2(); -extern getcredres * key_getcred_2_svc(); -#define KEY_ENCRYPT_PK ((u_long)6) -extern cryptkeyres * key_encrypt_pk_2(); -extern cryptkeyres * key_encrypt_pk_2_svc(); -#define KEY_DECRYPT_PK ((u_long)7) -extern cryptkeyres * key_decrypt_pk_2(); -extern cryptkeyres * key_decrypt_pk_2_svc(); -#define KEY_NET_PUT ((u_long)8) -extern keystatus * key_net_put_2(); -extern keystatus * key_net_put_2_svc(); -#define KEY_NET_GET ((u_long)9) -extern key_netstres * key_net_get_2(); -extern key_netstres * key_net_get_2_svc(); -#define KEY_GET_CONV ((u_long)10) -extern cryptkeyres * key_get_conv_2(); -extern cryptkeyres * key_get_conv_2_svc(); -#endif /* Old Style C */ - -#endif /* !_KEY_PROT_H_RPCGEN */ diff --git a/mdk-stage1/dietlibc/include/rpc/netdb.h b/mdk-stage1/dietlibc/include/rpc/netdb.h deleted file mode 100644 index da4bddfc4..000000000 --- a/mdk-stage1/dietlibc/include/rpc/netdb.h +++ /dev/null @@ -1,74 +0,0 @@ -/* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)rpc.h 1.8 87/07/24 SMI */ - -/* Cleaned up for GNU C library roland@gnu.ai.mit.edu: - added multiple inclusion protection and use of <sys/cdefs.h>. - In GNU this file is #include'd by <netdb.h>. */ - -#ifndef _RPC_NETDB_H -#define _RPC_NETDB_H 1 - -#include <sys/cdefs.h> - -#define __need_size_t -#include <stddef.h> - -__BEGIN_DECLS - -struct rpcent -{ - char *r_name; /* Name of server for this rpc program. */ - char **r_aliases; /* Alias list. */ - int r_number; /* RPC program number. */ -}; - -extern void setrpcent (int __stayopen) __THROW; -extern void endrpcent (void) __THROW; -extern struct rpcent *getrpcbyname (__const char *__name) __THROW; -extern struct rpcent *getrpcbynumber (int __number) __THROW; -extern struct rpcent *getrpcent (void) __THROW; - -#ifdef __USE_MISC -extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result) __THROW; - -extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result) __THROW; - -extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result) __THROW; -#endif - -__END_DECLS - -#endif /* rpc/netdb.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h b/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h deleted file mode 100644 index 68bc8d8ec..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h +++ /dev/null @@ -1,98 +0,0 @@ -/* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_CLNT_H -#define _RPC_PMAP_CLNT_H 1 - -#include <sys/cdefs.h> -#include <rpc/types.h> -#include <rpc/xdr.h> -#include <rpc/clnt.h> - -__BEGIN_DECLS - -typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr); - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * caddr_t resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -extern bool_t pmap_set (__const u_long __program, __const u_long __vers, - int __protocol, u_short __port) __THROW; -extern bool_t pmap_unset (__const u_long __program, __const u_long __vers) - __THROW; -extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; -extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, - __const u_long __prog, - __const u_long __vers, - __const u_long __proc, - xdrproc_t __xdrargs, - caddr_t __argsp, xdrproc_t __xdrres, - caddr_t __resp, struct timeval __tout, - u_long *__port_ptr) __THROW; -extern enum clnt_stat clnt_broadcast (__const u_long __prog, - __const u_long __vers, - __const u_long __proc, xdrproc_t __xargs, - caddr_t __argsp, xdrproc_t __xresults, - caddr_t __resultsp, - resultproc_t __eachresult) __THROW; -extern u_short pmap_getport (struct sockaddr_in *__address, - __const u_long __program, - __const u_long __version, u_int __protocol) - __THROW; - -__END_DECLS - -#endif /* rpc/pmap_clnt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_prot.h b/mdk-stage1/dietlibc/include/rpc/pmap_prot.h deleted file mode 100644 index fd7fb8e7e..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_prot.h +++ /dev/null @@ -1,108 +0,0 @@ -/* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_PROT_H -#define _RPC_PMAP_PROT_H 1 - -#include <sys/cdefs.h> - -#include <rpc/xdr.h> - -__BEGIN_DECLS - -/* The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#define PMAPPORT ((u_short)111) -#define PMAPPROG ((u_long)100000) -#define PMAPVERS ((u_long)2) -#define PMAPVERS_PROTO ((u_long)2) -#define PMAPVERS_ORIG ((u_long)1) -#define PMAPPROC_NULL ((u_long)0) -#define PMAPPROC_SET ((u_long)1) -#define PMAPPROC_UNSET ((u_long)2) -#define PMAPPROC_GETPORT ((u_long)3) -#define PMAPPROC_DUMP ((u_long)4) -#define PMAPPROC_CALLIT ((u_long)5) - -struct pmap { - long unsigned pm_prog; - long unsigned pm_vers; - long unsigned pm_prot; - long unsigned pm_port; -}; - -extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; - -__END_DECLS - -#endif /* rpc/pmap_prot.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h b/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h deleted file mode 100644 index 160f998ca..000000000 --- a/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h +++ /dev/null @@ -1,68 +0,0 @@ -/* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAP_RMT_H -#define _RPC_PMAP_RMT_H 1 - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <rpc/types.h> -#include <rpc/xdr.h> - -__BEGIN_DECLS - -struct rmtcallargs { - u_long prog, vers, proc, arglen; - caddr_t args_ptr; - xdrproc_t xdr_args; -}; - -extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) - __THROW; - -struct rmtcallres { - u_long *port_ptr; - u_long resultslen; - caddr_t results_ptr; - xdrproc_t xdr_results; -}; - -extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; - -__END_DECLS - -#endif /* rpc/pmap_rmt.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/rpc.h b/mdk-stage1/dietlibc/include/rpc/rpc.h deleted file mode 100644 index 20b341d74..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc.h +++ /dev/null @@ -1,72 +0,0 @@ -/* @(#)rpc.h 2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RPC_H -#define _RPC_RPC_H 1 - -#include <rpc/types.h> /* some typedefs */ -#include <netinet/in.h> - -/* external data representation interfaces */ -#include <rpc/xdr.h> /* generic (de)serializer */ - -/* Client side only authentication */ -#include <rpc/auth.h> /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include <rpc/clnt.h> /* generic rpc stuff */ - -/* semi-private protocol headers */ -#include <rpc/rpc_msg.h> /* protocol for rpc messages */ -#include <rpc/auth_unix.h> /* protocol for unix style cred */ -#include <rpc/auth_des.h> /* protocol for des style cred */ - -/* Server side only remote procedure callee */ -#include <rpc/svc.h> /* service manager and multiplexer */ -#include <rpc/svc_auth.h> /* service side authenticator */ - -/* - * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION - * OF UNIX BASED ON NFSSRC. These systems will already have the structures - * defined by <rpc/netdb.h> included in <netdb.h>. - */ -/* routines for parsing /etc/rpc */ -#include <rpc/netdb.h> /* structures and routines to parse /etc/rpc */ - -int bindresvport(int sd, struct sockaddr_in* sin) __THROW; - -#endif /* rpc/rpc.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_des.h b/mdk-stage1/dietlibc/include/rpc/rpc_des.h deleted file mode 100644 index 0f36d1697..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc_des.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Generic DES driver interface - * Keep this file hardware independent! - * Copyright (c) 1986 by Sun Microsystems, Inc. - */ - -#ifndef _DES_H -#define _DES_H - -#include <sys/types.h> - -#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ -#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ - -enum desdir - { - ENCRYPT, DECRYPT - }; -enum desmode - { - CBC, ECB - }; - -/* - * parameters to ioctl call - */ -struct desparams - { - u_char des_key[8]; /* key (with low bit parity) */ - enum desdir des_dir; /* direction */ - enum desmode des_mode; /* mode */ - u_char des_ivec[8]; /* input vector */ - unsigned des_len; /* number of bytes to crypt */ - union - { - u_char UDES_data[DES_QUICKLEN]; - u_char *UDES_buf; - } - UDES; -#define des_data UDES.UDES_data /* direct data here if quick */ -#define des_buf UDES.UDES_buf /* otherwise, pointer to data */ - }; - -#endif diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_msg.h b/mdk-stage1/dietlibc/include/rpc/rpc_msg.h deleted file mode 100644 index 636d60ea9..000000000 --- a/mdk-stage1/dietlibc/include/rpc/rpc_msg.h +++ /dev/null @@ -1,202 +0,0 @@ -/* @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)rpc_msg.h 1.7 86/07/16 SMI */ - -#ifndef _RPC_MSG_H -#define _RPC_MSG_H 1 - -#include <sys/cdefs.h> - -#include <rpc/xdr.h> -#include <rpc/clnt.h> - -/* - * rpc_msg.h - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#define RPC_MSG_VERSION ((u_long) 2) -#define RPC_SERVICE_PORT ((u_short) 2048) - -__BEGIN_DECLS - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall struct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { - u_long low; - u_long high; - } AR_versions; - struct { - caddr_t where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { - u_long low; - u_long high; - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { - u_long cb_rpcvers; /* must be equal to two */ - u_long cb_prog; - u_long cb_vers; - u_long cb_proc; - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { - u_long rm_xid; - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - - -/* - * XDR routine to handle a rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; - -/* - * XDR routine to pre-serialize the static part of a rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; - -/* - * XDR routine to handle a rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW; - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error) - __THROW; - -__END_DECLS - -#endif /* rpc/rpc_msg.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/svc.h b/mdk-stage1/dietlibc/include/rpc/svc.h deleted file mode 100644 index 27c997dde..000000000 --- a/mdk-stage1/dietlibc/include/rpc/svc.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * svc.h, Server-side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_H -#define _RPC_SVC_H 1 - -#include <sys/cdefs.h> -#include <rpc/rpc_msg.h> - -__BEGIN_DECLS - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct SVCXPRT SVCXPRT; -struct SVCXPRT { - int xp_sock; - u_short xp_port; /* associated port number */ - const struct xp_ops { - bool_t (*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg); - /* receive incoming requests */ - enum xprt_stat (*xp_stat) (SVCXPRT *__xprt); - /* get transport status */ - bool_t (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr); /* get arguments */ - bool_t (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg); - /* send reply */ - bool_t (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr); - /* free mem allocated for args */ - void (*xp_destroy) (SVCXPRT *__xprt); - /* destroy this struct */ - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* remote address */ - struct opaque_auth xp_verf; /* raw response verifier */ - caddr_t xp_p1; /* private */ - caddr_t xp_p2; /* private */ - char xp_pad [256]; /* padding, internal use */ -}; - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * caddr_t argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - - -/* - * Service request - */ -struct svc_req { - rpcprog_t rq_prog; /* service program number */ - rpcvers_t rq_vers; /* service protocol version */ - rpcproc_t rq_proc; /* the desired procedure */ - struct opaque_auth rq_cred; /* raw creds from the wire */ - caddr_t rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ -}; - -#ifndef __DISPATCH_FN_T -#define __DISPATCH_FN_T -typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*); -#endif - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * rpcprog_t prog; - * rpcvers_t vers; - * void (*dispatch)(struct svc_req*, SVCXPRT*); - * rpcprot_t protocol; like TCP or UDP, zero means do not register - */ -extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog, - rpcvers_t __vers, __dispatch_fn_t __dispatch, - rpcprot_t __protocol) __THROW; - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * rpcprog_t prog; - * rpcvers_t vers; - */ -extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW; - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_register (SVCXPRT *__xprt) __THROW; - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_unregister (SVCXPRT *__xprt) __THROW; - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -extern bool_t svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results, - caddr_t __xdr_location) __THROW; - -extern void svcerr_decode (SVCXPRT *__xprt) __THROW; - -extern void svcerr_weakauth (SVCXPRT *__xprt) __THROW; - -extern void svcerr_noproc (SVCXPRT *__xprt) __THROW; - -extern void svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers, - rpcvers_t __high_vers) __THROW; - -extern void svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW; - -extern void svcerr_noprog (SVCXPRT *__xprt) __THROW; - -extern void svcerr_systemerr (SVCXPRT *__xprt) __THROW; - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (coexistent) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ - -extern struct pollfd *svc_pollfd; -extern int svc_max_pollfd; -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -extern void svc_getreq (int __rdfds) __THROW; -extern void svc_getreq_common (const int __fd) __THROW; -extern void svc_getreqset (fd_set *__readfds) __THROW; -extern void svc_getreq_poll (struct pollfd *, const int) __THROW; -extern void svc_exit (void) __THROW; -extern void svc_run (void) __THROW; - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 - -/* - * These are the existing service side transport implementations - */ - -/* - * Memory based rpc for testing and timing. - */ -extern SVCXPRT *svcraw_create (void) __THROW; - -/* - * Udp based rpc. - */ -extern SVCXPRT *svcudp_create (int __sock) __THROW; -extern SVCXPRT *svcudp_bufcreate (int __sock, u_int __sendsz, u_int __recvsz) - __THROW; - -/* - * Tcp based rpc. - */ -extern SVCXPRT *svctcp_create (int __sock, u_int __sendsize, u_int __recvsize) - __THROW; - - -/* - * Unix based rpc. - */ -extern SVCXPRT *svcunix_create (int __sock, u_int __sendsize, u_int __recvsize, - char *__path) __THROW; - - -__END_DECLS - -#endif /* rpc/svc.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/svc_auth.h b/mdk-stage1/dietlibc/include/rpc/svc_auth.h deleted file mode 100644 index cd4b8da29..000000000 --- a/mdk-stage1/dietlibc/include/rpc/svc_auth.h +++ /dev/null @@ -1,54 +0,0 @@ -/* @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* @(#)svc_auth.h 1.6 86/07/16 SMI */ - -/* - * svc_auth.h, Service side of rpc authentication. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_AUTH_H -#define _RPC_SVC_AUTH_H 1 - -#include <sys/cdefs.h> -#include <rpc/svc.h> - -__BEGIN_DECLS - -/* - * Server side authenticator - */ -extern enum auth_stat _authenticate (struct svc_req *__rqst, - struct rpc_msg *__msg) __THROW; - -__END_DECLS - -#endif /* rpc/svc_auth.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/types.h b/mdk-stage1/dietlibc/include/rpc/types.h deleted file mode 100644 index e2e8402be..000000000 --- a/mdk-stage1/dietlibc/include/rpc/types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* fixincludes should not add extern "C" to this file */ -/* - * Rpc additions to <sys/types.h> - */ -#ifndef _RPC_TYPES_H -#define _RPC_TYPES_H 1 - -typedef int bool_t; -typedef int enum_t; -/* This needs to be changed to uint32_t in the future */ -typedef unsigned long rpcprog_t; -typedef unsigned long rpcvers_t; -typedef unsigned long rpcproc_t; -typedef unsigned long rpcprot_t; -typedef unsigned long rpcport_t; - -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif - -#ifndef TRUE -# define TRUE (1) -#endif - -#ifndef NULL -# define NULL 0 -#endif - -#include <stdlib.h> /* For malloc decl. */ -#define mem_alloc(bsize) malloc(bsize) -#define mem_free(ptr, bsize) free(ptr) - -#ifndef makedev /* ie, we haven't already included it */ -#include <sys/types.h> -#endif -#include <sys/time.h> -#include <sys/param.h> - -#include <netinet/in.h> - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK (u_long)0x7F000001 -#endif -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#endif /* rpc/types.h */ diff --git a/mdk-stage1/dietlibc/include/rpc/xdr.h b/mdk-stage1/dietlibc/include/rpc/xdr.h deleted file mode 100644 index ce092f085..000000000 --- a/mdk-stage1/dietlibc/include/rpc/xdr.h +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -/* - * xdr.h, External Data Representation Serialization Routines. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_XDR_H -#define _RPC_XDR_H 1 - -#include <sys/cdefs.h> -#include <sys/types.h> -#include <rpc/types.h> - -/* We need FILE. */ -#include <stdio.h> - -__BEGIN_DECLS - -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * <type> *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE = 0, - XDR_DECODE = 1, - XDR_FREE = 2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -/* - * This only works if the above is a power of 2. But it's defined to be - * 4 by the appropriate RFCs. So it will work. And it's normally quicker - * than the old routine. - */ -#if 1 -#define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1)) -#else /* this is the old routine */ -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) -#endif - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the particular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular implementation. - */ -typedef struct XDR XDR; -struct XDR - { - enum xdr_op x_op; /* operation; fast additional param */ - struct xdr_ops - { - bool_t (*x_getlong) (XDR *__xdrs, long *__lp); - /* get a long from underlying stream */ - bool_t (*x_putlong) (XDR *__xdrs, const long *__lp); - /* put a long to " */ - bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len); - /* get some bytes from " */ - bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len); - /* put some bytes to " */ - u_int (*x_getpostn) (const XDR *__xdrs); - /* returns bytes off from beginning */ - bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos); - /* lets you reposition the stream */ - int32_t *(*x_inline) (XDR *__xdrs, int __len); - /* buf quick ptr to buffered data */ - void (*x_destroy) (XDR *__xdrs); - /* free privates of this xdr_stream */ - bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); - /* get a int from underlying stream */ - bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip); - /* put a int to " */ - } - *x_ops; - caddr_t x_public; /* users' data */ - caddr_t x_private; /* pointer to private data */ - caddr_t x_base; /* private used for position info */ - int x_handy; /* extra private word */ - }; - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - * bool_t (*xdrproc_t)(XDR *, caddr_t *); - */ -typedef bool_t (*xdrproc_t) (XDR *, void *,...); - - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * int32_t *int32p; - * long *longp; - * caddr_t addr; - * u_int len; - * u_int pos; - */ -#define XDR_GETINT32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) -#define xdr_getint32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_getint32)(xdrs, int32p) - -#define XDR_PUTINT32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) -#define xdr_putint32(xdrs, int32p) \ - (*(xdrs)->x_ops->x_putint32)(xdrs, int32p) - -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - do { \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs); \ - } while (0) -#define xdr_destroy(xdrs) \ - do { \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs); \ - } while (0) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * a entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim -{ - int value; - xdrproc_t proc; -}; - -/* - * Inline routines for fast encode/decode of primitive data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (FALSE); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ - -#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++)) -#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v))) -#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32(buf, (int32_t)(v)) - -/* WARNING: The IXDR_*_LONG defines are removed by Sun for new platforms - * and shouldn't be used any longer. Code which use this defines or longs - * in the RPC code will not work on 64bit Solaris platforms ! - */ -#define IXDR_GET_LONG(buf) \ - ((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++)) -#define IXDR_PUT_LONG(buf, v) \ - (*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v))) -#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) - - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v)) - -/* - * These are the "generic" xdr routines. - * None of these can have const applied because it's not possible to - * know whether the call is a read or a write to the passed parameter - * also, the XDR structure is always updated by some of these calls. - */ -extern bool_t xdr_void (void) __THROW; -extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW; -extern bool_t xdr_u_short (XDR *__xdrs, u_short *__usp) __THROW; -extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW; -extern bool_t xdr_u_int (XDR *__xdrs, u_int *__up) __THROW; -extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW; -extern bool_t xdr_u_long (XDR *__xdrs, u_long *__ulp) __THROW; -extern bool_t xdr_hyper (XDR *__xdrs, __quad_t *__llp) __THROW; -extern bool_t xdr_u_hyper (XDR *__xdrs, __u_quad_t *__ullp) __THROW; -extern bool_t xdr_longlong_t (XDR *__xdrs, __quad_t *__llp) __THROW; -extern bool_t xdr_u_longlong_t (XDR *__xdrs, __u_quad_t *__ullp) __THROW; -extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW; -extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW; -extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW; -extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW; -extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW; -extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW; -extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW; -extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW; -extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW; -extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW; -extern bool_t xdr_array (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep, - u_int __maxsize, u_int __elsize, xdrproc_t __elproc) - __THROW; -extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, u_int *__sizep, - u_int __maxsize) __THROW; -extern bool_t xdr_opaque (XDR *__xdrs, caddr_t __cp, u_int __cnt) __THROW; -extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW; -extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp, - const struct xdr_discrim *__choices, - xdrproc_t dfault) __THROW; -extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; -extern bool_t xdr_u_char (XDR *__xdrs, u_char *__cp) __THROW; -extern bool_t xdr_vector (XDR *__xdrs, char *__basep, u_int __nelem, - u_int __elemsize, xdrproc_t __xdr_elem) __THROW; -extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW; -extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW; -extern bool_t xdr_reference (XDR *__xdrs, caddr_t *__xpp, u_int __size, - xdrproc_t __proc) __THROW; -extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp, - u_int __obj_size, xdrproc_t __xdr_obj) __THROW; -extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW; -extern u_long xdr_sizeof (xdrproc_t, void *) __THROW; - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ -#define MAX_NETOBJ_SZ 1024 -struct netobj -{ - u_int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ - -/* XDR using memory buffers */ -extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr, - u_int __size, enum xdr_op __xop) __THROW; - -/* XDR using stdio library */ -extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop) - __THROW; - -/* XDR pseudo records for tcp */ -extern void xdrrec_create (XDR *__xdrs, u_int __sendsize, - u_int __recvsize, caddr_t __tcp_handle, - int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int)) __THROW; - -/* make end of xdr record */ -extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW; - -/* move to beginning of next record */ -extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW; - -/* true if no more input */ -extern bool_t xdrrec_eof (XDR *__xdrs) __THROW; - -/* free memory buffers for xdr */ -extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW; - -__END_DECLS - -#endif /* rpc/xdr.h */ diff --git a/mdk-stage1/dietlibc/include/sched.h b/mdk-stage1/dietlibc/include/sched.h deleted file mode 100644 index 5e4430d29..000000000 --- a/mdk-stage1/dietlibc/include/sched.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _SCHED_H -#define _SCHED_H 1 - -#include <time.h> - -#include <sys/types.h> -#ifndef u16 -#define u16 __u16 -#endif - -/* till those F**KIN' kernel headers are sane: A COPY ! - * #include <linux/sched.h> - * A COPY OF THE STUFF WE NEED.... *GRUMBLE* */ - -/* - * cloning flags: - */ -#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ -#define CLONE_VM 0x00000100 /* set if VM shared between processes */ -#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ -#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ -#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ -#define CLONE_PID 0x00001000 /* set if pid shared */ -#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ -#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ -#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ -#define CLONE_THREAD 0x00010000 /* Same thread group? */ - -#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREA) - -/* - * Scheduling policies - */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -/* - * This is an additional bit set when we want to - * yield the CPU for one re-schedule.. - */ -#define SCHED_YIELD 0x10 - -struct sched_param { - int sched_priority; -}; - -/* END OF COPY form kernel-header */ - -int __sched_setparam(pid_t pid, const struct sched_param *p); -int sched_setparam(pid_t pid, const struct sched_param *p); - -int __sched_getparam(pid_t pid, struct sched_param *p); -int sched_getparam(pid_t pid, struct sched_param *p); - -int __sched_getscheduler(pid_t pid); -int sched_getscheduler(pid_t pid); - -int __sched_setscheduler(pid_t pid, int policy, const struct sched_param *p); -int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p); - -int __sched_yield(void); -int sched_yield(void); - -int __sched_get_priority_max(int policy); -int sched_get_priority_max(int policy); - -int __sched_get_priority_min(int policy); -int sched_get_priority_min(int policy); - -int __sched_rr_get_interval(pid_t pid, struct timespec *tp); -int sched_rr_get_interval(pid_t pid, struct timespec *tp); - -#endif diff --git a/mdk-stage1/dietlibc/include/scsi/scsi.h b/mdk-stage1/dietlibc/include/scsi/scsi.h deleted file mode 100644 index 652e44ee9..000000000 --- a/mdk-stage1/dietlibc/include/scsi/scsi.h +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * This header file contains public constants and structures used by - * the scsi code for linux. - */ - -#ifndef _SCSI_SCSI_H -#define _SCSI_SCSI_H 1 - -/* - * SCSI opcodes - */ - -#define TEST_UNIT_READY 0x00 -#define REZERO_UNIT 0x01 -#define REQUEST_SENSE 0x03 -#define FORMAT_UNIT 0x04 -#define READ_BLOCK_LIMITS 0x05 -#define REASSIGN_BLOCKS 0x07 -#define READ_6 0x08 -#define WRITE_6 0x0a -#define SEEK_6 0x0b -#define READ_REVERSE 0x0f -#define WRITE_FILEMARKS 0x10 -#define SPACE 0x11 -#define INQUIRY 0x12 -#define RECOVER_BUFFERED_DATA 0x14 -#define MODE_SELECT 0x15 -#define RESERVE 0x16 -#define RELEASE 0x17 -#define COPY 0x18 -#define ERASE 0x19 -#define MODE_SENSE 0x1a -#define START_STOP 0x1b -#define RECEIVE_DIAGNOSTIC 0x1c -#define SEND_DIAGNOSTIC 0x1d -#define ALLOW_MEDIUM_REMOVAL 0x1e - -#define SET_WINDOW 0x24 -#define READ_CAPACITY 0x25 -#define READ_10 0x28 -#define WRITE_10 0x2a -#define SEEK_10 0x2b -#define WRITE_VERIFY 0x2e -#define VERIFY 0x2f -#define SEARCH_HIGH 0x30 -#define SEARCH_EQUAL 0x31 -#define SEARCH_LOW 0x32 -#define SET_LIMITS 0x33 -#define PRE_FETCH 0x34 -#define READ_POSITION 0x34 -#define SYNCHRONIZE_CACHE 0x35 -#define LOCK_UNLOCK_CACHE 0x36 -#define READ_DEFECT_DATA 0x37 -#define MEDIUM_SCAN 0x38 -#define COMPARE 0x39 -#define COPY_VERIFY 0x3a -#define WRITE_BUFFER 0x3b -#define READ_BUFFER 0x3c -#define UPDATE_BLOCK 0x3d -#define READ_LONG 0x3e -#define WRITE_LONG 0x3f -#define CHANGE_DEFINITION 0x40 -#define WRITE_SAME 0x41 -#define READ_TOC 0x43 -#define LOG_SELECT 0x4c -#define LOG_SENSE 0x4d -#define MODE_SELECT_10 0x55 -#define RESERVE_10 0x56 -#define RELEASE_10 0x57 -#define MODE_SENSE_10 0x5a -#define PERSISTENT_RESERVE_IN 0x5e -#define PERSISTENT_RESERVE_OUT 0x5f -#define MOVE_MEDIUM 0xa5 -#define READ_12 0xa8 -#define WRITE_12 0xaa -#define WRITE_VERIFY_12 0xae -#define SEARCH_HIGH_12 0xb0 -#define SEARCH_EQUAL_12 0xb1 -#define SEARCH_LOW_12 0xb2 -#define READ_ELEMENT_STATUS 0xb8 -#define SEND_VOLUME_TAG 0xb6 -#define WRITE_LONG_2 0xea - -/* - * Status codes - */ - -#define GOOD 0x00 -#define CHECK_CONDITION 0x01 -#define CONDITION_GOOD 0x02 -#define BUSY 0x04 -#define INTERMEDIATE_GOOD 0x08 -#define INTERMEDIATE_C_GOOD 0x0a -#define RESERVATION_CONFLICT 0x0c -#define COMMAND_TERMINATED 0x11 -#define QUEUE_FULL 0x14 - -#define STATUS_MASK 0x3e - -/* - * SENSE KEYS - */ - -#define NO_SENSE 0x00 -#define RECOVERED_ERROR 0x01 -#define NOT_READY 0x02 -#define MEDIUM_ERROR 0x03 -#define HARDWARE_ERROR 0x04 -#define ILLEGAL_REQUEST 0x05 -#define UNIT_ATTENTION 0x06 -#define DATA_PROTECT 0x07 -#define BLANK_CHECK 0x08 -#define COPY_ABORTED 0x0a -#define ABORTED_COMMAND 0x0b -#define VOLUME_OVERFLOW 0x0d -#define MISCOMPARE 0x0e - - -/* - * DEVICE TYPES - */ - -#define TYPE_DISK 0x00 -#define TYPE_TAPE 0x01 -#define TYPE_PROCESSOR 0x03 /* HP scanners use this */ -#define TYPE_WORM 0x04 /* Treated as ROM by our system */ -#define TYPE_ROM 0x05 -#define TYPE_SCANNER 0x06 -#define TYPE_MOD 0x07 /* Magneto-optical disk - - * - treated as TYPE_DISK */ -#define TYPE_MEDIUM_CHANGER 0x08 -#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ -#define TYPE_NO_LUN 0x7f - -/* - * standard mode-select header prepended to all mode-select commands - * - * moved here from cdrom.h -- kraxel - */ - -struct ccs_modesel_head - { - unsigned char _r1; /* reserved. */ - unsigned char medium; /* device-specific medium type. */ - unsigned char _r2; /* reserved. */ - unsigned char block_desc_length; /* block descriptor length. */ - unsigned char density; /* device-specific density code. */ - unsigned char number_blocks_hi; /* number of blocks in this block - desc. */ - unsigned char number_blocks_med; - unsigned char number_blocks_lo; - unsigned char _r3; - unsigned char block_length_hi; /* block length for blocks in this - desc. */ - unsigned char block_length_med; - unsigned char block_length_lo; - }; - -/* - * MESSAGE CODES - */ - -#define COMMAND_COMPLETE 0x00 -#define EXTENDED_MESSAGE 0x01 -#define EXTENDED_MODIFY_DATA_POINTER 0x00 -#define EXTENDED_SDTR 0x01 -#define EXTENDED_EXTENDED_IDENTIFY 0x02 /* SCSI-I only */ -#define EXTENDED_WDTR 0x03 -#define SAVE_POINTERS 0x02 -#define RESTORE_POINTERS 0x03 -#define DISCONNECT 0x04 -#define INITIATOR_ERROR 0x05 -#define ABORT 0x06 -#define MESSAGE_REJECT 0x07 -#define NOP 0x08 -#define MSG_PARITY_ERROR 0x09 -#define LINKED_CMD_COMPLETE 0x0a -#define LINKED_FLG_CMD_COMPLETE 0x0b -#define BUS_DEVICE_RESET 0x0c - -#define INITIATE_RECOVERY 0x0f /* SCSI-II only */ -#define RELEASE_RECOVERY 0x10 /* SCSI-II only */ - -#define SIMPLE_QUEUE_TAG 0x20 -#define HEAD_OF_QUEUE_TAG 0x21 -#define ORDERED_QUEUE_TAG 0x22 - -/* - * Here are some scsi specific ioctl commands which are sometimes useful. - */ -/* These are a few other constants only used by scsi devices. */ - -#define SCSI_IOCTL_GET_IDLUN 0x5382 - -/* Used to turn on and off tagged queuing for scsi devices. */ - -#define SCSI_IOCTL_TAGGED_ENABLE 0x5383 -#define SCSI_IOCTL_TAGGED_DISABLE 0x5384 - -/* Used to obtain the host number of a device. */ -#define SCSI_IOCTL_PROBE_HOST 0x5385 - -/* Used to get the bus number for a device. */ -#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 - -#endif /* scsi/scsi.h */ diff --git a/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h b/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h |