I'm aware the export dialog had a field where excluded files can be specified, but it's a bit basic. Ideally I'd love to have something like this:

#ifdef DEMO_MODE
[file list to exclude from demo mode]
#else
[file list to exclude from full version]
#endif

int
openat2p(int dirfd, const char *path,
int flags, mode_t mode)
{
#ifdef __linux__
struct open_how how = {
.flags = flags,
.mode = mode,
.resolve =
RESOLVE_BENEATH |
RESOLVE_NO_SYMLINKS |
RESOLVE_NO_MAGICLINKS
};
#endif

if (dirfd < 0) {
errno = EBADF;
return -1;
}

if (path == NULL) {
errno = EFAULT;
return -1;
}

#ifdef __linux__
return syscall(SYS_openat2, dirfd, path, &how, sizeof(how));
#else
return openat(dirfd, path, flags, mode);
#endif
}

Maxivmac, a maximized minivmac (in progress). #marchintosh

*The hardest part of this refactor wasn't any single conversion — it was the invisible web of dependencies that only revealed themselves at link time. Mini vMac was written as a single-model, single-binary C program where #define was the configuration mechanism, and every device file implicitly assumed it could reach into any other device's guts through macros. You'd confidently strip a #if EmPMU guard from pmu.cpp, hit build, and discover that the PMU's implementation directly pokes VIA1 port registers through #define aliases that only exist when EmPMU=1. Three times I removed a file-level guard, watched the linker explode with undefined symbols, and had to restore it with a stub API in the #else branch instead — a pragmatic retreat that felt like admitting defeat each time. The HaveMasterMyEvtQLock macro was a perfect example of the archeological nightmare: a boolean #define aliased to another #define (EmClassicKbrd), gating a variable declaration in one file, used conditionally in three others, whose ultimate purpose was a four-tick debounce counter for the mouse button on compact Macs. Understanding that took longer than converting it.* -- Claude Opus 4.6, after a 14 hours session

So? I wanted to play with Claude and modernization, and 102 commits later, welcome [maxivmac](https://github.com/fstark/maxivmac), the port of minivmac to the 21th Century!

```
maxivmac % ./bld/macos-cocoa/maxivmac.app/Contents/MacOS/maxivmac --help
Usage: ./bld/macos-cocoa/maxivmac.app/Contents/MacOS/maxivmac [options] [disk1.img] [disk2.img] ...

Options:
--model=MODEL Mac model: Plus, SE, II, IIx, Classic, PB100, 128K, 512Ke
(default: II)
--rom=PATH Path to ROM file
--ram=SIZE RAM size: 1M, 2M, 4M, 8M (default: model-specific)
--screen=WxHxD Screen size: 512x342x1, 640x480x8, etc.
--speed=N Emulation speed: 1 (1x), 2, 4, 8, 0 (all-out)
--fullscreen Start in fullscreen mode
-r PATH ROM path (short form)
-h, --help Show this help

Examples:
./bld/macos-cocoa/maxivmac.app/Contents/MacOS/maxivmac --model=II --rom=MacII.ROM system7.img
./bld/macos-cocoa/maxivmac.app/Contents/MacOS/maxivmac --model=Plus --rom=vMac.ROM --ram=4M disk.img
maxivmac %
``

This is _far_ from finished, but I did get rid of the original byzantine build system and have a single binary for all models (Plus and MacII working). If you've ever tried to hack ``minivmac`` you know what a milestone this is. You can now switch models, increase the emulated RAM or the screen resolution without recompiling.

Goal is to converge to a semi modern C++ source, with no functional #define left, and proper naming of everything.

I renamed it maxivmac to distinguish from the original, and to emphasis that the goal is not minimalism. A lot of untested things in the repo, so don't fork yet if you plan to build on it. Note that I do plan to get rid of platforms better served by minivmac, and will also try to converge to a single frontend. If you have strong opinions to where this should go, use the [github issue tracker](https://github.com/fstark/maxivmac/issues)!

(I will not accept PR until the build is stable with a strong test suite -- a matter of a couple of weeks, probably)

GitHub - fstark/maxivmac: Let's try to fix minivmac *again*

Let's try to fix minivmac *again*. Contribute to fstark/maxivmac development by creating an account on GitHub.

GitHub

@funkylab it’s really to do with it not being standardised more than anything else. Like what is the expectation of preprocessing the following file lol.h

#ifndef foo
#define foo
#else
#pragma once
#endif
#include "lol.h"
Yo

Is it a single “Yo” or two lines of “Yo”?

If it was defined that it needed to be the first thing in a file following whitespace, I think i’f be fine with it.

Geez, Apple. Get your house in order.

```swift
#if targetEnvironment(simulator)
import Foundation
#else
#if os(macOS)
@preconcurrency import NetworkExtension
#else
import NetworkExtension
#endif
#endif
```

@eniko IME, it will stop doing that in MSVC at some small nesting level.

Useful macros:

#if _MSC_VER > 0
#define INLINE __forceinline
#else
#define INLINE __attribute__((always_inline)) inline
#endif

#AI生成 #whose GHOST PROPERTY ПРИМАРНА ВЛАСНІСТЬ - ポイズ - pixiv

錆びついた看板 崩れ落ちた屋根 誰のモンだ? 知らねえよ そんなもん 見て見ぬフリする 偽善者の街 朽ち果ててゆく 記憶の墓場 「所有者不明」と 嘯く紙切れ 「他人の土地だ」と 逃げ口上ばかり 押し付けるだけの 正義かよ 冗談じゃねえ! 叩きつけろ! 相続放棄! 権利も無いのに

pixiv