├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json ├── settings.json └── vscode-fix.h ├── CMakeLists.txt ├── LICENSE ├── README.md ├── docs ├── BTOSUserspaceAPI.odt ├── Grub.txt ├── Plug and Play.doc └── script-example.txt ├── other └── art │ ├── BTOS-Logo-small.png │ ├── BTOS-Logo.png │ ├── BTOS-Logo.xcf │ ├── BTOS-bootscreen-mono.xbm │ ├── BTOS-bootscreen-mono.xcf │ ├── BTOS-lowcolour-logoscreen.png │ ├── grub.pf2 │ └── splash.tga ├── src ├── 3rdparty │ ├── 3rdparty.sh │ ├── freetype.sh │ ├── freetype │ │ ├── btos-build.sh │ │ └── freetype.patch │ ├── grub.sh │ ├── grub │ │ ├── btos-build.sh │ │ └── grub.patch │ ├── libelf.sh │ ├── libelf │ │ ├── btos-build.sh │ │ └── libelf.patch │ ├── libgd.sh │ ├── libgd │ │ ├── btos-build.sh │ │ └── libgd.patch │ ├── libiconv.sh │ ├── libiconv │ │ ├── btos-build.sh │ │ └── libiconv.patch │ ├── libuuid.sh │ ├── libuuid │ │ ├── btos-build.sh │ │ └── libuuid.patch │ ├── ncurses.sh │ ├── ncurses │ │ ├── btos-build.sh │ │ └── ncurses.patch │ ├── parted.sh │ ├── parted │ │ ├── btos-build.sh │ │ └── parted.patch │ ├── sdl.sh │ ├── sdl │ │ ├── IMG_svg.c │ │ ├── Makefile │ │ ├── SDL_config.h │ │ ├── SDL_config_btos.h │ │ ├── SDL_dynapi.h │ │ ├── SDL_sysvideo.h │ │ ├── SDL_video.c │ │ ├── backup.sh │ │ ├── btos-build.sh │ │ ├── image_Makefile │ │ ├── image_include │ │ │ ├── jconfig.h │ │ │ ├── jerror.h │ │ │ ├── jmorecfg.h │ │ │ ├── jpeglib.h │ │ │ ├── png.h │ │ │ ├── pngconf.h │ │ │ ├── pnglibconf.h │ │ │ ├── tiff.h │ │ │ ├── tiffconf.h │ │ │ ├── tiffio.h │ │ │ ├── tiffvers.h │ │ │ ├── webp │ │ │ │ ├── decode.h │ │ │ │ ├── encode.h │ │ │ │ └── types.h │ │ │ ├── zconf.h │ │ │ └── zlib.h │ │ ├── src │ │ │ ├── timer │ │ │ │ └── btos │ │ │ │ │ └── SDL_systimer.c │ │ │ └── video │ │ │ │ └── btos │ │ │ │ ├── SDL_btosevents.c │ │ │ │ ├── SDL_btosframebuffer.c │ │ │ │ ├── SDL_btosframebuffer_c.h │ │ │ │ ├── SDL_btosvideo.c │ │ │ │ └── SDL_btosvideo.h │ │ └── ttf_Makefile │ ├── sdlwidgets.sh │ ├── sdlwidgets │ │ └── sdlwidgets.patch │ ├── sqlite3.sh │ ├── sqlite3 │ │ ├── btos-build.sh │ │ ├── config.h │ │ ├── sqlite3.c.patch │ │ └── sqlitepp.hpp │ ├── udis86.sh │ └── udis86 │ │ ├── btos-build.sh │ │ └── udis86.patch ├── Makefile ├── backup-toolchain.sh ├── build │ ├── functions.bk │ └── linux-btos.bk ├── colourmake.sh ├── disk │ ├── Makefile │ ├── btos.img.gz │ ├── check.sh │ └── diskfiles │ │ ├── autoexec.cmd │ │ └── init.cmd ├── env-os.sh ├── gdbkernel.sh ├── gdbkernel2.sh ├── gdbprof.sh ├── icons │ ├── 16 │ │ ├── actions │ │ │ ├── back.png │ │ │ ├── calc_programmer.png │ │ │ ├── calc_scientific.png │ │ │ ├── calc_standard.png │ │ │ ├── editcopy.png │ │ │ ├── editcut.png │ │ │ ├── editdelete.png │ │ │ ├── editpaste.png │ │ │ ├── error.png │ │ │ ├── exit.png │ │ │ ├── filenew.png │ │ │ ├── fileopen.png │ │ │ ├── filesave.png │ │ │ ├── filesaveas.png │ │ │ ├── forward.png │ │ │ ├── goto.png │ │ │ ├── home.png │ │ │ ├── new_folder.png │ │ │ ├── run.png │ │ │ ├── up.png │ │ │ ├── view_detailed.png │ │ │ ├── view_icon.png │ │ │ ├── view_tree.png │ │ │ └── window_new.png │ │ ├── apps │ │ │ ├── appview.png │ │ │ ├── calc.png │ │ │ ├── clipboard.png │ │ │ ├── default.png │ │ │ ├── elxrun.png │ │ │ ├── folder.png │ │ │ ├── launcher.png │ │ │ ├── notepad.png │ │ │ └── termwin.png │ │ ├── fs │ │ │ ├── computer.png │ │ │ ├── device.png │ │ │ ├── file.png │ │ │ ├── folder.png │ │ │ ├── folder_open.png │ │ │ ├── hdd.png │ │ │ ├── script.png │ │ │ ├── source.png │ │ │ └── txt.png │ │ └── objects │ │ │ ├── cat_config.png │ │ │ ├── cat_games.png │ │ │ ├── cat_graphics.png │ │ │ ├── cat_media.png │ │ │ ├── cat_net.png │ │ │ ├── cat_office.png │ │ │ ├── cat_tests.png │ │ │ ├── cat_tools.png │ │ │ └── category.png │ └── 32 │ │ ├── actions │ │ ├── error.png │ │ ├── question.png │ │ └── run.png │ │ ├── apps │ │ ├── appview.png │ │ ├── calc.png │ │ ├── clipboard.png │ │ ├── default.png │ │ ├── elxrun.png │ │ ├── folder.png │ │ ├── launcher.png │ │ ├── notepad.png │ │ └── termwin.png │ │ ├── fs │ │ ├── computer.png │ │ ├── device.png │ │ ├── file.png │ │ ├── folder.png │ │ ├── folder_open.png │ │ ├── hdd.png │ │ ├── script.png │ │ ├── source.png │ │ └── txt.png │ │ └── objects │ │ ├── cat_config.png │ │ ├── cat_games.png │ │ ├── cat_graphics.png │ │ ├── cat_media.png │ │ ├── cat_net.png │ │ ├── cat_office.png │ │ ├── cat_tests.png │ │ ├── cat_tools.png │ │ └── category.png ├── include │ ├── btos.h │ ├── btos │ │ ├── atom.hpp │ │ ├── atoms.h │ │ ├── bt_msg.h │ │ ├── btos_api.h │ │ ├── clipboard.hpp │ │ ├── core.h │ │ ├── devices.h │ │ ├── directory.hpp │ │ ├── envvars.hpp │ │ ├── file.hpp │ │ ├── fs_interface.h │ │ ├── handle.hpp │ │ ├── imessagehandler.hpp │ │ ├── ini.hpp │ │ ├── ioctl.h │ │ ├── kernel_calls.h │ │ ├── message.hpp │ │ ├── messageloop.hpp │ │ ├── multiwait.hpp │ │ ├── old_calls.h │ │ ├── permissions.h │ │ ├── process.hpp │ │ ├── processlist.hpp │ │ ├── registry.hpp │ │ ├── resc.h │ │ ├── shm.hpp │ │ ├── table.hpp │ │ ├── thread.hpp │ │ └── timer.hpp │ ├── btos_module.h │ ├── cmd │ │ ├── commands.hpp │ │ ├── globbing.hpp │ │ ├── path.hpp │ │ ├── script_commands.hpp │ │ ├── scripting.hpp │ │ └── utils.hpp │ ├── dev │ │ ├── hwpnp.hpp │ │ ├── hwpnp │ │ │ ├── atabus.hpp │ │ │ ├── blockdevice.hpp │ │ │ ├── hdd.hpp │ │ │ ├── keyboard.hpp │ │ │ ├── lockable.hpp │ │ │ ├── mouse.hpp │ │ │ ├── optical.hpp │ │ │ ├── pcibus.hpp │ │ │ ├── ps2bus.hpp │ │ │ ├── timerdevice.hpp │ │ │ └── video.hpp │ │ ├── keyboard.h │ │ ├── mouse.h │ │ ├── rtc.h │ │ ├── terminal.h │ │ ├── terminal.hpp │ │ ├── terminal_ioctl.h │ │ └── video_dev.h │ ├── eloader │ │ └── eloader.h │ ├── ext │ │ ├── debug.h │ │ └── dmi.hpp │ ├── gds │ │ ├── gds.h │ │ ├── geom.hpp │ │ ├── libgds.h │ │ ├── screen.hpp │ │ └── surface.hpp │ ├── gui │ │ ├── actionmanager.hpp │ │ ├── button.hpp │ │ ├── checkbox.hpp │ │ ├── container.hpp │ │ ├── defaults.hpp │ │ ├── detaillist.hpp │ │ ├── drawing.hpp │ │ ├── eventresponse.hpp │ │ ├── form.hpp │ │ ├── groupbox.hpp │ │ ├── icontrol.hpp │ │ ├── iconview.hpp │ │ ├── idialog.hpp │ │ ├── image.hpp │ │ ├── imagebutton.hpp │ │ ├── inputbox.hpp │ │ ├── label.hpp │ │ ├── listbox.hpp │ │ ├── messagebox.hpp │ │ ├── progressbar.hpp │ │ ├── radiobutton.hpp │ │ ├── resizehandle.hpp │ │ ├── scrollbar.hpp │ │ ├── shell │ │ │ ├── fileopendialog.hpp │ │ │ ├── filesavedialog.hpp │ │ │ ├── folderdetailsview.hpp │ │ │ ├── foldericonview.hpp │ │ │ ├── folderselectdialog.hpp │ │ │ ├── foldertreeview.hpp │ │ │ └── utils.hpp │ │ ├── slider.hpp │ │ ├── statusbar.hpp │ │ ├── subform.hpp │ │ ├── tabs.hpp │ │ ├── testcontrol.hpp │ │ ├── textarea.hpp │ │ ├── textbox.hpp │ │ ├── toolbar.hpp │ │ └── treeview.hpp │ ├── module │ │ ├── cache.hpp │ │ ├── drivers.h │ │ ├── handle.hpp │ │ ├── io.h │ │ ├── kernelsys │ │ │ ├── atoms.hpp │ │ │ ├── devices.hpp │ │ │ ├── extension.hpp │ │ │ ├── filesystems.hpp │ │ │ ├── hal.hpp │ │ │ ├── handles.hpp │ │ │ ├── hwpnp.hpp │ │ │ ├── kvars.hpp │ │ │ ├── locks.hpp │ │ │ ├── messaging.hpp │ │ │ ├── mm2.hpp │ │ │ ├── perms.hpp │ │ │ ├── process.hpp │ │ │ └── scheduler.hpp │ │ ├── module.inc │ │ ├── module_api.hpp │ │ ├── module_c.h │ │ ├── module_cpp.hpp │ │ └── utils │ │ │ ├── fshelpers.hpp │ │ │ ├── function.hpp │ │ │ ├── module_meta.hpp │ │ │ ├── operationqueue.hpp │ │ │ ├── refcountpointer.hpp │ │ │ ├── string.hpp │ │ │ └── unique_ptr.hpp │ ├── sm │ │ ├── iserviceresolver.hpp │ │ ├── services.hpp │ │ ├── sessions.hpp │ │ └── sm.h │ ├── util │ │ ├── any.hpp │ │ ├── asprintf.h │ │ ├── bitset.hpp │ │ ├── bt_enum.h │ │ ├── circular_buffer.hpp │ │ ├── clipp.hpp │ │ ├── demangle.hpp │ │ ├── lrucache.hpp │ │ ├── maybe_owned_ptr.hpp │ │ ├── ministl.hpp │ │ ├── noncopyable.hpp │ │ ├── operation_queue.hpp │ │ ├── pimpl_ptr.hpp │ │ ├── rpc.hpp │ │ ├── rpc_serialization.hpp │ │ ├── scoped_ptr.hpp │ │ ├── sqlentity.hpp │ │ ├── tfmdebug.hpp │ │ └── tinyformat.hpp │ └── wm │ │ ├── eventloop.hpp │ │ ├── libwm.h │ │ ├── menu.hpp │ │ ├── window.hpp │ │ └── wm.h ├── iso │ ├── Makefile │ ├── livecd │ │ ├── Makefile │ │ ├── grub.cfg │ │ ├── initreg.cmd │ │ └── load_cfg │ └── test │ │ ├── Makefile │ │ ├── grub.cfg │ │ └── load_cfg ├── kernel │ ├── Bakefile │ ├── Makefile │ ├── atoms.cpp │ ├── atoms.hpp │ ├── boot.s │ ├── buildid.sh │ ├── copy.txt │ ├── debug_ext.cpp │ ├── debug_ext.hpp │ ├── devfs.cpp │ ├── devfs.hpp │ ├── devices.cpp │ ├── devices.hpp │ ├── elf_format.hpp │ ├── extensions.cpp │ ├── extensions.hpp │ ├── filesystems.cpp │ ├── filesystems.hpp │ ├── hal │ │ ├── abstract.hpp │ │ └── x86_32 │ │ │ ├── cpu.cpp │ │ │ ├── cpu.hpp │ │ │ ├── cpuid.c │ │ │ ├── cpuid.h │ │ │ ├── debugdriver.cpp │ │ │ ├── gdt.cpp │ │ │ ├── gdtidt.s │ │ │ ├── hal.cpp │ │ │ ├── hal.hpp │ │ │ ├── idt.cpp │ │ │ ├── idt.hpp │ │ │ ├── io.cpp │ │ │ ├── io.hpp │ │ │ ├── pic.cpp │ │ │ ├── pic.hpp │ │ │ ├── process_asm.s │ │ │ ├── scheduler_asm.s │ │ │ └── scheduler_support.cpp │ ├── handles.cpp │ ├── handles.hpp │ ├── hwpnp │ │ ├── classwrapper.cpp │ │ ├── devices.cpp │ │ ├── dmi.cpp │ │ ├── drivers.cpp │ │ ├── hwpnp.cpp │ │ ├── hwpnp_internal.hpp │ │ └── hwpnp_public.hpp │ ├── hwpnp_kernel.hpp │ ├── infofs.cpp │ ├── infofs.hpp │ ├── initfs.cpp │ ├── initfs.hpp │ ├── kernel.hpp │ ├── kernel_main.cpp │ ├── kvars.cpp │ ├── kvars.hpp │ ├── liballoc.c │ ├── liballoc.h │ ├── liballoc_hooks.cpp │ ├── linker.ld │ ├── list.hpp │ ├── load_cfg │ ├── load_elf.cpp │ ├── load_elf.hpp │ ├── locks.cpp │ ├── locks.hpp │ ├── messaging.cpp │ ├── messaging.hpp │ ├── mm2.cpp │ ├── mm2.hpp │ ├── mm2 │ │ ├── mm2_classwrapper.cpp │ │ ├── mm2_internal.hpp │ │ ├── mm2_mmap.cpp │ │ ├── mm2_public.hpp │ │ ├── page_faults.cpp │ │ ├── pagedirectory.cpp │ │ ├── pagedirectory.hpp │ │ ├── physical.cpp │ │ ├── shm.cpp │ │ └── virtual.cpp │ ├── module.hpp │ ├── module │ │ └── module_api.cpp │ ├── modules.cpp │ ├── modules.hpp │ ├── multiboot.h │ ├── myos.cfg │ ├── panic.cpp │ ├── panic.hpp │ ├── perms.cpp │ ├── perms.hpp │ ├── printf.c │ ├── printf.h │ ├── processes │ │ ├── abstract.hpp │ │ └── impl │ │ │ ├── process.cpp │ │ │ ├── process.hpp │ │ │ ├── processmanager.cpp │ │ │ └── processmanager.hpp │ ├── rtc │ │ ├── convert.cpp │ │ ├── device.cpp │ │ ├── rtc.cpp │ │ ├── rtc.hpp │ │ ├── rtc_internal.hpp │ │ └── timer.cpp │ ├── scheduler │ │ ├── abstract.hpp │ │ └── impl │ │ │ ├── nullthread.cpp │ │ │ ├── scheduler.cpp │ │ │ ├── scheduler.hpp │ │ │ ├── thread.cpp │ │ │ └── thread.hpp │ ├── serdbg.cpp │ ├── serdbg.hpp │ ├── syscalls.cpp │ ├── syscalls.hpp │ ├── test.sh │ ├── testtxt.sh │ ├── user_api.cpp │ ├── user_api.hpp │ ├── utils │ │ ├── cpp_support.cpp │ │ ├── fallbacks.c │ │ ├── fshelpers.hpp │ │ ├── gcc_builtins.h │ │ ├── ministl.hpp │ │ ├── new.hpp │ │ ├── string.cpp │ │ ├── string.hpp │ │ ├── stringutils.cpp │ │ ├── utils.cpp │ │ └── utils.hpp │ ├── waiting.cpp │ └── waiting.hpp ├── kstat.py ├── modules │ ├── Makefile │ ├── boot │ │ ├── Makefile │ │ ├── boot.cpp │ │ ├── cmdline.cpp │ │ ├── cmdline.hpp │ │ ├── files.cpp │ │ ├── ini.c │ │ ├── ini.h │ │ └── linker.ld │ ├── cache │ │ ├── Makefile │ │ ├── cache.cpp │ │ └── linker.ld │ ├── empty │ │ ├── Makefile │ │ ├── empty.cpp │ │ └── linker.ld │ ├── fs │ │ ├── Makefile │ │ ├── fatfs │ │ │ ├── 00history.txt │ │ │ ├── 00readme.txt │ │ │ ├── Makefile │ │ │ ├── diskio.c │ │ │ ├── diskio.h │ │ │ ├── drive.cpp │ │ │ ├── drive.hpp │ │ │ ├── fatfs.cpp │ │ │ ├── ff.c │ │ │ ├── ff.h │ │ │ ├── ff_functions.cpp │ │ │ ├── ff_functions.h │ │ │ ├── ffconf.h │ │ │ ├── ffsystem.c │ │ │ ├── ffunicode.c │ │ │ └── linker.ld │ │ └── iso9660 │ │ │ ├── Makefile │ │ │ ├── iso9660.cpp │ │ │ ├── lib9660.c │ │ │ ├── lib9660.h │ │ │ └── linker.ld │ ├── hwpnp │ │ ├── Makefile │ │ ├── ata │ │ │ ├── Makefile │ │ │ ├── ata.cpp │ │ │ ├── ata.hpp │ │ │ ├── ata_hwpnp.cpp │ │ │ ├── atapi.cpp │ │ │ ├── dma.cpp │ │ │ ├── linker.ld │ │ │ ├── mbr.cpp │ │ │ └── queue.cpp │ │ ├── pci │ │ │ ├── Makefile │ │ │ ├── linker.ld │ │ │ ├── pci.cpp │ │ │ └── pci.hpp │ │ ├── pcrtc │ │ │ ├── Makefile │ │ │ ├── clocktime.cpp │ │ │ ├── linker.ld │ │ │ ├── pcrtc.cpp │ │ │ ├── rtc.cpp │ │ │ ├── rtc.hpp │ │ │ └── rtc_asm.s │ │ ├── ps2 │ │ │ ├── Makefile │ │ │ ├── keyboard.cpp │ │ │ ├── linker.ld │ │ │ ├── mouse.cpp │ │ │ ├── ps2.cpp │ │ │ ├── ps2.hpp │ │ │ ├── ps2_hwpnp.cpp │ │ │ └── us-layout.cpp │ │ ├── stdpc │ │ │ ├── Makefile │ │ │ ├── linker.ld │ │ │ └── stdpc.cpp │ │ └── vga │ │ │ ├── Makefile │ │ │ ├── device.hpp │ │ │ ├── font.cpp │ │ │ ├── graphics_ops.cpp │ │ │ ├── libx86emu │ │ │ ├── api.c │ │ │ ├── btos_memio.cpp │ │ │ ├── btos_x86emu.c │ │ │ ├── decode.c │ │ │ ├── include │ │ │ │ ├── btos_x86emu.h │ │ │ │ ├── decode.h │ │ │ │ ├── mem.h │ │ │ │ ├── ops.h │ │ │ │ ├── prim_ops.h │ │ │ │ ├── x86emu.h │ │ │ │ └── x86emu_int.h │ │ │ ├── mem.c │ │ │ ├── ops.c │ │ │ ├── ops2.c │ │ │ └── prim_ops.c │ │ │ ├── linker.ld │ │ │ ├── modes.cpp │ │ │ ├── modes.hpp │ │ │ ├── ops.hpp │ │ │ ├── textmode_ops.cpp │ │ │ ├── vbe.cpp │ │ │ ├── vbe.hpp │ │ │ ├── vbe_device.cpp │ │ │ ├── vbe_device.hpp │ │ │ ├── vga.cpp │ │ │ ├── vga.hpp │ │ │ ├── vga_hwpnp.cpp │ │ │ └── vga_palette.cpp │ └── terminal │ │ ├── Makefile │ │ ├── api.cpp │ │ ├── api.hpp │ │ ├── backend.hpp │ │ ├── console_backend.cpp │ │ ├── console_backend.hpp │ │ ├── device.cpp │ │ ├── device.hpp │ │ ├── graphics_pointer.cpp │ │ ├── linker.ld │ │ ├── terminal.cpp │ │ ├── terminal.hpp │ │ ├── vterm.cpp │ │ └── vterm.hpp ├── os.project ├── os.workspace ├── packages │ ├── Makefile │ ├── base │ │ ├── Makefile │ │ └── pkgfiles │ │ │ ├── btos │ │ │ └── drivers │ │ │ │ ├── pci.inf │ │ │ │ ├── ps2.inf │ │ │ │ └── vga.inf │ │ │ └── package.inf │ ├── gui │ │ ├── Makefile │ │ └── pkgfiles │ │ │ └── package.inf │ ├── install │ │ ├── Makefile │ │ └── pkgfiles │ │ │ ├── btos │ │ │ └── setup.ini │ │ │ └── package.inf │ ├── kernel │ │ ├── Makefile │ │ └── pkgfiles │ │ │ ├── content │ │ │ ├── grub │ │ │ │ ├── grub.cfg │ │ │ │ └── load_cfg │ │ │ └── initfs │ │ │ │ └── config.ini │ │ │ └── package.inf │ ├── protogui │ │ ├── Makefile │ │ └── pkgfiles │ │ │ └── package.inf │ └── tests │ │ ├── Makefile │ │ └── pkgfiles │ │ ├── package.inf │ │ ├── post.pkc │ │ └── pre.pkc ├── qemu-launch-opts.template ├── rebuild-libstdc++.sh ├── rebuild-newlib.sh ├── scripts │ └── elfembed.sh ├── setup-binutils.sh ├── setup-toolchain.sh ├── tarinit │ ├── Makefile │ ├── livecd │ │ ├── Makefile │ │ └── data │ │ │ └── config.ini │ └── test │ │ ├── Makefile │ │ └── data │ │ └── config.ini ├── toolchain │ ├── binutils-2.23 │ │ ├── bfd │ │ │ └── config.bfd │ │ ├── config.sub │ │ ├── gas │ │ │ └── configure.tgt │ │ └── ld │ │ │ ├── Makefile.in │ │ │ ├── configure.tgt │ │ │ ├── emulparams │ │ │ └── btos_i386.sh │ │ │ └── emultempl │ │ │ └── elf32_btos.em │ ├── gcc-9.2.0 │ │ └── gcc-9.2.0.patch │ └── misc │ │ └── libtool └── user │ ├── Makefile │ ├── bin │ ├── Makefile │ ├── debug │ │ ├── Makefile │ │ ├── commands.cpp │ │ ├── commands.hpp │ │ ├── debug.cpp │ │ ├── debug.hpp │ │ ├── events.cpp │ │ ├── print_cmd.cpp │ │ ├── stacktrace.cpp │ │ ├── symbols.cpp │ │ └── symbols.hpp │ └── install │ │ ├── Makefile │ │ └── install.cpp │ ├── cmds │ ├── Makefile │ ├── cls │ │ ├── Makefile │ │ └── cls.c │ ├── cmd │ │ ├── Makefile │ │ ├── cmd.cpp │ │ ├── cmd.hpp │ │ └── input.cpp │ ├── format │ │ ├── Makefile │ │ └── format.c │ ├── hwtree │ │ ├── Makefile │ │ └── hwtree.cpp │ ├── ini │ │ ├── Makefile │ │ └── ini.cpp │ ├── kill │ │ ├── Makefile │ │ └── kill.c │ ├── kilo │ │ ├── Makefile │ │ ├── getline.c │ │ ├── getline.h │ │ └── kilo.c │ ├── load │ │ ├── Makefile │ │ └── load.c │ ├── mount │ │ ├── Makefile │ │ └── mount.c │ ├── package │ │ ├── Makefile │ │ ├── operations.cpp │ │ ├── package.cpp │ │ ├── package.hpp │ │ ├── packagefile.cpp │ │ ├── packagefile.hpp │ │ ├── tar.cpp │ │ └── tar.hpp │ ├── rescutil │ │ ├── Makefile │ │ ├── resc │ │ │ └── btos.txt │ │ └── rescutil.cpp │ ├── sleep │ │ ├── Makefile │ │ └── sleep.c │ ├── tar │ │ ├── Makefile │ │ ├── buffer.c │ │ ├── create.c │ │ ├── extract.c │ │ ├── getoldopt.c │ │ ├── list.c │ │ ├── names.c │ │ ├── port.c │ │ ├── port.h │ │ ├── stubs.c │ │ ├── stubs.h │ │ ├── tar.c │ │ └── tar.h │ └── termctl │ │ ├── Makefile │ │ └── termctl.cpp │ ├── empty │ ├── Makefile │ └── empty.c │ ├── libs │ ├── Makefile │ ├── ansi │ │ ├── Makefile │ │ ├── NewFile │ │ ├── README.rst │ │ ├── ansi.cpp │ │ ├── ansi.h │ │ ├── tmt.c │ │ └── tmt.h │ ├── btoscore │ │ ├── Makefile │ │ ├── kernel_calls.c │ │ ├── old_calls.c │ │ ├── rtc.c │ │ └── threads.c │ ├── btoslib │ │ ├── Makefile │ │ ├── atom.cpp │ │ ├── directory.cpp │ │ ├── envvars.cpp │ │ ├── file.cpp │ │ ├── handle.cpp │ │ ├── ini.cpp │ │ ├── message.cpp │ │ ├── messageloop.cpp │ │ ├── multiwait.cpp │ │ ├── process.cpp │ │ ├── processlist.cpp │ │ ├── shm.cpp │ │ ├── table.cpp │ │ ├── terminal.c │ │ ├── terminal_ioctl.c │ │ ├── terminaloo.cpp │ │ ├── thread.cpp │ │ └── timer.cpp │ ├── clipboard │ │ ├── Makefile │ │ ├── clipboard.cpp │ │ └── main.cpp │ ├── cmd │ │ ├── Makefile │ │ ├── commands.cpp │ │ ├── globbing.cpp │ │ ├── path.cpp │ │ ├── script_commands.cpp │ │ ├── scripting.cpp │ │ ├── table.cpp │ │ └── util.cpp │ ├── eloader │ │ ├── Makefile │ │ ├── eloader.c │ │ └── main.cpp │ ├── gui │ │ ├── Makefile │ │ ├── actionmanager.cpp │ │ ├── button.cpp │ │ ├── checkbox.cpp │ │ ├── container.cpp │ │ ├── defaults.cpp │ │ ├── detaillist.cpp │ │ ├── drawing.cpp │ │ ├── eventresponse.cpp │ │ ├── form.cpp │ │ ├── groupbox.cpp │ │ ├── iconview.cpp │ │ ├── idialog.cpp │ │ ├── image.cpp │ │ ├── imagebutton.cpp │ │ ├── inputbox.cpp │ │ ├── label.cpp │ │ ├── libresc │ │ │ ├── ib_default.png │ │ │ ├── mb_default.png │ │ │ ├── tv_default_icon.png │ │ │ ├── tv_default_nochildren.png │ │ │ └── tv_default_open.png │ │ ├── listbox.cpp │ │ ├── main.cpp │ │ ├── messagebox.cpp │ │ ├── progressbar.cpp │ │ ├── radiobutton.cpp │ │ ├── resc │ │ │ ├── app.inf │ │ │ ├── button_img.png │ │ │ ├── folder.png │ │ │ ├── folder_open.png │ │ │ ├── icon_16.png │ │ │ ├── icon_32.png │ │ │ ├── icon_default.png │ │ │ ├── icons.inf │ │ │ ├── list_default.png │ │ │ ├── list_icon.png │ │ │ ├── logo.png │ │ │ ├── tb1_icon.png │ │ │ └── tb3_icon.png │ │ ├── resizehandle.cpp │ │ ├── scrollbar.cpp │ │ ├── slider.cpp │ │ ├── statusbar.cpp │ │ ├── subform.cpp │ │ ├── tabs.cpp │ │ ├── testcontrol.cpp │ │ ├── textarea.cpp │ │ ├── textbox.cpp │ │ ├── toolbar.cpp │ │ └── treeview.cpp │ ├── libgds │ │ ├── Makefile │ │ ├── geom.cpp │ │ ├── libgds_internal.hpp │ │ ├── main.cpp │ │ ├── ok_png.c │ │ ├── ok_png.h │ │ ├── primitives.cpp │ │ ├── protocol.cpp │ │ ├── screen.cpp │ │ ├── support.cpp │ │ ├── surface.cpp │ │ └── util.cpp │ ├── libwm │ │ ├── Makefile │ │ ├── eventloop.cpp │ │ ├── libwm_internal.hpp │ │ ├── main.cpp │ │ ├── menu.cpp │ │ ├── protocol.cpp │ │ ├── util.cpp │ │ └── window.cpp │ ├── newlib │ │ ├── Makefile │ │ ├── libc │ │ │ ├── Makefile │ │ │ ├── argz │ │ │ │ ├── argz_add.c │ │ │ │ ├── argz_add_sep.c │ │ │ │ ├── argz_append.c │ │ │ │ ├── argz_count.c │ │ │ │ ├── argz_create.c │ │ │ │ ├── argz_create_sep.c │ │ │ │ ├── argz_delete.c │ │ │ │ ├── argz_extract.c │ │ │ │ ├── argz_insert.c │ │ │ │ ├── argz_next.c │ │ │ │ ├── argz_replace.c │ │ │ │ ├── argz_stringify.c │ │ │ │ ├── buf_findstr.c │ │ │ │ ├── buf_findstr.h │ │ │ │ ├── dummy.c │ │ │ │ ├── envz_add.c │ │ │ │ ├── envz_entry.c │ │ │ │ ├── envz_get.c │ │ │ │ ├── envz_merge.c │ │ │ │ ├── envz_remove.c │ │ │ │ └── envz_strip.c │ │ │ ├── ctype │ │ │ │ ├── ctype.tex │ │ │ │ ├── ctype_.c │ │ │ │ ├── ctype_cp.h │ │ │ │ ├── ctype_iso.h │ │ │ │ ├── isalnum.c │ │ │ │ ├── isalpha.c │ │ │ │ ├── isascii.c │ │ │ │ ├── isblank.c │ │ │ │ ├── iscntrl.c │ │ │ │ ├── isdigit.c │ │ │ │ ├── islower.c │ │ │ │ ├── isprint.c │ │ │ │ ├── ispunct.c │ │ │ │ ├── isspace.c │ │ │ │ ├── isupper.c │ │ │ │ ├── iswalnum.c │ │ │ │ ├── iswalpha.c │ │ │ │ ├── iswblank.c │ │ │ │ ├── iswcntrl.c │ │ │ │ ├── iswctype.c │ │ │ │ ├── iswdigit.c │ │ │ │ ├── iswgraph.c │ │ │ │ ├── iswlower.c │ │ │ │ ├── iswprint.c │ │ │ │ ├── iswpunct.c │ │ │ │ ├── iswspace.c │ │ │ │ ├── iswupper.c │ │ │ │ ├── iswxdigit.c │ │ │ │ ├── isxdigit.c │ │ │ │ ├── jp2uc.c │ │ │ │ ├── jp2uc.h │ │ │ │ ├── local.h │ │ │ │ ├── toascii.c │ │ │ │ ├── tolower.c │ │ │ │ ├── toupper.c │ │ │ │ ├── towctrans.c │ │ │ │ ├── towlower.c │ │ │ │ ├── towupper.c │ │ │ │ ├── utf8alpha.h │ │ │ │ ├── utf8print.h │ │ │ │ ├── wctrans.c │ │ │ │ └── wctype.c │ │ │ ├── errno │ │ │ │ └── errno.c │ │ │ ├── iconv │ │ │ │ ├── ccs │ │ │ │ │ ├── big5.c │ │ │ │ │ ├── binary │ │ │ │ │ │ ├── big5.cct │ │ │ │ │ │ ├── cns11643_plane1.cct │ │ │ │ │ │ ├── cns11643_plane14.cct │ │ │ │ │ │ ├── cns11643_plane2.cct │ │ │ │ │ │ ├── cp775.cct │ │ │ │ │ │ ├── cp850.cct │ │ │ │ │ │ ├── cp852.cct │ │ │ │ │ │ ├── cp855.cct │ │ │ │ │ │ ├── cp866.cct │ │ │ │ │ │ ├── iso_8859_1.cct │ │ │ │ │ │ ├── iso_8859_10.cct │ │ │ │ │ │ ├── iso_8859_11.cct │ │ │ │ │ │ ├── iso_8859_13.cct │ │ │ │ │ │ ├── iso_8859_14.cct │ │ │ │ │ │ ├── iso_8859_15.cct │ │ │ │ │ │ ├── iso_8859_2.cct │ │ │ │ │ │ ├── iso_8859_3.cct │ │ │ │ │ │ ├── iso_8859_4.cct │ │ │ │ │ │ ├── iso_8859_5.cct │ │ │ │ │ │ ├── iso_8859_6.cct │ │ │ │ │ │ ├── iso_8859_7.cct │ │ │ │ │ │ ├── iso_8859_8.cct │ │ │ │ │ │ ├── iso_8859_9.cct │ │ │ │ │ │ ├── iso_ir_111.cct │ │ │ │ │ │ ├── jis_x0201_1976.cct │ │ │ │ │ │ ├── jis_x0208_1990.cct │ │ │ │ │ │ ├── jis_x0212_1990.cct │ │ │ │ │ │ ├── koi8_r.cct │ │ │ │ │ │ ├── koi8_ru.cct │ │ │ │ │ │ ├── koi8_u.cct │ │ │ │ │ │ ├── koi8_uni.cct │ │ │ │ │ │ ├── ksx1001.cct │ │ │ │ │ │ ├── win_1250.cct │ │ │ │ │ │ ├── win_1251.cct │ │ │ │ │ │ ├── win_1252.cct │ │ │ │ │ │ ├── win_1253.cct │ │ │ │ │ │ ├── win_1254.cct │ │ │ │ │ │ ├── win_1255.cct │ │ │ │ │ │ ├── win_1256.cct │ │ │ │ │ │ ├── win_1257.cct │ │ │ │ │ │ └── win_1258.cct │ │ │ │ │ ├── ccs.h │ │ │ │ │ ├── ccsbi.c │ │ │ │ │ ├── ccsbi.h │ │ │ │ │ ├── ccsnames.h │ │ │ │ │ ├── cns11643_plane1.c │ │ │ │ │ ├── cns11643_plane14.c │ │ │ │ │ ├── cns11643_plane2.c │ │ │ │ │ ├── cp775.c │ │ │ │ │ ├── cp850.c │ │ │ │ │ ├── cp852.c │ │ │ │ │ ├── cp855.c │ │ │ │ │ ├── cp866.c │ │ │ │ │ ├── iso_8859_1.c │ │ │ │ │ ├── iso_8859_10.c │ │ │ │ │ ├── iso_8859_11.c │ │ │ │ │ ├── iso_8859_13.c │ │ │ │ │ ├── iso_8859_14.c │ │ │ │ │ ├── iso_8859_15.c │ │ │ │ │ ├── iso_8859_2.c │ │ │ │ │ ├── iso_8859_3.c │ │ │ │ │ ├── iso_8859_4.c │ │ │ │ │ ├── iso_8859_5.c │ │ │ │ │ ├── iso_8859_6.c │ │ │ │ │ ├── iso_8859_7.c │ │ │ │ │ ├── iso_8859_8.c │ │ │ │ │ ├── iso_8859_9.c │ │ │ │ │ ├── iso_ir_111.c │ │ │ │ │ ├── jis_x0201_1976.c │ │ │ │ │ ├── jis_x0208_1990.c │ │ │ │ │ ├── jis_x0212_1990.c │ │ │ │ │ ├── koi8_r.c │ │ │ │ │ ├── koi8_ru.c │ │ │ │ │ ├── koi8_u.c │ │ │ │ │ ├── koi8_uni.c │ │ │ │ │ ├── ksx1001.c │ │ │ │ │ ├── mktbl.pl │ │ │ │ │ ├── win_1250.c │ │ │ │ │ ├── win_1251.c │ │ │ │ │ ├── win_1252.c │ │ │ │ │ ├── win_1253.c │ │ │ │ │ ├── win_1254.c │ │ │ │ │ ├── win_1255.c │ │ │ │ │ ├── win_1256.c │ │ │ │ │ ├── win_1257.c │ │ │ │ │ └── win_1258.c │ │ │ │ ├── ces │ │ │ │ │ ├── cesbi.c │ │ │ │ │ ├── cesbi.h │ │ │ │ │ ├── cesdeps.h │ │ │ │ │ ├── euc.c │ │ │ │ │ ├── mkdeps.pl │ │ │ │ │ ├── table-pcs.c │ │ │ │ │ ├── table.c │ │ │ │ │ ├── ucs-2-internal.c │ │ │ │ │ ├── ucs-2.c │ │ │ │ │ ├── ucs-4-internal.c │ │ │ │ │ ├── ucs-4.c │ │ │ │ │ ├── us-ascii.c │ │ │ │ │ ├── utf-16.c │ │ │ │ │ └── utf-8.c │ │ │ │ ├── encoding.aliases │ │ │ │ ├── iconv.tex │ │ │ │ └── lib │ │ │ │ │ ├── aliasesbi.c │ │ │ │ │ ├── aliasesi.c │ │ │ │ │ ├── conv.h │ │ │ │ │ ├── encnames.h │ │ │ │ │ ├── encoding.deps │ │ │ │ │ ├── endian.h │ │ │ │ │ ├── iconv.c │ │ │ │ │ ├── iconvnls.c │ │ │ │ │ ├── iconvnls.h │ │ │ │ │ ├── local.h │ │ │ │ │ ├── nullconv.c │ │ │ │ │ ├── ucsconv.c │ │ │ │ │ └── ucsconv.h │ │ │ ├── include │ │ │ │ ├── _ansi.h │ │ │ │ ├── _syslist.h │ │ │ │ ├── alloca.h │ │ │ │ ├── ar.h │ │ │ │ ├── argz.h │ │ │ │ ├── assert.h │ │ │ │ ├── complex.h │ │ │ │ ├── ctype.h │ │ │ │ ├── dirent.h │ │ │ │ ├── envlock.h │ │ │ │ ├── envz.h │ │ │ │ ├── errno.h │ │ │ │ ├── fastmath.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fnmatch.h │ │ │ │ ├── getopt.h │ │ │ │ ├── glob.h │ │ │ │ ├── grp.h │ │ │ │ ├── iconv.h │ │ │ │ ├── ieeefp.h │ │ │ │ ├── inttypes.h │ │ │ │ ├── langinfo.h │ │ │ │ ├── libgen.h │ │ │ │ ├── limits.h │ │ │ │ ├── locale.h │ │ │ │ ├── machine │ │ │ │ │ ├── _default_types.h │ │ │ │ │ ├── _types.h │ │ │ │ │ ├── ansi.h │ │ │ │ │ ├── endian.h │ │ │ │ │ ├── fastmath.h │ │ │ │ │ ├── ieeefp.h │ │ │ │ │ ├── malloc.h │ │ │ │ │ ├── param.h │ │ │ │ │ ├── setjmp-dj.h │ │ │ │ │ ├── setjmp.h │ │ │ │ │ ├── stdlib.h │ │ │ │ │ ├── termios.h │ │ │ │ │ ├── time.h │ │ │ │ │ └── types.h │ │ │ │ ├── malloc.h │ │ │ │ ├── math.h │ │ │ │ ├── newlib.h │ │ │ │ ├── paths.h │ │ │ │ ├── pthread.h │ │ │ │ ├── pwd.h │ │ │ │ ├── reent.h │ │ │ │ ├── regdef.h │ │ │ │ ├── regex.h │ │ │ │ ├── rpc │ │ │ │ │ ├── types.h │ │ │ │ │ └── xdr.h │ │ │ │ ├── sched.h │ │ │ │ ├── search.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── spawn.h │ │ │ │ ├── stdatomic.h │ │ │ │ ├── stdint.h │ │ │ │ ├── stdio.h │ │ │ │ ├── stdio_ext.h │ │ │ │ ├── stdlib.h │ │ │ │ ├── string.h │ │ │ │ ├── strings.h │ │ │ │ ├── sys │ │ │ │ │ ├── _default_fcntl.h │ │ │ │ │ ├── _types.h │ │ │ │ │ ├── cdefs.h │ │ │ │ │ ├── config.h │ │ │ │ │ ├── custom_file.h │ │ │ │ │ ├── dir.h │ │ │ │ │ ├── dirent.h │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── fcntl.h │ │ │ │ │ ├── features.h │ │ │ │ │ ├── file.h │ │ │ │ │ ├── iconvnls.h │ │ │ │ │ ├── lock.h │ │ │ │ │ ├── param.h │ │ │ │ │ ├── queue.h │ │ │ │ │ ├── reent.h │ │ │ │ │ ├── resource.h │ │ │ │ │ ├── sched.h │ │ │ │ │ ├── signal.h │ │ │ │ │ ├── stat.h │ │ │ │ │ ├── stdio.h │ │ │ │ │ ├── string.h │ │ │ │ │ ├── syslimits.h │ │ │ │ │ ├── time.h │ │ │ │ │ ├── timeb.h │ │ │ │ │ ├── times.h │ │ │ │ │ ├── types.h │ │ │ │ │ ├── unistd.h │ │ │ │ │ ├── utime.h │ │ │ │ │ └── wait.h │ │ │ │ ├── tar.h │ │ │ │ ├── termios.h │ │ │ │ ├── tgmath.h │ │ │ │ ├── time.h │ │ │ │ ├── unctrl.h │ │ │ │ ├── unistd.h │ │ │ │ ├── utime.h │ │ │ │ ├── utmp.h │ │ │ │ ├── wchar.h │ │ │ │ ├── wctype.h │ │ │ │ └── wordexp.h │ │ │ ├── libc.texinfo │ │ │ ├── locale │ │ │ │ ├── fix_grouping.c │ │ │ │ ├── lctype.c │ │ │ │ ├── lctype.h │ │ │ │ ├── ldpart.c │ │ │ │ ├── ldpart.h │ │ │ │ ├── lmessages.c │ │ │ │ ├── lmessages.h │ │ │ │ ├── lmonetary.c │ │ │ │ ├── lmonetary.h │ │ │ │ ├── lnumeric.c │ │ │ │ ├── lnumeric.h │ │ │ │ ├── locale.c │ │ │ │ ├── locale.tex │ │ │ │ ├── nl_langinfo.3 │ │ │ │ ├── nl_langinfo.c │ │ │ │ ├── setlocale.h │ │ │ │ ├── timelocal.c │ │ │ │ └── timelocal.h │ │ │ ├── machine │ │ │ │ └── i386 │ │ │ │ │ ├── f_atan2.S │ │ │ │ │ ├── f_atan2f.S │ │ │ │ │ ├── f_exp.c │ │ │ │ │ ├── f_expf.c │ │ │ │ │ ├── f_frexp.S │ │ │ │ │ ├── f_frexpf.S │ │ │ │ │ ├── f_ldexp.S │ │ │ │ │ ├── f_ldexpf.S │ │ │ │ │ ├── f_log.S │ │ │ │ │ ├── f_log10.S │ │ │ │ │ ├── f_log10f.S │ │ │ │ │ ├── f_logf.S │ │ │ │ │ ├── f_math.h │ │ │ │ │ ├── f_pow.c │ │ │ │ │ ├── f_powf.c │ │ │ │ │ ├── f_tan.S │ │ │ │ │ ├── f_tanf.S │ │ │ │ │ ├── i386mach.h │ │ │ │ │ ├── machine │ │ │ │ │ └── fastmath.h │ │ │ │ │ ├── memchr.S │ │ │ │ │ ├── memcmp.S │ │ │ │ │ ├── memcpy.S │ │ │ │ │ ├── memmove.S │ │ │ │ │ ├── memset.S │ │ │ │ │ ├── setjmp.S │ │ │ │ │ ├── strchr.S │ │ │ │ │ └── strlen.S │ │ │ ├── misc │ │ │ │ ├── __dprintf.c │ │ │ │ ├── ffs.c │ │ │ │ ├── fini.c │ │ │ │ ├── init.c │ │ │ │ ├── misc.tex │ │ │ │ └── unctrl.c │ │ │ ├── posix │ │ │ │ ├── COPYRIGHT │ │ │ │ ├── _isatty.c │ │ │ │ ├── cclass.h │ │ │ │ ├── closedir.c │ │ │ │ ├── cname.h │ │ │ │ ├── collate.c │ │ │ │ ├── collate.h │ │ │ │ ├── collcmp.c │ │ │ │ ├── creat.c │ │ │ │ ├── engine.c │ │ │ │ ├── execl.c │ │ │ │ ├── execle.c │ │ │ │ ├── execlp.c │ │ │ │ ├── execv.c │ │ │ │ ├── execve.c │ │ │ │ ├── execvp.c │ │ │ │ ├── fnmatch.3 │ │ │ │ ├── fnmatch.c │ │ │ │ ├── glob.3 │ │ │ │ ├── glob.c │ │ │ │ ├── isatty.c │ │ │ │ ├── namespace.h │ │ │ │ ├── opendir.c │ │ │ │ ├── popen.c │ │ │ │ ├── posix.tex │ │ │ │ ├── posix_spawn.c │ │ │ │ ├── readdir.c │ │ │ │ ├── readdir_r.c │ │ │ │ ├── regcomp.c │ │ │ │ ├── regerror.c │ │ │ │ ├── regex.3 │ │ │ │ ├── regex2.h │ │ │ │ ├── regexec.c │ │ │ │ ├── regfree.c │ │ │ │ ├── rewinddir.c │ │ │ │ ├── rune.h │ │ │ │ ├── runetype.h │ │ │ │ ├── scandir.c │ │ │ │ ├── seekdir.c │ │ │ │ ├── sleep.c │ │ │ │ ├── sysexits.h │ │ │ │ ├── telldir.c │ │ │ │ ├── un-namespace.h │ │ │ │ ├── usleep.c │ │ │ │ ├── utils.h │ │ │ │ ├── wordexp.c │ │ │ │ ├── wordexp2.h │ │ │ │ └── wordfree.c │ │ │ ├── reent │ │ │ │ ├── closer.c │ │ │ │ ├── execr.c │ │ │ │ ├── fcntlr.c │ │ │ │ ├── fstat64r.c │ │ │ │ ├── fstatr.c │ │ │ │ ├── getreent.c │ │ │ │ ├── gettimeofdayr.c │ │ │ │ ├── impure.c │ │ │ │ ├── isattyr.c │ │ │ │ ├── linkr.c │ │ │ │ ├── lseek64r.c │ │ │ │ ├── lseekr.c │ │ │ │ ├── mkdirr.c │ │ │ │ ├── open64r.c │ │ │ │ ├── openr.c │ │ │ │ ├── readr.c │ │ │ │ ├── reent.c │ │ │ │ ├── reent.tex │ │ │ │ ├── renamer.c │ │ │ │ ├── sbrkr.c │ │ │ │ ├── signalr.c │ │ │ │ ├── signgam.c │ │ │ │ ├── stat64r.c │ │ │ │ ├── statr.c │ │ │ │ ├── timesr.c │ │ │ │ ├── unlinkr.c │ │ │ │ └── writer.c │ │ │ ├── search │ │ │ │ ├── bsearch.c │ │ │ │ ├── db_local.h │ │ │ │ ├── extern.h │ │ │ │ ├── hash.c │ │ │ │ ├── hash.h │ │ │ │ ├── hash_bigkey.c │ │ │ │ ├── hash_buf.c │ │ │ │ ├── hash_func.c │ │ │ │ ├── hash_log2.c │ │ │ │ ├── hash_page.c │ │ │ │ ├── hcreate.3 │ │ │ │ ├── hcreate.c │ │ │ │ ├── hcreate_r.c │ │ │ │ ├── page.h │ │ │ │ ├── qsort.c │ │ │ │ ├── tdelete.c │ │ │ │ ├── tdestroy.c │ │ │ │ ├── tfind.c │ │ │ │ ├── tsearch.3 │ │ │ │ ├── tsearch.c │ │ │ │ └── twalk.c │ │ │ ├── signal │ │ │ │ ├── psignal.c │ │ │ │ ├── raise.c │ │ │ │ ├── signal.c │ │ │ │ └── signal.tex │ │ │ ├── stdio │ │ │ │ ├── asiprintf.c │ │ │ │ ├── asniprintf.c │ │ │ │ ├── asnprintf.c │ │ │ │ ├── asprintf.c │ │ │ │ ├── clearerr.c │ │ │ │ ├── diprintf.c │ │ │ │ ├── dprintf.c │ │ │ │ ├── fclose.c │ │ │ │ ├── fcloseall.c │ │ │ │ ├── fdopen.c │ │ │ │ ├── feof.c │ │ │ │ ├── ferror.c │ │ │ │ ├── fflush.c │ │ │ │ ├── fgetc.c │ │ │ │ ├── fgetpos.c │ │ │ │ ├── fgets.c │ │ │ │ ├── fgetwc.c │ │ │ │ ├── fgetws.c │ │ │ │ ├── fileno.c │ │ │ │ ├── findfp.c │ │ │ │ ├── fiprintf.c │ │ │ │ ├── fiscanf.c │ │ │ │ ├── flags.c │ │ │ │ ├── floatio.h │ │ │ │ ├── fmemopen.c │ │ │ │ ├── fopen.c │ │ │ │ ├── fopencookie.c │ │ │ │ ├── fprintf.c │ │ │ │ ├── fpurge.c │ │ │ │ ├── fputc.c │ │ │ │ ├── fputs.c │ │ │ │ ├── fputwc.c │ │ │ │ ├── fputws.c │ │ │ │ ├── fread.c │ │ │ │ ├── freopen.c │ │ │ │ ├── fscanf.c │ │ │ │ ├── fseek.c │ │ │ │ ├── fseeko.c │ │ │ │ ├── fsetpos.c │ │ │ │ ├── ftell.c │ │ │ │ ├── ftello.c │ │ │ │ ├── funopen.c │ │ │ │ ├── fvwrite.c │ │ │ │ ├── fvwrite.h │ │ │ │ ├── fwalk.c │ │ │ │ ├── fwide.c │ │ │ │ ├── fwprintf.c │ │ │ │ ├── fwrite.c │ │ │ │ ├── fwscanf.c │ │ │ │ ├── getc.c │ │ │ │ ├── getc_u.c │ │ │ │ ├── getchar.c │ │ │ │ ├── getchar_u.c │ │ │ │ ├── getdelim.c │ │ │ │ ├── getline.c │ │ │ │ ├── gets.c │ │ │ │ ├── getw.c │ │ │ │ ├── getwc.c │ │ │ │ ├── getwchar.c │ │ │ │ ├── iprintf.c │ │ │ │ ├── iscanf.c │ │ │ │ ├── local.h │ │ │ │ ├── makebuf.c │ │ │ │ ├── mktemp.c │ │ │ │ ├── open_memstream.c │ │ │ │ ├── perror.c │ │ │ │ ├── printf.c │ │ │ │ ├── putc.c │ │ │ │ ├── putc_u.c │ │ │ │ ├── putchar.c │ │ │ │ ├── putchar_u.c │ │ │ │ ├── puts.c │ │ │ │ ├── putw.c │ │ │ │ ├── putwc.c │ │ │ │ ├── putwchar.c │ │ │ │ ├── refill.c │ │ │ │ ├── remove.c │ │ │ │ ├── rename.c │ │ │ │ ├── rewind.c │ │ │ │ ├── rget.c │ │ │ │ ├── scanf.c │ │ │ │ ├── sccl.c │ │ │ │ ├── setbuf.c │ │ │ │ ├── setbuffer.c │ │ │ │ ├── setlinebuf.c │ │ │ │ ├── setvbuf.c │ │ │ │ ├── siprintf.c │ │ │ │ ├── siscanf.c │ │ │ │ ├── sniprintf.c │ │ │ │ ├── snprintf.c │ │ │ │ ├── sprintf.c │ │ │ │ ├── sscanf.c │ │ │ │ ├── stdio.c │ │ │ │ ├── stdio.tex │ │ │ │ ├── swprintf.c │ │ │ │ ├── swscanf.c │ │ │ │ ├── tmpfile.c │ │ │ │ ├── tmpnam.c │ │ │ │ ├── ungetc.c │ │ │ │ ├── ungetwc.c │ │ │ │ ├── vasiprintf.c │ │ │ │ ├── vasniprintf.c │ │ │ │ ├── vasnprintf.c │ │ │ │ ├── vasprintf.c │ │ │ │ ├── vdiprintf.c │ │ │ │ ├── vdprintf.c │ │ │ │ ├── vfieeefp.h │ │ │ │ ├── vfprintf.c │ │ │ │ ├── vfscanf.c │ │ │ │ ├── vfwprintf.c │ │ │ │ ├── vfwscanf.c │ │ │ │ ├── viprintf.c │ │ │ │ ├── viscanf.c │ │ │ │ ├── vprintf.c │ │ │ │ ├── vscanf.c │ │ │ │ ├── vsiprintf.c │ │ │ │ ├── vsiscanf.c │ │ │ │ ├── vsniprintf.c │ │ │ │ ├── vsnprintf.c │ │ │ │ ├── vsprintf.c │ │ │ │ ├── vsscanf.c │ │ │ │ ├── vswprintf.c │ │ │ │ ├── vswscanf.c │ │ │ │ ├── vwprintf.c │ │ │ │ ├── vwscanf.c │ │ │ │ ├── wbuf.c │ │ │ │ ├── wprintf.c │ │ │ │ ├── wscanf.c │ │ │ │ └── wsetup.c │ │ │ ├── stdio64 │ │ │ │ ├── dummy.c │ │ │ │ ├── fdopen64.c │ │ │ │ ├── fgetpos64.c │ │ │ │ ├── fopen64.c │ │ │ │ ├── freopen64.c │ │ │ │ ├── fseeko64.c │ │ │ │ ├── fsetpos64.c │ │ │ │ ├── ftello64.c │ │ │ │ ├── stdio64.c │ │ │ │ ├── stdio64.tex │ │ │ │ └── tmpfile64.c │ │ │ ├── stdlib │ │ │ │ ├── _Exit.c │ │ │ │ ├── __adjust.c │ │ │ │ ├── __atexit.c │ │ │ │ ├── __call_atexit.c │ │ │ │ ├── __exp10.c │ │ │ │ ├── __ten_mu.c │ │ │ │ ├── a64l.c │ │ │ │ ├── abort.c │ │ │ │ ├── abs.c │ │ │ │ ├── assert.c │ │ │ │ ├── atexit.c │ │ │ │ ├── atexit.h │ │ │ │ ├── atof.c │ │ │ │ ├── atoff.c │ │ │ │ ├── atoi.c │ │ │ │ ├── atol.c │ │ │ │ ├── atoll.c │ │ │ │ ├── btowc.c │ │ │ │ ├── calloc.c │ │ │ │ ├── cxa_atexit.c │ │ │ │ ├── cxa_finalize.c │ │ │ │ ├── div.c │ │ │ │ ├── drand48.c │ │ │ │ ├── dtoa.c │ │ │ │ ├── dtoastub.c │ │ │ │ ├── ecvtbuf.c │ │ │ │ ├── efgcvt.c │ │ │ │ ├── environ.c │ │ │ │ ├── envlock.c │ │ │ │ ├── eprintf.c │ │ │ │ ├── erand48.c │ │ │ │ ├── exit.c │ │ │ │ ├── gd_qnan.h │ │ │ │ ├── gdtoa-gethex.c │ │ │ │ ├── gdtoa-hexnan.c │ │ │ │ ├── gdtoa.h │ │ │ │ ├── getenv.c │ │ │ │ ├── getenv_r.c │ │ │ │ ├── getopt.c │ │ │ │ ├── getsubopt.3 │ │ │ │ ├── getsubopt.c │ │ │ │ ├── jrand48.c │ │ │ │ ├── l64a.c │ │ │ │ ├── labs.c │ │ │ │ ├── lcong48.c │ │ │ │ ├── ldiv.c │ │ │ │ ├── ldtoa.c │ │ │ │ ├── llabs.c │ │ │ │ ├── lldiv.c │ │ │ │ ├── local.h │ │ │ │ ├── lrand48.c │ │ │ │ ├── malign.c │ │ │ │ ├── malloc.c │ │ │ │ ├── mallocr.c │ │ │ │ ├── mbctype.h │ │ │ │ ├── mblen.c │ │ │ │ ├── mblen_r.c │ │ │ │ ├── mbrlen.c │ │ │ │ ├── mbrtowc.c │ │ │ │ ├── mbsinit.c │ │ │ │ ├── mbsnrtowcs.c │ │ │ │ ├── mbsrtowcs.c │ │ │ │ ├── mbstowcs.c │ │ │ │ ├── mbstowcs_r.c │ │ │ │ ├── mbtowc.c │ │ │ │ ├── mbtowc_r.c │ │ │ │ ├── mlock.c │ │ │ │ ├── mprec.c │ │ │ │ ├── mprec.h │ │ │ │ ├── mrand48.c │ │ │ │ ├── msize.c │ │ │ │ ├── mstats.c │ │ │ │ ├── mtrim.c │ │ │ │ ├── nano-mallocr.c │ │ │ │ ├── nrand48.c │ │ │ │ ├── on_exit.c │ │ │ │ ├── putenv.c │ │ │ │ ├── putenv_r.c │ │ │ │ ├── rand.c │ │ │ │ ├── rand48.c │ │ │ │ ├── rand48.h │ │ │ │ ├── rand_r.c │ │ │ │ ├── realloc.c │ │ │ │ ├── reallocf.c │ │ │ │ ├── sb_charsets.c │ │ │ │ ├── seed48.c │ │ │ │ ├── setenv.c │ │ │ │ ├── setenv_r.c │ │ │ │ ├── srand48.c │ │ │ │ ├── std.h │ │ │ │ ├── stdlib.tex │ │ │ │ ├── strtod.c │ │ │ │ ├── strtol.c │ │ │ │ ├── strtold.c │ │ │ │ ├── strtoll.c │ │ │ │ ├── strtoll_r.c │ │ │ │ ├── strtoul.c │ │ │ │ ├── strtoull.c │ │ │ │ ├── strtoull_r.c │ │ │ │ ├── system.c │ │ │ │ ├── valloc.c │ │ │ │ ├── wcrtomb.c │ │ │ │ ├── wcsnrtombs.c │ │ │ │ ├── wcsrtombs.c │ │ │ │ ├── wcstod.c │ │ │ │ ├── wcstol.c │ │ │ │ ├── wcstold.c │ │ │ │ ├── wcstoll.c │ │ │ │ ├── wcstoll_r.c │ │ │ │ ├── wcstombs.c │ │ │ │ ├── wcstombs_r.c │ │ │ │ ├── wcstoul.c │ │ │ │ ├── wcstoull.c │ │ │ │ ├── wcstoull_r.c │ │ │ │ ├── wctob.c │ │ │ │ ├── wctomb.c │ │ │ │ └── wctomb_r.c │ │ │ ├── string │ │ │ │ ├── bcmp.c │ │ │ │ ├── bcopy.c │ │ │ │ ├── bzero.c │ │ │ │ ├── index.c │ │ │ │ ├── local.h │ │ │ │ ├── memccpy.c │ │ │ │ ├── memchr.c │ │ │ │ ├── memcmp.c │ │ │ │ ├── memcpy.c │ │ │ │ ├── memmem.c │ │ │ │ ├── memmove.c │ │ │ │ ├── mempcpy.c │ │ │ │ ├── memrchr.c │ │ │ │ ├── memset.c │ │ │ │ ├── rawmemchr.c │ │ │ │ ├── rindex.c │ │ │ │ ├── stpcpy.c │ │ │ │ ├── stpncpy.c │ │ │ │ ├── str-two-way.h │ │ │ │ ├── strcasecmp.c │ │ │ │ ├── strcasestr.c │ │ │ │ ├── strcat.c │ │ │ │ ├── strchr.c │ │ │ │ ├── strchrnul.c │ │ │ │ ├── strcmp.c │ │ │ │ ├── strcoll.c │ │ │ │ ├── strcpy.c │ │ │ │ ├── strcspn.c │ │ │ │ ├── strdup.c │ │ │ │ ├── strdup_r.c │ │ │ │ ├── strerror.c │ │ │ │ ├── strerror_r.c │ │ │ │ ├── strings.tex │ │ │ │ ├── strlcat.c │ │ │ │ ├── strlcpy.c │ │ │ │ ├── strlen.c │ │ │ │ ├── strlwr.c │ │ │ │ ├── strncasecmp.c │ │ │ │ ├── strncat.c │ │ │ │ ├── strncmp.c │ │ │ │ ├── strncpy.c │ │ │ │ ├── strndup.c │ │ │ │ ├── strndup_r.c │ │ │ │ ├── strnlen.c │ │ │ │ ├── strpbrk.c │ │ │ │ ├── strrchr.c │ │ │ │ ├── strsep.c │ │ │ │ ├── strsignal.c │ │ │ │ ├── strspn.c │ │ │ │ ├── strstr.c │ │ │ │ ├── strtok.c │ │ │ │ ├── strtok_r.c │ │ │ │ ├── strupr.c │ │ │ │ ├── strxfrm.c │ │ │ │ ├── swab.c │ │ │ │ ├── u_strerr.c │ │ │ │ ├── wcpcpy.c │ │ │ │ ├── wcpncpy.c │ │ │ │ ├── wcscasecmp.c │ │ │ │ ├── wcscat.c │ │ │ │ ├── wcschr.c │ │ │ │ ├── wcscmp.c │ │ │ │ ├── wcscoll.c │ │ │ │ ├── wcscpy.c │ │ │ │ ├── wcscspn.c │ │ │ │ ├── wcsdup.c │ │ │ │ ├── wcslcat.c │ │ │ │ ├── wcslcpy.c │ │ │ │ ├── wcslen.c │ │ │ │ ├── wcsncasecmp.c │ │ │ │ ├── wcsncat.c │ │ │ │ ├── wcsncmp.c │ │ │ │ ├── wcsncpy.c │ │ │ │ ├── wcsnlen.c │ │ │ │ ├── wcspbrk.c │ │ │ │ ├── wcsrchr.c │ │ │ │ ├── wcsspn.c │ │ │ │ ├── wcsstr.c │ │ │ │ ├── wcstok.c │ │ │ │ ├── wcstrings.tex │ │ │ │ ├── wcswidth.c │ │ │ │ ├── wcsxfrm.c │ │ │ │ ├── wcwidth.c │ │ │ │ ├── wmemchr.c │ │ │ │ ├── wmemcmp.c │ │ │ │ ├── wmemcpy.c │ │ │ │ ├── wmemmove.c │ │ │ │ ├── wmemset.c │ │ │ │ └── xpg_strerror_r.c │ │ │ ├── sys.tex │ │ │ ├── sys │ │ │ │ └── btos │ │ │ │ │ ├── cfreer.c │ │ │ │ │ ├── config.ih │ │ │ │ │ ├── crt0.S │ │ │ │ │ ├── crt_support.c │ │ │ │ │ ├── crt_support.h │ │ │ │ │ ├── crti.S │ │ │ │ │ ├── crtn.S │ │ │ │ │ ├── dirent.c │ │ │ │ │ ├── getenv.c │ │ │ │ │ ├── liballoc.c │ │ │ │ │ ├── liballoc.ih │ │ │ │ │ ├── liballoc_hooks.c │ │ │ │ │ ├── pthread.c │ │ │ │ │ ├── pthread_cond.c │ │ │ │ │ ├── pthread_mutex.c │ │ │ │ │ ├── pthread_sem.c │ │ │ │ │ ├── semaphore.h │ │ │ │ │ ├── signal.c │ │ │ │ │ ├── sys │ │ │ │ │ ├── dirent.h │ │ │ │ │ ├── limits.h │ │ │ │ │ ├── setjmp.h │ │ │ │ │ ├── siginfo.h │ │ │ │ │ └── termios.h │ │ │ │ │ └── syscalls.c │ │ │ ├── syscalls │ │ │ │ ├── sysclose.c │ │ │ │ ├── sysexecve.c │ │ │ │ ├── sysfcntl.c │ │ │ │ ├── sysfork.c │ │ │ │ ├── sysfstat.c │ │ │ │ ├── sysgetpid.c │ │ │ │ ├── sysgettod.c │ │ │ │ ├── sysisatty.c │ │ │ │ ├── syskill.c │ │ │ │ ├── syslink.c │ │ │ │ ├── syslseek.c │ │ │ │ ├── sysopen.c │ │ │ │ ├── sysread.c │ │ │ │ ├── syssbrk.c │ │ │ │ ├── sysstat.c │ │ │ │ ├── systimes.c │ │ │ │ ├── sysunlink.c │ │ │ │ ├── syswait.c │ │ │ │ └── syswrite.c │ │ │ ├── time │ │ │ │ ├── asctime.c │ │ │ │ ├── asctime_r.c │ │ │ │ ├── clock.c │ │ │ │ ├── ctime.c │ │ │ │ ├── ctime_r.c │ │ │ │ ├── difftime.c │ │ │ │ ├── gettzinfo.c │ │ │ │ ├── gmtime.c │ │ │ │ ├── gmtime_r.c │ │ │ │ ├── lcltime.c │ │ │ │ ├── lcltime_r.c │ │ │ │ ├── local.h │ │ │ │ ├── mktime.c │ │ │ │ ├── mktm_r.c │ │ │ │ ├── strftime.c │ │ │ │ ├── strptime.c │ │ │ │ ├── time.c │ │ │ │ ├── time.tex │ │ │ │ ├── tzlock.c │ │ │ │ ├── tzset.c │ │ │ │ ├── tzset_r.c │ │ │ │ ├── tzvars.c │ │ │ │ └── wcsftime.c │ │ │ ├── unix │ │ │ │ ├── basename.c │ │ │ │ ├── dirname.c │ │ │ │ ├── getcwd.c │ │ │ │ ├── getlogin.c │ │ │ │ ├── getpass.c │ │ │ │ ├── getpwent.c │ │ │ │ ├── getut.c │ │ │ │ ├── pread.c │ │ │ │ ├── pwrite.c │ │ │ │ ├── sigset.c │ │ │ │ ├── ttyname.c │ │ │ │ ├── ttyname.h │ │ │ │ └── ttyname_r.c │ │ │ └── xdr │ │ │ │ ├── README │ │ │ │ ├── dummy.c │ │ │ │ ├── xdr.c │ │ │ │ ├── xdr_array.c │ │ │ │ ├── xdr_float.c │ │ │ │ ├── xdr_float_vax.c │ │ │ │ ├── xdr_mem.c │ │ │ │ ├── xdr_private.c │ │ │ │ ├── xdr_private.h │ │ │ │ ├── xdr_rec.c │ │ │ │ ├── xdr_reference.c │ │ │ │ ├── xdr_sizeof.c │ │ │ │ └── xdr_stdio.c │ │ └── libm │ │ │ ├── Makefile │ │ │ ├── common │ │ │ ├── acoshl.c │ │ │ ├── acosl.c │ │ │ ├── asinhl.c │ │ │ ├── asinl.c │ │ │ ├── atan2l.c │ │ │ ├── atanhl.c │ │ │ ├── atanl.c │ │ │ ├── cbrtl.c │ │ │ ├── ceill.c │ │ │ ├── copysignl.c │ │ │ ├── coshl.c │ │ │ ├── cosl.c │ │ │ ├── erfcl.c │ │ │ ├── erfl.c │ │ │ ├── exp2l.c │ │ │ ├── expl.c │ │ │ ├── expm1l.c │ │ │ ├── fabsl.c │ │ │ ├── fdiml.c │ │ │ ├── fdlibm.h │ │ │ ├── floorl.c │ │ │ ├── fmal.c │ │ │ ├── fmaxl.c │ │ │ ├── fminl.c │ │ │ ├── fmodl.c │ │ │ ├── frexpl.c │ │ │ ├── hypotl.c │ │ │ ├── ilogbl.c │ │ │ ├── isgreater.c │ │ │ ├── ldexpl.c │ │ │ ├── lgammal.c │ │ │ ├── llrintl.c │ │ │ ├── llroundl.c │ │ │ ├── local.h │ │ │ ├── log10l.c │ │ │ ├── log1pl.c │ │ │ ├── logl.c │ │ │ ├── lrintl.c │ │ │ ├── lroundl.c │ │ │ ├── modfl.c │ │ │ ├── nanl.c │ │ │ ├── nearbyintl.c │ │ │ ├── nextafterl.c │ │ │ ├── powl.c │ │ │ ├── remainderl.c │ │ │ ├── remquol.c │ │ │ ├── rintl.c │ │ │ ├── roundl.c │ │ │ ├── s_cbrt.c │ │ │ ├── s_copysign.c │ │ │ ├── s_exp10.c │ │ │ ├── s_expm1.c │ │ │ ├── s_fdim.c │ │ │ ├── s_finite.c │ │ │ ├── s_fma.c │ │ │ ├── s_fmax.c │ │ │ ├── s_fmin.c │ │ │ ├── s_fpclassify.c │ │ │ ├── s_ilogb.c │ │ │ ├── s_infconst.c │ │ │ ├── s_infinity.c │ │ │ ├── s_isinf.c │ │ │ ├── s_isinfd.c │ │ │ ├── s_isnan.c │ │ │ ├── s_isnand.c │ │ │ ├── s_lib_ver.c │ │ │ ├── s_llrint.c │ │ │ ├── s_llround.c │ │ │ ├── s_log1p.c │ │ │ ├── s_log2.c │ │ │ ├── s_logb.c │ │ │ ├── s_lrint.c │ │ │ ├── s_lround.c │ │ │ ├── s_matherr.c │ │ │ ├── s_modf.c │ │ │ ├── s_nan.c │ │ │ ├── s_nearbyint.c │ │ │ ├── s_nextafter.c │ │ │ ├── s_pow10.c │ │ │ ├── s_remquo.c │ │ │ ├── s_rint.c │ │ │ ├── s_round.c │ │ │ ├── s_scalbln.c │ │ │ ├── s_scalbn.c │ │ │ ├── s_signbit.c │ │ │ ├── s_trunc.c │ │ │ ├── scalblnl.c │ │ │ ├── scalbnl.c │ │ │ ├── sf_cbrt.c │ │ │ ├── sf_copysign.c │ │ │ ├── sf_exp10.c │ │ │ ├── sf_expm1.c │ │ │ ├── sf_fdim.c │ │ │ ├── sf_finite.c │ │ │ ├── sf_fma.c │ │ │ ├── sf_fmax.c │ │ │ ├── sf_fmin.c │ │ │ ├── sf_fpclassify.c │ │ │ ├── sf_ilogb.c │ │ │ ├── sf_infinity.c │ │ │ ├── sf_isinf.c │ │ │ ├── sf_isinff.c │ │ │ ├── sf_isnan.c │ │ │ ├── sf_isnanf.c │ │ │ ├── sf_llrint.c │ │ │ ├── sf_llround.c │ │ │ ├── sf_log1p.c │ │ │ ├── sf_log2.c │ │ │ ├── sf_logb.c │ │ │ ├── sf_lrint.c │ │ │ ├── sf_lround.c │ │ │ ├── sf_modf.c │ │ │ ├── sf_nan.c │ │ │ ├── sf_nearbyint.c │ │ │ ├── sf_nextafter.c │ │ │ ├── sf_pow10.c │ │ │ ├── sf_remquo.c │ │ │ ├── sf_rint.c │ │ │ ├── sf_round.c │ │ │ ├── sf_scalbln.c │ │ │ ├── sf_scalbn.c │ │ │ ├── sf_trunc.c │ │ │ ├── sinhl.c │ │ │ ├── sinl.c │ │ │ ├── sqrtl.c │ │ │ ├── tanhl.c │ │ │ ├── tanl.c │ │ │ ├── tgammal.c │ │ │ └── truncl.c │ │ │ ├── complex │ │ │ ├── cabs.c │ │ │ ├── cabsf.c │ │ │ ├── cacos.c │ │ │ ├── cacosf.c │ │ │ ├── cacosh.c │ │ │ ├── cacoshf.c │ │ │ ├── carg.c │ │ │ ├── cargf.c │ │ │ ├── casin.c │ │ │ ├── casinf.c │ │ │ ├── casinh.c │ │ │ ├── casinhf.c │ │ │ ├── catan.c │ │ │ ├── catanf.c │ │ │ ├── catanh.c │ │ │ ├── catanhf.c │ │ │ ├── ccos.c │ │ │ ├── ccosf.c │ │ │ ├── ccosh.c │ │ │ ├── ccoshf.c │ │ │ ├── cephes_subr.c │ │ │ ├── cephes_subr.h │ │ │ ├── cephes_subrf.c │ │ │ ├── cephes_subrf.h │ │ │ ├── cexp.c │ │ │ ├── cexpf.c │ │ │ ├── cimag.c │ │ │ ├── cimagf.c │ │ │ ├── clog.c │ │ │ ├── clogf.c │ │ │ ├── complex.tex │ │ │ ├── conj.c │ │ │ ├── conjf.c │ │ │ ├── cpow.c │ │ │ ├── cpowf.c │ │ │ ├── cproj.c │ │ │ ├── cprojf.c │ │ │ ├── creal.c │ │ │ ├── crealf.c │ │ │ ├── csin.c │ │ │ ├── csinf.c │ │ │ ├── csinh.c │ │ │ ├── csinhf.c │ │ │ ├── csqrt.c │ │ │ ├── csqrtf.c │ │ │ ├── ctan.c │ │ │ ├── ctanf.c │ │ │ ├── ctanh.c │ │ │ └── ctanhf.c │ │ │ ├── machine │ │ │ └── i386 │ │ │ │ ├── f_atan2.S │ │ │ │ ├── f_atan2f.S │ │ │ │ ├── f_exp.c │ │ │ │ ├── f_expf.c │ │ │ │ ├── f_frexp.S │ │ │ │ ├── f_frexpf.S │ │ │ │ ├── f_ldexp.S │ │ │ │ ├── f_ldexpf.S │ │ │ │ ├── f_llrint.c │ │ │ │ ├── f_llrintf.c │ │ │ │ ├── f_llrintl.c │ │ │ │ ├── f_log.S │ │ │ │ ├── f_log10.S │ │ │ │ ├── f_log10f.S │ │ │ │ ├── f_logf.S │ │ │ │ ├── f_lrint.c │ │ │ │ ├── f_lrintf.c │ │ │ │ ├── f_lrintl.c │ │ │ │ ├── f_math.h │ │ │ │ ├── f_pow.c │ │ │ │ ├── f_powf.c │ │ │ │ ├── f_rint.c │ │ │ │ ├── f_rintf.c │ │ │ │ ├── f_rintl.c │ │ │ │ ├── f_tan.S │ │ │ │ ├── f_tanf.S │ │ │ │ └── i386mach.h │ │ │ ├── math │ │ │ ├── e_acos.c │ │ │ ├── e_acosh.c │ │ │ ├── e_asin.c │ │ │ ├── e_atan2.c │ │ │ ├── e_atanh.c │ │ │ ├── e_cosh.c │ │ │ ├── e_exp.c │ │ │ ├── e_fmod.c │ │ │ ├── e_hypot.c │ │ │ ├── e_j0.c │ │ │ ├── e_j1.c │ │ │ ├── e_jn.c │ │ │ ├── e_log.c │ │ │ ├── e_log10.c │ │ │ ├── e_pow.c │ │ │ ├── e_rem_pio2.c │ │ │ ├── e_remainder.c │ │ │ ├── e_scalb.c │ │ │ ├── e_sinh.c │ │ │ ├── e_sqrt.c │ │ │ ├── ef_acos.c │ │ │ ├── ef_acosh.c │ │ │ ├── ef_asin.c │ │ │ ├── ef_atan2.c │ │ │ ├── ef_atanh.c │ │ │ ├── ef_cosh.c │ │ │ ├── ef_exp.c │ │ │ ├── ef_fmod.c │ │ │ ├── ef_hypot.c │ │ │ ├── ef_j0.c │ │ │ ├── ef_j1.c │ │ │ ├── ef_jn.c │ │ │ ├── ef_log.c │ │ │ ├── ef_log10.c │ │ │ ├── ef_pow.c │ │ │ ├── ef_rem_pio2.c │ │ │ ├── ef_remainder.c │ │ │ ├── ef_scalb.c │ │ │ ├── ef_sinh.c │ │ │ ├── ef_sqrt.c │ │ │ ├── er_gamma.c │ │ │ ├── er_lgamma.c │ │ │ ├── erf_gamma.c │ │ │ ├── erf_lgamma.c │ │ │ ├── k_cos.c │ │ │ ├── k_rem_pio2.c │ │ │ ├── k_sin.c │ │ │ ├── k_standard.c │ │ │ ├── k_tan.c │ │ │ ├── kf_cos.c │ │ │ ├── kf_rem_pio2.c │ │ │ ├── kf_sin.c │ │ │ ├── kf_tan.c │ │ │ ├── math.tex │ │ │ ├── s_asinh.c │ │ │ ├── s_atan.c │ │ │ ├── s_ceil.c │ │ │ ├── s_cos.c │ │ │ ├── s_erf.c │ │ │ ├── s_fabs.c │ │ │ ├── s_floor.c │ │ │ ├── s_frexp.c │ │ │ ├── s_ldexp.c │ │ │ ├── s_signif.c │ │ │ ├── s_sin.c │ │ │ ├── s_tan.c │ │ │ ├── s_tanh.c │ │ │ ├── sf_asinh.c │ │ │ ├── sf_atan.c │ │ │ ├── sf_ceil.c │ │ │ ├── sf_cos.c │ │ │ ├── sf_erf.c │ │ │ ├── sf_fabs.c │ │ │ ├── sf_floor.c │ │ │ ├── sf_frexp.c │ │ │ ├── sf_ldexp.c │ │ │ ├── sf_signif.c │ │ │ ├── sf_sin.c │ │ │ ├── sf_tan.c │ │ │ ├── sf_tanh.c │ │ │ ├── w_acos.c │ │ │ ├── w_acosh.c │ │ │ ├── w_asin.c │ │ │ ├── w_atan2.c │ │ │ ├── w_atanh.c │ │ │ ├── w_cosh.c │ │ │ ├── w_drem.c │ │ │ ├── w_exp.c │ │ │ ├── w_exp2.c │ │ │ ├── w_fmod.c │ │ │ ├── w_gamma.c │ │ │ ├── w_hypot.c │ │ │ ├── w_j0.c │ │ │ ├── w_j1.c │ │ │ ├── w_jn.c │ │ │ ├── w_lgamma.c │ │ │ ├── w_log.c │ │ │ ├── w_log10.c │ │ │ ├── w_pow.c │ │ │ ├── w_remainder.c │ │ │ ├── w_scalb.c │ │ │ ├── w_sincos.c │ │ │ ├── w_sinh.c │ │ │ ├── w_sqrt.c │ │ │ ├── w_tgamma.c │ │ │ ├── wf_acos.c │ │ │ ├── wf_acosh.c │ │ │ ├── wf_asin.c │ │ │ ├── wf_atan2.c │ │ │ ├── wf_atanh.c │ │ │ ├── wf_cosh.c │ │ │ ├── wf_drem.c │ │ │ ├── wf_exp.c │ │ │ ├── wf_exp2.c │ │ │ ├── wf_fmod.c │ │ │ ├── wf_gamma.c │ │ │ ├── wf_hypot.c │ │ │ ├── wf_j0.c │ │ │ ├── wf_j1.c │ │ │ ├── wf_jn.c │ │ │ ├── wf_lgamma.c │ │ │ ├── wf_log.c │ │ │ ├── wf_log10.c │ │ │ ├── wf_pow.c │ │ │ ├── wf_remainder.c │ │ │ ├── wf_scalb.c │ │ │ ├── wf_sincos.c │ │ │ ├── wf_sinh.c │ │ │ ├── wf_sqrt.c │ │ │ ├── wf_tgamma.c │ │ │ ├── wr_gamma.c │ │ │ ├── wr_lgamma.c │ │ │ ├── wrf_gamma.c │ │ │ └── wrf_lgamma.c │ │ │ ├── mathfp │ │ │ ├── README │ │ │ ├── e_acosh.c │ │ │ ├── e_atanh.c │ │ │ ├── e_hypot.c │ │ │ ├── e_j0.c │ │ │ ├── e_j1.c │ │ │ ├── e_remainder.c │ │ │ ├── e_scalb.c │ │ │ ├── ef_acosh.c │ │ │ ├── ef_atanh.c │ │ │ ├── ef_hypot.c │ │ │ ├── ef_j0.c │ │ │ ├── ef_j1.c │ │ │ ├── ef_remainder.c │ │ │ ├── ef_scalb.c │ │ │ ├── er_gamma.c │ │ │ ├── er_lgamma.c │ │ │ ├── erf_gamma.c │ │ │ ├── erf_lgamma.c │ │ │ ├── mathfp.tex │ │ │ ├── s_acos.c │ │ │ ├── s_asin.c │ │ │ ├── s_asine.c │ │ │ ├── s_asinh.c │ │ │ ├── s_atan.c │ │ │ ├── s_atan2.c │ │ │ ├── s_atangent.c │ │ │ ├── s_ceil.c │ │ │ ├── s_cos.c │ │ │ ├── s_cosh.c │ │ │ ├── s_erf.c │ │ │ ├── s_exp.c │ │ │ ├── s_exp2.c │ │ │ ├── s_fabs.c │ │ │ ├── s_floor.c │ │ │ ├── s_fmod.c │ │ │ ├── s_frexp.c │ │ │ ├── s_ispos.c │ │ │ ├── s_ldexp.c │ │ │ ├── s_log.c │ │ │ ├── s_log10.c │ │ │ ├── s_logarithm.c │ │ │ ├── s_mathcnst.c │ │ │ ├── s_numtest.c │ │ │ ├── s_pow.c │ │ │ ├── s_signif.c │ │ │ ├── s_sin.c │ │ │ ├── s_sincos.c │ │ │ ├── s_sine.c │ │ │ ├── s_sineh.c │ │ │ ├── s_sinf.c │ │ │ ├── s_sinh.c │ │ │ ├── s_sqrt.c │ │ │ ├── s_tan.c │ │ │ ├── s_tanh.c │ │ │ ├── s_tgamma.c │ │ │ ├── sf_acos.c │ │ │ ├── sf_asin.c │ │ │ ├── sf_asine.c │ │ │ ├── sf_asinh.c │ │ │ ├── sf_atan.c │ │ │ ├── sf_atan2.c │ │ │ ├── sf_atangent.c │ │ │ ├── sf_ceil.c │ │ │ ├── sf_cos.c │ │ │ ├── sf_cosh.c │ │ │ ├── sf_erf.c │ │ │ ├── sf_exp.c │ │ │ ├── sf_exp2.c │ │ │ ├── sf_fabs.c │ │ │ ├── sf_floor.c │ │ │ ├── sf_fmod.c │ │ │ ├── sf_frexp.c │ │ │ ├── sf_ispos.c │ │ │ ├── sf_ldexp.c │ │ │ ├── sf_log.c │ │ │ ├── sf_log10.c │ │ │ ├── sf_logarithm.c │ │ │ ├── sf_numtest.c │ │ │ ├── sf_pow.c │ │ │ ├── sf_signif.c │ │ │ ├── sf_sin.c │ │ │ ├── sf_sincos.c │ │ │ ├── sf_sine.c │ │ │ ├── sf_sineh.c │ │ │ ├── sf_sinh.c │ │ │ ├── sf_sqrt.c │ │ │ ├── sf_tan.c │ │ │ ├── sf_tanh.c │ │ │ ├── sf_tgamma.c │ │ │ ├── w_cabs.c │ │ │ ├── w_drem.c │ │ │ ├── w_jn.c │ │ │ ├── wf_cabs.c │ │ │ ├── wf_drem.c │ │ │ ├── wf_jn.c │ │ │ └── zmath.h │ │ │ └── test │ │ │ ├── acos_vec.c │ │ │ ├── acosf_vec.c │ │ │ ├── acosh_vec.c │ │ │ ├── acoshf_vec.c │ │ │ ├── asin_vec.c │ │ │ ├── asinf_vec.c │ │ │ ├── asinh_vec.c │ │ │ ├── asinhf_vec.c │ │ │ ├── atan2_vec.c │ │ │ ├── atan2f_vec.c │ │ │ ├── atan_vec.c │ │ │ ├── atanf_vec.c │ │ │ ├── atanh_vec.c │ │ │ ├── atanhf_vec.c │ │ │ ├── ceil_vec.c │ │ │ ├── ceilf_vec.c │ │ │ ├── conv_vec.c │ │ │ ├── convert.c │ │ │ ├── cos_vec.c │ │ │ ├── cosf_vec.c │ │ │ ├── cosh_vec.c │ │ │ ├── coshf_vec.c │ │ │ ├── dcvt.c │ │ │ ├── dvec.c │ │ │ ├── erf_vec.c │ │ │ ├── erfc_vec.c │ │ │ ├── erfcf_vec.c │ │ │ ├── erff_vec.c │ │ │ ├── exp_vec.c │ │ │ ├── expf_vec.c │ │ │ ├── fabs_vec.c │ │ │ ├── fabsf_vec.c │ │ │ ├── floor_vec.c │ │ │ ├── floorf_vec.c │ │ │ ├── fmod_vec.c │ │ │ ├── fmodf_vec.c │ │ │ ├── gamma_vec.c │ │ │ ├── gammaf_vec.c │ │ │ ├── hypot_vec.c │ │ │ ├── hypotf_vec.c │ │ │ ├── iconv_vec.c │ │ │ ├── j0_vec.c │ │ │ ├── j0f_vec.c │ │ │ ├── j1_vec.c │ │ │ ├── j1f_vec.c │ │ │ ├── jn_vec.c │ │ │ ├── jnf_vec.c │ │ │ ├── log10_vec.c │ │ │ ├── log10f_vec.c │ │ │ ├── log1p_vec.c │ │ │ ├── log1pf_vec.c │ │ │ ├── log2_vec.c │ │ │ ├── log2f_vec.c │ │ │ ├── log_vec.c │ │ │ ├── logf_vec.c │ │ │ ├── math.c │ │ │ ├── math2.c │ │ │ ├── sin_vec.c │ │ │ ├── sinf_vec.c │ │ │ ├── sinh_vec.c │ │ │ ├── sinhf_vec.c │ │ │ ├── sprint_ivec.c │ │ │ ├── sprint_vec.c │ │ │ ├── sqrt_vec.c │ │ │ ├── sqrtf_vec.c │ │ │ ├── string.c │ │ │ ├── tan_vec.c │ │ │ ├── tanf_vec.c │ │ │ ├── tanh_vec.c │ │ │ ├── tanhf_vec.c │ │ │ ├── test.c │ │ │ ├── test.h │ │ │ ├── test_ieee.c │ │ │ ├── test_is.c │ │ │ ├── y0_vec.c │ │ │ ├── y0f_vec.c │ │ │ ├── y1_vec.c │ │ │ ├── y1f_vec.c │ │ │ ├── yn_vec.c │ │ │ └── ynf_vec.c │ ├── registry │ │ ├── Makefile │ │ ├── main.cpp │ │ ├── regapi.cpp │ │ └── regutil.cpp │ ├── resc │ │ ├── Makefile │ │ ├── elf.cpp │ │ ├── elf.hpp │ │ ├── main.cpp │ │ ├── resc.cpp │ │ ├── resc │ │ │ ├── file2.txt │ │ │ ├── somefile.txt │ │ │ └── test.txt │ │ ├── tar.cpp │ │ ├── tar.hpp │ │ ├── virt_handles.cpp │ │ └── virt_handles.hpp │ ├── shell │ │ ├── Makefile │ │ ├── fileopendialog.cpp │ │ ├── filesavedialog.cpp │ │ ├── folderdetailsview.cpp │ │ ├── foldericonview.cpp │ │ ├── folderselectdialog.cpp │ │ ├── foldertreeview.cpp │ │ ├── icons.cpp │ │ ├── icons.inf │ │ ├── libresc.mk │ │ ├── libresc │ │ │ └── icons.inf │ │ ├── main.cpp │ │ ├── resc │ │ │ ├── app.inf │ │ │ ├── icon_16.png │ │ │ ├── icon_32.png │ │ │ └── icons.inf │ │ ├── shell_internal.hpp │ │ └── utils.cpp │ └── sm │ │ ├── Makefile │ │ ├── main.cpp │ │ ├── protocol.cpp │ │ ├── services.cpp │ │ ├── sessionentries.cpp │ │ ├── sessions.cpp │ │ └── to_string.hpp │ ├── system │ ├── Makefile │ ├── clipboard │ │ ├── Makefile │ │ ├── app.inf │ │ ├── clipboard.cpp │ │ ├── icons.inf │ │ ├── resc.mk │ │ └── service.ini │ ├── dm │ │ ├── Makefile │ │ └── main.cpp │ ├── eloader │ │ ├── Makefile │ │ ├── api.cpp │ │ ├── el_load_elf.cpp │ │ ├── el_load_elf.hpp │ │ ├── el_malloc.cpp │ │ ├── el_malloc.hpp │ │ ├── elf.cpp │ │ ├── elf.hpp │ │ ├── eloader.cpp │ │ ├── liballoc.c │ │ ├── liballoc.h │ │ ├── libpath.cpp │ │ ├── libpath.hpp │ │ ├── linker.ld │ │ ├── util.cpp │ │ └── util.hpp │ ├── gds │ │ ├── Makefile │ │ ├── bitmap_surface.cpp │ │ ├── bitmap_surface.hpp │ │ ├── client.cpp │ │ ├── client.hpp │ │ ├── cursor.c │ │ ├── drawingop.cpp │ │ ├── drawingop.hpp │ │ ├── fonts.cpp │ │ ├── fonts.hpp │ │ ├── fonts │ │ │ ├── DejaVuMathTeXGyre.ttf │ │ │ ├── DejaVuSans-Bold.ttf │ │ │ ├── DejaVuSans-BoldOblique.ttf │ │ │ ├── DejaVuSans-ExtraLight.ttf │ │ │ ├── DejaVuSans-Oblique.ttf │ │ │ ├── DejaVuSans.ttf │ │ │ ├── DejaVuSansCondensed-Bold.ttf │ │ │ ├── DejaVuSansCondensed-BoldOblique.ttf │ │ │ ├── DejaVuSansCondensed-Oblique.ttf │ │ │ ├── DejaVuSansCondensed.ttf │ │ │ ├── DejaVuSansMono-Bold.ttf │ │ │ ├── DejaVuSansMono-BoldOblique.ttf │ │ │ ├── DejaVuSansMono-Oblique.ttf │ │ │ ├── DejaVuSansMono.ttf │ │ │ ├── DejaVuSerif-Bold.ttf │ │ │ ├── DejaVuSerif-BoldItalic.ttf │ │ │ ├── DejaVuSerif-Italic.ttf │ │ │ ├── DejaVuSerif.ttf │ │ │ ├── DejaVuSerifCondensed-Bold.ttf │ │ │ ├── DejaVuSerifCondensed-BoldItalic.ttf │ │ │ ├── DejaVuSerifCondensed-Italic.ttf │ │ │ ├── DejaVuSerifCondensed.ttf │ │ │ ├── Gputeks-Bold.ttf │ │ │ ├── Gputeks-Regular.ttf │ │ │ ├── Resagnicto.ttf │ │ │ ├── ResagnictoBold.ttf │ │ │ ├── ResagnictoItalic.ttf │ │ │ ├── Resagokr.otf │ │ │ ├── ResagokrBold.otf │ │ │ ├── ResagokrLight.otf │ │ │ ├── ResamitzBold_0048.ttf │ │ │ ├── ResamitzItalic_0048.ttf │ │ │ ├── Resamitz_0048.ttf │ │ │ └── unscii-16.ttf │ │ ├── gd │ │ │ ├── gd.c │ │ │ ├── gd.h │ │ │ ├── gd_color.c │ │ │ ├── gd_color.h │ │ │ ├── gd_color_map.c │ │ │ ├── gd_color_map.h │ │ │ ├── gd_color_match.c │ │ │ ├── gd_crop.c │ │ │ ├── gd_errors.h │ │ │ ├── gd_filter.c │ │ │ ├── gd_intern.h │ │ │ ├── gd_interpolation.c │ │ │ ├── gd_matrix.c │ │ │ ├── gd_nnquant.c │ │ │ ├── gd_nnquant.h │ │ │ ├── gd_rotate.c │ │ │ ├── gd_security.c │ │ │ ├── gd_ss.c │ │ │ ├── gd_topal.c │ │ │ ├── gd_transform.c │ │ │ ├── gdcache.c │ │ │ ├── gdcache.h │ │ │ ├── gdfontg.c │ │ │ ├── gdfontg.h │ │ │ ├── gdfontl.c │ │ │ ├── gdfontl.h │ │ │ ├── gdfontmb.c │ │ │ ├── gdfontmb.h │ │ │ ├── gdfonts.c │ │ │ ├── gdfonts.h │ │ │ ├── gdfontt.c │ │ │ ├── gdfontt.h │ │ │ ├── gdft.c │ │ │ ├── gdfx.c │ │ │ ├── gdfx.h │ │ │ ├── gdhelpers.c │ │ │ ├── gdhelpers.h │ │ │ ├── gdpp.h │ │ │ └── gdtables.c │ │ ├── gds.cpp │ │ ├── gds.hpp │ │ ├── graphics.cpp │ │ ├── graphics.hpp │ │ ├── screen.cpp │ │ ├── screen.hpp │ │ ├── shm_surface.cpp │ │ ├── shm_surface.hpp │ │ ├── surface.hpp │ │ ├── vector_surface.cpp │ │ └── vector_surface.hpp │ ├── registry │ │ ├── Makefile │ │ ├── api.cpp │ │ ├── api_types.hpp │ │ ├── registry.cpp │ │ ├── registry.hpp │ │ └── tables.hpp │ ├── sm │ │ ├── Makefile │ │ ├── main.cpp │ │ ├── serviceresolver.cpp │ │ ├── serviceresolver.hpp │ │ └── sessions │ │ │ ├── cmd.ini │ │ │ ├── debug.ini │ │ │ ├── services │ │ │ ├── gds.ini │ │ │ └── wm.ini │ │ │ └── wmmenu.ini │ ├── spawn │ │ ├── Makefile │ │ └── spawn.c │ ├── switcher │ │ ├── Makefile │ │ ├── menu.cpp │ │ ├── menu.hpp │ │ ├── switcher.cpp │ │ ├── switcher.hpp │ │ ├── switcherapp.cpp │ │ ├── switcherapp.hpp │ │ └── utils.cpp │ └── wm │ │ ├── Makefile │ │ ├── client.cpp │ │ ├── client.hpp │ │ ├── config.cpp │ │ ├── config.hpp │ │ ├── drawing.cpp │ │ ├── drawing.hpp │ │ ├── ini.cpp │ │ ├── ini.hpp │ │ ├── menus.cpp │ │ ├── menus.hpp │ │ ├── metrics.cpp │ │ ├── metrics.hpp │ │ ├── rect.cpp │ │ ├── rect.hpp │ │ ├── service.cpp │ │ ├── service.hpp │ │ ├── window.cpp │ │ ├── window.hpp │ │ ├── windows.cpp │ │ ├── windows.hpp │ │ ├── wm.cpp │ │ └── wm.ini │ ├── tests │ ├── Makefile │ ├── cltzbench │ │ ├── Makefile │ │ └── cltzbench.c │ ├── cpptest │ │ ├── Makefile │ │ └── cpptest.cpp │ ├── crash │ │ ├── Makefile │ │ └── crash.c │ ├── ctest │ │ ├── Makefile │ │ └── ctest.c │ ├── elltest │ │ ├── Makefile │ │ ├── elltest.c │ │ ├── testlib.c │ │ ├── testlib.cpp │ │ └── testlib.h │ ├── fputest │ │ ├── Makefile │ │ └── fputest.c │ ├── mousetest │ │ ├── Makefile │ │ └── mousetest.c │ ├── msgtest │ │ ├── Makefile │ │ └── msgtest.cpp │ ├── nctest │ │ ├── Makefile │ │ └── nctest.cpp │ ├── pthreadtest │ │ ├── Makefile │ │ └── pthreadtest.c │ ├── scratch │ │ ├── Makefile │ │ ├── scratch.cpp │ │ ├── tar.cpp │ │ └── tar.hpp │ ├── sdltest │ │ ├── Makefile │ │ ├── sdltest.c │ │ └── testpng.png │ ├── shmtest │ │ ├── Makefile │ │ └── shmtest.c │ ├── test │ │ ├── Makefile │ │ ├── linker.ld │ │ └── test.c │ └── vgatest │ │ ├── Makefile │ │ ├── pointer_bmps.c │ │ ├── pointers.cpp │ │ ├── pointers.hpp │ │ └── vgatest.cpp │ └── wmapps │ ├── Makefile │ ├── appview │ ├── Makefile │ ├── app.inf │ ├── apps.cpp │ ├── appview.cpp │ ├── appview.hpp │ ├── icons.inf │ ├── resc.cpp │ └── resc.mk │ ├── breakout │ ├── Makefile │ ├── ball.cpp │ ├── ball.hpp │ ├── block.cpp │ ├── block.hpp │ ├── breakout.cpp │ ├── game.cpp │ ├── game.hpp │ ├── paddle.cpp │ ├── paddle.hpp │ └── sprite.hpp │ ├── calc │ ├── Makefile │ ├── app.inf │ ├── calc.cpp │ ├── calc.hpp │ ├── icalcmode.hpp │ ├── icons.inf │ ├── progmode.cpp │ ├── progmode.hpp │ ├── scimode.cpp │ ├── scimode.hpp │ ├── stdmode.cpp │ └── stdmode.hpp │ ├── elxrun │ ├── Makefile │ ├── app.inf │ ├── elxrun.cpp │ ├── icons.inf │ └── resc.mk │ ├── folder │ ├── Makefile │ ├── app.inf │ ├── folder.cpp │ ├── folder.hpp │ ├── icons.inf │ ├── resc.cpp │ ├── resc.mk │ └── util.cpp │ ├── launcher │ ├── Makefile │ ├── app.inf │ ├── icons.inf │ ├── launcher.cpp │ ├── resc.mk │ ├── run.cpp │ ├── run.hpp │ └── session.ini │ ├── notepad │ ├── Makefile │ ├── app.inf │ ├── icons.inf │ ├── notepad.cpp │ ├── notepad.hpp │ ├── resc.cpp │ └── resc.mk │ ├── protoclock │ ├── Makefile │ └── protoclock.cpp │ ├── prototask │ ├── Makefile │ └── prototask.cpp │ ├── prototext │ ├── Makefile │ └── prototext.cpp │ ├── termwin │ ├── Makefile │ ├── app.inf │ ├── icons.inf │ ├── lrucache.hpp │ ├── resc.mk │ └── termwin.cpp │ └── wmmenu │ ├── Makefile │ └── wmmenu.cpp └── tools └── tools.sh /.vscode/vscode-fix.h: -------------------------------------------------------------------------------- 1 | #undef __linux__ 2 | #undef __x86_64__ 3 | #undef __STRICT_ANSI__ 4 | 5 | #define __btos__ 6 | 7 | #define VSCODE 8 | 9 | #ifdef __INTELLISENSE__ 10 | #pragma diag_suppress 384 11 | #endif -------------------------------------------------------------------------------- /docs/BTOSUserspaceAPI.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/docs/BTOSUserspaceAPI.odt -------------------------------------------------------------------------------- /docs/Grub.txt: -------------------------------------------------------------------------------- 1 | grubmkim -O i386-pc -d i386-pc --prefix=/boot -o core.img biosdisk msdospart part_msdos fat multiboot 2 | grubbios -d /boot dev:/ata0 3 | -------------------------------------------------------------------------------- /docs/Plug and Play.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/docs/Plug and Play.doc -------------------------------------------------------------------------------- /other/art/BTOS-Logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/BTOS-Logo-small.png -------------------------------------------------------------------------------- /other/art/BTOS-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/BTOS-Logo.png -------------------------------------------------------------------------------- /other/art/BTOS-Logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/BTOS-Logo.xcf -------------------------------------------------------------------------------- /other/art/BTOS-bootscreen-mono.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/BTOS-bootscreen-mono.xcf -------------------------------------------------------------------------------- /other/art/BTOS-lowcolour-logoscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/BTOS-lowcolour-logoscreen.png -------------------------------------------------------------------------------- /other/art/grub.pf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/grub.pf2 -------------------------------------------------------------------------------- /other/art/splash.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/other/art/splash.tga -------------------------------------------------------------------------------- /src/3rdparty/3rdparty.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | case "$1" in 4 | stage1) 5 | run=1 6 | ;; 7 | 8 | stage2) 9 | run=2 10 | ;; 11 | 12 | *) 13 | run=12 14 | ;; 15 | esac 16 | 17 | source ../env-os.sh 18 | 19 | case "$run" in 20 | *1*) 21 | ./libiconv.sh && 22 | ./freetype.sh && 23 | ./libgd.sh && 24 | ./libuuid.sh && 25 | ./libelf.sh && 26 | ./grub.sh && 27 | ./parted.sh && 28 | ./udis86.sh && 29 | ./ncurses.sh && 30 | ./sqlite3.sh 31 | ;; 32 | esac 33 | 34 | case "$run" in 35 | *2*) 36 | ./sdl.sh && 37 | ./sdlwidgets.sh 38 | ;; 39 | esac 40 | 41 | -------------------------------------------------------------------------------- /src/3rdparty/freetype.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf freetype-2.7.1 4 | if [ ! -f freetype-2.7.1.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/freetype-2.7.1.tar.gz 7 | fi 8 | tar xf freetype-2.7.1.tar.gz 9 | mkdir -p originals 10 | tar xf freetype-2.7.1.tar.gz -C originals 11 | 12 | cd freetype-2.7.1 13 | patch -p1 -R < ../freetype/freetype.patch 14 | cp ../freetype/btos-build.sh . 15 | chmod +x btos-build.sh 16 | mkdir -p install 17 | ./btos-build.sh 18 | -------------------------------------------------------------------------------- /src/3rdparty/grub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf grub-2.00 4 | if [ ! -f grub-2.00.tar.xz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/grub-2.00.tar.xz 7 | fi 8 | tar xf grub-2.00.tar.xz 9 | mkdir -p originals 10 | tar xf grub-2.00.tar.xz -C originals 11 | 12 | mkdir -p install 13 | cd grub-2.00 14 | patch -p1 -R < ../grub/grub.patch 15 | cp ../grub/btos-build.sh . 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/3rdparty/libelf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf libelf-0.8.13 4 | if [ ! -f libelf-0.8.13.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/libelf-0.8.13.tar.gz 7 | fi 8 | tar xf libelf-0.8.13.tar.gz 9 | mkdir -p originals 10 | tar xf libelf-0.8.13.tar.gz -C originals 11 | 12 | cd libelf-0.8.13 13 | patch -p1 -R < ../libelf/libelf.patch 14 | cp ../libelf/btos-build.sh . 15 | mkdir -p install 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/3rdparty/libgd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../env-os.sh 4 | 5 | rm -rf libgd-2.1.0 6 | if [ ! -f libgd-2.1.0.tar.gz ]; 7 | then 8 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/libgd-2.1.0.tar.gz 9 | fi 10 | tar xf libgd-2.1.0.tar.gz 11 | mkdir -p originals 12 | tar xf libgd-2.1.0.tar.gz -C originals 13 | 14 | cd libgd-2.1.0 15 | patch -p1 -R < ../libgd/libgd.patch 16 | cp -p ../libgd/btos-build.sh . 17 | mkdir -p install 18 | ./btos-build.sh 19 | -------------------------------------------------------------------------------- /src/3rdparty/libiconv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf libiconv-1.14 4 | if [ ! -f libiconv-1.14.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/libiconv-1.14.tar.gz 7 | fi 8 | tar xf libiconv-1.14.tar.gz 9 | mkdir -p originals 10 | tar xf libiconv-1.14.tar.gz -C originals 11 | 12 | cd libiconv-1.14 13 | patch -p1 -R < ../libiconv/libiconv.patch 14 | cp ../libiconv/btos-build.sh . 15 | mkdir -p install 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/3rdparty/libuuid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf libuuid-1.0.3 4 | if [ ! -f libuuid-1.0.3.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/libuuid-1.0.3.tar.gz 7 | fi 8 | tar xf libuuid-1.0.3.tar.gz 9 | mkdir -p originals 10 | tar xf libuuid-1.0.3.tar.gz -C originals 11 | 12 | cd libuuid-1.0.3 13 | patch -p1 -R < ../libuuid/libuuid.patch 14 | cp ../libuuid/btos-build.sh . 15 | mkdir -p install 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/3rdparty/ncurses.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf ncurses-6.0 4 | if [ ! -f ncurses-6.0.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/ncurses-6.0.tar.gz 7 | fi 8 | tar xf ncurses-6.0.tar.gz 9 | mkdir -p originals 10 | tar xf ncurses-6.0.tar.gz -C originals 11 | 12 | cd ncurses-6.0 13 | patch -p1 -R < ../ncurses/ncurses.patch 14 | cp ../ncurses/btos-build.sh . 15 | chmod +x btos-build.sh 16 | mkdir -p install 17 | ./btos-build.sh 18 | -------------------------------------------------------------------------------- /src/3rdparty/parted.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf parted-3.2 4 | if [ ! -f parted-3.2.tar.xz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/parted-3.2.tar.xz 7 | fi 8 | tar xf parted-3.2.tar.xz 9 | mkdir -p originals 10 | tar xf parted-3.2.tar.xz -C originals 11 | 12 | cd parted-3.2 13 | patch -p1 -R < ../parted/parted.patch 14 | cp ../parted/btos-build.sh . 15 | mkdir -p install 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/3rdparty/sdl/backup.sh: -------------------------------------------------------------------------------- 1 | cd "${BASH_SOURCE%/*}" || exit 2 | 3 | mkdir -p src/video/btos 4 | cp -Rv ../SDL2-2.0.7/src/video/btos/*.c src/video/btos 5 | cp -Rv ../SDL2-2.0.7/src/video/btos/*.h src/video/btos 6 | cp -Rv ../SDL2-2.0.7/src/timer/btos/*.c src/timer/btos 7 | cp -Rv ../SDL2-2.0.7/src/timer/btos/*.h src/timer/btos 8 | cp ../SDL2-2.0.7/src/dynapi/SDL_dynapi.h . 9 | cp ../SDL2-2.0.7/src/video/SDL_video.c . 10 | cp ../SDL2-2.0.7/src/video/SDL_sysvideo.h . 11 | cp -Rv ../SDL2-2.0.7/Makefile . 12 | cp -Rv ../SDL2-2.0.7/include/SDL_config.h . 13 | cp -Rv ../SDL2-2.0.7/include/SDL_config_btos.h . 14 | -------------------------------------------------------------------------------- /src/3rdparty/sdl/btos-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../../env-os.sh 4 | 5 | # architecture prefix 6 | ARCH="i686-pc-btos" 7 | 8 | # cumulative toolchain prefix 9 | PREFIX=/btos 10 | 11 | export CC=$ARCH-gcc 12 | export CXX=$ARCH-g++ 13 | export LD=$ARCH-ld 14 | export NM="$ARCH-nm -B" 15 | export AR=$ARCH-ar 16 | export RANLIB=$ARCH-ranlib 17 | export STRIP=$ARCH-strip 18 | export OBJCOPY=$ARCH-objcopy 19 | export LN_S="ln -s" 20 | 21 | export CFLAGS="-g -O2" 22 | export CPPFLAGS="" 23 | export CXXFLAGS="" 24 | 25 | export LDFLAGS="" 26 | 27 | PATH=$BASE_PATH/bin:$PATH 28 | make 29 | -------------------------------------------------------------------------------- /src/3rdparty/sdl/image_include/tiffvers.h: -------------------------------------------------------------------------------- 1 | #define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.8\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." 2 | /* 3 | * This define can be used in code that requires 4 | * compilation-related definitions specific to a 5 | * version or versions of the library. Runtime 6 | * version checking should be done based on the 7 | * string returned by TIFFGetVersion. 8 | */ 9 | #define TIFFLIB_VERSION 20170521 10 | -------------------------------------------------------------------------------- /src/3rdparty/sdlwidgets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf SDL2-widgets-2.1 4 | if [ ! -f SDL2-widgets-2.1.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/SDL2-widgets-2.1.tar.gz 7 | fi 8 | tar xf SDL2-widgets-2.1.tar.gz 9 | mkdir -p originals 10 | tar xf SDL2-widgets-2.1.tar.gz -C originals 11 | 12 | cd SDL2-widgets-2.1 13 | patch -p1 -R < ../sdlwidgets/sdlwidgets.patch 14 | make 15 | 16 | cp SDL2_widgets.ell ../install/btos/lib 17 | cp sdl-widgets.h ../install/btos/include/SDL2_widgets.h 18 | cp shapes.h ../install/btos/include 19 | -------------------------------------------------------------------------------- /src/3rdparty/sqlite3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf sqlite-amalgamation-3200100 4 | if [ ! -f sqlite-amalgamation-3200100.zip ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/sqlite-amalgamation-3200100.zip 7 | fi 8 | 9 | unzip sqlite-amalgamation-3200100.zip 10 | mkdir -p originals 11 | unzip -o sqlite-amalgamation-3200100.zip -d originals 12 | 13 | cd sqlite-amalgamation-3200100 14 | patch -p1 -R < ../sqlite3/sqlite3.c.patch 15 | cp ../sqlite3/btos-build.sh . 16 | cp ../sqlite3/config.h . 17 | cp ../sqlite3/sqlitepp.hpp . 18 | ./btos-build.sh 19 | -------------------------------------------------------------------------------- /src/3rdparty/sqlite3/btos-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../../env-os.sh 4 | 5 | i686-pc-btos-gcc -shared -o sqlite3.ell sqlite3.c -D_HAVE_SQLITE_CONFIG_H -I../../include 6 | i686-pc-btos-gcc -o sqlite.elx -L. -lsqlite3 shell.c -include config.h -I../../include 7 | 8 | cp sqlite3.ell ../install/btos/lib 9 | cp sqlite.elx ../install/btos/bin 10 | cp sqlite3.h ../install/btos/include 11 | cp sqlitepp.hpp ../install/btos/include 12 | -------------------------------------------------------------------------------- /src/3rdparty/sqlite3/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _SQLITE_CONFIG_H 2 | #define _SQLITE_CONFIG_H 3 | 4 | #define SQLITE_THREADSAFE 1 5 | #define SQLITE_OMIT_WAL 1 6 | #define SQLITE_OMIT_LOAD_EXTENSION 1 7 | #define SQLITE_OMIT_POPEN 1 8 | 9 | #define getrusage(A,B) memset(B,0,sizeof(*B)) 10 | 11 | #endif -------------------------------------------------------------------------------- /src/3rdparty/udis86.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf grub-2.00 4 | if [ ! -f udis86-1.7.2.tar.gz ]; 5 | then 6 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/udis86-1.7.2.tar.gz 7 | fi 8 | tar xf udis86-1.7.2.tar.gz 9 | mkdir -p originals 10 | tar xf udis86-1.7.2.tar.gz -C originals 11 | 12 | mkdir -p install 13 | cd udis86-1.7.2 14 | patch -p1 -R < ../udis86/udis86.patch 15 | cp ../udis86/btos-build.sh . 16 | ./btos-build.sh 17 | -------------------------------------------------------------------------------- /src/backup-toolchain.sh: -------------------------------------------------------------------------------- 1 | find . -name \*.original | sed 's/.original//g' | xargs -I{} cp -v --parents {} toolchain 2 | find binutils-2.23 -name \*btos\* | xargs -I {} cp -v --parents {} toolchain 3 | find gcc-4.8.1 -name \*btos\* | xargs -I {} cp -v --parents {} toolchain 4 | find newlib-2.1.0/newlib/libc/sys/btos/ -maxdepth 1 -type f | xargs -I {} cp -v --parents {} toolchain 5 | -------------------------------------------------------------------------------- /src/build/functions.bk: -------------------------------------------------------------------------------- 1 | def merge(vectors){ 2 | var ret = Vector(); 3 | for(v: vectors){ 4 | for(e: v){ 5 | if(!ret.contains(e)){ 6 | ret.push_back(e); 7 | } 8 | } 9 | } 10 | return ret; 11 | } 12 | 13 | def addIfNeeded(name, vector){ 14 | if(!vector.contains(name)){ 15 | vector.push_back(name); 16 | } 17 | return vector; 18 | } 19 | 20 | def ensureFirst(name, vector){ 21 | var ret = [name]; 22 | for(v : vector){ 23 | if(v != name){ 24 | ret.push_back(v); 25 | } 26 | } 27 | return ret; 28 | } -------------------------------------------------------------------------------- /src/colourmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | source $DIR/env-os.sh 5 | 6 | make ${@} 2>&1 | perl -wln -M'Term::ANSIColor' -e ' 7 | m/Building|gcc|g\+\+|\bCC\b|\bcc\b/ and print "\e[1;32m", "$_", "\e[0m" 8 | or 9 | m/error|No rule/i and print "\e[1;91m", "$_", "\e[0m" 10 | or 11 | m/warning/i and print "\e[1;93m", "$_", "\e[0m" 12 | or 13 | m/linking|cp|\.ld|\.elx|\.ell|\.a\b/ and print "\e[1;36m", "$_", "\e[0m" 14 | or 15 | print; ' 16 | 17 | -------------------------------------------------------------------------------- /src/disk/btos.img.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/disk/btos.img.gz -------------------------------------------------------------------------------- /src/disk/check.sh: -------------------------------------------------------------------------------- 1 | sudo losetup /dev/loop0 btos.img 2 | sudo partprobe /dev/loop0 3 | sudo fsck.msdos /dev/loop0p1 4 | sudo losetup -d /dev/loop0 5 | -------------------------------------------------------------------------------- /src/disk/diskfiles/autoexec.cmd: -------------------------------------------------------------------------------- 1 | out echo "Clearing data..." 2 | rm hdd:/tests/* 3 | rm hdd:/pgui/* 4 | rm hdd:/gui/* 5 | out echo "Installing packages..." 6 | out package install hdd:/tests.pkf hdd:/tests 7 | out package install hdd:/protogui.pkf hdd:/pgui 8 | out package install hdd:/gui.pkf hdd:/gui 9 | out echo "Done". 10 | out termctl pointer-speed set 3000000 11 | -------------------------------------------------------------------------------- /src/disk/diskfiles/init.cmd: -------------------------------------------------------------------------------- 1 | out echo "Initializing registry..." 2 | package import hdd:/package.inf hdd:/btos 3 | out echo "Done." -------------------------------------------------------------------------------- /src/env-os.sh: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/Projects/os/cross" 2 | export TARGET=i686-pc-btos 3 | export PATH="$PREFIX/bin:$PATH" 4 | export PROJECTPATH="$HOME/Projects/os" 5 | -------------------------------------------------------------------------------- /src/gdbkernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | gdb -q kernel/btos.bin -ex "source kstat.py" -ex "target remote localhost:1234" 3 | 4 | -------------------------------------------------------------------------------- /src/gdbkernel2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | gdb kernel/btos.bin -ex "source kstat.py" -ex "target remote 192.168.99.1:1234" 3 | 4 | -------------------------------------------------------------------------------- /src/gdbprof.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | nsamples=1000 3 | sleeptime=0 4 | pid=$(pidof mysqld) 5 | 6 | for x in $(seq 1 $nsamples) 7 | do 8 | gdb -ex "set pagination 0" -ex "target remote localhost:1234" -ex "thread apply all bt" -batch 2>/dev/null 9 | sleep $sleeptime 10 | done | \ 11 | awk ' 12 | BEGIN { s = ""; } 13 | /^Thread/ { print s; s = ""; } 14 | /^\#/ { if (s != "" ) { s = s "," $2} else { s = $2 } } 15 | END { print s }' | \ 16 | awk -F, '{print $1}' | \ 17 | sort | uniq -c | sort -r -n -k 1,1 18 | -------------------------------------------------------------------------------- /src/icons/16/actions/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/back.png -------------------------------------------------------------------------------- /src/icons/16/actions/calc_programmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/calc_programmer.png -------------------------------------------------------------------------------- /src/icons/16/actions/calc_scientific.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/calc_scientific.png -------------------------------------------------------------------------------- /src/icons/16/actions/calc_standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/calc_standard.png -------------------------------------------------------------------------------- /src/icons/16/actions/editcopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/editcopy.png -------------------------------------------------------------------------------- /src/icons/16/actions/editcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/editcut.png -------------------------------------------------------------------------------- /src/icons/16/actions/editdelete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/editdelete.png -------------------------------------------------------------------------------- /src/icons/16/actions/editpaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/editpaste.png -------------------------------------------------------------------------------- /src/icons/16/actions/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/error.png -------------------------------------------------------------------------------- /src/icons/16/actions/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/exit.png -------------------------------------------------------------------------------- /src/icons/16/actions/filenew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/filenew.png -------------------------------------------------------------------------------- /src/icons/16/actions/fileopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/fileopen.png -------------------------------------------------------------------------------- /src/icons/16/actions/filesave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/filesave.png -------------------------------------------------------------------------------- /src/icons/16/actions/filesaveas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/filesaveas.png -------------------------------------------------------------------------------- /src/icons/16/actions/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/forward.png -------------------------------------------------------------------------------- /src/icons/16/actions/goto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/goto.png -------------------------------------------------------------------------------- /src/icons/16/actions/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/home.png -------------------------------------------------------------------------------- /src/icons/16/actions/new_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/new_folder.png -------------------------------------------------------------------------------- /src/icons/16/actions/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/run.png -------------------------------------------------------------------------------- /src/icons/16/actions/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/up.png -------------------------------------------------------------------------------- /src/icons/16/actions/view_detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/view_detailed.png -------------------------------------------------------------------------------- /src/icons/16/actions/view_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/view_icon.png -------------------------------------------------------------------------------- /src/icons/16/actions/view_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/view_tree.png -------------------------------------------------------------------------------- /src/icons/16/actions/window_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/actions/window_new.png -------------------------------------------------------------------------------- /src/icons/16/apps/appview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/appview.png -------------------------------------------------------------------------------- /src/icons/16/apps/calc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/calc.png -------------------------------------------------------------------------------- /src/icons/16/apps/clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/clipboard.png -------------------------------------------------------------------------------- /src/icons/16/apps/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/default.png -------------------------------------------------------------------------------- /src/icons/16/apps/elxrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/elxrun.png -------------------------------------------------------------------------------- /src/icons/16/apps/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/folder.png -------------------------------------------------------------------------------- /src/icons/16/apps/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/launcher.png -------------------------------------------------------------------------------- /src/icons/16/apps/notepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/notepad.png -------------------------------------------------------------------------------- /src/icons/16/apps/termwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/apps/termwin.png -------------------------------------------------------------------------------- /src/icons/16/fs/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/computer.png -------------------------------------------------------------------------------- /src/icons/16/fs/device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/device.png -------------------------------------------------------------------------------- /src/icons/16/fs/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/file.png -------------------------------------------------------------------------------- /src/icons/16/fs/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/folder.png -------------------------------------------------------------------------------- /src/icons/16/fs/folder_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/folder_open.png -------------------------------------------------------------------------------- /src/icons/16/fs/hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/hdd.png -------------------------------------------------------------------------------- /src/icons/16/fs/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/script.png -------------------------------------------------------------------------------- /src/icons/16/fs/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/source.png -------------------------------------------------------------------------------- /src/icons/16/fs/txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/fs/txt.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_config.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_games.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_games.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_graphics.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_media.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_net.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_office.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_tests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_tests.png -------------------------------------------------------------------------------- /src/icons/16/objects/cat_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/cat_tools.png -------------------------------------------------------------------------------- /src/icons/16/objects/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/16/objects/category.png -------------------------------------------------------------------------------- /src/icons/32/actions/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/actions/error.png -------------------------------------------------------------------------------- /src/icons/32/actions/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/actions/question.png -------------------------------------------------------------------------------- /src/icons/32/actions/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/actions/run.png -------------------------------------------------------------------------------- /src/icons/32/apps/appview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/appview.png -------------------------------------------------------------------------------- /src/icons/32/apps/calc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/calc.png -------------------------------------------------------------------------------- /src/icons/32/apps/clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/clipboard.png -------------------------------------------------------------------------------- /src/icons/32/apps/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/default.png -------------------------------------------------------------------------------- /src/icons/32/apps/elxrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/elxrun.png -------------------------------------------------------------------------------- /src/icons/32/apps/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/folder.png -------------------------------------------------------------------------------- /src/icons/32/apps/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/launcher.png -------------------------------------------------------------------------------- /src/icons/32/apps/notepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/notepad.png -------------------------------------------------------------------------------- /src/icons/32/apps/termwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/apps/termwin.png -------------------------------------------------------------------------------- /src/icons/32/fs/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/computer.png -------------------------------------------------------------------------------- /src/icons/32/fs/device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/device.png -------------------------------------------------------------------------------- /src/icons/32/fs/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/file.png -------------------------------------------------------------------------------- /src/icons/32/fs/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/folder.png -------------------------------------------------------------------------------- /src/icons/32/fs/folder_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/folder_open.png -------------------------------------------------------------------------------- /src/icons/32/fs/hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/hdd.png -------------------------------------------------------------------------------- /src/icons/32/fs/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/script.png -------------------------------------------------------------------------------- /src/icons/32/fs/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/source.png -------------------------------------------------------------------------------- /src/icons/32/fs/txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/fs/txt.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_config.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_games.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_games.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_graphics.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_media.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_net.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_office.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_tests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_tests.png -------------------------------------------------------------------------------- /src/icons/32/objects/cat_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/cat_tools.png -------------------------------------------------------------------------------- /src/icons/32/objects/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/icons/32/objects/category.png -------------------------------------------------------------------------------- /src/include/btos.h: -------------------------------------------------------------------------------- 1 | #ifndef _BTOS_H 2 | #define _BTOS_H 3 | 4 | #include "btos/btos_api.h" 5 | #include "btos/bt_msg.h" 6 | #include "btos/fs_interface.h" 7 | #include "btos/ioctl.h" 8 | #include "btos/kernel_calls.h" 9 | #ifndef BTOS_NO_DEVICES 10 | #include "btos/devices.h" 11 | #endif 12 | #include "btos/core.h" 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/include/btos/core.h: -------------------------------------------------------------------------------- 1 | #ifndef _CORE_H 2 | #define _CORE_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | namespace btos_api{ 8 | #endif 9 | 10 | EXTERN_C bt_threadhandle btos_create_thread(void (*entry)(void*), void *param, size_t stack_size); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif -------------------------------------------------------------------------------- /src/include/btos/envvars.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _ENVVARS_HPP 2 | #define _ENVVARS_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace btos_api{ 8 | 9 | std::string GetEnv(const std::string &var); 10 | void SetEnv(const std::string &var, const std::string &val, uint32_t flags = 0); 11 | std::string Interpolate(const std::string &tmpl, std::function lookup); 12 | std::string EnvInterpolate(const std::string &tmpl); 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/include/btos/handle.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HANDLE_HPP 2 | #define _HANDLE_HPP 3 | 4 | #include 5 | 6 | namespace btos_api{ 7 | 8 | class Handle{ 9 | protected: 10 | bt_handle_t handle; 11 | bool owned; 12 | 13 | Handle(bt_handle_t h, bool o); 14 | Handle(const Handle&) = delete; 15 | Handle &operator=(const Handle&) = delete; 16 | public: 17 | Handle(bt_handle_t h); 18 | Handle(Handle &&h); 19 | 20 | Handle &operator=(Handle&&); 21 | 22 | virtual ~Handle(); 23 | 24 | bool Query() const; 25 | bt_handle_t GetHandle() const; 26 | 27 | void Wait(); 28 | }; 29 | 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/include/btos/ini.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _INI_HPP 2 | #define _INI_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace btos_api{ 9 | 10 | typedef std::pair IniLine; 11 | typedef std::map IniSection; 12 | typedef std::map IniFile; 13 | 14 | IniFile ReadIniFile(std::istream &file); 15 | IniFile ReadIniFile(const std::string &filename); 16 | IniSection ReadIniSection(std::istream &file); 17 | IniLine ReadIniLine(const std::string &line); 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/include/btos/ioctl.h: -------------------------------------------------------------------------------- 1 | #ifndef _IOCTL_H 2 | #define _IOCTL_H 3 | 4 | #include "../util/bt_enum.h" 5 | 6 | ENUM_START(bt_ioctl) 7 | ENUM_SET(bt_ioctl, DevType, 1), 8 | ENUM_SET(bt_ioctl, DevDesc, 2), 9 | ENUM_SET(bt_ioctl, BlockSize, 3), 10 | ENUM_END 11 | ENUM_TYPE(bt_ioctl); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/include/btos/multiwait.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _MULTIWAIT_HPP 2 | #define _MULTIWAIT_HPP 3 | 4 | #include "handle.hpp" 5 | #include 6 | 7 | namespace btos_api{ 8 | 9 | class MultiWait : public Handle{ 10 | private: 11 | std::vector handles; 12 | public: 13 | enum class WaitMode{ 14 | Any, All 15 | }; 16 | 17 | MultiWait(const std::vector &handles, WaitMode mode); 18 | 19 | Handle *GetTriggerHandle(); 20 | }; 21 | 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /src/include/btos/old_calls.h: -------------------------------------------------------------------------------- 1 | #ifndef _OLD_CALLS_H 2 | #define _OLD_CALLS_H 3 | 4 | EXTERN_C uint64_t bt_wait_atom(bt_handle_t a, ENUM_NAME(bt_atom_compare) cmp, uint64_t val); 5 | 6 | #endif -------------------------------------------------------------------------------- /src/include/btos/thread.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _THREAD_HPP 2 | #define _THREAD_HPP 3 | 4 | #include "handle.hpp" 5 | 6 | namespace btos_api{ 7 | 8 | class Thread : public Handle{ 9 | private: 10 | Thread(bt_handle_t h); 11 | public: 12 | Thread(void (*entry)(void*), void *param = NULL, size_t stacksize = 64 * 1024); 13 | Thread(Thread &&); 14 | static Thread Current(); 15 | 16 | Thread &operator=(Thread&&) = default; 17 | 18 | void Wait() const; 19 | void UnBlock(); 20 | void Abort(); 21 | 22 | void SetName(const char *name); 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/include/btos/timer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _TIMER_HPP 2 | #define _TIMER_HPP 3 | 4 | #include 5 | #include "handle.hpp" 6 | #include "imessagehandler.hpp" 7 | 8 | namespace btos_api{ 9 | 10 | class Timer : public Handle, public IMessageHandler{ 11 | private: 12 | std::function handler; 13 | public: 14 | Timer(uint32_t msec); 15 | 16 | void Reset(); 17 | 18 | void SetHandler(std::function fn); 19 | std::function GetHandler() const; 20 | 21 | bool HandleMessage(const Message &msg) override; 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/include/btos_module.h: -------------------------------------------------------------------------------- 1 | #ifndef _BTOS_MODULE_H 2 | #define _BTOS_MODULE_H 3 | 4 | #if !defined(KERNEL) && !defined(KERNEL_MODULE) 5 | #error This file is for kernel use only. 6 | #endif 7 | 8 | #ifndef BTOS_MODULE_NO_IO 9 | #include "module/io.h" 10 | #endif 11 | 12 | #include "module/module_c.h" 13 | #include "btos/fs_interface.h" 14 | 15 | #ifdef __cplusplus 16 | #include "module/module_api.hpp" 17 | #include "module/module_cpp.hpp" 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/include/cmd/globbing.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _GLOBBING_HPP 2 | #define _GLOBBING_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace btos_api{ 8 | namespace cmd{ 9 | 10 | std::vector glob(const std::string &str); 11 | 12 | } 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/include/cmd/path.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CMD_PATH_HPP 2 | #define _CMD_PATH_HPP 3 | 4 | #include 5 | 6 | namespace btos_api{ 7 | namespace cmd{ 8 | 9 | std::string parse_path(std::string path); 10 | bool is_directory(const std::string &path); 11 | std::string path_file(const std::string &path); 12 | std::string path_path(const std::string &fullpath); 13 | 14 | } 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/include/cmd/script_commands.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SCRIPT_COMMANDS_HPP 2 | #define _SCRIPT_COMMANDS_HPP 3 | 4 | #include "commands.hpp" 5 | 6 | namespace btos_api{ 7 | namespace cmd{ 8 | 9 | void echo_command(const command &cmd); 10 | void int_command(const command &cmd); 11 | void str_command(const command &cmd); 12 | void arr_command(const command &cmd); 13 | void tab_command(const command &cmd); 14 | 15 | } 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/include/dev/hwpnp/optical.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _OPTICAL_HPP 2 | #define _OPTICAL_HPP 3 | 4 | #include "../hwpnp.hpp" 5 | #include 6 | #include "blockdevice.hpp" 7 | 8 | namespace btos_api{ 9 | namespace hwpnp{ 10 | 11 | class IOpticalDevice : public IBlockDevice{ 12 | public: 13 | int GetType() { 14 | return driver_types::STR_OPTICAL; 15 | } 16 | 17 | ~IOpticalDevice() {} 18 | }; 19 | 20 | } 21 | } 22 | 23 | #endif -------------------------------------------------------------------------------- /src/include/dev/hwpnp/timerdevice.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _TIMERDEVICE_HPP 2 | #define _TIMERDEVICE_HPP 3 | 4 | #include "../hwpnp.hpp" 5 | #include 6 | 7 | namespace btos_api{ 8 | namespace hwpnp{ 9 | 10 | class ITimerDevice : public IDevice{ 11 | public: 12 | virtual uint64_t GetTime() = 0; 13 | virtual uint64_t GetMillis() = 0; 14 | virtual void SetTime(uint64_t time) = 0; 15 | 16 | IDeviceNode *GetDeviceNode(){ 17 | return nullptr; 18 | } 19 | 20 | int GetType() { 21 | return driver_types::TIMER; 22 | } 23 | 24 | virtual ~ITimerDevice() {} 25 | }; 26 | 27 | } 28 | } 29 | 30 | #endif -------------------------------------------------------------------------------- /src/include/ext/dmi.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DMI_HPP 2 | #define _DMI_HPP 3 | 4 | #include 5 | 6 | struct dm_dev_info{ 7 | btos_api::hwpnp::DeviceID devid; 8 | void *parent; 9 | size_t index; 10 | }; 11 | 12 | ENUM_START(bt_dm_event) 13 | ENUM_SET(bt_dm_event, DeviceFound, 0), 14 | ENUM_SET(bt_dm_event, DeviceLost, 1), 15 | ENUM_END 16 | ENUM_TYPE(bt_dm_event); 17 | 18 | ENUM_START(bt_dm_function) 19 | ENUM_SET(bt_dm_function, Register, 0), 20 | ENUM_SET(bt_dm_function, GetFirstDevice, 1), 21 | ENUM_SET(bt_dm_function, GetNextDevice, 2), 22 | ENUM_END 23 | ENUM_TYPE(bt_dm_function); 24 | 25 | #endif -------------------------------------------------------------------------------- /src/include/gui/drawing.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DRAWING_HPP 2 | #define _DRAWING_HPP 3 | 4 | #include 5 | 6 | namespace btos_api{ 7 | namespace gui{ 8 | namespace drawing{ 9 | 10 | void Border(gds::Surface &surf, gds::Rect rect, gds::Colour c); 11 | void BevelBox(gds::Surface &surf, gds::Rect rect, gds::Colour topLeft, gds::Colour bottomRight); 12 | 13 | } 14 | } 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /src/include/gui/eventresponse.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _EVENTRESPONSE_HPP 2 | #define _EVENTRESPONSE_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace btos_api{ 8 | namespace gui{ 9 | 10 | class EventResponse{ 11 | private: 12 | bool finishedProcessing = false; 13 | public: 14 | EventResponse(bool fP = false); 15 | 16 | bool IsFinishedProcessing(); 17 | }; 18 | 19 | } 20 | } 21 | 22 | #endif -------------------------------------------------------------------------------- /src/include/gui/idialog.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _IDIALOG_HPP 2 | #define _IDIALOG_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace btos_api{ 10 | namespace gui{ 11 | 12 | gds::Point DialogPosition(wm::Window *parent, const wm::Window &form); 13 | maybe_owned_ptr DialogEventLoop(wm::Window *parent); 14 | 15 | template class IDialog{ 16 | public: 17 | virtual T Show(wm::Window *parent) = 0; 18 | virtual ~IDialog(){} 19 | }; 20 | 21 | } 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /src/include/gui/shell/folderselectdialog.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _FOLDERSELECTDIALOG_HPP 2 | #define _FOLDERSELECTDIALOG_HPP 3 | 4 | #include 5 | #include 6 | 7 | #define BTOS_NO_USING 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | namespace btos_api{ 14 | namespace gui{ 15 | namespace shell{ 16 | 17 | class FolderSelectDialog : public IDialog{ 18 | private: 19 | std::string defPath; 20 | public: 21 | FolderSelectDialog(const std::string &path = ""); 22 | 23 | std::string Show(wm::Window *parent) override; 24 | }; 25 | 26 | } 27 | } 28 | } 29 | 30 | #endif -------------------------------------------------------------------------------- /src/include/module/kernelsys/kvars.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MODULE_KVARS_HPP 2 | #define MODULE_KVARS_HPP 3 | 4 | #include 5 | 6 | class IKernelConfigVariables : private nonmovable{ 7 | public: 8 | virtual void SetVariable(const char *name, const char *value) = 0; 9 | virtual const char *GetVariable(const char *name) = 0; 10 | virtual bool IsVariableSet(const char *name) = 0; 11 | 12 | virtual ~IKernelConfigVariables() {} 13 | }; 14 | 15 | #endif -------------------------------------------------------------------------------- /src/include/module/kernelsys/perms.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MODULE_PERMS_HPP 2 | #define MODULE_PERMS_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class IPermissionManager : private nonmovable{ 9 | public: 10 | virtual bool HasPermission(uint16_t ext, uint8_t p, IProcess &proc = ::CurrentProcess()) = 0; 11 | virtual uint64_t SetPermissions(uint16_t ext, uint64_t pmask, IProcess &proc = ::CurrentProcess()) = 0; 12 | virtual bool SwitchUID(uint64_t uid, IProcess &proc = ::CurrentProcess()) = 0; 13 | 14 | virtual ~IPermissionManager() {} 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /src/include/module/utils/module_meta.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MODULE_META_HPP 2 | #define MODULE_META_HPP 3 | 4 | #ifdef KERNEL 5 | #define KERNEL_ONLY(x) x 6 | #else 7 | #define KERNEL_ONLY(x) 8 | #endif 9 | 10 | #ifdef KERNEL_MODULE 11 | #define MODULE_ONLY(x) x 12 | #else 13 | #define MODULE_ONLY(x) 14 | #endif 15 | 16 | #endif -------------------------------------------------------------------------------- /src/include/sm/iserviceresolver.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _ISERVICERESOLVER_HPP 2 | #define _ISERVICERESOLVER_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace btos_api{ 10 | namespace sm{ 11 | 12 | class IServiceResolver{ 13 | public: 14 | virtual std::pair GetService(const std::string &name) = 0; 15 | virtual std::vector GetServices() = 0; 16 | 17 | virtual ~IServiceResolver() {} 18 | }; 19 | 20 | } 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/include/util/demangle.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DEMANGLE_HPP 2 | #define _DEMANGLE_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | static __attribute__ ((unused)) std::string demangle(const char* name) { 9 | 10 | int status = -1; 11 | std::unique_ptr res { 12 | abi::__cxa_demangle(name, NULL, NULL, &status), 13 | std::free 14 | }; 15 | 16 | return (status==0) ? res.get() : name; 17 | } 18 | 19 | #endif -------------------------------------------------------------------------------- /src/include/util/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_NONCOPYABLE 2 | #define UTIL_NONCOPYABLE 3 | 4 | class noncopyable { 5 | protected: 6 | noncopyable() = default; 7 | ~noncopyable() = default; 8 | 9 | noncopyable(noncopyable const &) = delete; 10 | noncopyable &operator=(noncopyable const &) = delete; 11 | }; 12 | 13 | class nonmovable : public noncopyable { 14 | protected: 15 | nonmovable() = default; 16 | ~nonmovable() = default; 17 | 18 | nonmovable(nonmovable &&) = delete; 19 | nonmovable &operator=(nonmovable &&) = delete; 20 | }; 21 | 22 | #endif -------------------------------------------------------------------------------- /src/include/util/scoped_ptr.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SCOPED_PTR_HPP 2 | #define _SCOPED_PTR_HPP 3 | 4 | template class scoped_ptr{ 5 | private: 6 | T* ptr; 7 | public: 8 | scoped_ptr(T* p) : ptr(p) {}; 9 | ~scoped_ptr(){ 10 | delete ptr; 11 | } 12 | 13 | T* operator* (){ 14 | return ptr; 15 | } 16 | 17 | T* operator->(){ 18 | return ptr; 19 | } 20 | 21 | T* get(){ 22 | return ptr; 23 | } 24 | 25 | operator bool(){ 26 | return ptr; 27 | } 28 | }; 29 | 30 | #endif -------------------------------------------------------------------------------- /src/include/util/tfmdebug.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_TFMDEBUG_HPP 2 | #define UTIL_TFMDEBUG_HPP 3 | 4 | #include "tinyformat.hpp" 5 | #include 6 | 7 | template inline void tfmdebug(const char *f, T...ts){ 8 | auto str = tfm::format(f, ts...); 9 | btos_api::bt_zero(str.c_str()); 10 | } 11 | 12 | #endif -------------------------------------------------------------------------------- /src/iso/Makefile: -------------------------------------------------------------------------------- 1 | ISOS := test livecd 2 | 3 | all: dummy.file 4 | for dir in $(ISOS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(ISOS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: -------------------------------------------------------------------------------- /src/iso/livecd/grub.cfg: -------------------------------------------------------------------------------- 1 | insmod vga 2 | insmod gfxterm 3 | set gfxmode=640x480 4 | terminal_output gfxterm 5 | insmod tga 6 | background_image /boot/splash.tga 7 | 8 | menuentry "BT/OS" { 9 | multiboot /boot/btos.bin 10 | module /boot/init.tar 11 | } 12 | 13 | set timeout=3 14 | set timeout_style=countdown -------------------------------------------------------------------------------- /src/iso/livecd/initreg.cmd: -------------------------------------------------------------------------------- 1 | out echo "Initializing registry..." 2 | package import live:/package.inf live:/btos 3 | out echo "Done." -------------------------------------------------------------------------------- /src/iso/livecd/load_cfg: -------------------------------------------------------------------------------- 1 | insmod part_acorn 2 | insmod part_amiga 3 | insmod part_apple 4 | insmod part_bsd 5 | insmod part_dvh 6 | insmod part_gpt 7 | insmod part_msdos 8 | insmod part_plan 9 | insmod part_sun 10 | insmod part_sunpc 11 | -------------------------------------------------------------------------------- /src/iso/test/grub.cfg: -------------------------------------------------------------------------------- 1 | insmod vga 2 | insmod gfxterm 3 | set gfxmode=640x480 4 | terminal_output gfxterm 5 | insmod tga 6 | background_image /boot/splash.tga 7 | 8 | menuentry "BT/OS" { 9 | multiboot /boot/btos.bin 10 | module /boot/init.tar 11 | } 12 | 13 | set timeout=3 14 | set timeout_style=countdown 15 | -------------------------------------------------------------------------------- /src/iso/test/load_cfg: -------------------------------------------------------------------------------- 1 | insmod part_acorn 2 | insmod part_amiga 3 | insmod part_apple 4 | insmod part_bsd 5 | insmod part_dvh 6 | insmod part_gpt 7 | insmod part_msdos 8 | insmod part_plan 9 | insmod part_sun 10 | insmod part_sunpc 11 | -------------------------------------------------------------------------------- /src/kernel/atoms.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _ATOMS_HPP 2 | #define _ATOMS_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | #include 7 | 8 | IAtom *NewAtom(uint64_t value); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/kernel/buildid.sh: -------------------------------------------------------------------------------- 1 | COMMIT=$(git --no-pager log -1 --pretty=format:%h) 2 | BRANCH=$(git rev-parse --abbrev-ref HEAD) 3 | 4 | echo "char *kernel_buildid=\"$BRANCH/$COMMIT\";" > buildid.c -------------------------------------------------------------------------------- /src/kernel/copy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/kernel/copy.txt -------------------------------------------------------------------------------- /src/kernel/debug_ext.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DEBUG_EXT_HPP 2 | #define _DEBUG_EXT_HPP 3 | 4 | #include "kernel.hpp" 5 | #include 6 | 7 | void init_debug_extension(); 8 | void debug_event_notify(bt_pid_t pid, uint64_t thread, bt_debug_event::Enum event, bt_exception::Enum error=bt_exception::NoError); 9 | void debug_getdrstate(uint32_t *buffer); 10 | void debug_setdrstate(const uint32_t *buffer); 11 | void debug_setbreaks(bool state); 12 | 13 | static const size_t Debug_DRStateSize = 6; 14 | 15 | #endif //_DEBUG_EXT_HPP 16 | -------------------------------------------------------------------------------- /src/kernel/devfs.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DEVFS_HPP 2 | #define _DEVFS_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | IFilesystem *DevFSGet(); 7 | void DevFS_Init(); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /src/kernel/devices.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_DEVICES_HPP 2 | #define KERNEL_DEVICES_HPP 3 | 4 | #include 5 | 6 | IVisibleDeviceManager &GetVisibleDeviceManager(); 7 | 8 | void Devices_Init(); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/kernel/extensions.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_EXTENSIONS_HPP 2 | #define KERNEL_EXTENSIONS_HPP 3 | 4 | #include "kernel.hpp" 5 | #include 6 | 7 | void Extensions_Init(); 8 | IKernelExensionManager &GetKernelExtensionManager(); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/kernel/filesystems.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _FILESYSTEMS_HPP 2 | #define _FILESYSTEMS_HPP 3 | 4 | #include "kernel.hpp" 5 | #include 6 | 7 | #include 8 | 9 | void Filesystem_Init(); 10 | IVirtualFilesystem &GetVirtualFilesystem(); 11 | IFilesystemManager &GetFilesystemManager(); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/kernel/hal/abstract.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_HAL_ABSTRACT_HPP 2 | #define KERNEL_HAL_ABSTRACT_HPP 3 | 4 | #include 5 | 6 | void HAL_Init(); 7 | 8 | IHAL &GetHAL(); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/kernel/hal/x86_32/io.cpp: -------------------------------------------------------------------------------- 1 | #include "io.hpp" 2 | -------------------------------------------------------------------------------- /src/kernel/hal/x86_32/pic.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _PIC_HPP 2 | #define _PIC_HPP 3 | 4 | void PIC_init(); 5 | void IRQ_set_mask(unsigned char IRQline); 6 | void IRQ_clear_mask(unsigned char IRQline); 7 | void PIC_sendEOI(unsigned char irq); 8 | uint16_t pic_get_isr(); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/kernel/hal/x86_32/process_asm.s: -------------------------------------------------------------------------------- 1 | .global proc_run_usermode 2 | proc_run_usermode: 3 | cli 4 | movl $0x23, %eax 5 | movl %eax, %ds 6 | movl %eax, %es 7 | movl %eax, %fs 8 | movl %eax, %gs 9 | 10 | popl %eax 11 | popl %eax 12 | popl %ebx 13 | pushl $0x23 14 | pushl %eax 15 | pushf 16 | orl $0x200, (%esp) 17 | pushl $0x1B 18 | pushl %ebx 19 | iret 20 | -------------------------------------------------------------------------------- /src/kernel/handles.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HANDLES_HPP 2 | #define _HANDLES_HPP 3 | 4 | #include 5 | #include 6 | 7 | void init_handles(); 8 | 9 | void AddHandleDependencyOn(IHandle *h); 10 | void RemoveHandleDependencyOn(IHandle *h); 11 | 12 | HandleDependencyCheckResult HandleDependencyCheck(IHandle *h); 13 | 14 | void WaitOnHandle(IHandle *h); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/kernel/hwpnp/hwpnp_public.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HWPNP_PUBLIC_HPP 2 | #define _HWPNP_PUBLIC_HPP 3 | 4 | #include 5 | 6 | void hwpnp_init(); 7 | 8 | IHwPnpManager &GetHwPnpManager(); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/kernel/hwpnp_kernel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HWPNP_KERNEL_HPP 2 | #define _HWPNP_KERNEL_HPP 3 | 4 | #include "hwpnp/hwpnp_public.hpp" 5 | 6 | #endif -------------------------------------------------------------------------------- /src/kernel/infofs.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _INFOFS_HPP 2 | #define _INFOFS_HPP 3 | 4 | #include 5 | 6 | class IInfoFS : private nonmovable{ 7 | public: 8 | virtual void Register(const char *name, function fn) = 0; 9 | 10 | virtual ~IInfoFS(){} 11 | }; 12 | 13 | void InfoRegister(const char *name, function fn); 14 | 15 | void Info_Init(); 16 | 17 | #endif -------------------------------------------------------------------------------- /src/kernel/initfs.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _INITFS_HPP 2 | #define _INITFS_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | IFilesystem *InitFSGet(); 7 | void InitFS_Init(); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /src/kernel/kvars.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _KVARS_HPP 2 | #define _KVARS_HPP 3 | 4 | #include "utils/string.hpp" 5 | 6 | #include 7 | 8 | void KernelConfigVariables_Init(); 9 | IKernelConfigVariables &GetKernelConfigVariables(); 10 | 11 | #endif -------------------------------------------------------------------------------- /src/kernel/load_cfg: -------------------------------------------------------------------------------- 1 | insmod part_acorn 2 | insmod part_amiga 3 | insmod part_apple 4 | insmod part_bsd 5 | insmod part_dvh 6 | insmod part_gpt 7 | insmod part_msdos 8 | insmod part_plan 9 | insmod part_sun 10 | insmod part_sunpc 11 | -------------------------------------------------------------------------------- /src/kernel/load_elf.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _LOAD_ELF_HPP 2 | #define _LOAD_ELF_HPP 3 | 4 | #include "kernel.hpp" 5 | #include "syscalls.hpp" 6 | 7 | namespace module_api{ 8 | struct syscall_table; 9 | }; 10 | 11 | class ILoadedElf : private nonmovable{ 12 | public: 13 | virtual void Execute(const char *mod_params = nullptr) = 0; 14 | virtual ProcessEntryPoint GetEntryPoint() = 0; 15 | 16 | virtual uintptr_t GetBaseAddress() = 0; 17 | 18 | virtual ~ILoadedElf() {} 19 | }; 20 | 21 | ILoadedElf *LoadElfModule(IFileHandle &file); 22 | ILoadedElf *LoadElfProcess(bt_pid_t pid, IFileHandle &file); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/kernel/messaging.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _MESSAGING_HPP 2 | #define _MESSAGING_HPP 3 | 4 | #include 5 | 6 | void Messaging_Init(); 7 | IMessageManager &GetMessageManager(); 8 | 9 | #endif -------------------------------------------------------------------------------- /src/kernel/mm2.cpp: -------------------------------------------------------------------------------- 1 | #include "kernel.hpp" 2 | #include "mm2/mm2_internal.hpp" 3 | 4 | void mm2_init(multiboot_info_t *mbt){ 5 | dbgout("MM2: Init.\n"); 6 | MM2::mm2_physical_init(mbt); 7 | MM2::mm2_virtual_init(); 8 | MM2::init_mmap(); 9 | MM2::init_shm(); 10 | MM2::init_class(); 11 | MM2::physical_infofs_register(); 12 | dbgout("MM2: Ready.\n"); 13 | } 14 | 15 | void *mm2_virtual_alloc(size_t pages, uint32_t mode){ 16 | return MM2::mm2_virtual_alloc(pages, mode); 17 | } 18 | 19 | void mm2_virtual_free(void *ptr, size_t pages){ 20 | MM2::mm2_virtual_free(ptr, pages); 21 | } -------------------------------------------------------------------------------- /src/kernel/mm2.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _MM2_HPP 2 | #define _MM2_HPP 3 | 4 | #include "kernel.hpp" 5 | #include "mm2/mm2_public.hpp" 6 | 7 | void mm2_init(multiboot_info_t *mbt); 8 | void *mm2_virtual_alloc(size_t pages, uint32_t mode = MM2::MM2_Alloc_Mode::Kernel); 9 | void mm2_virtual_free(void *ptr, size_t pages); 10 | 11 | #include "mm2/pagedirectory.hpp" 12 | 13 | #endif -------------------------------------------------------------------------------- /src/kernel/mm2/mm2_public.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _MM2_PUBLIC_HPP 2 | #define _MM2_PUBLIC_HPP 3 | 4 | #include "../kernel.hpp" 5 | #include 6 | 7 | namespace MM2{ 8 | void mm2_liballoc_lock(); 9 | void mm2_liballoc_unlock(); 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/kernel/module.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_MODULE_HPP 2 | #define KERNEL_MODULE_HPP 3 | 4 | #include 5 | 6 | IModuleAPI &GetModuleAPI(); 7 | 8 | #endif -------------------------------------------------------------------------------- /src/kernel/modules.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _MODULES_HPP 2 | #define _MODULES_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | class IModuleManager : private nonmovable{ 7 | public: 8 | virtual void LoadModule(const char *path, char *params = nullptr) = 0; 9 | 10 | virtual ~IModuleManager() {} 11 | }; 12 | 13 | void Modules_Init(); 14 | IModuleManager &GetModuleManager(); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/kernel/panic.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _PANIC_H 2 | #define _PANIC_H 3 | 4 | extern "C" void panic(const char *msg) __attribute__ ((noreturn)); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/kernel/processes/abstract.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_PROCESSES_ABSTRACT_HPP 2 | #define KERNEL_PROCESSES_ABSTRACT_HPP 3 | 4 | #include "../kernel.hpp" 5 | #include "../utils/string.hpp" 6 | #include 7 | 8 | #include 9 | 10 | void Processes_Init(); 11 | IProcessManager &GetProcessManager(); 12 | 13 | bool Processes_Ready(); 14 | 15 | inline ProcessPointer GetProcess(bt_pid_t pid){ 16 | auto ptr = GetProcessManager().GetByID(pid); 17 | return ptr; 18 | } 19 | 20 | inline IProcess &CurrentProcess(){ 21 | return GetProcessManager().CurrentProcess(); 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/kernel/rtc/rtc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RTC_HPP 2 | #define _RTC_HPP 3 | 4 | void rtc_init(); 5 | void rtc_configure(); 6 | 7 | #endif -------------------------------------------------------------------------------- /src/kernel/scheduler/abstract.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_SCHEDULER_ABSTRACT_HPP 2 | #define KERNEL_SCHEDULER_ABSTRACT_HPP 3 | 4 | #include 5 | 6 | void Scheduler_Init(); 7 | bool Scheduler_Ready(); 8 | IScheduler &GetScheduler(); 9 | 10 | IThread &GetNullThread(); 11 | 12 | inline IThread &CurrentThread(){ 13 | if(!Scheduler_Ready()) return GetNullThread(); 14 | return GetScheduler().CurrentThread(); 15 | } 16 | 17 | inline ThreadPointer GetThread(uint64_t id){ 18 | auto ptr = GetScheduler().GetByID(id); 19 | if(!ptr) panic("(THREAD) Thread does not exist!"); 20 | return ptr; 21 | } 22 | 23 | #endif -------------------------------------------------------------------------------- /src/kernel/serdbg.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SERDBG_HPP 2 | #define _SERDBG_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | void init_serial_debug(); 7 | extern "C" void serial_writestring(const char *str); 8 | 9 | extern "C" char dbgbuf[256]; 10 | 11 | #define dbgout serial_writestring 12 | #define dbgpf(...) do{sprintf(dbgbuf, __VA_ARGS__); dbgout(dbgbuf);}while(false) 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/kernel/syscalls.hpp: -------------------------------------------------------------------------------- 1 | #if 0 2 | #ifndef _SYSCALLS_HPP 3 | #define _SYSCALLS_HPP 4 | 5 | #include "kernel.hpp" 6 | #include 7 | 8 | extern module_api::syscall_table MODULE_SYSCALL_TABLE; 9 | 10 | #endif 11 | #endif -------------------------------------------------------------------------------- /src/kernel/test.sh: -------------------------------------------------------------------------------- 1 | make -C .. && 2 | qemu-system-i386 -s -cdrom ../iso/test/test.iso -m 128 -serial stdio -drive file=../disk/btos.img,format=raw -boot order=d $(head -n 1 ../qemu-launch-opts.txt) 3 | #qemu-system-i386 -s -m 128 -serial stdio -drive file=../disk/btos.img,format=raw $(head -n 1 ../qemu-launch-opts.txt) 4 | #-d int,cpu_reset 5 | -------------------------------------------------------------------------------- /src/kernel/testtxt.sh: -------------------------------------------------------------------------------- 1 | make -C .. && 2 | qemu-system-i386 -s -cdrom ../iso/test/test.iso -m 128 -serial file:serial.out -hda ../disk/btos.img -boot order=d -curses 3 | #-d int,cpu_reset 4 | -------------------------------------------------------------------------------- /src/kernel/user_api.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _USER_API_HPP 2 | #define _USER_API_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | void userapi_init(); 7 | bool is_safe_ptr(uint32_t ptr, size_t size, bt_pid_t pid = CurrentProcess().ID()); 8 | bool is_safe_string(uint32_t ptr, bt_pid_t pid = CurrentProcess().ID()); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/kernel/utils/cpp_support.cpp: -------------------------------------------------------------------------------- 1 | #include "../kernel.hpp" 2 | 3 | extern "C" void __cxa_pure_virtual() 4 | { 5 | panic("Pure virtual function call!"); 6 | } 7 | 8 | extern "C" int __cxa_atexit(void (*/*func*/) (void *), void * /*arg*/, void * /*dso_handle*/){ 9 | return 0; 10 | } 11 | 12 | void *__dso_handle; -------------------------------------------------------------------------------- /src/kernel/utils/fshelpers.hpp: -------------------------------------------------------------------------------- 1 | #include "../kernel/kernel.hpp" 2 | 3 | #include -------------------------------------------------------------------------------- /src/kernel/utils/gcc_builtins.h: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_UTILS_GCC_BUILTINS_HPP 2 | #define KERNEL_UTILS_GCC_BUILTINS_HPP 3 | 4 | //Strings 5 | #define strlen(s) __builtin_strlen(s) 6 | #define strcmp(a, b) __builtin_strcmp(a, b) 7 | #define strncpy(d, s, c) __builtin_strncpy(d, s, c) 8 | 9 | 10 | //Memory 11 | #define memset(s, c, n) __builtin_memset(s, c, n) 12 | #define memmove(d, s, c) __builtin_memmove(d, s, c) 13 | #define memcpy(d, s, c) __builtin_memcpy(d, s, c) 14 | 15 | #endif -------------------------------------------------------------------------------- /src/kernel/utils/ministl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _KERNEL_MINISTL_HPP 2 | #define _KERNEL_MINISTL_HPP 3 | 4 | extern "C"{ 5 | #include "../kernel/liballoc.h" 6 | } 7 | #include 8 | 9 | #endif -------------------------------------------------------------------------------- /src/kernel/utils/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "../kernel.hpp" 2 | 3 | namespace StaticAllocInitPolicies{ 4 | StaticAllocLock initLock; 5 | } 6 | 7 | void Utils_Init(){ 8 | StaticAllocInitPolicies::initLock.Init(); 9 | } 10 | 11 | namespace StaticAllocInitPolicies::Private{ 12 | void TakeLock(ILock *lock){ 13 | lock->TakeExclusive(); 14 | } 15 | 16 | void ReleaseLock(ILock *lock){ 17 | lock->Release(); 18 | } 19 | } -------------------------------------------------------------------------------- /src/kernel/waiting.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _WAITING_HPP 2 | #define _WAITING_HPP 3 | 4 | #include "kernel.hpp" 5 | 6 | KernelHandles::Wait::handleType *MakeWaitAnyHandle(vector handles); 7 | KernelHandles::Wait::handleType *MakeWaitAllHandle(vector handles); 8 | size_t GetWaitIndex(KernelHandles::Wait::handleType *handle); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/modules/Makefile: -------------------------------------------------------------------------------- 1 | MODULES := boot fs terminal hwpnp cache 2 | 3 | all: dummy.file 4 | for dir in $(MODULES); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(MODULES); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: -------------------------------------------------------------------------------- /src/modules/boot/cmdline.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct cmdLine{ 4 | char *cmd; 5 | size_t argc; 6 | char **argv; 7 | }; 8 | 9 | cmdLine parse_cmd(const char *c); 10 | void free_cmd(cmdLine c); 11 | -------------------------------------------------------------------------------- /src/modules/boot/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/cache/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/empty/empty.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | EXTERN_C int module_main(IModuleAPI *api, char *){ 4 | ModuleInit(api); 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/modules/empty/linker.ld: -------------------------------------------------------------------------------- 1 | ENTRY(module_main) 2 | -------------------------------------------------------------------------------- /src/modules/fs/Makefile: -------------------------------------------------------------------------------- 1 | MODULES := fatfs iso9660 2 | 3 | all: dummy.file 4 | for dir in $(MODULES); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(MODULES); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: -------------------------------------------------------------------------------- /src/modules/fs/fatfs/drive.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FATFS_DRIVE_HPP 2 | #define FATFS_DRIVE_HPP 3 | 4 | #include 5 | 6 | class FatFSDrive : private nonmovable{ 7 | private: 8 | IFileHandle *dev; 9 | public: 10 | FatFSDrive(IFileHandle *d) : dev(d) {} 11 | 12 | int read_sector(char *buffer, uint64_t sector, size_t count); 13 | int write_sector(const char *buffer, uint64_t sector, size_t count); 14 | 15 | uint64_t get_sector_count(); 16 | 17 | void sync(); 18 | 19 | ~FatFSDrive(); 20 | }; 21 | 22 | FatFSDrive *GetDrive(uint8_t id); 23 | uint8_t NewDrive(IFileHandle *drv); 24 | void DeleteDrive(uint8_t id); 25 | 26 | #endif -------------------------------------------------------------------------------- /src/modules/fs/fatfs/linker.ld: -------------------------------------------------------------------------------- 1 | ENTRY(module_main) 2 | -------------------------------------------------------------------------------- /src/modules/fs/iso9660/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/Makefile: -------------------------------------------------------------------------------- 1 | MODULES := stdpc pcrtc ata ps2 pci vga 2 | 3 | all: dummy.file 4 | for dir in $(MODULES); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(MODULES); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: -------------------------------------------------------------------------------- /src/modules/hwpnp/ata/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/pci/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/pcrtc/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/pcrtc/rtc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RTC_HPP 2 | #define _RTC_HPP 3 | 4 | #include 5 | 6 | #define RTC_NO_STUBS 7 | #include 8 | 9 | struct datetime{ 10 | int day, month, year; 11 | int hour, minute, second; 12 | }; 13 | 14 | void init_api(); 15 | void init_clock(const datetime bootTime); 16 | datetime current_datetime(); 17 | uint64_t datetime2epoch(const datetime &dt); 18 | 19 | void init_timer(); 20 | uint64_t get_msecs(); 21 | uint64_t rtc_get_time(); 22 | 23 | void init_rtc(); 24 | 25 | #endif -------------------------------------------------------------------------------- /src/modules/hwpnp/ps2/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/stdpc/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/vga/device.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DEVICE_HPP 2 | #define _DEVICE_HPP 3 | 4 | #include 5 | 6 | struct vga_instance{ 7 | size_t pos; 8 | }; 9 | 10 | void init_hwpnp(); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/modules/hwpnp/vga/libx86emu/include/mem.h: -------------------------------------------------------------------------------- 1 | unsigned vm_memio(x86emu_t *emu, u32 addr, u32 *val, unsigned type) L_SYM; 2 | x86emu_mem_t *emu_mem_new(unsigned perm) L_SYM; 3 | x86emu_mem_t *emu_mem_free(x86emu_mem_t *mem) L_SYM; 4 | x86emu_mem_t *emu_mem_clone(x86emu_mem_t *mem) L_SYM; 5 | void *mem_dup(const void *src, size_t n) L_SYM; 6 | 7 | -------------------------------------------------------------------------------- /src/modules/hwpnp/vga/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/hwpnp/vga/vbe_device.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _VBE_DEVICE_HPP 2 | #define _VBE_DEVICE_HPP 3 | 4 | void init_vbe_device(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/modules/terminal/device.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DEVICE_HPP 2 | #define _DEVICE_HPP 3 | 4 | void init_device(); 5 | extern ILock *term_lock; 6 | 7 | extern const char *terminal_var; 8 | uint64_t atoi64(char *str); 9 | char* i64toa(uint64_t num, char* str, int base); 10 | 11 | #endif -------------------------------------------------------------------------------- /src/modules/terminal/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(module_main) 4 | -------------------------------------------------------------------------------- /src/modules/terminal/terminal.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _TERMINAL_HPP 2 | #define _TERMINAL_HPP 3 | 4 | extern uint16_t terminal_extension_id; 5 | 6 | #endif -------------------------------------------------------------------------------- /src/os.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/packages/Makefile: -------------------------------------------------------------------------------- 1 | PACKAGES := base kernel install tests protogui gui 2 | 3 | all: dummy.file 4 | for dir in $(PACKAGES); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PACKAGES); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/packages/base/pkgfiles/btos/drivers/pci.inf: -------------------------------------------------------------------------------- 1 | [driver] 2 | 3 | devid = 1:0:0:0:0:4 4 | file = pci.sys -------------------------------------------------------------------------------- /src/packages/base/pkgfiles/btos/drivers/ps2.inf: -------------------------------------------------------------------------------- 1 | [driver] 2 | 3 | devid = 1:0:0:0:0:3,6:0:0:0:0:1,6:0:0:0:0:2 4 | file = ps2.sys -------------------------------------------------------------------------------- /src/packages/base/pkgfiles/btos/drivers/vga.inf: -------------------------------------------------------------------------------- 1 | [driver] 2 | 3 | devid = 3:0:0:0:0:0x0300 4 | file = vga.sys -------------------------------------------------------------------------------- /src/packages/install/Makefile: -------------------------------------------------------------------------------- 1 | output-name := install.pkf 2 | 3 | all: ../$(output-name) 4 | pkg-files:= $(shell find pkgfiles -type f) 5 | 6 | create.directories: 7 | mkdir -p data/btos 8 | touch create.directories 9 | 10 | ../$(output-name): $(pkg-files) create.directories 11 | -cp -R pkgfiles/* data 12 | tar cf ../$(output-name) -C data . 13 | 14 | clean: 15 | -rm -rf data 16 | -rm ../$(output-name) 17 | -rm create.directories 18 | -------------------------------------------------------------------------------- /src/packages/install/pkgfiles/btos/setup.ini: -------------------------------------------------------------------------------- 1 | [setup] 2 | 3 | device=$DEVICE$ 4 | partition=$PART$ 5 | filesystem=$FS$ 6 | sysdrive=$DRIVE$ 7 | mbrgrub=$MBR$ -------------------------------------------------------------------------------- /src/packages/install/pkgfiles/package.inf: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = install 4 | description = Installation configuration 5 | version = 0.1C 6 | contentPath = btos 7 | 8 | [feature-install] 9 | 10 | name = install.setup.ini 11 | description = Installation configuration file 12 | path = /setup.ini 13 | type = ini.setup 14 | -------------------------------------------------------------------------------- /src/packages/kernel/pkgfiles/content/grub/grub.cfg: -------------------------------------------------------------------------------- 1 | prefix=($root)/btos/boot/grub 2 | insmod minicmd 3 | insmod vga 4 | insmod gfxterm 5 | set gfxmode=640x480 6 | loadfont /btos/boot/grub/grub.pf2 7 | terminal_output gfxterm 8 | insmod tga 9 | background_image /btos/boot/grub/splash.tga 10 | 11 | menuentry "BT/OS" { 12 | multiboot /btos/boot/btos.bin 13 | module /btos/boot/init.tar 14 | } 15 | 16 | set timeout=3 17 | set timeout_style=countdown -------------------------------------------------------------------------------- /src/packages/kernel/pkgfiles/content/grub/load_cfg: -------------------------------------------------------------------------------- 1 | search --file /btos/boot/$UUID$.id --set 2 | configfile /btos/boot/grub/grub.cfg 3 | -------------------------------------------------------------------------------- /src/packages/kernel/pkgfiles/package.inf: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = kernel 4 | description = BT/OS kernel, bootloader and tools 5 | version = 0.1C 6 | contentPath = content 7 | 8 | [feature-kernel] 9 | 10 | name = kernel.image 11 | description = BT/OS kernel image 12 | path = / 13 | file = btos.bin 14 | type = kernel.image 15 | -------------------------------------------------------------------------------- /src/packages/protogui/pkgfiles/package.inf: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = protogui 4 | description = Prototype GUI applications 5 | version = 0.1C 6 | contentPath = btos 7 | 8 | [feature-clock] 9 | 10 | name = protogui.app.clock 11 | description = ProtoClock 12 | path = / 13 | file = protoclock.elx 14 | type = app 15 | 16 | [feature-text] 17 | 18 | name = protogui.app.text 19 | description = ProtoText 20 | path = / 21 | file = prototext.elx 22 | type = app 23 | 24 | [feature-task] 25 | 26 | name = protogui.app.task 27 | description = ProtoTask 28 | path = / 29 | file = prototask.elx 30 | type = app 31 | -------------------------------------------------------------------------------- /src/packages/tests/pkgfiles/post.pkc: -------------------------------------------------------------------------------- 1 | out echo "Post install script" 2 | -------------------------------------------------------------------------------- /src/packages/tests/pkgfiles/pre.pkc: -------------------------------------------------------------------------------- 1 | out echo "Pre-install script" 2 | # out echo "Not allowing installation." 3 | # addmessage "Test message." 4 | # setstatus false 5 | out echo "install_path = $install_path$" 6 | -------------------------------------------------------------------------------- /src/qemu-launch-opts.template: -------------------------------------------------------------------------------- 1 | -display sdl 2 | -------------------------------------------------------------------------------- /src/rebuild-libstdc++.sh: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/Projects/os/cross" 2 | export TARGET=i686-pc-btos 3 | export PATH="$PREFIX/bin:$PATH" 4 | 5 | cd build-gcc 6 | #make clean-target-libstdc++-v3 7 | make all-target-libstdc++-v3 8 | make install-target-libstdc++-v3 9 | -------------------------------------------------------------------------------- /src/setup-binutils.sh: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/Projects/os/cross" 2 | export TARGET=i686-pc-btos 3 | export PATH="$PREFIX/bin:$PATH" 4 | 5 | rm -rf binutils-2.23 6 | if [ ! -f binutils-2.23.tar.gz ]; 7 | then 8 | wget https://github.com/mallardtheduck/btos-3rdparty-prereqs/raw/master/binutils-2.23.tar.gz 9 | fi 10 | tar xvfz binutils-2.23.tar.gz 11 | 12 | cd $HOME/Projects/os/src 13 | rm -rf build-binutils 14 | mkdir build-binutils 15 | cd build-binutils 16 | cp -Rv ../toolchain/binutils-2.23 .. 17 | ../binutils-2.23/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-werror 18 | make 19 | make install 20 | -------------------------------------------------------------------------------- /src/tarinit/Makefile: -------------------------------------------------------------------------------- 1 | TARS := test livecd 2 | 3 | all: dummy.file 4 | for dir in $(TARS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(TARS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/toolchain/binutils-2.23/ld/emulparams/btos_i386.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_NAME=elf 2 | OUTPUT_FORMAT=elf32-i386 3 | TEXT_START_ADDR=0x40000000 4 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 5 | COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" 6 | ARCH=i386 7 | MACHINE= 8 | NOP=0x90909090 9 | TEMPLATE_NAME=elf32_btos 10 | GENERATE_SHLIB_SCRIPT=yes 11 | GENERATE_PIE_SCRIPT=yes 12 | NO_SMALL_DATA=yes 13 | SEPARATE_GOTPLT=12 14 | 15 | -------------------------------------------------------------------------------- /src/user/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := libs system tests cmds bin wmapps 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/bin/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := debug install 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/bin/debug/commands.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _COMMANDS_HPP 2 | #define _COMMANDS_HPP 3 | 4 | #include 5 | 6 | extern volatile btos_api::bt_pid_t selected_pid; 7 | extern volatile uint64_t selected_thread; 8 | 9 | std::string input_command(); 10 | bool do_command(std::string cmd); 11 | 12 | void watch_thread(void *); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/user/cmds/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := cls cmd format kill load mount sleep tar termctl kilo ini package hwtree rescutil 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/cmds/cls/cls.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | bt_handle btos_get_handle(int fd); 7 | 8 | int main(){ 9 | bt_term_stdout(); 10 | bt_term_ClearScreen(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /src/user/cmds/cmd/cmd.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CMD_HPP 2 | #define _CMD_HPP 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace btos_api::cmd; 15 | 16 | void print_os_version(); 17 | std::string get_input(); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/user/cmds/format/format.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char **argv){ 5 | if(argc < 3){ 6 | printf("Usage: %s filesystem device\n", argv[0]); 7 | return 1; 8 | } 9 | char *filesystem = argv[1]; 10 | char *device = argv[2]; 11 | printf("Formatting %s as %s...\n", device, filesystem); 12 | bool result = bt_format(filesystem, device, NULL); 13 | if(result){ 14 | printf("Success.\n"); 15 | }else{ 16 | printf("Failed.\n"); 17 | } 18 | return 0; 19 | } -------------------------------------------------------------------------------- /src/user/cmds/kill/kill.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char **argv){ 6 | if(argc < 2){ 7 | printf("Usage: %s pid\n", argv[0]); 8 | return 1; 9 | } 10 | bt_pid_t pid=atoi(argv[1]); 11 | if(!pid) return 1; 12 | bt_kill(pid); 13 | return 0; 14 | } -------------------------------------------------------------------------------- /src/user/cmds/kilo/getline.h: -------------------------------------------------------------------------------- 1 | #ifndef GETLINE_H 2 | #define GETLINE_H 3 | 4 | #include 5 | 6 | extern ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); 7 | 8 | extern ssize_t getline(char **lineptr, size_t *n, FILE *stream); 9 | 10 | #endif /* GETLINE_H */ 11 | -------------------------------------------------------------------------------- /src/user/cmds/load/load.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv){ 7 | if(argc < 2){ 8 | printf("Usage: %s filename [params]\n", argv[0]); 9 | return 1; 10 | } 11 | char path[BT_MAX_PATH]; 12 | if(btos_path_parse(argv[1], path, BT_MAX_PATH)) { 13 | bt_load_module(path, argc>2?argv[2]:""); 14 | } 15 | return 0; 16 | } -------------------------------------------------------------------------------- /src/user/cmds/mount/mount.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv){ 7 | if(argc < 4){ 8 | printf("Usage: %s name device filesystem\n", argv[0]); 9 | return 1; 10 | } 11 | bt_mount(argv[1], argv[2], argv[3]); 12 | return 0; 13 | } -------------------------------------------------------------------------------- /src/user/cmds/sleep/sleep.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv){ 7 | if(argc != 2){ 8 | printf("Usage: %s msec\n", argv[0]); 9 | return 0; 10 | } 11 | uint32_t msec = strtoul(argv[1], NULL, 0); 12 | bt_rtc_sleep(msec); 13 | } -------------------------------------------------------------------------------- /src/user/cmds/tar/stubs.c: -------------------------------------------------------------------------------- 1 | #include "stubs.h" 2 | 3 | int utime(const char *filename, const time_t *times){ 4 | (void)filename; (void)times; 5 | return 0; 6 | } 7 | 8 | int mknod(const char *pathname, mode_t mode, dev_t dev){ 9 | (void)pathname; (void)mode; (void)dev; 10 | return -1; 11 | } 12 | 13 | /*int lstat(const char *path, struct stat *buf){ 14 | return stat(path, buf); 15 | }*/ -------------------------------------------------------------------------------- /src/user/cmds/tar/stubs.h: -------------------------------------------------------------------------------- 1 | #ifndef _STUBS_H 2 | #define _STUBS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | int utime(const char *filename, const time_t *times); 9 | int mknod(const char *pathname, mode_t mode, dev_t dev); 10 | int lstat(const char *path, struct stat *buf); 11 | 12 | #define major(x) 0 13 | #define minor(x) 0 14 | #define makedev(x, y) 0 15 | 16 | #endif -------------------------------------------------------------------------------- /src/user/empty/empty.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(){ 4 | printf("Hello world!\n"); 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/user/libs/Makefile: -------------------------------------------------------------------------------- 1 | LIBS := btoscore newlib sm btoslib libgds libwm eloader ansi cmd registry gui resc shell clipboard 2 | 3 | all: dummy.file 4 | for dir in $(LIBS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(LIBS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/libs/ansi/NewFile: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/user/libs/ansi/ansi.h: -------------------------------------------------------------------------------- 1 | #ifndef _ANSI_H 2 | #define _ANSI_H 3 | #include 4 | 5 | EXTERN_C_BEGIN 6 | 7 | void init_ansi(); 8 | void end_ansi(); 9 | 10 | EXTERN_C_END 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/user/libs/btoscore/old_calls.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | uint64_t bt_wait_atom(bt_handle_t a, ENUM_NAME(bt_atom_compare) cmp, uint64_t val){ 4 | bt_handle_t handle = bt_make_wait_atom(a, cmp, val); 5 | bt_waithandle(handle); 6 | bt_closehandle(handle); 7 | return bt_read_atom(a); 8 | } -------------------------------------------------------------------------------- /src/user/libs/eloader/eloader.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | uint32_t EL_LoadLibrary(const char *path){ 4 | (void)path; 5 | return 0; 6 | } 7 | 8 | void *EL_GetSymbol(uint32_t lib, const char *symbol, size_t *size){ 9 | (void)lib; (void)symbol; (void)size; 10 | return NULL; 11 | } 12 | void EL_CloseLibrary(uint32_t lib){ 13 | (void)lib; 14 | } 15 | 16 | size_t EL_GetModuleCount(){ 17 | return 0; 18 | } 19 | 20 | EL_Module EL_GetModule(size_t idx){ 21 | (void)idx; 22 | EL_Module mod = {0, "", 0, 0}; 23 | return mod; 24 | } 25 | -------------------------------------------------------------------------------- /src/user/libs/eloader/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main(){ 7 | size_t count = EL_GetModuleCount(); 8 | for(size_t i = 0; i < count; ++i){ 9 | EL_Module mod = EL_GetModule(i); 10 | cout << "Module: " << mod.name << " (ID: " << mod.id << ")" << endl; 11 | cout << "Base: " << hex << mod.base << " Limit: " << mod.limit << endl; 12 | } 13 | 14 | void *addr = EL_GetSymbol(0, "EL_LoadLibrary"); 15 | cout << "EL_LoadLibrary: " << addr << endl; 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /src/user/libs/gui/eventresponse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | namespace btos_api{ 6 | namespace gui{ 7 | 8 | EventResponse::EventResponse(bool fP) : finishedProcessing(fP){ 9 | } 10 | 11 | bool EventResponse::IsFinishedProcessing(){ 12 | return finishedProcessing; 13 | } 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /src/user/libs/gui/libresc/ib_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/libresc/ib_default.png -------------------------------------------------------------------------------- /src/user/libs/gui/libresc/mb_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/libresc/mb_default.png -------------------------------------------------------------------------------- /src/user/libs/gui/libresc/tv_default_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/libresc/tv_default_icon.png -------------------------------------------------------------------------------- /src/user/libs/gui/libresc/tv_default_nochildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/libresc/tv_default_nochildren.png -------------------------------------------------------------------------------- /src/user/libs/gui/libresc/tv_default_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/libresc/tv_default_open.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = GUI Controls Test 3 | category = Tests 4 | vendor = BT/OS 5 | icon = guitest 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/libs/gui/resc/button_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/button_img.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/folder.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/folder_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/folder_open.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/icon_16.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/icon_32.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/icon_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/icon_default.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/icons.inf: -------------------------------------------------------------------------------- 1 | [guitest] 2 | 16 = icon_16.png 3 | 32 = icon_32.png 4 | -------------------------------------------------------------------------------- /src/user/libs/gui/resc/list_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/list_default.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/list_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/list_icon.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/logo.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/tb1_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/tb1_icon.png -------------------------------------------------------------------------------- /src/user/libs/gui/resc/tb3_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/gui/resc/tb3_icon.png -------------------------------------------------------------------------------- /src/user/libs/libgds/libgds_internal.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _LIBGDS_INTERNAL_HPP 2 | #define _LIBGDS_INTERNAL_HPP 3 | 4 | #include 5 | 6 | namespace libgds_internal{ 7 | 8 | std::string get_env(const std::string &name); 9 | std::string get_env(const std::string &name, const std::string &def_value); 10 | void set_env(const std::string &name, const std::string &value); 11 | 12 | } 13 | 14 | using namespace libgds_internal; 15 | 16 | #endif -------------------------------------------------------------------------------- /src/user/libs/libwm/libwm_internal.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _LIBWM_INTERNAL_HPP 2 | #define _LIBWM_INTERNAL_HPP 3 | 4 | #include 5 | 6 | namespace libwm_internal{ 7 | std::string get_env(const std::string &name); 8 | std::string get_env(const std::string &name, const std::string &def_value); 9 | void set_env(const std::string &name, const std::string &value); 10 | } 11 | 12 | using namespace libwm_internal; 13 | #endif -------------------------------------------------------------------------------- /src/user/libs/newlib/Makefile: -------------------------------------------------------------------------------- 1 | LIBS := libm libc 2 | 3 | all: dummy.file 4 | make -C libc startfiles 5 | for dir in $(LIBS); do \ 6 | make -C $$dir; \ 7 | done 8 | 9 | clean: dummy.file 10 | for dir in $(LIBS); do \ 11 | make -C $$dir clean; \ 12 | done 13 | 14 | dummy.file: 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/argz/buf_findstr.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 | * 3 | * Permission to use, copy, modify, and distribute this software 4 | * is freely granted, provided that this notice is preserved. 5 | */ 6 | 7 | #include 8 | 9 | /* Find string str in buffer buf of length buf_len. Point buf to 10 | character after string, or set it to NULL if end of buffer is 11 | reached. Return 1 if found, 0 if not. */ 12 | int _buf_findstr(const char *str, char **buf, size_t *buf_len); 13 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/argz/dummy.c: -------------------------------------------------------------------------------- 1 | /* empty stub to allow objectlist.awk.in to be created */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/errno/errno.c: -------------------------------------------------------------------------------- 1 | /* The errno variable is stored in the reentrancy structure. This 2 | function returns its address for use by the macro errno defined in 3 | errno.h. */ 4 | 5 | #include 6 | #include 7 | 8 | #ifndef _REENT_ONLY 9 | 10 | int * 11 | __errno () 12 | { 13 | return &_REENT->_errno; 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/big5.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/big5.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane1.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane1.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane14.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane14.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane2.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cns11643_plane2.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cp775.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cp775.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cp850.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cp850.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cp852.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cp852.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cp855.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cp855.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/cp866.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/cp866.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_1.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_1.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_10.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_10.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_11.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_11.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_13.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_13.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_14.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_14.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_15.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_15.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_2.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_2.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_3.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_3.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_4.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_4.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_5.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_5.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_6.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_6.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_7.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_7.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_8.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_8.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_9.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_8859_9.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/iso_ir_111.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/iso_ir_111.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/koi8_r.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/koi8_r.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/koi8_ru.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/koi8_ru.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/koi8_u.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/koi8_u.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/koi8_uni.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/koi8_uni.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/ksx1001.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/ksx1001.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1250.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1250.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1251.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1251.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1252.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1252.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1253.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1253.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1254.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1254.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1255.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1255.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1256.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1256.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1257.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1257.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/iconv/ccs/binary/win_1258.cct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/iconv/ccs/binary/win_1258.cct -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/alloca.h: -------------------------------------------------------------------------------- 1 | /* libc/include/alloca.h - Allocate memory on stack */ 2 | 3 | /* Written 2000 by Werner Almesberger */ 4 | /* Rearranged for general inclusion by stdlib.h. 5 | 2001, Corinna Vinschen */ 6 | 7 | #ifndef _NEWLIB_ALLOCA_H 8 | #define _NEWLIB_ALLOCA_H 9 | 10 | #include "_ansi.h" 11 | #include 12 | 13 | #undef alloca 14 | 15 | #ifdef __GNUC__ 16 | #define alloca(size) __builtin_alloca(size) 17 | #else 18 | void * _EXFUN(alloca,(size_t)); 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/dirent.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIRENT_H_ 2 | #define _DIRENT_H_ 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | #include 7 | 8 | #if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE) 9 | #define MAXNAMLEN 1024 10 | #endif 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif /*_DIRENT_H_*/ 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/envlock.h: -------------------------------------------------------------------------------- 1 | /* envlock.h -- header file for env routines. */ 2 | 3 | #ifndef _INCLUDE_ENVLOCK_H_ 4 | #define _INCLUDE_ENVLOCK_H_ 5 | 6 | #include <_ansi.h> 7 | #include 8 | 9 | #define ENV_LOCK __env_lock(reent_ptr) 10 | #define ENV_UNLOCK __env_unlock(reent_ptr) 11 | 12 | void _EXFUN(__env_lock,(struct _reent *reent)); 13 | void _EXFUN(__env_unlock,(struct _reent *reent)); 14 | 15 | #endif /* _INCLUDE_ENVLOCK_H_ */ 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO_H__ 2 | #define __ERRNO_H__ 3 | 4 | #ifndef __error_t_defined 5 | typedef int error_t; 6 | #define __error_t_defined 1 7 | #endif 8 | 9 | #include 10 | 11 | #endif /* !__ERRNO_H__ */ 12 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/fastmath.h: -------------------------------------------------------------------------------- 1 | #ifndef _FASTMATH_H_ 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | #define _FASTMATH_H_ 6 | 7 | #include 8 | #include 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif /* _FASTMATH_H_ */ 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/fcntl.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/libgen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libgen.h - defined by XPG4 3 | */ 4 | 5 | #ifndef _LIBGEN_H_ 6 | #define _LIBGEN_H_ 7 | 8 | #include "_ansi.h" 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | char *_EXFUN(basename, (char *)); 16 | char *_EXFUN(dirname, (char *)); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* _LIBGEN_H_ */ 23 | 24 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: _types.h,v 1.3 2007/09/07 21:16:25 jjohnstn Exp $ 3 | */ 4 | 5 | #ifndef _MACHINE__TYPES_H 6 | #define _MACHINE__TYPES_H 7 | #include 8 | #endif 9 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/ansi.h: -------------------------------------------------------------------------------- 1 | /* dummy header file to support BSD compiler */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/endian.h: -------------------------------------------------------------------------------- 1 | #ifndef __MACHINE_ENDIAN_H__ 2 | 3 | #include 4 | 5 | #ifndef BIG_ENDIAN 6 | #define BIG_ENDIAN 4321 7 | #endif 8 | #ifndef LITTLE_ENDIAN 9 | #define LITTLE_ENDIAN 1234 10 | #endif 11 | 12 | #ifndef BYTE_ORDER 13 | #if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN) 14 | #define BYTE_ORDER LITTLE_ENDIAN 15 | #else 16 | #define BYTE_ORDER BIG_ENDIAN 17 | #endif 18 | #endif 19 | 20 | #endif /* __MACHINE_ENDIAN_H__ */ 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHMALLOC_H_ 2 | #define _MACHMALLOC_H_ 3 | 4 | /* place holder so platforms may add malloc.h extensions */ 5 | 6 | #endif /* _MACHMALLOC_H_ */ 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/param.h: -------------------------------------------------------------------------------- 1 | /* Place holder for machine-specific param.h. */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHSTDLIB_H_ 2 | #define _MACHSTDLIB_H_ 3 | 4 | /* place holder so platforms may add stdlib.h extensions */ 5 | 6 | #endif /* _MACHSTDLIB_H_ */ 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/termios.h: -------------------------------------------------------------------------------- 1 | #define __MAX_BAUD B4000000 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/machine/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHTIME_H_ 2 | #define _MACHTIME_H_ 3 | 4 | #if defined(__rtems__) 5 | #define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK) 6 | #else /* !__rtems__ */ 7 | #if defined(__aarch64__) || defined(__arm__) || defined(__thumb__) 8 | #define _CLOCKS_PER_SEC_ 100 9 | #endif 10 | #endif /* !__rtems__ */ 11 | 12 | #ifdef __SPU__ 13 | #include 14 | int nanosleep (const struct timespec *, struct timespec *); 15 | #endif 16 | 17 | #endif /* _MACHTIME_H_ */ 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/paths.h: -------------------------------------------------------------------------------- 1 | #ifndef _PATHS_H_ 2 | #define _PATHS_H_ 3 | 4 | #define _PATH_DEV "/dev/" 5 | #define _PATH_DEVNULL "/dev/null" 6 | #define _PATH_DEVZERO "/dev/zero" 7 | #define _PATH_BSHELL "/bin/sh" 8 | 9 | #endif /* _PATHS_H_ */ 10 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/regdef.h: -------------------------------------------------------------------------------- 1 | /* regdef.h -- define register names. */ 2 | 3 | /* This is a standard include file for MIPS targets. Other target 4 | probably don't define it, and attempts to include this file will 5 | fail. */ 6 | 7 | #include 8 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | setjmp.h 3 | stubs for future use. 4 | */ 5 | 6 | #ifndef _SETJMP_H_ 7 | #define _SETJMP_H_ 8 | 9 | #include "_ansi.h" 10 | #include 11 | 12 | _BEGIN_STD_C 13 | 14 | void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); 15 | int _EXFUN(setjmp,(jmp_buf __jmpb)); 16 | 17 | _END_STD_C 18 | 19 | #endif /* _SETJMP_H_ */ 20 | 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/custom_file.h: -------------------------------------------------------------------------------- 1 | #error System-specific custom_file.h is missing. 2 | 3 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/dir.h: -------------------------------------------------------------------------------- 1 | /* BSD predecessor of POSIX.1 and struct dirent */ 2 | 3 | #ifndef _SYS_DIR_H_ 4 | #define _SYS_DIR_H_ 5 | 6 | #include 7 | 8 | #define direct dirent 9 | 10 | #endif /*_SYS_DIR_H_*/ 11 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/dirent.h: -------------------------------------------------------------------------------- 1 | /* includes , which is this file. On a 2 | system which supports , this file is overridden by 3 | dirent.h in the libc/sys/.../sys directory. On a system which does 4 | not support , we will get this file which uses #error to force 5 | an error. */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #error " not supported" 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/fcntl.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_FCNTL_H_ 2 | #define _SYS_FCNTL_H_ 3 | #include 4 | #endif 5 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/file.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/resource.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_RESOURCE_H_ 2 | #define _SYS_RESOURCE_H_ 3 | 4 | #include 5 | 6 | #define RUSAGE_SELF 0 /* calling process */ 7 | #define RUSAGE_CHILDREN -1 /* terminated child processes */ 8 | 9 | struct rusage { 10 | struct timeval ru_utime; /* user time used */ 11 | struct timeval ru_stime; /* system time used */ 12 | }; 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/string.h: -------------------------------------------------------------------------------- 1 | /* This is a dummy used as a placeholder for 2 | systems that need to have a special header file. */ 3 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/sys/utime.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_UTIME_H 2 | #define _SYS_UTIME_H 3 | 4 | /* This is a dummy file, not customized for any 5 | particular system. If there is a utime.h in libc/sys/SYSDIR/sys, 6 | it will override this one. */ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | struct utimbuf 13 | { 14 | time_t actime; 15 | time_t modtime; 16 | }; 17 | 18 | #ifdef __cplusplus 19 | }; 20 | #endif 21 | 22 | #endif /* _SYS_UTIME_H */ 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/termios.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | #include 5 | #ifdef __cplusplus 6 | } 7 | #endif 8 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNISTD_H_ 2 | #define _UNISTD_H_ 3 | 4 | # include 5 | 6 | #endif /* _UNISTD_H_ */ 7 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/utime.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #include <_ansi.h> 6 | 7 | /* The utime function is defined in libc/sys//sys if it exists. */ 8 | #include 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/include/utmp.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | #include 5 | #ifdef __cplusplus 6 | } 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/machine/i386/f_math.h: -------------------------------------------------------------------------------- 1 | #ifndef __F_MATH_H__ 2 | #define __F_MATH_H__ 3 | 4 | #include <_ansi.h> 5 | #include "fdlibm.h" 6 | 7 | __inline__ 8 | static 9 | int 10 | _DEFUN (check_finite, (x), 11 | double x) 12 | { 13 | __int32_t hx; 14 | GET_HIGH_WORD(hx,x); 15 | return (int)((__uint32_t)((hx&0x7fffffff)-0x7ff00000)>>31); 16 | } 17 | 18 | __inline__ 19 | static 20 | int 21 | _DEFUN (check_finitef, (x), 22 | float x) 23 | { 24 | __int32_t ix; 25 | GET_FLOAT_WORD(ix,x); 26 | return (int)((__uint32_t)((ix&0x7fffffff)-0x7f800000)>>31); 27 | } 28 | 29 | #endif /* __F_MATH_H__ */ 30 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/misc/misc.tex: -------------------------------------------------------------------------------- 1 | @node Misc 2 | @chapter Miscellaneous Macros and Functions 3 | This chapter describes miscellaneous routines not covered elsewhere. 4 | 5 | @menu 6 | * ffs:: Return first bit set in a word 7 | * unctrl:: Return printable representation of a character 8 | @end menu 9 | 10 | @page 11 | @include misc/ffs.def 12 | 13 | @page 14 | @include misc/unctrl.def 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/_isatty.c: -------------------------------------------------------------------------------- 1 | /* isatty.c */ 2 | 3 | /* Dumb implementation so programs will at least run. */ 4 | 5 | #include 6 | #include 7 | 8 | int 9 | _DEFUN(_isatty, (fd), int fd) 10 | { 11 | struct stat buf; 12 | 13 | if (fstat (fd, &buf) < 0) { 14 | errno = EBADF; 15 | return 0; 16 | } 17 | if (S_ISCHR (buf.st_mode)) 18 | return 1; 19 | errno = ENOTTY; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/creat.c: -------------------------------------------------------------------------------- 1 | /* creat() "system call" */ 2 | 3 | /* This is needed by f2c and therefore the SPEC benchmarks. */ 4 | 5 | #include 6 | 7 | int 8 | _DEFUN(creat, (path, mode), 9 | const char *path _AND 10 | mode_t mode) 11 | { 12 | return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/execve.c: -------------------------------------------------------------------------------- 1 | #ifndef _NO_EXECVE 2 | 3 | /* execve.c */ 4 | 5 | /* This and the other exec*.c files in this directory require 6 | the target to provide the _execve syscall. */ 7 | 8 | 9 | #include 10 | 11 | 12 | int 13 | _DEFUN(execve, (path, argv, envp), 14 | const char *path _AND 15 | char * const argv[] _AND 16 | char * const envp[]) 17 | { 18 | return _execve (path, argv, envp); 19 | } 20 | 21 | #endif /* !_NO_EXECVE */ 22 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/isatty.c: -------------------------------------------------------------------------------- 1 | /* isatty.c */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN(isatty, (fd), int fd) 8 | { 9 | return _isatty (fd); 10 | } 11 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/posix.tex: -------------------------------------------------------------------------------- 1 | @node Posix 2 | @chapter Posix Functions 3 | 4 | This chapter groups several utility functions specified by POSIX, but 5 | not by C. Each function documents which header to use. 6 | 7 | @menu 8 | * popen:: Create a stream tied to a child process 9 | @end menu 10 | 11 | @page 12 | @include posix/popen.def 13 | 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/sleep.c: -------------------------------------------------------------------------------- 1 | /* libc/posix/sleep.c - sleep function */ 2 | 3 | /* Written 2000 by Werner Almesberger */ 4 | 5 | #ifdef HAVE_NANOSLEEP 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | unsigned sleep(unsigned seconds) 12 | { 13 | struct timespec ts; 14 | 15 | ts.tv_sec = seconds; 16 | ts.tv_nsec = 0; 17 | if (!nanosleep(&ts,&ts)) return 0; 18 | if (errno == EINTR) return ts.tv_sec; 19 | return -1; 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/posix/usleep.c: -------------------------------------------------------------------------------- 1 | /* libc/posix/usleep.c - usleep function */ 2 | 3 | /* Written 2002 by Jeff Johnston */ 4 | 5 | #ifdef HAVE_NANOSLEEP 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | int usleep(useconds_t useconds) 12 | { 13 | struct timespec ts; 14 | 15 | ts.tv_sec = (long int)useconds / 1000000; 16 | ts.tv_nsec = ((long int)useconds % 1000000) * 1000; 17 | if (!nanosleep(&ts,&ts)) return 0; 18 | if (errno == EINTR) return ts.tv_sec; 19 | return -1; 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/reent/getreent.c: -------------------------------------------------------------------------------- 1 | /* default reentrant pointer when multithread enabled */ 2 | 3 | #include <_ansi.h> 4 | #include 5 | 6 | #ifdef __getreent 7 | #undef __getreent 8 | #endif 9 | 10 | struct _reent * 11 | _DEFUN_VOID(__getreent) 12 | { 13 | return _impure_ptr; 14 | } 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/reent/signgam.c: -------------------------------------------------------------------------------- 1 | /* The signgam variable is stored in the reentrancy structure. This 2 | function returns its address for use by the macro signgam defined in 3 | math.h. */ 4 | 5 | #include 6 | #include 7 | 8 | #ifndef _REENT_ONLY 9 | 10 | int * 11 | _DEFUN_VOID (__signgam) 12 | { 13 | return &_REENT_SIGNGAM(_REENT); 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdio64/dummy.c: -------------------------------------------------------------------------------- 1 | /* empty stub so there's at least one file to put in objectlist.awk.in */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/__exp10.c: -------------------------------------------------------------------------------- 1 | /* 2 | * compute 10**x by successive squaring. 3 | */ 4 | 5 | #include <_ansi.h> 6 | #include "std.h" 7 | 8 | double 9 | _DEFUN (__exp10, (x), 10 | unsigned x) 11 | { 12 | static _CONST double powtab[] = 13 | {1.0, 14 | 10.0, 15 | 100.0, 16 | 1000.0, 17 | 10000.0}; 18 | 19 | if (x < (sizeof (powtab) / sizeof (double))) 20 | return powtab[x]; 21 | else if (x & 1) 22 | { 23 | return 10.0 * __exp10 (x - 1); 24 | } 25 | else 26 | { 27 | double n = __exp10 (x / 2); 28 | return n * n; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/__ten_mu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * [atw] multiply 64 bit accumulator by 10 and add digit. 3 | * The KA/CA way to do this should be to use 4 | * a 64-bit integer internally and use "adjust" to 5 | * convert it to float at the end of processing. 6 | */ 7 | 8 | #include <_ansi.h> 9 | #include "std.h" 10 | 11 | int 12 | _DEFUN (__ten_mul, (acc, digit), 13 | double *acc _AND 14 | int digit) 15 | { 16 | /* 17 | * [atw] Crude, but effective (at least on a KB)... 18 | */ 19 | 20 | *acc *= 10; 21 | *acc += digit; 22 | 23 | return 0; /* no overflow */ 24 | } 25 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/atexit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common definitions for atexit-like routines 3 | */ 4 | 5 | enum __atexit_types 6 | { 7 | __et_atexit, 8 | __et_onexit, 9 | __et_cxa 10 | }; 11 | 12 | void __call_exitprocs _PARAMS ((int, _PTR)); 13 | int __register_exitproc _PARAMS ((int, void (*fn) (void), _PTR, _PTR)); 14 | 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/atoff.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include <_ansi.h> 3 | 4 | float 5 | _DEFUN (atoff, (s), 6 | _CONST char *s) 7 | { 8 | return strtof (s, NULL); 9 | } 10 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/atol.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Andy Wilson, 2-Oct-89. 3 | */ 4 | 5 | #include 6 | #include <_ansi.h> 7 | 8 | #ifndef _REENT_ONLY 9 | long 10 | _DEFUN (atol, (s), _CONST char *s) 11 | { 12 | return strtol (s, NULL, 10); 13 | } 14 | #endif /* !_REENT_ONLY */ 15 | 16 | long 17 | _DEFUN (_atol_r, (ptr, s), struct _reent *ptr _AND _CONST char *s) 18 | { 19 | return _strtol_r (ptr, s, NULL, 10); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/cxa_finalize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Implementation if __cxa_finalize. 3 | */ 4 | 5 | 6 | #include 7 | #include 8 | #include "atexit.h" 9 | 10 | /* 11 | * Call registered exit handlers. If D is null then all handlers are called, 12 | * otherwise only the handlers from that DSO are called. 13 | */ 14 | 15 | void 16 | _DEFUN (__cxa_finalize, (d), 17 | void * d) 18 | { 19 | __call_exitprocs (0, d); 20 | } 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/dtoastub.c: -------------------------------------------------------------------------------- 1 | #include <_ansi.h> 2 | #include 3 | #include 4 | #include 5 | 6 | /* Nothing in newlib actually *calls* dtoa, they all call _dtoa_r, so this 7 | is a safe way of providing it to the user. */ 8 | #ifndef _REENT_ONLY 9 | 10 | char * 11 | _DEFUN (__dtoa, 12 | (d, mode, ndigits, decpt, sign, rve), 13 | double d _AND 14 | int mode _AND 15 | int ndigits _AND 16 | int *decpt _AND 17 | int *sign _AND 18 | char **rve) 19 | { 20 | return _dtoa_r (_REENT, d, mode, ndigits, decpt, sign, rve); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/malign.c: -------------------------------------------------------------------------------- 1 | #ifndef MALLOC_PROVIDED 2 | /* malign.c -- a wrapper for memalign_r. */ 3 | 4 | #include <_ansi.h> 5 | #include 6 | #include 7 | #include 8 | 9 | #ifndef _REENT_ONLY 10 | 11 | _PTR 12 | _DEFUN (memalign, (align, nbytes), 13 | size_t align _AND 14 | size_t nbytes) 15 | { 16 | return _memalign_r (_REENT, align, nbytes); 17 | } 18 | 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/mbrlen.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | size_t 9 | mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps) 10 | { 11 | #ifdef _MB_CAPABLE 12 | if (ps == NULL) 13 | { 14 | struct _reent *reent = _REENT; 15 | 16 | _REENT_CHECK_MISC(reent); 17 | ps = &(_REENT_MBRLEN_STATE(reent)); 18 | } 19 | #endif 20 | 21 | return mbrtowc(NULL, s, n, ps); 22 | } 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/mbsinit.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int 8 | mbsinit(const mbstate_t *ps) 9 | { 10 | if (ps == NULL || ps->__count == 0) 11 | return 1; 12 | else 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/msize.c: -------------------------------------------------------------------------------- 1 | #ifndef MALLOC_PROVIDED 2 | /* msize.c -- a wrapper for malloc_usable_size. */ 3 | 4 | #include <_ansi.h> 5 | #include 6 | #include 7 | #include 8 | 9 | #ifndef _REENT_ONLY 10 | 11 | size_t 12 | _DEFUN (malloc_usable_size, (ptr), 13 | _PTR ptr) 14 | { 15 | return _malloc_usable_size_r (_REENT, ptr); 16 | } 17 | 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/mtrim.c: -------------------------------------------------------------------------------- 1 | #ifndef MALLOC_PROVIDED 2 | /* mtrim.c -- a wrapper for malloc_trim. */ 3 | 4 | #include <_ansi.h> 5 | #include 6 | #include 7 | #include 8 | 9 | #ifndef _REENT_ONLY 10 | 11 | int 12 | _DEFUN (malloc_trim, (pad), 13 | size_t pad) 14 | { 15 | return _malloc_trim_r (_REENT, pad); 16 | } 17 | 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/realloc.c: -------------------------------------------------------------------------------- 1 | #ifdef MALLOC_PROVIDED 2 | int _dummy_realloc = 1; 3 | #else 4 | /* realloc.c -- a wrapper for realloc_r. */ 5 | 6 | #include <_ansi.h> 7 | #include 8 | #include 9 | #include 10 | 11 | #ifndef _REENT_ONLY 12 | 13 | _PTR 14 | _DEFUN (realloc, (ap, nbytes), 15 | _PTR ap _AND 16 | size_t nbytes) 17 | { 18 | return _realloc_r (_REENT, ap, nbytes); 19 | } 20 | 21 | #endif 22 | #endif /* MALLOC_PROVIDED */ 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/valloc.c: -------------------------------------------------------------------------------- 1 | #ifndef MALLOC_PROVIDED 2 | /* valloc.c -- a wrapper for valloc_r and pvalloc_r. */ 3 | 4 | #include <_ansi.h> 5 | #include 6 | #include 7 | #include 8 | 9 | #ifndef _REENT_ONLY 10 | 11 | _PTR 12 | _DEFUN (valloc, (nbytes), 13 | size_t nbytes) 14 | { 15 | return _valloc_r (_REENT, nbytes); 16 | } 17 | 18 | _PTR 19 | _DEFUN (pvalloc, (nbytes), 20 | size_t nbytes) 21 | { 22 | return _pvalloc_r (_REENT, nbytes); 23 | } 24 | 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/stdlib/wctob.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "local.h" 7 | 8 | int 9 | wctob (wint_t wc) 10 | { 11 | struct _reent *reent; 12 | mbstate_t mbs; 13 | unsigned char pmb[MB_LEN_MAX]; 14 | 15 | if (wc == WEOF) 16 | return EOF; 17 | 18 | /* Put mbs in initial state. */ 19 | memset (&mbs, '\0', sizeof (mbs)); 20 | 21 | reent = _REENT; 22 | _REENT_CHECK_MISC(reent); 23 | 24 | return __wctomb (reent, (char *) pmb, wc, __locale_charset (), &mbs) == 1 25 | ? (int) pmb[0] : EOF; 26 | } 27 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/strdup.c: -------------------------------------------------------------------------------- 1 | #ifndef _REENT_ONLY 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | char * 8 | _DEFUN (strdup, (str), _CONST char *str) 9 | { 10 | return _strdup_r (_REENT, str); 11 | } 12 | 13 | #endif /* !_REENT_ONLY */ 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/strdup_r.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char * 6 | _DEFUN (_strdup_r, (reent_ptr, str), 7 | struct _reent *reent_ptr _AND 8 | _CONST char *str) 9 | { 10 | size_t len = strlen (str) + 1; 11 | char *copy = _malloc_r (reent_ptr, len); 12 | if (copy) 13 | { 14 | memcpy (copy, str, len); 15 | } 16 | return copy; 17 | } 18 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/strndup.c: -------------------------------------------------------------------------------- 1 | #ifndef _REENT_ONLY 2 | 3 | #include <_ansi.h> 4 | #include 5 | #include 6 | #include 7 | 8 | char * 9 | _DEFUN (strndup, (str, n), 10 | _CONST char *str _AND 11 | size_t n) 12 | { 13 | return _strndup_r (_REENT, str, n); 14 | } 15 | 16 | #endif /* !_REENT_ONLY */ 17 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/strndup_r.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char * 6 | _DEFUN (_strndup_r, (reent_ptr, str, n), 7 | struct _reent *reent_ptr _AND 8 | _CONST char *str _AND 9 | size_t n) 10 | { 11 | _CONST char *ptr = str; 12 | size_t len; 13 | char *copy; 14 | 15 | while (n-- > 0 && *ptr) 16 | ptr++; 17 | 18 | len = ptr - str; 19 | 20 | copy = _malloc_r (reent_ptr, len + 1); 21 | if (copy) 22 | { 23 | memcpy (copy, str, len); 24 | copy[len] = '\0'; 25 | } 26 | return copy; 27 | } 28 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/strsep.c: -------------------------------------------------------------------------------- 1 | /* BSD strsep function */ 2 | 3 | /* Copyright 2002, Red Hat Inc. */ 4 | 5 | /* undef STRICT_ANSI so that strsep prototype will be defined */ 6 | #undef __STRICT_ANSI__ 7 | #include 8 | #include <_ansi.h> 9 | #include 10 | 11 | extern char *__strtok_r (char *, const char *, char **, int); 12 | 13 | char * 14 | _DEFUN (strsep, (source_ptr, delim), 15 | register char **source_ptr _AND 16 | register const char *delim) 17 | { 18 | return __strtok_r (*source_ptr, delim, source_ptr, 0); 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/string/u_strerr.c: -------------------------------------------------------------------------------- 1 | #include <_ansi.h> 2 | 3 | char * 4 | _DEFUN(_user_strerror, (errnum, internal, errptr), 5 | int errnum _AND 6 | int internal _AND 7 | int *errptr) 8 | { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/cfreer.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void 4 | _cfree_r (struct _reent *ptr, void *mem) 5 | { 6 | return cfree (mem); 7 | } 8 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/config.ih: -------------------------------------------------------------------------------- 1 | #ifndef _CONFIG_IH 2 | 3 | #endif -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/crt0.S: -------------------------------------------------------------------------------- 1 | .global _start 2 | .extern main 3 | .extern exit 4 | .extern get_argc 5 | .extern get_argv 6 | .extern _init 7 | .extern _fini 8 | .extern btos_open_std_streams 9 | _start: 10 | call btos_open_std_streams 11 | call _init 12 | call get_argv 13 | push %eax 14 | call get_argc 15 | push %eax 16 | call main 17 | push %eax 18 | call _fini 19 | pop %ebx 20 | mov $0x0805, %eax 21 | int $0x80 22 | .wait: 23 | jmp .wait -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/crti.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | _init: 4 | push %ebp 5 | 6 | .section .fini 7 | .global _fini 8 | _fini: 9 | push %ebp 10 | 11 | .section .data 12 | .global __dso_handle 13 | .weak __dso_handle 14 | .hidden __dso_handle 15 | __dso_handle: 16 | .long 0 -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/crtn.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | pop %ebp 3 | ret 4 | 5 | .section .fini 6 | pop %ebp 7 | ret 8 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/getenv.c: -------------------------------------------------------------------------------- 1 | #include "btos.h" 2 | 3 | char* getenv (const char* name){ 4 | static char buffer[BT_MAX_PATH]; 5 | if(bt_getenv(name, buffer, BT_MAX_PATH)) return buffer; 6 | else return NULL; 7 | } 8 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/semaphore.h: -------------------------------------------------------------------------------- 1 | #ifndef _SEMAPHORE_H_ 2 | #define _SEMAPHORE_H_ 3 | 4 | typedef int sem_t; 5 | 6 | int sem_close(sem_t *); 7 | int sem_destroy(sem_t *); 8 | int sem_getvalue(sem_t *restrict, int *restrict); 9 | int sem_init(sem_t *, int, unsigned); 10 | sem_t *sem_open(const char *, int, ...); 11 | int sem_post(sem_t *); 12 | int sem_timedwait(sem_t *restrict, const struct timespec *restrict); 13 | int sem_trywait(sem_t *); 14 | int sem_unlink(const char *); 15 | int sem_wait(sem_t *); 16 | 17 | #endif -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/signal.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) { return -1; } 5 | int sigprocmask(int how, const sigset_t *set, sigset_t *oset) { return -1; } 6 | _sig_func_ptr signal (int i, _sig_func_ptr p) { return SIG_ERR; }; 7 | int raise(int sig) { return -1; } 8 | void siglongjmp(sigjmp_buf env, int val) {}; 9 | int sigsetjmp(sigjmp_buf env, int savemask) { return 0; } 10 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/sys/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIMTS_H 2 | #define _LIMITS_H 3 | 4 | #include 5 | 6 | #define PATH_MAX BT_MAX_PATH 7 | 8 | #endif -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/sys/btos/sys/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_SETJMP_H 2 | #define _SYS_SETJMP_H 3 | 4 | #include 5 | 6 | //typedef struct {} jmp_buf; 7 | typedef struct {} sigjmp_buf; 8 | 9 | //void longjmp(jmp_buf, int); 10 | void siglongjmp(sigjmp_buf, int); 11 | void _longjmp(jmp_buf, int); 12 | 13 | //int setjmp(jmp_buf); 14 | int sigsetjmp(sigjmp_buf, int); 15 | int _setjmp(jmp_buf); 16 | 17 | #endif -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysclose.c: -------------------------------------------------------------------------------- 1 | /* connector for close */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (close, (fd), 8 | int fd) 9 | { 10 | return _close_r (_REENT, fd); 11 | } 12 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysexecve.c: -------------------------------------------------------------------------------- 1 | /* connector for execve */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (execve, (name, argv, env), 8 | _CONST char *name _AND 9 | char *_CONST argv[] _AND 10 | char *_CONST env[]) 11 | { 12 | return _execve_r (_REENT, name, argv, env); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysfcntl.c: -------------------------------------------------------------------------------- 1 | /* connector for fcntl */ 2 | /* only called from stdio/fdopen.c, so arg can be int. */ 3 | 4 | #include 5 | #include 6 | 7 | int 8 | _DEFUN (fcntl, (fd, flag, arg), 9 | int fd _AND 10 | int flag _AND 11 | int arg) 12 | { 13 | #ifdef HAVE_FCNTL 14 | return _fcntl_r (_REENT, fd, flag, arg); 15 | #else /* !HAVE_FCNTL */ 16 | errno = ENOSYS; 17 | return -1; 18 | #endif /* !HAVE_FCNTL */ 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysfork.c: -------------------------------------------------------------------------------- 1 | /* connector for fork */ 2 | 3 | /* Don't define this if NO_FORK. See for example libc/sys/win32/spawn.c. */ 4 | 5 | #ifndef NO_FORK 6 | 7 | #include 8 | #include 9 | 10 | int 11 | _DEFUN_VOID (fork) 12 | { 13 | return _fork_r (_REENT); 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysfstat.c: -------------------------------------------------------------------------------- 1 | /* connector for fstat */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | int 8 | _DEFUN (fstat, (fd, pstat), 9 | int fd _AND 10 | struct stat *pstat) 11 | { 12 | return _fstat_r (_REENT, fd, pstat); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysgetpid.c: -------------------------------------------------------------------------------- 1 | /* connector for getpid */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN_VOID (getpid) 8 | { 9 | return _getpid_r (_REENT); 10 | } 11 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysgettod.c: -------------------------------------------------------------------------------- 1 | /* connector for gettimeofday */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | int 8 | _DEFUN (gettimeofday, (ptimeval, ptimezone), 9 | struct timeval *ptimeval _AND 10 | void *ptimezone) 11 | { 12 | return _gettimeofday_r (_REENT, ptimeval, ptimezone); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysisatty.c: -------------------------------------------------------------------------------- 1 | /* connector for isatty */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (isatty, (fd), 8 | int fd) 9 | { 10 | #ifdef REENTRANT_SYSCALLS_PROVIDED 11 | return _isatty_r (_REENT, fd); 12 | #else 13 | return _isatty (fd); 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syskill.c: -------------------------------------------------------------------------------- 1 | /* connector for kill */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (kill, (pid, sig), 8 | int pid _AND 9 | int sig) 10 | { 11 | return _kill_r (_REENT, pid, sig); 12 | } 13 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syslink.c: -------------------------------------------------------------------------------- 1 | /* connector for link */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (link, (old, new), 8 | _CONST char *old _AND 9 | _CONST char *new) 10 | { 11 | return _link_r (_REENT, old, new); 12 | } 13 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syslseek.c: -------------------------------------------------------------------------------- 1 | /* connector for lseek */ 2 | 3 | #include 4 | #include 5 | 6 | off_t 7 | _DEFUN (lseek, (fd, pos, whence), 8 | int fd _AND 9 | off_t pos _AND 10 | int whence) 11 | { 12 | return _lseek_r (_REENT, fd, pos, whence); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysread.c: -------------------------------------------------------------------------------- 1 | /* connector for read */ 2 | 3 | #include 4 | #include 5 | 6 | _READ_WRITE_RETURN_TYPE 7 | _DEFUN (read, (fd, buf, cnt), 8 | int fd _AND 9 | void *buf _AND 10 | size_t cnt) 11 | { 12 | return _read_r (_REENT, fd, buf, cnt); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syssbrk.c: -------------------------------------------------------------------------------- 1 | /* connector for sbrk */ 2 | 3 | #include 4 | #include 5 | 6 | extern void *_sbrk_r (struct _reent *, ptrdiff_t); 7 | extern void *_sbrk (ptrdiff_t); 8 | 9 | void * 10 | _DEFUN (sbrk, (incr), 11 | ptrdiff_t incr) 12 | { 13 | return _sbrk_r (_REENT, incr); 14 | } 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysstat.c: -------------------------------------------------------------------------------- 1 | /* connector for stat */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | int 8 | _DEFUN (stat, (file, pstat), 9 | _CONST char *file _AND 10 | struct stat *pstat) 11 | { 12 | return _stat_r (_REENT, file, pstat); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/systimes.c: -------------------------------------------------------------------------------- 1 | /* connector for times */ 2 | 3 | #include 4 | #include 5 | 6 | clock_t 7 | _DEFUN (times, (buf), 8 | struct tms *buf) 9 | { 10 | return _times_r (_REENT, buf); 11 | } 12 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/sysunlink.c: -------------------------------------------------------------------------------- 1 | /* connector for unlink */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | _DEFUN (unlink, (file), 8 | _CONST char *file) 9 | { 10 | return _unlink_r (_REENT, file); 11 | } 12 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syswait.c: -------------------------------------------------------------------------------- 1 | /* connector for wait */ 2 | 3 | #include 4 | #include 5 | 6 | pid_t 7 | _DEFUN (wait, (status), 8 | int *status) 9 | { 10 | return _wait_r (_REENT, status); 11 | } 12 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/syscalls/syswrite.c: -------------------------------------------------------------------------------- 1 | /* connector for write */ 2 | 3 | #include 4 | #include 5 | 6 | _READ_WRITE_RETURN_TYPE 7 | _DEFUN (write, (fd, buf, cnt), 8 | int fd _AND 9 | const void *buf _AND 10 | size_t cnt) 11 | { 12 | return _write_r (_REENT, fd, buf, cnt); 13 | } 14 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/ctime_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ctime_r.c 3 | */ 4 | 5 | #include 6 | 7 | char * 8 | _DEFUN (ctime_r, (tim_p, result), 9 | _CONST time_t * tim_p _AND 10 | char * result) 11 | 12 | { 13 | struct tm tm; 14 | return asctime_r (localtime_r (tim_p, &tm), result); 15 | } 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/gettzinfo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* Shared timezone information for libc/time functions. */ 5 | static __tzinfo_type tzinfo = {1, 0, 6 | { {'J', 0, 0, 0, 0, (time_t)0, 0L }, 7 | {'J', 0, 0, 0, 0, (time_t)0, 0L } 8 | } 9 | }; 10 | 11 | __tzinfo_type * 12 | __gettzinfo (void) 13 | { 14 | return &tzinfo; 15 | } 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/gmtime_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | * gmtime_r.c 3 | */ 4 | 5 | #include 6 | #include "local.h" 7 | 8 | struct tm * 9 | _DEFUN (gmtime_r, (tim_p, res), 10 | _CONST time_t *__restrict tim_p _AND 11 | struct tm *__restrict res) 12 | { 13 | return (_mktm_r (tim_p, res, 1)); 14 | } 15 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/lcltime_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | * localtime_r.c 3 | * 4 | * Converts the calendar time pointed to by tim_p into a broken-down time 5 | * expressed as local time. Returns a pointer to a structure containing the 6 | * broken-down time. 7 | */ 8 | 9 | #include 10 | #include "local.h" 11 | 12 | struct tm * 13 | _DEFUN (localtime_r, (tim_p, res), 14 | _CONST time_t *__restrict tim_p _AND 15 | struct tm *__restrict res) 16 | { 17 | return _mktm_r (tim_p, res, 0); 18 | } 19 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/strptime.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/newlib/libc/time/strptime.c -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/time/tzvars.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* Global timezone variables. */ 4 | 5 | /* Default timezone to GMT */ 6 | char *_tzname[2] = {"GMT", "GMT"}; 7 | int _daylight = 0; 8 | long _timezone = 0; 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/unix/ttyname.h: -------------------------------------------------------------------------------- 1 | /* Common defines for ttyname.c and ttyname_r.c */ 2 | 3 | #include /* For MAXNAMLEN */ 4 | #include /* For _PATH_DEV */ 5 | 6 | #define TTYNAME_BUFSIZE (sizeof (_PATH_DEV) + MAXNAMLEN) 7 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libc/xdr/dummy.c: -------------------------------------------------------------------------------- 1 | /* empty stub so there's at least one file to put in objectlist.awk.in */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/common/local.h: -------------------------------------------------------------------------------- 1 | /* placeholder for future usage. */ 2 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/common/s_isinfd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * __isinfd(x) returns 1 if x is infinity, else 0; 3 | * no branching! 4 | * Added by Cygnus Support. 5 | */ 6 | 7 | #include "fdlibm.h" 8 | 9 | #ifndef _DOUBLE_IS_32BITS 10 | 11 | int 12 | _DEFUN (__isinfd, (x), 13 | double x) 14 | { 15 | __int32_t hx,lx; 16 | EXTRACT_WORDS(hx,lx,x); 17 | hx &= 0x7fffffff; 18 | hx |= (__uint32_t)(lx|(-lx))>>31; 19 | hx = 0x7ff00000 - hx; 20 | return 1 - (int)((__uint32_t)(hx|(-hx))>>31); 21 | } 22 | 23 | #endif /* _DOUBLE_IS_32BITS */ 24 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/common/sf_infinity.c: -------------------------------------------------------------------------------- 1 | /* 2 | * infinityf () returns the representation of infinity. 3 | * Added by Cygnus Support. 4 | */ 5 | 6 | #include "fdlibm.h" 7 | 8 | float infinityf() 9 | { 10 | float x; 11 | 12 | SET_FLOAT_WORD(x,0x7f800000); 13 | return x; 14 | } 15 | 16 | #ifdef _DOUBLE_IS_32BITS 17 | 18 | double infinity() 19 | { 20 | return (double) infinityf(); 21 | } 22 | 23 | #endif /* defined(_DOUBLE_IS_32BITS) */ 24 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/common/sf_isinff.c: -------------------------------------------------------------------------------- 1 | /* 2 | * __isinff(x) returns 1 if x is +-infinity, else 0; 3 | * Added by Cygnus Support. 4 | */ 5 | 6 | #include "fdlibm.h" 7 | 8 | int 9 | _DEFUN (__isinff, (x), 10 | float x) 11 | { 12 | __int32_t ix; 13 | GET_FLOAT_WORD(ix,x); 14 | ix &= 0x7fffffff; 15 | return FLT_UWORD_IS_INFINITE(ix); 16 | } 17 | 18 | #ifdef _DOUBLE_IS_32BITS 19 | 20 | int 21 | _DEFUN (__isinfd, (x), 22 | double x) 23 | { 24 | return __isinff((float) x); 25 | } 26 | 27 | #endif /* defined(_DOUBLE_IS_32BITS) */ 28 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/common/sf_nan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * nanf () returns a nan. 3 | * Added by Cygnus Support. 4 | */ 5 | 6 | #include "fdlibm.h" 7 | 8 | float nanf(const char *unused) 9 | { 10 | float x; 11 | 12 | SET_FLOAT_WORD(x,0x7fc00000); 13 | return x; 14 | } 15 | 16 | #ifdef _DOUBLE_IS_32BITS 17 | 18 | double nan(const char *arg) 19 | { 20 | return (double) nanf(arg); 21 | } 22 | 23 | #endif /* defined(_DOUBLE_IS_32BITS) */ 24 | 25 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/cabsf.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: cabsf.c,v 1.1 2007/08/20 16:01:30 drochner Exp $ */ 2 | 3 | /* 4 | * Written by Matthias Drochner . 5 | * Public domain. 6 | * 7 | * imported and modified include for newlib 2010/10/03 8 | * Marco Atzeri 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | float 15 | cabsf(float complex z) 16 | { 17 | 18 | return hypotf( crealf(z), cimagf(z) ); 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/cargf.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: cargf.c,v 1.1 2007/08/20 16:01:31 drochner Exp $ */ 2 | 3 | /* 4 | * Written by Matthias Drochner . 5 | * Public domain. 6 | * 7 | * imported and modified include for newlib 2010/10/03 8 | * Marco Atzeri 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | float 15 | cargf(float complex z) 16 | { 17 | 18 | return atan2f( cimagf(z), crealf(z) ); 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/cephes_subr.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: cephes_subr.h,v 1.1 2007/08/20 16:01:33 drochner Exp $ */ 2 | 3 | void _cchsh(double, double *, double *); 4 | double _redupi(double); 5 | double _ctans(double complex); 6 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/cephes_subrf.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: cephes_subrf.h,v 1.1 2007/08/20 16:01:34 drochner Exp $ */ 2 | 3 | void _cchshf(float, float *, float *); 4 | float _redupif(float); 5 | float _ctansf(float complex); 6 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/cimagf.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: cimagf.c,v 1.2 2010/09/15 16:11:29 christos Exp $ */ 2 | 3 | /* 4 | * Written by Matthias Drochner . 5 | * Public domain. 6 | * 7 | * imported and modified include for newlib 2010/10/03 8 | * Marco Atzeri 9 | */ 10 | 11 | #include 12 | #include "../common/fdlibm.h" 13 | 14 | float 15 | cimagf(float complex z) 16 | { 17 | float_complex w = { .z = z }; 18 | 19 | return (IMAG_PART(w)); 20 | } 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/conjf.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: conjf.c,v 1.2 2010/09/15 16:11:29 christos Exp $ */ 2 | 3 | /* 4 | * Written by Matthias Drochner . 5 | * Public domain. 6 | * 7 | * imported and modified include for newlib 2010/10/03 8 | * Marco Atzeri 9 | */ 10 | 11 | #include 12 | #include "../common/fdlibm.h" 13 | 14 | float complex 15 | conjf(float complex z) 16 | { 17 | float_complex w = { .z = z }; 18 | 19 | IMAG_PART(w) = -IMAG_PART(w); 20 | 21 | return (w.z); 22 | } 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/complex/crealf.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: crealf.c,v 1.2 2010/09/15 16:11:29 christos Exp $ */ 2 | 3 | /* 4 | * Written by Matthias Drochner . 5 | * Public domain. 6 | * 7 | * imported and modified include for newlib 2010/10/03 8 | * Marco Atzeri 9 | */ 10 | 11 | #include 12 | #include "../common/fdlibm.h" 13 | 14 | float 15 | crealf(float complex z) 16 | { 17 | float_complex w = { .z = z }; 18 | 19 | return (REAL_PART(w)); 20 | } 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/math/w_drem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * drem() wrapper for remainder(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | double 11 | drem(x, y) 12 | double x, y; 13 | { 14 | return remainder(x, y); 15 | } 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/math/w_sincos.c: -------------------------------------------------------------------------------- 1 | /* sincos -- currently no more efficient than two separate calls to 2 | sin and cos. */ 3 | 4 | #include "fdlibm.h" 5 | #include 6 | 7 | #ifndef _DOUBLE_IS_32BITS 8 | 9 | #ifdef __STDC__ 10 | void sincos(double x, double *sinx, double *cosx) 11 | #else 12 | void sincos(x, sinx, cosx) 13 | double x; 14 | double *sinx; 15 | double *cosx; 16 | #endif 17 | { 18 | *sinx = sin (x); 19 | *cosx = cos (x); 20 | } 21 | 22 | #endif /* defined(_DOUBLE_IS_32BITS) */ 23 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/math/wf_drem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * dremf() wrapper for remainderf(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | float 11 | #ifdef __STDC__ 12 | dremf(float x, float y) 13 | #else 14 | dremf(x, y) 15 | float x, y; 16 | #endif 17 | { 18 | return remainderf(x, y); 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/s_exp2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 | * 3 | * Permission to use, copy, modify, and distribute this software 4 | * is freely granted, provided that this notice is preserved. 5 | */ 6 | 7 | #include "fdlibm.h" 8 | 9 | #ifndef _DOUBLE_IS_32BITS 10 | 11 | double 12 | _DEFUN (exp2, (double), 13 | double x) 14 | { 15 | return pow(2.0, x); 16 | } 17 | 18 | #endif /* _DOUBLE_IS_32BITS */ 19 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/sf_exp2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 | * 3 | * Permission to use, copy, modify, and distribute this software 4 | * is freely granted, provided that this notice is preserved. 5 | */ 6 | 7 | #include "fdlibm.h" 8 | 9 | float 10 | _DEFUN (exp2f, (float), 11 | float x) 12 | { 13 | return powf(2.0, x); 14 | } 15 | 16 | #ifdef _DOUBLE_IS_32BITS 17 | 18 | double exp2 (double x) 19 | { 20 | return (double) exp2f ((float) x); 21 | } 22 | 23 | #endif /* _DOUBLE_IS_32BITS */ 24 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/w_cabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cabs() wrapper for hypot(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | struct complex { 11 | double x; 12 | double y; 13 | }; 14 | 15 | double 16 | cabs(z) 17 | struct complex z; 18 | { 19 | return hypot(z.x, z.y); 20 | } 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/w_drem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * drem() wrapper for remainder(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | double 11 | drem(x, y) 12 | double x, y; 13 | { 14 | return remainder(x, y); 15 | } 16 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/wf_cabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cabsf() wrapper for hypotf(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | struct complex { 11 | float x; 12 | float y; 13 | }; 14 | 15 | float 16 | cabsf(z) 17 | struct complex z; 18 | { 19 | return hypotf(z.x, z.y); 20 | } 21 | -------------------------------------------------------------------------------- /src/user/libs/newlib/libm/mathfp/wf_drem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * dremf() wrapper for remainderf(). 3 | * 4 | * Written by J.T. Conklin, 5 | * Placed into the Public Domain, 1994. 6 | */ 7 | 8 | #include "fdlibm.h" 9 | 10 | float 11 | #ifdef __STDC__ 12 | dremf(float x, float y) 13 | #else 14 | dremf(x, y) 15 | float x, y; 16 | #endif 17 | { 18 | return remainderf(x, y); 19 | } 20 | -------------------------------------------------------------------------------- /src/user/libs/registry/regutil.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using std::vector; 4 | using std::string; 5 | 6 | namespace btos_api{ 7 | namespace registry{ 8 | 9 | string GetFeaturePath(uint64_t id){ 10 | auto feat = GetFeatureById(id); 11 | auto pkg = GetPackageById(feat.package); 12 | if(feat.path.empty() || feat.path.back() != '/') feat.path += '/'; 13 | return pkg.path + feat.path + feat.file; 14 | } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /src/user/libs/resc/elf.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RESC_ELF_HPP 2 | #define _RESC_ELF_HPP 3 | 4 | #include 5 | 6 | struct ElfRescInfo{ 7 | std::streampos position; 8 | std::streamsize size; 9 | 10 | ElfRescInfo() = default; 11 | ElfRescInfo(std::streampos p, std::streamsize s) : position(p), size(s) {} 12 | }; 13 | 14 | ElfRescInfo GetElfRescInfo(int fd); 15 | 16 | #endif -------------------------------------------------------------------------------- /src/user/libs/resc/resc/file2.txt: -------------------------------------------------------------------------------- 1 | This is another resource file. It is seperate and contains different data. -------------------------------------------------------------------------------- /src/user/libs/resc/resc/test.txt: -------------------------------------------------------------------------------- 1 | Hello world! From a resource! 2 | -------------------------------------------------------------------------------- /src/user/libs/resc/virt_handles.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _VIRT_HANDLES_HPP 2 | #define _VIRT_HANDLES_HPP 3 | 4 | #include 5 | #include 6 | 7 | virtual_handle MemoryVirtualHandle(const char *data, const size_t size); 8 | virtual_handle FileOffsetVirtualHandle(int fd, off_t offset, off_t size, bool close = false); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/user/libs/shell/resc/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Shell Library Test 3 | category = Tests 4 | vendor = BT/OS 5 | icon = shelltest 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/libs/shell/resc/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/shell/resc/icon_16.png -------------------------------------------------------------------------------- /src/user/libs/shell/resc/icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/libs/shell/resc/icon_32.png -------------------------------------------------------------------------------- /src/user/libs/shell/resc/icons.inf: -------------------------------------------------------------------------------- 1 | [shelltest] 2 | 16 = icon_16.png 3 | 32 = icon_32.png 4 | -------------------------------------------------------------------------------- /src/user/libs/shell/shell_internal.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SHELL_INTERNAL_HPP 2 | #define _SHELL_INTERNAL_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace btos_api{ 8 | namespace gui{ 9 | namespace shell{ 10 | 11 | std::shared_ptr LoadIcon(const char *path); 12 | 13 | } 14 | } 15 | } 16 | #endif -------------------------------------------------------------------------------- /src/user/libs/sm/to_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _TO_STRING_HPP 2 | #define _TO_STRING_HPP 3 | 4 | #include 5 | #include 6 | 7 | template < typename T > std::string to_string( const T& n ) 8 | { 9 | std::ostringstream stm ; 10 | stm << n ; 11 | return stm.str() ; 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/user/system/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := eloader spawn switcher gds wm sm registry dm clipboard 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/system/clipboard/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Clipboard Server 3 | vendor = BT/OS 4 | icon = clipboard 5 | mode = System 6 | -------------------------------------------------------------------------------- /src/user/system/clipboard/icons.inf: -------------------------------------------------------------------------------- 1 | [clipboard] 2 | 16 = icons/clipboard_16.png 3 | 32 = icons/clipboard_32.png 4 | -------------------------------------------------------------------------------- /src/user/system/clipboard/service.ini: -------------------------------------------------------------------------------- 1 | [service] 2 | 3 | name = clipboard 4 | path = $this$ 5 | sticky = true 6 | -------------------------------------------------------------------------------- /src/user/system/eloader/el_malloc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _EL_MALLOC_HPP 2 | #define _EL_MALLOC_HPP 3 | 4 | #include 5 | 6 | #include "liballoc.h" 7 | 8 | static const size_t Page_Size = 4096; 9 | 10 | #endif -------------------------------------------------------------------------------- /src/user/system/eloader/libpath.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _LIBPATH_HPP 2 | #define _LIBPATH_HPP 3 | 4 | btos_api::bt_handle_t open_lib(const char *name, char **fullpath); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/user/system/eloader/linker.ld: -------------------------------------------------------------------------------- 1 | ENTRY(_start) 2 | 3 | SECTIONS 4 | { 5 | . = 3072M; 6 | } 7 | -------------------------------------------------------------------------------- /src/user/system/gds/drawingop.cpp: -------------------------------------------------------------------------------- 1 | #include "drawingop.hpp" 2 | -------------------------------------------------------------------------------- /src/user/system/gds/drawingop.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _DRAWINGOP_HPP 2 | #define _DRAWINGOP_HPP 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuMathTeXGyre.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuMathTeXGyre.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSans-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSans-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSans-BoldOblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSans-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSans-ExtraLight.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSans-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSans-Oblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSans.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansCondensed-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansCondensed-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansCondensed-BoldOblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansCondensed-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansCondensed-Oblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansCondensed.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansMono-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansMono-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansMono-BoldOblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansMono-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansMono-Oblique.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSansMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSansMono.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerif-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerif-Italic.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerif.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerif.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerifCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerifCondensed-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerifCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerifCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerifCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerifCondensed-Italic.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/DejaVuSerifCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/DejaVuSerifCondensed.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/Gputeks-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/Gputeks-Bold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/Gputeks-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/Gputeks-Regular.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/Resagnicto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/Resagnicto.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResagnictoBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResagnictoBold.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResagnictoItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResagnictoItalic.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/Resagokr.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/Resagokr.otf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResagokrBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResagokrBold.otf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResagokrLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResagokrLight.otf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResamitzBold_0048.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResamitzBold_0048.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/ResamitzItalic_0048.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/ResamitzItalic_0048.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/Resamitz_0048.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/Resamitz_0048.ttf -------------------------------------------------------------------------------- /src/user/system/gds/fonts/unscii-16.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/system/gds/fonts/unscii-16.ttf -------------------------------------------------------------------------------- /src/user/system/gds/gd/gd_color.h: -------------------------------------------------------------------------------- 1 | #ifndef GD_COLOR_H 2 | #define GD_COLOR_H 1 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int gdColorMatch(gdImagePtr im, int col1, int col2, float threshold); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/user/system/gds/gd/gd_nnquant.h: -------------------------------------------------------------------------------- 1 | 2 | /* maximum number of colours that can be used. 3 | actual number is now passed to initcolors */ 4 | #define MAXNETSIZE 256 5 | 6 | /* For 256 colours, fixed arrays need 8kb, plus space for the image 7 | ---------------------------------------------------------------- */ 8 | 9 | 10 | /* four primes near 500 - assume no image has a length so large */ 11 | /* that it is divisible by all four primes */ 12 | #define prime1 499 13 | #define prime2 491 14 | #define prime3 487 15 | #define prime4 503 16 | 17 | #define minpicturebytes (4*prime4) /* minimum size for input image */ 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/user/system/registry/registry.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _REGISTRY_INTERNAL_HPP 2 | #define _REGISTRY_INTERNAL_HPP 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #include "tables.hpp" 10 | 11 | extern btos_api::MessageLoop msgloop; 12 | 13 | Feature GetAssociation(const std::string &path); 14 | 15 | namespace btos_api{ 16 | namespace registry{ 17 | extern std::vector> InitAPI(); 18 | } 19 | } 20 | 21 | #endif -------------------------------------------------------------------------------- /src/user/system/sm/serviceresolver.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SERVICERESOLVER_HPP 2 | #define _SERVICERESOLVER_HPP 3 | 4 | #include 5 | 6 | class SessionServiceResolver : public btos_api::sm::IServiceResolver{ 7 | private: 8 | std::map serviceCache; 9 | public: 10 | SessionServiceResolver(); 11 | std::pair GetService(const std::string &name) override; 12 | std::vector GetServices() override; 13 | 14 | void UpdateCache(); 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/user/system/sm/sessions/cmd.ini: -------------------------------------------------------------------------------- 1 | [session] 2 | 3 | name=Command Line 4 | lead=$systemdrive$:/BTOS/CMD/CMD.ELX 5 | -------------------------------------------------------------------------------- /src/user/system/sm/sessions/debug.ini: -------------------------------------------------------------------------------- 1 | [session] 2 | 3 | name=Debugger 4 | lead=$systemdrive$:/BTOS/BIN/DEBUG.ELX 5 | -------------------------------------------------------------------------------- /src/user/system/sm/sessions/services/gds.ini: -------------------------------------------------------------------------------- 1 | [service] 2 | 3 | name = gds 4 | path = $systemdrive$:/BTOS/SYSTEM/GDS.ELX 5 | cleanup = $systemdrive$:/BTOS/CMD/TERMCTL.ELX reset 6 | -------------------------------------------------------------------------------- /src/user/system/sm/sessions/services/wm.ini: -------------------------------------------------------------------------------- 1 | [service] 2 | 3 | name = wm 4 | path = $systemdrive$:/BTOS/SYSTEM/WM.ELX 5 | -------------------------------------------------------------------------------- /src/user/system/sm/sessions/wmmenu.ini: -------------------------------------------------------------------------------- 1 | [session] 2 | 3 | name=GUI (Menu) 4 | lead=$systemdrive$:/BTOS/BIN/WMMENU.ELX 5 | 6 | [services] 7 | 0: gds 8 | 1: wm 9 | -------------------------------------------------------------------------------- /src/user/system/spawn/spawn.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char **argv){ 5 | if(argc < 2) return 1; 6 | char *name=argv[1]; 7 | char **params=NULL; 8 | if(argc > 2) params=&argv[2]; 9 | while(1){ 10 | int res=execve(name, params, NULL); 11 | if(res<0) break; 12 | else wait(NULL); 13 | } 14 | return 0; 15 | } -------------------------------------------------------------------------------- /src/user/system/switcher/switcher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SWITCHER_HPP 2 | #define _SWITCHER_HPP 3 | 4 | #include 5 | #include 6 | 7 | std::vector split(const std::string &str, char delim); 8 | 9 | struct term{ 10 | uint64_t id; 11 | std::string title; 12 | }; 13 | 14 | std::vector get_term_list(); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/user/system/switcher/switcherapp.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SWITCHERAPP_HPP 2 | #define _SWITCHERAPP_HPP 3 | 4 | #include 5 | #include "menu.hpp" 6 | 7 | class SwitcherApp : public NCursesApplication{ 8 | public: 9 | SwitcherApp(); 10 | 11 | int titlesize() const override; 12 | void title() override; 13 | int run() override; 14 | }; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/user/system/wm/config.cpp: -------------------------------------------------------------------------------- 1 | #include "config.hpp" 2 | #include "ini.hpp" 3 | 4 | using namespace std; 5 | 6 | static const string configSection = "WM"; 7 | 8 | static IniFile config; 9 | 10 | void ParseConfig(const string &path){ 11 | config = ReadIniFile(path); 12 | } 13 | 14 | string GetConfigValue(const string &name){ 15 | if(config.find(configSection) != config.end()){ 16 | if(config[configSection].find(name) != config[configSection].end()){ 17 | return config[configSection][name]; 18 | } 19 | } 20 | return ""; 21 | } 22 | -------------------------------------------------------------------------------- /src/user/system/wm/config.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CONFIG_HPP 2 | #define _CONFIG_HPP 3 | 4 | #include 5 | 6 | const std::string ConfigFilePath = "/btos/config/wm.ini"; 7 | 8 | void ParseConfig(const std::string &path); 9 | std::string GetConfigValue(const std::string &name); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/user/system/wm/ini.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _INI_HPP 2 | #define _INI_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef std::pair IniLine; 9 | typedef std::map IniSection; 10 | typedef std::map IniFile; 11 | 12 | IniFile ReadIniFile(const std::string &filename); 13 | IniSection ReadIniSection(std::istream &file); 14 | IniLine ReadIniLine(const std::string &line); 15 | 16 | void trim(std::string &str); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/user/system/wm/rect.cpp: -------------------------------------------------------------------------------- 1 | #include "rect.hpp" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | using namespace gds; 10 | 11 | #define DBG(x) do{std::stringstream dbgss; dbgss << x << std::endl; bt_zero(dbgss.str().c_str());}while(0) 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/user/system/wm/rect.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RECT_HPP 2 | #define _RECT_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace btos_api; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/user/system/wm/service.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SERVICE_HPP 2 | #define __SERVICE_HPP 3 | 4 | #include 5 | 6 | extern btos_api::bt_handle stdin_handle; 7 | 8 | void Service(btos_api::bt_pid_t root); 9 | 10 | #endif -------------------------------------------------------------------------------- /src/user/tests/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := ctest cpptest crash mousetest msgtest shmtest vgatest fputest elltest nctest sdltest pthreadtest cltzbench scratch 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/tests/crash/crash.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv){ 4 | (void)argv; 5 | printf("Crashing (div0)...\n"); 6 | return 1 / (argc - 1); 7 | } 8 | -------------------------------------------------------------------------------- /src/user/tests/elltest/elltest.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "testlib.h" 3 | 4 | int main(){ 5 | int result = ell_func(); 6 | printf("Result: %i.\n", result); 7 | printf("Teststring: %s\n", teststring); 8 | return 0; 9 | } -------------------------------------------------------------------------------- /src/user/tests/elltest/testlib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *teststring = "HELLO WORLD!"; 4 | 5 | __attribute__ ((constructor)) static void ell_init(){ 6 | printf("ELL INIT\n"); 7 | } 8 | 9 | int ell_func(){ 10 | return 42; 11 | } -------------------------------------------------------------------------------- /src/user/tests/elltest/testlib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *teststring = (char*)"HELLO WORLD!"; 4 | 5 | //~ class q{ 6 | //~ public: 7 | //~ q(){ 8 | //~ puts("q\n"); 9 | //~ } 10 | //~ } q_inst; 11 | 12 | extern "C" int ell_func(){ 13 | return 42; 14 | } 15 | -------------------------------------------------------------------------------- /src/user/tests/elltest/testlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _TESTLIB_H 2 | 3 | extern char *teststring; 4 | int ell_func(); 5 | 6 | #endif -------------------------------------------------------------------------------- /src/user/tests/fputest/fputest.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define CYLCES 100000 5 | 6 | int main(int argc, char **argv) { 7 | (void)argv; 8 | volatile double q = 0.0; 9 | for (int c = 0; c < 1000; ++c) { 10 | for (int i = 0; i < CYLCES; ++i) { 11 | q += 1.0; 12 | } 13 | bt_yield(); 14 | for (int i = 0; i < CYLCES; ++i) { 15 | q -= 1.0; 16 | } 17 | if (q != 0.0) { 18 | printf("FPU Error: q=%f\n", q); 19 | } 20 | } 21 | 22 | double ans = 3.14 * argc; 23 | printf("FPU: %f\n", ans); 24 | return 0; 25 | } -------------------------------------------------------------------------------- /src/user/tests/mousetest/mousetest.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(){ 6 | bt_filehandle fh= bt_fopen("DEV:/MOUSE0", FS_Read); 7 | bt_fioctl(fh, bt_mouse_ioctl_ClearBuffer, 0, NULL); 8 | while(1){ 9 | bt_mouse_packet packet; 10 | bt_fread(fh, sizeof(bt_mouse_packet), (char*)&packet); 11 | printf("Flags: %x, X: %i, Y: %i\n", packet.flags, packet.x_motion, packet.y_motion); 12 | } 13 | return 0; 14 | } -------------------------------------------------------------------------------- /src/user/tests/sdltest/testpng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallardtheduck/osdev/0a7a5dc407d288e3fb49baa45ed9c5e0adfce5fb/src/user/tests/sdltest/testpng.png -------------------------------------------------------------------------------- /src/user/tests/test/linker.ld: -------------------------------------------------------------------------------- 1 | ENTRY(main) 2 | 3 | . = 1024M; 4 | -------------------------------------------------------------------------------- /src/user/tests/vgatest/pointers.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _POINTERS_HPP 2 | #define _POINTERS_HPP 3 | 4 | #include 5 | #include 6 | 7 | bt_terminal_pointer_bitmap *get_pointer_bmp_16bpp(); 8 | bt_terminal_pointer_bitmap *get_pointer_bmp_24bpp(); 9 | bt_terminal_pointer_bitmap *get_pointer_bmp_32bpp(); 10 | 11 | extern bt_terminal_pointer_bitmap pointer_bmp_8bpp; 12 | extern bt_terminal_pointer_bitmap pointer_bmp_4bpp; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/user/wmapps/Makefile: -------------------------------------------------------------------------------- 1 | PROGS := wmmenu termwin breakout protoclock prototext prototask calc folder notepad appview elxrun launcher 2 | 3 | all: dummy.file 4 | for dir in $(PROGS); do \ 5 | make -C $$dir; \ 6 | done 7 | 8 | clean: dummy.file 9 | for dir in $(PROGS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | dummy.file: 14 | -------------------------------------------------------------------------------- /src/user/wmapps/appview/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Application View 3 | category = Tools 4 | vendor = BT/OS 5 | icon = appview 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/wmapps/appview/icons.inf: -------------------------------------------------------------------------------- 1 | [appview] 2 | 16 = icons/appview_16.png 3 | 32 = icons/appview_32.png 4 | -------------------------------------------------------------------------------- /src/user/wmapps/calc/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Calculator 3 | category = Tools 4 | vendor = BT/OS 5 | icon = calculator 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/wmapps/calc/calc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CALC_HPP 2 | #define _CALC_HPP 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | enum class CalcMode{ 10 | Standard, Scientific, Programmer 11 | }; 12 | 13 | extern CalcMode CurrentMode; 14 | 15 | std::shared_ptr LoadPNG(const char *path); 16 | void MakeToolbarAndMenu(std::shared_ptr form); 17 | 18 | #endif -------------------------------------------------------------------------------- /src/user/wmapps/calc/icalcmode.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _ICALCMODE_HPP 2 | #define _ICALCMODE_HPP 3 | 4 | #include 5 | #include 6 | 7 | class ICalcMode{ 8 | public: 9 | virtual std::shared_ptr Show() = 0; 10 | 11 | virtual std::string GetValue() = 0; 12 | virtual void SetValue(const std::string &) = 0; 13 | 14 | virtual ~ICalcMode() {} 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /src/user/wmapps/calc/icons.inf: -------------------------------------------------------------------------------- 1 | [calculator] 2 | 16 = calc_16.png 3 | 32 = calc_32.png 4 | -------------------------------------------------------------------------------- /src/user/wmapps/elxrun/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = ELX Launcher 3 | category = System 4 | vendor = BT/OS 5 | icon = elxrun 6 | mode = System 7 | -------------------------------------------------------------------------------- /src/user/wmapps/elxrun/icons.inf: -------------------------------------------------------------------------------- 1 | [elxrun] 2 | 16 = icons/elxrun_16.png 3 | 32 = icons/elxrun_32.png 4 | -------------------------------------------------------------------------------- /src/user/wmapps/folder/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Folder View 3 | category = Tools 4 | vendor = BT/OS 5 | icon = folder 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/wmapps/folder/folder.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _FOLDER_HPP 2 | #define _FOLDER_HPP 3 | 4 | #define BTOS_NO_USING 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | std::shared_ptr LoadIcon(const char *path); 12 | void CopyMove(const std::string from, const std::string to, bool move, btos_api::wm::Window *parent); 13 | 14 | #endif -------------------------------------------------------------------------------- /src/user/wmapps/folder/icons.inf: -------------------------------------------------------------------------------- 1 | [folder] 2 | 16 = icons/folder_16.png 3 | 32 = icons/folder_32.png 4 | -------------------------------------------------------------------------------- /src/user/wmapps/launcher/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Launcher 3 | category = Tools 4 | vendor = BT/OS 5 | icon = launcher 6 | mode = System 7 | -------------------------------------------------------------------------------- /src/user/wmapps/launcher/icons.inf: -------------------------------------------------------------------------------- 1 | [launcher] 2 | 16 = icons/launcher_16.png 3 | 32 = icons/launcher_32.png 4 | -------------------------------------------------------------------------------- /src/user/wmapps/launcher/run.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RUN_HPP 2 | #define _RUN_HPP 3 | 4 | #include 5 | 6 | class Run : public btos_api::gui::IDialog{ 7 | public: 8 | void Show(btos_api::wm::Window *parent) override; 9 | private: 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /src/user/wmapps/launcher/session.ini: -------------------------------------------------------------------------------- 1 | [session] 2 | 3 | name=GUI (Launcher) 4 | lead=$this$ 5 | 6 | [services] 7 | 0: gds 8 | 1: wm 9 | -------------------------------------------------------------------------------- /src/user/wmapps/notepad/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Notepad 3 | category = Tools 4 | vendor = BT/OS 5 | icon = notepad 6 | mode = GUI 7 | 8 | [fileicons] 9 | default = txt 10 | .ini = source 11 | .inf = source 12 | .cmd = script -------------------------------------------------------------------------------- /src/user/wmapps/notepad/icons.inf: -------------------------------------------------------------------------------- 1 | [notepad] 2 | 16 = icons/notepad_16.png 3 | 32 = icons/notepad_32.png 4 | 5 | [txt] 6 | 16 = icons/txt_16.png 7 | 32 = icons/txt_32.png 8 | 9 | [source] 10 | 16 = icons/source_16.png 11 | 32 = icons/source_32.png 12 | 13 | [script] 14 | 16 = icons/script_16.png 15 | 32 = icons/script_32.png 16 | -------------------------------------------------------------------------------- /src/user/wmapps/notepad/notepad.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _NOTEPAD_HPP 2 | #define _NOTEPAD_HPP 3 | 4 | #include 5 | #include 6 | 7 | std::shared_ptr LoadIcon(const char *path); 8 | 9 | #endif -------------------------------------------------------------------------------- /src/user/wmapps/termwin/app.inf: -------------------------------------------------------------------------------- 1 | [app] 2 | name = Terminal Window 3 | category = Tools 4 | vendor = BT/OS 5 | icon = termwin 6 | mode = GUI 7 | -------------------------------------------------------------------------------- /src/user/wmapps/termwin/icons.inf: -------------------------------------------------------------------------------- 1 | [termwin] 2 | 16 = termwin_16.png 3 | 32 = termwin_32.png 4 | -------------------------------------------------------------------------------- /tools/tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git clone https://github.com/mallardtheduck/bake.git 4 | pushd bake 5 | make 6 | popd 7 | --------------------------------------------------------------------------------