Files
Claude 6dd4b82039 Make code resources and background applications with macapp.py
macapp.py, codelink.py and peflink.py take --type (the file type) and
--background-only (onlyBackground in the SIZE resource). With
--code-resource TYPE,ID, codelink.py writes the image as one resource
in place of an application, with the new start-coderes.S first. Each
call relocates the image when the handle moved, then jumps to main with
the caller's stack. This makes screen saver modules, INITs and WDEFs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSAH13um7pGRV7gwws
2026-11-26 19:59:15 +00:00

12 lines
397 B
C

/* A code resource for tests/run.sh: codelink.py --code-resource with
start-coderes.S. The caller would call main with its own arguments. */
static const char kName[] = "code resource";
static const char *gName = kName; /* an absolute pointer to relocate */
/* Gives the length of the name, through the relocated pointer. */
int main(void) {
int n = 0;
while (gName[n]) n++;
return n;
}