v86 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +17 -6
- package/bios/seabios/.config +113 -0
- package/bios/seabios/.config.old +114 -0
- package/bios/seabios/.gitignore +4 -0
- package/bios/seabios/COPYING +674 -0
- package/bios/seabios/COPYING.LESSER +165 -0
- package/bios/seabios/Makefile +286 -0
- package/bios/seabios/README +17 -0
- package/bios/seabios/docs/Build_overview.md +104 -0
- package/bios/seabios/docs/Contributing.md +20 -0
- package/bios/seabios/docs/Debugging.md +111 -0
- package/bios/seabios/docs/Developer_Documentation.md +25 -0
- package/bios/seabios/docs/Developer_links.md +86 -0
- package/bios/seabios/docs/Download.md +27 -0
- package/bios/seabios/docs/Execution_and_code_flow.md +178 -0
- package/bios/seabios/docs/Linking_overview.md +160 -0
- package/bios/seabios/docs/Mailinglist.md +8 -0
- package/bios/seabios/docs/Memory_Model.md +253 -0
- package/bios/seabios/docs/README +5 -0
- package/bios/seabios/docs/Releases.md +482 -0
- package/bios/seabios/docs/Runtime_config.md +193 -0
- package/bios/seabios/docs/SeaBIOS.md +17 -0
- package/bios/seabios/docs/SeaVGABIOS.md +39 -0
- package/bios/seabios/out/autoconf.h +117 -0
- package/bios/seabios/out/include/config/acpi/dsdt.h +0 -0
- package/bios/seabios/out/include/config/acpi.h +0 -0
- package/bios/seabios/out/include/config/ahci.h +0 -0
- package/bios/seabios/out/include/config/apmbios.h +0 -0
- package/bios/seabios/out/include/config/ata/dma.h +0 -0
- package/bios/seabios/out/include/config/ata/pio32.h +0 -0
- package/bios/seabios/out/include/config/ata.h +0 -0
- package/bios/seabios/out/include/config/auto.conf +69 -0
- package/bios/seabios/out/include/config/auto.conf.cmd +9 -0
- package/bios/seabios/out/include/config/boot.h +0 -0
- package/bios/seabios/out/include/config/bootorder.h +0 -0
- package/bios/seabios/out/include/config/build/vgabios.h +0 -0
- package/bios/seabios/out/include/config/call32/smm.h +0 -0
- package/bios/seabios/out/include/config/cdrom/boot.h +0 -0
- package/bios/seabios/out/include/config/cdrom/emu.h +0 -0
- package/bios/seabios/out/include/config/debug/level.h +0 -0
- package/bios/seabios/out/include/config/drives.h +0 -0
- package/bios/seabios/out/include/config/entry/extrastack.h +0 -0
- package/bios/seabios/out/include/config/esp/scsi.h +0 -0
- package/bios/seabios/out/include/config/flash/floppy.h +0 -0
- package/bios/seabios/out/include/config/floppy.h +0 -0
- package/bios/seabios/out/include/config/fw/romfile/load.h +0 -0
- package/bios/seabios/out/include/config/hardware/irq.h +0 -0
- package/bios/seabios/out/include/config/kbd/call/int15/4f.h +0 -0
- package/bios/seabios/out/include/config/keyboard.h +0 -0
- package/bios/seabios/out/include/config/lpt.h +0 -0
- package/bios/seabios/out/include/config/lsi/scsi.h +0 -0
- package/bios/seabios/out/include/config/malloc/uppermemory.h +0 -0
- package/bios/seabios/out/include/config/megasas.h +0 -0
- package/bios/seabios/out/include/config/mouse.h +0 -0
- package/bios/seabios/out/include/config/mpt/scsi.h +0 -0
- package/bios/seabios/out/include/config/mptable.h +0 -0
- package/bios/seabios/out/include/config/mtrr/init.h +0 -0
- package/bios/seabios/out/include/config/optionroms.h +0 -0
- package/bios/seabios/out/include/config/override/pci/id.h +0 -0
- package/bios/seabios/out/include/config/pcibios.h +0 -0
- package/bios/seabios/out/include/config/pirtable.h +0 -0
- package/bios/seabios/out/include/config/pmm.h +0 -0
- package/bios/seabios/out/include/config/pmtimer.h +0 -0
- package/bios/seabios/out/include/config/pnpbios.h +0 -0
- package/bios/seabios/out/include/config/ps2port.h +0 -0
- package/bios/seabios/out/include/config/pvscsi.h +0 -0
- package/bios/seabios/out/include/config/qemu/hardware.h +0 -0
- package/bios/seabios/out/include/config/qemu.h +0 -0
- package/bios/seabios/out/include/config/rom/size.h +0 -0
- package/bios/seabios/out/include/config/rtc/timer.h +0 -0
- package/bios/seabios/out/include/config/s3/resume.h +0 -0
- package/bios/seabios/out/include/config/sdcard.h +0 -0
- package/bios/seabios/out/include/config/serial.h +0 -0
- package/bios/seabios/out/include/config/tcgbios.h +0 -0
- package/bios/seabios/out/include/config/threads.h +0 -0
- package/bios/seabios/out/include/config/tristate.conf +4 -0
- package/bios/seabios/out/include/config/tsc/timer.h +0 -0
- package/bios/seabios/out/include/config/use/smm.h +0 -0
- package/bios/seabios/out/include/config/vga/allocate/extra/stack.h +0 -0
- package/bios/seabios/out/include/config/vga/bochs/stdvga.h +0 -0
- package/bios/seabios/out/include/config/vga/bochs.h +0 -0
- package/bios/seabios/out/include/config/vga/did.h +0 -0
- package/bios/seabios/out/include/config/vga/extra/stack/size.h +0 -0
- package/bios/seabios/out/include/config/vga/fixup/asm.h +0 -0
- package/bios/seabios/out/include/config/vga/pci.h +0 -0
- package/bios/seabios/out/include/config/vga/stdvga/ports.h +0 -0
- package/bios/seabios/out/include/config/vga/vbe.h +0 -0
- package/bios/seabios/out/include/config/vga/vid.h +0 -0
- package/bios/seabios/out/include/config/vgahooks.h +0 -0
- package/bios/seabios/out/include/config/virtio/blk.h +0 -0
- package/bios/seabios/out/include/config/virtio/scsi.h +0 -0
- package/bios/seabios/out/include/config/xen.h +0 -0
- package/bios/seabios/out/scripts/kconfig/conf +0 -0
- package/bios/seabios/out/scripts/kconfig/conf.o +0 -0
- package/bios/seabios/out/scripts/kconfig/zconf.hash.c +289 -0
- package/bios/seabios/out/scripts/kconfig/zconf.lex.c +2420 -0
- package/bios/seabios/out/scripts/kconfig/zconf.tab.c +2538 -0
- package/bios/seabios/out/scripts/kconfig/zconf.tab.o +0 -0
- package/bios/seabios/scripts/acpi_extract.py +366 -0
- package/bios/seabios/scripts/acpi_extract_preprocess.py +41 -0
- package/bios/seabios/scripts/buildrom.py +56 -0
- package/bios/seabios/scripts/buildversion.py +134 -0
- package/bios/seabios/scripts/checkrom.py +95 -0
- package/bios/seabios/scripts/checkstack.py +226 -0
- package/bios/seabios/scripts/checksum.py +16 -0
- package/bios/seabios/scripts/encodeint.py +21 -0
- package/bios/seabios/scripts/gen-offsets.sh +17 -0
- package/bios/seabios/scripts/kconfig/.gitignore +22 -0
- package/bios/seabios/scripts/kconfig/Makefile +331 -0
- package/bios/seabios/scripts/kconfig/POTFILES.in +12 -0
- package/bios/seabios/scripts/kconfig/check.sh +13 -0
- package/bios/seabios/scripts/kconfig/conf.c +718 -0
- package/bios/seabios/scripts/kconfig/confdata.c +1250 -0
- package/bios/seabios/scripts/kconfig/expr.c +1168 -0
- package/bios/seabios/scripts/kconfig/expr.h +241 -0
- package/bios/seabios/scripts/kconfig/gconf.c +1542 -0
- package/bios/seabios/scripts/kconfig/gconf.glade +661 -0
- package/bios/seabios/scripts/kconfig/images.c +326 -0
- package/bios/seabios/scripts/kconfig/kxgettext.c +235 -0
- package/bios/seabios/scripts/kconfig/lex.zconf.c +2430 -0
- package/bios/seabios/scripts/kconfig/list.h +131 -0
- package/bios/seabios/scripts/kconfig/lkc.h +200 -0
- package/bios/seabios/scripts/kconfig/lkc_proto.h +57 -0
- package/bios/seabios/scripts/kconfig/lxdialog/.gitignore +4 -0
- package/bios/seabios/scripts/kconfig/lxdialog/BIG.FAT.WARNING +4 -0
- package/bios/seabios/scripts/kconfig/lxdialog/check-lxdialog.sh +87 -0
- package/bios/seabios/scripts/kconfig/lxdialog/checklist.c +332 -0
- package/bios/seabios/scripts/kconfig/lxdialog/dialog.h +257 -0
- package/bios/seabios/scripts/kconfig/lxdialog/inputbox.c +301 -0
- package/bios/seabios/scripts/kconfig/lxdialog/menubox.c +437 -0
- package/bios/seabios/scripts/kconfig/lxdialog/textbox.c +408 -0
- package/bios/seabios/scripts/kconfig/lxdialog/util.c +713 -0
- package/bios/seabios/scripts/kconfig/lxdialog/yesno.c +114 -0
- package/bios/seabios/scripts/kconfig/mconf.c +1036 -0
- package/bios/seabios/scripts/kconfig/menu.c +697 -0
- package/bios/seabios/scripts/kconfig/merge_config.sh +150 -0
- package/bios/seabios/scripts/kconfig/nconf.c +1556 -0
- package/bios/seabios/scripts/kconfig/nconf.gui.c +656 -0
- package/bios/seabios/scripts/kconfig/nconf.h +96 -0
- package/bios/seabios/scripts/kconfig/qconf.cc +1795 -0
- package/bios/seabios/scripts/kconfig/qconf.h +338 -0
- package/bios/seabios/scripts/kconfig/streamline_config.pl +647 -0
- package/bios/seabios/scripts/kconfig/symbol.c +1373 -0
- package/bios/seabios/scripts/kconfig/util.c +157 -0
- package/bios/seabios/scripts/kconfig/zconf.gperf +48 -0
- package/bios/seabios/scripts/kconfig/zconf.hash.c_shipped +289 -0
- package/bios/seabios/scripts/kconfig/zconf.l +363 -0
- package/bios/seabios/scripts/kconfig/zconf.lex.c_shipped +2420 -0
- package/bios/seabios/scripts/kconfig/zconf.tab.c_shipped +2538 -0
- package/bios/seabios/scripts/kconfig/zconf.y +733 -0
- package/bios/seabios/scripts/layoutrom.py +705 -0
- package/bios/seabios/scripts/python23compat.py +14 -0
- package/bios/seabios/scripts/readserial.py +190 -0
- package/bios/seabios/scripts/tarball.sh +36 -0
- package/bios/seabios/scripts/test-build.sh +90 -0
- package/bios/seabios/scripts/transdump.py +53 -0
- package/bios/seabios/scripts/vgafixup.py +96 -0
- package/bios/seabios/src/Kconfig +579 -0
- package/bios/seabios/src/apm.c +215 -0
- package/bios/seabios/src/asm-offsets.c +23 -0
- package/bios/seabios/src/biosvar.h +130 -0
- package/bios/seabios/src/block.c +623 -0
- package/bios/seabios/src/block.h +121 -0
- package/bios/seabios/src/bmp.c +117 -0
- package/bios/seabios/src/boot.c +793 -0
- package/bios/seabios/src/bootsplash.c +255 -0
- package/bios/seabios/src/bregs.h +80 -0
- package/bios/seabios/src/byteorder.h +71 -0
- package/bios/seabios/src/cdrom.c +322 -0
- package/bios/seabios/src/clock.c +506 -0
- package/bios/seabios/src/code16gcc.s +1 -0
- package/bios/seabios/src/config.h +108 -0
- package/bios/seabios/src/cp437.c +275 -0
- package/bios/seabios/src/cp437.h +1 -0
- package/bios/seabios/src/disk.c +779 -0
- package/bios/seabios/src/e820map.c +152 -0
- package/bios/seabios/src/e820map.h +26 -0
- package/bios/seabios/src/entryfuncs.S +165 -0
- package/bios/seabios/src/farptr.h +208 -0
- package/bios/seabios/src/font.c +139 -0
- package/bios/seabios/src/fw/acpi-dsdt-cpu-hotplug.dsl +78 -0
- package/bios/seabios/src/fw/acpi-dsdt-dbug.dsl +26 -0
- package/bios/seabios/src/fw/acpi-dsdt-hpet.dsl +36 -0
- package/bios/seabios/src/fw/acpi-dsdt-isa.dsl +102 -0
- package/bios/seabios/src/fw/acpi-dsdt-pci-crs.dsl +90 -0
- package/bios/seabios/src/fw/acpi-dsdt.dsl +342 -0
- package/bios/seabios/src/fw/acpi-dsdt.hex +554 -0
- package/bios/seabios/src/fw/acpi.c +685 -0
- package/bios/seabios/src/fw/biostables.c +491 -0
- package/bios/seabios/src/fw/coreboot.c +569 -0
- package/bios/seabios/src/fw/csm.c +347 -0
- package/bios/seabios/src/fw/dev-pci.h +52 -0
- package/bios/seabios/src/fw/dev-piix.h +29 -0
- package/bios/seabios/src/fw/dev-q35.h +52 -0
- package/bios/seabios/src/fw/lzmadecode.c +398 -0
- package/bios/seabios/src/fw/lzmadecode.h +67 -0
- package/bios/seabios/src/fw/mptable.c +197 -0
- package/bios/seabios/src/fw/mtrr.c +105 -0
- package/bios/seabios/src/fw/multiboot.c +111 -0
- package/bios/seabios/src/fw/paravirt.c +624 -0
- package/bios/seabios/src/fw/paravirt.h +63 -0
- package/bios/seabios/src/fw/pciinit.c +1187 -0
- package/bios/seabios/src/fw/pirtable.c +103 -0
- package/bios/seabios/src/fw/q35-acpi-dsdt.dsl +450 -0
- package/bios/seabios/src/fw/romfile_loader.c +259 -0
- package/bios/seabios/src/fw/romfile_loader.h +91 -0
- package/bios/seabios/src/fw/shadow.c +208 -0
- package/bios/seabios/src/fw/smbios.c +585 -0
- package/bios/seabios/src/fw/smm.c +269 -0
- package/bios/seabios/src/fw/smp.c +194 -0
- package/bios/seabios/src/fw/ssdt-misc.dsl +104 -0
- package/bios/seabios/src/fw/ssdt-misc.hex +88 -0
- package/bios/seabios/src/fw/ssdt-pcihp.dsl +36 -0
- package/bios/seabios/src/fw/ssdt-pcihp.hex +38 -0
- package/bios/seabios/src/fw/ssdt-proc.dsl +48 -0
- package/bios/seabios/src/fw/ssdt-proc.hex +35 -0
- package/bios/seabios/src/fw/xen.c +149 -0
- package/bios/seabios/src/fw/xen.h +125 -0
- package/bios/seabios/src/gen-defs.h +19 -0
- package/bios/seabios/src/hw/ahci.c +697 -0
- package/bios/seabios/src/hw/ahci.h +201 -0
- package/bios/seabios/src/hw/ata.c +1046 -0
- package/bios/seabios/src/hw/ata.h +163 -0
- package/bios/seabios/src/hw/blockcmd.c +372 -0
- package/bios/seabios/src/hw/blockcmd.h +114 -0
- package/bios/seabios/src/hw/dma.c +67 -0
- package/bios/seabios/src/hw/esp-scsi.c +241 -0
- package/bios/seabios/src/hw/esp-scsi.h +8 -0
- package/bios/seabios/src/hw/floppy.c +741 -0
- package/bios/seabios/src/hw/lsi-scsi.c +221 -0
- package/bios/seabios/src/hw/lsi-scsi.h +8 -0
- package/bios/seabios/src/hw/megasas.c +405 -0
- package/bios/seabios/src/hw/megasas.h +8 -0
- package/bios/seabios/src/hw/mpt-scsi.c +319 -0
- package/bios/seabios/src/hw/mpt-scsi.h +8 -0
- package/bios/seabios/src/hw/nvme-int.h +199 -0
- package/bios/seabios/src/hw/nvme.c +708 -0
- package/bios/seabios/src/hw/nvme.h +17 -0
- package/bios/seabios/src/hw/pci.c +133 -0
- package/bios/seabios/src/hw/pci.h +47 -0
- package/bios/seabios/src/hw/pci_ids.h +2632 -0
- package/bios/seabios/src/hw/pci_regs.h +556 -0
- package/bios/seabios/src/hw/pcidevice.c +192 -0
- package/bios/seabios/src/hw/pcidevice.h +76 -0
- package/bios/seabios/src/hw/pic.c +115 -0
- package/bios/seabios/src/hw/pic.h +60 -0
- package/bios/seabios/src/hw/ps2port.c +543 -0
- package/bios/seabios/src/hw/ps2port.h +67 -0
- package/bios/seabios/src/hw/pvscsi.c +333 -0
- package/bios/seabios/src/hw/pvscsi.h +8 -0
- package/bios/seabios/src/hw/ramdisk.c +108 -0
- package/bios/seabios/src/hw/rtc.c +100 -0
- package/bios/seabios/src/hw/rtc.h +75 -0
- package/bios/seabios/src/hw/sdcard.c +572 -0
- package/bios/seabios/src/hw/serialio.c +113 -0
- package/bios/seabios/src/hw/serialio.h +29 -0
- package/bios/seabios/src/hw/timer.c +259 -0
- package/bios/seabios/src/hw/tpm_drivers.c +636 -0
- package/bios/seabios/src/hw/tpm_drivers.h +127 -0
- package/bios/seabios/src/hw/usb-ehci.c +650 -0
- package/bios/seabios/src/hw/usb-ehci.h +177 -0
- package/bios/seabios/src/hw/usb-hid.c +442 -0
- package/bios/seabios/src/hw/usb-hid.h +29 -0
- package/bios/seabios/src/hw/usb-hub.c +205 -0
- package/bios/seabios/src/hw/usb-hub.h +64 -0
- package/bios/seabios/src/hw/usb-msc.c +222 -0
- package/bios/seabios/src/hw/usb-msc.h +10 -0
- package/bios/seabios/src/hw/usb-ohci.c +568 -0
- package/bios/seabios/src/hw/usb-ohci.h +144 -0
- package/bios/seabios/src/hw/usb-uas.c +289 -0
- package/bios/seabios/src/hw/usb-uas.h +9 -0
- package/bios/seabios/src/hw/usb-uhci.c +571 -0
- package/bios/seabios/src/hw/usb-uhci.h +128 -0
- package/bios/seabios/src/hw/usb-xhci.c +1161 -0
- package/bios/seabios/src/hw/usb-xhci.h +133 -0
- package/bios/seabios/src/hw/usb.c +499 -0
- package/bios/seabios/src/hw/usb.h +254 -0
- package/bios/seabios/src/hw/virtio-blk.c +211 -0
- package/bios/seabios/src/hw/virtio-blk.h +43 -0
- package/bios/seabios/src/hw/virtio-pci.c +501 -0
- package/bios/seabios/src/hw/virtio-pci.h +151 -0
- package/bios/seabios/src/hw/virtio-ring.c +147 -0
- package/bios/seabios/src/hw/virtio-ring.h +121 -0
- package/bios/seabios/src/hw/virtio-scsi.c +220 -0
- package/bios/seabios/src/hw/virtio-scsi.h +47 -0
- package/bios/seabios/src/jpeg.c +1055 -0
- package/bios/seabios/src/kbd.c +599 -0
- package/bios/seabios/src/list.h +91 -0
- package/bios/seabios/src/malloc.c +561 -0
- package/bios/seabios/src/malloc.h +70 -0
- package/bios/seabios/src/memmap.h +21 -0
- package/bios/seabios/src/misc.c +195 -0
- package/bios/seabios/src/mouse.c +342 -0
- package/bios/seabios/src/optionroms.c +475 -0
- package/bios/seabios/src/output.c +584 -0
- package/bios/seabios/src/output.h +68 -0
- package/bios/seabios/src/pcibios.c +241 -0
- package/bios/seabios/src/pmm.c +176 -0
- package/bios/seabios/src/pnpbios.c +88 -0
- package/bios/seabios/src/post.c +337 -0
- package/bios/seabios/src/resume.c +157 -0
- package/bios/seabios/src/romfile.c +146 -0
- package/bios/seabios/src/romfile.h +21 -0
- package/bios/seabios/src/romlayout.S +698 -0
- package/bios/seabios/src/sercon.c +677 -0
- package/bios/seabios/src/serial.c +317 -0
- package/bios/seabios/src/sha1.c +147 -0
- package/bios/seabios/src/sha1.h +8 -0
- package/bios/seabios/src/stacks.c +771 -0
- package/bios/seabios/src/stacks.h +68 -0
- package/bios/seabios/src/std/LegacyBios.h +985 -0
- package/bios/seabios/src/std/acpi.h +323 -0
- package/bios/seabios/src/std/bda.h +174 -0
- package/bios/seabios/src/std/disk.h +175 -0
- package/bios/seabios/src/std/mptable.h +77 -0
- package/bios/seabios/src/std/multiboot.h +260 -0
- package/bios/seabios/src/std/optionrom.h +59 -0
- package/bios/seabios/src/std/pirtable.h +35 -0
- package/bios/seabios/src/std/pmm.h +19 -0
- package/bios/seabios/src/std/pnpbios.h +24 -0
- package/bios/seabios/src/std/smbios.h +167 -0
- package/bios/seabios/src/std/tcg.h +554 -0
- package/bios/seabios/src/std/vbe.h +156 -0
- package/bios/seabios/src/std/vga.h +63 -0
- package/bios/seabios/src/string.c +251 -0
- package/bios/seabios/src/string.h +31 -0
- package/bios/seabios/src/system.c +357 -0
- package/bios/seabios/src/tcgbios.c +2014 -0
- package/bios/seabios/src/tcgbios.h +19 -0
- package/bios/seabios/src/types.h +156 -0
- package/bios/seabios/src/util.h +251 -0
- package/bios/seabios/src/version.c +5 -0
- package/bios/seabios/src/vgahooks.c +355 -0
- package/bios/seabios/src/x86.c +23 -0
- package/bios/seabios/src/x86.h +277 -0
- package/bios/seabios/vgasrc/Kconfig +211 -0
- package/bios/seabios/vgasrc/bochsdisplay.c +59 -0
- package/bios/seabios/vgasrc/bochsvga.c +447 -0
- package/bios/seabios/vgasrc/bochsvga.h +57 -0
- package/bios/seabios/vgasrc/cbvga.c +337 -0
- package/bios/seabios/vgasrc/clext.c +627 -0
- package/bios/seabios/vgasrc/geodevga.c +434 -0
- package/bios/seabios/vgasrc/geodevga.h +89 -0
- package/bios/seabios/vgasrc/ramfb.c +163 -0
- package/bios/seabios/vgasrc/stdvga.c +485 -0
- package/bios/seabios/vgasrc/stdvga.h +81 -0
- package/bios/seabios/vgasrc/stdvgaio.c +186 -0
- package/bios/seabios/vgasrc/stdvgamodes.c +534 -0
- package/bios/seabios/vgasrc/swcursor.c +96 -0
- package/bios/seabios/vgasrc/vbe.c +432 -0
- package/bios/seabios/vgasrc/vgabios.c +1131 -0
- package/bios/seabios/vgasrc/vgabios.h +88 -0
- package/bios/seabios/vgasrc/vgaentry.S +161 -0
- package/bios/seabios/vgasrc/vgafb.c +661 -0
- package/bios/seabios/vgasrc/vgafb.h +42 -0
- package/bios/seabios/vgasrc/vgafonts.c +785 -0
- package/bios/seabios/vgasrc/vgahw.h +152 -0
- package/bios/seabios/vgasrc/vgainit.c +202 -0
- package/bios/seabios/vgasrc/vgalayout.lds.S +23 -0
- package/bios/seabios/vgasrc/vgautil.h +103 -0
- package/bios/seabios/vgasrc/vgaversion.c +6 -0
- package/build/binaries.js +1 -1
- package/build/index-debug.cjs +1 -1
- package/build/index-debug.js +1 -1
- package/build/index.cjs +1 -1
- package/build/index.js +1 -1
- package/build/v86-debug.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#ifndef LIST_H
|
|
2
|
+
#define LIST_H
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Copied from include/linux/...
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#undef offsetof
|
|
9
|
+
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* container_of - cast a member of a structure out to the containing structure
|
|
13
|
+
* @ptr: the pointer to the member.
|
|
14
|
+
* @type: the type of the container struct this is embedded in.
|
|
15
|
+
* @member: the name of the member within the struct.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
#define container_of(ptr, type, member) ({ \
|
|
19
|
+
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
|
20
|
+
(type *)( (char *)__mptr - offsetof(type,member) );})
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
struct list_head {
|
|
24
|
+
struct list_head *next, *prev;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#define LIST_HEAD_INIT(name) { &(name), &(name) }
|
|
29
|
+
|
|
30
|
+
#define LIST_HEAD(name) \
|
|
31
|
+
struct list_head name = LIST_HEAD_INIT(name)
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* list_entry - get the struct for this entry
|
|
35
|
+
* @ptr: the &struct list_head pointer.
|
|
36
|
+
* @type: the type of the struct this is embedded in.
|
|
37
|
+
* @member: the name of the list_struct within the struct.
|
|
38
|
+
*/
|
|
39
|
+
#define list_entry(ptr, type, member) \
|
|
40
|
+
container_of(ptr, type, member)
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* list_for_each_entry - iterate over list of given type
|
|
44
|
+
* @pos: the type * to use as a loop cursor.
|
|
45
|
+
* @head: the head for your list.
|
|
46
|
+
* @member: the name of the list_struct within the struct.
|
|
47
|
+
*/
|
|
48
|
+
#define list_for_each_entry(pos, head, member) \
|
|
49
|
+
for (pos = list_entry((head)->next, typeof(*pos), member); \
|
|
50
|
+
&pos->member != (head); \
|
|
51
|
+
pos = list_entry(pos->member.next, typeof(*pos), member))
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
|
|
55
|
+
* @pos: the type * to use as a loop cursor.
|
|
56
|
+
* @n: another type * to use as temporary storage
|
|
57
|
+
* @head: the head for your list.
|
|
58
|
+
* @member: the name of the list_struct within the struct.
|
|
59
|
+
*/
|
|
60
|
+
#define list_for_each_entry_safe(pos, n, head, member) \
|
|
61
|
+
for (pos = list_entry((head)->next, typeof(*pos), member), \
|
|
62
|
+
n = list_entry(pos->member.next, typeof(*pos), member); \
|
|
63
|
+
&pos->member != (head); \
|
|
64
|
+
pos = n, n = list_entry(n->member.next, typeof(*n), member))
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* list_empty - tests whether a list is empty
|
|
68
|
+
* @head: the list to test.
|
|
69
|
+
*/
|
|
70
|
+
static inline int list_empty(const struct list_head *head)
|
|
71
|
+
{
|
|
72
|
+
return head->next == head;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Insert a new entry between two known consecutive entries.
|
|
77
|
+
*
|
|
78
|
+
* This is only for internal list manipulation where we know
|
|
79
|
+
* the prev/next entries already!
|
|
80
|
+
*/
|
|
81
|
+
static inline void __list_add(struct list_head *_new,
|
|
82
|
+
struct list_head *prev,
|
|
83
|
+
struct list_head *next)
|
|
84
|
+
{
|
|
85
|
+
next->prev = _new;
|
|
86
|
+
_new->next = next;
|
|
87
|
+
_new->prev = prev;
|
|
88
|
+
prev->next = _new;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* list_add_tail - add a new entry
|
|
93
|
+
* @new: new entry to be added
|
|
94
|
+
* @head: list head to add it before
|
|
95
|
+
*
|
|
96
|
+
* Insert a new entry before the specified head.
|
|
97
|
+
* This is useful for implementing queues.
|
|
98
|
+
*/
|
|
99
|
+
static inline void list_add_tail(struct list_head *_new, struct list_head *head)
|
|
100
|
+
{
|
|
101
|
+
__list_add(_new, head->prev, head);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/*
|
|
105
|
+
* Delete a list entry by making the prev/next entries
|
|
106
|
+
* point to each other.
|
|
107
|
+
*
|
|
108
|
+
* This is only for internal list manipulation where we know
|
|
109
|
+
* the prev/next entries already!
|
|
110
|
+
*/
|
|
111
|
+
static inline void __list_del(struct list_head *prev, struct list_head *next)
|
|
112
|
+
{
|
|
113
|
+
next->prev = prev;
|
|
114
|
+
prev->next = next;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#define LIST_POISON1 ((void *) 0x00100100)
|
|
118
|
+
#define LIST_POISON2 ((void *) 0x00200200)
|
|
119
|
+
/**
|
|
120
|
+
* list_del - deletes entry from list.
|
|
121
|
+
* @entry: the element to delete from the list.
|
|
122
|
+
* Note: list_empty() on entry does not return true after this, the entry is
|
|
123
|
+
* in an undefined state.
|
|
124
|
+
*/
|
|
125
|
+
static inline void list_del(struct list_head *entry)
|
|
126
|
+
{
|
|
127
|
+
__list_del(entry->prev, entry->next);
|
|
128
|
+
entry->next = (struct list_head*)LIST_POISON1;
|
|
129
|
+
entry->prev = (struct list_head*)LIST_POISON2;
|
|
130
|
+
}
|
|
131
|
+
#endif
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
|
|
3
|
+
* Released under the terms of the GNU GPL v2.0.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#ifndef LKC_H
|
|
7
|
+
#define LKC_H
|
|
8
|
+
|
|
9
|
+
#include "expr.h"
|
|
10
|
+
|
|
11
|
+
#ifndef KBUILD_NO_NLS
|
|
12
|
+
# include <libintl.h>
|
|
13
|
+
#else
|
|
14
|
+
static inline const char *gettext(const char *txt) { return txt; }
|
|
15
|
+
static inline void textdomain(const char *domainname) {}
|
|
16
|
+
static inline void bindtextdomain(const char *name, const char *dir) {}
|
|
17
|
+
static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
#ifdef __cplusplus
|
|
21
|
+
extern "C" {
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
#define P(name,type,arg) extern type name arg
|
|
25
|
+
#include "lkc_proto.h"
|
|
26
|
+
#undef P
|
|
27
|
+
|
|
28
|
+
#define SRCTREE "srctree"
|
|
29
|
+
|
|
30
|
+
#ifndef PACKAGE
|
|
31
|
+
#define PACKAGE "linux"
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
#define LOCALEDIR "/usr/share/locale"
|
|
35
|
+
|
|
36
|
+
#define _(text) gettext(text)
|
|
37
|
+
#define N_(text) (text)
|
|
38
|
+
|
|
39
|
+
#ifndef CONFIG_
|
|
40
|
+
#define CONFIG_ "CONFIG_"
|
|
41
|
+
#endif
|
|
42
|
+
static inline const char *CONFIG_prefix(void)
|
|
43
|
+
{
|
|
44
|
+
return getenv( "CONFIG_" ) ?: CONFIG_;
|
|
45
|
+
}
|
|
46
|
+
#undef CONFIG_
|
|
47
|
+
#define CONFIG_ CONFIG_prefix()
|
|
48
|
+
|
|
49
|
+
#define TF_COMMAND 0x0001
|
|
50
|
+
#define TF_PARAM 0x0002
|
|
51
|
+
#define TF_OPTION 0x0004
|
|
52
|
+
|
|
53
|
+
enum conf_def_mode {
|
|
54
|
+
def_default,
|
|
55
|
+
def_yes,
|
|
56
|
+
def_mod,
|
|
57
|
+
def_no,
|
|
58
|
+
def_random
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
#define T_OPT_MODULES 1
|
|
62
|
+
#define T_OPT_DEFCONFIG_LIST 2
|
|
63
|
+
#define T_OPT_ENV 3
|
|
64
|
+
#define T_OPT_ALLNOCONFIG_Y 4
|
|
65
|
+
|
|
66
|
+
struct kconf_id {
|
|
67
|
+
int name;
|
|
68
|
+
int token;
|
|
69
|
+
unsigned int flags;
|
|
70
|
+
enum symbol_type stype;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
extern int zconfdebug;
|
|
74
|
+
|
|
75
|
+
int zconfparse(void);
|
|
76
|
+
void zconfdump(FILE *out);
|
|
77
|
+
void zconf_starthelp(void);
|
|
78
|
+
FILE *zconf_fopen(const char *name);
|
|
79
|
+
void zconf_initscan(const char *name);
|
|
80
|
+
void zconf_nextfile(const char *name);
|
|
81
|
+
int zconf_lineno(void);
|
|
82
|
+
const char *zconf_curname(void);
|
|
83
|
+
|
|
84
|
+
/* confdata.c */
|
|
85
|
+
const char *conf_get_configname(void);
|
|
86
|
+
const char *conf_get_autoconfig_name(void);
|
|
87
|
+
char *conf_get_default_confname(void);
|
|
88
|
+
void sym_set_change_count(int count);
|
|
89
|
+
void sym_add_change_count(int count);
|
|
90
|
+
bool conf_set_all_new_symbols(enum conf_def_mode mode);
|
|
91
|
+
void set_all_choice_values(struct symbol *csym);
|
|
92
|
+
|
|
93
|
+
struct conf_printer {
|
|
94
|
+
void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
|
|
95
|
+
void (*print_comment)(FILE *, const char *, void *);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/* confdata.c and expr.c */
|
|
99
|
+
static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
|
|
100
|
+
{
|
|
101
|
+
assert(len != 0);
|
|
102
|
+
|
|
103
|
+
if (fwrite(str, len, count, out) != count)
|
|
104
|
+
fprintf(stderr, "Error in writing or end of file.\n");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* menu.c */
|
|
108
|
+
void _menu_init(void);
|
|
109
|
+
void menu_warn(struct menu *menu, const char *fmt, ...);
|
|
110
|
+
struct menu *menu_add_menu(void);
|
|
111
|
+
void menu_end_menu(void);
|
|
112
|
+
void menu_add_entry(struct symbol *sym);
|
|
113
|
+
void menu_end_entry(void);
|
|
114
|
+
void menu_add_dep(struct expr *dep);
|
|
115
|
+
void menu_add_visibility(struct expr *dep);
|
|
116
|
+
struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
|
|
117
|
+
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
|
|
118
|
+
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
|
|
119
|
+
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
|
|
120
|
+
void menu_add_option(int token, char *arg);
|
|
121
|
+
void menu_finalize(struct menu *parent);
|
|
122
|
+
void menu_set_type(int type);
|
|
123
|
+
|
|
124
|
+
/* util.c */
|
|
125
|
+
struct file *file_lookup(const char *name);
|
|
126
|
+
int file_write_dep(const char *name);
|
|
127
|
+
void *xmalloc(size_t size);
|
|
128
|
+
void *xcalloc(size_t nmemb, size_t size);
|
|
129
|
+
|
|
130
|
+
struct gstr {
|
|
131
|
+
size_t len;
|
|
132
|
+
char *s;
|
|
133
|
+
/*
|
|
134
|
+
* when max_width is not zero long lines in string s (if any) get
|
|
135
|
+
* wrapped not to exceed the max_width value
|
|
136
|
+
*/
|
|
137
|
+
int max_width;
|
|
138
|
+
};
|
|
139
|
+
struct gstr str_new(void);
|
|
140
|
+
struct gstr str_assign(const char *s);
|
|
141
|
+
void str_free(struct gstr *gs);
|
|
142
|
+
void str_append(struct gstr *gs, const char *s);
|
|
143
|
+
void str_printf(struct gstr *gs, const char *fmt, ...);
|
|
144
|
+
const char *str_get(struct gstr *gs);
|
|
145
|
+
|
|
146
|
+
/* symbol.c */
|
|
147
|
+
extern struct expr *sym_env_list;
|
|
148
|
+
|
|
149
|
+
void sym_init(void);
|
|
150
|
+
void sym_clear_all_valid(void);
|
|
151
|
+
void sym_set_all_changed(void);
|
|
152
|
+
void sym_set_changed(struct symbol *sym);
|
|
153
|
+
struct symbol *sym_choice_default(struct symbol *sym);
|
|
154
|
+
const char *sym_get_string_default(struct symbol *sym);
|
|
155
|
+
struct symbol *sym_check_deps(struct symbol *sym);
|
|
156
|
+
struct property *prop_alloc(enum prop_type type, struct symbol *sym);
|
|
157
|
+
struct symbol *prop_get_symbol(struct property *prop);
|
|
158
|
+
struct property *sym_get_env_prop(struct symbol *sym);
|
|
159
|
+
|
|
160
|
+
static inline tristate sym_get_tristate_value(struct symbol *sym)
|
|
161
|
+
{
|
|
162
|
+
return sym->curr.tri;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
static inline struct symbol *sym_get_choice_value(struct symbol *sym)
|
|
167
|
+
{
|
|
168
|
+
return (struct symbol *)sym->curr.val;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
|
|
172
|
+
{
|
|
173
|
+
return sym_set_tristate_value(chval, yes);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
static inline bool sym_is_choice(struct symbol *sym)
|
|
177
|
+
{
|
|
178
|
+
return sym->flags & SYMBOL_CHOICE ? true : false;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
static inline bool sym_is_choice_value(struct symbol *sym)
|
|
182
|
+
{
|
|
183
|
+
return sym->flags & SYMBOL_CHOICEVAL ? true : false;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static inline bool sym_is_optional(struct symbol *sym)
|
|
187
|
+
{
|
|
188
|
+
return sym->flags & SYMBOL_OPTIONAL ? true : false;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
static inline bool sym_has_value(struct symbol *sym)
|
|
192
|
+
{
|
|
193
|
+
return sym->flags & SYMBOL_DEF_USER ? true : false;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#ifdef __cplusplus
|
|
197
|
+
}
|
|
198
|
+
#endif
|
|
199
|
+
|
|
200
|
+
#endif /* LKC_H */
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#include <stdarg.h>
|
|
2
|
+
|
|
3
|
+
/* confdata.c */
|
|
4
|
+
P(conf_parse,void,(const char *name));
|
|
5
|
+
P(conf_read,int,(const char *name));
|
|
6
|
+
P(conf_read_simple,int,(const char *name, int));
|
|
7
|
+
P(conf_write_defconfig,int,(const char *name));
|
|
8
|
+
P(conf_write,int,(const char *name));
|
|
9
|
+
P(conf_write_autoconf,int,(void));
|
|
10
|
+
P(conf_get_changed,bool,(void));
|
|
11
|
+
P(conf_set_changed_callback, void,(void (*fn)(void)));
|
|
12
|
+
P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap)));
|
|
13
|
+
|
|
14
|
+
/* menu.c */
|
|
15
|
+
P(rootmenu,struct menu,);
|
|
16
|
+
|
|
17
|
+
P(menu_is_empty, bool, (struct menu *menu));
|
|
18
|
+
P(menu_is_visible, bool, (struct menu *menu));
|
|
19
|
+
P(menu_has_prompt, bool, (struct menu *menu));
|
|
20
|
+
P(menu_get_prompt,const char *,(struct menu *menu));
|
|
21
|
+
P(menu_get_root_menu,struct menu *,(struct menu *menu));
|
|
22
|
+
P(menu_get_parent_menu,struct menu *,(struct menu *menu));
|
|
23
|
+
P(menu_has_help,bool,(struct menu *menu));
|
|
24
|
+
P(menu_get_help,const char *,(struct menu *menu));
|
|
25
|
+
P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head
|
|
26
|
+
*head));
|
|
27
|
+
P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head
|
|
28
|
+
*head));
|
|
29
|
+
P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
|
|
30
|
+
|
|
31
|
+
/* symbol.c */
|
|
32
|
+
P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
|
|
33
|
+
|
|
34
|
+
P(sym_lookup,struct symbol *,(const char *name, int flags));
|
|
35
|
+
P(sym_find,struct symbol *,(const char *name));
|
|
36
|
+
P(sym_expand_string_value,const char *,(const char *in));
|
|
37
|
+
P(sym_escape_string_value, const char *,(const char *in));
|
|
38
|
+
P(sym_re_search,struct symbol **,(const char *pattern));
|
|
39
|
+
P(sym_type_name,const char *,(enum symbol_type type));
|
|
40
|
+
P(sym_calc_value,void,(struct symbol *sym));
|
|
41
|
+
P(sym_get_type,enum symbol_type,(struct symbol *sym));
|
|
42
|
+
P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri));
|
|
43
|
+
P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri));
|
|
44
|
+
P(sym_toggle_tristate_value,tristate,(struct symbol *sym));
|
|
45
|
+
P(sym_string_valid,bool,(struct symbol *sym, const char *newval));
|
|
46
|
+
P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
|
|
47
|
+
P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
|
|
48
|
+
P(sym_is_changable,bool,(struct symbol *sym));
|
|
49
|
+
P(sym_get_choice_prop,struct property *,(struct symbol *sym));
|
|
50
|
+
P(sym_get_default_prop,struct property *,(struct symbol *sym));
|
|
51
|
+
P(sym_get_string_value,const char *,(struct symbol *sym));
|
|
52
|
+
|
|
53
|
+
P(prop_get_type_name,const char *,(enum prop_type type));
|
|
54
|
+
|
|
55
|
+
/* expr.c */
|
|
56
|
+
P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2));
|
|
57
|
+
P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Check ncurses compatibility
|
|
3
|
+
|
|
4
|
+
# What library to link
|
|
5
|
+
ldflags()
|
|
6
|
+
{
|
|
7
|
+
pkg-config --libs ncursesw 2>/dev/null && exit
|
|
8
|
+
pkg-config --libs ncurses 2>/dev/null && exit
|
|
9
|
+
for ext in so a dll.a dylib ; do
|
|
10
|
+
for lib in ncursesw ncurses curses ; do
|
|
11
|
+
$cc -print-file-name=lib${lib}.${ext} | grep -q /
|
|
12
|
+
if [ $? -eq 0 ]; then
|
|
13
|
+
echo "-l${lib}"
|
|
14
|
+
exit
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
done
|
|
18
|
+
exit 1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# Where is ncurses.h?
|
|
22
|
+
ccflags()
|
|
23
|
+
{
|
|
24
|
+
if [ -f /usr/include/ncursesw/curses.h ]; then
|
|
25
|
+
echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
|
|
26
|
+
echo ' -DNCURSES_WIDECHAR=1'
|
|
27
|
+
elif [ -f /usr/include/ncurses/ncurses.h ]; then
|
|
28
|
+
echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
|
|
29
|
+
elif [ -f /usr/include/ncurses/curses.h ]; then
|
|
30
|
+
echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
|
|
31
|
+
elif [ -f /usr/include/ncurses.h ]; then
|
|
32
|
+
echo '-DCURSES_LOC="<ncurses.h>"'
|
|
33
|
+
else
|
|
34
|
+
echo '-DCURSES_LOC="<curses.h>"'
|
|
35
|
+
fi
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# Temp file, try to clean up after us
|
|
39
|
+
tmp=.lxdialog.tmp
|
|
40
|
+
trap "rm -f $tmp" 0 1 2 3 15
|
|
41
|
+
|
|
42
|
+
# Check if we can link to ncurses
|
|
43
|
+
check() {
|
|
44
|
+
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
|
|
45
|
+
#include CURSES_LOC
|
|
46
|
+
main() {}
|
|
47
|
+
EOF
|
|
48
|
+
if [ $? != 0 ]; then
|
|
49
|
+
echo " *** Unable to find the ncurses libraries or the" 1>&2
|
|
50
|
+
echo " *** required header files." 1>&2
|
|
51
|
+
echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
|
|
52
|
+
echo " *** " 1>&2
|
|
53
|
+
echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
|
|
54
|
+
echo " *** " 1>&2
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
usage() {
|
|
60
|
+
printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if [ $# -eq 0 ]; then
|
|
64
|
+
usage
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
cc=""
|
|
69
|
+
case "$1" in
|
|
70
|
+
"-check")
|
|
71
|
+
shift
|
|
72
|
+
cc="$@"
|
|
73
|
+
check
|
|
74
|
+
;;
|
|
75
|
+
"-ccflags")
|
|
76
|
+
ccflags
|
|
77
|
+
;;
|
|
78
|
+
"-ldflags")
|
|
79
|
+
shift
|
|
80
|
+
cc="$@"
|
|
81
|
+
ldflags
|
|
82
|
+
;;
|
|
83
|
+
"*")
|
|
84
|
+
usage
|
|
85
|
+
exit 1
|
|
86
|
+
;;
|
|
87
|
+
esac
|