From ce2fb9b273291377cc51cef8bbde2cee4a48a035 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 13 Jul 2013 07:13:55 +1000 Subject: [PATCH] mdcode: rename code_print to code_node_print and export it. Signed-off-by: NeilBrown --- csrc/mdcode.mdc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/csrc/mdcode.mdc b/csrc/mdcode.mdc index f49ee83..afd2b29 100644 --- a/csrc/mdcode.mdc +++ b/csrc/mdcode.mdc @@ -93,6 +93,7 @@ will "do the right thing". ### File: mdcode.h + #include ## exported types ## exported functions @@ -118,6 +119,7 @@ will "do the right thing". #include #include + #include #include "mdcode.h" @@ -775,10 +777,10 @@ record some extra state in each `code_node`. For now we won't bother. The indents we insert will all be spaces. This might not work well for `Makefiles`. -##### client functions +##### internal functions - static void code_print(FILE *out, struct code_node *node, - char *fname) + void code_node_print(FILE *out, struct code_node *node, + char *fname) { for (; node; node = node->next) { char *c = node->code.txt; @@ -809,6 +811,9 @@ for `Makefiles`. } } +###### exported functions + void code_node_print(FILE *out, struct code_node *node, char *fname); + ### Bringing it all together We are just about ready for the `main` function of the tool which will @@ -856,7 +861,6 @@ we are done. #include #include #include - #include ##### client functions @@ -915,7 +919,7 @@ we are done. errs++; continue; } - code_print(fl, s->code, argv[1]); + code_node_print(fl, s->code, argv[1]); fclose(fl); } exit(!!errs); -- 2.43.0