mirror of
https://github.com/clang-retro/mac-sdk.git
synced 2026-11-28 13:19:22 -08:00
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
12 lines
397 B
C
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;
|
|
}
|