├── .clang-format ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── README.md ├── TODO.txt ├── TS ├── docs │ ├── donations.html │ ├── file_format_spec.txt │ ├── history.txt │ ├── images │ │ ├── check.png │ │ ├── documentation │ │ │ ├── deleted.png │ │ │ ├── edit.png │ │ │ ├── grid.png │ │ │ ├── gridline.png │ │ │ ├── gridline2.png │ │ │ ├── gridsel1.png │ │ │ ├── gridsel2.png │ │ │ ├── gridsel3.png │ │ │ ├── insert.png │ │ │ ├── long1.png │ │ │ ├── long2.png │ │ │ ├── long3.png │ │ │ ├── new.png │ │ │ ├── postgrid.png │ │ │ ├── pregrid.png │ │ │ ├── textsize.png │ │ │ └── zoomed.png │ │ ├── excl.png │ │ ├── screenshots │ │ │ ├── screenshot_personel.png │ │ │ ├── screenshot_sales.png │ │ │ ├── screenshot_todo.png │ │ │ ├── screenshot_todo_half.png │ │ │ ├── screenshot_todo_linux.png │ │ │ ├── screenshot_todo_mac.png │ │ │ ├── screenshot_tutorial.png │ │ │ ├── screenshot_tutorial2.png │ │ │ └── screenshot_unicode.png │ │ ├── stop.png │ │ └── treesheets_logo.png │ ├── screenshots.html │ ├── script_reference.html │ ├── script_reference_update.bat │ └── tutorial.html ├── examples │ ├── complex_eval.cts │ ├── contrib │ │ ├── Procrastination.cts │ │ ├── help │ │ │ ├── treesheet key quick reference (by WiM) 3 posted.cts │ │ │ └── treesheet menu including images landscape final.cts │ │ ├── intro-ru.cts │ │ ├── structogram-quicksort.cts │ │ ├── todo_calendar-zh.cts │ │ ├── weekly+calendar.cts │ │ ├── what-i-like-about-treesheets.cts │ │ └── yearly-calendar.cts │ ├── imported_from_xml_examples │ │ ├── books.cts │ │ ├── cd_catalog.cts │ │ ├── menu.cts │ │ └── plant_catalog.cts │ ├── operation-reference.cts │ ├── personel_file.cts │ ├── sales.cts │ ├── simple_graph.cts │ ├── todo_calendar.cts │ ├── tutorial-de.cts │ ├── tutorial-fr.cts │ ├── tutorial-pt_BR.cts │ ├── tutorial-ru.cts │ ├── tutorial-sp.cts │ ├── tutorial-zh.cts │ ├── tutorial.cts │ ├── unicode_test.cts │ └── work_breakdown_structure.cts ├── images │ ├── icon16.png │ ├── icon32.png │ ├── material │ │ ├── LICENSE.material │ │ ├── LICENSE.vscode-icons │ │ └── toolbar │ │ │ ├── cancel.svg │ │ │ ├── cancel_dark.svg │ │ │ ├── editcopy.svg │ │ │ ├── editcopy_dark.svg │ │ │ ├── editpaste.svg │ │ │ ├── editpaste_dark.svg │ │ │ ├── filenew.svg │ │ │ ├── filenew_dark.svg │ │ │ ├── fileopen.svg │ │ │ ├── fileopen_dark.svg │ │ │ ├── filesave.svg │ │ │ ├── filesave_dark.svg │ │ │ ├── filesaveas.svg │ │ │ ├── filesaveas_dark.svg │ │ │ ├── image.svg │ │ │ ├── image_dark.svg │ │ │ ├── newgrid.svg │ │ │ ├── newgrid_dark.svg │ │ │ ├── replace.svg │ │ │ ├── replace_dark.svg │ │ │ ├── replaceall.svg │ │ │ ├── replaceall_dark.svg │ │ │ ├── run.svg │ │ │ ├── run_dark.svg │ │ │ ├── search.svg │ │ │ ├── search_dark.svg │ │ │ ├── undo.svg │ │ │ ├── undo_dark.svg │ │ │ ├── zoomin.svg │ │ │ ├── zoomin_dark.svg │ │ │ ├── zoomout.svg │ │ │ └── zoomout_dark.svg │ ├── nuvola │ │ ├── author │ │ ├── dropdown │ │ │ ├── apply.png │ │ │ ├── back.png │ │ │ ├── bookcase.png │ │ │ ├── bookmark.png │ │ │ ├── bug.png │ │ │ ├── cache.png │ │ │ ├── cancel.png │ │ │ ├── clanbomber.png │ │ │ ├── color_line.png │ │ │ ├── configure.png │ │ │ ├── down.png │ │ │ ├── edit_add.png │ │ │ ├── edit_remove.png │ │ │ ├── email.png │ │ │ ├── forward.png │ │ │ ├── gohome.png │ │ │ ├── history.png │ │ │ ├── kalarm.png │ │ │ ├── kcmprocessor.png │ │ │ ├── kcoloredit.png │ │ │ ├── kfm_home.png │ │ │ ├── kgpg.png │ │ │ ├── kgpg_key3.png │ │ │ ├── ksysv.png │ │ │ ├── kuser.png │ │ │ ├── kweather.png │ │ │ ├── ledblue.png │ │ │ ├── ledgreen.png │ │ │ ├── ledlightblue.png │ │ │ ├── ledlightgreen.png │ │ │ ├── ledorange.png │ │ │ ├── ledpurple.png │ │ │ ├── ledred.png │ │ │ ├── ledyellow.png │ │ │ ├── maybe.png │ │ │ ├── messagebox_info.png │ │ │ ├── messagebox_warning.png │ │ │ ├── misc.png │ │ │ ├── mozilla.png │ │ │ ├── no.png │ │ │ ├── noatunloopsong.png │ │ │ ├── package_games_arcade.png │ │ │ ├── package_network.png │ │ │ ├── package_toys.png │ │ │ ├── player_pause.png │ │ │ ├── player_play.png │ │ │ ├── player_stop.png │ │ │ └── up.png │ │ ├── fold.png │ │ ├── license.txt │ │ ├── readme.txt │ │ └── thanks.to │ └── render │ │ ├── line_ne.png │ │ ├── line_nw.png │ │ ├── line_se.png │ │ └── line_sw.png ├── readme.html ├── scripts │ ├── Export JSON.lobster │ └── modules │ │ ├── color.lobster │ │ ├── std.lobster │ │ ├── stdtype.lobster │ │ └── vec.lobster └── translations │ ├── de │ ├── compile.bat │ ├── merge.bat │ ├── ts.mo │ └── ts.po │ ├── fr_FR │ ├── compile.bat │ ├── compile.sh │ ├── merge.bat │ ├── merge.sh │ ├── ts.mo │ └── ts.po │ ├── it │ ├── compile.bat │ ├── merge.bat │ ├── ts.mo │ └── ts.po │ ├── pt_BR │ ├── compile.bat │ ├── merge.bat │ ├── ts.mo │ └── ts.po │ ├── readme_translations.txt │ ├── ru_RU │ ├── compile.sh │ ├── help_localization.md │ ├── info_Focus&Approaches.md │ ├── merge.sh │ ├── ts.mo │ └── ts.po │ ├── ts.pot │ └── zh_CN │ ├── compile.bat │ ├── merge.bat │ ├── ts.mo │ └── ts.po ├── ZLIB_LICENSE.txt ├── platform ├── linux │ ├── com.strlen.TreeSheets.desktop │ ├── com.strlen.TreeSheets.svg │ └── com.strlen.TreeSheets.xml ├── osx │ ├── App.icns │ └── Info.plist └── win │ ├── icon.rc │ └── icon1.ico ├── src ├── StackWalkerHelpers.h ├── cell.h ├── document.h ├── evaluator.h ├── genpot.bat ├── grid.h ├── lobster_impl.cpp ├── main.cpp ├── myapp.h ├── mycanvas.h ├── myevents.h ├── myframe.h ├── mywxtools.h ├── script_interface.h ├── selection.h ├── stdafx.cpp ├── stdafx.h ├── system.h ├── text.h ├── threadpool.h ├── tools.h └── treesheets_impl.h └── thirdparty ├── StackWalker ├── StackWalker.cpp ├── StackWalker.h └── StackWalkerHelpers.cpp └── lobster ├── external ├── flatbuffers │ └── src │ │ ├── idl_gen_text.cpp │ │ ├── idl_gen_text.h │ │ ├── idl_parser.cpp │ │ └── util.cpp └── libtcc │ ├── arm-asm.c │ ├── arm-gen.c │ ├── arm-link.c │ ├── arm-tok.h │ ├── arm64-asm.c │ ├── arm64-gen.c │ ├── arm64-link.c │ ├── config.h │ ├── dwarf.h │ ├── elf.h │ ├── i386-asm.c │ ├── i386-asm.h │ ├── i386-gen.c │ ├── i386-link.c │ ├── i386-tok.h │ ├── libtcc.c │ ├── libtcc.h │ ├── readmes │ ├── COPYING │ ├── README │ └── VERSION │ ├── stab.def │ ├── stab.h │ ├── tcc.h │ ├── tccasm.c │ ├── tccdbg.c │ ├── tccdefs_.h │ ├── tccelf.c │ ├── tccgen.c │ ├── tccmacho.c │ ├── tccpe.c │ ├── tccpp.c │ ├── tccrun.c │ ├── tcctok.h │ ├── x86_64-asm.h │ ├── x86_64-gen.c │ └── x86_64-link.c ├── include ├── StackWalker │ ├── StackWalker.cpp │ ├── StackWalker.h │ ├── StackWalkerHelpers.cpp │ └── StackWalkerHelpers.h ├── flatbuffers │ ├── allocator.h │ ├── array.h │ ├── base.h │ ├── buffer.h │ ├── buffer_ref.h │ ├── code_generator.h │ ├── code_generators.h │ ├── default_allocator.h │ ├── detached_buffer.h │ ├── file_manager.h │ ├── flatbuffer_builder.h │ ├── flatbuffers.h │ ├── flatc.h │ ├── flex_flat_util.h │ ├── flexbuffers.h │ ├── grpc.h │ ├── hash.h │ ├── idl.h │ ├── minireflect.h │ ├── reflection.h │ ├── reflection_generated.h │ ├── registry.h │ ├── stl_emulation.h │ ├── string.h │ ├── struct.h │ ├── table.h │ ├── util.h │ ├── vector.h │ ├── vector_downward.h │ └── verifier.h ├── gsl │ └── gsl-lite.hpp └── subprocess.h ├── lobster ├── language.vcxproj └── language.vcxproj.filters ├── readme.md ├── reclone.bat └── src ├── audio.cpp ├── builtins.cpp ├── compiler.cpp ├── cubegen.cpp ├── disasm.cpp ├── engine.cpp ├── file.cpp ├── font.cpp ├── fontrenderer.cpp ├── glgeom.cpp ├── glloadiqm.cpp ├── glshader.cpp ├── glsystem.cpp ├── gltexture.cpp ├── gltimequery.cpp ├── glvr.cpp ├── graphics.cpp ├── imbind.cpp ├── lobster ├── 3dgrid.h ├── accumulator.h ├── bytecode_generated.h ├── codegen.h ├── compiler.h ├── constval.h ├── cubegen.h ├── disasm.h ├── dllist.h ├── fontrenderer.h ├── geom.h ├── glincludes.h ├── glinterface.h ├── graphics.h ├── idents.h ├── il.h ├── lex.h ├── lobsterreader.h ├── mctables.h ├── meshgen.h ├── natreg.h ├── node.h ├── optimizer.h ├── packed_vector.h ├── parser.h ├── platform.h ├── polyreduce.h ├── resource_manager.h ├── rng_hash.h ├── sdlincludes.h ├── sdlinterface.h ├── simplex.h ├── slaballoc.h ├── small_vector.h ├── stack_vector.h ├── stdafx.h ├── string_tools.h ├── tonative.h ├── tools.h ├── ttypes.h ├── typecheck.h ├── unicode.h ├── varint.h ├── vmdata.h ├── vmops.h ├── wasm_binary_writer.h ├── wasm_binary_writer_test.h ├── wentropy.h └── wfc.h ├── lobsterreader.cpp ├── main.cpp ├── meshgen.cpp ├── physics.cpp ├── platform.cpp ├── sdlaudiosfxr.cpp ├── sdlsystem.cpp ├── simplex.cpp ├── stdafx.cpp ├── steamworks.cpp ├── tccbind.cpp ├── tocpp.cpp ├── tonative.cpp ├── towasm.cpp ├── vm.cpp └── vmdata.cpp /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | --- 4 | Language: Cpp 5 | IndentWidth: 4 6 | ColumnLimit: 100 7 | UseTab: Never 8 | AccessModifierOffset: 0 9 | AlignTrailingComments: true 10 | AllowShortBlocksOnASingleLine: true 11 | AllowShortCaseLabelsOnASingleLine: true 12 | AllowShortFunctionsOnASingleLine : All 13 | AllowShortLoopsOnASingleLine: true 14 | BinPackParameters: true 15 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 16 | IndentCaseLabels: true 17 | NamespaceIndentation: None 18 | PointerAlignment: Right 19 | SpaceBeforeParens: ControlStatements 20 | SpaceAfterTemplateKeyword: false 21 | Standard: Cpp11 22 | Cpp11BracedListStyle: true 23 | SpaceBeforeCpp11BracedList: true 24 | IndentPPDirectives: BeforeHash 25 | AlwaysBreakTemplateDeclarations: false 26 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | build-linux: 13 | name: Build Linux 14 | runs-on: ubuntu-latest 15 | permissions: 16 | contents: write 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: apt update 20 | run: sudo apt-get -o Acquire::Retries=3 update 21 | - name: install opengl 22 | run: sudo apt-get -o Acquire::Retries=3 install mesa-common-dev libgl1-mesa-dev libgl1 libglx-mesa0 libxext-dev 23 | - name: install gtk 24 | run: sudo apt-get -o Acquire::Retries=3 install libgtk-3-dev 25 | - name: cmake 26 | run: cmake -S . -B _build -DCMAKE_INSTALL_PREFIX=/usr -DCPACK_PACKAGING_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGIT_WXWIDGETS_SUBMODULES=ON -DwxUSE_SYS_LIBS=OFF 27 | - name: build and package TreeSheets 28 | run: cmake --build _build --target package -j4 29 | - name: Remove epoch from .deb filename 30 | run: for file in _build/treesheets_1:*.deb; do mv -v "${file}" "${file/treesheets_1:/treesheets_}"; done 31 | - name: Create release 32 | if: github.event_name == 'push' 33 | uses: ncipollo/release-action@v1 34 | with: 35 | tag: ${{ github.run_id }} 36 | allowUpdates: true 37 | omitBody: true 38 | commit: ${{ github.sha }} 39 | artifacts: "_build/treesheets_*.deb" 40 | - name: Upload artifacts 41 | if: github.event_name == 'pull_request' 42 | uses: actions/upload-artifact@v4 43 | with: 44 | name: linux-builds 45 | path: _build/treesheets_*.deb 46 | 47 | build-windows: 48 | name: Build Windows 49 | runs-on: windows-latest 50 | permissions: 51 | contents: write 52 | steps: 53 | - uses: actions/checkout@v4 54 | - name: Add msbuild to PATH 55 | uses: microsoft/setup-msbuild@v1.1 56 | - name: cmake 57 | run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=Release -DGIT_WXWIDGETS_SUBMODULES=ON 58 | - name: build and package 59 | run: cmake --build _build --config Release --target package -j 60 | - name: Create release 61 | if: github.event_name == 'push' 62 | uses: ncipollo/release-action@v1 63 | with: 64 | tag: ${{ github.run_id }} 65 | allowUpdates: true 66 | omitBody: true 67 | commit: ${{ github.sha }} 68 | artifacts: "_build/TreeSheets-*.exe, _build/TreeSheets-*.zip" 69 | - name: Upload artifacts 70 | if: github.event_name == 'pull_request' 71 | uses: actions/upload-artifact@v4 72 | with: 73 | name: windows-builds 74 | path: | 75 | _build/TreeSheets-*.exe 76 | _build/TreeSheets-*.zip 77 | 78 | build-mac: 79 | name: Build Mac 80 | runs-on: macos-latest 81 | env: 82 | minmac: 10.15 83 | permissions: 84 | contents: write 85 | steps: 86 | - uses: actions/checkout@v4 87 | - name: Prepare Plist 88 | run: | 89 | /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $(date +'%Y%m%d%H%M%S')" platform/osx/Info.plist 90 | /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $(date +'%Y.%m.%d')" platform/osx/Info.plist 91 | /usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion $minmac" platform/osx/Info.plist 92 | - name: cmake 93 | run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="$minmac" -DGIT_WXWIDGETS_SUBMODULES=ON -DwxUSE_SYS_LIBS=OFF 94 | - name: Build and package TreeSheets 95 | run: cmake --build _build --target package -j4 96 | - name: Create release 97 | if: github.event_name == 'push' 98 | uses: ncipollo/release-action@v1 99 | with: 100 | tag: ${{ github.run_id }} 101 | allowUpdates: true 102 | omitBody: true 103 | commit: ${{ github.sha }} 104 | artifacts: "_build/TreeSheets-*.dmg" 105 | - name: Upload artifacts 106 | if: github.event_name == 'pull_request' 107 | uses: actions/upload-artifact@v4 108 | with: 109 | name: macos-disk-image 110 | path: _build/TreeSheets-*.dmg 111 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /treesheets/Release/ 2 | /treesheets/Debug/ 3 | /wxwidgets/ 4 | osx/TreeSheetsBeta/ 5 | osx/TreeSheets/TreeSheets.xcodeproj/project.xcworkspace/xcuserdata/ 6 | *.exe 7 | *.zip 8 | *.tar.gz 9 | *.suo 10 | *.ilk 11 | *.pdb 12 | *.bak 13 | **/*.o 14 | 15 | TreeSheets/\.vs/treesheets/v15/ 16 | 17 | build/treesheets/language/ 18 | 19 | TS/scripts/\.con\.log 20 | # In-tree build 21 | TS/treesheets 22 | TS/2 23 | 24 | # In-tree build CMake files 25 | CMakeCache.txt 26 | CMakeFiles/** 27 | Makefile 28 | cmake_install.cmake 29 | CMakeLists.txt.user 30 | # Build directory for out-of-tree builds 31 | _build/ 32 | 33 | TreeSheets/.vs 34 | 35 | treesheets.cbp 36 | TreeSheets/x64 37 | *.ipdb 38 | *.iobj 39 | TreeSheets/gettext_bin 40 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/wxWidgets"] 2 | path = thirdparty/wxWidgets 3 | url = https://github.com/wxWidgets/wxWidgets 4 | branch = master 5 | -------------------------------------------------------------------------------- /TS/docs/donations.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | TreeSheets Donations & Sponsors 6 | 7 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 |

46 |

Donations

47 |

The following generous people have donated to TreeSheets:

48 |

(Highest donations first):

49 |

50 | Pierre van Male de Ghorain, David Lynch, Michael Wicher, Alexander Deliyannis, Hunter Elofson, James McGuire, 51 | NameAction Chile S. A., Dietmar Bellersheim, Infolution B.V., Xavier Masson, dotpeople, Matthew Probst, 52 | Francisco Gracia, Roland Breuer, Yechen Mao, Jeffrey Goatcher, Eric Raible, Günter Marangoni, 53 | Zdenek Krejci, Daniel Kimblad, Carsten Heitmann, Robert Mischke, Nasul Magallanes, Yango Pohl, 54 | Tab Hockamier, More Addin, Alistair McGhee, Thorsten Schwesig, QuantumFlux42, Frank Salinas, Tobias Skarman, 55 | Olav Schettler, iliis, Adam Glowalla, One Man Talking, Amy Young, Ulrich Benzing, Dragan Espenschied, 56 | Alberto Egidi, Kevin Whitaker, BTWReviews.com, Dénes Harmath, Aleksis Doma, Arthur Koks, Matthias Knoefel, 57 | Tikhonov Aleksey, Danylo Dubinin, Howard, Daniel Rosenberg, Asish Kar-Roy, Keith Haddad. 58 |

59 |

(+ quite a few anonymous donations).

60 | 61 |

I am no longer requesting donations at this point. While I am grateful for the support 62 | of the above people, the total amount donated so far from 2008 to 2018 is $2007, or about $16 per month.

63 | 64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /TS/docs/file_format_spec.txt: -------------------------------------------------------------------------------- 1 | File format spec for TreeSheets .cts files, version 23. This should be enough for a programmer to write an importer/exporter. 2 | 3 | struct File // not really a struct, i.e. no alignment, read an element at a time 4 | { 5 | char magic[4] = "TSFF"; 6 | char version = 23; 7 | // TreeSheets saves the selection and the zoom level when the file is saved. 8 | int xs; // xs is the number of cells within the selection in x direction 9 | int ys; // ys is the number of cells within the selection in y direction 10 | int zoomlevel; // zoom level of the document 11 | 12 | Image images[0 or more]; 13 | 14 | char ident = 'D'; // marks start of document, and end of list of images 15 | 16 | // the remainder of the file from here is written as a zlib compressed stream 17 | Cell root; 18 | 19 | for (;;) { 20 | String tagname; // terminated by empty string]; 21 | int tagcolor; 22 | } 23 | } 24 | 25 | struct Image 26 | { 27 | char ident; // marks start of image 28 | // Character value depends on image type, i.e. 'I' for PNG and 'J' for JPEG 29 | double display_scale; // display scale of image 30 | int64_t imagelen; // length of image (8 bytes) 31 | char image_data[len]; // whatever format wxImage::LoadFile uses 32 | } 33 | 34 | struct Cell 35 | { 36 | uchar celltype; // enum { CT_DATA = 0, CT_CODE, CT_VARD, CT_VIEWH, CT_VARU, CT_VIEWV }; 37 | uint cellcolor; 38 | uint textcolor; 39 | uchar drawstyle; // enum { DS_GRID, DS_BLOBSHIER, DS_BLOBLINE }; 40 | uchar cellcontents; // enum { TS_TEXT = 0, TS_GRID, TS_BOTH, TS_NEITHER }; 41 | // The first cell that is within the selection is marked with the highest bit set to 1 (1 x x x x x x x) in cellcontents. 42 | if (TS_TEXT or TS_BOTH) 43 | { 44 | String text; 45 | uint relativesize; 46 | uint imageindex; // or 0xFFFFFFFF for no image 47 | uint stylebits; // enum { STYLE_BOLD = 1, STYLE_ITALIC = 2, STYLE_FIXED = 4, STYLE_UNDERLINE = 8, STYLE_STRIKETHRU = 16 }; 48 | uint64 lastedit; // internal representation of wxDateTime 49 | } 50 | if (TS_GRID or TS_BOTH) 51 | { 52 | uint xs, ys; 53 | uint bordercolor; 54 | uint user_grid_outer_spacing; 55 | uchar verticaltextandgrid; 56 | uchar folded; 57 | uint columnwidths[xs]; 58 | Cell cells[xs * ys]; // row major 59 | } 60 | } 61 | 62 | struct String // as wxDataOutputStream::WriteString writes it, apparently UTF-8 prefixed by length 63 | -------------------------------------------------------------------------------- /TS/docs/images/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/check.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/deleted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/deleted.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/edit.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/grid.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/gridline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/gridline.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/gridline2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/gridline2.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/gridsel1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/gridsel1.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/gridsel2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/gridsel2.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/gridsel3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/gridsel3.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/insert.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/long1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/long1.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/long2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/long2.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/long3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/long3.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/new.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/postgrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/postgrid.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/pregrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/pregrid.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/textsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/textsize.png -------------------------------------------------------------------------------- /TS/docs/images/documentation/zoomed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/documentation/zoomed.png -------------------------------------------------------------------------------- /TS/docs/images/excl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/excl.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_personel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_personel.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_sales.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_todo.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_todo_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_todo_half.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_todo_linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_todo_linux.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_todo_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_todo_mac.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_tutorial.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_tutorial2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_tutorial2.png -------------------------------------------------------------------------------- /TS/docs/images/screenshots/screenshot_unicode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/screenshots/screenshot_unicode.png -------------------------------------------------------------------------------- /TS/docs/images/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/stop.png -------------------------------------------------------------------------------- /TS/docs/images/treesheets_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/docs/images/treesheets_logo.png -------------------------------------------------------------------------------- /TS/docs/screenshots.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | TreeSheets Screenshots 6 | 7 | 35 | 36 | 37 | 38 |
39 | 40 |

41 |

Screenshots

42 |

43 |

44 |

45 |

46 |

47 |

48 |

49 |

50 | 51 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /TS/docs/script_reference_update.bat: -------------------------------------------------------------------------------- 1 | rem NOTE: this uses the Release mode executable! 2 | ..\TreeSheets.exe -d 3 | del script_reference.html 4 | move ..\scripts\builtin_functions_reference.html script_reference.html 5 | pause 6 | -------------------------------------------------------------------------------- /TS/examples/complex_eval.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/complex_eval.cts -------------------------------------------------------------------------------- /TS/examples/contrib/Procrastination.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/Procrastination.cts -------------------------------------------------------------------------------- /TS/examples/contrib/help/treesheet key quick reference (by WiM) 3 posted.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/help/treesheet key quick reference (by WiM) 3 posted.cts -------------------------------------------------------------------------------- /TS/examples/contrib/help/treesheet menu including images landscape final.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/help/treesheet menu including images landscape final.cts -------------------------------------------------------------------------------- /TS/examples/contrib/intro-ru.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/intro-ru.cts -------------------------------------------------------------------------------- /TS/examples/contrib/structogram-quicksort.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/structogram-quicksort.cts -------------------------------------------------------------------------------- /TS/examples/contrib/todo_calendar-zh.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/todo_calendar-zh.cts -------------------------------------------------------------------------------- /TS/examples/contrib/weekly+calendar.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/weekly+calendar.cts -------------------------------------------------------------------------------- /TS/examples/contrib/what-i-like-about-treesheets.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/what-i-like-about-treesheets.cts -------------------------------------------------------------------------------- /TS/examples/contrib/yearly-calendar.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/contrib/yearly-calendar.cts -------------------------------------------------------------------------------- /TS/examples/imported_from_xml_examples/books.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/imported_from_xml_examples/books.cts -------------------------------------------------------------------------------- /TS/examples/imported_from_xml_examples/cd_catalog.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/imported_from_xml_examples/cd_catalog.cts -------------------------------------------------------------------------------- /TS/examples/imported_from_xml_examples/menu.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/imported_from_xml_examples/menu.cts -------------------------------------------------------------------------------- /TS/examples/imported_from_xml_examples/plant_catalog.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/imported_from_xml_examples/plant_catalog.cts -------------------------------------------------------------------------------- /TS/examples/operation-reference.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/operation-reference.cts -------------------------------------------------------------------------------- /TS/examples/personel_file.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/personel_file.cts -------------------------------------------------------------------------------- /TS/examples/sales.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/sales.cts -------------------------------------------------------------------------------- /TS/examples/simple_graph.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/simple_graph.cts -------------------------------------------------------------------------------- /TS/examples/todo_calendar.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/todo_calendar.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-de.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-de.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-fr.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-fr.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-pt_BR.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-pt_BR.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-ru.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-ru.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-sp.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-sp.cts -------------------------------------------------------------------------------- /TS/examples/tutorial-zh.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial-zh.cts -------------------------------------------------------------------------------- /TS/examples/tutorial.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/tutorial.cts -------------------------------------------------------------------------------- /TS/examples/unicode_test.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/unicode_test.cts -------------------------------------------------------------------------------- /TS/examples/work_breakdown_structure.cts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/examples/work_breakdown_structure.cts -------------------------------------------------------------------------------- /TS/images/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/icon16.png -------------------------------------------------------------------------------- /TS/images/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/icon32.png -------------------------------------------------------------------------------- /TS/images/material/toolbar/cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/cancel_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/editcopy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/editcopy_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 40 | 41 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/editpaste.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 43 | 51 | 52 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/editpaste_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 43 | 51 | 52 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filenew.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filenew_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 33 | 36 | 43 | 44 | 46 | 48 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/fileopen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/fileopen_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 40 | 41 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filesave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filesave_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filesaveas.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/filesaveas_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 34 | 39 | 43 | 44 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/image_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 34 | 39 | 43 | 44 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/newgrid.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 34 | 38 | 42 | 46 | 50 | 55 | 56 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/newgrid_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 34 | 38 | 42 | 46 | 50 | 55 | 56 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/replace.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/replace_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/replaceall.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/run.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/run_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/search_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 40 | 41 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/undo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/undo_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/zoomin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/zoomin_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/zoomout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TS/images/material/toolbar/zoomout_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /TS/images/nuvola/author: -------------------------------------------------------------------------------- 1 | David Vignoni (david@icon-king.com) 2 | ICON KING - www.icon-king.com 3 | 4 | -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/apply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/apply.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/back.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/bookcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/bookcase.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/bookmark.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/bug.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/cache.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/cancel.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/clanbomber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/clanbomber.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/color_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/color_line.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/configure.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/down.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/edit_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/edit_add.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/edit_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/edit_remove.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/email.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/forward.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/gohome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/gohome.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/history.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kalarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kalarm.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kcmprocessor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kcmprocessor.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kcoloredit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kcoloredit.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kfm_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kfm_home.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kgpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kgpg.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kgpg_key3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kgpg_key3.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ksysv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ksysv.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kuser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kuser.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/kweather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/kweather.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledblue.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledgreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledgreen.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledlightblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledlightblue.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledlightgreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledlightgreen.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledorange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledorange.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledpurple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledpurple.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledred.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/ledyellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/ledyellow.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/maybe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/maybe.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/messagebox_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/messagebox_info.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/messagebox_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/messagebox_warning.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/misc.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/mozilla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/mozilla.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/no.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/noatunloopsong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/noatunloopsong.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/package_games_arcade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/package_games_arcade.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/package_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/package_network.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/package_toys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/package_toys.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/player_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/player_pause.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/player_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/player_play.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/player_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/player_stop.png -------------------------------------------------------------------------------- /TS/images/nuvola/dropdown/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/dropdown/up.png -------------------------------------------------------------------------------- /TS/images/nuvola/fold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/nuvola/fold.png -------------------------------------------------------------------------------- /TS/images/nuvola/readme.txt: -------------------------------------------------------------------------------- 1 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | This copyright and license notice covers the images in this directory. 3 | Note the license notice contains an add-on. 4 | ************************************************************************ 5 | 6 | TITLE: NUVOLA ICON THEME for KDE 3.x 7 | AUTHOR: David Vignoni | ICON KING 8 | SITE: http://www.icon-king.com 9 | MAILING LIST: http://mail.icon-king.com/mailman/listinfo/nuvola_icon-king.com 10 | 11 | Copyright (c) 2003-2004 David Vignoni. 12 | 13 | This library is free software; you can redistribute it and/or 14 | modify it under the terms of the GNU Lesser General Public 15 | License as published by the Free Software Foundation, 16 | version 2.1 of the License. 17 | This library is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | Lesser General Public License for more details. 21 | You should have received a copy of the GNU Lesser General Public 22 | License along with this library (see the the license.txt file); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | #######**** NOTE THIS ADD-ON ****####### 24 | The GNU Lesser General Public License or LGPL is written for software libraries 25 | in the first place. The LGPL has to be considered valid for this artwork 26 | library too. 27 | Nuvola icon theme for KDE 3.x is a special kind of software library, it is an 28 | artwork library, it's elements can be used in a Graphical User Interface, or 29 | GUI. 30 | Source code, for this library means: 31 | - raster png image* . 32 | The LGPL in some sections obliges you to make the files carry 33 | notices. With images this is in some cases impossible or hardly usefull. 34 | With this library a notice is placed at a prominent place in the directory 35 | containing the elements. You may follow this practice. 36 | The exception in section 6 of the GNU Lesser General Public License covers 37 | the use of elements of this art library in a GUI. 38 | dave [at] icon-king.com 39 | 40 | Date: 15 october 2004 41 | Version: 1.0 42 | 43 | DESCRIPTION: 44 | 45 | Icon theme for KDE 3.x. 46 | Icons where designed using Adobe Illustrator, and then exported to PNG format. 47 | Icons shadows and minor corrections were done using Adobe Photoshop. 48 | Kiconedit was used to correct some 16x16 and 22x22 icons. 49 | 50 | LICENSE 51 | 52 | Released under GNU Lesser General Public License (LGPL) 53 | Look at the license.txt file. 54 | 55 | CONTACT 56 | 57 | David Vignoni 58 | e-mail : david [at] icon-king.com 59 | ICQ : 117761009 60 | http: http://www.icon-king.com 61 | -------------------------------------------------------------------------------- /TS/images/nuvola/thanks.to: -------------------------------------------------------------------------------- 1 | Thanks to 2 | 3 | Mark Mahle from Hosted.as for hosting the site, support and for being a true friend. Best wishes for you. 4 | Christian Schaller to be a big fan Nuvola SVG and to have made me part of the gnome-themes-extras team. 5 | Carlos Woelz for his work at kde-quality and to give me some visibility with the interview at dot.kde.org. 6 | 7 | Also big thanks to Swell Technology, Kde-look and special thanks to the guys of Nuvola Mailinglist: Marcel Dierkes, Christian Szabo and Virginie Quesnay. -------------------------------------------------------------------------------- /TS/images/render/line_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/render/line_ne.png -------------------------------------------------------------------------------- /TS/images/render/line_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/render/line_nw.png -------------------------------------------------------------------------------- /TS/images/render/line_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/render/line_se.png -------------------------------------------------------------------------------- /TS/images/render/line_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/images/render/line_sw.png -------------------------------------------------------------------------------- /TS/scripts/Export JSON.lobster: -------------------------------------------------------------------------------- 1 | // This example script exports a TreeSheet to JSON. 2 | 3 | // That is not super-useful, since TreeSheets are not key-value pairs, so instead it exports 4 | // as a recursive set of arrays with strings instead. 5 | 6 | // In each array, the first element is cell text, followed by the children. 7 | // For each child, if it has no children it is just a string, otherwise an array. 8 | 9 | // Also a nice simple example on how to recurse through a TreeSheet in script. 10 | 11 | import std 12 | 13 | let out = [] 14 | 15 | def add_text(s): 16 | out.push("\"") 17 | // \ and " need to be escaped in JSON: 18 | out.push(escape_string(s, "\\\"", "\\", "")) 19 | out.push("\"") 20 | 21 | def add_indent(indent): 22 | out.push(concat_string(map(indent): " ", "")) 23 | 24 | def add_cell(indent) -> void: 25 | out.push("[\n") 26 | add_indent(indent + 1) 27 | add_text(ts.get_text()) 28 | for(ts.num_children()) i: 29 | out.push(",\n") 30 | ts.goto_child(i) 31 | add_indent(indent + 1) 32 | if ts.num_children(): 33 | add_cell(indent + 1) 34 | else: 35 | add_text(ts.get_text()) 36 | ts.goto_parent() 37 | out.push("\n") 38 | add_indent(indent) 39 | out.push("]") 40 | 41 | let filename = ts.get_filename_from_user(true) 42 | if filename.length: 43 | ts.goto_root() // This the default, here just for clarity. 44 | add_cell(0) 45 | let ok = write_file(filename, concat_string(out, ""), true, true) 46 | ts.set_status_message("JSON export of {filename} " + if ok: "succesful" else: "failed!") 47 | else: 48 | ts.set_status_message("export cancelled") 49 | -------------------------------------------------------------------------------- /TS/scripts/modules/color.lobster: -------------------------------------------------------------------------------- 1 | // standard color constants 2 | 3 | struct color: 4 | red:float 5 | green:float 6 | blue:float 7 | alpha:float 8 | 9 | let color_clear = color { 0.0, 0.0, 0.0, 0.0 } 10 | let color_black = color { 0.0, 0.0, 0.0, 1.0 } 11 | let color_white = color { 1.0, 1.0, 1.0, 1.0 } 12 | 13 | let color_red = color { 1.0, 0.0, 0.0, 1.0 } 14 | let color_green = color { 0.0, 1.0, 0.0, 1.0 } 15 | let color_blue = color { 0.0, 0.0, 1.0, 1.0 } 16 | 17 | let color_yellow = color { 1.0, 1.0, 0.0, 1.0 } 18 | let color_cyan = color { 0.0, 1.0, 1.0, 1.0 } 19 | let color_pink = color { 1.0, 0.0, 1.0, 1.0 } 20 | 21 | let color_grey = color { 0.5, 0.5, 0.5, 1.0 } 22 | let color_dark_grey = color { 0.25, 0.25, 0.25, 1.0 } 23 | let color_light_grey = color { 0.75, 0.75, 0.75, 1.0 } 24 | let color_lightest_grey = color { 0.9, 0.9, 0.9, 1.0 } 25 | let color_darkest_grey = color { 0.1, 0.1, 0.1, 1.0 } 26 | 27 | let color_light_red = color { 1.0, 0.5, 0.5, 1.0 } 28 | let color_light_green = color { 0.5, 1.0, 0.5, 1.0 } 29 | let color_light_blue = color { 0.5, 0.5, 1.0, 1.0 } 30 | let color_light_yellow = color { 1.0, 1.0, 0.5, 1.0 } 31 | let color_light_cyan = color { 0.5, 1.0, 1.0, 1.0 } 32 | let color_light_pink = color { 1.0, 0.5, 1.0, 1.0 } 33 | 34 | let color_dark_red = color { 0.5, 0.0, 0.0, 1.0 } 35 | let color_dark_green = color { 0.0, 0.5, 0.0, 1.0 } 36 | let color_dark_blue = color { 0.0, 0.0, 0.5, 1.0 } 37 | let color_olive = color { 0.5, 0.5, 0.0, 1.0 } 38 | let color_teal = color { 0.0, 0.5, 0.5, 1.0 } 39 | let color_purple = color { 0.5, 0.0, 0.5, 1.0 } 40 | 41 | let color_orange = color { 1.0, 0.5, 0.0, 1.0 } 42 | let color_chartreuse = color { 0.5, 1.0, 0.0, 1.0 } 43 | let color_springgreen = color { 0.0, 1.0, 0.5, 1.0 } 44 | let color_dodgerblue = color { 0.0, 0.5, 1.0, 1.0 } 45 | let color_pink_violet = color { 1.0, 0.0, 0.5, 1.0 } 46 | let color_blue_violet = color { 0.5, 0.0, 1.0, 1.0 } 47 | 48 | def from_srgb(col): return pow(col, 2.2) 49 | def to_srgb(col): return pow(col, 1.0 / 2.2) 50 | -------------------------------------------------------------------------------- /TS/scripts/modules/stdtype.lobster: -------------------------------------------------------------------------------- 1 | // These types have special status in the language, as they can be used with 2 | // mathematical operators, and many builtin functions. 3 | 4 | // This file is automatically included in each Lobster program (!) 5 | 6 | // vector types: generally for float or int elements, but useful for other types as well. 7 | 8 | struct vec2: 9 | x:T 10 | y:T 11 | 12 | struct vec3 : vec2 13 | z:T 14 | 15 | struct vec4 : vec3 16 | w:T 17 | 18 | // Specialized type names: 19 | 20 | struct float2 = vec2 21 | struct int2 = vec2 22 | 23 | struct float3 = vec3 24 | struct int3 = vec3 25 | 26 | struct float4 = vec4 27 | struct int4 = vec4 28 | 29 | // Booleans are an enum. 30 | 31 | enum bool: 32 | false 33 | true 34 | -------------------------------------------------------------------------------- /TS/translations/de/compile.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/de/merge.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/de/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/de/ts.mo -------------------------------------------------------------------------------- /TS/translations/fr_FR/compile.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/fr_FR/compile.sh: -------------------------------------------------------------------------------- 1 | msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/fr_FR/merge.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/fr_FR/merge.sh: -------------------------------------------------------------------------------- 1 | msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/fr_FR/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/fr_FR/ts.mo -------------------------------------------------------------------------------- /TS/translations/it/compile.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/it/merge.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/it/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/it/ts.mo -------------------------------------------------------------------------------- /TS/translations/pt_BR/compile.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/pt_BR/merge.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/pt_BR/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/pt_BR/ts.mo -------------------------------------------------------------------------------- /TS/translations/readme_translations.txt: -------------------------------------------------------------------------------- 1 | This folder contains translations of the TreeSheets UI into various languages. 2 | 3 | To work on these translations, you need xgettext/msginit/msgfmt commands, 4 | which likely are already on your system on Linux/OSX, or on Windows you can 5 | get them from e.g. https://mlocati.github.io/articles/gettext-iconv-windows.html 6 | 7 | This generally follows the gettext standard, see e.g. 8 | http://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html 9 | 10 | To recompile the main template file (extracting strings from the source code), 11 | run src/genpot.bat or similar. 12 | 13 | To create a translation for a new language, run (inside TS/translations): 14 | msginit --input ts.pot --locale=lang --output=lang/ts.po 15 | replacing "lang" with either the 2-letter ISO 639-1 code (e.g. "it") or the 16 | 5-letter combination of the ISO 639 code + ISO 3166 country code (e.g. "pt_BR") 17 | for the new language. 18 | 19 | To merge the translation for an existing language with the strings from the 20 | recompiled main template file, run lang/merge.bat, replacing "lang" as 21 | described above. 22 | 23 | To re-compile the language definitions, run lang/compile.bat, replacing "lang" 24 | as described above. 25 | -------------------------------------------------------------------------------- /TS/translations/ru_RU/compile.sh: -------------------------------------------------------------------------------- 1 | msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/ru_RU/info_Focus&Approaches.md: -------------------------------------------------------------------------------- 1 | 2025-03-20 2 | 3 | [Устинов Александр](quarus@ya.ru) 4 | 5 | Из-за многократно построчно Повторяющиеся Слов и Фраз в Меню, текст таких пунктов сливается, а Смысл пунктов Меню плохо воспринимается (Смысл приходится искать после повторяющихся слов и фраз и среди них)... в таком Меню сложно ориентироваться, соответственно - низка эффективность освоения и работы в программе! 6 | 7 | Поэтому, при переводе Меню программы: 8 | 9 | ***Фокус*** *сосредоточен на реализации возможности максимальной лёгкости*: 10 | 1. ориентации в Меню и; 11 | 2. восприятия смысла пунктов Меню. 12 | 13 | Соответственно, этого *можно достичь только следующими* ***Подходами***: 14 | 1. уменьшением мешающей, дублируемой и несущественной информации в пунктах Меню; 15 | 2. выделением слов, определяющих Смысл пунктов Меню. 16 | 17 | Соответственно, в переводе это ***Реализуется*** через: 18 | 1. Сокращение фраз (без ухудшения и искажения Смысла) и Замещение построчно повторяющихся слов и фраз на многоточие (эффективность восприятия и ориентации оценена незаинтересованной стороной); 19 | 2. Применение Заглавных букв, в Словах Определяющих Смысл (что в целом соответствуют первоначальному стилю, на английском). 20 | -------------------------------------------------------------------------------- /TS/translations/ru_RU/merge.sh: -------------------------------------------------------------------------------- 1 | msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/ru_RU/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/ru_RU/ts.mo -------------------------------------------------------------------------------- /TS/translations/zh_CN/compile.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgfmt --output-file=ts.mo ts.po 2 | -------------------------------------------------------------------------------- /TS/translations/zh_CN/merge.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\TreeSheets\gettext_bin\msgmerge --update --backup=numbered ts.po ../ts.pot 2 | -------------------------------------------------------------------------------- /TS/translations/zh_CN/ts.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/TS/translations/zh_CN/ts.mo -------------------------------------------------------------------------------- /ZLIB_LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 Wouter van Oortmerssen 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 19 | 3. This notice may not be removed or altered from any source 20 | distribution. 21 | -------------------------------------------------------------------------------- /platform/linux/com.strlen.TreeSheets.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=TreeSheets 5 | GenericName=Hierarchical Spreadsheet 6 | GenericName[it]=Fogli di Calcolo 7 | Comment=A hierarchical spreadsheet / outliner productivity tool. 8 | TryExec=TreeSheets 9 | Exec=TreeSheets %f 10 | Terminal=false 11 | Icon=com.strlen.TreeSheets 12 | MimeType=application/x-treesheets; 13 | Categories=Office;Utility;Spreadsheet;TextEditor; 14 | Keywords=mindmaps;knowledge;organizer;organiser;information;brainstorming;pim;database;todo; 15 | -------------------------------------------------------------------------------- /platform/linux/com.strlen.TreeSheets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TreeSheets document 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /platform/osx/App.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/platform/osx/App.icns -------------------------------------------------------------------------------- /platform/osx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeRole 11 | Editor 12 | CFBundleTypeExtensions 13 | 14 | cts 15 | 16 | CFBundleTypeIconFile 17 | App 18 | CFBundleTypeName 19 | TreeSheets 20 | 21 | 22 | CFBundleExecutable 23 | treesheets 24 | CFBundleGetInfoString 25 | 26 | CFBundleIconFile 27 | App.icns 28 | CFBundleIdentifier 29 | com.strlen.TreeSheets 30 | CFBundleInfoDictionaryVersion 31 | 6.0 32 | CFBundleLocalizations 33 | 34 | English 35 | German 36 | French 37 | Chinese 38 | Portuguese 39 | Russian 40 | 41 | CFBundleLongVersionString 42 | 43 | CFBundleName 44 | TreeSheets 45 | CFBundlePackageType 46 | APPL 47 | CFBundleShortVersionString 48 | 49 | CFBundleSignature 50 | ???? 51 | CFBundleVersion 52 | 53 | CSResourcesFileMapped 54 | 55 | LSApplicationCategoryType 56 | public.app-category.productivity 57 | LSMinimumSystemVersion 58 | 10.15 59 | NSHighResolutionCapable 60 | 61 | NSHumanReadableCopyright 62 | Copyright © 2013 Wouter van Oortmerssen. All rights reserved. 63 | NSMainNibFile 64 | MainMenu 65 | NSPrincipalClass 66 | NSApplication 67 | 68 | 69 | -------------------------------------------------------------------------------- /platform/win/icon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "icon1.ico" 2 | -------------------------------------------------------------------------------- /platform/win/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/platform/win/icon1.ico -------------------------------------------------------------------------------- /src/StackWalkerHelpers.h: -------------------------------------------------------------------------------- 1 | extern void InitUnhandledExceptionFilter(int argc, char* argv[]); 2 | 3 | -------------------------------------------------------------------------------- /src/genpot.bat: -------------------------------------------------------------------------------- 1 | xgettext --keyword=_ --sort-output --no-location -o ../TS/translations/ts.pot myframe.h document.h system.h mywxtools.h 2 | -------------------------------------------------------------------------------- /src/myevents.h: -------------------------------------------------------------------------------- 1 | 2 | BEGIN_EVENT_TABLE(treesheets::MyFrame, wxFrame) 3 | #ifndef __WXMAC__ 4 | EVT_DPI_CHANGED(treesheets::MyFrame::OnDPIChanged) 5 | #endif 6 | EVT_SIZING(treesheets::MyFrame::OnSizing) 7 | EVT_MENU(wxID_ANY, treesheets::MyFrame::OnMenu) 8 | EVT_TEXT(A_SEARCH, treesheets::MyFrame::OnSearch) 9 | EVT_TEXT_ENTER(A_SEARCH, treesheets::MyFrame::OnSearchReplaceEnter) 10 | EVT_TEXT_ENTER(A_REPLACE, treesheets::MyFrame::OnSearchReplaceEnter) 11 | EVT_CLOSE(treesheets::MyFrame::OnClosing) 12 | EVT_MAXIMIZE(treesheets::MyFrame::OnMaximize) 13 | EVT_ACTIVATE_APP(treesheets::MyFrame::OnActivate) 14 | EVT_COMBOBOX(A_CELLCOLOR, treesheets::MyFrame::OnChangeColor) 15 | EVT_COMBOBOX(A_TEXTCOLOR, treesheets::MyFrame::OnChangeColor) 16 | EVT_COMBOBOX(A_BORDCOLOR, treesheets::MyFrame::OnChangeColor) 17 | EVT_COMBOBOX(A_DDIMAGE, treesheets::MyFrame::OnDDImage) 18 | EVT_ICONIZE(treesheets::MyFrame::OnIconize) 19 | EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, treesheets::MyFrame::OnTabChange) 20 | EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, treesheets::MyFrame::OnTabClose) 21 | EVT_SYS_COLOUR_CHANGED(treesheets::MyFrame::OnSysColourChanged) 22 | END_EVENT_TABLE() 23 | 24 | BEGIN_EVENT_TABLE(treesheets::MyApp, wxApp) 25 | END_EVENT_TABLE() 26 | 27 | BEGIN_EVENT_TABLE(treesheets::TSCanvas, wxScrolledWindow) 28 | EVT_MOUSEWHEEL(treesheets::TSCanvas::OnMouseWheel) 29 | EVT_PAINT(treesheets::TSCanvas::OnPaint) 30 | EVT_MOTION(treesheets::TSCanvas::OnMotion) 31 | EVT_LEFT_DOWN(treesheets::TSCanvas::OnLeftDown) 32 | EVT_LEFT_UP(treesheets::TSCanvas::OnLeftUp) 33 | EVT_RIGHT_DOWN(treesheets::TSCanvas::OnRightDown) 34 | EVT_LEFT_DCLICK(treesheets::TSCanvas::OnLeftDoubleClick) 35 | EVT_CHAR(treesheets::TSCanvas::OnChar) 36 | EVT_KEY_DOWN(treesheets::TSCanvas::OnKeyDown) 37 | EVT_CONTEXT_MENU(treesheets::TSCanvas::OnContextMenuClick) 38 | EVT_SIZE(treesheets::TSCanvas::OnSize) 39 | EVT_SCROLLWIN(treesheets::TSCanvas::OnScrollWin) 40 | END_EVENT_TABLE() 41 | 42 | BEGIN_EVENT_TABLE(treesheets::ThreeChoiceDialog, wxDialog) 43 | EVT_BUTTON(wxID_ANY, treesheets::ThreeChoiceDialog::OnButton) 44 | END_EVENT_TABLE() 45 | 46 | BEGIN_EVENT_TABLE(treesheets::DateTimeRangeDialog, wxDialog) 47 | EVT_BUTTON(wxID_ANY, treesheets::DateTimeRangeDialog::OnButton) 48 | END_EVENT_TABLE() 49 | -------------------------------------------------------------------------------- /src/script_interface.h: -------------------------------------------------------------------------------- 1 | 2 | namespace script { 3 | 4 | typedef std::pair icoord; 5 | typedef std::pair ibox; 6 | 7 | struct ScriptInterface { 8 | virtual bool LoadDocument(const char *filename) = 0; 9 | virtual void GoToRoot() = 0; 10 | virtual void GoToView() = 0; 11 | virtual bool HasSelection() = 0; 12 | virtual void GoToSelection() = 0; 13 | virtual bool HasParent() = 0; 14 | virtual void GoToParent() = 0; 15 | virtual int NumChildren() = 0; 16 | virtual icoord NumColumnsRows() = 0; 17 | virtual ibox SelectionBox() = 0; 18 | virtual void GoToChild(int n) = 0; 19 | virtual void GoToColumnRow(int x, int y) = 0; 20 | virtual std::string GetText() = 0; 21 | virtual void SetText(std::string_view t) = 0; 22 | virtual void CreateGrid(int x, int n) = 0; 23 | virtual void InsertColumn(int x) = 0; 24 | virtual void InsertRow(int y) = 0; 25 | virtual void Delete(int x, int y, int xs, int ys) = 0; 26 | virtual void SetBackgroundColor(uint32_t col) = 0; 27 | virtual void SetTextColor(uint32_t col) = 0; 28 | virtual void SetTextFiltered(bool filtered) = 0; 29 | virtual bool IsTextFiltered() = 0; 30 | virtual void SetBorderColor(uint32_t col) = 0; 31 | virtual void SetRelativeSize(int s) = 0; 32 | virtual void SetStyle(int s) = 0; 33 | virtual void SetStatusMessage(std::string_view msg) = 0; 34 | virtual void SetWindowSize(int width, int height) = 0; 35 | virtual std::string GetFileNameFromUser(bool is_save) = 0; 36 | virtual std::string GetFileName() = 0; 37 | virtual int64_t LastEdit() = 0; 38 | virtual ~ScriptInterface() {}; 39 | }; 40 | 41 | extern std::string InitLobster(ScriptInterface *_si, const char *exefilepath, 42 | const char *auxfilepath, bool from_bundle, FileLoader sl); 43 | extern std::string RunLobster(std::string_view filename, std::string_view code, bool dump_builtins); 44 | extern void TSDumpBuiltinDoc(); 45 | 46 | } // namespace script 47 | -------------------------------------------------------------------------------- /src/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /src/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define _CRT_SECURE_NO_WARNINGS 5 | #define _SCL_SECURE_NO_WARNINGS 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #ifdef _WIN32 26 | #include 27 | #include 28 | #include 29 | #endif 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | #include 77 | #include 78 | #include 79 | 80 | #include "threadpool.h" 81 | #include "tools.h" 82 | 83 | #ifdef _WIN32 84 | #include "StackWalkerHelpers.h" 85 | #endif 86 | 87 | #ifdef __WXMAC__ 88 | #include 89 | #endif 90 | 91 | using namespace std; 92 | -------------------------------------------------------------------------------- /src/threadpool.h: -------------------------------------------------------------------------------- 1 | class ThreadPool { 2 | public: 3 | ThreadPool(size_t); 4 | template 5 | auto enqueue(F&& f, Args&&... args) 6 | -> std::future::type>; 7 | ~ThreadPool(); 8 | 9 | private: 10 | // need to keep track of threads so we can join them 11 | std::vector workers; 12 | // the task queue 13 | std::queue> tasks; 14 | 15 | // synchronization 16 | std::mutex queue_mutex; 17 | std::condition_variable condition; 18 | bool stop; 19 | }; 20 | 21 | // the constructor just launches some amount of workers 22 | inline ThreadPool::ThreadPool(size_t threads) : stop(false) { 23 | for (size_t i = 0; i < threads; ++i) 24 | workers.emplace_back([this] { 25 | for (;;) { 26 | std::function task; 27 | 28 | { 29 | std::unique_lock lock(this->queue_mutex); 30 | this->condition.wait(lock, 31 | [this] { return this->stop || !this->tasks.empty(); }); 32 | if (this->stop && this->tasks.empty()) return; 33 | task = std::move(this->tasks.front()); 34 | this->tasks.pop(); 35 | } 36 | 37 | task(); 38 | } 39 | }); 40 | } 41 | 42 | // add new work item to the pool 43 | template 44 | auto ThreadPool::enqueue(F&& f, Args&&... args) 45 | -> std::future::type> { 46 | using return_type = typename std::invoke_result::type; 47 | 48 | auto task = std::make_shared>( 49 | std::bind(std::forward(f), std::forward(args)...)); 50 | 51 | std::future res = task->get_future(); 52 | { 53 | std::unique_lock lock(queue_mutex); 54 | 55 | // don't allow enqueueing after stopping the pool 56 | assert(!stop); 57 | 58 | tasks.emplace([task]() { (*task)(); }); 59 | } 60 | condition.notify_one(); 61 | return res; 62 | } 63 | 64 | // the destructor joins all threads 65 | inline ThreadPool::~ThreadPool() { 66 | { 67 | std::unique_lock lock(queue_mutex); 68 | stop = true; 69 | } 70 | condition.notify_all(); 71 | for (std::thread& worker : workers) worker.join(); 72 | } 73 | -------------------------------------------------------------------------------- /src/tools.h: -------------------------------------------------------------------------------- 1 | typedef unsigned char uchar; 2 | typedef unsigned short ushort; 3 | typedef unsigned int uint; 4 | 5 | #ifdef _DEBUG 6 | #define ASSERT(c) assert(c) 7 | #else 8 | #define ASSERT(c) \ 9 | if (c) {} 10 | #endif 11 | 12 | #define loop(i, m) for (int i = 0; i < int(m); i++) 13 | #define loopv(i, v) for (int i = 0; i < (v).size(); i++) 14 | #define loopvrev(i, v) for (int i = (v).size() - 1; i >= 0; i--) 15 | 16 | #define max(a, b) ((a) < (b) ? (b) : (a)) 17 | #define min(a, b) ((a) > (b) ? (b) : (a)) 18 | #define sign(x) ((x) < 0 ? -1 : 1) 19 | 20 | #define varargs(v, fmt, body) \ 21 | { \ 22 | va_list v; \ 23 | va_start(v, fmt); \ 24 | body; \ 25 | va_end(v); \ 26 | } 27 | 28 | #define DELETEP(p) \ 29 | { \ 30 | if (p) { \ 31 | delete p; \ 32 | p = nullptr; \ 33 | } \ 34 | } 35 | #define DELETEA(a) \ 36 | { \ 37 | if (a) { \ 38 | delete[] a; \ 39 | a = nullptr; \ 40 | } \ 41 | } 42 | 43 | #define bound(v, a, s, e) \ 44 | { \ 45 | v += a; \ 46 | if (v > (e)) v = (e); \ 47 | if (v < (s)) v = (s); \ 48 | } 49 | 50 | // Use the same on all platforms, because: 51 | // Win32: usually contains both. 52 | // Macos: older versions use \r and newer \n in clipboard? 53 | // Linux: should only ever be \n but if we encounter \r we want to strip it. 54 | #define LINE_SEPERATOR L"\r\n" 55 | 56 | #ifdef WIN32 57 | #define PATH_SEPERATOR L"\\" 58 | #else 59 | #define PATH_SEPERATOR L"/" 60 | #define __cdecl 61 | #define _vsnprintf vsnprintf 62 | #endif 63 | 64 | template inline void swap_(T &a, T &b) { 65 | T c = a; 66 | a = b; 67 | b = c; 68 | }; 69 | 70 | #ifdef WIN32 71 | #pragma warning(3 : 4189) // local variable is initialized but not referenced 72 | #pragma warning(disable : 4244) // conversion from 'int' to 'float', possible loss of data 73 | #pragma warning(disable : 4355) // 'this' : used in base member initializer list 74 | #pragma warning(disable : 4996) // 'strncpy' was declared deprecated 75 | #endif 76 | 77 | inline uchar *loadfile(const char *fn, size_t *lenret = nullptr) { 78 | FILE *f = fopen(fn, "rb"); 79 | if (!f) return nullptr; 80 | fseek(f, 0, SEEK_END); 81 | size_t len = ftell(f); 82 | fseek(f, 0, SEEK_SET); 83 | uchar *buf = (uchar *)malloc(len + 1); 84 | if (!buf) { 85 | fclose(f); 86 | return nullptr; 87 | } 88 | buf[len] = 0; 89 | size_t rlen = fread(buf, 1, len, f); 90 | fclose(f); 91 | if (len != rlen || len <= 0) { 92 | free(buf); 93 | return nullptr; 94 | } 95 | if (lenret) *lenret = len; 96 | return buf; 97 | } 98 | 99 | // for use with vc++ crtdbg 100 | 101 | #if defined(_DEBUG) && defined(_WIN32) 102 | inline void *__cdecl operator new(size_t n, const char *fn, int l) { 103 | return ::operator new(n, 1, fn, l); 104 | } 105 | inline void *__cdecl operator new[](size_t n, const char *fn, int l) { 106 | return ::operator new[](n, 1, fn, l); 107 | } 108 | inline void __cdecl operator delete(void *p, const char *fn, int l) { 109 | ::operator delete(p, 1, fn, l); 110 | } 111 | inline void __cdecl operator delete[](void *p, const char *fn, int l) { 112 | ::operator delete[](p, 1, fn, l); 113 | } 114 | #define new new (__FILE__, __LINE__) 115 | #endif 116 | 117 | inline uint32_t FNV1A32(std::vector &vec) { 118 | uint32_t hash = 0x811C9DC5; 119 | for (uint8_t c : vec) { 120 | hash ^= c; 121 | hash *= 0x01000193; 122 | } 123 | return hash; 124 | } 125 | 126 | inline uint64_t FNV1A64(uint8_t *data, size_t size) { 127 | uint64_t hash = 0xCBF29CE484222325; 128 | for (size_t i = 0; i < size; ++i) { 129 | hash ^= data[i]; 130 | hash *= 0x100000001B3; 131 | } 132 | return hash; 133 | } 134 | -------------------------------------------------------------------------------- /thirdparty/StackWalker/StackWalker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/thirdparty/StackWalker/StackWalker.cpp -------------------------------------------------------------------------------- /thirdparty/StackWalker/StackWalkerHelpers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/thirdparty/StackWalker/StackWalkerHelpers.cpp -------------------------------------------------------------------------------- /thirdparty/lobster/external/flatbuffers/src/idl_gen_text.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_IDL_GEN_TEXT_H_ 18 | #define FLATBUFFERS_IDL_GEN_TEXT_H_ 19 | 20 | #include "flatbuffers/code_generator.h" 21 | 22 | namespace flatbuffers { 23 | 24 | // Constructs a new Text code generator. 25 | std::unique_ptr NewTextCodeGenerator(); 26 | 27 | } // namespace flatbuffers 28 | 29 | #endif // FLATBUFFERS_IDL_GEN_TEXT_H_ 30 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/arm64-asm.c: -------------------------------------------------------------------------------- 1 | /*************************************************************/ 2 | /* 3 | * ARM64 dummy assembler for TCC 4 | * 5 | */ 6 | 7 | #ifdef TARGET_DEFS_ONLY 8 | 9 | #define CONFIG_TCC_ASM 10 | #define NB_ASM_REGS 16 11 | 12 | ST_FUNC void g(int c); 13 | ST_FUNC void gen_le16(int c); 14 | ST_FUNC void gen_le32(int c); 15 | 16 | /*************************************************************/ 17 | #else 18 | /*************************************************************/ 19 | #define USING_GLOBALS 20 | #include "tcc.h" 21 | 22 | static void asm_error(void) 23 | { 24 | tcc_error("ARM asm not implemented."); 25 | } 26 | 27 | /* XXX: make it faster ? */ 28 | ST_FUNC void g(int c) 29 | { 30 | int ind1; 31 | if (nocode_wanted) 32 | return; 33 | ind1 = ind + 1; 34 | if (ind1 > cur_text_section->data_allocated) 35 | section_realloc(cur_text_section, ind1); 36 | cur_text_section->data[ind] = c; 37 | ind = ind1; 38 | } 39 | 40 | ST_FUNC void gen_le16 (int i) 41 | { 42 | g(i); 43 | g(i>>8); 44 | } 45 | 46 | ST_FUNC void gen_le32 (int i) 47 | { 48 | gen_le16(i); 49 | gen_le16(i>>16); 50 | } 51 | 52 | ST_FUNC void gen_expr32(ExprValue *pe) 53 | { 54 | gen_le32(pe->v); 55 | } 56 | 57 | ST_FUNC void asm_opcode(TCCState *s1, int opcode) 58 | { 59 | asm_error(); 60 | } 61 | 62 | ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier) 63 | { 64 | asm_error(); 65 | } 66 | 67 | /* generate prolog and epilog code for asm statement */ 68 | ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands, 69 | int nb_outputs, int is_output, 70 | uint8_t *clobber_regs, 71 | int out_reg) 72 | { 73 | } 74 | 75 | ST_FUNC void asm_compute_constraints(ASMOperand *operands, 76 | int nb_operands, int nb_outputs, 77 | const uint8_t *clobber_regs, 78 | int *pout_reg) 79 | { 80 | } 81 | 82 | ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str) 83 | { 84 | asm_error(); 85 | } 86 | 87 | ST_FUNC int asm_parse_regvar (int t) 88 | { 89 | asm_error(); 90 | return -1; 91 | } 92 | 93 | /*************************************************************/ 94 | #endif /* ndef TARGET_DEFS_ONLY */ 95 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/config.h: -------------------------------------------------------------------------------- 1 | #define TCC_VERSION "0.9.27" 2 | 3 | #if defined(__x86_64__) 4 | #define TCC_TARGET_X86_64 1 5 | #elif defined(__aarch64__) 6 | #define TCC_TARGET_ARM64 1 7 | #elif defined(__arm__) 8 | #define TCC_TARGET_ARM 1 9 | #elif defined(__i386__) 10 | #define TCC_TARGET_I386 1 11 | #else 12 | #define TCC_TARGET_X86_64 1 13 | #endif 14 | 15 | #ifdef _WIN32 16 | #define TCC_TARGET_PE 1 17 | #endif 18 | 19 | #ifdef __APPLE__ 20 | #define TCC_IS_NATIVE 21 | #endif 22 | 23 | #define CONFIG_TCC_PREDEFS 1 24 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/libtcc.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBTCC_H 2 | #define LIBTCC_H 3 | 4 | #ifndef LIBTCCAPI 5 | # define LIBTCCAPI 6 | #endif 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | struct TCCState; 13 | 14 | typedef struct TCCState TCCState; 15 | 16 | typedef void (*TCCErrorFunc)(void *opaque, const char *msg); 17 | 18 | /* create a new TCC compilation context */ 19 | LIBTCCAPI TCCState *tcc_new(void); 20 | 21 | /* free a TCC compilation context */ 22 | LIBTCCAPI void tcc_delete(TCCState *s); 23 | 24 | /* set CONFIG_TCCDIR at runtime */ 25 | LIBTCCAPI void tcc_set_lib_path(TCCState *s, const char *path); 26 | 27 | /* set error/warning display callback */ 28 | LIBTCCAPI void tcc_set_error_func(TCCState *s, void *error_opaque, TCCErrorFunc error_func); 29 | 30 | /* return error/warning callback */ 31 | LIBTCCAPI TCCErrorFunc tcc_get_error_func(TCCState *s); 32 | 33 | /* return error/warning callback opaque pointer */ 34 | LIBTCCAPI void *tcc_get_error_opaque(TCCState *s); 35 | 36 | /* set options as from command line (multiple supported) */ 37 | LIBTCCAPI void tcc_set_options(TCCState *s, const char *str); 38 | 39 | /*****************************/ 40 | /* preprocessor */ 41 | 42 | /* add include path */ 43 | LIBTCCAPI int tcc_add_include_path(TCCState *s, const char *pathname); 44 | 45 | /* add in system include path */ 46 | LIBTCCAPI int tcc_add_sysinclude_path(TCCState *s, const char *pathname); 47 | 48 | /* define preprocessor symbol 'sym'. value can be NULL, sym can be "sym=val" */ 49 | LIBTCCAPI void tcc_define_symbol(TCCState *s, const char *sym, const char *value); 50 | 51 | /* undefine preprocess symbol 'sym' */ 52 | LIBTCCAPI void tcc_undefine_symbol(TCCState *s, const char *sym); 53 | 54 | /*****************************/ 55 | /* compiling */ 56 | 57 | /* add a file (C file, dll, object, library, ld script). Return -1 if error. */ 58 | LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename); 59 | 60 | /* compile a string containing a C source. Return -1 if error. */ 61 | LIBTCCAPI int tcc_compile_string(TCCState *s, const char *buf); 62 | 63 | /*****************************/ 64 | /* linking commands */ 65 | 66 | /* set output type. MUST BE CALLED before any compilation */ 67 | LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type); 68 | #define TCC_OUTPUT_MEMORY 1 /* output will be run in memory (default) */ 69 | #define TCC_OUTPUT_EXE 2 /* executable file */ 70 | #define TCC_OUTPUT_DLL 3 /* dynamic library */ 71 | #define TCC_OUTPUT_OBJ 4 /* object file */ 72 | #define TCC_OUTPUT_PREPROCESS 5 /* only preprocess (used internally) */ 73 | 74 | /* equivalent to -Lpath option */ 75 | LIBTCCAPI int tcc_add_library_path(TCCState *s, const char *pathname); 76 | 77 | /* the library name is the same as the argument of the '-l' option */ 78 | LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname); 79 | 80 | /* add a symbol to the compiled program */ 81 | LIBTCCAPI int tcc_add_symbol(TCCState *s, const char *name, const void *val); 82 | 83 | /* output an executable, library or object file. DO NOT call 84 | tcc_relocate() before. */ 85 | LIBTCCAPI int tcc_output_file(TCCState *s, const char *filename); 86 | 87 | /* link and run main() function and return its value. DO NOT call 88 | tcc_relocate() before. */ 89 | LIBTCCAPI int tcc_run(TCCState *s, int argc, char **argv); 90 | 91 | /* do all relocations (needed before using tcc_get_symbol()) */ 92 | LIBTCCAPI int tcc_relocate(TCCState *s1, void *ptr); 93 | /* possible values for 'ptr': 94 | - TCC_RELOCATE_AUTO : Allocate and manage memory internally 95 | - NULL : return required memory size for the step below 96 | - memory address : copy code to memory passed by the caller 97 | returns -1 if error. */ 98 | #define TCC_RELOCATE_AUTO (void*)1 99 | 100 | /* return symbol value or NULL if not found */ 101 | LIBTCCAPI void *tcc_get_symbol(TCCState *s, const char *name); 102 | 103 | /* return symbol value or NULL if not found */ 104 | LIBTCCAPI void tcc_list_symbols(TCCState *s, void *ctx, 105 | void (*symbol_cb)(void *ctx, const char *name, const void *val)); 106 | 107 | #ifdef __cplusplus 108 | } 109 | #endif 110 | 111 | #endif 112 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/readmes/README: -------------------------------------------------------------------------------- 1 | Tiny C Compiler - C Scripting Everywhere - The Smallest ANSI C compiler 2 | ----------------------------------------------------------------------- 3 | 4 | Features: 5 | -------- 6 | 7 | - SMALL! You can compile and execute C code everywhere, for example on 8 | rescue disks. 9 | 10 | - FAST! tcc generates optimized x86 code. No byte code 11 | overhead. Compile, assemble and link about 7 times faster than 'gcc 12 | -O0'. 13 | 14 | - UNLIMITED! Any C dynamic library can be used directly. TCC is 15 | heading toward full ISOC99 compliance. TCC can of course compile 16 | itself. 17 | 18 | - SAFE! tcc includes an optional memory and bound checker. Bound 19 | checked code can be mixed freely with standard code. 20 | 21 | - Compile and execute C source directly. No linking or assembly 22 | necessary. Full C preprocessor included. 23 | 24 | - C script supported : just add '#!/usr/local/bin/tcc -run' at the first 25 | line of your C source, and execute it directly from the command 26 | line. 27 | 28 | Documentation: 29 | ------------- 30 | 31 | 1) Installation on a i386/x86_64/arm/aarch64/riscv64 32 | Linux/macOS/FreeBSD/NetBSD/OpenBSD hosts. 33 | 34 | ./configure 35 | make 36 | make test 37 | make install 38 | 39 | Notes: For FreeBSD, NetBSD and OpenBSD, gmake should be used instead of make. 40 | For Windows read tcc-win32.txt. 41 | 42 | makeinfo must be installed to compile the doc. By default, tcc is 43 | installed in /usr/local/bin. ./configure --help shows configuration 44 | options. 45 | 46 | 47 | 2) Introduction 48 | 49 | We assume here that you know ANSI C. Look at the example ex1.c to know 50 | what the programs look like. 51 | 52 | The include file can be used if you want a small basic libc 53 | include support (especially useful for floppy disks). Of course, you 54 | can also use standard headers, although they are slower to compile. 55 | 56 | You can begin your C script with '#!/usr/local/bin/tcc -run' on the first 57 | line and set its execute bits (chmod a+x your_script). Then, you can 58 | launch the C code as a shell or perl script :-) The command line 59 | arguments are put in 'argc' and 'argv' of the main functions, as in 60 | ANSI C. 61 | 62 | 3) Examples 63 | 64 | ex1.c: simplest example (hello world). Can also be launched directly 65 | as a script: './ex1.c'. 66 | 67 | ex2.c: more complicated example: find a number with the four 68 | operations given a list of numbers (benchmark). 69 | 70 | ex3.c: compute fibonacci numbers (benchmark). 71 | 72 | ex4.c: more complicated: X11 program. Very complicated test in fact 73 | because standard headers are being used ! As for ex1.c, can also be launched 74 | directly as a script: './ex4.c'. 75 | 76 | ex5.c: 'hello world' with standard glibc headers. 77 | 78 | tcc.c: TCC can of course compile itself. Used to check the code 79 | generator. 80 | 81 | tcctest.c: auto test for TCC which tests many subtle possible bugs. Used 82 | when doing 'make test'. 83 | 84 | 4) Full Documentation 85 | 86 | Please read tcc-doc.html to have all the features of TCC. 87 | 88 | Additional information is available for the Windows port in tcc-win32.txt. 89 | 90 | License: 91 | ------- 92 | 93 | TCC is distributed under the GNU Lesser General Public License (see 94 | COPYING file). 95 | 96 | Fabrice Bellard. 97 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/readmes/VERSION: -------------------------------------------------------------------------------- 1 | 0.9.27 2 | -------------------------------------------------------------------------------- /thirdparty/lobster/external/libtcc/stab.h: -------------------------------------------------------------------------------- 1 | #ifndef __GNU_STAB__ 2 | 3 | /* Indicate the GNU stab.h is in use. */ 4 | 5 | #define __GNU_STAB__ 6 | 7 | #define __define_stab(NAME, CODE, STRING) NAME=CODE, 8 | 9 | enum __stab_debug_code 10 | { 11 | #include "stab.def" 12 | LAST_UNUSED_STAB_CODE 13 | }; 14 | 15 | #undef __define_stab 16 | 17 | #endif /* __GNU_STAB_ */ 18 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/StackWalker/StackWalker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/thirdparty/lobster/include/StackWalker/StackWalker.cpp -------------------------------------------------------------------------------- /thirdparty/lobster/include/StackWalker/StackWalkerHelpers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/thirdparty/lobster/include/StackWalker/StackWalkerHelpers.cpp -------------------------------------------------------------------------------- /thirdparty/lobster/include/StackWalker/StackWalkerHelpers.h: -------------------------------------------------------------------------------- 1 | extern void InitUnhandledExceptionFilter(int argc, char* argv[]); 2 | 3 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/allocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_ALLOCATOR_H_ 18 | #define FLATBUFFERS_ALLOCATOR_H_ 19 | 20 | #include "flatbuffers/base.h" 21 | 22 | namespace flatbuffers { 23 | 24 | // Allocator interface. This is flatbuffers-specific and meant only for 25 | // `vector_downward` usage. 26 | class Allocator { 27 | public: 28 | virtual ~Allocator() {} 29 | 30 | // Allocate `size` bytes of memory. 31 | virtual uint8_t *allocate(size_t size) = 0; 32 | 33 | // Deallocate `size` bytes of memory at `p` allocated by this allocator. 34 | virtual void deallocate(uint8_t *p, size_t size) = 0; 35 | 36 | // Reallocate `new_size` bytes of memory, replacing the old region of size 37 | // `old_size` at `p`. In contrast to a normal realloc, this grows downwards, 38 | // and is intended specifcally for `vector_downward` use. 39 | // `in_use_back` and `in_use_front` indicate how much of `old_size` is 40 | // actually in use at each end, and needs to be copied. 41 | virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size, 42 | size_t new_size, size_t in_use_back, 43 | size_t in_use_front) { 44 | FLATBUFFERS_ASSERT(new_size > old_size); // vector_downward only grows 45 | uint8_t *new_p = allocate(new_size); 46 | memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, 47 | in_use_front); 48 | deallocate(old_p, old_size); 49 | return new_p; 50 | } 51 | 52 | protected: 53 | // Called by `reallocate_downward` to copy memory from `old_p` of `old_size` 54 | // to `new_p` of `new_size`. Only memory of size `in_use_front` and 55 | // `in_use_back` will be copied from the front and back of the old memory 56 | // allocation. 57 | void memcpy_downward(uint8_t *old_p, size_t old_size, uint8_t *new_p, 58 | size_t new_size, size_t in_use_back, 59 | size_t in_use_front) { 60 | memcpy(new_p + new_size - in_use_back, old_p + old_size - in_use_back, 61 | in_use_back); 62 | memcpy(new_p, old_p, in_use_front); 63 | } 64 | }; 65 | 66 | } // namespace flatbuffers 67 | 68 | #endif // FLATBUFFERS_ALLOCATOR_H_ 69 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/buffer_ref.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_BUFFER_REF_H_ 18 | #define FLATBUFFERS_BUFFER_REF_H_ 19 | 20 | #include "flatbuffers/base.h" 21 | #include "flatbuffers/verifier.h" 22 | 23 | namespace flatbuffers { 24 | 25 | // Convenient way to bundle a buffer and its length, to pass it around 26 | // typed by its root. 27 | // A BufferRef does not own its buffer. 28 | struct BufferRefBase {}; // for std::is_base_of 29 | 30 | template struct BufferRef : BufferRefBase { 31 | BufferRef() : buf(nullptr), len(0), must_free(false) {} 32 | BufferRef(uint8_t *_buf, uoffset_t _len) 33 | : buf(_buf), len(_len), must_free(false) {} 34 | 35 | ~BufferRef() { 36 | if (must_free) free(buf); 37 | } 38 | 39 | const T *GetRoot() const { return flatbuffers::GetRoot(buf); } 40 | 41 | bool Verify() { 42 | Verifier verifier(buf, len); 43 | return verifier.VerifyBuffer(nullptr); 44 | } 45 | 46 | uint8_t *buf; 47 | uoffset_t len; 48 | bool must_free; 49 | }; 50 | 51 | } // namespace flatbuffers 52 | 53 | #endif // FLATBUFFERS_BUFFER_REF_H_ 54 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/code_generator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_CODE_GENERATOR_H_ 18 | #define FLATBUFFERS_CODE_GENERATOR_H_ 19 | 20 | #include 21 | 22 | #include "flatbuffers/idl.h" 23 | 24 | namespace flatbuffers { 25 | 26 | struct CodeGenOptions { 27 | std::string output_path; 28 | }; 29 | 30 | // A code generator interface for producing converting flatbuffer schema into 31 | // code. 32 | class CodeGenerator { 33 | public: 34 | virtual ~CodeGenerator() = default; 35 | 36 | enum Status { 37 | OK = 0, 38 | ERROR = 1, 39 | FAILED_VERIFICATION = 2, 40 | NOT_IMPLEMENTED = 3 41 | }; 42 | 43 | std::string status_detail; 44 | 45 | // Generate code from the provided `parser`. 46 | // 47 | // DEPRECATED: prefer using the other overload of GenerateCode for bfbs. 48 | virtual Status GenerateCode(const Parser &parser, const std::string &path, 49 | const std::string &filename) = 0; 50 | 51 | // Generate code from the provided `parser` and place it in the output. 52 | virtual Status GenerateCodeString(const Parser &parser, 53 | const std::string &filename, 54 | std::string &output) { 55 | (void)parser; 56 | (void)filename; 57 | (void)output; 58 | return Status::NOT_IMPLEMENTED; 59 | } 60 | 61 | // Generate code from the provided `buffer` of given `length`. The buffer is a 62 | // serialized reflection.fbs. 63 | virtual Status GenerateCode(const uint8_t *buffer, int64_t length, 64 | const CodeGenOptions &options) = 0; 65 | 66 | virtual Status GenerateMakeRule(const Parser &parser, const std::string &path, 67 | const std::string &filename, 68 | std::string &output) = 0; 69 | 70 | virtual Status GenerateGrpcCode(const Parser &parser, const std::string &path, 71 | const std::string &filename) = 0; 72 | 73 | virtual Status GenerateRootFile(const Parser &parser, 74 | const std::string &path) = 0; 75 | 76 | virtual bool IsSchemaOnly() const = 0; 77 | 78 | virtual bool SupportsBfbsGeneration() const = 0; 79 | 80 | virtual bool SupportsRootFileGeneration() const = 0; 81 | 82 | virtual IDLOptions::Language Language() const = 0; 83 | 84 | virtual std::string LanguageName() const = 0; 85 | 86 | protected: 87 | CodeGenerator() = default; 88 | 89 | private: 90 | // Copying is not supported. 91 | CodeGenerator(const CodeGenerator &) = delete; 92 | CodeGenerator &operator=(const CodeGenerator &) = delete; 93 | }; 94 | 95 | } // namespace flatbuffers 96 | 97 | #endif // FLATBUFFERS_CODE_GENERATOR_H_ 98 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/default_allocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_DEFAULT_ALLOCATOR_H_ 18 | #define FLATBUFFERS_DEFAULT_ALLOCATOR_H_ 19 | 20 | #include "flatbuffers/allocator.h" 21 | #include "flatbuffers/base.h" 22 | 23 | namespace flatbuffers { 24 | 25 | // DefaultAllocator uses new/delete to allocate memory regions 26 | class DefaultAllocator : public Allocator { 27 | public: 28 | uint8_t *allocate(size_t size) FLATBUFFERS_OVERRIDE { 29 | return new uint8_t[size]; 30 | } 31 | 32 | void deallocate(uint8_t *p, size_t) FLATBUFFERS_OVERRIDE { delete[] p; } 33 | 34 | static void dealloc(void *p, size_t) { delete[] static_cast(p); } 35 | }; 36 | 37 | // These functions allow for a null allocator to mean use the default allocator, 38 | // as used by DetachedBuffer and vector_downward below. 39 | // This is to avoid having a statically or dynamically allocated default 40 | // allocator, or having to move it between the classes that may own it. 41 | inline uint8_t *Allocate(Allocator *allocator, size_t size) { 42 | return allocator ? allocator->allocate(size) 43 | : DefaultAllocator().allocate(size); 44 | } 45 | 46 | inline void Deallocate(Allocator *allocator, uint8_t *p, size_t size) { 47 | if (allocator) 48 | allocator->deallocate(p, size); 49 | else 50 | DefaultAllocator().deallocate(p, size); 51 | } 52 | 53 | inline uint8_t *ReallocateDownward(Allocator *allocator, uint8_t *old_p, 54 | size_t old_size, size_t new_size, 55 | size_t in_use_back, size_t in_use_front) { 56 | return allocator ? allocator->reallocate_downward(old_p, old_size, new_size, 57 | in_use_back, in_use_front) 58 | : DefaultAllocator().reallocate_downward( 59 | old_p, old_size, new_size, in_use_back, in_use_front); 60 | } 61 | 62 | } // namespace flatbuffers 63 | 64 | #endif // FLATBUFFERS_DEFAULT_ALLOCATOR_H_ 65 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/detached_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_DETACHED_BUFFER_H_ 18 | #define FLATBUFFERS_DETACHED_BUFFER_H_ 19 | 20 | #include "flatbuffers/allocator.h" 21 | #include "flatbuffers/base.h" 22 | #include "flatbuffers/default_allocator.h" 23 | 24 | namespace flatbuffers { 25 | 26 | // DetachedBuffer is a finished flatbuffer memory region, detached from its 27 | // builder. The original memory region and allocator are also stored so that 28 | // the DetachedBuffer can manage the memory lifetime. 29 | class DetachedBuffer { 30 | public: 31 | DetachedBuffer() 32 | : allocator_(nullptr), 33 | own_allocator_(false), 34 | buf_(nullptr), 35 | reserved_(0), 36 | cur_(nullptr), 37 | size_(0) {} 38 | 39 | DetachedBuffer(Allocator *allocator, bool own_allocator, uint8_t *buf, 40 | size_t reserved, uint8_t *cur, size_t sz) 41 | : allocator_(allocator), 42 | own_allocator_(own_allocator), 43 | buf_(buf), 44 | reserved_(reserved), 45 | cur_(cur), 46 | size_(sz) {} 47 | 48 | DetachedBuffer(DetachedBuffer &&other) noexcept 49 | : allocator_(other.allocator_), 50 | own_allocator_(other.own_allocator_), 51 | buf_(other.buf_), 52 | reserved_(other.reserved_), 53 | cur_(other.cur_), 54 | size_(other.size_) { 55 | other.reset(); 56 | } 57 | 58 | DetachedBuffer &operator=(DetachedBuffer &&other) noexcept { 59 | if (this == &other) return *this; 60 | 61 | destroy(); 62 | 63 | allocator_ = other.allocator_; 64 | own_allocator_ = other.own_allocator_; 65 | buf_ = other.buf_; 66 | reserved_ = other.reserved_; 67 | cur_ = other.cur_; 68 | size_ = other.size_; 69 | 70 | other.reset(); 71 | 72 | return *this; 73 | } 74 | 75 | ~DetachedBuffer() { destroy(); } 76 | 77 | const uint8_t *data() const { return cur_; } 78 | 79 | uint8_t *data() { return cur_; } 80 | 81 | size_t size() const { return size_; } 82 | 83 | // These may change access mode, leave these at end of public section 84 | FLATBUFFERS_DELETE_FUNC(DetachedBuffer(const DetachedBuffer &other)); 85 | FLATBUFFERS_DELETE_FUNC( 86 | DetachedBuffer &operator=(const DetachedBuffer &other)); 87 | 88 | protected: 89 | Allocator *allocator_; 90 | bool own_allocator_; 91 | uint8_t *buf_; 92 | size_t reserved_; 93 | uint8_t *cur_; 94 | size_t size_; 95 | 96 | inline void destroy() { 97 | if (buf_) Deallocate(allocator_, buf_, reserved_); 98 | if (own_allocator_ && allocator_) { delete allocator_; } 99 | reset(); 100 | } 101 | 102 | inline void reset() { 103 | allocator_ = nullptr; 104 | own_allocator_ = false; 105 | buf_ = nullptr; 106 | reserved_ = 0; 107 | cur_ = nullptr; 108 | size_ = 0; 109 | } 110 | }; 111 | 112 | } // namespace flatbuffers 113 | 114 | #endif // FLATBUFFERS_DETACHED_BUFFER_H_ 115 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/file_manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_FILE_MANAGER_H_ 18 | #define FLATBUFFERS_FILE_MANAGER_H_ 19 | 20 | #include 21 | #include 22 | 23 | #include "flatbuffers/util.h" 24 | 25 | namespace flatbuffers { 26 | 27 | // A File interface to write data to file by default or 28 | // save only file names 29 | class FileManager { 30 | public: 31 | FileManager() = default; 32 | virtual ~FileManager() = default; 33 | 34 | virtual bool SaveFile(const std::string &absolute_file_name, 35 | const std::string &content) = 0; 36 | 37 | virtual bool LoadFile(const std::string &absolute_file_name, 38 | std::string *buf) = 0; 39 | 40 | private: 41 | // Copying is not supported. 42 | FileManager(const FileManager &) = delete; 43 | FileManager &operator=(const FileManager &) = delete; 44 | }; 45 | 46 | } // namespace flatbuffers 47 | 48 | #endif // FLATBUFFERS_FILE_MANAGER_H_ 49 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/flex_flat_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_FLEX_FLAT_UTIL_H_ 18 | #define FLATBUFFERS_FLEX_FLAT_UTIL_H_ 19 | 20 | #include "flatbuffers/flatbuffers.h" 21 | #include "flatbuffers/flexbuffers.h" 22 | 23 | namespace flexbuffers { 24 | 25 | // Verifies the `nested` flexbuffer within a flatbuffer vector is valid. 26 | inline bool VerifyNestedFlexBuffer( 27 | const flatbuffers::Vector *const nested, 28 | flatbuffers::Verifier &verifier) { 29 | if (!nested) return true; 30 | return verifier.Check(flexbuffers::VerifyBuffer( 31 | nested->data(), nested->size(), verifier.GetFlexReuseTracker())); 32 | } 33 | 34 | } // namespace flexbuffers 35 | 36 | #endif // FLATBUFFERS_FLEX_FLAT_UTIL_H_ 37 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_HASH_H_ 18 | #define FLATBUFFERS_HASH_H_ 19 | 20 | #include 21 | #include 22 | 23 | #include "flatbuffers/flatbuffers.h" 24 | 25 | namespace flatbuffers { 26 | 27 | template struct FnvTraits { 28 | static const T kFnvPrime; 29 | static const T kOffsetBasis; 30 | }; 31 | 32 | template<> struct FnvTraits { 33 | static const uint32_t kFnvPrime = 0x01000193; 34 | static const uint32_t kOffsetBasis = 0x811C9DC5; 35 | }; 36 | 37 | template<> struct FnvTraits { 38 | static const uint64_t kFnvPrime = 0x00000100000001b3ULL; 39 | static const uint64_t kOffsetBasis = 0xcbf29ce484222645ULL; 40 | }; 41 | 42 | template T HashFnv1(const char *input) { 43 | T hash = FnvTraits::kOffsetBasis; 44 | for (const char *c = input; *c; ++c) { 45 | hash *= FnvTraits::kFnvPrime; 46 | hash ^= static_cast(*c); 47 | } 48 | return hash; 49 | } 50 | 51 | template T HashFnv1a(const char *input) { 52 | T hash = FnvTraits::kOffsetBasis; 53 | for (const char *c = input; *c; ++c) { 54 | hash ^= static_cast(*c); 55 | hash *= FnvTraits::kFnvPrime; 56 | } 57 | return hash; 58 | } 59 | 60 | template<> inline uint16_t HashFnv1(const char *input) { 61 | uint32_t hash = HashFnv1(input); 62 | return (hash >> 16) ^ (hash & 0xffff); 63 | } 64 | 65 | template<> inline uint16_t HashFnv1a(const char *input) { 66 | uint32_t hash = HashFnv1a(input); 67 | return (hash >> 16) ^ (hash & 0xffff); 68 | } 69 | 70 | template struct NamedHashFunction { 71 | const char *name; 72 | 73 | typedef T (*HashFunction)(const char *); 74 | HashFunction function; 75 | }; 76 | 77 | const NamedHashFunction kHashFunctions16[] = { 78 | { "fnv1_16", HashFnv1 }, 79 | { "fnv1a_16", HashFnv1a }, 80 | }; 81 | 82 | const NamedHashFunction kHashFunctions32[] = { 83 | { "fnv1_32", HashFnv1 }, 84 | { "fnv1a_32", HashFnv1a }, 85 | }; 86 | 87 | const NamedHashFunction kHashFunctions64[] = { 88 | { "fnv1_64", HashFnv1 }, 89 | { "fnv1a_64", HashFnv1a }, 90 | }; 91 | 92 | inline NamedHashFunction::HashFunction FindHashFunction16( 93 | const char *name) { 94 | std::size_t size = sizeof(kHashFunctions16) / sizeof(kHashFunctions16[0]); 95 | for (std::size_t i = 0; i < size; ++i) { 96 | if (std::strcmp(name, kHashFunctions16[i].name) == 0) { 97 | return kHashFunctions16[i].function; 98 | } 99 | } 100 | return nullptr; 101 | } 102 | 103 | inline NamedHashFunction::HashFunction FindHashFunction32( 104 | const char *name) { 105 | std::size_t size = sizeof(kHashFunctions32) / sizeof(kHashFunctions32[0]); 106 | for (std::size_t i = 0; i < size; ++i) { 107 | if (std::strcmp(name, kHashFunctions32[i].name) == 0) { 108 | return kHashFunctions32[i].function; 109 | } 110 | } 111 | return nullptr; 112 | } 113 | 114 | inline NamedHashFunction::HashFunction FindHashFunction64( 115 | const char *name) { 116 | std::size_t size = sizeof(kHashFunctions64) / sizeof(kHashFunctions64[0]); 117 | for (std::size_t i = 0; i < size; ++i) { 118 | if (std::strcmp(name, kHashFunctions64[i].name) == 0) { 119 | return kHashFunctions64[i].function; 120 | } 121 | } 122 | return nullptr; 123 | } 124 | 125 | } // namespace flatbuffers 126 | 127 | #endif // FLATBUFFERS_HASH_H_ 128 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_STRING_H_ 18 | #define FLATBUFFERS_STRING_H_ 19 | 20 | #include "flatbuffers/base.h" 21 | #include "flatbuffers/vector.h" 22 | 23 | namespace flatbuffers { 24 | 25 | struct String : public Vector { 26 | const char *c_str() const { return reinterpret_cast(Data()); } 27 | std::string str() const { return std::string(c_str(), size()); } 28 | 29 | // clang-format off 30 | #ifdef FLATBUFFERS_HAS_STRING_VIEW 31 | flatbuffers::string_view string_view() const { 32 | return flatbuffers::string_view(c_str(), size()); 33 | } 34 | 35 | /* implicit */ 36 | operator flatbuffers::string_view() const { 37 | return flatbuffers::string_view(c_str(), size()); 38 | } 39 | #endif // FLATBUFFERS_HAS_STRING_VIEW 40 | // clang-format on 41 | 42 | bool operator<(const String &o) const { 43 | return StringLessThan(this->data(), this->size(), o.data(), o.size()); 44 | } 45 | }; 46 | 47 | // Convenience function to get std::string from a String returning an empty 48 | // string on null pointer. 49 | static inline std::string GetString(const String *str) { 50 | return str ? str->str() : ""; 51 | } 52 | 53 | // Convenience function to get char* from a String returning an empty string on 54 | // null pointer. 55 | static inline const char *GetCstring(const String *str) { 56 | return str ? str->c_str() : ""; 57 | } 58 | 59 | #ifdef FLATBUFFERS_HAS_STRING_VIEW 60 | // Convenience function to get string_view from a String returning an empty 61 | // string_view on null pointer. 62 | static inline flatbuffers::string_view GetStringView(const String *str) { 63 | return str ? str->string_view() : flatbuffers::string_view(); 64 | } 65 | #endif // FLATBUFFERS_HAS_STRING_VIEW 66 | 67 | } // namespace flatbuffers 68 | 69 | #endif // FLATBUFFERS_STRING_H_ 70 | -------------------------------------------------------------------------------- /thirdparty/lobster/include/flatbuffers/struct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef FLATBUFFERS_STRUCT_H_ 18 | #define FLATBUFFERS_STRUCT_H_ 19 | 20 | #include "flatbuffers/base.h" 21 | 22 | namespace flatbuffers { 23 | 24 | // "structs" are flat structures that do not have an offset table, thus 25 | // always have all members present and do not support forwards/backwards 26 | // compatible extensions. 27 | 28 | class Struct FLATBUFFERS_FINAL_CLASS { 29 | public: 30 | template T GetField(uoffset_t o) const { 31 | return ReadScalar(&data_[o]); 32 | } 33 | 34 | template T GetStruct(uoffset_t o) const { 35 | return reinterpret_cast(&data_[o]); 36 | } 37 | 38 | const uint8_t *GetAddressOf(uoffset_t o) const { return &data_[o]; } 39 | uint8_t *GetAddressOf(uoffset_t o) { return &data_[o]; } 40 | 41 | private: 42 | // private constructor & copy constructor: you obtain instances of this 43 | // class by pointing to existing data only 44 | Struct(); 45 | Struct(const Struct &); 46 | Struct &operator=(const Struct &); 47 | 48 | uint8_t data_[1]; 49 | }; 50 | 51 | } // namespace flatbuffers 52 | 53 | #endif // FLATBUFFERS_STRUCT_H_ 54 | -------------------------------------------------------------------------------- /thirdparty/lobster/readme.md: -------------------------------------------------------------------------------- 1 | This directory contains a partial clone of The Lobster Programming Language 2 | (https://github.com/aardappel/lobster), the scripting language being used in 3 | TreeSheets. See that repo for any documentation on building/using it. 4 | 5 | Because that repo dwarfs TreeSheets in size, and we only need a small part of 6 | it, the clone is kept up to date with a simple script (reclone.bat/.sh) 7 | instead of git submodule/subtree etc. 8 | -------------------------------------------------------------------------------- /thirdparty/lobster/reclone.bat: -------------------------------------------------------------------------------- 1 | rem First delete the existing clone to leave no unused files. 2 | 3 | rmdir /s /q src 4 | rmdir /s /q lobster 5 | rmdir /s /q include 6 | rmdir /s /q external 7 | rmdir /s /q ..\TS\scripts\modules 8 | 9 | rem Copy selected dirs we need to build just the language core. 10 | 11 | rem This currently assumes the lobster repo is parallel to the treesheets one. 12 | rem TODO: make this configurable and/or allow it to do a git clone. 13 | set source=..\..\lobster 14 | 15 | md src 16 | xcopy %source%\dev\src\*.cpp src 17 | md src\lobster 18 | xcopy %source%\dev\src\lobster\*.h src\lobster 19 | md lobster 20 | xcopy %source%\dev\lobster\language.vcxproj lobster 21 | xcopy %source%\dev\lobster\language.vcxproj.filters lobster 22 | md include 23 | md include\flatbuffers 24 | xcopy %source%\dev\include\flatbuffers\*.* include\flatbuffers 25 | md external 26 | md external\flatbuffers 27 | md external\flatbuffers\src 28 | xcopy %source%\dev\external\flatbuffers\src\*.* external\flatbuffers\src 29 | md external\libtcc 30 | md external\libtcc\readmes 31 | xcopy %source%\dev\external\libtcc\*.* external\libtcc 32 | xcopy %source%\dev\external\libtcc\readmes\*.* external\libtcc\readmes 33 | md include\StackWalker 34 | xcopy %source%\dev\include\StackWalker\*.* include\StackWalker 35 | md include\gsl 36 | xcopy %source%\dev\include\gsl\*.* include\gsl 37 | xcopy %source%\dev\include\subprocess.h include\ 38 | md ..\TS\scripts\modules 39 | xcopy %source%\modules\stdtype.lobster ..\TS\scripts\modules 40 | xcopy %source%\modules\std.lobster ..\TS\scripts\modules 41 | xcopy %source%\modules\vec.lobster ..\TS\scripts\modules 42 | xcopy %source%\modules\color.lobster ..\TS\scripts\modules 43 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/engine.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Engine integration with Lobster VM. 16 | 17 | #include "lobster/stdafx.h" 18 | 19 | #include "lobster/compiler.h" // For RegisterBuiltin(). 20 | 21 | #include "lobster/sdlinterface.h" 22 | 23 | #include "lobster/glinterface.h" 24 | #include "lobster/graphics.h" 25 | 26 | 27 | // The code below allows for lightweight "plugins" to the 28 | // engine, by seeing if there's a header file with this name 29 | // in the "projects" directory of the Lobster repo. 30 | // This header can define custom functions needed for your 31 | // project, or include files that do, allowing you to extend 32 | // Lobster without the needs for DLL/so files or whatever. 33 | // "projects" is already in .gitignore so can even be a 34 | // separate git repo. 35 | #if defined(BUILD_CONTEXT_lobster) && __has_include("../../projects/include/lobster_engine_plugins.h") 36 | #include "../../projects/include/lobster_engine_plugins.h" 37 | #define HAVE_PLUGINS 38 | void AddPlugins(NativeRegistry &nfr); 39 | #endif 40 | 41 | 42 | using namespace lobster; 43 | 44 | extern void AddGraphics(NativeRegistry &nfr); 45 | extern void AddFont(NativeRegistry &nfr); 46 | extern void AddSound(NativeRegistry &nfr); 47 | extern void AddPhysics(NativeRegistry &nfr); 48 | extern void AddNoise(NativeRegistry &nfr); 49 | extern void AddMeshGen(NativeRegistry &nfr); 50 | extern void AddCubeGen(NativeRegistry &nfr); 51 | extern void AddVR(NativeRegistry &nfr); 52 | extern void AddSteam(NativeRegistry &nfr); 53 | extern void AddIMGUI(NativeRegistry &nfr); 54 | extern void AddIMGUIDebug(NativeRegistry &nfr); 55 | 56 | namespace lobster { 57 | 58 | FileLoader EnginePreInit(NativeRegistry &nfr) { 59 | RegisterBuiltin(nfr, "gl", "graphics", AddGraphics); 60 | RegisterBuiltin(nfr, "gl", "font", AddFont); 61 | RegisterBuiltin(nfr, "", "sound", AddSound); 62 | RegisterBuiltin(nfr, "ph", "physics", AddPhysics); 63 | RegisterBuiltin(nfr, "", "noise", AddNoise); 64 | RegisterBuiltin(nfr, "mg", "meshgen", AddMeshGen); 65 | RegisterBuiltin(nfr, "cg", "cubegen", AddCubeGen); 66 | RegisterBuiltin(nfr, "vr", "vr", AddVR); 67 | RegisterBuiltin(nfr, "steam", "steam", AddSteam); 68 | RegisterBuiltin(nfr, "im", "imgui", AddIMGUI); 69 | RegisterBuiltin(nfr, "", "imguidebug", AddIMGUIDebug); 70 | #ifdef HAVE_PLUGINS 71 | RegisterBuiltin(nfr, "", "plugin", AddPlugins); 72 | #endif 73 | nfr.DoneRegistering(); 74 | return SDLLoadFile; 75 | } 76 | 77 | } // namespace lobster 78 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/gltimequery.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "lobster/stdafx.h" 16 | 17 | #include "lobster/vmdata.h" 18 | #include "lobster/glinterface.h" 19 | #include "lobster/glincludes.h" 20 | 21 | // NOTE: Time queries require OpenGL 3.3 or otherwise GL_ARB_timer_query 22 | // In case this causes problems, make sure to check platform availability 23 | 24 | TimeQuery::~TimeQuery() { 25 | #ifdef PLATFORM_WINNIX 26 | if (active) { 27 | GL_CALL(glDeleteQueries(2, query_buffer_ids[0])); 28 | GL_CALL(glDeleteQueries(2, query_buffer_ids[1])); 29 | active = !active; 30 | } 31 | #endif 32 | } 33 | 34 | TimeQuery CreateTimeQuery() { 35 | return TimeQuery(); 36 | } 37 | 38 | void TimeQuery::Start() { 39 | #ifdef PLATFORM_WINNIX 40 | if (!active) { 41 | GL_CALL(glGenQueries(2, query_buffer_ids[0])); 42 | GL_CALL(glGenQueries(2, query_buffer_ids[1])); 43 | // Otherwise opengl reports errors? 44 | GL_CALL(glQueryCounter(query_buffer_ids[front_buffer_index][0], GL_TIMESTAMP)); 45 | GL_CALL(glQueryCounter(query_buffer_ids[front_buffer_index][1], GL_TIMESTAMP)); 46 | active = !active; 47 | } 48 | GL_CALL(glQueryCounter(query_buffer_ids[back_buffer_index][0], GL_TIMESTAMP)); 49 | #endif 50 | } 51 | 52 | void TimeQuery::Stop() { 53 | #ifdef PLATFORM_WINNIX 54 | if (!active) return; 55 | GL_CALL(glQueryCounter(query_buffer_ids[back_buffer_index][1], GL_TIMESTAMP)); 56 | 57 | // Retrieve timings 58 | GLuint64 start = 0; 59 | GLuint64 end = 0; 60 | GL_CALL(glGetQueryObjectui64v(query_buffer_ids[front_buffer_index][0], GL_QUERY_RESULT, &start)); 61 | GL_CALL(glGetQueryObjectui64v(query_buffer_ids[front_buffer_index][1], GL_QUERY_RESULT, &end)); 62 | 63 | // Flip buffer indices 64 | front_buffer_index = 1 - front_buffer_index; 65 | back_buffer_index = 1 - back_buffer_index; 66 | 67 | // Convert into ms 68 | float timing = (end - start) / 1000000.0f; 69 | timing_average_buffer[timing_average_buffer_sample] = timing; 70 | // Collect & average samples 71 | if (timing_average_buffer_sample + 1u == TIME_QUERY_SAMPLE_COUNT) { 72 | float sum = 0.0; 73 | for (uint32_t i = 0u; i < TIME_QUERY_SAMPLE_COUNT; ++i) sum += timing_average_buffer[i]; 74 | timing_average_result = sum / float(TIME_QUERY_SAMPLE_COUNT); 75 | } 76 | timing_average_buffer_sample = (timing_average_buffer_sample + 1u) % TIME_QUERY_SAMPLE_COUNT; 77 | //timing_average_result = timing; // No averaging 78 | #endif 79 | } 80 | 81 | float TimeQuery::GetResult() { 82 | return timing_average_result; 83 | } 84 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/compiler.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef LOBSTER_COMPILER 16 | #define LOBSTER_COMPILER 17 | 18 | #include "lobster/natreg.h" 19 | 20 | namespace lobster { 21 | 22 | extern void Compile(NativeRegistry &natreg, string_view fn, string_view stringsource, 23 | string &bytecode, string *parsedump, string *pakfile, bool return_value, 24 | int runtime_checks, Query *query, int max_errors, bool full_error); 25 | 26 | extern pair RunTCC(NativeRegistry &nfr, 27 | string_view bytecode_buffer, 28 | string_view fn, 29 | const char *object_name /* save instead of run if non-null */, 30 | vector &&program_args, 31 | TraceMode trace, 32 | bool compile_only, 33 | string &error, 34 | int runtime_checks, 35 | bool dump_leaks); 36 | 37 | extern bool LoadPakDir(const char *lpak, uint64_t &src_hash_dest); 38 | extern bool LoadByteCode(string &bytecode); 39 | extern void RegisterBuiltin(NativeRegistry &natreg, const char *ns, const char *name, 40 | void (* regfun)(NativeRegistry &)); 41 | extern void RegisterCoreLanguageBuiltins(NativeRegistry &natreg); 42 | 43 | extern FileLoader EnginePreInit(NativeRegistry &nfr); 44 | extern "C" int RunCompiledCodeMain(int argc, const char * const *argv, const uint8_t *bytecodefb, 45 | size_t static_size, const lobster::fun_base_t *vtables, void *custom_pre_init, 46 | const char *aux_src_path); 47 | 48 | extern void DumpBuiltinNames(NativeRegistry &nfr); 49 | extern void DumpBuiltinDoc(NativeRegistry &nfr, bool group_subsystem); 50 | extern void DumpBuiltinDocJson(NativeRegistry &nfr); 51 | 52 | } // namespace lobster 53 | 54 | #endif // LOBSTER_COMPILER 55 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/disasm.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef LOBSTER_DISASM 16 | #define LOBSTER_DISASM 17 | 18 | #include "lobster/natreg.h" 19 | 20 | #define FLATBUFFERS_DEBUG_VERIFICATION_FAILURE 21 | #include "lobster/bytecode_generated.h" 22 | 23 | namespace lobster { 24 | 25 | inline string IdName(const bytecode::BytecodeFile *bcf, int i, const type_elem_t *typetable, bool is_whole_struct) { 26 | auto idx = bcf->specidents()->Get(i)->ididx(); 27 | auto basename = bcf->idents()->Get(idx)->name()-> 28 | #ifdef __ANDROID__ 29 | str(); 30 | #else 31 | string_view(); 32 | #endif 33 | auto ti = (TypeInfo *)(typetable + bcf->specidents()->Get(i)->typeidx()); 34 | if (is_whole_struct || !IsStruct(ti->t)) { 35 | return string(basename); 36 | } else { 37 | int j = i; 38 | // FIXME: this theoretically can span 2 specializations of the same var. 39 | while (j && bcf->specidents()->Get(j - 1)->ididx() == idx) j--; 40 | return cat(basename, "+", i - j); 41 | } 42 | } 43 | 44 | const bytecode::LineInfo *LookupLine(const int *ip, const int *code, 45 | const bytecode::BytecodeFile *bcf); 46 | 47 | const int *DisAsmIns(NativeRegistry &natreg, string &sd, const int *ip, const int *code, 48 | const type_elem_t *typetable, const bytecode::BytecodeFile *bcf, int line); 49 | 50 | void DisAsm(NativeRegistry &natreg, string &sd, string_view bytecode_buffer); 51 | 52 | } // namespace lobster 53 | 54 | #endif // LOBSTER_DISASM 55 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/dllist.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // ------------------------------------------------------------------- 16 | 17 | // Doubly linked list. 18 | // DLNodeRaw does not initialize nor assumes initialization, so can be used in 19 | // situations where memory is already allocated DLNodeBase is meant to be a base 20 | // class for objects that want to be held in a DLList. Unlike DLNodeRaw it is always 21 | // initialized and checks that it's being used sensibly. 22 | // These are better than std::list which doesn't have a node to inherit from, 23 | // so causes 2 allocations rather than 1 for object hierarchies. 24 | 25 | struct DLNodeRaw { 26 | DLNodeRaw *prev, *next; 27 | 28 | void Remove() { 29 | prev->next = next; 30 | next->prev = prev; 31 | } 32 | 33 | void InsertAfterThis(DLNodeRaw *o) { 34 | o->next = next; 35 | o->prev = this; 36 | next->prev = o; 37 | next = o; 38 | } 39 | 40 | void InsertBeforeThis(DLNodeRaw *o) { 41 | o->prev = prev; 42 | o->next = this; 43 | prev->next = o; 44 | prev = o; 45 | } 46 | }; 47 | 48 | struct DLNodeBase : DLNodeRaw { 49 | DLNodeBase() { prev = next = nullptr; } 50 | 51 | bool Connected() { return next && prev; } 52 | 53 | ~DLNodeBase() { 54 | if (Connected()) Remove(); 55 | } 56 | 57 | void Remove() { 58 | assert(Connected()); 59 | DLNodeRaw::Remove(); 60 | next = prev = nullptr; 61 | } 62 | 63 | void InsertAfterThis(DLNodeBase *o) { 64 | assert(Connected() && !o->Connected()); 65 | DLNodeRaw::InsertAfterThis(o); 66 | } 67 | 68 | void InsertBeforeThis(DLNodeBase *o) { 69 | assert(Connected() && !o->Connected()); 70 | DLNodeRaw::InsertBeforeThis(o); 71 | } 72 | }; 73 | 74 | template struct DLList : DLNodeRaw { 75 | typedef T nodetype; 76 | 77 | DLList() { next = prev = this; } 78 | 79 | bool Empty() { return next==this; } 80 | 81 | T *Get() { 82 | assert(!Empty()); 83 | DLNodeRaw *r = next; 84 | r->Remove(); 85 | return (T *)r; 86 | } 87 | 88 | T *Next() { return (T *)next; } 89 | T *Prev() { return (T *)prev; } 90 | }; 91 | 92 | template T *Next(T *n) { return (T *)n->next; } 93 | template T *Prev(T *n) { return (T *)n->prev; } 94 | 95 | // Safe Remove on not self. 96 | #define loopdllistother(L, n) \ 97 | for (auto n = (L).Next(); n != (void *)&(L); n = Next(n)) 98 | // Safe Remove on self. 99 | #define loopdllist(L, n) \ 100 | for (auto n = (L).Next(), p = Next(n); n != (void *)&(L); (n = p),(p = Next(n))) 101 | // Safe Remove on self reverse. 102 | #define loopdllistreverse(L, n) \ 103 | for (auto n = (L).Prev(), p = Prev(n); n != (void *)&(L); (n = p),(p = Prev(n))) 104 | 105 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/fontrenderer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // simple interface for FreeType (that doesn't depend on its headers) 16 | 17 | struct BitmapFont; 18 | 19 | struct OutlineFont { 20 | void *fthandle; 21 | string fbuf; 22 | unordered_map unicodemap; 23 | vector unicodetable; 24 | map glyph_to_char; 25 | 26 | OutlineFont(void *fth, string &fb) : fthandle(fth) { fbuf.swap(fb); } 27 | ~OutlineFont(); 28 | 29 | bool EnsureCharsPresent(string_view utf8str); 30 | string GetName(int i); 31 | int GetCharCode(string_view_nt name); 32 | }; 33 | 34 | struct BitmapFont { 35 | Texture tex; 36 | struct Glyph { 37 | int x; 38 | int y; 39 | int advance; 40 | int left; 41 | int top; // From baseline. 42 | int width; 43 | int height; 44 | }; 45 | vector positions; 46 | int usedcount = 1; 47 | int font_height = 0; 48 | int max_ascent = 0; 49 | float outlinesize = 0.0f; 50 | byte4 outlinecol = byte4_0; 51 | OutlineFont *font = nullptr; 52 | 53 | ~BitmapFont(); 54 | BitmapFont(OutlineFont *_font, int _size, float _osize, byte4 _ocol); 55 | 56 | void RenderText(string_view text); 57 | const int2 TextSize(string_view text); 58 | 59 | bool CacheChars(string_view text); 60 | }; 61 | 62 | extern OutlineFont *LoadFont(string_view name); 63 | 64 | extern void FTClosedown(); 65 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/graphics.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "lobster/vmdata.h" 16 | 17 | #include "lobster/glinterface.h" 18 | 19 | extern lobster::ResourceType mesh_type; 20 | extern lobster::ResourceType texture_type; 21 | extern lobster::ResourceType shader_type; 22 | 23 | extern lobster::Value UpdateBufferObjectResource(lobster::VM &vm, lobster::Value buf, const void *data, 24 | size_t len, ptrdiff_t offset, bool ssbo, bool dyn); 25 | extern void BindBufferObjectResource(lobster::VM &vm, lobster::Value buf, string_view_nt name); 26 | 27 | extern Texture GetTexture(const lobster::Value &res); 28 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/meshgen.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef LOBSTER_MESHGEN_H 16 | #define LOBSTER_MESHGEN_H 17 | 18 | #include "3dgrid.h" 19 | 20 | struct DistVert { // FIXME: can optimize this for memory usage making both 16bit 21 | float dist; 22 | byte4 color; 23 | 24 | DistVert() : dist(FLT_MAX), color(byte4_0) {} 25 | }; 26 | 27 | // Turns out the way shapes overlap and are rasterized invidually below makes this not as efficient 28 | // a data structure for this purpose as it at first seemed. 29 | //typedef RLE3DGrid DistGrid; 30 | //typedef RLE3DGrid IntGrid; 31 | 32 | // So use this instead: 33 | typedef Chunk3DGrid DistGrid; 34 | typedef Chunk3DGrid IntGrid; 35 | typedef Chunk3DGrid EdgeGrid; 36 | 37 | struct mgvert { 38 | float3 pos; 39 | float3 norm; 40 | byte4 col; 41 | }; 42 | 43 | inline void RecomputeNormals(vector &triangles, vector &verts) { 44 | normalize_mesh(gsl::make_span(triangles), verts.data(), verts.size(), sizeof(mgvert), 45 | (uint8_t *)&verts.data()->norm - (uint8_t *)&verts.data()->pos, false); 46 | }; 47 | 48 | extern Mesh *polygonize_mc(const int3 &gridsize, float gridscale, const float3 &gridtrans, 49 | const DistGrid *distgrid, float3 (* grid_to_world)(const int3 &pos)); 50 | 51 | #endif // LOBSTER_MESHGEN_H 52 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/sdlincludes.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #define DECLSPEC 16 | #define SDL_NO_COMPAT 17 | // hack: so we can share one include folder for SDL 18 | #ifdef __APPLE__ 19 | #ifdef __IOS__ 20 | #include "SDL_config_iphoneos.h" 21 | #else 22 | #include "SDL_config_macosx.h" 23 | #endif 24 | #else 25 | #ifdef __ANDROID__ 26 | #include "SDL_config_android.h" 27 | #else 28 | #ifdef _WIN32 29 | #include "SDL_config_windows.h" 30 | #else 31 | #include "SDL_config.h" 32 | #endif 33 | #endif 34 | #endif 35 | #define _SDL_config_h 36 | //#define SDL_MAIN_HANDLED 37 | #include "SDL.h" 38 | //#include "SDL_main.h" 39 | 40 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/simplex.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | extern float SimplexNoise(const int octaves, const float persistence, const float scale, 16 | const float3 &v); 17 | extern float SimplexNoise(const int octaves, const float persistence, const float scale, 18 | const float4 &v); 19 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/tonative.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef LOBSTER_TONATIVE 16 | #define LOBSTER_TONATIVE 17 | 18 | #include "lobster/natreg.h" 19 | 20 | namespace lobster { 21 | 22 | extern string ToCPP(NativeRegistry &natreg, string &sd, string_view bytecode_buffer, bool cpp, 23 | int runtime_checks, string_view custom_pre_init_name, string_view aux_src_name); 24 | 25 | extern bool RunC(const char *source, 26 | const char *object_name /* save instead of run if non-null */, 27 | string &error, 28 | const void **imports, 29 | const char **export_names, 30 | function runf); 31 | 32 | inline int ParseOpAndGetArity(int opc, const int *&ip, int ®so) { 33 | regso = *ip++; 34 | auto arity = ILArity()[opc]; 35 | auto ips = ip; 36 | switch(opc) { 37 | default: { 38 | assert(arity != ILUNKNOWN); 39 | ip += arity; 40 | break; 41 | } 42 | case IL_JUMP_TABLE: { 43 | auto mini = *ip++; 44 | auto maxi = *ip++; 45 | auto n = maxi - mini + 2; 46 | ip += n; 47 | arity = int(ip - ips); 48 | break; 49 | } 50 | case IL_JUMP_TABLE_DISPATCH: { 51 | ip++; // vtable_idx 52 | auto mini = *ip++; 53 | auto maxi = *ip++; 54 | auto n = maxi - mini + 2; 55 | ip += n; 56 | arity = int(ip - ips); 57 | break; 58 | } 59 | case IL_FUNSTART: { 60 | ip++; // function idx. 61 | ip++; // max regs. 62 | int n = *ip++; 63 | ip += n; 64 | int m = *ip++; 65 | ip += m; 66 | ip++; // keepvar 67 | int o = *ip++; // ownedvar 68 | ip += o; 69 | arity = int(ip - ips); 70 | break; 71 | } 72 | } 73 | return arity; 74 | } 75 | 76 | inline auto CreateFunctionLookUp(const bytecode::BytecodeFile *bcf) { 77 | map fl; 78 | for (flatbuffers::uoffset_t i = 0; i < bcf->functions()->size(); i++) { 79 | auto f = bcf->functions()->Get(i); 80 | fl[f->bytecodestart()] = f; 81 | } 82 | return fl; 83 | } 84 | 85 | } // namespace lobster; 86 | 87 | #endif // LOBSTER_TONATIVE 88 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/varint.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // ------------------------------------------------------------------- 16 | 17 | // Varints optimized for speed, typical cases with no loops. 18 | // Bottom 2 bits indicate if this is encoded as 6, 14, 22, or byte sized. 19 | // This assumes values are heavily skewed towards smaller values. 20 | // Use "zig-zag" encoding for signed numbers. 21 | // This should be equal to LEB in the 1 byte case, significantly faster in 22 | // the 2 or 3 byte case, and similar otherwise. 23 | 24 | // TODO: replace push_back with something more efficient that only checks 25 | // for end of buffer once. 26 | inline void EncodeVarintU(uint64_t z, vector &v) { 27 | if (z < 0x40) { 28 | v.push_back(uint8_t(z << 2)); 29 | } else if (z < 0x4000) { 30 | v.push_back(uint8_t(z << 2 | 1)); 31 | v.push_back(uint8_t(z >> 6)); 32 | } else if (z < 0x400000) { 33 | v.push_back(uint8_t(z << 2 | 2)); 34 | v.push_back(uint8_t(z >> 6)); 35 | v.push_back(uint8_t(z >> 14)); 36 | } else { 37 | // Use remaining bits in starter byte to store bytes needed. 38 | auto start = v.size(); 39 | v.push_back(3); 40 | while (z) { 41 | v.push_back(uint8_t(z)); 42 | z >>= 8; 43 | v[start] += 1 << 2; 44 | } 45 | } 46 | } 47 | 48 | inline void EncodeVarintS(int64_t n, vector &v) { 49 | uint64_t z = (uint64_t(n) << 1) ^ (n >> 63); 50 | EncodeVarintU(z, v); 51 | } 52 | 53 | inline void EncodeVarintZero(vector &v) { // For readability. 54 | v.push_back(0); 55 | } 56 | 57 | // Returns zero upon reaching the end prematurely, which is not great. 58 | // Then again, this is meant for internal use cases where we know the 59 | // sender, and some speed/simplicity/robustness is more useful here than 60 | // error checking for something that is unlikely. 61 | inline uint64_t DecodeVarintU(const uint8_t *&p, const uint8_t *end) { 62 | if (p == end) return 0; 63 | uint8_t f = *p++; 64 | uint8_t l = f & 0x03; 65 | f >>= 2; 66 | if (!l) { 67 | return f; 68 | } else if (l == 1) { 69 | if (p == end) return 0; 70 | return f | (uint64_t(*p++) << 6); 71 | } else if (l == 2) { 72 | if (p + 1 >= end) return 0; 73 | auto t = uint64_t(*p++) << 6; 74 | return f | t | (uint64_t(*p++) << 14); 75 | } else { 76 | uint64_t zm = 0; 77 | int shift = 0; 78 | // f contains number of bytes that follow. 79 | while (f--) { 80 | if (p == end) return 0; 81 | zm |= uint64_t(*p++) << shift; 82 | shift += 8; 83 | } 84 | return zm; 85 | } 86 | } 87 | 88 | inline int64_t DecodeVarintS(const uint8_t *&p, const uint8_t *end) { 89 | auto z = DecodeVarintU(p, end); 90 | return z & 1 ? (z >> 1) ^ -1 : z >> 1; 91 | } 92 | 93 | inline void unit_test_varint() { 94 | vector buf; 95 | for (size_t b = 0; b < 63; b++) { 96 | auto un = uint64_t(1) << b; 97 | buf.clear(); 98 | EncodeVarintU(un, buf); 99 | const uint8_t *p2 = buf.data(); 100 | auto und = DecodeVarintU(p2, p2 + buf.size()); 101 | assert(buf.data() + buf.size() == p2 && un == und); 102 | (void)und; 103 | auto sn = int64_t(un); 104 | buf.clear(); 105 | EncodeVarintS(sn, buf); 106 | p2 = buf.data(); 107 | auto snd = DecodeVarintS(p2, p2 + buf.size()); 108 | assert(buf.data() + buf.size() == p2 && sn == snd); 109 | sn = -sn; 110 | buf.clear(); 111 | EncodeVarintS(sn, buf); 112 | p2 = buf.data(); 113 | snd = DecodeVarintS(p2, p2 + buf.size()); 114 | assert(buf.data() + buf.size() == p2 && sn == snd); 115 | (void)snd; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/lobster/wentropy.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Wouter's Entropy Coder: apparently I re-invented adaptive Shannon-Fano. 16 | // 17 | // similar compression performance to huffman, and absolutely tiny code, one function for both 18 | // compression and decompression. Adaptive, so should work well even for tiny buffers. 19 | // One of the vectors passed in is the input, the other the output (and exactly one of the two 20 | // should be empty initially). 21 | // not the fastest possible implementation (only 40MB/sec for either compression or decompression 22 | // on a modern pc), but should be sufficient for many uses 23 | // 24 | // uses std::string and std::swap as its only external dependencies for simplicity, but could made 25 | // to not rely on them relatively easily. 26 | 27 | template void WEntropyCoder(const unsigned char *in, 28 | size_t inlen, // Size of input. 29 | size_t origlen, // Uncompressed size. 30 | string &out) { 31 | const int NSYM = 256; // This depends on the fact we're reading from unsigned chars. 32 | int symbol[NSYM]; // The symbol in this slot. Adaptively sorted by frequency. 33 | size_t freq[NSYM]; // Its frequency. 34 | int sym_idx[NSYM]; // Lookup symbol -> index into the above two arrays. 35 | for (int i = 0; i < NSYM; i++) { freq[i] = 1; symbol[i] = sym_idx[i] = i; } 36 | size_t compr_idx = 0; 37 | unsigned char bits = 0; 38 | int nbits = 0; 39 | for (size_t i = 0; i < origlen; i++) { 40 | int start = 0, range = NSYM; 41 | size_t total_freq = i + NSYM; 42 | while (range > 1) { 43 | size_t acc_freq = 0; 44 | int j = start; 45 | do acc_freq += freq[j++]; while (acc_freq + freq[j] / 2 < total_freq / 2); 46 | unsigned char bit = 0; 47 | if (compress) { 48 | if (sym_idx[in[i]] < j) bit = 1; 49 | bits |= bit << nbits; 50 | if (++nbits == 8) { out.push_back(bits); bits = 0; nbits = 0; } 51 | } else { 52 | if (!nbits) { assert(compr_idx < inlen); bits = in[compr_idx++]; nbits = 8; } 53 | bit = bits & 1; 54 | bits >>= 1; 55 | nbits--; 56 | } 57 | if (bit) { 58 | total_freq = acc_freq; assert(j - start < range); range = j - start; 59 | } else { 60 | total_freq -= acc_freq; range -= j - start; start = j; 61 | } 62 | } 63 | if (!compress) out.push_back((unsigned char)symbol[start]); 64 | assert(range == 1 && (!compress || in[i] == symbol[start])); 65 | freq[start]++; 66 | while (start && freq[start - 1] < freq[start]) { 67 | swap(sym_idx[symbol[start - 1]], sym_idx[symbol[start]]); 68 | swap(freq[start - 1], freq[start]); 69 | swap(symbol[start - 1], symbol[start]); 70 | start--; 71 | } 72 | } 73 | if (compress) { if (nbits) out.push_back(bits); } else { assert(compr_idx == inlen); } 74 | (void)inlen; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Wouter van Oortmerssen. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "lobster/stdafx.h" 16 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/tccbind.cpp: -------------------------------------------------------------------------------- 1 | #include "lobster/stdafx.h" 2 | 3 | #include "lobster/compiler.h" 4 | 5 | #include "libtcc.h" 6 | 7 | namespace lobster { 8 | 9 | bool RunC(const char *source, 10 | const char *object_name, 11 | string &error, 12 | const void **imports, 13 | const char **export_names, 14 | function runf) { 15 | // Wrap this thing in a unique pointer since the compiled code may 16 | // throw an exception still. 17 | auto deleter = [&](TCCState *p) { tcc_delete(p); }; 18 | unique_ptr state(tcc_new(), deleter); 19 | tcc_set_output_type(state.get(), object_name ? TCC_OUTPUT_OBJ : TCC_OUTPUT_MEMORY); 20 | tcc_set_error_func(state.get(), &error, [](void *err, const char *msg) { 21 | // No way to disable warnings individually, so filter them here :) 22 | if (strstr(msg, "label at end of compound statement")) return; 23 | *((string *)err) += msg; 24 | *((string *)err) += "\n"; 25 | }); 26 | #ifdef _WIN32 27 | // Need to provide chkstk. 28 | tcc_set_options(state.get(), "-xa"); 29 | // FIXME replace this by an tcc_add_symbol call? 30 | auto chkstk_src = 31 | ".globl __chkstk \n" 32 | "__chkstk: \n" 33 | " xchg (%rsp),%rbp /* store ebp, get ret.addr */ \n" 34 | " push %rbp /* push ret.addr */ \n" 35 | " lea 8(%rsp),%rbp /* setup frame ptr */ \n" 36 | " push %rcx /* save ecx */ \n" 37 | " mov %rbp,%rcx \n" 38 | " movslq %eax,%rax \n" 39 | "P0: \n" 40 | " sub $4096,%rcx \n" 41 | " test %rax,(%rcx) \n" 42 | " sub $4096,%rax \n" 43 | " cmp $4096,%rax \n" 44 | " jge P0 \n" 45 | " sub %rax,%rcx \n" 46 | " test %rax,(%rcx) \n" 47 | " mov %rsp,%rax \n" 48 | " mov %rcx,%rsp \n" 49 | " mov (%rax),%rcx /* restore ecx */ \n" 50 | " jmp *8(%rax) \n"; 51 | if (tcc_compile_string(state.get(), chkstk_src) < 0) return false; 52 | tcc_set_options(state.get(), "-xc"); 53 | #endif 54 | tcc_add_symbol(state.get(), "memmove", (const void *)memmove); 55 | tcc_set_options(state.get(), "-nostdlib -Wall"); 56 | while (*imports) { 57 | auto name = (const char *)(*imports++); 58 | auto fun = *imports++; 59 | tcc_add_symbol(state.get(), name, fun); 60 | } 61 | if (tcc_compile_string(state.get(), source) < 0) return false; 62 | if (object_name) { 63 | return tcc_output_file(state.get(), object_name) == 0; 64 | } else { 65 | if (tcc_relocate(state.get(), TCC_RELOCATE_AUTO) < 0) return false; 66 | vector exports; 67 | while (*export_names) { 68 | exports.push_back(tcc_get_symbol(state.get(), *export_names++)); 69 | } 70 | return runf(exports.data()); 71 | } 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /thirdparty/lobster/src/tonative.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aardappel/treesheets/1e6604b6257b41ba518907bfa21c24fa8245c46f/thirdparty/lobster/src/tonative.cpp --------------------------------------------------------------------------------