aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--TODO.md1
-rw-r--r--doc/mans/bindle_filetostr.3.in65
3 files changed, 70 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index a5d2ce5..9a4cccc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@ man_MANS = doc/mans/bindletools.1 \
83 doc/mans/bindle_decode.3 \ 83 doc/mans/bindle_decode.3 \
84 doc/mans/bindle_dirname_r.3 \ 84 doc/mans/bindle_dirname_r.3 \
85 doc/mans/bindle_enqueue.3 \ 85 doc/mans/bindle_enqueue.3 \
86 doc/mans/bindle_filetostr.3 \
86 doc/mans/bindle_peek.3 \ 87 doc/mans/bindle_peek.3 \
87 doc/mans/bindle_push.3 \ 88 doc/mans/bindle_push.3 \
88 doc/mans/bindle_refcount.3 \ 89 doc/mans/bindle_refcount.3 \
@@ -131,6 +132,7 @@ EXTRA_DIST = $(doc_DATA) \
131 doc/mans/bindle_decode.3.in \ 132 doc/mans/bindle_decode.3.in \
132 doc/mans/bindle_dirname_r.3.in \ 133 doc/mans/bindle_dirname_r.3.in \
133 doc/mans/bindle_enqueue.3.in \ 134 doc/mans/bindle_enqueue.3.in \
135 doc/mans/bindle_filetostr.3.in \
134 doc/mans/bindle_peek.3.in \ 136 doc/mans/bindle_peek.3.in \
135 doc/mans/bindle_push.3.in \ 137 doc/mans/bindle_push.3.in \
136 doc/mans/bindle_refcount.3.in \ 138 doc/mans/bindle_refcount.3.in \
@@ -281,6 +283,9 @@ doc/mans/bindle_dirname_r.3: Makefile $(srcdir)/doc/mans/bindle_dirname_r.3.in
281doc/mans/bindle_enqueue.3: Makefile $(srcdir)/doc/mans/bindle_enqueue.3.in 283doc/mans/bindle_enqueue.3: Makefile $(srcdir)/doc/mans/bindle_enqueue.3.in
282 @$(do_subst_dt) 284 @$(do_subst_dt)
283 285
286doc/mans/bindle_filetostr.3: Makefile $(srcdir)/doc/mans/bindle_filetostr.3.in
287 @$(do_subst_dt)
288
284doc/mans/bindle_peek.3: Makefile $(srcdir)/doc/mans/bindle_peek.3.in 289doc/mans/bindle_peek.3: Makefile $(srcdir)/doc/mans/bindle_peek.3.in
285 @$(do_subst_dt) 290 @$(do_subst_dt)
286 291
diff --git a/TODO.md b/TODO.md
index 5961861..48b68c5 100644
--- a/TODO.md
+++ b/TODO.md
@@ -18,7 +18,6 @@ All rights reserved.
18 - write bindletools-urlencoding.1 18 - write bindletools-urlencoding.1
19 * libbindle Man Pages 19 * libbindle Man Pages
20 - write bindle_debug.3 20 - write bindle_debug.3
21 - write bindle_filetostr.3
22 - write bindle_get_option.3 21 - write bindle_get_option.3
23 - write bindle_getpass.3 22 - write bindle_getpass.3
24 - write bindle_readline.3 23 - write bindle_readline.3
diff --git a/doc/mans/bindle_filetostr.3.in b/doc/mans/bindle_filetostr.3.in
new file mode 100644
index 0000000..4e68f78
--- /dev/null
+++ b/doc/mans/bindle_filetostr.3.in
@@ -0,0 +1,65 @@
1.\"
2.\" Bindle Binaries Tools
3.\" Copyright (C) 2022 David M. Syzdek <david@syzdek.net>.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\" * Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" * Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" * Neither the name of David M. Syzdek nor the
16.\" names of its contributors may be used to endorse or promote products
17.\" derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.TH "BINDLE_STRING" "3" "@RELEASE_MONTH@" "@PACKAGE_NAME@" "Library Functions Manual"
32.SH NAME
33bindle_filetostr - Bindle Binary Tools string routines
34
35.SH LIBRARY
36Bindle Binaries Tools (libbindle, -lbindle)
37
38.SH SYNOPSIS
39.nf
40\fB#include\fR \fB<bindle.h>\fR
41.sp
42.BI "int bindle_filetostr( char * " dst ", const char * " path ", size_t " size " );"
43
44.SH DESCRIPTION
45The \fBbindle_filetostr\fR() function opens the file located at \fIpath\fR and
46copies up to \fIsize\fR - 1 bytes from the file into the buffer pointed to by
47\fIdst\fR. If the file is smaller than the buffer, the entire file is copied
48into the buffer.
49
50.SH RETURN VALUES
51If successful, the \fBbindle_filetostr\fR() function returns the number of
52bytes copied to the buffer pointed to by \fIdst\fR otherwise errno is set
53and -1 is returned.
54
55.SH SEE ALSO
56.BR bindle_strings (3)
57
58.SH AUTHOR
59David M. Syzdek <david@syzdek.net>
60
61.SH ACKNOWLEDGEMENTS
62\fB@PACKAGE_NAME@\fR is developed and maintained by David M. Syzdek
63<david@syzdek.net>.
64
65.\" end of man page