Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Core
Tor
Commits
c90961a9
Commit
c90961a9
authored
Jul 10, 2018
by
Nick Mathewson
🎨
Browse files
Document compat_getdelim_.
parent
391ef5e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/fs/files.h
View file @
c90961a9
...
...
@@ -104,6 +104,9 @@ char *read_file_to_str_until_eof(int fd, size_t max_bytes_to_read,
ATTR_MALLOC
;
#if !defined(HAVE_GETDELIM) || defined(TOR_UNIT_TESTS)
/** Internal back-end function to implement getdelim(): only exists when
* Tor is built for unit tests, or when Tor is built on an operating system
* without its own getdelim(). */
ssize_t
compat_getdelim_
(
char
**
lineptr
,
size_t
*
n
,
int
delim
,
FILE
*
stream
);
#endif
...
...
@@ -112,6 +115,8 @@ ssize_t compat_getdelim_(char **lineptr, size_t *n, int delim, FILE *stream);
* Cross-platform wrapper for getdelim(): behaves as the POSIX-standard
* getdelim() function.
*
* See `getdelim(3)` for more information.
*
* Note that this function will use the libc memory allocator -- so any memory
* passed to this function must come from raw_malloc(), and must be freed by
* raw_free() -- don't use tor_malloc() and tor_free() with this.
...
...
Write
Preview
Supports
Markdown
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