aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-04-09 20:05:12 +0200
committerMattias Andrée <maandree@kth.se>2023-04-09 20:05:12 +0200
commitbbc81527ffbbb1cb26dfd145d492bdd613cd7ae2 (patch)
tree1bdaf0b894cf933f7d96951a516b037cde2f32c1 /man
parentImprove makefile and fix a bug (diff)
downloadlibsimple-bbc81527ffbbb1cb26dfd145d492bdd613cd7ae2.tar.gz
libsimple-bbc81527ffbbb1cb26dfd145d492bdd613cd7ae2.tar.bz2
libsimple-bbc81527ffbbb1cb26dfd145d492bdd613cd7ae2.tar.xz
Add tests and man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
l---------man3/libsimple_strtoh.31
l---------man3/libsimple_strtohh.31
-rw-r--r--man3/libsimple_strtoi.3202
l---------man3/libsimple_strtoi16.31
l---------man3/libsimple_strtoi32.31
l---------man3/libsimple_strtoi64.31
l---------man3/libsimple_strtoi8.31
-rw-r--r--man3/libsimple_strtou.3202
l---------man3/libsimple_strtou16.31
l---------man3/libsimple_strtou32.31
l---------man3/libsimple_strtou64.31
l---------man3/libsimple_strtou8.31
l---------man3/libsimple_strtouh.31
l---------man3/libsimple_strtouhh.31
l---------man3/libsimple_strtouz.31
l---------man3/libsimple_strtoz.31
l---------man3/strtoh.3libsimple1
l---------man3/strtohh.3libsimple1
l---------man3/strtoi.3libsimple1
l---------man3/strtoi16.3libsimple1
l---------man3/strtoi32.3libsimple1
l---------man3/strtoi64.3libsimple1
l---------man3/strtoi8.3libsimple1
l---------man3/strtou.3libsimple1
l---------man3/strtou16.3libsimple1
l---------man3/strtou32.3libsimple1
l---------man3/strtou64.3libsimple1
l---------man3/strtou8.3libsimple1
l---------man3/strtouh.3libsimple1
l---------man3/strtouhh.3libsimple1
l---------man3/strtouz.3libsimple1
l---------man3/strtoz.3libsimple1
32 files changed, 434 insertions, 0 deletions
diff --git a/man3/libsimple_strtoh.3 b/man3/libsimple_strtoh.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoh.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtohh.3 b/man3/libsimple_strtohh.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtohh.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtoi.3 b/man3/libsimple_strtoi.3
new file mode 100644
index 0000000..3def194
--- /dev/null
+++ b/man3/libsimple_strtoi.3
@@ -0,0 +1,202 @@
+.TH LIBSIMPLE_STRTOI 3 libsimple
+.SH NAME
+libsimple_strto{i,h,hh,z,i8,i16,i32,i64} \- parse a string as a signed integer
+
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+signed int libsimple_strtoi(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+signed short int libsimple_strtoh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+signed char libsimple_strtohh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+inline ssize_t libsimple_strtoz(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+int_least8_t libsimple_strtoi8(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+int_least16_t libsimple_strtoi16(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+int_least32_t libsimple_strtoi32(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+int_least64_t libsimple_strtoi64(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+
+#ifndef strtoi
+# define strtoi libsimple_strtoi
+#endif
+#ifndef strtoh
+# define strtoh libsimple_strtoh
+#endif
+#ifndef strtohh
+# define strtohh libsimple_strtohh
+#endif
+#ifndef strtoz
+# define strtoz libsimple_strtoz
+#endif
+#ifndef strtoi8
+# define strtoi8 libsimple_strtoi8
+#endif
+#ifndef strtoi16
+# define strtoi16 libsimple_strtoi16
+#endif
+#ifndef strtoi32
+# define strtoi32 libsimple_strtoi32
+#endif
+#ifndef strtoi64
+# define strtoi64 libsimple_strtoi64
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+
+.SH DESCRIPTION
+The
+.BR libsimple_strtoi ()
+function is a version of the
+.BR strtol (3)
+function, that returns a
+.BR "signed int" .
+.PP
+The
+.BR libsimple_strtoh ()
+function is a version of the
+.BR strtol (3)
+function, that returns a
+.BR "signed short int" .
+.PP
+The
+.BR libsimple_strtohh ()
+function is a version of the
+.BR strtol (3)
+function, that returns a
+.BR "signed char" .
+.PP
+The
+.BR libsimple_strtoz ()
+function is a version of the
+.BR strtol (3)
+function, that returns a
+.BR ssize_t .
+.PP
+The
+.BR libsimple_strtoi8 ()
+function is a version of the
+.BR strtol (3)
+function, that returns an
+.B int_least8_t
+restricted to the range of
+.BR int8_t .
+.PP
+The
+.BR libsimple_strtoi16 ()
+function is a version of the
+.BR strtol (3)
+function, that returns an
+.B int_least16_t
+restricted to the range of
+.BR int16_t .
+.PP
+The
+.BR libsimple_strtoi32 ()
+function is a version of the
+.BR strtol (3)
+function, that returns an
+.B int_least32_t
+restricted to the range of
+.BR int32_t .
+.PP
+The
+.BR libsimple_strtoi64 ()
+function is a version of the
+.BR strtol (3)
+function, that returns an
+.B int_least64_t
+restricted to the range of
+.BR int64_t .
+
+.SH RETURN VALUE
+See
+.BR strtol (3).
+
+.SH ERRORS
+See
+.BR strtol (3).
+
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strtoi (),
+.br
+.BR libsimple_strtoh (),
+.br
+.BR libsimple_strtohh (),
+.br
+.BR libsimple_strtoz (),
+.br
+.BR libsimple_strtoi8 (),
+.br
+.BR libsimple_strtoi16 (),
+.br
+.BR libsimple_strtoi32 (),
+.br
+.BR libsimple_strtoi64 ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strtoi (),
+.br
+.BR libsimple_strtoh (),
+.br
+.BR libsimple_strtohh (),
+.br
+.BR libsimple_strtoz (),
+.br
+.BR libsimple_strtoi8 (),
+.br
+.BR libsimple_strtoi16 (),
+.br
+.BR libsimple_strtoi32 (),
+.br
+.BR libsimple_strtoi64 ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strtoi (),
+.br
+.BR libsimple_strtoh (),
+.br
+.BR libsimple_strtohh (),
+.br
+.BR libsimple_strtoz (),
+.br
+.BR libsimple_strtoi8 (),
+.br
+.BR libsimple_strtoi16 (),
+.br
+.BR libsimple_strtoi32 (),
+.br
+.BR libsimple_strtoi64 ()
+T} Async-cancel safety AC-Safe
+.TE
+
+.SH EXAMPLES
+None.
+
+.SH APPLICATION USAGE
+None.
+
+.SH RATIONALE
+None.
+
+.SH FUTURE DIRECTIONS
+None.
+
+.SH NOTES
+None.
+
+.SH BUGS
+None.
+
+.SH SEE ALSO
+.BR libsimple_strtou (3),
+.BR strtol (3),
+.BR strtoll (3)
diff --git a/man3/libsimple_strtoi16.3 b/man3/libsimple_strtoi16.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoi16.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtoi32.3 b/man3/libsimple_strtoi32.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoi32.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtoi64.3 b/man3/libsimple_strtoi64.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoi64.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtoi8.3 b/man3/libsimple_strtoi8.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoi8.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/libsimple_strtou.3 b/man3/libsimple_strtou.3
new file mode 100644
index 0000000..4e4bb33
--- /dev/null
+++ b/man3/libsimple_strtou.3
@@ -0,0 +1,202 @@
+.TH LIBSIMPLE_STRTOU 3 libsimple
+.SH NAME
+libsimple_strto{u,uh,uhh,uz,u8,u16,u32,u64} \- parse a string as an unsigned integer
+
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+unsigned int libsimple_strtou(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+unsigned short int libsimple_strtouh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+unsigned char libsimple_strtouhh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+inline size_t libsimple_strtouz(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+uint_least8_t libsimple_strtou8(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+uint_least16_t libsimple_strtou16(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+uint_least32_t libsimple_strtou32(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+uint_least64_t libsimple_strtou64(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
+
+#ifndef strtou
+# define strtou libsimple_strtou
+#endif
+#ifndef strtouh
+# define strtouh libsimple_strtouh
+#endif
+#ifndef strtouhh
+# define strtouhh libsimple_strtouhh
+#endif
+#ifndef strtouz
+# define strtouz libsimple_strtouz
+#endif
+#ifndef strtou8
+# define strtou8 libsimple_strtou8
+#endif
+#ifndef strtou16
+# define strtou16 libsimple_strtou16
+#endif
+#ifndef strtou32
+# define strtou32 libsimple_strtou32
+#endif
+#ifndef strtou64
+# define strtou64 libsimple_strtou64
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+
+.SH DESCRIPTION
+The
+.BR libsimple_strtou ()
+function is a version of the
+.BR strtoul (3)
+function, that returns au
+.BR "unsigned int" .
+.PP
+The
+.BR libsimple_strtouh ()
+function is a version of the
+.BR strtoul (3)
+function, that returns au
+.BR "unsigned short int" .
+.PP
+The
+.BR libsimple_strtouhh ()
+function is a version of the
+.BR strtoul (3)
+function, that returns au
+.BR "unsigned char" .
+.PP
+The
+.BR libsimple_strtouz ()
+function is a version of the
+.BR strtoul (3)
+function, that returns a
+.BR size_t .
+.PP
+The
+.BR libsimple_strtou8 ()
+function is a version of the
+.BR strtoul (3)
+function, that returns a
+.B uint_least8_t
+restricted to the range of
+.BR uint8_t .
+.PP
+The
+.BR libsimple_strtou16 ()
+function is a version of the
+.BR strtoul (3)
+function, that returns a
+.B uint_least16_t
+restricted to the range of
+.BR uint16_t .
+.PP
+The
+.BR libsimple_strtou32 ()
+function is a version of the
+.BR strtoul (3)
+function, that returns a
+.B uint_least32_t
+restricted to the range of
+.BR uint32_t .
+.PP
+The
+.BR libsimple_strtou64 ()
+function is a version of the
+.BR strtoul (3)
+function, that returns a
+.B uint_least64_t
+restricted to the range of
+.BR uint64_t .
+
+.SH RETURN VALUE
+See
+.BR strtoul (3).
+
+.SH ERRORS
+See
+.BR strtoul (3).
+
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strtou (),
+.br
+.BR libsimple_strtouh (),
+.br
+.BR libsimple_strtouhh (),
+.br
+.BR libsimple_strtouz (),
+.br
+.BR libsimple_strtou8 (),
+.br
+.BR libsimple_strtou16 (),
+.br
+.BR libsimple_strtou32 (),
+.br
+.BR libsimple_strtou64 ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strtou (),
+.br
+.BR libsimple_strtouh (),
+.br
+.BR libsimple_strtouhh (),
+.br
+.BR libsimple_strtouz (),
+.br
+.BR libsimple_strtou8 (),
+.br
+.BR libsimple_strtou16 (),
+.br
+.BR libsimple_strtou32 (),
+.br
+.BR libsimple_strtou64 ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strtou (),
+.br
+.BR libsimple_strtouh (),
+.br
+.BR libsimple_strtouhh (),
+.br
+.BR libsimple_strtouz (),
+.br
+.BR libsimple_strtou8 (),
+.br
+.BR libsimple_strtou16 (),
+.br
+.BR libsimple_strtou32 (),
+.br
+.BR libsimple_strtou64 ()
+T} Async-cancel safety AC-Safe
+.TE
+
+.SH EXAMPLES
+None.
+
+.SH APPLICATION USAGE
+None.
+
+.SH RATIONALE
+None.
+
+.SH FUTURE DIRECTIONS
+None.
+
+.SH NOTES
+None.
+
+.SH BUGS
+None.
+
+.SH SEE ALSO
+.BR libsimple_strtoi (3),
+.BR strtoul (3),
+.BR strtoull (3)
diff --git a/man3/libsimple_strtou16.3 b/man3/libsimple_strtou16.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtou16.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtou32.3 b/man3/libsimple_strtou32.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtou32.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtou64.3 b/man3/libsimple_strtou64.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtou64.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtou8.3 b/man3/libsimple_strtou8.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtou8.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtouh.3 b/man3/libsimple_strtouh.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtouh.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtouhh.3 b/man3/libsimple_strtouhh.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtouhh.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtouz.3 b/man3/libsimple_strtouz.3
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/libsimple_strtouz.3
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/libsimple_strtoz.3 b/man3/libsimple_strtoz.3
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/libsimple_strtoz.3
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/strtoh.3libsimple b/man3/strtoh.3libsimple
new file mode 120000
index 0000000..58751cb
--- /dev/null
+++ b/man3/strtoh.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoh.3 \ No newline at end of file
diff --git a/man3/strtohh.3libsimple b/man3/strtohh.3libsimple
new file mode 120000
index 0000000..890ee2c
--- /dev/null
+++ b/man3/strtohh.3libsimple
@@ -0,0 +1 @@
+libsimple_strtohh.3 \ No newline at end of file
diff --git a/man3/strtoi.3libsimple b/man3/strtoi.3libsimple
new file mode 120000
index 0000000..debbfef
--- /dev/null
+++ b/man3/strtoi.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoi.3 \ No newline at end of file
diff --git a/man3/strtoi16.3libsimple b/man3/strtoi16.3libsimple
new file mode 120000
index 0000000..de1c0dc
--- /dev/null
+++ b/man3/strtoi16.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoi16.3 \ No newline at end of file
diff --git a/man3/strtoi32.3libsimple b/man3/strtoi32.3libsimple
new file mode 120000
index 0000000..c2256df
--- /dev/null
+++ b/man3/strtoi32.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoi32.3 \ No newline at end of file
diff --git a/man3/strtoi64.3libsimple b/man3/strtoi64.3libsimple
new file mode 120000
index 0000000..051af78
--- /dev/null
+++ b/man3/strtoi64.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoi64.3 \ No newline at end of file
diff --git a/man3/strtoi8.3libsimple b/man3/strtoi8.3libsimple
new file mode 120000
index 0000000..7a10a91
--- /dev/null
+++ b/man3/strtoi8.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoi8.3 \ No newline at end of file
diff --git a/man3/strtou.3libsimple b/man3/strtou.3libsimple
new file mode 120000
index 0000000..513cee9
--- /dev/null
+++ b/man3/strtou.3libsimple
@@ -0,0 +1 @@
+libsimple_strtou.3 \ No newline at end of file
diff --git a/man3/strtou16.3libsimple b/man3/strtou16.3libsimple
new file mode 120000
index 0000000..4265fbd
--- /dev/null
+++ b/man3/strtou16.3libsimple
@@ -0,0 +1 @@
+libsimple_strtou16.3 \ No newline at end of file
diff --git a/man3/strtou32.3libsimple b/man3/strtou32.3libsimple
new file mode 120000
index 0000000..38ae14a
--- /dev/null
+++ b/man3/strtou32.3libsimple
@@ -0,0 +1 @@
+libsimple_strtou32.3 \ No newline at end of file
diff --git a/man3/strtou64.3libsimple b/man3/strtou64.3libsimple
new file mode 120000
index 0000000..e71f91d
--- /dev/null
+++ b/man3/strtou64.3libsimple
@@ -0,0 +1 @@
+libsimple_strtou64.3 \ No newline at end of file
diff --git a/man3/strtou8.3libsimple b/man3/strtou8.3libsimple
new file mode 120000
index 0000000..0554888
--- /dev/null
+++ b/man3/strtou8.3libsimple
@@ -0,0 +1 @@
+libsimple_strtou8.3 \ No newline at end of file
diff --git a/man3/strtouh.3libsimple b/man3/strtouh.3libsimple
new file mode 120000
index 0000000..fac2341
--- /dev/null
+++ b/man3/strtouh.3libsimple
@@ -0,0 +1 @@
+libsimple_strtouh.3 \ No newline at end of file
diff --git a/man3/strtouhh.3libsimple b/man3/strtouhh.3libsimple
new file mode 120000
index 0000000..9933519
--- /dev/null
+++ b/man3/strtouhh.3libsimple
@@ -0,0 +1 @@
+libsimple_strtouhh.3 \ No newline at end of file
diff --git a/man3/strtouz.3libsimple b/man3/strtouz.3libsimple
new file mode 120000
index 0000000..af00600
--- /dev/null
+++ b/man3/strtouz.3libsimple
@@ -0,0 +1 @@
+libsimple_strtouz.3 \ No newline at end of file
diff --git a/man3/strtoz.3libsimple b/man3/strtoz.3libsimple
new file mode 120000
index 0000000..157c5c8
--- /dev/null
+++ b/man3/strtoz.3libsimple
@@ -0,0 +1 @@
+libsimple_strtoz.3 \ No newline at end of file