Skip to content

Instantly share code, notes, and snippets.

View MIvanchev's full-sized avatar
💭
Perpetual burnout

Mihail Ivanchev MIvanchev

💭
Perpetual burnout
View GitHub Profile
@gsuberland
gsuberland / le_exe_headers.h
Created August 28, 2021 03:56
Linear Executable (LE) file format structures
// ref: http://fileformats.archiveteam.org/wiki/Linear_Executable
// ref: https://moddingwiki.shikadi.net/wiki/Linear_Executable_(LX/LE)_Format
// ref: https://github.com/open-watcom/open-watcom-v2/blob/master/bld/watcom/h/exeflat.h (this is specifically for LE VXDs)
// ref: http://www.textfiles.com/programming/FORMATS/lxexe.txt (comprehensive but actually for LX, not LE)
typedef unsigned char undefined;
typedef unsigned char byte;
typedef unsigned long dword;
typedef unsigned long uint3;
@peterspackman
peterspackman / mingw-w64-x86_64.cmake
Last active September 4, 2024 16:52
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake ..
# This is free and unencumbered software released into the public domain.
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
; Released under the Apache License, Version 2.0
; http://www.apache.org/licenses/LICENSE-2.0.html
(defmacro try-let
"A combination of try and let such that exceptions thrown in the binding or
body can be handled by catch clauses in the body, and all bindings are
available to the catch and finally clauses. If an exception is thrown while
evaluating a binding value, it and all subsequent binding values will be nil.
Example: