From 4db6f36eb05ad4bedf405b1842fca03ca018be5d Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 18 Jul 2016 18:19:08 +0000 Subject: [PATCH] Also recognise functions ending with "Args" for generating RAWARG macros/inlines (e.g. EasyRequestArgs()). git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@52790 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/intuition/intuition.conf | 2 ++ tools/genmodule/writeincdefines.c | 6 ++++-- tools/genmodule/writeincinline.c | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rom/intuition/intuition.conf b/rom/intuition/intuition.conf index a7a356e667..59c799a074 100644 --- a/rom/intuition/intuition.conf +++ b/rom/intuition/intuition.conf @@ -18,6 +18,8 @@ options noexpunge #include #include #include +#include + /* Prototypes for stubs in amiga.lib */ diff --git a/tools/genmodule/writeincdefines.c b/tools/genmodule/writeincdefines.c index b416bb97a3..6a41784bb7 100644 --- a/tools/genmodule/writeincdefines.c +++ b/tools/genmodule/writeincdefines.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2014, The AROS Development Team. All rights reserved. + Copyright © 1995-2016, The AROS Development Team. All rights reserved. $Id$ Function to write defines/modulename.h. Part of genmodule. @@ -82,7 +82,7 @@ void writeincdefines(struct config *cfg) else if (strcmp(funclistit->name + strlen(funclistit->name) - 7, "TagList") == 0) { isvararg = 1; - /* TagList has to be changed in Tags at the end of the functionname */ + /* TagList has to be changed to Tags at the end of the functionname */ varargname = strdup(funclistit->name); varargname[strlen(funclistit->name)-4] = 's'; varargname[strlen(funclistit->name)-3] = '\0'; @@ -94,6 +94,8 @@ void writeincdefines(struct config *cfg) isvararg = 1; varargname = strdup(funclistit->name); varargname[strlen(funclistit->name)-4] = '\0'; + if (arglistit && strncmp(arglistit->arg, "RAWARG",6) == 0) + isvararg = 3; } else if ((funclistit->name[0] == 'V') && (strncmp(arglistit->arg, "va_list", 7) == 0)) { diff --git a/tools/genmodule/writeincinline.c b/tools/genmodule/writeincinline.c index b5de8bac1b..0c8a71bede 100644 --- a/tools/genmodule/writeincinline.c +++ b/tools/genmodule/writeincinline.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2011, The AROS Development Team. All rights reserved. + Copyright © 1995-2016, The AROS Development Team. All rights reserved. $Id$ Function to write inline/modulename.h. Part of genmodule. @@ -80,7 +80,7 @@ void writeincinline(struct config *cfg) else if (strcmp(funclistit->name + strlen(funclistit->name) - 7, "TagList") == 0) { isvararg = 1; - /* TagList has to be changed in Tags at the end of the functionname */ + /* TagList has to be changed to Tags at the end of the functionname */ varargname = strdup(funclistit->name); varargname[strlen(funclistit->name)-4] = 's'; varargname[strlen(funclistit->name)-3] = '\0'; @@ -92,6 +92,8 @@ void writeincinline(struct config *cfg) isvararg = 1; varargname = strdup(funclistit->name); varargname[strlen(funclistit->name)-4] = '\0'; + if (arglistit && strncmp(arglistit->arg, "RAWARG", 6) == 0) + isvararg = 3; } else if ((funclistit->name[0] == 'V') && (strncmp(arglistit->arg, "va_list", 7) == 0)) { -- 2.11.4.GIT