summaryrefslogtreecommitdiff
path: root/tools/d2c/d2c.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-09-09 21:21:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-09-09 21:21:59 (GMT)
commitc8f8dc0ea69a404b407f84cbccc25c1af7804836 (patch)
tree459ad1262c97f7f9bb69bd0187510da906f6e280 /tools/d2c/d2c.c
parentf663a08007095e58f60fcf9a815a8b3d31b87c83 (diff)
Finalized the export of read functions on demand.
Diffstat (limited to 'tools/d2c/d2c.c')
-rw-r--r--tools/d2c/d2c.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/d2c/d2c.c b/tools/d2c/d2c.c
index fddee6a..fbf401e 100644
--- a/tools/d2c/d2c.c
+++ b/tools/d2c/d2c.c
@@ -93,7 +93,8 @@ static void show_usage(const char *argv0)
printf("\n");
- printf("\t--filename-reuse <length>\t\tSet the length of filename to include in identifiers (default = 0).\n");
+ printf("\t--export\t\t\tDefine if read functions have to be exported to external headers (not by default).\n");
+ printf("\t--filename-reuse <length>\tSet the length of filename to include in identifiers (default = 0).\n");
printf("\n");
@@ -153,7 +154,8 @@ int main(int argc, char **argv)
{ "id-prefix", required_argument, NULL, 0x100 },
{ "id-expected", required_argument, NULL, 0x101 },
- { "filename-reuse", required_argument, NULL, 0x200 },
+ { "export", no_argument, NULL, 0x200 },
+ { "filename-reuse", required_argument, NULL, 0x201 },
{ "op-prefix", required_argument, NULL, 0x300 },
@@ -254,6 +256,10 @@ int main(int argc, char **argv)
break;
case 0x200:
+ info.export = true;
+ break;
+
+ case 0x201:
info.filename_reuse = strtoul(optarg, NULL, 10);
break;