From: Lauri Kasanen Date: Tue, 3 Oct 2017 15:46:39 +0000 (+0300) Subject: cl65: Add support for --all-cdecl X-Git-Tag: V2.17~89^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca4ed290d5964dbe833224d967d3707e20972278;p=cc65 cl65: Add support for --all-cdecl --- diff --git a/src/cl65/main.c b/src/cl65/main.c index b209cb21d..565f20b45 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -752,6 +752,7 @@ static void Usage (void) "\n" "Long options:\n" " --add-source\t\t\tInclude source as comment\n" + " --all-cdecl\t\t\tMake functions default to __cdecl__\n" " --asm-args options\t\tPass options to the assembler\n" " --asm-define sym[=v]\t\tDefine an assembler symbol\n" " --asm-include-dir dir\t\tSet an assembler include directory\n" @@ -815,6 +816,14 @@ static void OptAddSource (const char* Opt attribute ((unused)), } +static void OptAllCDecl (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) +/* Make functions default to __cdecl__ */ +{ + CmdAddArg (&CC65, "--all-cdecl"); +} + + static void OptAsmArgs (const char* Opt attribute ((unused)), const char* Arg) /* Pass arguments to the assembler */ @@ -1290,6 +1299,7 @@ int main (int argc, char* argv []) /* Program long options */ static const LongOpt OptTab[] = { { "--add-source", 0, OptAddSource }, + { "--all-cdecl", 0, OptAllCDecl }, { "--asm-args", 1, OptAsmArgs }, { "--asm-define", 1, OptAsmDefine }, { "--asm-include-dir", 1, OptAsmIncludeDir },