Skip to content

Commit 5d67d4c

Browse files
committed
readtags: export the function for printing tag values
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent d73a7a7 commit 5d67d4c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

extra-cmds/printtags.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ static void printValue (const char *val, int printingWithEscaping,
102102
print_str (val, outfp);
103103
}
104104

105+
extern int tagsPrintValue (const char *val,
106+
int escaping,
107+
tagPrintProcs *procs,
108+
void *outfp)
109+
{
110+
if (!procs)
111+
procs = &printFILEProcs;
112+
113+
printValue (val, escaping,
114+
procs->printStr, procs->printChar,
115+
outfp);
116+
return 1;
117+
}
118+
105119
static void tagsPrintTag (const tagEntry *entry,
106120
int printingExtensionFields,
107121
int printingLineNumber,

extra-cmds/printtags.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ extern int tagsPrint (const tagEntry *entry,
4646
extern int tagsPrintPseudoTag (const tagEntry *entry,
4747
tagPrintOptions *opts, tagPrintProcs *procs, void *outfp);
4848

49+
extern int tagsPrintValue (const char *val, int escaping, tagPrintProcs *procs, void *outfp);
50+
4951
#ifdef __cplusplus
5052
};
5153
#endif

0 commit comments

Comments
 (0)