From 532d4a24e2013262dfa41fd85c06a9715c99abf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Oct 2022 21:03:42 +0200 Subject: New upstream version 4.7 --- doc/misc_functions.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/misc_functions.rst (limited to 'doc/misc_functions.rst') diff --git a/doc/misc_functions.rst b/doc/misc_functions.rst new file mode 100644 index 0000000..0f1bdaf --- /dev/null +++ b/doc/misc_functions.rst @@ -0,0 +1,35 @@ +======================= +Miscellaneous functions +======================= + +.. code-block:: c + + #include + + int HX_ffs(unsigned long z); + int HX_fls(unsigned long z); + void HX_hexdump(FILE *fp, const void *ptr, unsigned int len); + + void HX_zvecfree(char **); + unsigned int HX_zveclen(const char *const *); + +``HX_ffs`` + Finds the first (lowest-significant) bit in a value and returns its + position, or ``-1`` to indicate failure. + +``HX_fls`` + Finds the last (most-significant) bit in a value and returns its + position, or ``-1`` to indicate failure. + +``HX_hexdump`` + Outputs a nice pretty-printed hex and ASCII dump to the filedescriptor + ``fp``. ``ptr`` is the memory area, of which ``len`` bytes will be + dumped. + +``HX_zvecfree`` + Frees the supplied Z-vector array. (Frees all array elements from the + first element to (excluding) the first ``NULL`` element.) + +``HX_zveclen`` + Counts the number of array elements until the first ``NULL`` array + element is seen, and returns this number. -- cgit v1.2.3 From bfef0924f58eab930bdd826ac0132786abc32220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 29 Jan 2023 16:17:51 +0100 Subject: New upstream version 4.10 --- doc/misc_functions.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'doc/misc_functions.rst') diff --git a/doc/misc_functions.rst b/doc/misc_functions.rst index 0f1bdaf..43dacfe 100644 --- a/doc/misc_functions.rst +++ b/doc/misc_functions.rst @@ -8,7 +8,6 @@ Miscellaneous functions int HX_ffs(unsigned long z); int HX_fls(unsigned long z); - void HX_hexdump(FILE *fp, const void *ptr, unsigned int len); void HX_zvecfree(char **); unsigned int HX_zveclen(const char *const *); @@ -21,11 +20,6 @@ Miscellaneous functions Finds the last (most-significant) bit in a value and returns its position, or ``-1`` to indicate failure. -``HX_hexdump`` - Outputs a nice pretty-printed hex and ASCII dump to the filedescriptor - ``fp``. ``ptr`` is the memory area, of which ``len`` bytes will be - dumped. - ``HX_zvecfree`` Frees the supplied Z-vector array. (Frees all array elements from the first element to (excluding) the first ``NULL`` element.) @@ -33,3 +27,13 @@ Miscellaneous functions ``HX_zveclen`` Counts the number of array elements until the first ``NULL`` array element is seen, and returns this number. + +.. code-block:: c + + #include + void HX_hexdump(FILE *fp, const void *ptr, unsigned int len); + +``HX_hexdump`` + Outputs a nice pretty-printed hex and ASCII dump to the filedescriptor + ``fp``. ``ptr`` is the memory area, of which ``len`` bytes will be + dumped. -- cgit v1.2.3