[gegl] bin/tools: refine argvs command extractor script
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin/tools: refine argvs command extractor script
- Date: Wed, 16 Jan 2019 15:46:12 +0000 (UTC)
commit e1b8343a8065eab7860e46d334aac00d59f06065
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 14 20:23:23 2019 +0100
bin/tools: refine argvs command extractor script
This permits using the declaration of the function with the doc string, instead
of the defintion. Putting int on a separate line or indenting one space are
sufficient to make a definition not be picked up.
bin/argvs.c | 2 +-
tools/argvs_extract.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bin/argvs.c b/bin/argvs.c
index ac0064580..49026ba02 100644
--- a/bin/argvs.c
+++ b/bin/argvs.c
@@ -136,7 +136,7 @@ cat $* | grep COMMAND_ARGS | grep ^int | sort | \
# create a function that registers all items found
echo "void argvs_register(void) {"
cat $* | grep COMMAND_ARGS | grep ^int | sort | \
- sed -e 's/^int */ argvs_add (/ ' -e 's#(COMMAND_ARGS) */\*#, #' -e 's#\*/$#);#'
+ sed -e 's/^int */ argvs_add (/ ' -e 's#(COMMAND_ARGS). */\*#, #' -e 's#\*/$#);#'
echo "};"
#endif
diff --git a/tools/argvs_extract.sh b/tools/argvs_extract.sh
index c9c6b6677..3eb3d1ad2 100755
--- a/tools/argvs_extract.sh
+++ b/tools/argvs_extract.sh
@@ -11,5 +11,5 @@ cat $* | grep COMMAND_ARGS | grep ^int | sort | \
# create a function that registers all items found
echo "void argvs_register(void) {"
cat $* | grep COMMAND_ARGS | grep ^int | sort | \
- sed -e 's/^int */ argvs_add (/ ' -e 's#(COMMAND_ARGS) */\*#, #' -e 's#\*/$#);#'
+ sed -e 's/^int */ argvs_add (/ ' -e 's#(COMMAND_ARGS). */\*#, #' -e 's#\*/$#);#'
echo "};"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]