Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
6a6f64f5
Commit
6a6f64f5
authored
Feb 17, 2011
by
Andreas Schlick
Committed by
Rusty Russell
Feb 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: Add a function to free the internal memory.
parent
641d492d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
ccan/opt/opt.c
ccan/opt/opt.c
+6
-0
ccan/opt/opt.h
ccan/opt/opt.h
+8
-0
No files found.
ccan/opt/opt.c
View file @
6a6f64f5
...
...
@@ -201,6 +201,12 @@ bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...))
return
(
ret
==
0
);
}
void
opt_free_table
(
void
)
{
free
(
opt_table
);
opt_table
=
0
;
}
void
opt_log_stderr
(
const
char
*
fmt
,
...)
{
va_list
ap
;
...
...
ccan/opt/opt.h
View file @
6a6f64f5
...
...
@@ -183,6 +183,14 @@ void opt_register_table(const struct opt_table *table, const char *desc);
*/
bool
opt_parse
(
int
*
argc
,
char
*
argv
[],
void
(
*
errlog
)(
const
char
*
fmt
,
...));
/**
* opt_free_table - free the table.
*
* This frees the internal memory. Call this as the last
* opt function.
*/
void
opt_free_table
(
void
);
/**
* opt_log_stderr - print message to stderr.
* @fmt: printf-style format.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment