diff options
author | Joel Sherrill <joel@rtems.org> | 2018-08-23 10:02:15 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-11-09 15:06:08 -0600 |
commit | 1b26558b9c403a0085a9dfb5888970d23583ccfd (patch) | |
tree | 96005ed6d5f90a17aa462c6521246802a73c188c | |
parent | 495a84c804503b1e77dd2542bf3dee95f25e7237 (diff) |
Add newlib->Rest output from Dannie's scriptposix-newlib
416 files changed, 24569 insertions, 10 deletions
diff --git a/posix-users/conf.py b/posix-users/conf.py index 2086ae9..c83ad3b 100644 --- a/posix-users/conf.py +++ b/posix-users/conf.py @@ -8,7 +8,7 @@ project = "RTEMS POSIX API Guide" latex_documents = [ ('index', 'posix-users.tex', - u'RTEMS POSIX API Guide', + u'RTEMS POSIX and Standard C Library API Guide', u'RTEMS Documentation Project', 'manual'), ] diff --git a/posix-users/index.rst b/posix-users/index.rst index 641406b..bb4cdc1 100644 --- a/posix-users/index.rst +++ b/posix-users/index.rst @@ -1,8 +1,8 @@ .. comment SPDX-License-Identifier: CC-BY-SA-4.0 -================================== -RTEMS POSIX API Guide (|version|). -================================== +========================================================= +RTEMS POSIX and Standard C Library API Guide (|version|). +========================================================= | **COPYRIGHT (c) 1988 - 2015.** | **On-Line Applications Research Corporation (OAR).** diff --git a/posix-users/newlib/libc/ctype/isalnum.rst b/posix-users/newlib/libc/ctype/isalnum.rst new file mode 100644 index 0000000..bd433de --- /dev/null +++ b/posix-users/newlib/libc/ctype/isalnum.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isalnum.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isalnum, isalnum_l: + +isalnum, isalnum_l - Alphanumeric character predicate +------------------------------------------------------------ +.. index:: isalnum +.. index:: isalnum_l +.. index:: alphanumeric character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isalnum(int c); + + #include <ctype.h> + int isalnum_l(int c, locale_t locale); + + + + +**DESCRIPTION:** + +*isalnum* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for alphabetic or +numeric ASCII characters, and *0* for other arguments. It is defined +only if ``c`` is representable as an unsigned char or if ``c`` is EOF. + +*isalnum_l* is like *isalnum* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isalnum*` or `*#undef isalnum_l*`. + + + +**STATUS CODES:** + +*isalnum*,*isalnum_l* return non-zero if ``c`` is a letter or a digit. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isalpha.rst b/posix-users/newlib/libc/ctype/isalpha.rst new file mode 100644 index 0000000..ce343ca --- /dev/null +++ b/posix-users/newlib/libc/ctype/isalpha.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isalpha.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isalpha, isalpha_l: + +isalpha, isalpha_l - Alphabetic character predicate +---------------------------------------------------------- +.. index:: isalpha +.. index:: isalpha_l +.. index:: alphabetic character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isalpha(int c); + + #include <ctype.h> + int isalpha_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isalpha* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero when ``c`` represents an +alphabetic ASCII character, and 0 otherwise. It is defined only if +``c`` is representable as an unsigned char or if ``c`` is EOF. + +*isalpha_l* is like *isalpha* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isalpha*` or `*#undef isalpha_l*`. + + + +**STATUS CODES:** + +*isalpha*, *isalpha_l* return non-zero if ``c`` is a letter. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isascii.rst b/posix-users/newlib/libc/ctype/isascii.rst new file mode 100644 index 0000000..dfea727 --- /dev/null +++ b/posix-users/newlib/libc/ctype/isascii.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isascii.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isascii, isascii_l: + +isascii, isascii_l - Ascii character predicate +----------------------------------------------------- +.. index:: isascii +.. index:: isascii_l +.. index:: ASCII character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isascii(int c); + + #include <ctype.h> + int isascii_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isascii* is a macro which returns non-zero when ``c`` is an ASCII +character, and 0 otherwise. It is defined for all integer values. + +*isascii_l* is like *isascii* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isascii*` or `*#undef isascii_l*`. + + + +**STATUS CODES:** + +*isascii*, *isascii_l* return non-zero if the low order byte of ``c`` +is in the range 0 to 127 (*0x00*--*0x7F*). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isblank.rst b/posix-users/newlib/libc/ctype/isblank.rst new file mode 100644 index 0000000..e842b49 --- /dev/null +++ b/posix-users/newlib/libc/ctype/isblank.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isblank.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isblank, isblank_l: + +isblank, isblank_l - Blank character predicate +----------------------------------------------------- +.. index:: isblank +.. index:: isblank_l +.. index:: blank character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isblank(int c); + + #include <ctype.h> + int isblank_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isblank* is a function which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for blank characters, and 0 +for other characters. It is defined only if ``c`` is representable as an +unsigned char or if ``c`` is EOF. + +*isblank_l* is like *isblank* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*isblank*, *isblank_l* return non-zero if ``c`` is a blank character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iscntrl.rst b/posix-users/newlib/libc/ctype/iscntrl.rst new file mode 100644 index 0000000..7cccc57 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iscntrl.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iscntrl.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iscntrl, iscntrl_l: + +iscntrl, iscntrl_l - Control character predicate +------------------------------------------------------- +.. index:: iscntrl +.. index:: iscntrl_l +.. index:: control character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int iscntrl(int c); + + #include <ctype.h> + int iscntrl_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*iscntrl* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for control characters, and 0 +for other characters. It is defined only if ``c`` is representable as an +unsigned char or if ``c`` is EOF. + +*iscntrl_l* is like *iscntrl* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef iscntrl*` or `*#undef iscntrl_l*`. + + + +**STATUS CODES:** + +*iscntrl*, *iscntrl_l* return non-zero if ``c`` is a delete character +or ordinary control character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isdigit.rst b/posix-users/newlib/libc/ctype/isdigit.rst new file mode 100644 index 0000000..228b640 --- /dev/null +++ b/posix-users/newlib/libc/ctype/isdigit.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isdigit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isdigit, isdigit_l: + +isdigit, isdigit_l - Decimal digit predicate +--------------------------------------------------- +.. index:: isdigit +.. index:: isdigit_l +.. index:: decimal digit predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isdigit(int c); + + #include <ctype.h> + int isdigit_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isdigit* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for decimal digits, and 0 for +other characters. It is defined only if ``c`` is representable as an +unsigned char or if ``c`` is EOF. + +*isdigit_l* is like *isdigit* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isdigit*` or `*#undef isdigit_l*`. + + + +**STATUS CODES:** + +*isdigit*, *isdigit_l* return non-zero if ``c`` is a decimal digit +(*0*--*9*). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/islower.rst b/posix-users/newlib/libc/ctype/islower.rst new file mode 100644 index 0000000..3bb8565 --- /dev/null +++ b/posix-users/newlib/libc/ctype/islower.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/islower.c + +.. COMMENT: Generated on: 2018-08-20 + +.. islower, islower_l: + +islower, islower_l - Lowercase character predicate +--------------------------------------------------------- +.. index:: islower +.. index:: islower_l +.. index:: lowercase character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int islower(int c); + + #include <ctype.h> + int islower_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*islower* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for minuscules +(lowercase alphabetic characters), and 0 for other characters. +It is defined only if ``c`` is representable as an unsigned char or if +``c`` is EOF. + +*islower_l* is like *islower* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef islower*` or `*#undef islower_l*`. + + + +**STATUS CODES:** + +*islower*, *islower_l* return non-zero if ``c`` is a lowercase letter. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isprint.rst b/posix-users/newlib/libc/ctype/isprint.rst new file mode 100644 index 0000000..d810beb --- /dev/null +++ b/posix-users/newlib/libc/ctype/isprint.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isprint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isprint, isgraph, isprint_l, isgraph_l: + +isprint, isgraph, isprint_l, isgraph_l - Printable character predicates +---------------------------------------------------------------------------------- +.. index:: isprint +.. index:: isgraph +.. index:: isprint_l +.. index:: isgraph_l +.. index:: printable character predicates + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isprint(int c); + int isgraph(int c); + + #include <ctype.h> + int isprint_l(int c, locale_t locale); + int isgraph_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isprint* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for printable characters, +and 0 for other character arguments. It is defined only if ``c`` is +representable as an unsigned char or if ``c`` is EOF. + +*isgraph* behaves identically to *isprint*, except that space characters +are excluded. + +*isprint_l*, *isgraph_l* are like *isprint*, *isgraph* but perform +the check based on the locale specified by the locale object locale. If +``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining either macro using `*#undef isprint*` or `*#undef isgraph*`, +or `*#undef isprint_l*` or `*#undef isgraph_l*`. + + + +**STATUS CODES:** + +*isprint*, *isprint_l* return non-zero if ``c`` is a printing character. +*isgraph*, *isgraph_l* return non-zero if ``c`` is a printing character +except spaces. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/ispunct.rst b/posix-users/newlib/libc/ctype/ispunct.rst new file mode 100644 index 0000000..250c88b --- /dev/null +++ b/posix-users/newlib/libc/ctype/ispunct.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/ispunct.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ispunct, ispunct_l: + +ispunct, ispunct_l - Punctuation character predicate +----------------------------------------------------------- +.. index:: ispunct +.. index:: ispunct_l +.. index:: punctuation character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int ispunct(int c); + + #include <ctype.h> + int ispunct_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*ispunct* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for printable +punctuation characters, and 0 for other characters. It is defined only +if ``c`` is representable as an unsigned char or if ``c`` is EOF. + +*ispunct_l* is like *ispunct* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef ispunct*` or `*#undef ispunct_l*`. + + + +**STATUS CODES:** + +*ispunct*, *ispunct_l* return non-zero if ``c`` is a printable +punctuation character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isspace.rst b/posix-users/newlib/libc/ctype/isspace.rst new file mode 100644 index 0000000..d782955 --- /dev/null +++ b/posix-users/newlib/libc/ctype/isspace.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isspace.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isspace, isspace_l: + +isspace, isspace_l - Whitespace character predicate +---------------------------------------------------------- +.. index:: isspace +.. index:: isspace_l +.. index:: whitespace character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isspace(int c); + + #include <ctype.h> + int isspace_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isspace* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for whitespace +characters, and 0 for other characters. It is defined only when *isascii*(``c``) is true or ``c`` is EOF. + +*isspace_l* is like *isspace* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isspace*` or `*#undef isspace_l*`. + + + +**STATUS CODES:** + +*isspace*, *isspace_l* return non-zero if ``c`` is a space, tab, +carriage return, new line, vertical tab, or formfeed (*0x09*--*0x0D*, +*0x20*), or one of the other space characters in non-ASCII charsets. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isupper.rst b/posix-users/newlib/libc/ctype/isupper.rst new file mode 100644 index 0000000..23fefbc --- /dev/null +++ b/posix-users/newlib/libc/ctype/isupper.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isupper.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isupper, isupper_l: + +isupper, isupper_l - Uppercase character predicate +--------------------------------------------------------- +.. index:: isupper +.. index:: isupper_l +.. index:: uppercase character predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isupper(int c); + + #include <ctype.h> + int isupper_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isupper* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for uppercase letters +(*A*--*Z*), and 0 for other characters. + +*isupper_l* is like *isupper* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isupper*` or `*#undef isupper_l*`. + + + +**STATUS CODES:** + +*isupper*, *isupper_l* return non-zero if ``c`` is an uppercase letter. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswalnum.rst b/posix-users/newlib/libc/ctype/iswalnum.rst new file mode 100644 index 0000000..cc93420 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswalnum.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswalnum.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswalnum, iswalnum_l: + +iswalnum, iswalnum_l - Alphanumeric wide character test +-------------------------------------------------------------- +.. index:: iswalnum +.. index:: iswalnum_l +.. index:: alphanumeric wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswalnum(wint_t c); + + #include <wctype.h> + int iswalnum_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswalnum* is a function which classifies wide-character values that +are alphanumeric. + +*iswalnum_l* is like *iswalnum* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswalnum*, *iswalnum_l* return non-zero if ``c`` is a alphanumeric +wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswalpha.rst b/posix-users/newlib/libc/ctype/iswalpha.rst new file mode 100644 index 0000000..897b70b --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswalpha.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswalpha.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswalpha, iswalpha_l: + +iswalpha, iswalpha_l - Alphabetic wide character test +------------------------------------------------------------ +.. index:: iswalpha +.. index:: iswalpha_l +.. index:: alphabetic wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswalpha(wint_t c); + + #include <wctype.h> + int iswalpha_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswalpha* is a function which classifies wide-character values that +are alphabetic. + +*iswalpha_l* is like *iswalpha* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswalpha*, *iswalpha_l* return non-zero if ``c`` is an alphabetic +wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswblank.rst b/posix-users/newlib/libc/ctype/iswblank.rst new file mode 100644 index 0000000..c74caca --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswblank.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswblank.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswblank, iswblank_l: + +iswblank, iswblank_l - Blank wide character test +------------------------------------------------------- +.. index:: iswblank +.. index:: iswblank_l +.. index:: blank wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswblank(wint_t c); + + #include <wctype.h> + int iswblank_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswblank* is a function which classifies wide-character values that +are categorized as blank. + +*iswblank_l* is like *iswblank* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswblank*, *iswblank_l* return non-zero if ``c`` is a blank wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswcntrl.rst b/posix-users/newlib/libc/ctype/iswcntrl.rst new file mode 100644 index 0000000..5fd3a77 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswcntrl.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswcntrl.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswcntrl, iswcntrl_l: + +iswcntrl, iswcntrl_l - Control wide character test +--------------------------------------------------------- +.. index:: iswcntrl +.. index:: iswcntrl_l +.. index:: control wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswcntrl(wint_t c); + + #include <wctype.h> + int iswcntrl_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswcntrl* is a function which classifies wide-character values that +are categorized as control characters. + +*iswcntrl_l* is like *iswcntrl* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswcntrl*, *iswcntrl_l* return non-zero if ``c`` is a control wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswctype.rst b/posix-users/newlib/libc/ctype/iswctype.rst new file mode 100644 index 0000000..4b65f51 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswctype.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswctype.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswctype, iswctype_l: + +iswctype, iswctype_l - Extensible wide-character test +------------------------------------------------------------ +.. index:: iswctype +.. index:: iswctype_l +.. index:: extensible wide-character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswctype(wint_t c, wctype_t desc); + + #include <wctype.h> + int iswctype_l(wint_t c, wctype_t desc, locale_t locale); + + + +**DESCRIPTION:** + +*iswctype* is a function which classifies wide-character values using the +wide-character test specified by ``desc``. + +*iswctype_l* is like *iswctype* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswctype*, *iswctype_l* return non-zero if and only if ``c`` matches +the test specified by ``desc``. If ``desc`` is unknown, zero is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswdigit.rst b/posix-users/newlib/libc/ctype/iswdigit.rst new file mode 100644 index 0000000..741736f --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswdigit.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswdigit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswdigit, iswdigit_l: + +iswdigit, iswdigit_l - Decimal digit wide character test +--------------------------------------------------------------- +.. index:: iswdigit +.. index:: iswdigit_l +.. index:: decimal digit wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswdigit(wint_t c); + + #include <wctype.h> + int iswdigit_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswdigit* is a function which classifies wide-character values that +are decimal digits. + +*iswdigit_l* is like *iswdigit* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswdigit*, *iswdigit_l* return non-zero if ``c`` is a decimal digit wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswgraph.rst b/posix-users/newlib/libc/ctype/iswgraph.rst new file mode 100644 index 0000000..9fc4136 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswgraph.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswgraph.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswgraph, iswgraph_l: + +iswgraph, iswgraph_l - Graphic wide character test +--------------------------------------------------------- +.. index:: iswgraph +.. index:: iswgraph_l +.. index:: graphic wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswgraph(wint_t c); + + #include <wctype.h> + int iswgraph_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswgraph* is a function which classifies wide-character values that +are graphic. + +*iswgraph_l* is like *iswgraph* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswgraph*, *iswgraph_l* return non-zero if ``c`` is a graphic wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswlower.rst b/posix-users/newlib/libc/ctype/iswlower.rst new file mode 100644 index 0000000..b1faac2 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswlower.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswlower.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswlower, iswlower_l: + +iswlower, iswlower_l - Lowercase wide character test +----------------------------------------------------------- +.. index:: iswlower +.. index:: iswlower_l +.. index:: lowercase wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswlower(wint_t c); + + #include <wctype.h> + int iswlower_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswlower* is a function which classifies wide-character values that +are categorized as lowercase. + +*iswlower_l* is like *iswlower* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswlower*, *iswlower_l* return non-zero if ``c`` is a lowercase wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswprint.rst b/posix-users/newlib/libc/ctype/iswprint.rst new file mode 100644 index 0000000..9af3781 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswprint.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswprint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswprint, iswprint_l: + +iswprint, iswprint_l - Printable wide character test +----------------------------------------------------------- +.. index:: iswprint +.. index:: iswprint_l +.. index:: printable wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswprint(wint_t c); + + #include <wctype.h> + int iswprint_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswprint* is a function which classifies wide-character values that +are printable. + +*iswprint_l* is like *iswprint* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswprint*, *iswprint_l* return non-zero if ``c`` is a printable wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswpunct.rst b/posix-users/newlib/libc/ctype/iswpunct.rst new file mode 100644 index 0000000..fe93da8 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswpunct.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswpunct.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswpunct, iswpunct_l: + +iswpunct, iswpunct_l - Punctuation wide character test +------------------------------------------------------------- +.. index:: iswpunct +.. index:: iswpunct_l +.. index:: punctuation wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswpunct(wint_t c); + + #include <wctype.h> + int iswpunct_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswpunct* is a function which classifies wide-character values that +are punctuation. + +*iswpunct_l* is like *iswpunct* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswpunct*, *iswpunct_l* return non-zero if ``c`` is a punctuation wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswspace.rst b/posix-users/newlib/libc/ctype/iswspace.rst new file mode 100644 index 0000000..a648471 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswspace.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswspace.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswspace, iswspace_l: + +iswspace, iswspace_l - Whitespace wide character test +------------------------------------------------------------ +.. index:: iswspace +.. index:: iswspace_l +.. index:: whitespace wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswspace(wint_t c); + + #include <wctype.h> + int iswspace_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswspace* is a function which classifies wide-character values that +are categorized as whitespace. + +*iswspace_l* is like *iswspace* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswspace*, *iswspace_l* return non-zero if ``c`` is a whitespace wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswupper.rst b/posix-users/newlib/libc/ctype/iswupper.rst new file mode 100644 index 0000000..567b4b1 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswupper.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswupper.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswupper, iswupper_l: + +iswupper, iswupper_l - Uppercase wide character test +----------------------------------------------------------- +.. index:: iswupper +.. index:: iswupper_l +.. index:: uppercase wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswupper(wint_t c); + + #include <wctype.h> + int iswupper_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswupper* is a function which classifies wide-character values that +are categorized as uppercase. + +*iswupper_l* is like *iswupper* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswupper*, *iswupper_l* return non-zero if ``c`` is an uppercase wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/iswxdigit.rst b/posix-users/newlib/libc/ctype/iswxdigit.rst new file mode 100644 index 0000000..f5d1b93 --- /dev/null +++ b/posix-users/newlib/libc/ctype/iswxdigit.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/iswxdigit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iswxdigit, iswxdigit_l: + +iswxdigit, iswxdigit_l - Hexadecimal digit wide character test +--------------------------------------------------------------------- +.. index:: iswxdigit +.. index:: iswxdigit_l +.. index:: hexadecimal digit wide character test + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + int iswxdigit(wint_t c); + + #include <wctype.h> + int iswxdigit_l(wint_t c, locale_t locale); + + + +**DESCRIPTION:** + +*iswxdigit* is a function which classifies wide character values that +are hexadecimal digits. + +*iswxdigit_l* is like *iswxdigit* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*iswxdigit*, *iswxdigit_l* return non-zero if ``c`` is a hexadecimal digit wide character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/isxdigit.rst b/posix-users/newlib/libc/ctype/isxdigit.rst new file mode 100644 index 0000000..1ca7830 --- /dev/null +++ b/posix-users/newlib/libc/ctype/isxdigit.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/isxdigit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isxdigit, isxdigit_l: + +isxdigit, isxdigit_l - Hexadecimal digit predicate +--------------------------------------------------------- +.. index:: isxdigit +.. index:: isxdigit_l +.. index:: hexadecimal digit predicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int isxdigit(int c); + + #include <ctype.h> + int isxdigit_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*isxdigit* is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for hexadecimal digits, +and *0* for other characters. It is defined only if ``c`` is +representable as an unsigned char or if ``c`` is EOF. + +*isxdigit_l* is like *isxdigit* but performs the check based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `*#undef isxdigit*` or `*#undef isxdigit_l*`. + + + +**STATUS CODES:** + +*isxdigit*, *isxdigit_l* return non-zero if ``c`` is a hexadecimal digit +(*0*--*9*, *a*--*f*, or *A*--*F*). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/toascii.rst b/posix-users/newlib/libc/ctype/toascii.rst new file mode 100644 index 0000000..d214443 --- /dev/null +++ b/posix-users/newlib/libc/ctype/toascii.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/toascii.c + +.. COMMENT: Generated on: 2018-08-20 + +.. toascii, toascii_l: + +toascii, toascii_l - Force integers to ascii range +--------------------------------------------------------- +.. index:: toascii +.. index:: toascii_l +.. index:: force integers to ASCII range + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int toascii(int c); + + #include <ctype.h> + int toascii_l(int c, locale_t locale); + + + +**DESCRIPTION:** + +*toascii* is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits. + +*toascii_l* is like *toascii* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining this macro using `*#undef toascii*` or `*#undef toascii_l*`. + + + +**STATUS CODES:** + +*toascii*, *toascii_l* return integers between 0 and 127. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/tolower.rst b/posix-users/newlib/libc/ctype/tolower.rst new file mode 100644 index 0000000..14eb877 --- /dev/null +++ b/posix-users/newlib/libc/ctype/tolower.rst @@ -0,0 +1,60 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/tolower.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tolower, tolower_l: + +tolower, tolower_l - Translate characters to lowercase +------------------------------------------------------------- +.. index:: tolower +.. index:: tolower_l +.. index:: translate characters to lowercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int tolower(int c); + int _tolower(int c); + + #include <ctype.h> + int tolower_l(int c, locale_t locale); + + + + +**DESCRIPTION:** + +*tolower* is a macro which converts uppercase characters to lowercase, +leaving all other characters unchanged. It is only defined when +``c`` is an integer in the range *EOF* to *255*. + +*tolower_l* is like *tolower* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining this macro using `*#undef tolower*` or `*#undef tolower_l*`. + +*_tolower* performs the same conversion as *tolower*, but should +only be used when ``c`` is known to be an uppercase character (*A*--*Z*). + + + +**STATUS CODES:** + +*tolower*, *tolower_l* return the lowercase equivalent of ``c`` when +``c`` is an uppercase character, and ``c`` otherwise. + +*_tolower* returns the lowercase equivalent of ``c`` when it is a +character between *A* and *Z*. If ``c`` is not one of these +characters, the behaviour of *_tolower* is undefined. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/toupper.rst b/posix-users/newlib/libc/ctype/toupper.rst new file mode 100644 index 0000000..f4701f1 --- /dev/null +++ b/posix-users/newlib/libc/ctype/toupper.rst @@ -0,0 +1,60 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/toupper.c + +.. COMMENT: Generated on: 2018-08-20 + +.. toupper, toupper_l: + +toupper, toupper_l - Translate characters to uppercase +------------------------------------------------------------- +.. index:: toupper +.. index:: toupper_l +.. index:: translate characters to uppercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <ctype.h> + int toupper(int c); + int _toupper(int c); + + #include <ctype.h> + int toupper_l(int c, locale_t locale); + + + + +**DESCRIPTION:** + +*toupper* is a macro which converts lowercase characters to uppercase, +leaving all other characters unchanged. It is only defined when +``c`` is an integer in the range *EOF* to *255*. + +*toupper_l* is like *toupper* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining this macro using `*#undef toupper*` or `*#undef toupper_l*`. + +*_toupper* performs the same conversion as *toupper*, but should +only be used when ``c`` is known to be a lowercase character (*a*--*z*). + + + +**STATUS CODES:** + +*toupper*, *toupper_l* return the uppercase equivalent of ``c`` when +``c`` is a lowercase character, and ``c`` otherwise. + +*_toupper* returns the uppercase equivalent of ``c`` when it is a +character between *a* and *z*. If ``c`` is not one of these +characters, the behaviour of *_toupper* is undefined. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/towctrans.rst b/posix-users/newlib/libc/ctype/towctrans.rst new file mode 100644 index 0000000..046ae47 --- /dev/null +++ b/posix-users/newlib/libc/ctype/towctrans.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/towctrans.c + +.. COMMENT: Generated on: 2018-08-20 + +.. towctrans, towctrans_l: + +towctrans, towctrans_l - Extensible wide-character translation +--------------------------------------------------------------------- +.. index:: towctrans +.. index:: towctrans_l +.. index:: extensible wide-character translation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + wint_t towctrans(wint_t c, wctrans_t w); + + #include <wctype.h> + wint_t towctrans_l(wint_t c, wctrans_t w, locale_t locale); + + + + +**DESCRIPTION:** + +*towctrans* is a function which converts wide characters based on +a specified translation type ``w``. If the translation type is +invalid or cannot be applied to the current character, no change +to the character is made. + +*towctrans_l* is like *towctrans* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*towctrans*, *towctrans_l* return the translated equivalent of ``c`` +when it is a valid for the given translation, otherwise, it returns the +input character. When the translation type is invalid, *errno* is +set to *EINVAL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/towlower.rst b/posix-users/newlib/libc/ctype/towlower.rst new file mode 100644 index 0000000..358ccf1 --- /dev/null +++ b/posix-users/newlib/libc/ctype/towlower.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/towlower.c + +.. COMMENT: Generated on: 2018-08-20 + +.. towlower, towlower_l: + +towlower, towlower_l - Translate wide characters to lowercase +-------------------------------------------------------------------- +.. index:: towlower +.. index:: towlower_l +.. index:: translate wide characters to lowercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + wint_t towlower(wint_t c); + + #include <wctype.h> + wint_t towlower_l(wint_t c, locale_t locale); + + + + +**DESCRIPTION:** + +*towlower* is a function which converts uppercase wide characters to +lowercase, leaving all other characters unchanged. + +*towlower_l* is like *towlower* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*towlower*, *towlower_l* return the lowercase equivalent of ``c`` when it is a +uppercase wide character; otherwise, it returns the input character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/towupper.rst b/posix-users/newlib/libc/ctype/towupper.rst new file mode 100644 index 0000000..584942c --- /dev/null +++ b/posix-users/newlib/libc/ctype/towupper.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/towupper.c + +.. COMMENT: Generated on: 2018-08-20 + +.. towupper, towupper_l: + +towupper, towupper_l - Translate wide characters to uppercase +-------------------------------------------------------------------- +.. index:: towupper +.. index:: towupper_l +.. index:: translate wide characters to uppercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + wint_t towupper(wint_t c); + + #include <wctype.h> + wint_t towupper_l(wint_t c, locale_t locale); + + + + +**DESCRIPTION:** + +*towupper* is a function which converts lowercase wide characters to +uppercase, leaving all other characters unchanged. + +*towupper_l* is like *towupper* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*towupper*, *towupper_l* return the uppercase equivalent of ``c`` when it is a +lowercase wide character, otherwise, it returns the input character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/wctrans.rst b/posix-users/newlib/libc/ctype/wctrans.rst new file mode 100644 index 0000000..4937c9e --- /dev/null +++ b/posix-users/newlib/libc/ctype/wctrans.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/wctrans.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wctrans, wctrans_l: + +wctrans, wctrans_l - Get wide-character translation type +--------------------------------------------------------------- +.. index:: wctrans +.. index:: wctrans_l +.. index:: get wide-character translation type + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + wctrans_t wctrans(const char *c); + + #include <wctype.h> + wctrans_t wctrans_l(const char *c, locale_t locale); + + + + +**DESCRIPTION:** + +*wctrans* is a function which takes a string ``c`` and gives back +the appropriate wctrans_t type value associated with the string, +if one exists. The following values are guaranteed to be recognized: +"tolower" and "toupper". + +*wctrans_l* is like *wctrans* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wctrans*, *wctrans_l* return 0 and sets *errno* to *EINVAL* if the +given name is invalid. Otherwise, it returns a valid non-zero wctrans_t +value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/ctype/wctype.rst b/posix-users/newlib/libc/ctype/wctype.rst new file mode 100644 index 0000000..d042b30 --- /dev/null +++ b/posix-users/newlib/libc/ctype/wctype.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/ctype/wctype.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wctype, wctype_l: + +wctype, wctype_l - Get wide-character classification type +---------------------------------------------------------------- +.. index:: wctype +.. index:: wctype_l +.. index:: get wide-character classification type + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wctype.h> + wctype_t wctype(const char *c); + + #include <wctype.h> + wctype_t wctype_l(const char *c, locale_t locale); + + + + +**DESCRIPTION:** + +*wctype* is a function which takes a string ``c`` and gives back +the appropriate wctype_t type value associated with the string, +if one exists. The following values are guaranteed to be recognized: +"alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", +"punct", "space", "upper", and "xdigit". + +*wctype_l* is like *wctype* but performs the function based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wctype*, *wctype_l* return 0 and sets *errno* to *EINVAL* if the +given name is invalid. Otherwise, it returns a valid non-zero wctype_t +value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/iconv/lib/iconv.rst b/posix-users/newlib/libc/iconv/lib/iconv.rst new file mode 100644 index 0000000..78f484a --- /dev/null +++ b/posix-users/newlib/libc/iconv/lib/iconv.rst @@ -0,0 +1,84 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/iconv/lib/iconv.c + +.. COMMENT: Generated on: 2018-08-20 + +.. iconv, iconv_open, iconv_close: + +iconv, iconv_open, iconv_close - Charset conversion routines +-------------------------------------------------------------------- +.. index:: iconv +.. index:: iconv_open +.. index:: iconv_close +.. index:: charset conversion routines + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <iconv.h> + iconv_t iconv_open (const char *to, const char *from); + int iconv_close (iconv_t cd); + size_t iconv (iconv_t cd, char **restrict inbuf, + size_t *restrict inbytesleft, + char **restrict outbuf, + size_t *restrict outbytesleft); + + iconv_t _iconv_open_r (struct _reent *rptr, + const char *to, const char *from); + int _iconv_close_r (struct _reent *rptr, iconv_t cd); + size_t _iconv_r (struct _reent *rptr, + iconv_t cd, const char **inbuf, + size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); + + + +**DESCRIPTION:** + +The function *iconv* converts characters from ``in`` which are in one +encoding to characters of another encoding, outputting them to ``out``. +The value ``inleft`` specifies the number of input bytes to convert whereas +the value ``outleft`` specifies the size remaining in the ``out`` buffer. +The conversion descriptor ``cd`` specifies the conversion being performed +and is created via *iconv_open*. + +An *iconv* conversion stops if: the input bytes are exhausted, the output +buffer is full, an invalid input character sequence occurs, or the +conversion specifier is invalid. + +The function *iconv_open* is used to specify a conversion from one +encoding: ``from`` to another: ``to``. The result of the call is +to create a conversion specifier that can be used with *iconv*. + +The function *iconv_close* is used to close a conversion specifier after +it is no longer needed. + +The *_iconv_r*, *_iconv_open_r*, and *_iconv_close_r* functions are +reentrant versions of *iconv*, *iconv_open*, and *iconv_close*, +respectively. An additional reentrancy struct pointer: ``rptr`` is passed +to properly set *errno*. + + + +**STATUS CODES:** + +The *iconv* function returns the number of non-identical conversions +performed. If an error occurs, (size_t)-1 is returned and *errno* +is set appropriately. The values of ``inleft``, ``in``, ``out``, +and ``outleft`` are modified to indicate how much input was processed +and how much output was created. + +The *iconv_open* function returns either a valid conversion specifier +or (iconv_t)-1 to indicate failure. If failure occurs, *errno* is set +appropriately. + +The *iconv_close* function returns 0 on success or -1 on failure. +If failure occurs *errno* is set appropriately. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/locale/duplocale.rst b/posix-users/newlib/libc/locale/duplocale.rst new file mode 100644 index 0000000..08be2d1 --- /dev/null +++ b/posix-users/newlib/libc/locale/duplocale.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/locale/duplocale.c + +.. COMMENT: Generated on: 2018-08-20 + +.. duplocale: + +duplocale - Duplicate a locale object +------------------------------------------ +.. index:: duplocale +.. index:: duplicate a locale object + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <locale.h> + locale_t duplocale(locale_t locobj); + + locale_t _duplocale_r(void *reent, locale_t locobj); + + + +**DESCRIPTION:** + +The *duplocale* function shall create a duplicate copy of the locale +object referenced by the ``locobj`` argument. + +If the ``locobj`` argument is LC_GLOBAL_LOCALE, duplocale() shall create +a new locale object containing a copy of the global locale determined by +the setlocale() function. + +The behavior is undefined if the ``locobj`` argument is not a valid locale +object handle. + + + +**STATUS CODES:** + +Upon successful completion, the *duplocale* function shall return a +handle for a new locale object. Otherwise *duplocale* shall return +(locale_t) *0* and set errno to indicate the error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/locale/freelocale.rst b/posix-users/newlib/libc/locale/freelocale.rst new file mode 100644 index 0000000..08b6840 --- /dev/null +++ b/posix-users/newlib/libc/locale/freelocale.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/locale/freelocale.c + +.. COMMENT: Generated on: 2018-08-20 + +.. freelocale: + +freelocale - Free resources allocated for a locale object +-------------------------------------------------------------- +.. index:: freelocale +.. index:: free resources allocated for a locale object + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <locale.h> + locale_t freelocale(locale_t locobj); + + locale_t _freelocale_r(void *reent, locale_t locobj); + + + +**DESCRIPTION:** + +The *freelocale* function shall cause the resources allocated for a +locale object returned by a call to the *newlocale* or *duplocale* +functions to be released. + +The behavior is undefined if the ``locobj`` argument is the special locale +object LC_GLOBAL_LOCALE or is not a valid locale object handle. + +Any use of a locale object that has been freed results in undefined +behavior. + + + +**STATUS CODES:** + +None. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/locale/locale.rst b/posix-users/newlib/libc/locale/locale.rst new file mode 100644 index 0000000..2f7e0c5 --- /dev/null +++ b/posix-users/newlib/libc/locale/locale.rst @@ -0,0 +1,135 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/locale/locale.c + +.. COMMENT: Generated on: 2018-08-20 + +.. setlocale, localeconv: + +setlocale, localeconv - Select or query locale +---------------------------------------------------- +.. index:: setlocale +.. index:: localeconv +.. index:: select or query locale + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <locale.h> + char *setlocale(int category, const char *locale); + lconv *localeconv(void); + + char *_setlocale_r(void *reent, + int category, const char *locale); + lconv *_localeconv_r(void *reent); + + + +**DESCRIPTION:** + +*setlocale* is the facility defined by ANSI C to condition the +execution environment for international collating and formatting +information; *localeconv* reports on the settings of the current +locale. + +This is a minimal implementation, supporting only the required *"POSIX"* +and *"C"* values for ``locale``; strings representing other locales are not +honored unless _MB_CAPABLE is defined. + +If _MB_CAPABLE is defined, POSIX locale strings are allowed, following +the form + + language[_TERRITORY][.charset][@@modifier] + +*"language"* is a two character string per ISO 639, or, if not available +for a given language, a three character string per ISO 639-3. +*"TERRITORY"* is a country code per ISO 3166. For *"charset"* and +*"modifier"* see below. + +Additionally to the POSIX specifier, the following extension is supported +for backward compatibility with older implementations using newlib: +*"C-charset"*. +Instead of *"C-"*, you can also specify *"C."*. Both variations allow +to specify language neutral locales while using other charsets than ASCII, +for instance *"C.UTF-8"*, which keeps all settings as in the C locale, +but uses the UTF-8 charset. + +The following charsets are recognized: +*"UTF-8"*, *"JIS"*, *"EUCJP"*, *"SJIS"*, *"KOI8-R"*, *"KOI8-U"*, +*"GEORGIAN-PS"*, *"PT154"*, *"TIS-620"*, *"ISO-8859-x"* with +1 <= x <= 16, or *"CPxxx"* with xxx in [437, 720, 737, 775, 850, 852, 855, +857, 858, 862, 866, 874, 932, 1125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, +1257, 1258]. + +Charsets are case insensitive. For instance, *"EUCJP"* and *"eucJP"* +are equivalent. Charset names with dashes can also be written without +dashes, as in *"UTF8"*, *"iso88591"* or *"koi8r"*. *"EUCJP"* and +*"EUCKR"* are also recognized with dash, *"EUC-JP"* and *"EUC-KR"*. + +Full support for all of the above charsets requires that newlib has been +build with multibyte support and support for all ISO and Windows Codepage. +Otherwise all singlebyte charsets are simply mapped to ASCII. Right now, +only newlib for Cygwin is built with full charset support by default. +Under Cygwin, this implementation additionally supports the charsets +*"GBK"*, *"GB2312"*, *"eucCN"*, *"eucKR"*, and *"Big5"*. Cygwin +does not support *"JIS"*. + +Cygwin additionally supports locales from the file +/usr/share/locale/locale.alias. + +(*""* is also accepted; if given, the settings are read from the +corresponding LC_* environment variables and $LANG according to POSIX rules.) + +This implementation also supports the modifiers *"cjknarrow"* and +*"cjkwide"*, which affect how the functions *wcwidth* and *wcswidth* +handle characters from the "CJK Ambiguous Width" category of characters +described at http://www.unicode.org/reports/tr11/#Ambiguous. +These characters have a width of 1 for singlebyte charsets and a width of 2 +for multibyte charsets other than UTF-8. +For UTF-8, their width depends on the language specifier: +it is 2 for *"zh"* (Chinese), *"ja"* (Japanese), and *"ko"* (Korean), +and 1 for everything else. Specifying *"cjknarrow"* or *"cjkwide"* +forces a width of 1 or 2, respectively, independent of charset and language. + +If you use *NULL* as the ``locale`` argument, *setlocale* returns a +pointer to the string representing the current locale. The acceptable +values for ``category`` are defined in `*locale.h*` as macros +beginning with *"LC_"*. + +*localeconv* returns a pointer to a structure (also defined in +`*locale.h*`) describing the locale-specific conventions currently +in effect. + +*_localeconv_r* and *_setlocale_r* are reentrant versions of +*localeconv* and *setlocale* respectively. The extra argument +``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +A successful call to *setlocale* returns a pointer to a string +associated with the specified category for the new locale. The string +returned by *setlocale* is such that a subsequent call using that +string will restore that category (or all categories in case of LC_ALL), +to that state. The application shall not modify the string returned +which may be overwritten by a subsequent call to *setlocale*. +On error, *setlocale* returns *NULL*. + +*localeconv* returns a pointer to a structure of type *lconv*, +which describes the formatting and collating conventions in effect (in +this implementation, always those of the C locale). + + + +**PORTABILITY:** + +ANSI C requires *setlocale*, but the only locale required across all +implementations is the C locale. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/locale/newlocale.rst b/posix-users/newlib/libc/locale/newlocale.rst new file mode 100644 index 0000000..144e6a2 --- /dev/null +++ b/posix-users/newlib/libc/locale/newlocale.rst @@ -0,0 +1,88 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/locale/newlocale.c + +.. COMMENT: Generated on: 2018-08-20 + +.. newlocale: + +newlocale - Create or modify a locale object +------------------------------------------------- +.. index:: newlocale +.. index:: create or modify a locale object + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <locale.h> + locale_t newlocale(int category_mask, const char *locale, + locale_t locobj); + + locale_t _newlocale_r(void *reent, int category_mask, + const char *locale, locale_t locobj); + + + +**DESCRIPTION:** + +The *newlocale* function shall create a new locale object or modify an +existing one. If the base argument is (locale_t) *0*, a new locale +object shall be created. It is unspecified whether the locale object +pointed to by base shall be modified, or freed and a new locale object +created. + +The category_mask argument specifies the locale categories to be set or +modified. Values for category_mask shall be constructed by a +bitwise-inclusive OR of the symbolic constants LC_CTYPE_MASK, +LC_NUMERIC_MASK, LC_TIME_MASK, LC_COLLATE_MASK, LC_MONETARY_MASK, and +LC_MESSAGES_MASK, or any of the other implementation-defined LC_*_MASK +values defined in <locale.h>. + +For each category with the corresponding bit set in category_mask the +data from the locale named by locale shall be used. In the case of +modifying an existing locale object, the data from the locale named by +locale shall replace the existing data within the locale object. If a +completely new locale object is created, the data for all sections not +requested by category_mask shall be taken from the default locale. + +The following preset values of locale are defined for all settings of +category_mask: + +"POSIX" Specifies the minimal environment for C-language translation +called the POSIX locale. + +"C" Equivalent to "POSIX". + +"" Specifies an implementation-defined native environment. This + corresponds to the value of the associated environment variables, + LC_* and LANG; see the Base Definitions volume of POSIX.1‐2008, + Chapter 7, Locale and Chapter 8, Environment Variables. + +If the base argument is not (locale_t) *0* and the *newlocale* +function call succeeds, the contents of base are unspecified. +Applications shall ensure that they stop using base as a locale object +before calling *newlocale*. If the function call fails and the base +argument is not (locale_t) *0*, the contents of base shall remain +valid and unchanged. + +The behavior is undefined if the base argument is the special locale +object LC_GLOBAL_LOCALE, or is not a valid locale object handle and is +not (locale_t) *0*. + + + +**STATUS CODES:** + +Upon successful completion, the *newlocale* function shall return a +handle which the caller may use on subsequent calls to *duplocale*, +*freelocale*, and other functions taking a locale_t argument. + +Upon failure, the *newlocale* function shall return (locale_t) *0* +and set errno to indicate the error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/locale/uselocale.rst b/posix-users/newlib/libc/locale/uselocale.rst new file mode 100644 index 0000000..147515f --- /dev/null +++ b/posix-users/newlib/libc/locale/uselocale.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/locale/uselocale.c + +.. COMMENT: Generated on: 2018-08-20 + +.. uselocale: + +uselocale - Free resources allocated for a locale object +------------------------------------------------------------- +.. index:: uselocale +.. index:: free resources allocated for a locale object + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <locale.h> + locale_t uselocale(locale_t locobj); + + locale_t _uselocale_r(void *reent, locale_t locobj); + + + +**DESCRIPTION:** + +The *uselocale* function shall set the current locale for the current +thread to the locale represented by newloc. + +The value for the newloc argument shall be one of the following: + +1. A value returned by the *newlocale* or *duplocale* functions + +2. The special locale object descriptor LC_GLOBAL_LOCALE + +3. (locale_t) *0* + +Once the *uselocale* function has been called to install a thread-local +locale, the behavior of every interface using data from the current +locale shall be affected for the calling thread. The current locale for +other threads shall remain unchanged. + +If the newloc argument is (locale_t) *0*, the object returned is the +current locale or LC_GLOBAL_LOCALE if there has been no previous call to +*uselocale* for the current thread. + +If the newloc argument is LC_GLOBAL_LOCALE, the thread shall use the +global locale determined by the *setlocale* function. + + + +**STATUS CODES:** + +Upon successful completion, the *uselocale* function shall return the +locale handle from the previous call for the current thread, or +LC_GLOBAL_LOCALE if there was no such previous call. Otherwise, +*uselocale* shall return (locale_t) *0* and set errno to indicate +the error. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/misc/ffs.rst b/posix-users/newlib/libc/misc/ffs.rst new file mode 100644 index 0000000..6912bd5 --- /dev/null +++ b/posix-users/newlib/libc/misc/ffs.rst @@ -0,0 +1,39 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/misc/ffs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ffs: + +ffs - Find first bit set in a word +--------------------------------------- +.. index:: ffs +.. index:: find first bit set in a word + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int ffs(int word); + + + +**DESCRIPTION:** + + +*ffs* returns the first bit set in a word. + + + +**STATUS CODES:** + +*ffs* returns 0 if ``c`` is 0, 1 if ``c`` is odd, 2 if ``c`` is a multiple of +2, etc. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/misc/lock.rst b/posix-users/newlib/libc/misc/lock.rst new file mode 100644 index 0000000..7167a65 --- /dev/null +++ b/posix-users/newlib/libc/misc/lock.rst @@ -0,0 +1,68 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/misc/lock.c + +.. COMMENT: Generated on: 2018-08-20 + +.. __retarget_lock_init, __retarget_lock_init_recursive, __retarget_lock_close, __retarget_lock_close_recursive, __retarget_lock_acquire, __retarget_lock_acquire_recursive, __retarget_lock_try_acquire, __retarget_lock_try_acquire_recursive, __retarget_lock_release, __retarget_lock_release_recursive: + +__retarget_lock_init, __retarget_lock_init_recursive, __retarget_lock_close, __retarget_lock_close_recursive, __retarget_lock_acquire, __retarget_lock_acquire_recursive, __retarget_lock_try_acquire, __retarget_lock_try_acquire_recursive, __retarget_lock_release, __retarget_lock_release_recursive - Locking routines +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: __retarget_lock_init +.. index:: __retarget_lock_init_recursive +.. index:: __retarget_lock_close +.. index:: __retarget_lock_close_recursive +.. index:: __retarget_lock_acquire +.. index:: __retarget_lock_acquire_recursive +.. index:: __retarget_lock_try_acquire +.. index:: __retarget_lock_try_acquire_recursive +.. index:: __retarget_lock_release +.. index:: __retarget_lock_release_recursive +.. index:: locking routines + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <lock.h> + struct __lock __lock___sinit_recursive_mutex; + struct __lock __lock___sfp_recursive_mutex; + struct __lock __lock___atexit_recursive_mutex; + struct __lock __lock___at_quick_exit_mutex; + struct __lock __lock___malloc_recursive_mutex; + struct __lock __lock___env_recursive_mutex; + struct __lock __lock___tz_mutex; + struct __lock __lock___dd_hash_mutex; + struct __lock __lock___arc4random_mutex; + + void __retarget_lock_init (_LOCK_T * lock_ptr); + void __retarget_lock_init_recursive (_LOCK_T * lock_ptr); + void __retarget_lock_close (_LOCK_T lock); + void __retarget_lock_close_recursive (_LOCK_T lock); + void __retarget_lock_acquire (_LOCK_T lock); + void __retarget_lock_acquire_recursive (_LOCK_T lock); + int __retarget_lock_try_acquire (_LOCK_T lock); + int __retarget_lock_try_acquire_recursive (_LOCK_T lock); + void __retarget_lock_release (_LOCK_T lock); + void __retarget_lock_release_recursive (_LOCK_T lock); + + + +**DESCRIPTION:** + +Newlib was configured to allow the target platform to provide the locking +routines and static locks at link time. As such, a dummy default +implementation of these routines and static locks is provided for +single-threaded application to link successfully out of the box on bare-metal +systems. + +For multi-threaded applications the target platform is required to provide +an implementation for @strong{all} these routines and static locks. If some +routines or static locks are missing, the link will fail with doubly defined +symbols. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/misc/unctrl.rst b/posix-users/newlib/libc/misc/unctrl.rst new file mode 100644 index 0000000..c3e45b8 --- /dev/null +++ b/posix-users/newlib/libc/misc/unctrl.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/misc/unctrl.c + +.. COMMENT: Generated on: 2018-08-20 + +.. unctrl: + +unctrl - Get printable representation of a character +--------------------------------------------------------- +.. index:: unctrl +.. index:: get printable representation of a character + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <unctrl.h> + char *unctrl(int c); + int unctrllen(int c); + + + +**DESCRIPTION:** + +*unctrl* is a macro which returns the printable representation of ``c`` +as a string. +*unctrllen* is a macro which returns the length of the printable +representation of ``c``. + + + +**STATUS CODES:** + +*unctrl* returns a string of the printable representation of ``c``. + +*unctrllen* returns the length of the string which is the printable +representation of ``c``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/posix/popen.rst b/posix-users/newlib/libc/posix/popen.rst new file mode 100644 index 0000000..233ca35 --- /dev/null +++ b/posix-users/newlib/libc/posix/popen.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/posix/popen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. popen, pclose: + +popen, pclose - Tie a stream to a command string +------------------------------------------------------ +.. index:: popen +.. index:: pclose +.. index:: tie a stream to a command string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *popen(const char *s, const char *mode); + + int pclose(FILE *f); + + + +**DESCRIPTION:** + +Use *popen* to create a stream to a child process executing a +command string **``s]*> as processed by */bin/sh* on your system. +The argument ``mode`` must start with either `*r*`, where the stream +reads from the child`s *stdout*, or `*w*`, where the stream writes +to the child`s *stdin*. As an extension, ``mode`` may also contain +`*e*` to set the close-on-exec bit of the parent`s file descriptor. +The stream created by *popen* must be closed by *pclose* to avoid +resource leaks. + +Streams created by prior calls to *popen* are not visible in +subsequent *popen* children, regardless of the close-on-exec bit. + +Use ``*system(NULL)*`` to test whether your system has */bin/sh* +available. + + + +**STATUS CODES:** + +*popen* returns a file stream opened with the specified ``mode``, +or *NULL* if a child process could not be created. *pclose* +returns -1 if the stream was not created by *popen* or if the +application used *wait* or similar to steal the status; otherwise +it returns the exit status of the child which can be interpreted +in the same manner as a status obtained by *waitpid*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/posix/posix_spawn.rst b/posix-users/newlib/libc/posix/posix_spawn.rst new file mode 100644 index 0000000..cbfb371 --- /dev/null +++ b/posix-users/newlib/libc/posix/posix_spawn.rst @@ -0,0 +1,72 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/posix/posix_spawn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. posix_spawn, posix_spawnp: + +posix_spawn, posix_spawnp - Spawn a process +------------------------------------------------- +.. index:: posix_spawn +.. index:: posix_spawnp +.. index:: spawn a process + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <spawn.h> + + int posix_spawn(pid_t *pid, const char *path, + const posix_spawn_file_actions_t *file_actions, + const posix_spawnattr_t *attrp, + char *const argv, char *const envp); + int posix_spawnp(pid_t *pid, const char *file, + const posix_spawn_file_actions_t *file_actions, + const posix_spawnattr_t *attrp, + char *const argv, char *const envp); + + + +**DESCRIPTION:** + +Use *posix_spawn* and *posix_spawnp* to create a new child process +from the specified process image file. *argc* is the argument count +and *argv* is an array of argument strings passed to the new program. +*envp* is an array of stings, which are passed as environment to the +new program. + +The *path* argument to *posix_spawn* identifies the new process +image file to execute. The *file* argument to *posix_spawnp* is +used to construct a pathname that identifies the new process image +file by duplicating the actions of the shell in searching for an +executable file if the specified filename does not contain a `*/*` +character. The *file* is sought in the colon-separated list of +directory pathnames specified in the *PATH* environment variable. + +The file descriptors remain open across *posix_spawn* and +*posix_spawnp* except for those marked as close-on-exec. The open +file descriptors in the child process can be modified by the spawn file +actions object pointed to by *file_actions*. + +The spawn attributes object type pointed to by *attrp* argument +may contain any of the attributes defined in *spawn.h*. + + + +**STATUS CODES:** + +*posix_spawn* and *posix_spawnp* return the process ID of the newly +spawned child process in the variable pointed by a non-NULL **``pid]*> +argument and zero as the function return value upon successful +completion. Otherwise, *posix_spawn* and *posix_spawnp* return an +error number as the function return value to indicate the error; the +value stored into the variable pointed to by a non-NULL **``pid]*> +argument is unspecified. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/closer.rst b/posix-users/newlib/libc/reent/closer.rst new file mode 100644 index 0000000..4278ea2 --- /dev/null +++ b/posix-users/newlib/libc/reent/closer.rst @@ -0,0 +1,25 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/closer.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _close_r: + +_close_r - Reentrant version of close +------------------------------------------- +.. index:: _close_r +.. index:: Reentrant version of close + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _close_r(struct _reent *ptr, int fd); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/execr.rst b/posix-users/newlib/libc/reent/execr.rst new file mode 100644 index 0000000..7c2180e --- /dev/null +++ b/posix-users/newlib/libc/reent/execr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/execr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _execve_r: + +_execve_r - Reentrant version of execve +-------------------------------------------- +.. index:: _execve_r +.. index:: Reentrant version of execve + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _execve_r(struct _reent *ptr, const char *name, + char *const argv[], char *const env[]); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/fcntlr.rst b/posix-users/newlib/libc/reent/fcntlr.rst new file mode 100644 index 0000000..f87be3b --- /dev/null +++ b/posix-users/newlib/libc/reent/fcntlr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/fcntlr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _fcntl_r: + +_fcntl_r - Reentrant version of fcntl +------------------------------------------- +.. index:: _fcntl_r +.. index:: Reentrant version of fcntl + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _fcntl_r(struct _reent *ptr, + int fd, int cmd, arg); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/fstat64r.rst b/posix-users/newlib/libc/reent/fstat64r.rst new file mode 100644 index 0000000..b4e0fa7 --- /dev/null +++ b/posix-users/newlib/libc/reent/fstat64r.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/fstat64r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _fstat64_r: + +_fstat64_r - Reentrant version of fstat64 +----------------------------------------------- +.. index:: _fstat64_r +.. index:: Reentrant version of fstat64 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _fstat64_r(struct _reent *ptr, + int fd, struct stat64 *pstat); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/fstatr.rst b/posix-users/newlib/libc/reent/fstatr.rst new file mode 100644 index 0000000..6e1bc69 --- /dev/null +++ b/posix-users/newlib/libc/reent/fstatr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/fstatr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _fstat_r: + +_fstat_r - Reentrant version of fstat +------------------------------------------- +.. index:: _fstat_r +.. index:: Reentrant version of fstat + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _fstat_r(struct _reent *ptr, + int fd, struct stat *pstat); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/gettimeofdayr.rst b/posix-users/newlib/libc/reent/gettimeofdayr.rst new file mode 100644 index 0000000..204a1e3 --- /dev/null +++ b/posix-users/newlib/libc/reent/gettimeofdayr.rst @@ -0,0 +1,28 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/gettimeofdayr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _gettimeofday_r: + +_gettimeofday_r - Reentrant version of gettimeofday +-------------------------------------------------------- +.. index:: _gettimeofday_r +.. index:: Reentrant version of gettimeofday + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + #include <time.h> + int _gettimeofday_r(struct _reent *ptr, + struct timeval *ptimeval, + void *ptimezone); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/isattyr.rst b/posix-users/newlib/libc/reent/isattyr.rst new file mode 100644 index 0000000..4ce7973 --- /dev/null +++ b/posix-users/newlib/libc/reent/isattyr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/isattyr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _isatty_r: + +_isatty_r - Reentrant version of isatty +--------------------------------------------- +.. index:: _isatty_r +.. index:: Reentrant version of isatty + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _isatty_r(struct _reent *ptr, + int fd); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/linkr.rst b/posix-users/newlib/libc/reent/linkr.rst new file mode 100644 index 0000000..f91a502 --- /dev/null +++ b/posix-users/newlib/libc/reent/linkr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/linkr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _link_r: + +_link_r - Reentrant version of link +----------------------------------------- +.. index:: _link_r +.. index:: Reentrant version of link + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _link_r(struct _reent *ptr, + const char *old, const char *new); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/lseek64r.rst b/posix-users/newlib/libc/reent/lseek64r.rst new file mode 100644 index 0000000..667a3aa --- /dev/null +++ b/posix-users/newlib/libc/reent/lseek64r.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/lseek64r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _lseek64_r: + +_lseek64_r - Reentrant version of lseek +--------------------------------------------- +.. index:: _lseek64_r +.. index:: Reentrant version of lseek + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + off64_t _lseek64_r(struct _reent *ptr, + int fd, off64_t pos, int whence); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/lseekr.rst b/posix-users/newlib/libc/reent/lseekr.rst new file mode 100644 index 0000000..511494a --- /dev/null +++ b/posix-users/newlib/libc/reent/lseekr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/lseekr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _lseek_r: + +_lseek_r - Reentrant version of lseek +------------------------------------------- +.. index:: _lseek_r +.. index:: Reentrant version of lseek + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + off_t _lseek_r(struct _reent *ptr, + int fd, off_t pos, int whence); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/mkdirr.rst b/posix-users/newlib/libc/reent/mkdirr.rst new file mode 100644 index 0000000..564a6bf --- /dev/null +++ b/posix-users/newlib/libc/reent/mkdirr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/mkdirr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _mkdir_r: + +_mkdir_r - Reentrant version of mkdir +------------------------------------------- +.. index:: _mkdir_r +.. index:: Reentrant version of mkdir + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _mkdir_r(struct _reent *ptr, + const char *path, int mode); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/open64r.rst b/posix-users/newlib/libc/reent/open64r.rst new file mode 100644 index 0000000..c1e3096 --- /dev/null +++ b/posix-users/newlib/libc/reent/open64r.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/open64r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _open64_r: + +_open64_r - Reentrant version of open64 +--------------------------------------------- +.. index:: _open64_r +.. index:: Reentrant version of open64 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _open64_r(struct _reent *ptr, + const char *file, int flags, int mode); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/openr.rst b/posix-users/newlib/libc/reent/openr.rst new file mode 100644 index 0000000..c1b61f0 --- /dev/null +++ b/posix-users/newlib/libc/reent/openr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/openr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _open_r: + +_open_r - Reentrant version of open +----------------------------------------- +.. index:: _open_r +.. index:: Reentrant version of open + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _open_r(struct _reent *ptr, + const char *file, int flags, int mode); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/readr.rst b/posix-users/newlib/libc/reent/readr.rst new file mode 100644 index 0000000..a854ced --- /dev/null +++ b/posix-users/newlib/libc/reent/readr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/readr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _read_r: + +_read_r - Reentrant version of read +----------------------------------------- +.. index:: _read_r +.. index:: Reentrant version of read + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + _ssize_t _read_r(struct _reent *ptr, + int fd, void *buf, size_t cnt); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/reent.rst b/posix-users/newlib/libc/reent/reent.rst new file mode 100644 index 0000000..642d152 --- /dev/null +++ b/posix-users/newlib/libc/reent/reent.rst @@ -0,0 +1,16 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/reent.c + +.. COMMENT: Generated on: 2018-08-20 + +.. reent: + +reent - Definition of impure data. +---------------------------------------- +.. index:: reent +.. index:: definition of impure data. + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/renamer.rst b/posix-users/newlib/libc/reent/renamer.rst new file mode 100644 index 0000000..ce3c0c6 --- /dev/null +++ b/posix-users/newlib/libc/reent/renamer.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/renamer.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _rename_r: + +_rename_r - Reentrant version of rename +--------------------------------------------- +.. index:: _rename_r +.. index:: Reentrant version of rename + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _rename_r(struct _reent *ptr, + const char *old, const char *new); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/sbrkr.rst b/posix-users/newlib/libc/reent/sbrkr.rst new file mode 100644 index 0000000..93ba4f9 --- /dev/null +++ b/posix-users/newlib/libc/reent/sbrkr.rst @@ -0,0 +1,25 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/sbrkr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _sbrk_r: + +_sbrk_r - Reentrant version of sbrk +----------------------------------------- +.. index:: _sbrk_r +.. index:: Reentrant version of sbrk + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + void *_sbrk_r(struct _reent *ptr, ptrdiff_t incr); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/signalr.rst b/posix-users/newlib/libc/reent/signalr.rst new file mode 100644 index 0000000..0673bda --- /dev/null +++ b/posix-users/newlib/libc/reent/signalr.rst @@ -0,0 +1,25 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/signalr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _kill_r: + +_kill_r - Reentrant version of kill +----------------------------------------- +.. index:: _kill_r +.. index:: Reentrant version of kill + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _kill_r(struct _reent *ptr, int pid, int sig); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/stat64r.rst b/posix-users/newlib/libc/reent/stat64r.rst new file mode 100644 index 0000000..5cf20b6 --- /dev/null +++ b/posix-users/newlib/libc/reent/stat64r.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/stat64r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _stat64_r: + +_stat64_r - Reentrant version of stat64 +--------------------------------------------- +.. index:: _stat64_r +.. index:: Reentrant version of stat64 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _stat64_r(struct _reent *ptr, + const char *file, struct stat64 *pstat); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/statr.rst b/posix-users/newlib/libc/reent/statr.rst new file mode 100644 index 0000000..9b90a86 --- /dev/null +++ b/posix-users/newlib/libc/reent/statr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/statr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _stat_r: + +_stat_r - Reentrant version of stat +----------------------------------------- +.. index:: _stat_r +.. index:: Reentrant version of stat + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _stat_r(struct _reent *ptr, + const char *file, struct stat *pstat); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/timesr.rst b/posix-users/newlib/libc/reent/timesr.rst new file mode 100644 index 0000000..413ee1d --- /dev/null +++ b/posix-users/newlib/libc/reent/timesr.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/timesr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _times_r: + +_times_r - Reentrant version of times +------------------------------------------ +.. index:: _times_r +.. index:: Reentrant version of times + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + #include <sys/times.h> + clock_t _times_r(struct _reent *ptr, struct tms *ptms); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/unlinkr.rst b/posix-users/newlib/libc/reent/unlinkr.rst new file mode 100644 index 0000000..dd804fc --- /dev/null +++ b/posix-users/newlib/libc/reent/unlinkr.rst @@ -0,0 +1,25 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/unlinkr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _unlink_r: + +_unlink_r - Reentrant version of unlink +--------------------------------------------- +.. index:: _unlink_r +.. index:: Reentrant version of unlink + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + int _unlink_r(struct _reent *ptr, const char *file); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/reent/writer.rst b/posix-users/newlib/libc/reent/writer.rst new file mode 100644 index 0000000..f5e1205 --- /dev/null +++ b/posix-users/newlib/libc/reent/writer.rst @@ -0,0 +1,26 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/reent/writer.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _write_r: + +_write_r - Reentrant version of write +------------------------------------------- +.. index:: _write_r +.. index:: Reentrant version of write + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <reent.h> + _ssize_t _write_r(struct _reent *ptr, + int fd, const void *buf, size_t cnt); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/search/bsearch.rst b/posix-users/newlib/libc/search/bsearch.rst new file mode 100644 index 0000000..930455a --- /dev/null +++ b/posix-users/newlib/libc/search/bsearch.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/search/bsearch.c + +.. COMMENT: Generated on: 2018-08-20 + +.. bsearch: + +bsearch - Binary search +--------------------------- +.. index:: bsearch +.. index:: binary search + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void *bsearch(const void *key, const void *base, + size_t nmemb, size_t size, + int (*compar)(const void *, const void *)); + + + +**DESCRIPTION:** + +*bsearch* searches an array beginning at ``base`` for any element +that matches ``key``, using binary search. ``nmemb`` is the element +count of the array; ``size`` is the size of each element. + +The array must be sorted in ascending order with respect to the +comparison function ``compar`` (which you supply as the last argument of +*bsearch*). + +You must define the comparison function *(*``compar``)* to have two +arguments; its result must be negative if the first argument is +less than the second, zero if the two arguments match, and +positive if the first argument is greater than the second (where +``less than`` and ``greater than`` refer to whatever arbitrary +ordering is appropriate). + + + +**STATUS CODES:** + +Returns a pointer to an element of ``array`` that matches ``key``. If +more than one matching element is available, the result may point to +any of them. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/search/qsort.rst b/posix-users/newlib/libc/search/qsort.rst new file mode 100644 index 0000000..efc4826 --- /dev/null +++ b/posix-users/newlib/libc/search/qsort.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/search/qsort.c + +.. COMMENT: Generated on: 2018-08-20 + +.. qsort: + +qsort - Sort an array +------------------------- +.. index:: qsort +.. index:: sort an array + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void qsort(void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *) ); + + + +**DESCRIPTION:** + +*qsort* sorts an array (beginning at ``base``) of ``nmemb`` objects. +``size`` describes the size of each element of the array. + +You must supply a pointer to a comparison function, using the argument +shown as ``compar``. (This permits sorting objects of unknown +properties.) Define the comparison function to accept two arguments, +each a pointer to an element of the array starting at ``base``. The +result of *(*``compar``)* must be negative if the first argument is +less than the second, zero if the two arguments match, and positive if +the first argument is greater than the second (where ``less than`` and +``greater than`` refer to whatever arbitrary ordering is appropriate). + +The array is sorted in place; that is, when *qsort* returns, the +array elements beginning at ``base`` have been reordered. + + + +**STATUS CODES:** + +*qsort* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/search/qsort_r.rst b/posix-users/newlib/libc/search/qsort_r.rst new file mode 100644 index 0000000..dd9d401 --- /dev/null +++ b/posix-users/newlib/libc/search/qsort_r.rst @@ -0,0 +1,61 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/search/qsort_r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. qsort_r: + +qsort_r - Sort an array +--------------------------- +.. index:: qsort_r +.. index:: sort an array + +**CALLING SEQUENCE:** + +.. code-block:: c + + #define _BSD_SOURCE + #include <stdlib.h> + void qsort_r(void *base, size_t nmemb, size_t size, + void *thunk, + int (*compar)(void*, const void *, const void *)); + + #define _GNU_SOURCE + #include <stdlib.h> + void qsort_r(void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *, void *), + void *thunk); + + + +**DESCRIPTION:** + +*qsort_r* sorts an array (beginning at ``base``) of ``nmemb`` objects. +``size`` describes the size of each element of the array. + +You must supply a pointer to a comparison function, using the argument +shown as ``compar``. (This permits sorting objects of unknown +properties.) There are two forms of this function, in each the +comparison function is defined to accept three arguments, but in a +different order. Two are pointers to an element of the array starting at +``base``, and another being an arbitrary pointer ``thunk``. The +result of *(*``compar``)* must be negative if the first argument is +less than the second, zero if the two arguments match, and positive if +the first argument is greater than the second (where ``less than`` and +``greater than`` refer to whatever arbitrary ordering is appropriate). + +The array is sorted in place; that is, when *qsort_r* returns, the +array elements beginning at ``base`` have been reordered. + + + +**STATUS CODES:** + +*qsort_r* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/signal/psignal.rst b/posix-users/newlib/libc/signal/psignal.rst new file mode 100644 index 0000000..84b58c6 --- /dev/null +++ b/posix-users/newlib/libc/signal/psignal.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/signal/psignal.c + +.. COMMENT: Generated on: 2018-08-20 + +.. psignal: + +psignal - Print a signal message on standard error +------------------------------------------------------ +.. index:: psignal +.. index:: print a signal message on standard error + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void psignal(int signal, const char *prefix); + + + +**DESCRIPTION:** + +Use *psignal* to print (on standard error) a signal message +corresponding to the value of the signal number ``signal``. +Unless you use *NULL* as the value of the argument ``prefix``, the +signal message will begin with the string at ``prefix``, followed by a +colon and a space (*: *). The remainder of the signal message is one +of the strings described for *strsignal*. + + + +**STATUS CODES:** + +*psignal* returns no result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/signal/raise.rst b/posix-users/newlib/libc/signal/raise.rst new file mode 100644 index 0000000..2ead2d6 --- /dev/null +++ b/posix-users/newlib/libc/signal/raise.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/signal/raise.c + +.. COMMENT: Generated on: 2018-08-20 + +.. raise: + +raise - Send a signal +------------------------- +.. index:: raise +.. index:: send a signal + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <signal.h> + int raise(int sig); + + int _raise_r(void *reent, int sig); + + + +**DESCRIPTION:** + +Send the signal ``sig`` (one of the macros from `*sys/signal.h*`). +This interrupts your program`s normal flow of execution, and allows a signal +handler (if you`ve defined one, using *signal*) to take control. + +The alternate function *_raise_r* is a reentrant version. The extra +argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +The result is *0* if ``sig`` was successfully raised, *1* +otherwise. However, the return value (since it depends on the normal +flow of execution) may not be visible, unless the signal handler for +``sig`` terminates with a *return* or unless *SIG_IGN* is in +effect for this signal. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/signal/signal.rst b/posix-users/newlib/libc/signal/signal.rst new file mode 100644 index 0000000..58b25f7 --- /dev/null +++ b/posix-users/newlib/libc/signal/signal.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/signal/signal.c + +.. COMMENT: Generated on: 2018-08-20 + +.. signal: + +signal - Specify handler subroutine for a signal +---------------------------------------------------- +.. index:: signal +.. index:: specify handler subroutine for a signal + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <signal.h> + void (*signal(int sig, void(*func)(int))) (int); + + void (*_signal_r(void *reent, int sig, void(*func)(int))) (int); + + + +**DESCRIPTION:** + +*signal* provides a simple signal-handling implementation for embedded +targets. + +*signal* allows you to request changed treatment for a particular +signal ``sig``. You can use one of the predefined macros *SIG_DFL* +(select system default handling) or *SIG_IGN* (ignore this signal) +as the value of ``func``; otherwise, ``func`` is a function pointer +that identifies a subroutine in your program as the handler for this signal. + +Some of the execution environment for signal handlers is +unpredictable; notably, the only library function required to work +correctly from within a signal handler is *signal* itself, and +only when used to redefine the handler for the current signal value. + +Static storage is likewise unreliable for signal handlers, with one +exception: if you declare a static storage location as `*volatile +sig_atomic_t*`, then you may use that location in a signal handler to +store signal values. + +If your signal handler terminates using *return* (or implicit +return), your program`s execution continues at the point +where it was when the signal was raised (whether by your program +itself, or by an external event). Signal handlers can also +use functions such as *exit* and *abort* to avoid returning. + +The alternate function *_signal_r* is the reentrant version. +The extra argument ``reent`` is a pointer to a reentrancy structure. + +@c FIXME: do we have setjmp.h and assoc fns? + + + +**STATUS CODES:** + +If your request for a signal handler cannot be honored, the result is +*SIG_ERR*; a specific error number is also recorded in *errno*. + +Otherwise, the result is the previous handler (a function pointer or +one of the predefined macros). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/clearerr.rst b/posix-users/newlib/libc/stdio/clearerr.rst new file mode 100644 index 0000000..a8ea35c --- /dev/null +++ b/posix-users/newlib/libc/stdio/clearerr.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/clearerr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. clearerr, clearerr_unlocked: + +clearerr, clearerr_unlocked - Clear file or stream error indicator +------------------------------------------------------------------------ +.. index:: clearerr +.. index:: clearerr_unlocked +.. index:: clear file or stream error indicator + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void clearerr(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + void clearerr_unlocked(FILE *fp); + + + +**DESCRIPTION:** + +The *stdio* functions maintain an error indicator with each file +pointer ``fp``, to record whether any read or write errors have +occurred on the associated file or stream. Similarly, it maintains an +end-of-file indicator to record whether there is no more data in the +file. + +Use *clearerr* to reset both of these indicators. + +See *ferror* and *feof* to query the two indicators. + +*clearerr_unlocked* is a non-thread-safe version of *clearerr*. +*clearerr_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*clearerr_unlocked* is equivalent to *clearerr*. + + + +**STATUS CODES:** + +*clearerr* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/diprintf.rst b/posix-users/newlib/libc/stdio/diprintf.rst new file mode 100644 index 0000000..bed0365 --- /dev/null +++ b/posix-users/newlib/libc/stdio/diprintf.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/diprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. diprintf, vdiprintf: + +diprintf, vdiprintf - Print to a file descriptor (integer only) +--------------------------------------------------------------------- +.. index:: diprintf +.. index:: vdiprintf +.. index:: print to a file descriptor (integer only) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int diprintf(int fd, const char *format, ...); + int vdiprintf(int fd, const char *format, va_list ap); + int _diprintf_r(struct _reent *ptr, int fd, + const char *format, ...); + int _vdiprintf_r(struct _reent *ptr, int fd, + const char *format, va_list ap); + + + +**DESCRIPTION:** + +*diprintf* and *vdiprintf* are similar to *dprintf* and *vdprintf*, +except that only integer format specifiers are processed. + +The functions *_diprintf_r* and *_vdiprintf_r* are simply +reentrant versions of the functions above. + + + +**STATUS CODES:** + +Similar to *dprintf* and *vdprintf*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/dprintf.rst b/posix-users/newlib/libc/stdio/dprintf.rst new file mode 100644 index 0000000..9399890 --- /dev/null +++ b/posix-users/newlib/libc/stdio/dprintf.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/dprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. dprintf, vdprintf: + +dprintf, vdprintf - Print to a file descriptor +---------------------------------------------------- +.. index:: dprintf +.. index:: vdprintf +.. index:: print to a file descriptor + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int dprintf(int fd, const char *restrict format, ...); + int vdprintf(int fd, const char *restrict format, + va_list ap); + int _dprintf_r(struct _reent *ptr, int fd, + const char *restrict format, ...); + int _vdprintf_r(struct _reent *ptr, int fd, + const char *restrict format, va_list ap); + + + +**DESCRIPTION:** + +*dprintf* and *vdprintf* allow printing a format, similarly to +*printf*, but write to a file descriptor instead of to a *FILE* +stream. + +The functions *_dprintf_r* and *_vdprintf_r* are simply +reentrant versions of the functions above. + + + +**STATUS CODES:** + +The return value and errors are exactly as for *write*, except that +*errno* may also be set to *ENOMEM* if the heap is exhausted. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fclose.rst b/posix-users/newlib/libc/stdio/fclose.rst new file mode 100644 index 0000000..80463a4 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fclose.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fclose.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fclose: + +fclose - Close a file +------------------------- +.. index:: fclose +.. index:: close a file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fclose(FILE *fp); + int _fclose_r(struct _reent *reent, FILE *fp); + + + +**DESCRIPTION:** + +If the file or stream identified by ``fp`` is open, *fclose* closes +it, after first ensuring that any pending data is written (by calling +*fflush(``fp``)*). + +The alternate function *_fclose_r* is a reentrant version. +The extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*fclose* returns *0* if successful (including when ``fp`` is +*NULL* or not an open file); otherwise, it returns *EOF*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fcloseall.rst b/posix-users/newlib/libc/stdio/fcloseall.rst new file mode 100644 index 0000000..cec72f8 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fcloseall.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fcloseall.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fcloseall: + +fcloseall - Close all files +------------------------------- +.. index:: fcloseall +.. index:: close all files + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fcloseall(void); + int _fcloseall_r (struct _reent *ptr); + + + +**DESCRIPTION:** + +*fcloseall* closes all files in the current reentrancy struct`s domain. +The function *_fcloseall_r* is the same function, except the reentrancy +struct is passed in as the ``ptr`` argument. + +This function is not recommended as it closes all streams, including +the std streams. + + + +**STATUS CODES:** + +*fclose* returns *0* if all closes are successful. Otherwise, +EOF is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fdopen.rst b/posix-users/newlib/libc/stdio/fdopen.rst new file mode 100644 index 0000000..ec7e1b1 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fdopen.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fdopen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fdopen: + +fdopen - Turn open file into a stream +----------------------------------------- +.. index:: fdopen +.. index:: turn open file into a stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fdopen(int fd, const char *mode); + FILE *_fdopen_r(struct _reent *reent, + int fd, const char *mode); + + + +**DESCRIPTION:** + +*fdopen* produces a file descriptor of type *FILE **, from a +descriptor for an already-open file (returned, for example, by the +system subroutine *open* rather than by *fopen*). +The ``mode`` argument has the same meanings as in *fopen*. + + + +**STATUS CODES:** + +File pointer or *NULL*, as for *fopen*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/feof.rst b/posix-users/newlib/libc/stdio/feof.rst new file mode 100644 index 0000000..d2688d2 --- /dev/null +++ b/posix-users/newlib/libc/stdio/feof.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/feof.c + +.. COMMENT: Generated on: 2018-08-20 + +.. feof, feof_unlocked: + +feof, feof_unlocked - Test for end of file +------------------------------------------------ +.. index:: feof +.. index:: feof_unlocked +.. index:: test for end of file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int feof(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int feof_unlocked(FILE *fp); + + + +**DESCRIPTION:** + +*feof* tests whether or not the end of the file identified by ``fp`` +has been reached. + +*feof_unlocked* is a non-thread-safe version of *feof*. +*feof_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*feof_unlocked* is equivalent to *feof*. + + + +**STATUS CODES:** + +*feof* returns *0* if the end of file has not yet been reached; if +at end of file, the result is nonzero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/ferror.rst b/posix-users/newlib/libc/stdio/ferror.rst new file mode 100644 index 0000000..f4d7870 --- /dev/null +++ b/posix-users/newlib/libc/stdio/ferror.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/ferror.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ferror, ferror_unlocked: + +ferror, ferror_unlocked - Test whether read/write error has occurred +-------------------------------------------------------------------------- +.. index:: ferror +.. index:: ferror_unlocked +.. index:: test whether read/write error has occurred + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int ferror(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int ferror_unlocked(FILE *fp); + + + +**DESCRIPTION:** + +The *stdio* functions maintain an error indicator with each file +pointer ``fp``, to record whether any read or write errors have +occurred on the associated file or stream. +Use *ferror* to query this indicator. + +See *clearerr* to reset the error indicator. + +*ferror_unlocked* is a non-thread-safe version of *ferror*. +*ferror_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*ferror_unlocked* is equivalent to *ferror*. + + + +**STATUS CODES:** + +*ferror* returns *0* if no errors have occurred; it returns a +nonzero value otherwise. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fflush.rst b/posix-users/newlib/libc/stdio/fflush.rst new file mode 100644 index 0000000..c463215 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fflush.rst @@ -0,0 +1,75 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fflush.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fflush, fflush_unlocked: + +fflush, fflush_unlocked - Flush buffered file output +---------------------------------------------------------- +.. index:: fflush +.. index:: fflush_unlocked +.. index:: flush buffered file output + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fflush(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int fflush_unlocked(FILE *fp); + + #include <stdio.h> + int _fflush_r(struct _reent *reent, FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int _fflush_unlocked_r(struct _reent *reent, FILE *fp); + + + +**DESCRIPTION:** + +The *stdio* output functions can buffer output before delivering it +to the host system, in order to minimize the overhead of system calls. + +Use *fflush* to deliver any such pending output (for the file +or stream identified by ``fp``) to the host system. + +If ``fp`` is *NULL*, *fflush* delivers pending output from all +open files. + +Additionally, if ``fp`` is a seekable input stream visiting a file +descriptor, set the position of the file descriptor to match next +unread byte, useful for obeying POSIX semantics when ending a process +without consuming all input from the stream. + +*fflush_unlocked* is a non-thread-safe version of *fflush*. +*fflush_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fflush_unlocked* is equivalent to *fflush*. + +The alternate functions *_fflush_r* and *_fflush_unlocked_r* are +reentrant versions, where the extra argument ``reent`` is a pointer to +a reentrancy structure, and ``fp`` must not be NULL. + + + +**STATUS CODES:** + +*fflush* returns *0* unless it encounters a write error; in that +situation, it returns *EOF*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fgetc.rst b/posix-users/newlib/libc/stdio/fgetc.rst new file mode 100644 index 0000000..e3cbdae --- /dev/null +++ b/posix-users/newlib/libc/stdio/fgetc.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fgetc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgetc, fgetc_unlocked: + +fgetc, fgetc_unlocked - Get a character from a file or stream +------------------------------------------------------------------- +.. index:: fgetc +.. index:: fgetc_unlocked +.. index:: get a character from a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fgetc(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int fgetc_unlocked(FILE *fp); + + #include <stdio.h> + int _fgetc_r(struct _reent *ptr, FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int _fgetc_unlocked_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +Use *fgetc* to get the next single character from the file or stream +identified by ``fp``. As a side effect, *fgetc* advances the file`s +current position indicator. + +For a macro version of this function, see *getc*. + +*fgetc_unlocked* is a non-thread-safe version of *fgetc*. +*fgetc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fgetc_unlocked* is equivalent to *fgetc*. + +The functions *_fgetc_r* and *_fgetc_unlocked_r* are simply reentrant +versions that are passed the additional reentrant structure pointer +argument: ``ptr``. + + + +**STATUS CODES:** + +The next character (read as an *unsigned char*, and cast to +*int*), unless there is no more data, or the host system reports a +read error; in either of these situations, *fgetc* returns *EOF*. + +You can distinguish the two situations that cause an *EOF* result by +using the *ferror* and *feof* functions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fgetpos.rst b/posix-users/newlib/libc/stdio/fgetpos.rst new file mode 100644 index 0000000..63dbbf9 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fgetpos.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fgetpos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgetpos: + +fgetpos - Record position in a stream or file +------------------------------------------------- +.. index:: fgetpos +.. index:: record position in a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fgetpos(FILE *restrict fp, fpos_t *restrict pos); + int _fgetpos_r(struct _reent *ptr, FILE *restrict fp, fpos_t *restrict pos); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fgetpos* to report on the current position for a file +identified by ``fp``; *fgetpos* will write a value +representing that position at **``pos]*>. Later, you can +use this value with *fsetpos* to return the file to this +position. + +In the current implementation, *fgetpos* simply uses a character +count to represent the file position; this is the same number that +would be returned by *ftell*. + + + +**STATUS CODES:** + +*fgetpos* returns *0* when successful. If *fgetpos* fails, the +result is *1*. Failure occurs on streams that do not support +positioning; the global *errno* indicates this condition with the +value *ESPIPE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fgets.rst b/posix-users/newlib/libc/stdio/fgets.rst new file mode 100644 index 0000000..f8ddd2d --- /dev/null +++ b/posix-users/newlib/libc/stdio/fgets.rst @@ -0,0 +1,66 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fgets.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgets, fgets_unlocked: + +fgets, fgets_unlocked - Get character string from a file or stream +------------------------------------------------------------------------ +.. index:: fgets +.. index:: fgets_unlocked +.. index:: get character string from a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + char *fgets(char *restrict buf, int n, FILE *restrict fp); + + #define _GNU_SOURCE + #include <stdio.h> + char *fgets_unlocked(char *restrict buf, int n, FILE *restrict fp); + + #include <stdio.h> + char *_fgets_r(struct _reent *ptr, char *restrict buf, int n, FILE *restrict fp); + + #include <stdio.h> + char *_fgets_unlocked_r(struct _reent *ptr, char *restrict buf, int n, FILE *restrict fp); + + + +**DESCRIPTION:** + + Reads at most ``n-1`` characters from ``fp`` until a newline + is found. The characters including to the newline are stored + in ``buf``. The buffer is terminated with a 0. + + *fgets_unlocked* is a non-thread-safe version of *fgets*. + *fgets_unlocked* may only safely be used within a scope + protected by flockfile() (or ftrylockfile()) and funlockfile(). This + function may safely be used in a multi-threaded program if and only + if they are called while the invoking thread owns the (FILE *) + object, as is the case after a successful call to the flockfile() or + ftrylockfile() functions. If threads are disabled, then + *fgets_unlocked* is equivalent to *fgets*. + + The functions *_fgets_r* and *_fgets_unlocked_r* are simply + reentrant versions that are passed the additional reentrant structure + pointer argument: ``ptr``. + + + +**STATUS CODES:** + + *fgets* returns the buffer passed to it, with the data + filled in. If end of file occurs with some data already + accumulated, the data is returned with no other indication. If + no data are read, NULL is returned instead. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fgetwc.rst b/posix-users/newlib/libc/stdio/fgetwc.rst new file mode 100644 index 0000000..0ee6ba1 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fgetwc.rst @@ -0,0 +1,95 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fgetwc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgetwc, getwc, fgetwc_unlocked, getwc_unlocked: + +fgetwc, getwc, fgetwc_unlocked, getwc_unlocked - Get a wide character from a file or stream +----------------------------------------------------------------------------------------------------- +.. index:: fgetwc +.. index:: getwc +.. index:: fgetwc_unlocked +.. index:: getwc_unlocked +.. index:: get a wide character from a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <wchar.h> + wint_t fgetwc(FILE *fp); + + #define _GNU_SOURCE + #include <stdio.h> + #include <wchar.h> + wint_t fgetwc_unlocked(FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _fgetwc_r(struct _reent *ptr, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _fgetwc_unlocked_r(struct _reent *ptr, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t getwc(FILE *fp); + + #define _GNU_SOURCE + #include <stdio.h> + #include <wchar.h> + wint_t getwc_unlocked(FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _getwc_r(struct _reent *ptr, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _getwc_unlocked_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +Use *fgetwc* to get the next wide character from the file or stream +identified by ``fp``. As a side effect, *fgetwc* advances the file`s +current position indicator. + +*fgetwc_unlocked* is a non-thread-safe version of *fgetwc*. +*fgetwc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fgetwc_unlocked* is equivalent to *fgetwc*. + +The *getwc* and *getwc_unlocked* functions or macros functions identically +to *fgetwc* and *fgetwc_unlocked*. It may be implemented as a macro, and +may evaluate its argument more than once. There is no reason ever to use it. + +*_fgetwc_r*, *_getwc_r*, *_fgetwc_unlocked_r*, and *_getwc_unlocked_r* +are simply reentrant versions of the above functions that are passed the +additional reentrant structure pointer argument: ``ptr``. + + + +**STATUS CODES:** + +The next wide character cast to *wint_t*, unless there is no more data, +or the host system reports a read error; in either of these situations, +*fgetwc* and *getwc* return *WEOF*. + +You can distinguish the two situations that cause an *EOF* result by +using the *ferror* and *feof* functions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fgetws.rst b/posix-users/newlib/libc/stdio/fgetws.rst new file mode 100644 index 0000000..2d12cba --- /dev/null +++ b/posix-users/newlib/libc/stdio/fgetws.rst @@ -0,0 +1,70 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fgetws.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgetws, fgetws_unlocked: + +fgetws, fgetws_unlocked - Get wide character string from a file or stream +------------------------------------------------------------------------------- +.. index:: fgetws +.. index:: fgetws_unlocked +.. index:: get wide character string from a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *fgetws(wchar_t *__restrict ws, int n, + FILE *__restrict fp); + + #define _GNU_SOURCE + #include <wchar.h> + wchar_t *fgetws_unlocked(wchar_t *__restrict ws, int n, + FILE *__restrict fp); + + #include <wchar.h> + wchar_t *_fgetws_r(struct _reent *ptr, wchar_t *ws, + int n, FILE *fp); + + #include <wchar.h> + wchar_t *_fgetws_unlocked_r(struct _reent *ptr, wchar_t *ws, + int n, FILE *fp); + + + +**DESCRIPTION:** + +Reads at most ``n-1`` wide characters from ``fp`` until a newline +is found. The wide characters including to the newline are stored +in ``ws``. The buffer is terminated with a 0. + +*fgetws_unlocked* is a non-thread-safe version of *fgetws*. +*fgetws_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fgetws_unlocked* is equivalent to *fgetws*. + +The *_fgetws_r* and *_fgetws_unlocked_r* functions are simply reentrant +version of the above and are passed an additional reentrancy structure +pointer: ``ptr``. + + + +**STATUS CODES:** + +*fgetws* returns the buffer passed to it, with the data +filled in. If end of file occurs with some data already +accumulated, the data is returned with no other indication. If +no data are read, NULL is returned instead. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fileno.rst b/posix-users/newlib/libc/stdio/fileno.rst new file mode 100644 index 0000000..6764140 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fileno.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fileno.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fileno, fileno_unlocked: + +fileno, fileno_unlocked - Return file descriptor associated with stream +----------------------------------------------------------------------------- +.. index:: fileno +.. index:: fileno_unlocked +.. index:: return file descriptor associated with stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fileno(FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int fileno_unlocked(FILE *fp); + + + +**DESCRIPTION:** + +You can use *fileno* to return the file descriptor identified by ``fp``. + +*fileno_unlocked* is a non-thread-safe version of *fileno*. +*fileno_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fileno_unlocked* is equivalent to *fileno*. + + + +**STATUS CODES:** + +*fileno* returns a non-negative integer when successful. +If ``fp`` is not an open stream, *fileno* returns -1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fmemopen.rst b/posix-users/newlib/libc/stdio/fmemopen.rst new file mode 100644 index 0000000..c022163 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fmemopen.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fmemopen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fmemopen: + +fmemopen - Open a stream around a fixed-length string +--------------------------------------------------------- +.. index:: fmemopen +.. index:: open a stream around a fixed-length string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fmemopen(void *restrict buf, size_t size, + const char *restrict mode); + + + +**DESCRIPTION:** + +*fmemopen* creates a seekable *FILE* stream that wraps a +fixed-length buffer of ``size`` bytes starting at ``buf``. The stream +is opened with ``mode`` treated as in *fopen*, where append mode +starts writing at the first NUL byte. If ``buf`` is NULL, then +``size`` bytes are automatically provided as if by *malloc*, with +the initial size of 0, and ``mode`` must contain *+* so that data +can be read after it is written. + +The stream maintains a current position, which moves according to +bytes read or written, and which can be one past the end of the array. +The stream also maintains a current file size, which is never greater +than ``size``. If ``mode`` starts with *r*, the position starts at +*0*, and file size starts at ``size`` if ``buf`` was provided. If +``mode`` starts with *w*, the position and file size start at *0*, +and if ``buf`` was provided, the first byte is set to NUL. If +``mode`` starts with *a*, the position and file size start at the +location of the first NUL byte, or else ``size`` if ``buf`` was +provided. + +When reading, NUL bytes have no significance, and reads cannot exceed +the current file size. When writing, the file size can increase up to +``size`` as needed, and NUL bytes may be embedded in the stream (see +*open_memstream* for an alternative that automatically enlarges the +buffer). When the stream is flushed or closed after a write that +changed the file size, a NUL byte is written at the current position +if there is still room; if the stream is not also open for reading, a +NUL byte is additionally written at the last byte of ``buf`` when the +stream has exceeded ``size``, so that a write-only ``buf`` is always +NUL-terminated when the stream is flushed or closed (and the initial +``size`` should take this into account). It is not possible to seek +outside the bounds of ``size``. A NUL byte written during a flush is +restored to its previous value when seeking elsewhere in the string. + + + +**STATUS CODES:** + +The return value is an open FILE pointer on success. On error, +*NULL* is returned, and *errno* will be set to EINVAL if ``size`` +is zero or ``mode`` is invalid, ENOMEM if ``buf`` was NULL and memory +could not be allocated, or EMFILE if too many streams are already +open. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fopen.rst b/posix-users/newlib/libc/stdio/fopen.rst new file mode 100644 index 0000000..b207740 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fopen.rst @@ -0,0 +1,94 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fopen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fopen: + +fopen - Open a file +----------------------- +.. index:: fopen +.. index:: open a file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fopen(const char *file, const char *mode); + + FILE *_fopen_r(struct _reent *reent, + const char *file, const char *mode); + + + +**DESCRIPTION:** + +*fopen* initializes the data structures needed to read or write a +file. Specify the file`s name as the string at ``file``, and the kind +of access you need to the file with the string at ``mode``. + +The alternate function *_fopen_r* is a reentrant version. +The extra argument ``reent`` is a pointer to a reentrancy structure. + +Three fundamental kinds of access are available: read, write, and append. +**``mode]*> must begin with one of the three characters `*r*`, +`*w*`, or `*a*`, to select one of these: + +o+ +o r +Open the file for reading; the operation will fail if the file does +not exist, or if the host system does not permit you to read it. + +o w +Open the file for writing @emph{from the beginning} of the file: +effectively, this always creates a new file. If the file whose name you +specified already existed, its old contents are discarded. + +o a +Open the file for appending data, that is writing from the end of +file. When you open a file this way, all data always goes to the +current end of file; you cannot change this using *fseek*. +o- + +Some host systems distinguish between ``binary`` and ``text`` files. +Such systems may perform data transformations on data written to, or +read from, files opened as ``text``. +If your system is one of these, then you can append a `*b*` to any +of the three modes above, to specify that you are opening the file as +a binary file (the default is to open the file as a text file). + +`*rb*`, then, means ``read binary``; `*wb*`, ``write binary``; and +`*ab*`, ``append binary``. + +To make C programs more portable, the `*b*` is accepted on all +systems, whether or not it makes a difference. + +Finally, you might need to both read and write from the same file. +You can also append a `*+*` to any of the three modes, to permit +this. (If you want to append both `*b*` and `*+*`, you can do it +in either order: for example, *"rb+"* means the same thing as +*"r+b"* when used as a mode string.) + +Use *"r+"* (or *"rb+"*) to permit reading and writing anywhere in +an existing file, without discarding any data; *"w+"* (or *"wb+"*) +to create a new file (or begin by discarding all data from an old one) +that permits reading and writing anywhere in it; and *"a+"* (or +*"ab+"*) to permit reading anywhere in an existing file, but writing +only at the end. + + + +**STATUS CODES:** + +*fopen* returns a file pointer which you can use for other file +operations, unless the file you requested could not be opened; in that +situation, the result is *NULL*. If the reason for failure was an +invalid string at ``mode``, *errno* is set to *EINVAL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fopencookie.rst b/posix-users/newlib/libc/stdio/fopencookie.rst new file mode 100644 index 0000000..0b9f6f2 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fopencookie.rst @@ -0,0 +1,92 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fopencookie.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fopencookie: + +fopencookie - Open a stream with custom callbacks +----------------------------------------------------- +.. index:: fopencookie +.. index:: open a stream with custom callbacks + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fopencookie(const void *cookie, const char *mode, + cookie_io_functions_t functions); + + + +**DESCRIPTION:** + +*fopencookie* creates a *FILE* stream where I/O is performed using +custom callbacks. The callbacks are registered via the structure: + + typedef ssize_t (*cookie_read_function_t)(void *_cookie, char *_buf, + size_t _n); + typedef ssize_t (*cookie_write_function_t)(void *_cookie, + const char *_buf, size_t _n); + typedef int (*cookie_seek_function_t)(void *_cookie, off_t *_off, + int _whence); + typedef int (*cookie_close_function_t)(void *_cookie); + +. typedef struct +. { +. cookie_read_function_t *read; +. cookie_write_function_t *write; +. cookie_seek_function_t *seek; +. cookie_close_function_t *close; +. } cookie_io_functions_t; + +The stream is opened with ``mode`` treated as in *fopen*. The +callbacks ``functions.read`` and ``functions.write`` may only be NULL +when ``mode`` does not require them. + +``functions.read`` should return -1 on failure, or else the number of +bytes read (0 on EOF). It is similar to *read*, except that +``cookie`` will be passed as the first argument. + +``functions.write`` should return -1 on failure, or else the number of +bytes written. It is similar to *write*, except that ``cookie`` +will be passed as the first argument. + +``functions.seek`` should return -1 on failure, and 0 on success, with +*``_off`` set to the current file position. It is a cross between +*lseek* and *fseek*, with the ``_whence`` argument interpreted in +the same manner. A NULL ``functions.seek`` makes the stream behave +similarly to a pipe in relation to stdio functions that require +positioning. + +``functions.close`` should return -1 on failure, or 0 on success. It +is similar to *close*, except that ``cookie`` will be passed as the +first argument. A NULL ``functions.close`` merely flushes all data +then lets *fclose* succeed. A failed close will still invalidate +the stream. + +Read and write I/O functions are allowed to change the underlying +buffer on fully buffered or line buffered streams by calling +*setvbuf*. They are also not required to completely fill or empty +the buffer. They are not, however, allowed to change streams from +unbuffered to buffered or to change the state of the line buffering +flag. They must also be prepared to have read or write calls occur on +buffers other than the one most recently specified. + + + +**STATUS CODES:** + +The return value is an open FILE pointer on success. On error, +*NULL* is returned, and *errno* will be set to EINVAL if a +function pointer is missing or ``mode`` is invalid, ENOMEM if the +stream cannot be created, or EMFILE if too many streams are already +open. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fpurge.rst b/posix-users/newlib/libc/stdio/fpurge.rst new file mode 100644 index 0000000..0ce188f --- /dev/null +++ b/posix-users/newlib/libc/stdio/fpurge.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fpurge.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fpurge: + +fpurge - Discard pending file i/o +------------------------------------- +.. index:: fpurge +.. index:: discard pending file I/O + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fpurge(FILE *fp); + + int _fpurge_r(struct _reent *reent, FILE *fp); + + #include <stdio.h> + #include <stdio_ext.h> + void __fpurge(FILE *fp); + + + + +**DESCRIPTION:** + +Use *fpurge* to clear all buffers of the given stream. For output +streams, this discards data not yet written to disk. For input streams, +this discards any data from *ungetc* and any data retrieved from disk +but not yet read via *getc*. This is more severe than *fflush*, +and generally is only needed when manually altering the underlying file +descriptor of a stream. + +*__fpurge* behaves exactly like *fpurge* but does not return a value. + +The alternate function *_fpurge_r* is a reentrant version, where the +extra argument ``reent`` is a pointer to a reentrancy structure, and +``fp`` must not be NULL. + + + +**STATUS CODES:** + +*fpurge* returns *0* unless ``fp`` is not valid, in which case it +returns *EOF* and sets *errno*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fputc.rst b/posix-users/newlib/libc/stdio/fputc.rst new file mode 100644 index 0000000..91bde82 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fputc.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fputc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fputc, fputc_unlocked: + +fputc, fputc_unlocked - Write a character on a stream or file +------------------------------------------------------------------- +.. index:: fputc +.. index:: fputc_unlocked +.. index:: write a character on a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fputc(int ch, FILE *fp); + + #define _BSD_SOURCE + #include <stdio.h> + int fputc_unlocked(int ch, FILE *fp); + + #include <stdio.h> + int _fputc_r(struct _rent *ptr, int ch, FILE *fp); + + #include <stdio.h> + int _fputc_unlocked_r(struct _rent *ptr, int ch, FILE *fp); + + + +**DESCRIPTION:** + +*fputc* converts the argument ``ch`` from an *int* to an +*unsigned char*, then writes it to the file or stream identified by +``fp``. + +If the file was opened with append mode (or if the stream cannot +support positioning), then the new character goes at the end of the +file or stream. Otherwise, the new character is written at the +current value of the position indicator, and the position indicator +oadvances by one. + +For a macro version of this function, see *putc*. + +*fputc_unlocked* is a non-thread-safe version of *fputc*. +*fputc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fputc_unlocked* is equivalent to *fputc*. + +The *_fputc_r* and *_fputc_unlocked_r* functions are simply reentrant +versions of the above that take an additional reentrant structure +argument: ``ptr``. + + + +**STATUS CODES:** + +If successful, *fputc* returns its argument ``ch``. If an error +intervenes, the result is *EOF*. You can use `*ferror(``fp``)*` to +query for errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fputs.rst b/posix-users/newlib/libc/stdio/fputs.rst new file mode 100644 index 0000000..1abbfa2 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fputs.rst @@ -0,0 +1,61 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fputs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fputs, fputs_unlocked: + +fputs, fputs_unlocked - Write a character string in a file or stream +-------------------------------------------------------------------------- +.. index:: fputs +.. index:: fputs_unlocked +.. index:: write a character string in a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fputs(const char *restrict s, FILE *restrict fp); + + #define _GNU_SOURCE + #include <stdio.h> + int fputs_unlocked(const char *restrict s, FILE *restrict fp); + + #include <stdio.h> + int _fputs_r(struct _reent *ptr, const char *restrict s, FILE *restrict fp); + + #include <stdio.h> + int _fputs_unlocked_r(struct _reent *ptr, const char *restrict s, FILE *restrict fp); + + + +**DESCRIPTION:** + +*fputs* writes the string at ``s`` (but without the trailing null) +to the file or stream identified by ``fp``. + +*fputs_unlocked* is a non-thread-safe version of *fputs*. +*fputs_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fputs_unlocked* is equivalent to *fputs*. + +*_fputs_r* and *_fputs_unlocked_r* are simply reentrant versions of the +above that take an additional reentrant struct pointer argument: ``ptr``. + + + +**STATUS CODES:** + +If successful, the result is *0*; otherwise, the result is *EOF*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fputwc.rst b/posix-users/newlib/libc/stdio/fputwc.rst new file mode 100644 index 0000000..c9f2687 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fputwc.rst @@ -0,0 +1,97 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fputwc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fputwc, putwc, fputwc_unlocked, putwc_unlocked: + +fputwc, putwc, fputwc_unlocked, putwc_unlocked - Write a wide character on a stream or file +----------------------------------------------------------------------------------------------------- +.. index:: fputwc +.. index:: putwc +.. index:: fputwc_unlocked +.. index:: putwc_unlocked +.. index:: write a wide character on a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <wchar.h> + wint_t fputwc(wchar_t wc, FILE *fp); + + #define _GNU_SOURCE + #include <stdio.h> + #include <wchar.h> + wint_t fputwc_unlocked(wchar_t wc, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _fputwc_r(struct _reent *ptr, wchar_t wc, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _fputwc_unlocked_r(struct _reent *ptr, wchar_t wc, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t putwc(wchar_t wc, FILE *fp); + + #define _GNU_SOURCE + #include <stdio.h> + #include <wchar.h> + wint_t putwc_unlocked(wchar_t wc, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _putwc_r(struct _reent *ptr, wchar_t wc, FILE *fp); + + #include <stdio.h> + #include <wchar.h> + wint_t _putwc_unlocked_r(struct _reent *ptr, wchar_t wc, FILE *fp); + + + +**DESCRIPTION:** + +*fputwc* writes the wide character argument ``wc`` to the file or +stream identified by ``fp``. + +If the file was opened with append mode (or if the stream cannot +support positioning), then the new wide character goes at the end of the +file or stream. Otherwise, the new wide character is written at the +current value of the position indicator, and the position indicator +oadvances by one. + +*fputwc_unlocked* is a non-thread-safe version of *fputwc*. +*fputwc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fputwc_unlocked* is equivalent to *fputwc*. + +The *putwc* and *putwc_unlocked* functions or macros function identically +to *fputwc* and *fputwc_unlocked*. They may be implemented as a macro, and +may evaluate its argument more than once. There is no reason ever to use them. + +The *_fputwc_r*, *_putwc_r*, *_fputwc_unlocked_r*, and +*_putwc_unlocked_r* functions are simply reentrant versions of the above +that take an additional reentrant structure argument: ``ptr``. + + + +**STATUS CODES:** + +If successful, *fputwc* and *putwc* return their argument ``wc``. +If an error intervenes, the result is *EOF*. You can use +`*ferror(``fp``)*` to query for errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fputws.rst b/posix-users/newlib/libc/stdio/fputws.rst new file mode 100644 index 0000000..67eddf5 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fputws.rst @@ -0,0 +1,64 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fputws.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fputws, fputws_unlocked: + +fputws, fputws_unlocked - Write a wide character string in a file or stream +--------------------------------------------------------------------------------- +.. index:: fputws +.. index:: fputws_unlocked +.. index:: write a wide character string in a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int fputws(const wchar_t *__restrict ws, FILE *__restrict fp); + + #define _GNU_SOURCE + #include <wchar.h> + int fputws_unlocked(const wchar_t *__restrict ws, FILE *__restrict fp); + + #include <wchar.h> + int _fputws_r(struct _reent *ptr, const wchar_t *ws, + FILE *fp); + + #include <wchar.h> + int _fputws_unlocked_r(struct _reent *ptr, const wchar_t *ws, + FILE *fp); + + + +**DESCRIPTION:** + +*fputws* writes the wide character string at ``ws`` (but without the +trailing null) to the file or stream identified by ``fp``. + +*fputws_unlocked* is a non-thread-safe version of *fputws*. +*fputws_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fputws_unlocked* is equivalent to *fputws*. + +*_fputws_r* and *_fputws_unlocked_r* are simply reentrant versions of the +above that take an additional reentrant struct pointer argument: ``ptr``. + + + +**STATUS CODES:** + +If successful, the result is a non-negative integer; otherwise, the result +is *-1* to indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fread.rst b/posix-users/newlib/libc/stdio/fread.rst new file mode 100644 index 0000000..f63454d --- /dev/null +++ b/posix-users/newlib/libc/stdio/fread.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fread.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fread, fread_unlocked: + +fread, fread_unlocked - Read array elements from a file +------------------------------------------------------------- +.. index:: fread +.. index:: fread_unlocked +.. index:: read array elements from a file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + size_t fread(void *restrict buf, size_t size, size_t count, + FILE *restrict fp); + + #define _BSD_SOURCE + #include <stdio.h> + size_t fread_unlocked(void *restrict buf, size_t size, size_t count, + FILE *restrict fp); + + #include <stdio.h> + size_t _fread_r(struct _reent *ptr, void *restrict buf, + size_t size, size_t count, FILE *restrict fp); + + #include <stdio.h> + size_t _fread_unlocked_r(struct _reent *ptr, void *restrict buf, + size_t size, size_t count, FILE *restrict fp); + + + +**DESCRIPTION:** + +*fread* attempts to copy, from the file or stream identified by +``fp``, ``count`` elements (each of size ``size``) into memory, +starting at ``buf``. *fread* may copy fewer elements than +``count`` if an error, or end of file, intervenes. + +*fread* also advances the file position indicator (if any) for +``fp`` by the number of @emph{characters} actually read. + +*fread_unlocked* is a non-thread-safe version of *fread*. +*fread_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fread_unlocked* is equivalent to *fread*. + +*_fread_r* and *_fread_unlocked_r* are simply reentrant versions of the +above that take an additional reentrant structure pointer argument: ``ptr``. + + + +**STATUS CODES:** + +The result of *fread* is the number of elements it succeeded in +reading. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/freopen.rst b/posix-users/newlib/libc/stdio/freopen.rst new file mode 100644 index 0000000..54d2bc8 --- /dev/null +++ b/posix-users/newlib/libc/stdio/freopen.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/freopen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. freopen: + +freopen - Open a file using an existing file descriptor +----------------------------------------------------------- +.. index:: freopen +.. index:: open a file using an existing file descriptor + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *freopen(const char *restrict file, const char *restrict mode, + FILE *restrict fp); + FILE *_freopen_r(struct _reent *ptr, const char *restrict file, + const char *restrict mode, FILE *restrict fp); + + + +**DESCRIPTION:** + +Use this variant of *fopen* if you wish to specify a particular file +descriptor ``fp`` (notably *stdin*, *stdout*, or *stderr*) for +the file. + +If ``fp`` was associated with another file or stream, *freopen* +closes that other file or stream (but ignores any errors while closing +it). + +``file`` and ``mode`` are used just as in *fopen*. + +If ``file`` is *NULL*, the underlying stream is modified rather than +closed. The file cannot be given a more permissive access mode (for +example, a ``mode`` of "w" will fail on a read-only file descriptor), +but can change status such as append or binary mode. If modification +is not possible, failure occurs. + + + +**STATUS CODES:** + +If successful, the result is the same as the argument ``fp``. If the +file cannot be opened as specified, the result is *NULL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fseek.rst b/posix-users/newlib/libc/stdio/fseek.rst new file mode 100644 index 0000000..afdaf22 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fseek.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fseek.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fseek, fseeko: + +fseek, fseeko - Set file position +--------------------------------------- +.. index:: fseek +.. index:: fseeko +.. index:: set file position + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fseek(FILE *fp, long offset, int whence); + int fseeko(FILE *fp, off_t offset, int whence); + int _fseek_r(struct _reent *ptr, FILE *fp, + long offset, int whence); + int _fseeko_r(struct _reent *ptr, FILE *fp, + off_t offset, int whence); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fseek*/*fseeko* to set the position for the file identified by +``fp``. The value of ``offset`` determines the new position, in one +of three ways selected by the value of ``whence`` (defined as macros +in `*stdio.h*`): + +*SEEK_SET*---``offset`` is the absolute file position (an offset +from the beginning of the file) desired. ``offset`` must be positive. + +*SEEK_CUR*---``offset`` is relative to the current file position. +``offset`` can meaningfully be either positive or negative. + +*SEEK_END*---``offset`` is relative to the current end of file. +``offset`` can meaningfully be either positive (to increase the size +of the file) or negative. + +See *ftell*/*ftello* to determine the current file position. + + + +**STATUS CODES:** + +*fseek*/*fseeko* return *0* when successful. On failure, the +result is *EOF*. The reason for failure is indicated in *errno*: +either *ESPIPE* (the stream identified by ``fp`` doesn`t support +repositioning) or *EINVAL* (invalid file position). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fseeko.rst b/posix-users/newlib/libc/stdio/fseeko.rst new file mode 100644 index 0000000..fea8ef9 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fseeko.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fseeko.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fseek, fseeko: + +fseek, fseeko - Set file position +--------------------------------------- +.. index:: fseek +.. index:: fseeko +.. index:: set file position + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fseek(FILE *fp, long offset, int whence) + int fseeko(FILE *fp, off_t offset, int whence) + int _fseek_r(struct _reent *ptr, FILE *fp, + long offset, int whence) + int _fseeko_r(struct _reent *ptr, FILE *fp, + off_t offset, int whence) + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fseek*/*fseeko* to set the position for the file identified by +``fp``. The value of ``offset`` determines the new position, in one +of three ways selected by the value of ``whence`` (defined as macros +in `*stdio.h*`): + +*SEEK_SET*---``offset`` is the absolute file position (an offset +from the beginning of the file) desired. ``offset`` must be positive. + +*SEEK_CUR*---``offset`` is relative to the current file position. +``offset`` can meaningfully be either positive or negative. + +*SEEK_END*---``offset`` is relative to the current end of file. +``offset`` can meaningfully be either positive (to increase the size +of the file) or negative. + +See *ftell*/*ftello* to determine the current file position. + + + +**STATUS CODES:** + +*fseek*/*fseeko* return *0* when successful. On failure, the +result is *EOF*. The reason for failure is indicated in *errno*: +either *ESPIPE* (the stream identified by ``fp`` doesn`t support +repositioning) or *EINVAL* (invalid file position). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fsetlocking.rst b/posix-users/newlib/libc/stdio/fsetlocking.rst new file mode 100644 index 0000000..c6d86c4 --- /dev/null +++ b/posix-users/newlib/libc/stdio/fsetlocking.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fsetlocking.c + +.. COMMENT: Generated on: 2018-08-20 + +.. __fsetlocking: + +__fsetlocking - Set or query locking mode on file stream +------------------------------------------------------------ +.. index:: __fsetlocking +.. index:: set or query locking mode on FILE stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdio_ext.h> + int __fsetlocking(FILE *fp, int type); + + + +**DESCRIPTION:** + +This function sets how the stdio functions handle locking of FILE ``fp``. +The following values describe ``type``: + +*FSETLOCKING_INTERNAL* is the default state, where stdio functions +automatically lock and unlock the stream. + +*FSETLOCKING_BYCALLER* means that automatic locking in stdio functions +is disabled. Applications which set this take all responsibility for file +locking themselves. + +*FSETLOCKING_QUERY* returns the current locking mode without changing it. + + + +**STATUS CODES:** + +*__fsetlocking* returns the current locking mode of ``fp``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fsetpos.rst b/posix-users/newlib/libc/stdio/fsetpos.rst new file mode 100644 index 0000000..b93b42d --- /dev/null +++ b/posix-users/newlib/libc/stdio/fsetpos.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fsetpos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fsetpos: + +fsetpos - Restore position of a stream or file +-------------------------------------------------- +.. index:: fsetpos +.. index:: restore position of a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fsetpos(FILE *fp, const fpos_t *pos); + int _fsetpos_r(struct _reent *ptr, FILE *fp, + const fpos_t *pos); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fsetpos* to return the file identified by ``fp`` to a previous +position **``pos]*> (after first recording it with *fgetpos*). + +See *fseek* for a similar facility. + + + +**STATUS CODES:** + +*fgetpos* returns *0* when successful. If *fgetpos* fails, the +result is *1*. The reason for failure is indicated in *errno*: +either *ESPIPE* (the stream identified by ``fp`` doesn`t support +repositioning) or *EINVAL* (invalid file position). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/ftell.rst b/posix-users/newlib/libc/stdio/ftell.rst new file mode 100644 index 0000000..ee55309 --- /dev/null +++ b/posix-users/newlib/libc/stdio/ftell.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/ftell.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ftell, ftello: + +ftell, ftello - Return position in a stream or file +--------------------------------------------------------- +.. index:: ftell +.. index:: ftello +.. index:: return position in a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + long ftell(FILE *fp); + off_t ftello(FILE *fp); + long _ftell_r(struct _reent *ptr, FILE *fp); + off_t _ftello_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +The result of *ftell*/*ftello* is the current position for a file +identified by ``fp``. If you record this result, you can later +use it with *fseek*/*fseeko* to return the file to this +position. The difference between *ftell* and *ftello* is that +*ftell* returns *long* and *ftello* returns *off_t*. + +In the current implementation, *ftell*/*ftello* simply uses a character +count to represent the file position; this is the same number that +would be recorded by *fgetpos*. + + + +**STATUS CODES:** + +*ftell*/*ftello* return the file position, if possible. If they cannot do +this, they return *-1L*. Failure occurs on streams that do not support +positioning; the global *errno* indicates this condition with the +value *ESPIPE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/ftello.rst b/posix-users/newlib/libc/stdio/ftello.rst new file mode 100644 index 0000000..f27568f --- /dev/null +++ b/posix-users/newlib/libc/stdio/ftello.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/ftello.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ftell, ftello: + +ftell, ftello - Return position in a stream or file +--------------------------------------------------------- +.. index:: ftell +.. index:: ftello +.. index:: return position in a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + long ftell(FILE *fp); + off_t ftello(FILE *fp); + long _ftell_r(struct _reent *ptr, FILE *fp); + off_t _ftello_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +The result of *ftell*/*ftello* is the current position for a file +identified by ``fp``. If you record this result, you can later +use it with *fseek*/*fseeko* to return the file to this +position. The difference between *ftell* and *ftello* is that +*ftell* returns *long* and *ftello* returns *off_t*. + +In the current implementation, *ftell*/*ftello* simply uses a character +count to represent the file position; this is the same number that +would be recorded by *fgetpos*. + + + +**STATUS CODES:** + +*ftell*/*ftello* return the file position, if possible. If they cannot do +this, they return *-1L*. Failure occurs on streams that do not support +positioning; the global *errno* indicates this condition with the +value *ESPIPE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/funopen.rst b/posix-users/newlib/libc/stdio/funopen.rst new file mode 100644 index 0000000..f569845 --- /dev/null +++ b/posix-users/newlib/libc/stdio/funopen.rst @@ -0,0 +1,88 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/funopen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. funopen, fropen, fwopen: + +funopen, fropen, fwopen - Open a stream with custom callbacks +--------------------------------------------------------------------- +.. index:: funopen +.. index:: fropen +.. index:: fwopen +.. index:: open a stream with custom callbacks + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *funopen(const void *cookie, + int (*readfn) (void *cookie, char *buf, int n), + int (*writefn) (void *cookie, const char *buf, int n), + fpos_t (*seekfn) (void *cookie, fpos_t off, int whence), + int (*closefn) (void *cookie)); + FILE *fropen(const void *cookie, + int (*readfn) (void *cookie, char *buf, int n)); + FILE *fwopen(const void *cookie, + int (*writefn) (void *cookie, const char *buf, int n)); + + + +**DESCRIPTION:** + +*funopen* creates a *FILE* stream where I/O is performed using +custom callbacks. At least one of ``readfn`` and ``writefn`` must be +provided, which determines whether the stream behaves with mode <"r">, +<"w">, or <"r+">. + +``readfn`` should return -1 on failure, or else the number of bytes +read (0 on EOF). It is similar to *read*, except that <int> rather +than <size_t> bounds a transaction size, and ``cookie`` will be passed +as the first argument. A NULL ``readfn`` makes attempts to read the +stream fail. + +``writefn`` should return -1 on failure, or else the number of bytes +written. It is similar to *write*, except that <int> rather than +<size_t> bounds a transaction size, and ``cookie`` will be passed as +the first argument. A NULL ``writefn`` makes attempts to write the +stream fail. + +``seekfn`` should return (fpos_t)-1 on failure, or else the current +file position. It is similar to *lseek*, except that ``cookie`` +will be passed as the first argument. A NULL ``seekfn`` makes the +stream behave similarly to a pipe in relation to stdio functions that +require positioning. This implementation assumes fpos_t and off_t are +the same type. + +``closefn`` should return -1 on failure, or 0 on success. It is +similar to *close*, except that ``cookie`` will be passed as the +first argument. A NULL ``closefn`` merely flushes all data then lets +*fclose* succeed. A failed close will still invalidate the stream. + +Read and write I/O functions are allowed to change the underlying +buffer on fully buffered or line buffered streams by calling +*setvbuf*. They are also not required to completely fill or empty +the buffer. They are not, however, allowed to change streams from +unbuffered to buffered or to change the state of the line buffering +flag. They must also be prepared to have read or write calls occur on +buffers other than the one most recently specified. + +The functions *fropen* and *fwopen* are convenience macros around +*funopen* that only use the specified callback. + + + +**STATUS CODES:** + +The return value is an open FILE pointer on success. On error, +*NULL* is returned, and *errno* will be set to EINVAL if a +function pointer is missing, ENOMEM if the stream cannot be created, +or EMFILE if too many streams are already open. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fwide.rst b/posix-users/newlib/libc/stdio/fwide.rst new file mode 100644 index 0000000..ebb923e --- /dev/null +++ b/posix-users/newlib/libc/stdio/fwide.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fwide.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fwide: + +fwide - Set and determine the orientation of a file stream +-------------------------------------------------------------- +.. index:: fwide +.. index:: set and determine the orientation of a FILE stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int fwide(FILE *fp, int mode); + + int _fwide_r(struct _reent *ptr, FILE *fp, int mode); + + + +**DESCRIPTION:** + +When ``mode`` is zero, the *fwide* function determines the current +orientation of ``fp``. It returns a value > 0 if ``fp`` is +wide-character oriented, i.e. if wide character I/O is permitted but +char I/O is disallowed. It returns a value < 0 if ``fp`` is byte +oriented, i.e. if char I/O is permitted but wide character I/O is +disallowed. It returns zero if ``fp`` has no orientation yet; in +this case the next I/O operation might change the orientation (to byte +oriented if it is a char I/O operation, or to wide-character oriented +if it is a wide character I/O operation). + +Once a stream has an orientation, it cannot be changed and persists +until the stream is closed, unless the stream is re-opened with freopen, +which removes the orientation of the stream. + +When ``mode`` is non-zero, the *fwide* function first attempts to set +``fp```s orientation (to wide-character oriented if ``mode`` > 0, or to +byte oriented if ``mode`` < 0). It then returns a value denoting the +current orientation, as above. + + + +**STATUS CODES:** + +The *fwide* function returns ``fp```s orientation, after possibly +changing it. A return value > 0 means wide-character oriented. A return +value < 0 means byte oriented. A return value of zero means undecided. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/fwrite.rst b/posix-users/newlib/libc/stdio/fwrite.rst new file mode 100644 index 0000000..73cd93e --- /dev/null +++ b/posix-users/newlib/libc/stdio/fwrite.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/fwrite.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fwrite, fwrite_unlocked: + +fwrite, fwrite_unlocked - Write array elements +---------------------------------------------------- +.. index:: fwrite +.. index:: fwrite_unlocked +.. index:: write array elements + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + size_t fwrite(const void *restrict buf, size_t size, + size_t count, FILE *restrict fp); + + #define _BSD_SOURCE + #include <stdio.h> + size_t fwrite_unlocked(const void *restrict buf, size_t size, + size_t count, FILE *restrict fp); + + #include <stdio.h> + size_t _fwrite_r(struct _reent *ptr, const void *restrict buf, size_t size, + size_t count, FILE *restrict fp); + + #include <stdio.h> + size_t _fwrite_unlocked_r(struct _reent *ptr, const void *restrict buf, size_t size, + size_t count, FILE *restrict fp); + + + +**DESCRIPTION:** + +*fwrite* attempts to copy, starting from the memory location +``buf``, ``count`` elements (each of size ``size``) into the file or +stream identified by ``fp``. *fwrite* may copy fewer elements than +``count`` if an error intervenes. + +*fwrite* also advances the file position indicator (if any) for +``fp`` by the number of @emph{characters} actually written. + +*fwrite_unlocked* is a non-thread-safe version of *fwrite*. +*fwrite_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*fwrite_unlocked* is equivalent to *fwrite*. + +*_fwrite_r* and *_fwrite_unlocked_r* are simply reentrant versions of the +above that take an additional reentrant structure argument: ``ptr``. + + + +**STATUS CODES:** + +If *fwrite* succeeds in writing all the elements you specify, the +result is the same as the argument ``count``. In any event, the +result is the number of complete elements that *fwrite* copied to +the file. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getc.rst b/posix-users/newlib/libc/stdio/getc.rst new file mode 100644 index 0000000..521a3e4 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getc.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getc: + +getc - Read a character (macro) +----------------------------------- +.. index:: getc +.. index:: read a character (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getc(FILE *fp); + + #include <stdio.h> + int _getc_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +*getc* is a macro, defined in *stdio.h*. You can use *getc* +to get the next single character from the file or stream +identified by ``fp``. As a side effect, *getc* advances the file`s +current position indicator. + +For a subroutine version of this macro, see *fgetc*. + +The *_getc_r* function is simply the reentrant version of *getc* +which passes an additional reentrancy structure pointer argument: ``ptr``. + + + +**STATUS CODES:** + +The next character (read as an *unsigned char*, and cast to +*int*), unless there is no more data, or the host system reports a +read error; in either of these situations, *getc* returns *EOF*. + +You can distinguish the two situations that cause an *EOF* result by +using the *ferror* and *feof* functions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getc_u.rst b/posix-users/newlib/libc/stdio/getc_u.rst new file mode 100644 index 0000000..9f8fb31 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getc_u.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getc_u.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getc_unlocked: + +getc_unlocked - Non-thread-safe version of getc (macro) +----------------------------------------------------------- +.. index:: getc_unlocked +.. index:: non-thread-safe version of getc (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getc_unlocked(FILE *fp); + + #include <stdio.h> + int _getc_unlocked_r(FILE *fp); + + + +**DESCRIPTION:** + +*getc_unlocked* is a non-thread-safe version of *getc* declared in +*stdio.h*. *getc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). These +functions may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the ( FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*getc_unlocked* is equivalent to *getc*. + +The *_getc_unlocked_r* function is simply the reentrant version of +*get_unlocked* which passes an additional reentrancy structure pointer +argument: ``ptr``. + + + +**STATUS CODES:** + +See *getc*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getchar.rst b/posix-users/newlib/libc/stdio/getchar.rst new file mode 100644 index 0000000..ce066a8 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getchar.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getchar.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getchar: + +getchar - Read a character (macro) +-------------------------------------- +.. index:: getchar +.. index:: read a character (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getchar(void); + + int _getchar_r(struct _reent *reent); + + + +**DESCRIPTION:** + +*getchar* is a macro, defined in *stdio.h*. You can use *getchar* +to get the next single character from the standard input stream. +As a side effect, *getchar* advances the standard input`s +current position indicator. + +The alternate function *_getchar_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + + +**STATUS CODES:** + +The next character (read as an *unsigned char*, and cast to +*int*), unless there is no more data, or the host system reports a +read error; in either of these situations, *getchar* returns *EOF*. + +You can distinguish the two situations that cause an *EOF* result by +using `*ferror(stdin)*` and `*feof(stdin)*`. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getchar_u.rst b/posix-users/newlib/libc/stdio/getchar_u.rst new file mode 100644 index 0000000..71bdd5b --- /dev/null +++ b/posix-users/newlib/libc/stdio/getchar_u.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getchar_u.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getchar_unlocked: + +getchar_unlocked - Non-thread-safe version of getchar (macro) +----------------------------------------------------------------- +.. index:: getchar_unlocked +.. index:: non-thread-safe version of getchar (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getchar_unlocked(void); + + #include <stdio.h> + int _getchar_unlocked_r(struct _reent *ptr); + + + +**DESCRIPTION:** + +*getchar_unlocked* is a non-thread-safe version of *getchar* +declared in *stdio.h*. *getchar_unlocked* may only safely be used +within a scope protected by flockfile() (or ftrylockfile()) and +funlockfile(). These functions may safely be used in a multi-threaded +program if and only if they are called while the invoking thread owns +the ( FILE *) object, as is the case after a successful call to the +flockfile() or ftrylockfile() functions. If threads are disabled, +then *getchar_unlocked* is equivalent to *getchar*. + +The *_getchar_unlocked_r* function is simply the reentrant version of +*getchar_unlocked* which passes an addtional reentrancy structure pointer +argument: ``ptr``. + + + +**STATUS CODES:** + +See *getchar*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getdelim.rst b/posix-users/newlib/libc/stdio/getdelim.rst new file mode 100644 index 0000000..51bc148 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getdelim.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getdelim.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getdelim: + +getdelim - Read a line up to a specified line delimiter +----------------------------------------------------------- +.. index:: getdelim +.. index:: read a line up to a specified line delimiter + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getdelim(char **bufptr, size_t *n, + int delim, FILE *fp); + + + +**DESCRIPTION:** + +*getdelim* reads a file ``fp`` up to and possibly including a specified +delimiter ``delim``. The line is read into a buffer pointed to +by ``bufptr`` and designated with size *``n``. If the buffer is +not large enough, it will be dynamically grown by *getdelim*. +As the buffer is grown, the pointer to the size ``n`` will be +updated. + + + +**STATUS CODES:** + +*getdelim* returns *-1* if no characters were successfully read; +otherwise, it returns the number of bytes successfully read. +At end of file, the result is nonzero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getline.rst b/posix-users/newlib/libc/stdio/getline.rst new file mode 100644 index 0000000..a85bf74 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getline.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getline.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getline: + +getline - Read a line from a file +------------------------------------- +.. index:: getline +.. index:: read a line from a file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + ssize_t getline(char **bufptr, size_t *n, FILE *fp); + + + +**DESCRIPTION:** + +*getline* reads a file ``fp`` up to and possibly including the +newline character. The line is read into a buffer pointed to +by ``bufptr`` and designated with size *``n``. If the buffer is +not large enough, it will be dynamically grown by *getdelim*. +As the buffer is grown, the pointer to the size ``n`` will be +updated. + +*getline* is equivalent to getdelim(bufptr, n, `\n`, fp); + + + +**STATUS CODES:** + +*getline* returns *-1* if no characters were successfully read, +otherwise, it returns the number of bytes successfully read. +at end of file, the result is nonzero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/gets.rst b/posix-users/newlib/libc/stdio/gets.rst new file mode 100644 index 0000000..2d9a62a --- /dev/null +++ b/posix-users/newlib/libc/stdio/gets.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/gets.c + +.. COMMENT: Generated on: 2018-08-20 + +.. gets, fgets: + +gets, fgets - Get character string (obsolete, use *fgets* instead) +--------------------------------------------------------------- +.. index:: gets +.. index:: fgets +.. index:: get character string (obsolete, use *fgets* instead) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + char *gets(char *buf); + + char *_gets_r(struct _reent *reent, char *buf); + + + +**DESCRIPTION:** + + Reads characters from standard input until a newline is found. + The characters up to the newline are stored in ``buf``. The + newline is discarded, and the buffer is terminated with a 0. + + This is a @emph{dangerous} function, as it has no way of checking + the amount of space available in ``buf``. One of the attacks + used by the Internet Worm of 1988 used this to overrun a + buffer allocated on the stack of the finger daemon and + overwrite the return address, causing the daemon to execute + code downloaded into it over the connection. + + The alternate function *_gets_r* is a reentrant version. The extra + argument ``reent`` is a pointer to a reentrancy structure. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getw.rst b/posix-users/newlib/libc/stdio/getw.rst new file mode 100644 index 0000000..198b6a2 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getw.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getw.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getw: + +getw - Read a word (int) +---------------------------- +.. index:: getw +.. index:: read a word (int) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int getw(FILE *fp); + + + +**DESCRIPTION:** + +*getw* is a function, defined in *stdio.h*. You can use *getw* +to get the next word from the file or stream identified by ``fp``. As +a side effect, *getw* advances the file`s current position +indicator. + + + +**STATUS CODES:** + +The next word (read as an *int*), unless there is no more +data or the host system reports a read error; in either of these +situations, *getw* returns *EOF*. Since *EOF* is a valid +*int*, you must use *ferror* or *feof* to distinguish these +situations. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/getwchar.rst b/posix-users/newlib/libc/stdio/getwchar.rst new file mode 100644 index 0000000..374e561 --- /dev/null +++ b/posix-users/newlib/libc/stdio/getwchar.rst @@ -0,0 +1,69 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/getwchar.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getwchar, getwchar_unlocked: + +getwchar, getwchar_unlocked - Read a wide character from standard input +----------------------------------------------------------------------------- +.. index:: getwchar +.. index:: getwchar_unlocked +.. index:: read a wide character from standard input + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wint_t getwchar(void); + + #define _GNU_SOURCE + #include <wchar.h> + wint_t getwchar_unlocked(void); + + #include <wchar.h> + wint_t _getwchar_r(struct _reent *reent); + + #include <wchar.h> + wint_t _getwchar_unlocked_r(struct _reent *reent); + + + +**DESCRIPTION:** + +*getwchar* function or macro is the wide character equivalent of +the *getchar* function. You can use *getwchar* to get the next +wide character from the standard input stream. As a side effect, +*getwchar* advances the standard input`s current position indicator. + +*getwchar_unlocked* is a non-thread-safe version of *getwchar*. +*getwchar_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*getwchar_unlocked* is equivalent to *getwchar*. + +The alternate functions *_getwchar_r* and *_getwchar_unlocked_r* are +reentrant versions of the above. The extra argument ``reent`` is a pointer to +a reentrancy structure. + + + +**STATUS CODES:** + +The next wide character cast to *wint_t*, unless there is no more +data, or the host system reports a read error; in either of these +situations, *getwchar* returns *WEOF*. + +You can distinguish the two situations that cause an *WEOF* result by +using `*ferror(stdin)*` and `*feof(stdin)*`. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/mktemp.rst b/posix-users/newlib/libc/stdio/mktemp.rst new file mode 100644 index 0000000..f739631 --- /dev/null +++ b/posix-users/newlib/libc/stdio/mktemp.rst @@ -0,0 +1,101 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/mktemp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mktemp, mkstemp, mkostemp, mkstemps, mkostemps, mkdtemp: + +mktemp, mkstemp, mkostemp, mkstemps, mkostemps, mkdtemp - Generate unused directory +---------------------------------------------------------------------------------------------------------------------------- +.. index:: mktemp +.. index:: mkstemp +.. index:: mkostemp +.. index:: mkstemps +.. index:: mkostemps +.. index:: mkdtemp +.. index:: generate unused directory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + char *mktemp(char *path); + char *mkdtemp(char *path); + int mkstemp(char *path); + int mkstemps(char *path, int suffixlen); + int mkostemp(char *path, int flags); + int mkostemps(char *path, int suffixlen, int flags); + + char *_mktemp_r(struct _reent *reent, char *path); + char *_mkdtemp_r(struct _reent *reent, char *path); + int *_mkstemp_r(struct _reent *reent, char *path); + int *_mkstemps_r(struct _reent *reent, char *path, int len); + int *_mkostemp_r(struct _reent *reent, char *path, + int flags); + int *_mkostemps_r(struct _reent *reent, char *path, int len, + int flags); + + + +**DESCRIPTION:** + +*mktemp*, *mkstemp*, and *mkstemps* attempt to generate a file name +that is not yet in use for any existing file. *mkstemp* and *mkstemps* +create the file and open it for reading and writing; *mktemp* simply +generates the file name (making *mktemp* a security risk). *mkostemp* +and *mkostemps* allow the addition of other *open* flags, such +as *O_CLOEXEC*, *O_APPEND*, or *O_SYNC*. On platforms with a +separate text mode, *mkstemp* forces *O_BINARY*, while *mkostemp* +allows the choice between *O_BINARY*, *O_TEXT*, or 0 for default. +*mkdtemp* attempts to create a directory instead of a file, with a +permissions mask of 0700. + +You supply a simple pattern for the generated file name, as the string +at ``path``. The pattern should be a valid filename (including path +information if you wish) ending with at least six `*X*` +characters. The generated filename will match the leading part of the +name you supply, with the trailing `*X*` characters replaced by some +combination of digits and letters. With *mkstemps*, the `*X*` +characters end ``suffixlen`` bytes before the end of the string. + +The alternate functions *_mktemp_r*, *_mkdtemp_r*, *_mkstemp_r*, +*_mkostemp_r*, *_mkostemps_r*, and *_mkstemps_r* are reentrant +versions. The extra argument ``reent`` is a pointer to a reentrancy +structure. + + + +**STATUS CODES:** + +*mktemp* returns the pointer ``path`` to the modified string +representing an unused filename, unless it could not generate one, or +the pattern you provided is not suitable for a filename; in that case, +it returns *NULL*. Be aware that there is an inherent race between +generating the name and attempting to create a file by that name; +you are advised to use *O_EXCL|O_CREAT*. + +*mkdtemp* returns the pointer ``path`` to the modified string if the +directory was created, otherwise it returns *NULL*. + +*mkstemp*, *mkstemps*, *mkostemp*, and *mkostemps* return a file +descriptor to the newly created file, unless it could not generate an +unused filename, or the pattern you provided is not suitable for a +filename; in that case, it returns *-1*. + + + +**NOTES:** + +Never use *mktemp*. The generated filenames are easy to guess and +there`s a race between the test if the file exists and the creation +of the file. In combination this makes *mktemp* prone to attacks +and using it is a security risk. Whenever possible use *mkstemp* +instead. It doesn`t suffer the race condition. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/nano-vfprintf.rst b/posix-users/newlib/libc/stdio/nano-vfprintf.rst new file mode 100644 index 0000000..da29c12 --- /dev/null +++ b/posix-users/newlib/libc/stdio/nano-vfprintf.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/nano-vfprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfprintf, vprintf, vsprintf, vsnprintf, vasprintf, vasnprintf: + +vfprintf, vprintf, vsprintf, vsnprintf, vasprintf, vasnprintf - Format argument list +-------------------------------------------------------------------------------------------------- +.. index:: vfprintf +.. index:: vprintf +.. index:: vsprintf +.. index:: vsnprintf +.. index:: vasprintf +.. index:: vasnprintf +.. index:: format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int vprintf(const char *fmt, va_list list); + int vfprintf(FILE *fp, const char *fmt, va_list list); + int vsprintf(char *str, const char *fmt, va_list list); + int vsnprintf(char *str, size_t size, const char *fmt, + va_list list); + int vasprintf(char **strp, const char *fmt, va_list list); + char *vasnprintf(char *str, size_t *size, const char *fmt, + va_list list); + + int _vprintf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfprintf_r(struct _reent *reent, FILE *fp, + const char *fmt, va_list list); + int _vsprintf_r(struct _reent *reent, char *str, + const char *fmt, va_list list); + int _vasprintf_r(struct _reent *reent, char **str, + const char *fmt, va_list list); + int _vsnprintf_r(struct _reent *reent, char *str, + size_t size, const char *fmt, va_list list); + char *_vasnprintf_r(struct _reent *reent, char *str, + size_t *size, const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*vprintf*, *vfprintf*, *vasprintf*, *vsprintf*, *vsnprintf*, +and *vasnprintf* are (respectively) variants of *printf*, +*fprintf*, *asprintf*, *sprintf*, *snprintf*, and +*asnprintf*. They differ only in allowing their caller to pass the +variable argument list as a *va_list* object (initialized by +*va_start*) rather than directly accepting a variable number of +arguments. The caller is responsible for calling *va_end*. + +*_vprintf_r*, *_vfprintf_r*, *_vasprintf_r*, *_vsprintf_r*, +*_vsnprintf_r*, and *_vasnprintf_r* are reentrant versions of the +above. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/nano-vfscanf.rst b/posix-users/newlib/libc/stdio/nano-vfscanf.rst new file mode 100644 index 0000000..a5f261d --- /dev/null +++ b/posix-users/newlib/libc/stdio/nano-vfscanf.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/nano-vfscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfscanf, vscanf, vsscanf: + +vfscanf, vscanf, vsscanf - Format argument list +------------------------------------------------------- +.. index:: vfscanf +.. index:: vscanf +.. index:: vsscanf +.. index:: format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int vscanf(const char *fmt, va_list list); + int vfscanf(FILE *fp, const char *fmt, va_list list); + int vsscanf(const char *str, const char *fmt, va_list list); + + int _vscanf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfscanf_r(struct _reent *reent, FILE *fp, const char *fmt, + va_list list); + int _vsscanf_r(struct _reent *reent, const char *str, + const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*vscanf*, *vfscanf*, and *vsscanf* are (respectively) variants +of *scanf*, *fscanf*, and *sscanf*. They differ only in +allowing their caller to pass the variable argument list as a +*va_list* object (initialized by *va_start*) rather than +directly accepting a variable number of arguments. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions: +*vscanf* returns the number of input fields successfully scanned, +converted, and stored; the return value does not include scanned +fields which were not stored. + +If *vscanf* attempts to read at end-of-file, the return value +is *EOF*. + +If no fields were stored, the return value is *0*. + +The routines *_vscanf_r*, *_vfscanf_f*, and *_vsscanf_r* are +reentrant versions which take an additional first parameter which points to the +reentrancy structure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/open_memstream.rst b/posix-users/newlib/libc/stdio/open_memstream.rst new file mode 100644 index 0000000..f059204 --- /dev/null +++ b/posix-users/newlib/libc/stdio/open_memstream.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/open_memstream.c + +.. COMMENT: Generated on: 2018-08-20 + +.. open_memstream, open_wmemstream: + +open_memstream, open_wmemstream - Open a write stream around an arbitrary-length string +--------------------------------------------------------------------------------------------- +.. index:: open_memstream +.. index:: open_wmemstream +.. index:: open a write stream around an arbitrary-length string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *open_memstream(char **restrict buf, + size_t *restrict size); + + #include <wchar.h> + FILE *open_wmemstream(wchar_t **restrict buf, + size_t *restrict size); + + + +**DESCRIPTION:** + +*open_memstream* creates a seekable, byte-oriented *FILE* stream that +wraps an arbitrary-length buffer, created as if by *malloc*. The current +contents of *``buf`` are ignored; this implementation uses *``size`` +as a hint of the maximum size expected, but does not fail if the hint +was wrong. The parameters ``buf`` and ``size`` are later stored +through following any call to *fflush* or *fclose*, set to the +current address and usable size of the allocated string; although +after fflush, the pointer is only valid until another stream operation +that results in a write. Behavior is undefined if the user alters +either *``buf`` or *``size`` prior to *fclose*. + +*open_wmemstream* is like *open_memstream* just with the associated +stream being wide-oriented. The size set in ``size`` in subsequent +operations is the number of wide characters. + +The stream is write-only, since the user can directly read *``buf`` +after a flush; see *fmemopen* for a way to wrap a string with a +readable stream. The user is responsible for calling *free* on +the final *``buf`` after *fclose*. + +Any time the stream is flushed, a NUL byte is written at the current +position (but is not counted in the buffer length), so that the string +is always NUL-terminated after at most *``size`` bytes (or wide characters +in case of *open_wmemstream*). However, data previously written beyond +the current stream offset is not lost, and the NUL value written during a +flush is restored to its previous value when seeking elsewhere in the string. + + + +**STATUS CODES:** + +The return value is an open FILE pointer on success. On error, +*NULL* is returned, and *errno* will be set to EINVAL if ``buf`` +or ``size`` is NULL, ENOMEM if memory could not be allocated, or +EMFILE if too many streams are already open. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/perror.rst b/posix-users/newlib/libc/stdio/perror.rst new file mode 100644 index 0000000..f9aaaa0 --- /dev/null +++ b/posix-users/newlib/libc/stdio/perror.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/perror.c + +.. COMMENT: Generated on: 2018-08-20 + +.. perror: + +perror - Print an error message on standard error +----------------------------------------------------- +.. index:: perror +.. index:: print an error message on standard error + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void perror(char *prefix); + + void _perror_r(struct _reent *reent, char *prefix); + + + +**DESCRIPTION:** + +Use *perror* to print (on standard error) an error message +corresponding to the current value of the global variable *errno*. +Unless you use *NULL* as the value of the argument ``prefix``, the +error message will begin with the string at ``prefix``, followed by a +colon and a space (*: *). The remainder of the error message is one +of the strings described for *strerror*. + +The alternate function *_perror_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*perror* returns no result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putc.rst b/posix-users/newlib/libc/stdio/putc.rst new file mode 100644 index 0000000..1219861 --- /dev/null +++ b/posix-users/newlib/libc/stdio/putc.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putc: + +putc - Write a character (macro) +------------------------------------ +.. index:: putc +.. index:: write a character (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int putc(int ch, FILE *fp); + + #include <stdio.h> + int _putc_r(struct _reent *ptr, int ch, FILE *fp); + + + +**DESCRIPTION:** + +*putc* is a macro, defined in *stdio.h*. *putc* +writes the argument ``ch`` to the file or stream identified by +``fp``, after converting it from an *int* to an *unsigned char*. + +If the file was opened with append mode (or if the stream cannot +support positioning), then the new character goes at the end of the +file or stream. Otherwise, the new character is written at the +current value of the position indicator, and the position indicator +advances by one. + +For a subroutine version of this macro, see *fputc*. + +The *_putc_r* function is simply the reentrant version of +*putc* that takes an additional reentrant structure argument: ``ptr``. + + + +**STATUS CODES:** + +If successful, *putc* returns its argument ``ch``. If an error +intervenes, the result is *EOF*. You can use `*ferror(``fp``)*` to +query for errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putc_u.rst b/posix-users/newlib/libc/stdio/putc_u.rst new file mode 100644 index 0000000..4c54f07 --- /dev/null +++ b/posix-users/newlib/libc/stdio/putc_u.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putc_u.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putc_unlocked: + +putc_unlocked - Non-thread-safe version of putc (macro) +----------------------------------------------------------- +.. index:: putc_unlocked +.. index:: non-thread-safe version of putc (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int putc_unlocked(int ch, FILE *fp); + + #include <stdio.h> + int _putc_unlocked_r(struct _reent *ptr, int ch, FILE *fp); + + + +**DESCRIPTION:** + +*putc_unlocked* is a non-thread-safe version of *putc* declared in +*stdio.h*. *putc_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). These +functions may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the ( FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*putc_unlocked* is equivalent to *putc*. + +The function *_putc_unlocked_r* is simply the reentrant version of +*putc_unlocked* that takes an additional reentrant structure pointer +argument: ``ptr``. + + + +**STATUS CODES:** + +See *putc*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putchar.rst b/posix-users/newlib/libc/stdio/putchar.rst new file mode 100644 index 0000000..ccf62af --- /dev/null +++ b/posix-users/newlib/libc/stdio/putchar.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putchar.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putchar: + +putchar - Write a character (macro) +--------------------------------------- +.. index:: putchar +.. index:: write a character (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int putchar(int ch); + + int _putchar_r(struct _reent *reent, int ch); + + + +**DESCRIPTION:** + +*putchar* is a macro, defined in *stdio.h*. *putchar* +writes its argument to the standard output stream, +after converting it from an *int* to an *unsigned char*. + +The alternate function *_putchar_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +If successful, *putchar* returns its argument ``ch``. If an error +intervenes, the result is *EOF*. You can use `*ferror(stdin)*` to +query for errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putchar_u.rst b/posix-users/newlib/libc/stdio/putchar_u.rst new file mode 100644 index 0000000..311dd9e --- /dev/null +++ b/posix-users/newlib/libc/stdio/putchar_u.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putchar_u.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putchar_unlocked: + +putchar_unlocked - Non-thread-safe version of putchar (macro) +----------------------------------------------------------------- +.. index:: putchar_unlocked +.. index:: non-thread-safe version of putchar (macro) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int putchar_unlocked(int ch); + + + +**DESCRIPTION:** + +*putchar_unlocked* is a non-thread-safe version of *putchar* +declared in *stdio.h*. *putchar_unlocked* may only safely be used +within a scope protected by flockfile() (or ftrylockfile()) and +funlockfile(). These functions may safely be used in a multi-threaded +program if and only if they are called while the invoking thread owns +the ( FILE *) object, as is the case after a successful call to the +flockfile() or ftrylockfile() functions. If threads are disabled, +then *putchar_unlocked* is equivalent to *putchar*. + + + +**STATUS CODES:** + +See *putchar*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/puts.rst b/posix-users/newlib/libc/stdio/puts.rst new file mode 100644 index 0000000..4e1469f --- /dev/null +++ b/posix-users/newlib/libc/stdio/puts.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/puts.c + +.. COMMENT: Generated on: 2018-08-20 + +.. puts: + +puts - Write a character string +----------------------------------- +.. index:: puts +.. index:: write a character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int puts(const char *s); + + int _puts_r(struct _reent *reent, const char *s); + + + +**DESCRIPTION:** + +*puts* writes the string at ``s`` (followed by a newline, instead of +the trailing null) to the standard output stream. + +The alternate function *_puts_r* is a reentrant version. The extra +argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +If successful, the result is a nonnegative integer; otherwise, the +result is *EOF*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putw.rst b/posix-users/newlib/libc/stdio/putw.rst new file mode 100644 index 0000000..d3d780d --- /dev/null +++ b/posix-users/newlib/libc/stdio/putw.rst @@ -0,0 +1,39 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putw.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putw: + +putw - Write a word (int) +----------------------------- +.. index:: putw +.. index:: write a word (int) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int putw(int w, FILE *fp); + + + +**DESCRIPTION:** + +*putw* is a function, defined in *stdio.h*. You can use *putw* +to write a word to the file or stream identified by ``fp``. As a side +effect, *putw* advances the file`s current position indicator. + + + +**STATUS CODES:** + +Zero on success, *EOF* on failure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/putwchar.rst b/posix-users/newlib/libc/stdio/putwchar.rst new file mode 100644 index 0000000..43a63b3 --- /dev/null +++ b/posix-users/newlib/libc/stdio/putwchar.rst @@ -0,0 +1,63 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/putwchar.c + +.. COMMENT: Generated on: 2018-08-20 + +.. putwchar, putwchar_unlocked: + +putwchar, putwchar_unlocked - Write a wide character to standard output +----------------------------------------------------------------------------- +.. index:: putwchar +.. index:: putwchar_unlocked +.. index:: write a wide character to standard output + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wint_t putwchar(wchar_t wc); + + #include <wchar.h> + wint_t putwchar_unlocked(wchar_t wc); + + #include <wchar.h> + wint_t _putwchar_r(struct _reent *reent, wchar_t wc); + + #include <wchar.h> + wint_t _putwchar_unlocked_r(struct _reent *reent, wchar_t wc); + + + +**DESCRIPTION:** + +The *putwchar* function or macro is the wide-character equivalent of +the *putchar* function. It writes the wide character wc to stdout. + +*putwchar_unlocked* is a non-thread-safe version of *putwchar*. +*putwchar_unlocked* may only safely be used within a scope +protected by flockfile() (or ftrylockfile()) and funlockfile(). This +function may safely be used in a multi-threaded program if and only +if they are called while the invoking thread owns the (FILE *) +object, as is the case after a successful call to the flockfile() or +ftrylockfile() functions. If threads are disabled, then +*putwchar_unlocked* is equivalent to *putwchar*. + +The alternate functions *_putwchar_r* and *_putwchar_unlocked_r* are +reentrant versions of the above. The extra argument ``reent`` is a pointer +to a reentrancy structure. + + + +**STATUS CODES:** + +If successful, *putwchar* returns its argument ``wc``. If an error +intervenes, the result is *EOF*. You can use `*ferror(stdin)*` to +query for errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/remove.rst b/posix-users/newlib/libc/stdio/remove.rst new file mode 100644 index 0000000..0c87d3f --- /dev/null +++ b/posix-users/newlib/libc/stdio/remove.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/remove.c + +.. COMMENT: Generated on: 2018-08-20 + +.. remove: + +remove - Delete a file`s name +--------------------------------- +.. index:: remove +.. index:: delete a file`s name + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int remove(char *filename); + + int _remove_r(struct _reent *reent, char *filename); + + + +**DESCRIPTION:** + +Use *remove* to dissolve the association between a particular +filename (the string at ``filename``) and the file it represents. +After calling *remove* with a particular filename, you will no +longer be able to open the file by that name. + +In this implementation, you may use *remove* on an open file without +error; existing file descriptors for the file will continue to access +the file`s data until the program using them closes the file. + +The alternate function *_remove_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*remove* returns *0* if it succeeds, *-1* if it fails. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/rename.rst b/posix-users/newlib/libc/stdio/rename.rst new file mode 100644 index 0000000..eb6fbd4 --- /dev/null +++ b/posix-users/newlib/libc/stdio/rename.rst @@ -0,0 +1,43 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/rename.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rename: + +rename - Rename a file +-------------------------- +.. index:: rename +.. index:: rename a file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int rename(const char *old, const char *new); + + + +**DESCRIPTION:** + +Use *rename* to establish a new name (the string at ``new``) for a +file now known by the string at ``old``. After a successful +*rename*, the file is no longer accessible by the string at ``old``. + +If *rename* fails, the file named **``old]*> is unaffected. The +conditions for failure depend on the host operating system. + + + +**STATUS CODES:** + +The result is either *0* (when successful) or *-1* (when the file +could not be renamed). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/rewind.rst b/posix-users/newlib/libc/stdio/rewind.rst new file mode 100644 index 0000000..4fb94ff --- /dev/null +++ b/posix-users/newlib/libc/stdio/rewind.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/rewind.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rewind: + +rewind - Reinitialize a file or stream +------------------------------------------ +.. index:: rewind +.. index:: reinitialize a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void rewind(FILE *fp); + void _rewind_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +*rewind* returns the file position indicator (if any) for the file +or stream identified by ``fp`` to the beginning of the file. It also +clears any error indicator and flushes any pending output. + + + +**STATUS CODES:** + +*rewind* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/setbuf.rst b/posix-users/newlib/libc/stdio/setbuf.rst new file mode 100644 index 0000000..164625a --- /dev/null +++ b/posix-users/newlib/libc/stdio/setbuf.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/setbuf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. setbuf: + +setbuf - Specify full buffering for a file or stream +-------------------------------------------------------- +.. index:: setbuf +.. index:: specify full buffering for a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void setbuf(FILE *fp, char *buf); + + + +**DESCRIPTION:** + +*setbuf* specifies that output to the file or stream identified by ``fp`` +should be fully buffered. All output for this file will go to a +buffer (of size *BUFSIZ*, specified in `*stdio.h*`). Output will +be passed on to the host system only when the buffer is full, or when +an input operation intervenes. + +You may, if you wish, supply your own buffer by passing a pointer to +it as the argument ``buf``. It must have size *BUFSIZ*. You can +also use *NULL* as the value of ``buf``, to signal that the +*setbuf* function is to allocate the buffer. + + + +**WARNINGS:** + +You may only use *setbuf* before performing any file operation other +than opening the file. + +If you supply a non-null ``buf``, you must ensure that the associated +storage continues to be available until you close the stream +identified by ``fp``. + + + +**STATUS CODES:** + +*setbuf* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/setbuffer.rst b/posix-users/newlib/libc/stdio/setbuffer.rst new file mode 100644 index 0000000..fd26879 --- /dev/null +++ b/posix-users/newlib/libc/stdio/setbuffer.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/setbuffer.c + +.. COMMENT: Generated on: 2018-08-20 + +.. setbuffer: + +setbuffer - Specify full buffering for a file or stream with size +--------------------------------------------------------------------- +.. index:: setbuffer +.. index:: specify full buffering for a file or stream with size + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void setbuffer(FILE *fp, char *buf, int size); + + + +**DESCRIPTION:** + +*setbuffer* specifies that output to the file or stream identified by +``fp`` should be fully buffered. All output for this file will go to a +buffer (of size ``size``). Output will be passed on to the host system +only when the buffer is full, or when an input operation intervenes. + +You may, if you wish, supply your own buffer by passing a pointer to +it as the argument ``buf``. It must have size ``size``. You can +also use *NULL* as the value of ``buf``, to signal that the +*setbuffer* function is to allocate the buffer. + + + +**WARNINGS:** + +You may only use *setbuffer* before performing any file operation +other than opening the file. + +If you supply a non-null ``buf``, you must ensure that the associated +storage continues to be available until you close the stream +identified by ``fp``. + + + +**STATUS CODES:** + +*setbuffer* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/setlinebuf.rst b/posix-users/newlib/libc/stdio/setlinebuf.rst new file mode 100644 index 0000000..48ef12f --- /dev/null +++ b/posix-users/newlib/libc/stdio/setlinebuf.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/setlinebuf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. setlinebuf: + +setlinebuf - Specify line buffering for a file or stream +------------------------------------------------------------ +.. index:: setlinebuf +.. index:: specify line buffering for a file or stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + void setlinebuf(FILE *fp); + + + +**DESCRIPTION:** + +*setlinebuf* specifies that output to the file or stream identified by +``fp`` should be line buffered. This causes the file or stream to pass +on output to the host system at every newline, as well as when the +buffer is full, or when an input operation intervenes. + + + +**WARNINGS:** + +You may only use *setlinebuf* before performing any file operation +other than opening the file. + + + +**STATUS CODES:** + +*setlinebuf* returns as per setvbuf. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/setvbuf.rst b/posix-users/newlib/libc/stdio/setvbuf.rst new file mode 100644 index 0000000..35cc5be --- /dev/null +++ b/posix-users/newlib/libc/stdio/setvbuf.rst @@ -0,0 +1,72 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/setvbuf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. setvbuf: + +setvbuf - Specify file or stream buffering +---------------------------------------------- +.. index:: setvbuf +.. index:: specify file or stream buffering + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int setvbuf(FILE *fp, char *buf, + int mode, size_t size); + + + +**DESCRIPTION:** + +Use *setvbuf* to specify what kind of buffering you want for the +file or stream identified by ``fp``, by using one of the following +values (from *stdio.h*) as the ``mode`` argument: + +o+ +o _IONBF +Do not use a buffer: send output directly to the host system for the +file or stream identified by ``fp``. + +o _IOFBF +Use full output buffering: output will be passed on to the host system +only when the buffer is full, or when an input operation intervenes. + +o _IOLBF +Use line buffering: pass on output to the host system at every +newline, as well as when the buffer is full, or when an input +operation intervenes. +o- + +Use the ``size`` argument to specify how large a buffer you wish. You +can supply the buffer itself, if you wish, by passing a pointer to a +suitable area of memory as ``buf``. Otherwise, you may pass *NULL* +as the ``buf`` argument, and *setvbuf* will allocate the buffer. + + + +**WARNINGS:** + +You may only use *setvbuf* before performing any file operation other +than opening the file. + +If you supply a non-null ``buf``, you must ensure that the associated +storage continues to be available until you close the stream +identified by ``fp``. + + + +**STATUS CODES:** + +A *0* result indicates success, *EOF* failure (invalid ``mode`` or +``size`` can cause failure). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/siprintf.rst b/posix-users/newlib/libc/stdio/siprintf.rst new file mode 100644 index 0000000..6449659 --- /dev/null +++ b/posix-users/newlib/libc/stdio/siprintf.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/siprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. siprintf, fiprintf, iprintf, sniprintf, asiprintf, asniprintf: + +siprintf, fiprintf, iprintf, sniprintf, asiprintf, asniprintf - Format output (integer only) +---------------------------------------------------------------------------------------------------------- +.. index:: siprintf +.. index:: fiprintf +.. index:: iprintf +.. index:: sniprintf +.. index:: asiprintf +.. index:: asniprintf +.. index:: format output (integer only) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + int iprintf(const char *format, ...); + int fiprintf(FILE *fd, const char *format , ...); + int siprintf(char *str, const char *format, ...); + int sniprintf(char *str, size_t size, const char *format, + ...); + int asiprintf(char **strp, const char *format, ...); + char *asniprintf(char *str, size_t *size, + const char *format, ...); + + int _iprintf_r(struct _reent *ptr, const char *format, ...); + int _fiprintf_r(struct _reent *ptr, FILE *fd, + const char *format, ...); + int _siprintf_r(struct _reent *ptr, char *str, + const char *format, ...); + int _sniprintf_r(struct _reent *ptr, char *str, size_t size, + const char *format, ...); + int _asiprintf_r(struct _reent *ptr, char **strp, + const char *format, ...); + char *_asniprintf_r(struct _reent *ptr, char *str, + size_t *size, const char *format, ...); + + + +**DESCRIPTION:** + + *iprintf*, *fiprintf*, *siprintf*, *sniprintf*, + *asiprintf*, and *asniprintf* are the same as *printf*, + *fprintf*, *sprintf*, *snprintf*, *asprintf*, and + *asnprintf*, respectively, except that they restrict usage + to non-floating-point format specifiers. + + *_iprintf_r*, *_fiprintf_r*, *_asiprintf_r*, + *_siprintf_r*, *_sniprintf_r*, *_asniprintf_r* are + simply reentrant versions of the functions above. + + + +**STATUS CODES:** + +Similar to *printf*, *fprintf*, *sprintf*, *snprintf*, *asprintf*, +and *asnprintf*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/siscanf.rst b/posix-users/newlib/libc/stdio/siscanf.rst new file mode 100644 index 0000000..809276d --- /dev/null +++ b/posix-users/newlib/libc/stdio/siscanf.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/siscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. siscanf, fiscanf, iscanf: + +siscanf, fiscanf, iscanf - Scan and format non-floating input +--------------------------------------------------------------------- +.. index:: siscanf +.. index:: fiscanf +.. index:: iscanf +.. index:: scan and format non-floating input + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + int iscanf(const char *format, ...); + int fiscanf(FILE *fd, const char *format, ...); + int siscanf(const char *str, const char *format, ...); + + int _iscanf_r(struct _reent *ptr, const char *format, ...); + int _fiscanf_r(struct _reent *ptr, FILE *fd, + const char *format, ...); + int _siscanf_r(struct _reent *ptr, const char *str, + const char *format, ...); + + + +**DESCRIPTION:** + + *iscanf*, *fiscanf*, and *siscanf* are the same as + *scanf*, *fscanf*, and *sscanf* respectively, only that + they restrict the available formats to non-floating-point + format specifiers. + + The routines *_iscanf_r*, *_fiscanf_r*, and *_siscanf_r* are reentrant + versions of *iscanf*, *fiscanf*, and *siscanf* that take an additional + first argument pointing to a reentrancy structure. + + + +**STATUS CODES:** + + *iscanf* returns the number of input fields successfully + scanned, converted and stored; the return value does + not include scanned fields which were not stored. + + If *iscanf* attempts to read at end-of-file, the return + value is *EOF*. + + If no fields were stored, the return value is *0*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/sprintf.rst b/posix-users/newlib/libc/stdio/sprintf.rst new file mode 100644 index 0000000..741bdb4 --- /dev/null +++ b/posix-users/newlib/libc/stdio/sprintf.rst @@ -0,0 +1,543 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/sprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sprintf, fprintf, printf, snprintf, asprintf, asnprintf: + +sprintf, fprintf, printf, snprintf, asprintf, asnprintf - Format output +------------------------------------------------------------------------------------- +.. index:: sprintf +.. index:: fprintf +.. index:: printf +.. index:: snprintf +.. index:: asprintf +.. index:: asnprintf +.. index:: format output + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + int printf(const char *restrict format, ...); + int fprintf(FILE *restrict fd, const char *restrict format, ...); + int sprintf(char *restrict str, const char *restrict format, ...); + int snprintf(char *restrict str, size_t size, const char *restrict format, + ...); + int asprintf(char **restrict strp, const char *restrict format, ...); + char *asnprintf(char *restrict str, size_t *restrict size, const char *restrict format, + ...); + + int _printf_r(struct _reent *ptr, const char *restrict format, ...); + int _fprintf_r(struct _reent *ptr, FILE *restrict fd, + const char *restrict format, ...); + int _sprintf_r(struct _reent *ptr, char *restrict str, + const char *restrict format, ...); + int _snprintf_r(struct _reent *ptr, char *restrict str, size_t size, + const char *restrict format, ...); + int _asprintf_r(struct _reent *ptr, char **restrict strp, + const char *restrict format, ...); + char *_asnprintf_r(struct _reent *ptr, char *restrict str, + size_t *restrict size, const char *restrict format, ...); + + + +**DESCRIPTION:** + + *printf* accepts a series of arguments, applies to each a + format specifier from **``format]*>, and writes the + formatted data to *stdout*, without a terminating NUL + character. The behavior of *printf* is undefined if there + are not enough arguments for the format. *printf* returns + when it reaches the end of the format string. If there are + more arguments than the format requires, excess arguments are + ignored. + + *fprintf* is like *printf*, except that output is directed + to the stream ``fd`` rather than *stdout*. + + *sprintf* is like *printf*, except that output is directed + to the buffer ``str``, and a terminating NUL is output. + Behavior is undefined if more output is generated than the + buffer can hold. + + *snprintf* is like *sprintf*, except that output is + limited to at most ``size`` bytes, including the terminating + *NUL*. As a special case, if ``size`` is 0, ``str`` can be + NULL, and *snprintf* merely calculates how many bytes would + be printed. + + *asprintf* is like *sprintf*, except that the output is + stored in a dynamically allocated buffer, ``pstr``, which + should be freed later with *free*. + + *asnprintf* is like *sprintf*, except that the return type + is either the original ``str`` if it was large enough, or a + dynamically allocated string if the output exceeds *``size``; + the length of the result is returned in *``size``. When + dynamic allocation occurs, the contents of the original + ``str`` may have been modified. + + For *sprintf*, *snprintf*, and *asnprintf*, the behavior + is undefined if the output **``str]*> overlaps with one of + the arguments. Behavior is also undefined if the argument for + *%n* within **``format]*> overlaps another argument. + + ``format`` is a pointer to a character string containing two + types of objects: ordinary characters (other than *%*), + which are copied unchanged to the output, and conversion + specifications, each of which is introduced by *%*. (To + include *%* in the output, use *%%* in the format string.) + A conversion specification has the following form: + +. %[``pos``][``flags``][``width``][.``prec``][``size``]``type`` + + The fields of the conversion specification have the following + meanings: + + O+ + o ``pos`` + + Conversions normally consume arguments in the order that they + are presented. However, it is possible to consume arguments + out of order, and reuse an argument for more than one + conversion specification (although the behavior is undefined + if the same argument is requested with different types), by + specifying ``pos``, which is a decimal integer followed by + `$`. The integer must be between 1 and <NL_ARGMAX> from + limits.h, and if argument *%n$* is requested, all earlier + arguments must be requested somewhere within ``format``. If + positional parameters are used, then all conversion + specifications except for *%%* must specify a position. + This positional parameters method is a POSIX extension to the C + standard definition for the functions. + + o ``flags`` + + ``flags`` is an optional sequence of characters which control + output justification, numeric signs, decimal points, trailing + zeros, and octal and hex prefixes. The flag characters are + minus (*-*), plus (*+*), space ( ), zero (*0*), sharp + (*#*), and quote (*`*). They can appear in any + combination, although not all flags can be used for all + conversion specification types. + + o+ + o ` + A POSIX extension to the C standard. However, this + implementation presently treats it as a no-op, which + is the default behavior for the C locale, anyway. (If + it did what it is supposed to, when ``type`` were *i*, + *d*, *u*, *f*, *F*, *g*, or *G*, the + integer portion of the conversion would be formatted + with thousands` grouping wide characters.) + + o - + The result of the conversion is left + justified, and the right is padded with + blanks. If you do not use this flag, the + result is right justified, and padded on the + left. + + o + + The result of a signed conversion (as + determined by ``type`` of *d*, *i*, *a*, + *A*, *e*, *E*, *f*, *F*, *g*, or + *G*) will always begin with a plus or minus + sign. (If you do not use this flag, positive + values do not begin with a plus sign.) + + o " " (space) + If the first character of a signed conversion + specification is not a sign, or if a signed + conversion results in no characters, the + result will begin with a space. If the space + ( ) flag and the plus (*+*) flag both + appear, the space flag is ignored. + + o 0 + If the ``type`` character is *d*, *i*, + *o*, *u*, *x*, *X*, *a*, *A*, + *e*, *E*, *f*, *F*, *g*, or *G*: leading + zeros are used to pad the field width + (following any indication of sign or base); no + spaces are used for padding. If the zero + (*0*) and minus (*-*) flags both appear, + the zero (*0*) flag will be ignored. For + *d*, *i*, *o*, *u*, *x*, and *X* + conversions, if a precision ``prec`` is + specified, the zero (*0*) flag is ignored. + + Note that *0* is interpreted as a flag, not + as the beginning of a field width. + + o # + The result is to be converted to an + alternative form, according to the ``type`` + character. + o- + + The alternative form output with the # flag depends on the ``type`` + character: + + o+ + o o + Increases precision to force the first + digit of the result to be a zero. + + o x + A non-zero result will have a *0x* + prefix. + + o X + A non-zero result will have a *0X* + prefix. + + o a, A, e, E, f, or F + The result will always contain a + decimal point even if no digits follow + the point. (Normally, a decimal point + appears only if a digit follows it.) + Trailing zeros are removed. + + o g or G + The result will always contain a + decimal point even if no digits follow + the point. Trailing zeros are not + removed. + + o all others + Undefined. + + o- + + o ``width`` + + ``width`` is an optional minimum field width. You can + either specify it directly as a decimal integer, or + indirectly by using instead an asterisk (***), in + which case an *int* argument is used as the field + width. If positional arguments are used, then the + width must also be specified positionally as **m$*, + with m as a decimal integer. Negative field widths + are treated as specifying the minus (*-*) flag for + left justfication, along with a positive field width. + The resulting format may be wider than the specified + width. + + o ``prec`` + + ``prec`` is an optional field; if present, it is + introduced with `*.*` (a period). You can specify + the precision either directly as a decimal integer or + indirectly by using an asterisk (***), in which case + an *int* argument is used as the precision. If + positional arguments are used, then the precision must + also be specified positionally as **m$*, with m as a + decimal integer. Supplying a negative precision is + equivalent to omitting the precision. If only a + period is specified the precision is zero. The effect + depends on the conversion ``type``. + + o+ + o d, i, o, u, x, or X + Minimum number of digits to appear. If no + precision is given, defaults to 1. + + o a or A + Number of digits to appear after the decimal + point. If no precision is given, the + precision defaults to the minimum needed for + an exact representation. + + o e, E, f or F + Number of digits to appear after the decimal + point. If no precision is given, the + precision defaults to 6. + + o g or G + Maximum number of significant digits. A + precision of 0 is treated the same as a + precision of 1. If no precision is given, the + precision defaults to 6. + + o s or S + Maximum number of characters to print from the + string. If no precision is given, the entire + string is printed. + + o all others + undefined. + + o- + + o ``size`` + + ``size`` is an optional modifier that changes the data + type that the corresponding argument has. Behavior is + unspecified if a size is given that does not match the + ``type``. + + o+ + o hh + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument should be + converted to a *signed char* or *unsigned + char* before printing. + + With *n*, specifies that the argument is a + pointer to a *signed char*. + + o h + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument should be + converted to a *short* or *unsigned short* + before printing. + + With *n*, specifies that the argument is a + pointer to a *short*. + + o l + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *long* or *unsigned long*. + + With *c*, specifies that the argument has + type *wint_t*. + + With *s*, specifies that the argument is a + pointer to *wchar_t*. + + With *n*, specifies that the argument is a + pointer to a *long*. + + With *a*, *A*, *e*, *E*, *f*, *F*, + *g*, or *G*, has no effect (because of + vararg promotion rules, there is no need to + distinguish between *float* and *double*). + + o ll + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *long long* or *unsigned long long*. + + With *n*, specifies that the argument is a + pointer to a *long long*. + + o j + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is an + *intmax_t* or *uintmax_t*. + + With *n*, specifies that the argument is a + pointer to an *intmax_t*. + + o z + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a *size_t*. + + With *n*, specifies that the argument is a + pointer to a *size_t*. + + o t + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *ptrdiff_t*. + + With *n*, specifies that the argument is a + pointer to a *ptrdiff_t*. + + o L + With *a*, *A*, *e*, *E*, *f*, *F*, + *g*, or *G*, specifies that the argument + is a *long double*. + + o- + + o ``type`` + + ``type`` specifies what kind of conversion *printf* + performs. Here is a table of these: + + o+ + o % + Prints the percent character (*%*). + + o c + Prints ``arg`` as single character. If the + *l* size specifier is in effect, a multibyte + character is printed. + + o C + Short for *%lc*. A POSIX extension to the C standard. + + o s + Prints the elements of a pointer to *char* + until the precision or a null character is + reached. If the *l* size specifier is in + effect, the pointer is to an array of + *wchar_t*, and the string is converted to + multibyte characters before printing. + + o S + Short for *%ls*. A POSIX extension to the C standard. + + o d or i + Prints a signed decimal integer; takes an + *int*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o D + Newlib extension, short for *%ld*. + + o o + Prints an unsigned octal integer; takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o O + Newlib extension, short for *%lo*. + + o u + Prints an unsigned decimal integer; takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o U + Newlib extension, short for *%lu*. + + o x + Prints an unsigned hexadecimal integer (using + *abcdef* as digits beyond *9*); takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o X + Like *x*, but uses *ABCDEF* as digits + beyond *9*. + + o f + Prints a signed value of the form + *[-]9999.9999*, with the precision + determining how many digits follow the decimal + point; takes a *double* (remember that + *float* promotes to *double* as a vararg). + The low order digit is rounded to even. If + the precision results in at most DECIMAL_DIG + digits, the result is rounded correctly; if + more than DECIMAL_DIG digits are printed, the + result is only guaranteed to round back to the + original value. + + If the value is infinite, the result is + *inf*, and no zero padding is performed. If + the value is not a number, the result is + *nan*, and no zero padding is performed. + + o F + Like *f*, but uses *INF* and *NAN* for + non-finite numbers. + + o e + Prints a signed value of the form + *[-]9.9999e[+|-]999*; takes a *double*. + The digit before the decimal point is non-zero + if the value is non-zero. The precision + determines how many digits appear between + *.* and *e*, and the exponent always + contains at least two digits. The value zero + has an exponent of zero. If the value is not + finite, it is printed like *f*. + + o E + Like *e*, but using *E* to introduce the + exponent, and like *F* for non-finite + values. + + o g + Prints a signed value in either *f* or *e* + form, based on the given value and + precision---an exponent less than -4 or + greater than the precision selects the *e* + form. Trailing zeros and the decimal point + are printed only if necessary; takes a + *double*. + + o G + Like *g*, except use *F* or *E* form. + + o a + Prints a signed value of the form + *[-]0x1.ffffp[+|-]9*; takes a *double*. + The letters *abcdef* are used for digits + beyond *9*. The precision determines how + many digits appear after the decimal point. + The exponent contains at least one digit, and + is a decimal value representing the power of + 2; a value of 0 has an exponent of 0. + Non-finite values are printed like *f*. + + o A + Like *a*, except uses *X*, *P*, and + *ABCDEF* instead of lower case. + + o n + Takes a pointer to *int*, and stores a count + of the number of bytes written so far. No + output is created. + + o p + Takes a pointer to *void*, and prints it in + an implementation-defined format. This + implementation is similar to *%#tx*), except + that *0x* appears even for the NULL pointer. + + o m + Prints the output of *strerror(errno)*; no + argument is required. A GNU extension. + + o- + O- + + *_printf_r*, *_fprintf_r*, *_asprintf_r*, + *_sprintf_r*, *_snprintf_r*, *_asnprintf_r* are simply + reentrant versions of the functions above. + + + +**STATUS CODES:** + +On success, *sprintf* and *asprintf* return the number of bytes in +the output string, except the concluding *NUL* is not counted. +*snprintf* returns the number of bytes that would be in the output +string, except the concluding *NUL* is not counted. *printf* and +*fprintf* return the number of characters transmitted. +*asnprintf* returns the original ``str`` if there was enough room, +otherwise it returns an allocated string. + +If an error occurs, the result of *printf*, *fprintf*, +*snprintf*, and *asprintf* is a negative value, and the result of +*asnprintf* is NULL. No error returns occur for *sprintf*. For +*printf* and *fprintf*, *errno* may be set according to +*fputc*. For *asprintf* and *asnprintf*, *errno* may be set +to ENOMEM if allocation fails, and for *snprintf*, *errno* may be +set to EOVERFLOW if ``size`` or the output length exceeds INT_MAX. + + + +**BUGS:** + +The ````` (quote) flag does not work when locale`s thousands_sep is not empty. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/sscanf.rst b/posix-users/newlib/libc/stdio/sscanf.rst new file mode 100644 index 0000000..626dc93 --- /dev/null +++ b/posix-users/newlib/libc/stdio/sscanf.rst @@ -0,0 +1,401 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/sscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sscanf, fscanf, scanf: + +sscanf, fscanf, scanf - Scan and format input +----------------------------------------------------- +.. index:: sscanf +.. index:: fscanf +.. index:: scanf +.. index:: scan and format input + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + int scanf(const char *restrict format, ...); + int fscanf(FILE *restrict fd, const char *restrict format, ...); + int sscanf(const char *restrict str, const char *restrict format, ...); + + int _scanf_r(struct _reent *ptr, const char *restrict format, ...); + int _fscanf_r(struct _reent *ptr, FILE *restrict fd, + const char *restrict format, ...); + int _sscanf_r(struct _reent *ptr, const char *restrict str, + const char *restrict format, ...); + + + +**DESCRIPTION:** + + *scanf* scans a series of input fields from standard input, + one character at a time. Each field is interpreted according to + a format specifier passed to *scanf* in the format string at + **``format]*>. *scanf* stores the interpreted input from + each field at the address passed to it as the corresponding argument + following ``format``. You must supply the same number of + format specifiers and address arguments as there are input fields. + + There must be sufficient address arguments for the given format + specifiers; if not the results are unpredictable and likely + disasterous. Excess address arguments are merely ignored. + + *scanf* often produces unexpected results if the input diverges from + an expected pattern. Since the combination of *gets* or *fgets* + followed by *sscanf* is safe and easy, that is the preferred way + to be certain that a program is synchronized with input at the end + of a line. + + *fscanf* and *sscanf* are identical to *scanf*, other than the + source of input: *fscanf* reads from a file, and *sscanf* + from a string. + + The routines *_scanf_r*, *_fscanf_r*, and *_sscanf_r* are reentrant + versions of *scanf*, *fscanf*, and *sscanf* that take an additional + first argument pointing to a reentrancy structure. + + The string at **``format]*> is a character sequence composed + of zero or more directives. Directives are composed of + one or more whitespace characters, non-whitespace characters, + and format specifications. + + Whitespace characters are blank (* *), tab (*\t*), or + newline (*\n*). + When *scanf* encounters a whitespace character in the format string + it will read (but not store) all consecutive whitespace characters + up to the next non-whitespace character in the input. + + Non-whitespace characters are all other ASCII characters except the + percent sign (*%*). When *scanf* encounters a non-whitespace + character in the format string it will read, but not store + a matching non-whitespace character. + + Format specifications tell *scanf* to read and convert characters + from the input field into specific types of values, and store then + in the locations specified by the address arguments. + + Trailing whitespace is left unread unless explicitly + matched in the format string. + + The format specifiers must begin with a percent sign (*%*) + and have the following form: + +. %[*][``width``][``size``]``type`` + + Each format specification begins with the percent character (*%*). + The other fields are: + O+ + o * + + an optional marker; if present, it suppresses interpretation and + assignment of this input field. + + o ``width`` + + an optional maximum field width: a decimal integer, + which controls the maximum number of characters that + will be read before converting the current input field. If the + input field has fewer than ``width`` characters, *scanf* + reads all the characters in the field, and then + proceeds with the next field and its format specification. + + If a whitespace or a non-convertable character occurs + before ``width`` character are read, the characters up + to that character are read, converted, and stored. + Then *scanf* proceeds to the next format specification. + + o ``size`` + + *h*, *j*, *l*, *L*, *t*, and *z* are optional size + characters which override the default way that *scanf* + interprets the data type of the corresponding argument. + + @multitable @columnfractions 0.18 0.30 0.52 + @headitem + Modifier + @tab + Type(s) + @tab + @item + hh + @tab + d, i, o, u, x, n + @tab + convert input to char, store in char object + @item + h + @tab + d, i, o, u, x, n + @tab + convert input to short, store in short object + @item + h + @tab + D, I, O, U, X, e, f, c, s, p + @tab + no effect + @item + j + @tab + d, i, o, u, x, n + @tab + convert input to intmax_t, store in intmax_t object + @item + j + @tab + all others + @tab + no effect + @item + l + @tab + d, i, o, u, x, n + @tab + convert input to long, store in long object + @item + l + @tab + e, f, g + @tab + convert input to double, store in a double object + @item + l + @tab + D, I, O, U, X, c, s, p + @tab + no effect + @item + ll + @tab + d, i, o, u, x, n + @tab + convert to long long, store in long long object + @item + L + @tab + d, i, o, u, x, n + @tab + convert to long long, store in long long object + @item + L + @tab + e, f, g, E, G + @tab + convert to long double, store in long double object + @item + L + @tab + all others + @tab + no effect + @item + t + @tab + d, i, o, u, x, n + @tab + convert input to ptrdiff_t, store in ptrdiff_t object + @item + t + @tab + all others + @tab + no effect + @item + z + @tab + d, i, o, u, x, n + @tab + convert input to size_t, store in size_t object + @item + z + @tab + all others + @tab + no effect + @end multitable + + o ``type`` + + A character to specify what kind of conversion + *scanf* performs. Here is a table of the conversion + characters: + + o+ + o % + No conversion is done; the percent character (*%*) is stored. + + o c + Scans one character. Corresponding ``arg``: *(char *arg)*. + + o s + Reads a character string into the array supplied. + Corresponding ``arg``: *(char arg[])*. + + o [``pattern``] + Reads a non-empty character string into memory + starting at ``arg``. This area must be large + enough to accept the sequence and a + terminating null character which will be added + automatically. (``pattern`` is discussed in the paragraph following + this table). Corresponding ``arg``: *(char *arg)*. + + o d + Reads a decimal integer into the corresponding ``arg``: *(int *arg)*. + + o D + Reads a decimal integer into the corresponding + ``arg``: *(long *arg)*. + + o o + Reads an octal integer into the corresponding ``arg``: *(int *arg)*. + + o O + Reads an octal integer into the corresponding ``arg``: *(long *arg)*. + + o u + Reads an unsigned decimal integer into the corresponding + ``arg``: *(unsigned int *arg)*. + + o U + Reads an unsigned decimal integer into the corresponding ``arg``: + *(unsigned long *arg)*. + + o x,X + Read a hexadecimal integer into the corresponding ``arg``: + *(int *arg)*. + + o e, f, g + Read a floating-point number into the corresponding ``arg``: + *(float *arg)*. + + o E, F, G + Read a floating-point number into the corresponding ``arg``: + *(double *arg)*. + + o i + Reads a decimal, octal or hexadecimal integer into the + corresponding ``arg``: *(int *arg)*. + + o I + Reads a decimal, octal or hexadecimal integer into the + corresponding ``arg``: *(long *arg)*. + + o n + Stores the number of characters read in the corresponding + ``arg``: *(int *arg)*. + + o p + Stores a scanned pointer. ANSI C leaves the details + to each implementation; this implementation treats + *%p* exactly the same as *%U*. Corresponding + ``arg``: *(void **arg)*. + o- + + A ``pattern`` of characters surrounded by square brackets can be used + instead of the *s* type character. ``pattern`` is a set of + characters which define a search set of possible characters making up + the *scanf* input field. If the first character in the brackets is a + caret (*^*), the search set is inverted to include all ASCII characters + except those between the brackets. There is also a range facility + which you can use as a shortcut. *%[0-9] * matches all decimal digits. + The hyphen must not be the first or last character in the set. + The character prior to the hyphen must be lexically less than the + character after it. + + Here are some ``pattern`` examples: + o+ + o %[abcd] + matches strings containing only *a*, *b*, *c*, and *d*. + + o %[^abcd] + matches strings containing any characters except *a*, *b*, + *c*, or *d* + + o %[A-DW-Z] + matches strings containing *A*, *B*, *C*, *D*, *W*, + *X*, *Y*, *Z* + + o %[z-a] + matches the characters *z*, *-*, and *a* + o- + + Floating point numbers (for field types *e*, *f*, *g*, *E*, + *F*, *G*) must correspond to the following general form: + +. [+/-] ddddd[.]ddd [E|e[+|-]ddd] + + where objects inclosed in square brackets are optional, and *ddd* + represents decimal, octal, or hexadecimal digits. + O- + + + +**STATUS CODES:** + + *scanf* returns the number of input fields successfully + scanned, converted and stored; the return value does + not include scanned fields which were not stored. + + If *scanf* attempts to read at end-of-file, the return + value is *EOF*. + + If no fields were stored, the return value is *0*. + + *scanf* might stop scanning a particular field before + reaching the normal field end character, or may + terminate entirely. + + *scanf* stops scanning and storing the current field + and moves to the next input field (if any) + in any of the following situations: + + O+ + o The assignment suppressing character (***) appears + after the *%* in the format specification; the current + input field is scanned but not stored. + + o ``width`` characters have been read (``width`` is a + width specification, a positive decimal integer). + + o The next character read cannot be converted + under the the current format (for example, + if a *Z* is read when the format is decimal). + + o The next character in the input field does not appear + in the search set (or does appear in the inverted search set). + O- + + When *scanf* stops scanning the current input field for one of + these reasons, the next character is considered unread and + used as the first character of the following input field, or the + first character in a subsequent read operation on the input. + + *scanf* will terminate under the following circumstances: + + O+ + o The next character in the input field conflicts + with a corresponding non-whitespace character in the + format string. + + o The next character in the input field is *EOF*. + + o The format string has been exhausted. + O- + + When the format string contains a character sequence that is + not part of a format specification, the same character + sequence must appear in the input; *scanf* will + scan but not store the matched characters. If a + conflict occurs, the first conflicting character remains in the input + as if it had never been read. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/stdio_ext.rst b/posix-users/newlib/libc/stdio/stdio_ext.rst new file mode 100644 index 0000000..b615dc6 --- /dev/null +++ b/posix-users/newlib/libc/stdio/stdio_ext.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/stdio_ext.c + +.. COMMENT: Generated on: 2018-08-20 + +.. stdio_ext*,*__fbufsize*,*__fpending*,*__flbf*,*__freadable*,*__fwritable*,*__freading*,*__fwriting: + +stdio_ext*,*__fbufsize*,*__fpending*,*__flbf*,*__freadable*,*__fwritable*,*__freading*,*__fwriting - Access internals of file structure +------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: stdio_ext*,*__fbufsize*,*__fpending*,*__flbf*,*__freadable*,*__fwritable*,*__freading*,*__fwriting +.. index:: access internals of FILE structure + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdio_ext.h> + size_t __fbufsize(FILE *fp); + size_t __fpending(FILE *fp); + int __flbf(FILE *fp); + int __freadable(FILE *fp); + int __fwritable(FILE *fp); + int __freading(FILE *fp); + int __fwriting(FILE *fp); + + + +**DESCRIPTION:** + +These functions provides access to the internals of the FILE structure ``fp``. + + + +**STATUS CODES:** + +*__fbufsize* returns the number of bytes in the buffer of stream ``fp``. + +*__fpending* returns the number of bytes in the output buffer of stream ``fp``. + +*__flbf* returns nonzero if stream ``fp`` is line-buffered, and *0* if not. + +*__freadable* returns nonzero if stream ``fp`` may be read, and *0* if not. + +*__fwritable* returns nonzero if stream ``fp`` may be written, and *0* if not. + +*__freading* returns nonzero if stream ``fp`` if the last operation on +it was a read, or if it read-only, and *0* if not. + +*__fwriting* returns nonzero if stream ``fp`` if the last operation on +it was a write, or if it write-only, and *0* if not. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/swprintf.rst b/posix-users/newlib/libc/stdio/swprintf.rst new file mode 100644 index 0000000..b9c10d1 --- /dev/null +++ b/posix-users/newlib/libc/stdio/swprintf.rst @@ -0,0 +1,528 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/swprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. swprintf, fwprintf, wprintf: + +swprintf, fwprintf, wprintf - Wide character format output +------------------------------------------------------------------ +.. index:: swprintf +.. index:: fwprintf +.. index:: wprintf +.. index:: wide character format output + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + + int wprintf(const wchar_t *format, ...); + int fwprintf(FILE *__restrict fd, + const wchar_t *__restrict format, ...); + int swprintf(wchar_t *__restrict str, size_t size, + const wchar_t *__restrict format, ...); + + int _wprintf_r(struct _reent *ptr, const wchar_t *format, ...); + int _fwprintf_r(struct _reent *ptr, FILE *fd, + const wchar_t *format, ...); + int _swprintf_r(struct _reent *ptr, wchar_t *str, + size_t size, const wchar_t *format, ...); + + + +**DESCRIPTION:** + + *wprintf* accepts a series of arguments, applies to each a + format specifier from **``format]*>, and writes the + formatted data to *stdout*, without a terminating NUL + wide character. The behavior of *wprintf* is undefined if there + are not enough arguments for the format or if any argument is not the + right type for the corresponding conversion specifier. *wprintf* + returns when it reaches the end of the format string. If there are + more arguments than the format requires, excess arguments are + ignored. + + *fwprintf* is like *wprintf*, except that output is directed + to the stream ``fd`` rather than *stdout*. + + *swprintf* is like *wprintf*, except that output is directed + to the buffer ``str`` with a terminating wide *NUL*, and the + resulting string length is limited to at most ``size`` wide characters, + including the terminating *NUL*. It is considered an error if the + output (including the terminating wide-*NULL*) does not fit into + ``size`` wide characters. (This error behavior is not the same as for + *snprintf*, which *swprintf* is otherwise completely analogous to. + While *snprintf* allows the needed size to be known simply by giving + ``size``=0, *swprintf* does not, giving an error instead.) + + For *swprintf* the behavior is undefined if the output + **``str]*> overlaps with one of the arguments. Behavior is also + undefined if the argument for *%n* within **``format]*> + overlaps another argument. + + ``format`` is a pointer to a wide character string containing two + types of objects: ordinary characters (other than *%*), + which are copied unchanged to the output, and conversion + specifications, each of which is introduced by *%*. (To + include *%* in the output, use *%%* in the format string.) + A conversion specification has the following form: + +. %[``pos``][``flags``][``width``][.``prec``][``size``]``type`` + + The fields of the conversion specification have the following + meanings: + + O+ + o ``pos`` + + Conversions normally consume arguments in the order that they + are presented. However, it is possible to consume arguments + out of order, and reuse an argument for more than one + conversion specification (although the behavior is undefined + if the same argument is requested with different types), by + specifying ``pos``, which is a decimal integer followed by + `$`. The integer must be between 1 and <NL_ARGMAX> from + limits.h, and if argument *%n$* is requested, all earlier + arguments must be requested somewhere within ``format``. If + positional parameters are used, then all conversion + specifications except for *%%* must specify a position. + This positional parameters method is a POSIX extension to the C + standard definition for the functions. + + o ``flags`` + + ``flags`` is an optional sequence of characters which control + output justification, numeric signs, decimal points, trailing + zeros, and octal and hex prefixes. The flag characters are + minus (*-*), plus (*+*), space ( ), zero (*0*), sharp + (*#*), and quote (*`*). They can appear in any + combination, although not all flags can be used for all + conversion specification types. + + o+ + o ` + A POSIX extension to the C standard. However, this + implementation presently treats it as a no-op, which + is the default behavior for the C locale, anyway. (If + it did what it is supposed to, when ``type`` were *i*, + *d*, *u*, *f*, *F*, *g*, or *G*, the + integer portion of the conversion would be formatted + with thousands` grouping wide characters.) + + o - + The result of the conversion is left + justified, and the right is padded with + blanks. If you do not use this flag, the + result is right justified, and padded on the + left. + + o + + The result of a signed conversion (as + determined by ``type`` of *d*, *i*, *a*, + *A*, *e*, *E*, *f*, *F*, *g*, or + *G*) will always begin with a plus or minus + sign. (If you do not use this flag, positive + values do not begin with a plus sign.) + + o " " (space) + If the first character of a signed conversion + specification is not a sign, or if a signed + conversion results in no characters, the + result will begin with a space. If the space + ( ) flag and the plus (*+*) flag both + appear, the space flag is ignored. + + o 0 + If the ``type`` character is *d*, *i*, + *o*, *u*, *x*, *X*, *a*, *A*, + *e*, *E*, *f*, *F*, *g*, or *G*: leading + zeros are used to pad the field width + (following any indication of sign or base); no + spaces are used for padding. If the zero + (*0*) and minus (*-*) flags both appear, + the zero (*0*) flag will be ignored. For + *d*, *i*, *o*, *u*, *x*, and *X* + conversions, if a precision ``prec`` is + specified, the zero (*0*) flag is ignored. + + Note that *0* is interpreted as a flag, not + as the beginning of a field width. + + o # + The result is to be converted to an + alternative form, according to the ``type`` + character. + o- + + The alternative form output with the # flag depends on the ``type`` + character: + + o+ + o o + Increases precision to force the first + digit of the result to be a zero. + + o x + A non-zero result will have a *0x* + prefix. + + o X + A non-zero result will have a *0X* + prefix. + + o a, A, e, E, f, or F + The result will always contain a + decimal point even if no digits follow + the point. (Normally, a decimal point + appears only if a digit follows it.) + Trailing zeros are removed. + + o g or G + The result will always contain a + decimal point even if no digits follow + the point. Trailing zeros are not + removed. + + o all others + Undefined. + + o- + + + o ``width`` + + ``width`` is an optional minimum field width. You can + either specify it directly as a decimal integer, or + indirectly by using instead an asterisk (***), in + which case an *int* argument is used as the field + width. If positional arguments are used, then the + width must also be specified positionally as **m$*, + with m as a decimal integer. Negative field widths + are treated as specifying the minus (*-*) flag for + left justfication, along with a positive field width. + The resulting format may be wider than the specified + width. + + o ``prec`` + + ``prec`` is an optional field; if present, it is + introduced with `*.*` (a period). You can specify + the precision either directly as a decimal integer or + indirectly by using an asterisk (***), in which case + an *int* argument is used as the precision. If + positional arguments are used, then the precision must + also be specified positionally as **m$*, with m as a + decimal integer. Supplying a negative precision is + equivalent to omitting the precision. If only a + period is specified the precision is zero. The effect + depends on the conversion ``type``. + + o+ + o d, i, o, u, x, or X + Minimum number of digits to appear. If no + precision is given, defaults to 1. + + o a or A + Number of digits to appear after the decimal + point. If no precision is given, the + precision defaults to the minimum needed for + an exact representation. + + o e, E, f or F + Number of digits to appear after the decimal + point. If no precision is given, the + precision defaults to 6. + + o g or G + Maximum number of significant digits. A + precision of 0 is treated the same as a + precision of 1. If no precision is given, the + precision defaults to 6. + + o s or S + Maximum number of characters to print from the + string. If no precision is given, the entire + string is printed. + + o all others + undefined. + + o- + + o ``size`` + + ``size`` is an optional modifier that changes the data + type that the corresponding argument has. Behavior is + unspecified if a size is given that does not match the + ``type``. + + o+ + o hh + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument should be + converted to a *signed char* or *unsigned + char* before printing. + + With *n*, specifies that the argument is a + pointer to a *signed char*. + + o h + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument should be + converted to a *short* or *unsigned short* + before printing. + + With *n*, specifies that the argument is a + pointer to a *short*. + + o l + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *long* or *unsigned long*. + + With *c*, specifies that the argument has + type *wint_t*. + + With *s*, specifies that the argument is a + pointer to *wchar_t*. + + With *n*, specifies that the argument is a + pointer to a *long*. + + With *a*, *A*, *e*, *E*, *f*, *F*, + *g*, or *G*, has no effect (because of + vararg promotion rules, there is no need to + distinguish between *float* and *double*). + + o ll + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *long long* or *unsigned long long*. + + With *n*, specifies that the argument is a + pointer to a *long long*. + + o j + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is an + *intmax_t* or *uintmax_t*. + + With *n*, specifies that the argument is a + pointer to an *intmax_t*. + + o z + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a *size_t*. + + With *n*, specifies that the argument is a + pointer to a *size_t*. + + o t + With *d*, *i*, *o*, *u*, *x*, or + *X*, specifies that the argument is a + *ptrdiff_t*. + + With *n*, specifies that the argument is a + pointer to a *ptrdiff_t*. + + o L + With *a*, *A*, *e*, *E*, *f*, *F*, + *g*, or *G*, specifies that the argument + is a *long double*. + + o- + + o ``type`` + + ``type`` specifies what kind of conversion *wprintf* + performs. Here is a table of these: + + o+ + o % + Prints the percent character (*%*). + + o c + If no *l* qualifier is present, the int argument shall + be converted to a wide character as if by calling + the btowc() function and the resulting wide character + shall be written. Otherwise, the wint_t argument + shall be converted to wchar_t, and written. + + o C + Short for *%lc*. A POSIX extension to the C standard. + + o s + If no *l* qualifier is present, the application + shall ensure that the argument is a pointer to a + character array containing a character sequence + beginning in the initial shift state. Characters + from the array shall be converted as if by repeated + calls to the mbrtowc() function, with the conversion + state described by an mbstate_t object initialized to + zero before the first character is converted, and + written up to (but not including) the terminating + null wide character. If the precision is specified, + no more than that many wide characters shall be + written. If the precision is not specified, or is + greater than the size of the array, the application + shall ensure that the array contains a null wide + character. + + If an *l* qualifier is present, the application + shall ensure that the argument is a pointer to an + array of type wchar_t. Wide characters from the array + shall be written up to (but not including) a + terminating null wide character. If no precision is + specified, or is greater than the size of the array, + the application shall ensure that the array contains + a null wide character. If a precision is specified, + no more than that many wide characters shall be + written. + + o S + Short for *%ls*. A POSIX extension to the C standard. + + o d or i + Prints a signed decimal integer; takes an + *int*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o o + Prints an unsigned octal integer; takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o u + Prints an unsigned decimal integer; takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o x + Prints an unsigned hexadecimal integer (using + *abcdef* as digits beyond *9*); takes an + *unsigned*. Leading zeros are inserted as + necessary to reach the precision. A value of 0 with + a precision of 0 produces an empty string. + + o X + Like *x*, but uses *ABCDEF* as digits + beyond *9*. + + o f + Prints a signed value of the form + *[-]9999.9999*, with the precision + determining how many digits follow the decimal + point; takes a *double* (remember that + *float* promotes to *double* as a vararg). + The low order digit is rounded to even. If + the precision results in at most DECIMAL_DIG + digits, the result is rounded correctly; if + more than DECIMAL_DIG digits are printed, the + result is only guaranteed to round back to the + original value. + + If the value is infinite, the result is + *inf*, and no zero padding is performed. If + the value is not a number, the result is + *nan*, and no zero padding is performed. + + o F + Like *f*, but uses *INF* and *NAN* for + non-finite numbers. + + o e + Prints a signed value of the form + *[-]9.9999e[+|-]999*; takes a *double*. + The digit before the decimal point is non-zero + if the value is non-zero. The precision + determines how many digits appear between + *.* and *e*, and the exponent always + contains at least two digits. The value zero + has an exponent of zero. If the value is not + finite, it is printed like *f*. + + o E + Like *e*, but using *E* to introduce the + exponent, and like *F* for non-finite + values. + + o g + Prints a signed value in either *f* or *e* + form, based on the given value and + precision---an exponent less than -4 or + greater than the precision selects the *e* + form. Trailing zeros and the decimal point + are printed only if necessary; takes a + *double*. + + o G + Like *g*, except use *F* or *E* form. + + o a + Prints a signed value of the form + *[-]0x1.ffffp[+|-]9*; takes a *double*. + The letters *abcdef* are used for digits + beyond *9*. The precision determines how + many digits appear after the decimal point. + The exponent contains at least one digit, and + is a decimal value representing the power of + 2; a value of 0 has an exponent of 0. + Non-finite values are printed like *f*. + + o A + Like *a*, except uses *X*, *P*, and + *ABCDEF* instead of lower case. + + o n + Takes a pointer to *int*, and stores a count + of the number of bytes written so far. No + output is created. + + o p + Takes a pointer to *void*, and prints it in + an implementation-defined format. This + implementation is similar to *%#tx*), except + that *0x* appears even for the NULL pointer. + + o m + Prints the output of *strerror(errno)*; no + argument is required. A GNU extension. + + o- + O- + + *_wprintf_r*, *_fwprintf_r*, *_swprintf_r*, are simply + reentrant versions of the functions above. + + + +**STATUS CODES:** + +On success, *swprintf* return the number of wide characters in +the output string, except the concluding *NUL* is not counted. +*wprintf* and *fwprintf* return the number of characters transmitted. + +If an error occurs, the result of *wprintf*, *fwprintf*, and +*swprintf* is a negative value. For *wprintf* and *fwprintf*, +*errno* may be set according to *fputwc*. For *swprintf*, *errno* +may be set to EOVERFLOW if ``size`` is greater than INT_MAX / sizeof (wchar_t), +or when the output does not fit into ``size`` wide characters (including the +terminating wide *NULL*). + + + +**BUGS:** + +The ````` (quote) flag does not work when locale`s thousands_sep is not empty. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/swscanf.rst b/posix-users/newlib/libc/stdio/swscanf.rst new file mode 100644 index 0000000..a239eaf --- /dev/null +++ b/posix-users/newlib/libc/stdio/swscanf.rst @@ -0,0 +1,395 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/swscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. swscanf, fwscanf, wscanf: + +swscanf, fwscanf, wscanf - Scan and format wide character input +----------------------------------------------------------------------- +.. index:: swscanf +.. index:: fwscanf +.. index:: wscanf +.. index:: scan and format wide character input + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + int wscanf(const wchar_t *__restrict format, ...); + int fwscanf(FILE *__restrict fd, + const wchar_t *__restrict format, ...); + int swscanf(const wchar_t *__restrict str, + const wchar_t *__restrict format, ...); + + int _wscanf_r(struct _reent *ptr, const wchar_t *format, ...); + int _fwscanf_r(struct _reent *ptr, FILE *fd, + const wchar_t *format, ...); + int _swscanf_r(struct _reent *ptr, const wchar_t *str, + const wchar_t *format, ...); + + + +**DESCRIPTION:** + + *wscanf* scans a series of input fields from standard input, + one wide character at a time. Each field is interpreted according to + a format specifier passed to *wscanf* in the format string at + **``format]*>. *wscanf* stores the interpreted input from + each field at the address passed to it as the corresponding argument + following ``format``. You must supply the same number of + format specifiers and address arguments as there are input fields. + + There must be sufficient address arguments for the given format + specifiers; if not the results are unpredictable and likely + disasterous. Excess address arguments are merely ignored. + + *wscanf* often produces unexpected results if the input diverges from + an expected pattern. Since the combination of *gets* or *fgets* + followed by *swscanf* is safe and easy, that is the preferred way + to be certain that a program is synchronized with input at the end + of a line. + + *fwscanf* and *swscanf* are identical to *wscanf*, other than the + source of input: *fwscanf* reads from a file, and *swscanf* + from a string. + + The routines *_wscanf_r*, *_fwscanf_r*, and *_swscanf_r* are reentrant + versions of *wscanf*, *fwscanf*, and *swscanf* that take an additional + first argument pointing to a reentrancy structure. + + The string at **``format]*> is a wide character sequence composed + of zero or more directives. Directives are composed of + one or more whitespace characters, non-whitespace characters, + and format specifications. + + Whitespace characters are blank (* *), tab (*\t*), or + newline (*\n*). + When *wscanf* encounters a whitespace character in the format string + it will read (but not store) all consecutive whitespace characters + up to the next non-whitespace character in the input. + + Non-whitespace characters are all other ASCII characters except the + percent sign (*%*). When *wscanf* encounters a non-whitespace + character in the format string it will read, but not store + a matching non-whitespace character. + + Format specifications tell *wscanf* to read and convert characters + from the input field into specific types of values, and store then + in the locations specified by the address arguments. + + Trailing whitespace is left unread unless explicitly + matched in the format string. + + The format specifiers must begin with a percent sign (*%*) + and have the following form: + +. %[*][``width``][``size``]``type`` + + Each format specification begins with the percent character (*%*). + The other fields are: + O+ + o * + + an optional marker; if present, it suppresses interpretation and + assignment of this input field. + + o ``width`` + + an optional maximum field width: a decimal integer, + which controls the maximum number of characters that + will be read before converting the current input field. If the + input field has fewer than ``width`` characters, *wscanf* + reads all the characters in the field, and then + proceeds with the next field and its format specification. + + If a whitespace or a non-convertable wide character occurs + before ``width`` character are read, the characters up + to that character are read, converted, and stored. + Then *wscanf* proceeds to the next format specification. + + o ``size`` + + *h*, *j*, *l*, *L*, *t*, and *z* are optional size + characters which override the default way that *wscanf* + interprets the data type of the corresponding argument. + + @multitable @columnfractions 0.18 0.30 0.52 + @headitem + Modifier + @tab + Type(s) + @tab + @item + hh + @tab + d, i, o, u, x, n + @tab + convert input to char, store in char object + @item + h + @tab + d, i, o, u, x, n + @tab + convert input to short, store in short object + @item + h + @tab + e, f, c, s, p + @tab + no effect + @item + j + @tab + d, i, o, u, x, n + @tab + convert input to intmax_t, store in intmax_t object + @item + j + @tab + all others + @tab + no effect + @item + l + @tab + d, i, o, u, x, n + @tab + convert input to long, store in long object + @item + l + @tab + e, f, g + @tab + convert input to double, store in a double object + @item + l + @tab + c, s, [ + @tab + the input is stored in a wchar_t object + @item + l + @tab + p + @tab + no effect + @item + ll + @tab + d, i, o, u, x, n + @tab + convert to long long, store in long long object + @item + L + @tab + d, i, o, u, x, n + @tab + convert to long long, store in long long object + @item + L + @tab + e, f, g, E, G + @tab + convert to long double, store in long double object + @item + L + @tab + all others + @tab + no effect + @item + t + @tab + d, i, o, u, x, n + @tab + convert input to ptrdiff_t, store in ptrdiff_t object + @item + t + @tab + all others + @tab + no effect + @item + z + @tab + d, i, o, u, x, n + @tab + convert input to size_t, store in size_t object + @item + z + @tab + all others + @tab + no effect + @end multitable + + o ``type`` + + A character to specify what kind of conversion + *wscanf* performs. Here is a table of the conversion + characters: + + o+ + o % + No conversion is done; the percent character (*%*) is stored. + + o c + Scans one wide character. Corresponding ``arg``: *(char *arg)*. + Otherwise, if an *l* specifier is present, the corresponding + ``arg`` is a *(wchar_t *arg)*. + + o s + Reads a character string into the array supplied. + Corresponding ``arg``: *(char arg[])*. + If an *l* specifier is present, the corresponding ``arg`` is a *(wchar_t *arg)*. + + o [``pattern``] + Reads a non-empty character string into memory + starting at ``arg``. This area must be large + enough to accept the sequence and a + terminating null character which will be added + automatically. (``pattern`` is discussed in the paragraph following + this table). Corresponding ``arg``: *(char *arg)*. + If an *l* specifier is present, the corresponding ``arg`` is + a *(wchar_t *arg)*. + + o d + Reads a decimal integer into the corresponding ``arg``: *(int *arg)*. + + o o + Reads an octal integer into the corresponding ``arg``: *(int *arg)*. + + o u + Reads an unsigned decimal integer into the corresponding + ``arg``: *(unsigned int *arg)*. + + o x,X + Read a hexadecimal integer into the corresponding ``arg``: + *(int *arg)*. + + o e, f, g + Read a floating-point number into the corresponding ``arg``: + *(float *arg)*. + + o E, F, G + Read a floating-point number into the corresponding ``arg``: + *(double *arg)*. + + o i + Reads a decimal, octal or hexadecimal integer into the + corresponding ``arg``: *(int *arg)*. + + o n + Stores the number of characters read in the corresponding + ``arg``: *(int *arg)*. + + o p + Stores a scanned pointer. ANSI C leaves the details + to each implementation; this implementation treats + *%p* exactly the same as *%U*. Corresponding + ``arg``: *(void **arg)*. + o- + + A ``pattern`` of characters surrounded by square brackets can be used + instead of the *s* type character. ``pattern`` is a set of + characters which define a search set of possible characters making up + the *wscanf* input field. If the first character in the brackets is a + caret (*^*), the search set is inverted to include all ASCII characters + except those between the brackets. There is no range facility as is + defined in the corresponding non-wide character scanf functions. + Ranges are not part of the POSIX standard. + + Here are some ``pattern`` examples: + o+ + o %[abcd] + matches wide character strings containing only + *a*, *b*, *c*, and *d*. + + o %[^abcd] + matches wide character strings containing any characters except + *a*, *b*, *c*, or *d*. + + o %[A-DW-Z] + Note: No wide character ranges, so this expression matches wide + character strings containing *A*, *-*, *D*, *W*, *Z*. + o- + + Floating point numbers (for field types *e*, *f*, *g*, *E*, + *F*, *G*) must correspond to the following general form: + +. [+/-] ddddd[.]ddd [E|e[+|-]ddd] + + where objects inclosed in square brackets are optional, and *ddd* + represents decimal, octal, or hexadecimal digits. + O- + + + +**STATUS CODES:** + + *wscanf* returns the number of input fields successfully + scanned, converted and stored; the return value does + not include scanned fields which were not stored. + + If *wscanf* attempts to read at end-of-file, the return + value is *EOF*. + + If no fields were stored, the return value is *0*. + + *wscanf* might stop scanning a particular field before + reaching the normal field end character, or may + terminate entirely. + + *wscanf* stops scanning and storing the current field + and moves to the next input field (if any) + in any of the following situations: + + O+ + o The assignment suppressing character (***) appears + after the *%* in the format specification; the current + input field is scanned but not stored. + + o ``width`` characters have been read (``width`` is a + width specification, a positive decimal integer). + + o The next wide character read cannot be converted + under the the current format (for example, + if a *Z* is read when the format is decimal). + + o The next wide character in the input field does not appear + in the search set (or does appear in the inverted search set). + O- + + When *wscanf* stops scanning the current input field for one of + these reasons, the next character is considered unread and + used as the first character of the following input field, or the + first character in a subsequent read operation on the input. + + *wscanf* will terminate under the following circumstances: + + O+ + o The next wide character in the input field conflicts + with a corresponding non-whitespace character in the + format string. + + o The next wide character in the input field is *WEOF*. + + o The format string has been exhausted. + O- + + When the format string contains a wide character sequence that is + not part of a format specification, the same wide character + sequence must appear in the input; *wscanf* will + scan but not store the matched characters. If a + conflict occurs, the first conflicting wide character remains in the + input as if it had never been read. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/tmpfile.rst b/posix-users/newlib/libc/stdio/tmpfile.rst new file mode 100644 index 0000000..5a3f3f0 --- /dev/null +++ b/posix-users/newlib/libc/stdio/tmpfile.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/tmpfile.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tmpfile: + +tmpfile - Create a temporary file +------------------------------------- +.. index:: tmpfile +.. index:: create a temporary file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *tmpfile(void); + + FILE *_tmpfile_r(struct _reent *reent); + + + +**DESCRIPTION:** + +Create a temporary file (a file which will be deleted automatically), +using a name generated by *tmpnam*. The temporary file is opened with +the mode *"wb+"*, permitting you to read and write anywhere in it +as a binary file (without any data transformations the host system may +perform for text files). + +The alternate function *_tmpfile_r* is a reentrant version. The +argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*tmpfile* normally returns a pointer to the temporary file. If no +temporary file could be created, the result is NULL, and *errno* +records the reason for failure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/tmpnam.rst b/posix-users/newlib/libc/stdio/tmpnam.rst new file mode 100644 index 0000000..fa5fa48 --- /dev/null +++ b/posix-users/newlib/libc/stdio/tmpnam.rst @@ -0,0 +1,78 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/tmpnam.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tmpnam, tempnam: + +tmpnam, tempnam - Name for a temporary file +------------------------------------------------- +.. index:: tmpnam +.. index:: tempnam +.. index:: name for a temporary file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + char *tmpnam(char *s); + char *tempnam(char *dir, char *pfx); + char *_tmpnam_r(struct _reent *reent, char *s); + char *_tempnam_r(struct _reent *reent, char *dir, char *pfx); + + + +**DESCRIPTION:** + +Use either of these functions to generate a name for a temporary file. +The generated name is guaranteed to avoid collision with other files +(for up to *TMP_MAX* calls of either function). + +*tmpnam* generates file names with the value of *P_tmpdir* +(defined in `*stdio.h*`) as the leading directory component of the path. + +You can use the *tmpnam* argument ``s`` to specify a suitable area +of memory for the generated filename; otherwise, you can call +*tmpnam(NULL)* to use an internal static buffer. + +*tempnam* allows you more control over the generated filename: you +can use the argument ``dir`` to specify the path to a directory for +temporary files, and you can use the argument ``pfx`` to specify a +prefix for the base filename. + +If ``dir`` is *NULL*, *tempnam* will attempt to use the value of +environment variable *TMPDIR* instead; if there is no such value, +*tempnam* uses the value of *P_tmpdir* (defined in `*stdio.h*`). + +If you don`t need any particular prefix to the basename of temporary +files, you can pass *NULL* as the ``pfx`` argument to *tempnam*. + +*_tmpnam_r* and *_tempnam_r* are reentrant versions of *tmpnam* +and *tempnam* respectively. The extra argument ``reent`` is a +pointer to a reentrancy structure. + + + +**WARNINGS:** + +The generated filenames are suitable for temporary files, but do not +in themselves make files temporary. Files with these names must still +be explicitly removed when you no longer want them. + +If you supply your own data area ``s`` for *tmpnam*, you must ensure +that it has room for at least *L_tmpnam* elements of type *char*. + + + +**STATUS CODES:** + +Both *tmpnam* and *tempnam* return a pointer to the newly +generated filename. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/ungetc.rst b/posix-users/newlib/libc/stdio/ungetc.rst new file mode 100644 index 0000000..80745a7 --- /dev/null +++ b/posix-users/newlib/libc/stdio/ungetc.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/ungetc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ungetc: + +ungetc - Push data back into a stream +----------------------------------------- +.. index:: ungetc +.. index:: push data back into a stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int ungetc(int c, FILE *stream); + + int _ungetc_r(struct _reent *reent, int c, FILE *stream); + + + +**DESCRIPTION:** + +*ungetc* is used to return bytes back to ``stream`` to be read again. +If ``c`` is EOF, the stream is unchanged. Otherwise, the unsigned +char ``c`` is put back on the stream, and subsequent reads will see +the bytes pushed back in reverse order. Pushed byes are lost if the +stream is repositioned, such as by *fseek*, *fsetpos*, or +*rewind*. + +The underlying file is not changed, but it is possible to push back +something different than what was originally read. Ungetting a +character will clear the end-of-stream marker, and decrement the file +position indicator. Pushing back beyond the beginning of a file gives +unspecified behavior. + +The alternate function *_ungetc_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +The character pushed back, or *EOF* on error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/ungetwc.rst b/posix-users/newlib/libc/stdio/ungetwc.rst new file mode 100644 index 0000000..be2704c --- /dev/null +++ b/posix-users/newlib/libc/stdio/ungetwc.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/ungetwc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ungetwc: + +ungetwc - Push wide character data back into a stream +--------------------------------------------------------- +.. index:: ungetwc +.. index:: push wide character data back into a stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <wchar.h> + wint_t ungetwc(wint_t wc, FILE *stream); + + wint_t _ungetwc_r(struct _reent *reent, wint_t wc, FILE *stream); + + + +**DESCRIPTION:** + +*ungetwc* is used to return wide characters back to ``stream`` to be +read again. If ``wc`` is WEOF, the stream is unchanged. Otherwise, the +wide character ``wc`` is put back on the stream, and subsequent reads will see +the wide chars pushed back in reverse order. Pushed wide chars are lost if the +stream is repositioned, such as by *fseek*, *fsetpos*, or +*rewind*. + +The underlying file is not changed, but it is possible to push back +something different than what was originally read. Ungetting a +character will clear the end-of-stream marker, and decrement the file +position indicator. Pushing back beyond the beginning of a file gives +unspecified behavior. + +The alternate function *_ungetwc_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +The wide character pushed back, or *WEOF* on error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/vfprintf.rst b/posix-users/newlib/libc/stdio/vfprintf.rst new file mode 100644 index 0000000..d54a14f --- /dev/null +++ b/posix-users/newlib/libc/stdio/vfprintf.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/vfprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfprintf, vprintf, vsprintf, vsnprintf, vasprintf, vasnprintf: + +vfprintf, vprintf, vsprintf, vsnprintf, vasprintf, vasnprintf - Format argument list +-------------------------------------------------------------------------------------------------- +.. index:: vfprintf +.. index:: vprintf +.. index:: vsprintf +.. index:: vsnprintf +.. index:: vasprintf +.. index:: vasnprintf +.. index:: format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int vprintf(const char *fmt, va_list list); + int vfprintf(FILE *fp, const char *fmt, va_list list); + int vsprintf(char *str, const char *fmt, va_list list); + int vsnprintf(char *str, size_t size, const char *fmt, + va_list list); + int vasprintf(char **strp, const char *fmt, va_list list); + char *vasnprintf(char *str, size_t *size, const char *fmt, + va_list list); + + int _vprintf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfprintf_r(struct _reent *reent, FILE *fp, + const char *fmt, va_list list); + int _vsprintf_r(struct _reent *reent, char *str, + const char *fmt, va_list list); + int _vasprintf_r(struct _reent *reent, char **str, + const char *fmt, va_list list); + int _vsnprintf_r(struct _reent *reent, char *str, + size_t size, const char *fmt, va_list list); + char *_vasnprintf_r(struct _reent *reent, char *str, + size_t *size, const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*vprintf*, *vfprintf*, *vasprintf*, *vsprintf*, *vsnprintf*, +and *vasnprintf* are (respectively) variants of *printf*, +*fprintf*, *asprintf*, *sprintf*, *snprintf*, and +*asnprintf*. They differ only in allowing their caller to pass the +variable argument list as a *va_list* object (initialized by +*va_start*) rather than directly accepting a variable number of +arguments. The caller is responsible for calling *va_end*. + +*_vprintf_r*, *_vfprintf_r*, *_vasprintf_r*, *_vsprintf_r*, +*_vsnprintf_r*, and *_vasnprintf_r* are reentrant versions of the +above. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/vfscanf.rst b/posix-users/newlib/libc/stdio/vfscanf.rst new file mode 100644 index 0000000..c71206f --- /dev/null +++ b/posix-users/newlib/libc/stdio/vfscanf.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/vfscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfscanf, vscanf, vsscanf: + +vfscanf, vscanf, vsscanf - Format argument list +------------------------------------------------------- +.. index:: vfscanf +.. index:: vscanf +.. index:: vsscanf +.. index:: format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int vscanf(const char *fmt, va_list list); + int vfscanf(FILE *fp, const char *fmt, va_list list); + int vsscanf(const char *str, const char *fmt, va_list list); + + int _vscanf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfscanf_r(struct _reent *reent, FILE *fp, const char *fmt, + va_list list); + int _vsscanf_r(struct _reent *reent, const char *str, + const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*vscanf*, *vfscanf*, and *vsscanf* are (respectively) variants +of *scanf*, *fscanf*, and *sscanf*. They differ only in +allowing their caller to pass the variable argument list as a +*va_list* object (initialized by *va_start*) rather than +directly accepting a variable number of arguments. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions: +*vscanf* returns the number of input fields successfully scanned, +converted, and stored; the return value does not include scanned +fields which were not stored. + +If *vscanf* attempts to read at end-of-file, the return value +is *EOF*. + +If no fields were stored, the return value is *0*. + +The routines *_vscanf_r*, *_vfscanf_f*, and *_vsscanf_r* are +reentrant versions which take an additional first parameter which points to the +reentrancy structure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/vfwprintf.rst b/posix-users/newlib/libc/stdio/vfwprintf.rst new file mode 100644 index 0000000..0b88476 --- /dev/null +++ b/posix-users/newlib/libc/stdio/vfwprintf.rst @@ -0,0 +1,68 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/vfwprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfwprintf, vwprintf, vswprintf: + +vfwprintf, vwprintf, vswprintf - Wide character format argument list +---------------------------------------------------------------------------- +.. index:: vfwprintf +.. index:: vwprintf +.. index:: vswprintf +.. index:: wide character format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + #include <wchar.h> + int vwprintf(const wchar_t *__restrict fmt, va_list list); + int vfwprintf(FILE *__restrict fp, + const wchar_t *__restrict fmt, va_list list); + int vswprintf(wchar_t * __restrict str, size_t size, + const wchar_t *__ restrict fmt, va_list list); + + int _vwprintf_r(struct _reent *reent, const wchar_t *fmt, + va_list list); + int _vfwprintf_r(struct _reent *reent, FILE *fp, + const wchar_t *fmt, va_list list); + int _vswprintf_r(struct _reent *reent, wchar_t *str, + size_t size, const wchar_t *fmt, va_list list); + + + +**DESCRIPTION:** + +*vwprintf*, *vfwprintf* and *vswprintf* are (respectively) variants +of *wprintf*, *fwprintf* and *swprintf*. They differ only in allowing +their caller to pass the variable argument list as a *va_list* object +(initialized by *va_start*) rather than directly accepting a variable +number of arguments. The caller is responsible for calling *va_end*. + +*_vwprintf_r*, *_vfwprintf_r* and *_vswprintf_r* are reentrant +versions of the above. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions. + + + +**PORTABILITY:** + +POSIX-1.2008 with extensions; C99 (compliant except for POSIX extensions). + +Supporting OS subroutines required: *close*, *fstat*, *isatty*, +*lseek*, *read*, *sbrk*, *write*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/vfwscanf.rst b/posix-users/newlib/libc/stdio/vfwscanf.rst new file mode 100644 index 0000000..121f368 --- /dev/null +++ b/posix-users/newlib/libc/stdio/vfwscanf.rst @@ -0,0 +1,67 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/vfwscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. vfwscanf, vwscanf, vswscanf: + +vfwscanf, vwscanf, vswscanf - Scan and format argument list from wide character input +--------------------------------------------------------------------------------------------- +.. index:: vfwscanf +.. index:: vwscanf +.. index:: vswscanf +.. index:: scan and format argument list from wide character input + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int vwscanf(const wchar_t *__restrict fmt, va_list list); + int vfwscanf(FILE *__restrict fp, + const wchar_t *__restrict fmt, va_list list); + int vswscanf(const wchar_t *__restrict str, + const wchar_t *__restrict fmt, va_list list); + + int _vwscanf(struct _reent *reent, const wchar_t *fmt, + va_list list); + int _vfwscanf(struct _reent *reent, FILE *fp, + const wchar_t *fmt, va_list list); + int _vswscanf(struct _reent *reent, const wchar_t *str, + const wchar_t *fmt, va_list list); + + + +**DESCRIPTION:** + +*vwscanf*, *vfwscanf*, and *vswscanf* are (respectively) variants +of *wscanf*, *fwscanf*, and *swscanf*. They differ only in +allowing their caller to pass the variable argument list as a +*va_list* object (initialized by *va_start*) rather than +directly accepting a variable number of arguments. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions: +*vwscanf* returns the number of input fields successfully scanned, +converted, and stored; the return value does not include scanned +fields which were not stored. + +If *vwscanf* attempts to read at end-of-file, the return value +is *EOF*. + +If no fields were stored, the return value is *0*. + +The routines *_vwscanf*, *_vfwscanf*, and *_vswscanf* are +reentrant versions which take an additional first parameter which points +to the reentrancy structure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/viprintf.rst b/posix-users/newlib/libc/stdio/viprintf.rst new file mode 100644 index 0000000..fe81a1b --- /dev/null +++ b/posix-users/newlib/libc/stdio/viprintf.rst @@ -0,0 +1,73 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/viprintf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. viprintf, vfiprintf, vsiprintf, vsniprintf, vasiprintf, vasniprintf: + +viprintf, vfiprintf, vsiprintf, vsniprintf, vasiprintf, vasniprintf - Format argument list (integer only) +----------------------------------------------------------------------------------------------------------------------- +.. index:: viprintf +.. index:: vfiprintf +.. index:: vsiprintf +.. index:: vsniprintf +.. index:: vasiprintf +.. index:: vasniprintf +.. index:: format argument list (integer only) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int viprintf(const char *fmt, va_list list); + int vfiprintf(FILE *fp, const char *fmt, va_list list); + int vsiprintf(char *str, const char *fmt, va_list list); + int vsniprintf(char *str, size_t size, const char *fmt, + va_list list); + int vasiprintf(char **strp, const char *fmt, va_list list); + char *vasniprintf(char *str, size_t *size, const char *fmt, + va_list list); + + int _viprintf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfiprintf_r(struct _reent *reent, FILE *fp, + const char *fmt, va_list list); + int _vsiprintf_r(struct _reent *reent, char *str, + const char *fmt, va_list list); + int _vsniprintf_r(struct _reent *reent, char *str, + size_t size, const char *fmt, va_list list); + int _vasiprintf_r(struct _reent *reent, char **str, + const char *fmt, va_list list); + char *_vasniprintf_r(struct _reent *reent, char *str, + size_t *size, const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*viprintf*, *vfiprintf*, *vasiprintf*, *vsiprintf*, +*vsniprintf*, and *vasniprintf* are (respectively) variants of +*iprintf*, *fiprintf*, *asiprintf*, *siprintf*, *sniprintf*, +and *asniprintf*. They differ only in allowing their caller to pass +the variable argument list as a *va_list* object (initialized by +*va_start*) rather than directly accepting a variable number of +arguments. The caller is responsible for calling *va_end*. + +*_viprintf_r*, *_vfiprintf_r*, *_vasiprintf_r*, +*_vsiprintf_r*, *_vsniprintf_r*, and *_vasniprintf_r* are +reentrant versions of the above. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions: + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio/viscanf.rst b/posix-users/newlib/libc/stdio/viscanf.rst new file mode 100644 index 0000000..59defef --- /dev/null +++ b/posix-users/newlib/libc/stdio/viscanf.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio/viscanf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. viscanf, vfiscanf, vsiscanf: + +viscanf, vfiscanf, vsiscanf - Format argument list +---------------------------------------------------------- +.. index:: viscanf +.. index:: vfiscanf +.. index:: vsiscanf +.. index:: format argument list + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + #include <stdarg.h> + int viscanf(const char *fmt, va_list list); + int vfiscanf(FILE *fp, const char *fmt, va_list list); + int vsiscanf(const char *str, const char *fmt, va_list list); + + int _viscanf_r(struct _reent *reent, const char *fmt, + va_list list); + int _vfiscanf_r(struct _reent *reent, FILE *fp, const char *fmt, + va_list list); + int _vsiscanf_r(struct _reent *reent, const char *str, + const char *fmt, va_list list); + + + +**DESCRIPTION:** + +*viscanf*, *vfiscanf*, and *vsiscanf* are (respectively) variants +of *iscanf*, *fiscanf*, and *siscanf*. They differ only in +allowing their caller to pass the variable argument list as a +*va_list* object (initialized by *va_start*) rather than +directly accepting a variable number of arguments. + + + +**STATUS CODES:** + +The return values are consistent with the corresponding functions: +*viscanf* returns the number of input fields successfully scanned, +converted, and stored; the return value does not include scanned +fields which were not stored. + +If *viscanf* attempts to read at end-of-file, the return value +is *EOF*. + +If no fields were stored, the return value is *0*. + +The routines *_viscanf_r*, *_vfiscanf_f*, and *_vsiscanf_r* are +reentrant versions which take an additional first parameter which points to the +reentrancy structure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/fdopen64.rst b/posix-users/newlib/libc/stdio64/fdopen64.rst new file mode 100644 index 0000000..0b6a661 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/fdopen64.rst @@ -0,0 +1,36 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/fdopen64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fdopen64: + +fdopen64 - Turn open large file into a stream +------------------------------------------------- +.. index:: fdopen64 +.. index:: turn open large file into a stream + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fdopen64(int fd, const char *mode); + FILE *_fdopen64_r(void *reent, + int fd, const char *mode); + + + +**DESCRIPTION:** + +*fdopen64* produces a file descriptor of type *FILE **, from a +descriptor for an already-open file (returned, for example, by the +system subroutine *open* rather than by *fopen*). +The ``mode`` argument has the same meanings as in *fopen*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/fgetpos64.rst b/posix-users/newlib/libc/stdio64/fgetpos64.rst new file mode 100644 index 0000000..34015d8 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/fgetpos64.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/fgetpos64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fgetpos64: + +fgetpos64 - Record position in a large stream or file +--------------------------------------------------------- +.. index:: fgetpos64 +.. index:: record position in a large stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fgetpos64(FILE *fp, _fpos64_t *pos); + int _fgetpos64_r(struct _reent *ptr, FILE *fp, + _fpos64_t *pos); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fgetpos64* to report on the current position for a file +identified by ``fp`` that was opened by *fopen64*; *fgetpos* will write +a value representing that position at **``pos]*>. Later, you can +use this value with *fsetpos64* to return the file to this +position. + +In the current implementation, *fgetpos64* simply uses a character +count to represent the file position; this is the same number that +would be returned by *ftello64*. + + + +**STATUS CODES:** + +*fgetpos64* returns *0* when successful. If *fgetpos64* fails, the +result is *1*. Failure occurs on streams that do not support +positioning or streams not opened via *fopen64*; the global *errno* +indicates these conditions with the value *ESPIPE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/fopen64.rst b/posix-users/newlib/libc/stdio64/fopen64.rst new file mode 100644 index 0000000..9fd1d6d --- /dev/null +++ b/posix-users/newlib/libc/stdio64/fopen64.rst @@ -0,0 +1,43 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/fopen64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fopen64: + +fopen64 - Open a large file +------------------------------- +.. index:: fopen64 +.. index:: open a large file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *fopen64(const char *file, const char *mode); + FILE *_fopen64_r(void *reent, + const char *file, const char *mode); + + + +**DESCRIPTION:** + +*fopen64* is identical to *fopen* except it opens a large file that +is potentially >2GB in size. See *fopen* for further details. + + + +**STATUS CODES:** + +*fopen64* return a file pointer which you can use for other file +operations, unless the file you requested could not be opened; in that +situation, the result is *NULL*. If the reason for failure was an +invalid string at ``mode``, *errno* is set to *EINVAL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/freopen64.rst b/posix-users/newlib/libc/stdio64/freopen64.rst new file mode 100644 index 0000000..dcb7ad2 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/freopen64.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/freopen64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. freopen64: + +freopen64 - Open a large file using an existing file descriptor +------------------------------------------------------------------- +.. index:: freopen64 +.. index:: open a large file using an existing file descriptor + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *freopen64(const char *file, const char *mode, + FILE *fp); + FILE *_freopen64_r(struct _reent *ptr, const char *file, + const char *mode, FILE *fp); + + + +**DESCRIPTION:** + +Use this variant of *fopen64* if you wish to specify a particular file +descriptor ``fp`` (notably *stdin*, *stdout*, or *stderr*) for +the file. + +If ``fp`` was associated with another file or stream, *freopen64* +closes that other file or stream (but ignores any errors while closing +it). + +``file`` and ``mode`` are used just as in *fopen*. + +If ``file`` is *NULL*, the underlying stream is modified rather than +closed. The file cannot be given a more permissive access mode (for +example, a ``mode`` of "w" will fail on a read-only file descriptor), +but can change status such as append or binary mode. If modification +is not possible, failure occurs. + + + +**STATUS CODES:** + +If successful, the result is the same as the argument ``fp``. If the +file cannot be opened as specified, the result is *NULL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/fseeko64.rst b/posix-users/newlib/libc/stdio64/fseeko64.rst new file mode 100644 index 0000000..ea43684 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/fseeko64.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/fseeko64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fseeko64: + +fseeko64 - Set file position for large file +----------------------------------------------- +.. index:: fseeko64 +.. index:: set file position for large file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fseeko64(FILE *fp, _off64_t offset, int whence); + int _fseeko64_r (struct _reent *ptr, FILE *fp, + _off64_t offset, int whence); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fseeko64* to set the position for the file identified by +``fp`` that was opened via *fopen64*. The value of ``offset`` determines +the new position, in one of three ways selected by the value of ``whence`` +(defined as macros in `*stdio.h*`): + +*SEEK_SET*---``offset`` is the absolute file position (an offset +from the beginning of the file) desired. ``offset`` must be positive. + +*SEEK_CUR*---``offset`` is relative to the current file position. +``offset`` can meaningfully be either positive or negative. + +*SEEK_END*---``offset`` is relative to the current end of file. +``offset`` can meaningfully be either positive (to increase the size +of the file) or negative. + +See *ftello64* to determine the current file position. + + + +**STATUS CODES:** + +*fseeko64* returns *0* when successful. On failure, the +result is *EOF*. The reason for failure is indicated in *errno*: +either *ESPIPE* (the stream identified by ``fp`` doesn`t support +repositioning or wasn`t opened via *fopen64*) or *EINVAL* +(invalid file position). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/fsetpos64.rst b/posix-users/newlib/libc/stdio64/fsetpos64.rst new file mode 100644 index 0000000..b21205b --- /dev/null +++ b/posix-users/newlib/libc/stdio64/fsetpos64.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/fsetpos64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fsetpos64: + +fsetpos64 - Restore position of a large stream or file +---------------------------------------------------------- +.. index:: fsetpos64 +.. index:: restore position of a large stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + int fsetpos64(FILE *fp, const _fpos64_t *pos); + int _fsetpos64_r(struct _reent *ptr, FILE *fp, + const _fpos64_t *pos); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +You can use *fsetpos64* to return the large file identified by ``fp`` to a +previous position **``pos]*> (after first recording it with *fgetpos64*). + +See *fseeko64* for a similar facility. + + + +**STATUS CODES:** + +*fgetpos64* returns *0* when successful. If *fgetpos64* fails, the +result is *1*. The reason for failure is indicated in *errno*: +either *ESPIPE* (the stream identified by ``fp`` doesn`t support +64-bit repositioning) or *EINVAL* (invalid file position). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/ftello64.rst b/posix-users/newlib/libc/stdio64/ftello64.rst new file mode 100644 index 0000000..406a126 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/ftello64.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/ftello64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ftello64: + +ftello64 - Return position in a stream or file +-------------------------------------------------- +.. index:: ftello64 +.. index:: return position in a stream or file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + _off64_t ftello64(FILE *fp); + _off64_t _ftello64_r(struct _reent *ptr, FILE *fp); + + + +**DESCRIPTION:** + +Objects of type *FILE* can have a ``position`` that records how much +of the file your program has already read. Many of the *stdio* functions +depend on this position, and many change it as a side effect. + +The result of *ftello64* is the current position for a large file +identified by ``fp``. If you record this result, you can later +use it with *fseeko64* to return the file to this +position. The difference between *ftello* and *ftello64* is that +*ftello* returns *off_t* and *ftello64* is designed to work +for large files (>2GB) and returns *_off64_t*. + +In the current implementation, *ftello64* simply uses a character +count to represent the file position; this is the same number that +would be recorded by *fgetpos64*. + +The function exists only if the __LARGE64_FILES flag is defined. +An error occurs if the ``fp`` was not opened via *fopen64*. + + + +**STATUS CODES:** + +*ftello64* returns the file position, if possible. If it cannot do +this, it returns *-1*. Failure occurs on streams that do not support +positioning or not opened via *fopen64*; the global *errno* indicates +this condition with the value *ESPIPE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdio64/tmpfile64.rst b/posix-users/newlib/libc/stdio64/tmpfile64.rst new file mode 100644 index 0000000..63560b5 --- /dev/null +++ b/posix-users/newlib/libc/stdio64/tmpfile64.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdio64/tmpfile64.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tmpfile64: + +tmpfile64 - Create a large temporary file +--------------------------------------------- +.. index:: tmpfile64 +.. index:: create a large temporary file + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + FILE *tmpfile64(void); + + FILE *_tmpfile64_r(void *reent); + + + +**DESCRIPTION:** + +Create a large temporary file (a file which will be deleted automatically), +using a name generated by *tmpnam*. The temporary file is opened with +the mode *"wb+"*, permitting you to read and write anywhere in it +as a binary file (without any data transformations the host system may +perform for text files). The file may be larger than 2GB. + +The alternate function *_tmpfile64_r* is a reentrant version. The +argument ``reent`` is a pointer to a reentrancy structure. + +Both *tmpfile64* and *_tmpfile64_r* are only defined if __LARGE64_FILES +is defined. + + + +**STATUS CODES:** + +*tmpfile64* normally returns a pointer to the temporary file. If no +temporary file could be created, the result is NULL, and *errno* +records the reason for failure. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/_Exit.rst b/posix-users/newlib/libc/stdlib/_Exit.rst new file mode 100644 index 0000000..07c8d49 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/_Exit.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/_Exit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _Exit: + +_Exit - End program execution with no cleanup processing +------------------------------------------------------------ +.. index:: _Exit +.. index:: end program execution with no cleanup processing + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void _Exit(int code); + + + +**DESCRIPTION:** + +Use *_Exit* to return control from a program to the host operating +environment. Use the argument ``code`` to pass an exit status to the +operating environment: two particular values, *EXIT_SUCCESS* and +*EXIT_FAILURE*, are defined in `*stdlib.h*` to indicate success or +failure in a portable fashion. + +*_Exit* differs from *exit* in that it does not run any +application-defined cleanup functions registered with *atexit* and +it does not clean up files and streams. It is identical to *_exit*. + + + +**STATUS CODES:** + +*_Exit* does not return to its caller. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/a64l.rst b/posix-users/newlib/libc/stdlib/a64l.rst new file mode 100644 index 0000000..366cc69 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/a64l.rst @@ -0,0 +1,66 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/a64l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. a64l, l64a: + +a64l, l64a - Convert between radix-64 ascii string and long +----------------------------------------------------------------- +.. index:: a64l +.. index:: l64a +.. index:: convert between radix-64 ASCII string and long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long a64l(const char *input); + char *l64a(long input); + + + +**DESCRIPTION:** + +Conversion is performed between long and radix-64 characters. The +*l64a* routine transforms up to 32 bits of input value starting from +least significant bits to the most significant bits. The input value +is split up into a maximum of 5 groups of 6 bits and possibly one +group of 2 bits (bits 31 and 30). + +Each group of 6 bits forms a value from 0--63 which is translated into +a character as follows: + +O+ +o 0 = `.` +o 1 = `/` +o 2--11 = `0` to `9` +o 12--37 = `A` to `Z` +o 38--63 = `a` to `z` +O- + +When the remaining bits are zero or all bits have been translated, a +null terminator is appended to the string. An input value of 0 +results in the empty string. + +The *a64l* function performs the reverse translation. Each +character is used to generate a 6-bit value for up to 30 bits and then +a 2-bit value to complete a 32-bit result. The null terminator means +that the remaining digits are 0. An empty input string or NULL string +results in 0L. An invalid string results in undefined behavior. If +the size of a long is greater than 32 bits, the result is sign-extended. + + + +**STATUS CODES:** + +*l64a* returns a null-terminated string of 0 to 6 characters. +*a64l* returns the 32-bit translated value from the input character string. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/abort.rst b/posix-users/newlib/libc/stdlib/abort.rst new file mode 100644 index 0000000..f6ed691 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/abort.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/abort.c + +.. COMMENT: Generated on: 2018-08-20 + +.. abort: + +abort - Abnormal termination of a program +--------------------------------------------- +.. index:: abort +.. index:: abnormal termination of a program + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void abort(void); + + + +**DESCRIPTION:** + +Use *abort* to signal that your program has detected a condition it +cannot deal with. Normally, *abort* ends your program`s execution. + +Before terminating your program, *abort* raises the exception *SIGABRT* +(using `*raise(SIGABRT)*`). If you have used *signal* to register +an exception handler for this condition, that handler has the +opportunity to retain control, thereby avoiding program termination. + +In this implementation, *abort* does not perform any stream- or +file-related cleanup (the host environment may do so; if not, you can +arrange for your program to do its own cleanup with a *SIGABRT* +exception handler). + + + +**STATUS CODES:** + +*abort* does not return to its caller. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/abs.rst b/posix-users/newlib/libc/stdlib/abs.rst new file mode 100644 index 0000000..34e30a2 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/abs.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/abs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. abs: + +abs - Integer absolute value (magnitude) +-------------------------------------------- +.. index:: abs +.. index:: integer absolute value (magnitude) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int abs(int i); + + + +**DESCRIPTION:** + +*abs* returns +@tex +$|x|$, +@end tex +the absolute value of ``i`` (also called the magnitude +of ``i``). That is, if ``i`` is negative, the result is the opposite +of ``i``, but if ``i`` is nonnegative the result is ``i``. + +The similar function *labs* uses and returns *long* rather than *int* values. + + + +**STATUS CODES:** + +The result is a nonnegative integer. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/assert.rst b/posix-users/newlib/libc/stdlib/assert.rst new file mode 100644 index 0000000..052bad6 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/assert.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/assert.c + +.. COMMENT: Generated on: 2018-08-20 + +.. assert: + +assert - Macro for debugging diagnostics +-------------------------------------------- +.. index:: assert +.. index:: macro for debugging diagnostics + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <assert.h> + void assert(int expression); + + + +**DESCRIPTION:** + + Use this macro to embed debuggging diagnostic statements in + your programs. The argument ``expression`` should be an + expression which evaluates to true (nonzero) when your program + is working as you intended. + + When ``expression`` evaluates to false (zero), *assert* + calls *abort*, after first printing a message showing what + failed and where: + +. Assertion failed: ``expression``, file ``filename``, line ``lineno``, function: ``func`` + + If the name of the current function is not known (for example, + when using a C89 compiler that does not understand __func__), + the function location is omitted. + + The macro is defined to permit you to turn off all uses of + *assert* at compile time by defining *NDEBUG* as a + preprocessor variable. If you do this, the *assert* macro + expands to + +. (void(0)) + + + +**STATUS CODES:** + + *assert* does not return a value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/atexit.rst b/posix-users/newlib/libc/stdlib/atexit.rst new file mode 100644 index 0000000..d60d8d5 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/atexit.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/atexit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atexit: + +atexit - Request execution of functions at program exit +----------------------------------------------------------- +.. index:: atexit +.. index:: request execution of functions at program exit + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int atexit (void (*function)(void)); + + + +**DESCRIPTION:** + +You can use *atexit* to enroll functions in a list of functions that +will be called when your program terminates normally. The argument is +a pointer to a user-defined function (which must not require arguments and +must not return a result). + +The functions are kept in a LIFO stack; that is, the last function +enrolled by *atexit* will be the first to execute when your program +exits. + +There is no built-in limit to the number of functions you can enroll +in this list; however, after every group of 32 functions is enrolled, +*atexit* will call *malloc* to get space for the next part of the +list. The initial list of 32 functions is statically allocated, so +you can always count on at least that many slots available. + + + +**STATUS CODES:** + +*atexit* returns *0* if it succeeds in enrolling your function, +*-1* if it fails (possible only if no space was available for +*malloc* to extend the list of functions). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/atof.rst b/posix-users/newlib/libc/stdlib/atof.rst new file mode 100644 index 0000000..3b50cae --- /dev/null +++ b/posix-users/newlib/libc/stdlib/atof.rst @@ -0,0 +1,63 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/atof.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atof, atoff: + +atof, atoff - String to double or float +------------------------------------------------ +.. index:: atof +.. index:: atoff +.. index:: string to double or float + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + double atof(const char *s); + float atoff(const char *s); + + + +**DESCRIPTION:** + +*atof* converts the initial portion of a string to a *double*. +*atoff* converts the initial portion of a string to a *float*. + +The functions parse the character string ``s``, +locating a substring which can be converted to a floating-point +value. The substring must match the format: +. [+|-]``digits``[.][``digits``][(e|E)[+|-]``digits``] +The substring converted is the longest initial +fragment of ``s`` that has the expected format, beginning with +the first non-whitespace character. The substring +is empty if *str* is empty, consists entirely +of whitespace, or if the first non-whitespace character is +something other than *+*, *-*, *.*, or a digit. + +*atof(``s``)* is implemented as *strtod(``s``, NULL)*. +*atoff(``s``)* is implemented as *strtof(``s``, NULL)*. + + + +**STATUS CODES:** + +*atof* returns the converted substring value, if any, as a +*double*; or *0.0*, if no conversion could be performed. +If the correct value is out of the range of representable values, plus +or minus *HUGE_VAL* is returned, and *ERANGE* is stored in +*errno*. +If the correct value would cause underflow, *0.0* is returned +and *ERANGE* is stored in *errno*. + +*atoff* obeys the same rules as *atof*, except that it +returns a *float*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/atoi.rst b/posix-users/newlib/libc/stdlib/atoi.rst new file mode 100644 index 0000000..5bb0d30 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/atoi.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/atoi.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atoi, atol: + +atoi, atol - String to integer +--------------------------------------- +.. index:: atoi +.. index:: atol +.. index:: string to integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int atoi(const char *s); + long atol(const char *s); + int _atoi_r(struct _reent *ptr, const char *s); + long _atol_r(struct _reent *ptr, const char *s); + + + +**DESCRIPTION:** + + *atoi* converts the initial portion of a string to an *int*. + *atol* converts the initial portion of a string to a *long*. + + *atoi(s)* is implemented as *(int)strtol(s, NULL, 10).* + *atol(s)* is implemented as *strtol(s, NULL, 10).* + + *_atoi_r* and *_atol_r* are reentrant versions of *atoi* and + *atol* respectively, passing the reentrancy struct pointer. + + + +**STATUS CODES:** + + The functions return the converted value, if any. If no conversion was + made, *0* is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/atoll.rst b/posix-users/newlib/libc/stdlib/atoll.rst new file mode 100644 index 0000000..f187ea0 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/atoll.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/atoll.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atoll: + +atoll - Convert a string to a long long integer +--------------------------------------------------- +.. index:: atoll +.. index:: convert a string to a long long integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long long atoll(const char *str); + long long _atoll_r(struct _reent *ptr, const char *str); + + + +**DESCRIPTION:** + +The function *atoll* converts the initial portion of the string +pointed to by **``str]*> to a type *long long*. A call to +atoll(str) in this implementation is equivalent to +strtoll(str, (char **)NULL, 10) including behavior on error. + +The alternate function *_atoll_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + + +**STATUS CODES:** + +The converted value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/calloc.rst b/posix-users/newlib/libc/stdlib/calloc.rst new file mode 100644 index 0000000..7cf8fda --- /dev/null +++ b/posix-users/newlib/libc/stdlib/calloc.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/calloc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. calloc: + +calloc - Allocate space for arrays +-------------------------------------- +.. index:: calloc +.. index:: allocate space for arrays + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void *calloc(size_t n, size_t s); + void *_calloc_r(void *reent, size_t n, size_t s); + + + +**DESCRIPTION:** + +Use *calloc* to request a block of memory sufficient to hold an +array of ``n`` elements, each of which has size ``s``. + +The memory allocated by *calloc* comes out of the same memory pool +used by *malloc*, but the memory block is initialized to all zero +bytes. (To avoid the overhead of initializing the space, use +*malloc* instead.) + +The alternate function *_calloc_r* is reentrant. +The extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +If successful, a pointer to the newly allocated space. + +If unsuccessful, *NULL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/div.rst b/posix-users/newlib/libc/stdlib/div.rst new file mode 100644 index 0000000..3841122 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/div.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/div.c + +.. COMMENT: Generated on: 2018-08-20 + +.. div: + +div - Divide two integers +----------------------------- +.. index:: div +.. index:: divide two integers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + div_t div(int n, int d); + + + +**DESCRIPTION:** + +Divide +@tex +$n/d$, +@end tex +@ifnottex +``n``/``d``, +@end ifnottex +returning quotient and remainder as two integers in a structure *div_t*. + + + +**STATUS CODES:** + +The result is represented with the structure + +. typedef struct +. { +. int quot; +. int rem; +. } div_t; + +where the *quot* field represents the quotient, and *rem* the +remainder. For nonzero ``d``, if `*``r`` = div(``n``,``d``);*` then +``n`` equals `*``r``.rem + ``d``*``r``.quot*`. + +To divide *long* rather than *int* values, use the similar +function *ldiv*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/ecvtbuf.rst b/posix-users/newlib/libc/stdlib/ecvtbuf.rst new file mode 100644 index 0000000..74c59bc --- /dev/null +++ b/posix-users/newlib/libc/stdlib/ecvtbuf.rst @@ -0,0 +1,64 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/ecvtbuf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ecvtbuf, fcvtbuf: + +ecvtbuf, fcvtbuf - Double or float to string +-------------------------------------------------- +.. index:: ecvtbuf +.. index:: fcvtbuf +.. index:: double or float to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdio.h> + + char *ecvtbuf(double val, int chars, int *decpt, + int *sgn, char *buf); + + char *fcvtbuf(double val, int decimals, int *decpt, + int *sgn, char *buf); + + + +**DESCRIPTION:** + + *ecvtbuf* and *fcvtbuf* produce (null-terminated) strings + of digits representating the *double* number ``val``. + + The only difference between *ecvtbuf* and *fcvtbuf* is the + interpretation of the second argument (``chars`` or + ``decimals``). For *ecvtbuf*, the second argument ``chars`` + specifies the total number of characters to write (which is + also the number of significant digits in the formatted string, + since these two functions write only digits). For *fcvtbuf*, + the second argument ``decimals`` specifies the number of + characters to write after the decimal point; all digits for + the integer part of ``val`` are always included. + + Since *ecvtbuf* and *fcvtbuf* write only digits in the + output string, they record the location of the decimal point + in **``decpt]*>, and the sign of the number in **``sgn]*>. + After formatting a number, **``decpt]*> contains the number + of digits to the left of the decimal point. **``sgn]*> + contains *0* if the number is positive, and *1* if it is + negative. For both functions, you supply a pointer ``buf`` to + an area of memory to hold the converted string. + + + +**STATUS CODES:** + + Both functions return a pointer to ``buf``, the string + containing a character representation of ``val``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/efgcvt.rst b/posix-users/newlib/libc/stdlib/efgcvt.rst new file mode 100644 index 0000000..77a413a --- /dev/null +++ b/posix-users/newlib/libc/stdlib/efgcvt.rst @@ -0,0 +1,119 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/efgcvt.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ecvt, ecvtf, fcvt, fcvtf: + +ecvt, ecvtf, fcvt, fcvtf - Double or float to string +-------------------------------------------------------------- +.. index:: ecvt +.. index:: ecvtf +.. index:: fcvt +.. index:: fcvtf +.. index:: double or float to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + + char *ecvt(double val, int chars, int *decpt, int *sgn); + char *ecvtf(float val, int chars, int *decpt, int *sgn); + + char *fcvt(double val, int decimals, + int *decpt, int *sgn); + char *fcvtf(float val, int decimals, + int *decpt, int *sgn); + + + +**DESCRIPTION:** + +*ecvt* and *fcvt* produce (null-terminated) strings of digits +representating the *double* number ``val``. +*ecvtf* and *fcvtf* produce the corresponding character +representations of *float* numbers. + +(The *stdlib* functions *ecvtbuf* and *fcvtbuf* are reentrant +versions of *ecvt* and *fcvt*.) + +The only difference between *ecvt* and *fcvt* is the +interpretation of the second argument (``chars`` or ``decimals``). +For *ecvt*, the second argument ``chars`` specifies the total number +of characters to write (which is also the number of significant digits +in the formatted string, since these two functions write only digits). +For *fcvt*, the second argument ``decimals`` specifies the number of +characters to write after the decimal point; all digits for the integer +part of ``val`` are always included. + +Since *ecvt* and *fcvt* write only digits in the output string, +they record the location of the decimal point in **``decpt]*>, and +the sign of the number in **``sgn]*>. After formatting a number, +**``decpt]*> contains the number of digits to the left of the +decimal point. **``sgn]*> contains *0* if the number is positive, +and *1* if it is negative. + + + +**STATUS CODES:** + +All four functions return a pointer to the new string containing a +character representation of ``val``. + + + +**PORTABILITY:** + +None of these functions are ANSI C. + +Supporting OS subroutines required: *close*, *fstat*, *isatty*, +*lseek*, *read*, *sbrk*, *write*. + + + +.. gcvt, gcvtf: + +gcvt, gcvtf - Format double or float as string +---------------------------------------------------- +.. index:: gcvt +.. index:: gcvtf +.. index:: format double or float as string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + + char *gcvt(double val, int precision, char *buf); + char *gcvtf(float val, int precision, char *buf); + + + +**DESCRIPTION:** + +*gcvt* writes a fully formatted number as a null-terminated +string in the buffer **``buf]*>. *gcvtf* produces corresponding +character representations of *float* numbers. + +*gcvt* uses the same rules as the *printf* format +`*%.``precision``g*`---only negative values are signed (with +`*-*`), and either exponential or ordinary decimal-fraction format +is chosen depending on the number of significant digits (specified by +``precision``). + + + +**STATUS CODES:** + +The result is a pointer to the formatted representation of ``val`` +(the same as the argument ``buf``). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/envlock.rst b/posix-users/newlib/libc/stdlib/envlock.rst new file mode 100644 index 0000000..67cfb24 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/envlock.rst @@ -0,0 +1,27 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/envlock.c + +.. COMMENT: Generated on: 2018-08-20 + +.. __env_lock, __env_unlock: + +__env_lock, __env_unlock - Lock environ variable +------------------------------------------------------ +.. index:: __env_lock +.. index:: __env_unlock +.. index:: lock environ variable + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <envlock.h> + void __env_lock (struct _reent *reent); + void __env_unlock (struct _reent *reent); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/exit.rst b/posix-users/newlib/libc/stdlib/exit.rst new file mode 100644 index 0000000..6ad446b --- /dev/null +++ b/posix-users/newlib/libc/stdlib/exit.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/exit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. exit: + +exit - End program execution +-------------------------------- +.. index:: exit +.. index:: end program execution + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void exit(int code); + + + +**DESCRIPTION:** + +Use *exit* to return control from a program to the host operating +environment. Use the argument ``code`` to pass an exit status to the +operating environment: two particular values, *EXIT_SUCCESS* and +*EXIT_FAILURE*, are defined in `*stdlib.h*` to indicate success or +failure in a portable fashion. + +*exit* does two kinds of cleanup before ending execution of your +program. First, it calls all application-defined cleanup functions +you have enrolled with *atexit*. Second, files and streams are +cleaned up: any pending output is delivered to the host system, each +open file or stream is closed, and files created by *tmpfile* are +deleted. + + + +**STATUS CODES:** + +*exit* does not return to its caller. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/getenv.rst b/posix-users/newlib/libc/stdlib/getenv.rst new file mode 100644 index 0000000..d115270 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/getenv.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/getenv.c + +.. COMMENT: Generated on: 2018-08-20 + +.. getenv: + +getenv - Look up environment variable +----------------------------------------- +.. index:: getenv +.. index:: look up environment variable + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + char *getenv(const char *name); + + + +**DESCRIPTION:** + +*getenv* searches the list of environment variable names and values +(using the global pointer ``*char **environ*``) for a variable whose +name matches the string at ``name``. If a variable name matches, +*getenv* returns a pointer to the associated value. + + + +**STATUS CODES:** + +A pointer to the (string) value of the environment variable, or +*NULL* if there is no such environment variable. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/getenv_r.rst b/posix-users/newlib/libc/stdlib/getenv_r.rst new file mode 100644 index 0000000..445c1a6 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/getenv_r.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/getenv_r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _getenv_r: + +_getenv_r - Look up environment variable +-------------------------------------------- +.. index:: _getenv_r +.. index:: look up environment variable + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + char *_getenv_r(struct _reent *reent_ptr, const char *name); + + + +**DESCRIPTION:** + +*_getenv_r* searches the list of environment variable names and values +(using the global pointer ``*char **environ*``) for a variable whose +name matches the string at ``name``. If a variable name matches, +*_getenv_r* returns a pointer to the associated value. + + + +**STATUS CODES:** + +A pointer to the (string) value of the environment variable, or +*NULL* if there is no such environment variable. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/itoa.rst b/posix-users/newlib/libc/stdlib/itoa.rst new file mode 100644 index 0000000..ecf2643 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/itoa.rst @@ -0,0 +1,43 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/itoa.c + +.. COMMENT: Generated on: 2018-08-20 + +.. itoa: + +itoa - Integer to string +---------------------------- +.. index:: itoa +.. index:: integer to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + char *itoa(int value, char *str, int base); + char *__itoa(int value, char *str, int base); + + + +**DESCRIPTION:** + +*itoa* converts the integer ``value`` to a null-terminated string +using the specified base, which must be between 2 and 36, inclusive. +If ``base`` is 10, ``value`` is treated as signed and the string will be +prefixed with `-` if negative. For all other bases, ``value`` is treated as +unsigned. ``str`` should be an array long enough to contain the converted +value, which in the worst case is sizeof(int)*8+1 bytes. + + + +**STATUS CODES:** + +A pointer to the string, ``str``, or NULL if ``base`` is invalid. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/labs.rst b/posix-users/newlib/libc/stdlib/labs.rst new file mode 100644 index 0000000..238f748 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/labs.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/labs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. labs: + +labs - Long integer absolute value +-------------------------------------- +.. index:: labs +.. index:: long integer absolute value + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long labs(long i); + + + +**DESCRIPTION:** + +*labs* returns +@tex +$|x|$, +@end tex +the absolute value of ``i`` (also called the magnitude +of ``i``). That is, if ``i`` is negative, the result is the opposite +of ``i``, but if ``i`` is nonnegative the result is ``i``. + +The similar function *abs* uses and returns *int* rather than +*long* values. + + + +**STATUS CODES:** + +The result is a nonnegative long integer. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/ldiv.rst b/posix-users/newlib/libc/stdlib/ldiv.rst new file mode 100644 index 0000000..9e06c93 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/ldiv.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/ldiv.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ldiv: + +ldiv - Divide two long integers +----------------------------------- +.. index:: ldiv +.. index:: divide two long integers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + ldiv_t ldiv(long n, long d); + + + +**DESCRIPTION:** + +Divide +@tex +$n/d$, +@end tex +@ifnottex +``n``/``d``, +@end ifnottex +returning quotient and remainder as two long integers in a structure *ldiv_t*. + + + +**STATUS CODES:** + +The result is represented with the structure + +. typedef struct +. { +. long quot; +. long rem; +. } ldiv_t; + +where the *quot* field represents the quotient, and *rem* the +remainder. For nonzero ``d``, if `*``r`` = ldiv(``n``,``d``);*` then +``n`` equals `*``r``.rem + ``d``*``r``.quot*`. + +To divide *int* rather than *long* values, use the similar +function *div*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/llabs.rst b/posix-users/newlib/libc/stdlib/llabs.rst new file mode 100644 index 0000000..9605b3c --- /dev/null +++ b/posix-users/newlib/libc/stdlib/llabs.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/llabs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. llabs: + +llabs - Compute the absolute value of an long long integer. +--------------------------------------------------------------- +.. index:: llabs +.. index:: compute the absolute value of an long long integer. + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long long llabs(long long j); + + + +**DESCRIPTION:** + +The *llabs* function computes the absolute value of the long long integer +argument ``j`` (also called the magnitude of ``j``). + +The similar function *labs* uses and returns *long* rather than +*long long* values. + + + +**STATUS CODES:** + +A nonnegative long long integer. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/lldiv.rst b/posix-users/newlib/libc/stdlib/lldiv.rst new file mode 100644 index 0000000..2e9adfc --- /dev/null +++ b/posix-users/newlib/libc/stdlib/lldiv.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/lldiv.c + +.. COMMENT: Generated on: 2018-08-20 + +.. lldiv: + +lldiv - Divide two long long integers +----------------------------------------- +.. index:: lldiv +.. index:: divide two long long integers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + lldiv_t lldiv(long long n, long long d); + + + +**DESCRIPTION:** + +Divide +@tex +$n/d$, +@end tex +@ifnottex +``n``/``d``, +@end ifnottex +returning quotient and remainder as two long long integers in a structure +*lldiv_t*. + + + +**STATUS CODES:** + +The result is represented with the structure + +. typedef struct +. { +. long long quot; +. long long rem; +. } lldiv_t; + +where the *quot* field represents the quotient, and *rem* the +remainder. For nonzero ``d``, if `*``r`` = ldiv(``n``,``d``);*` then +``n`` equals `*``r``.rem + ``d``*``r``.quot*`. + +To divide *long* rather than *long long* values, use the similar +function *ldiv*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/malloc.rst b/posix-users/newlib/libc/stdlib/malloc.rst new file mode 100644 index 0000000..bd64e55 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/malloc.rst @@ -0,0 +1,126 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/malloc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. malloc, realloc, free: + +malloc, realloc, free - Manage memory +--------------------------------------------- +.. index:: malloc +.. index:: realloc +.. index:: free +.. index:: manage memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + void *malloc(size_t nbytes); + void *realloc(void *aptr, size_t nbytes); + void *reallocf(void *aptr, size_t nbytes); + void free(void *aptr); + + void *memalign(size_t align, size_t nbytes); + + size_t malloc_usable_size(void *aptr); + + void *_malloc_r(void *reent, size_t nbytes); + void *_realloc_r(void *reent, + void *aptr, size_t nbytes); + void *_reallocf_r(void *reent, + void *aptr, size_t nbytes); + void _free_r(void *reent, void *aptr); + + void *_memalign_r(void *reent, + size_t align, size_t nbytes); + + size_t _malloc_usable_size_r(void *reent, void *aptr); + + + +**DESCRIPTION:** + +These functions manage a pool of system memory. + +Use *malloc* to request allocation of an object with at least +``nbytes`` bytes of storage available. If the space is available, +*malloc* returns a pointer to a newly allocated block as its result. + +If you already have a block of storage allocated by *malloc*, but +you no longer need all the space allocated to it, you can make it +smaller by calling *realloc* with both the object pointer and the +new desired size as arguments. *realloc* guarantees that the +contents of the smaller object match the beginning of the original object. + +Similarly, if you need more space for an object, use *realloc* to +request the larger size; again, *realloc* guarantees that the +beginning of the new, larger object matches the contents of the +original object. + +When you no longer need an object originally allocated by *malloc* +or *realloc* (or the related function *calloc*), return it to the +memory storage pool by calling *free* with the address of the object +as the argument. You can also use *realloc* for this purpose by +calling it with *0* as the ``nbytes`` argument. + +The *reallocf* function behaves just like *realloc* except if the +function is required to allocate new storage and this fails. In this +case *reallocf* will free the original object passed in whereas +*realloc* will not. + +The *memalign* function returns a block of size ``nbytes`` aligned +to a ``align`` boundary. The ``align`` argument must be a power of +two. + +The *malloc_usable_size* function takes a pointer to a block +allocated by *malloc*. It returns the amount of space that is +available in the block. This may or may not be more than the size +requested from *malloc*, due to alignment or minimum size +constraints. + +The alternate functions *_malloc_r*, *_realloc_r*, *_reallocf_r*, +*_free_r*, *_memalign_r*, and *_malloc_usable_size_r* are reentrant +versions. The extra argument ``reent`` is a pointer to a reentrancy structure. + +If you have multiple threads of execution which may call any of these +routines, or if any of these routines may be called reentrantly, then +you must provide implementations of the *__malloc_lock* and +*__malloc_unlock* functions for your system. See the documentation +for those functions. + +These functions operate by calling the function *_sbrk_r* or +*sbrk*, which allocates space. You may need to provide one of these +functions for your system. *_sbrk_r* is called with a positive +value to allocate more space, and with a negative value to release +previously allocated space if it is no longer required. +@xref{Stubs}. + + + +**STATUS CODES:** + +*malloc* returns a pointer to the newly allocated space, if +successful; otherwise it returns *NULL*. If your application needs +to generate empty objects, you may use *malloc(0)* for this purpose. + +*realloc* returns a pointer to the new block of memory, or *NULL* +if a new block could not be allocated. *NULL* is also the result +when you use `*realloc(``aptr``,0)*` (which has the same effect as +`*free(``aptr``)*`). You should always check the result of +*realloc*; successful reallocation is not guaranteed even when +you request a smaller object. + +*free* does not return a result. + +*memalign* returns a pointer to the newly allocated space. + +*malloc_usable_size* returns the usable size. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mblen.rst b/posix-users/newlib/libc/stdlib/mblen.rst new file mode 100644 index 0000000..60d0de5 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mblen.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mblen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mblen: + +mblen - Minimal multibyte length function +--------------------------------------------- +.. index:: mblen +.. index:: minimal multibyte length function + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int mblen(const char *s, size_t n); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *mblen*. In this case, the +only ``multi-byte character sequences`` recognized are single bytes, +and thus *1* is returned unless ``s`` is the null pointer or +has a length of 0 or is the empty string. + +When _MB_CAPABLE is defined, this routine calls *_mbtowc_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + + + +**STATUS CODES:** + +This implementation of *mblen* returns *0* if +``s`` is *NULL* or the empty string; it returns *1* if not _MB_CAPABLE or +the character is a single-byte character; it returns *-1* +if the multi-byte character is invalid; otherwise it returns +the number of bytes in the multibyte character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mblen_r.rst b/posix-users/newlib/libc/stdlib/mblen_r.rst new file mode 100644 index 0000000..0bb466f --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mblen_r.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mblen_r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. _mblen_r: + +_mblen_r - Reentrant minimal multibyte length function +---------------------------------------------------------- +.. index:: _mblen_r +.. index:: reentrant minimal multibyte length function + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int _mblen_r(struct _reent *r, const char *s, size_t n, int *state); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *_mblen_r*. In this case, the +only ``multi-byte character sequences`` recognized are single bytes, +and thus *1* is returned unless ``s`` is the null pointer or +has a length of 0 or is the empty string. + +When _MB_CAPABLE is defined, this routine calls *_mbtowc_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + + + +**STATUS CODES:** + +This implementation of *_mblen_r* returns *0* if +``s`` is *NULL* or the empty string; it returns *1* if not _MB_CAPABLE or +the character is a single-byte character; it returns *-1* +if the multi-byte character is invalid; otherwise it returns +the number of bytes in the multibyte character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mbsnrtowcs.rst b/posix-users/newlib/libc/stdlib/mbsnrtowcs.rst new file mode 100644 index 0000000..4ec7366 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mbsnrtowcs.rst @@ -0,0 +1,75 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mbsnrtowcs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mbsrtowcs, mbsnrtowcs: + +mbsrtowcs, mbsnrtowcs - Convert a character string to a wide-character string +----------------------------------------------------------------------------------- +.. index:: mbsrtowcs +.. index:: mbsnrtowcs +.. index:: convert a character string to a wide-character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t mbsrtowcs(wchar_t *__restrict dst, + const char **__restrict src, + size_t len, + mbstate_t *__restrict ps); + + #include <wchar.h> + size_t _mbsrtowcs_r(struct _reent *ptr, wchar_t *dst, + const char **src, size_t len, + mbstate_t *ps); + + #include <wchar.h> + size_t mbsnrtowcs(wchar_t *__ restrict dst, + const char **__restrict src, size_t nms, + size_t len, mbstate_t *__restrict ps); + + #include <wchar.h> + size_t _mbsnrtowcs_r(struct _reent *ptr, wchar_t *dst, + const char **src, size_t nms, + size_t len, mbstate_t *ps); + + + +**DESCRIPTION:** + +The *mbsrtowcs* function converts a sequence of multibyte characters +pointed to indirectly by ``src`` into a sequence of corresponding wide +characters and stores at most ``len`` of them in the wchar_t array pointed +to by ``dst``, until it encounters a terminating null character (`\0`). + +If ``dst`` is NULL, no characters are stored. + +If ``dst`` is not NULL, the pointer pointed to by ``src`` is updated to point +to the character after the one that conversion stopped at. If conversion +stops because a null character is encountered, *``src`` is set to NULL. + +The mbstate_t argument, ``ps``, is used to keep track of the shift state. If +it is NULL, *mbsrtowcs* uses an internal, static mbstate_t object, which +is initialized to the initial conversion state at program startup. + +The *mbsnrtowcs* function behaves identically to *mbsrtowcs*, except that +conversion stops after reading at most ``nms`` bytes from the buffer pointed +to by ``src``. + + + +**STATUS CODES:** + +The *mbsrtowcs* and *mbsnrtowcs* functions return the number of wide +characters stored in the array pointed to by ``dst`` if successful, otherwise +it returns (size_t)-1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mbstowcs.rst b/posix-users/newlib/libc/stdlib/mbstowcs.rst new file mode 100644 index 0000000..9c501fc --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mbstowcs.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mbstowcs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mbstowcs: + +mbstowcs - Minimal multibyte string to wide char converter +-------------------------------------------------------------- +.. index:: mbstowcs +.. index:: minimal multibyte string to wide char converter + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int mbstowcs(wchar_t *restrict pwc, const char *restrict s, size_t n); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *mbstowcs*. In this case, the +only ``multi-byte character sequences`` recognized are single bytes, +and they are ``converted`` to wide-char versions simply by byte +extension. + +When _MB_CAPABLE is defined, this routine calls *_mbstowcs_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + + + +**STATUS CODES:** + +This implementation of *mbstowcs* returns *0* if +``s`` is *NULL* or is the empty string; +it returns *-1* if _MB_CAPABLE and one of the +multi-byte characters is invalid or incomplete; +otherwise it returns the minimum of: *n* or the +number of multi-byte characters in *s* plus 1 (to +compensate for the nul character). +If the return value is -1, the state of the *pwc* string is +indeterminate. If the input has a length of 0, the output +string will be modified to contain a wchar_t nul terminator. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mbtowc.rst b/posix-users/newlib/libc/stdlib/mbtowc.rst new file mode 100644 index 0000000..9f97415 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mbtowc.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mbtowc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mbtowc: + +mbtowc - Minimal multibyte to wide char converter +----------------------------------------------------- +.. index:: mbtowc +.. index:: minimal multibyte to wide char converter + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *mbtowc*. In this case, +only ``multi-byte character sequences`` recognized are single bytes, +and they are ``converted`` to themselves. +Each call to *mbtowc* copies one character from **``s]*> to +**``pwc]*>, unless ``s`` is a null pointer. The argument n +is ignored. + +When _MB_CAPABLE is defined, this routine calls *_mbtowc_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + + + +**STATUS CODES:** + +This implementation of *mbtowc* returns *0* if +``s`` is *NULL* or is the empty string; +it returns *1* if not _MB_CAPABLE or +the character is a single-byte character; it returns *-1* +if n is *0* or the multi-byte character is invalid; +otherwise it returns the number of bytes in the multibyte character. +If the return value is -1, no changes are made to the *pwc* +output string. If the input is the empty string, a wchar_t nul +is placed in the output string and 0 is returned. If the input +has a length of 0, no changes are made to the *pwc* output string. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mlock.rst b/posix-users/newlib/libc/stdlib/mlock.rst new file mode 100644 index 0000000..c89a7b8 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mlock.rst @@ -0,0 +1,27 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mlock.c + +.. COMMENT: Generated on: 2018-08-20 + +.. __malloc_lock, __malloc_unlock: + +__malloc_lock, __malloc_unlock - Lock malloc pool +------------------------------------------------------- +.. index:: __malloc_lock +.. index:: __malloc_unlock +.. index:: lock malloc pool + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <malloc.h> + void __malloc_lock (struct _reent *reent); + void __malloc_unlock (struct _reent *reent); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/mstats.rst b/posix-users/newlib/libc/stdlib/mstats.rst new file mode 100644 index 0000000..df0b52a --- /dev/null +++ b/posix-users/newlib/libc/stdlib/mstats.rst @@ -0,0 +1,72 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/mstats.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mallinfo, malloc_stats, mallopt: + +mallinfo, malloc_stats, mallopt - Malloc support +-------------------------------------------------------- +.. index:: mallinfo +.. index:: malloc_stats +.. index:: mallopt +.. index:: malloc support + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <malloc.h> + struct mallinfo mallinfo(void); + void malloc_stats(void); + int mallopt(int parameter, value); + + struct mallinfo _mallinfo_r(void *reent); + void _malloc_stats_r(void *reent); + int _mallopt_r(void *reent, int parameter, value); + + + +**DESCRIPTION:** + +*mallinfo* returns a structure describing the current state of +memory allocation. The structure is defined in malloc.h. The +following fields are defined: *arena* is the total amount of space +in the heap; *ordblks* is the number of chunks which are not in use; +*uordblks* is the total amount of space allocated by *malloc*; +*fordblks* is the total amount of space not in use; *keepcost* is +the size of the top most memory block. + +*malloc_stats* print some statistics about memory allocation on +standard error. + +*mallopt* takes a parameter and a value. The parameters are defined +in malloc.h, and may be one of the following: *M_TRIM_THRESHOLD* +sets the maximum amount of unused space in the top most block before +releasing it back to the system in *free* (the space is released by +calling *_sbrk_r* with a negative argument); *M_TOP_PAD* is the +amount of padding to allocate whenever *_sbrk_r* is called to +allocate more space. + +The alternate functions *_mallinfo_r*, *_malloc_stats_r*, and +*_mallopt_r* are reentrant versions. The extra argument ``reent`` +is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*mallinfo* returns a mallinfo structure. The structure is defined +in malloc.h. + +*malloc_stats* does not return a result. + +*mallopt* returns zero if the parameter could not be set, or +non-zero if it could be set. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/on_exit.rst b/posix-users/newlib/libc/stdlib/on_exit.rst new file mode 100644 index 0000000..1754924 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/on_exit.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/on_exit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. on_exit: + +on_exit - Request execution of function with argument at program exit +------------------------------------------------------------------------- +.. index:: on_exit +.. index:: request execution of function with argument at program exit + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int on_exit (void (*function)(int, void *), void *arg); + + + +**DESCRIPTION:** + +You can use *on_exit* to enroll functions in a list of functions that +will be called when your program terminates normally. The argument is +a pointer to a user-defined function which takes two arguments. The +first is the status code passed to exit and the second argument is of type +pointer to void. The function must not return a result. The value +of ``arg`` is registered and passed as the argument to ``function``. + +The functions are kept in a LIFO stack; that is, the last function +enrolled by *atexit* or *on_exit* will be the first to execute when +your program exits. You can intermix functions using *atexit* and +*on_exit*. + +There is no built-in limit to the number of functions you can enroll +in this list; however, after every group of 32 functions is enrolled, +*atexit*/*on_exit* will call *malloc* to get space for the next part +of the list. The initial list of 32 functions is statically allocated, so +you can always count on at least that many slots available. + + + +**STATUS CODES:** + +*on_exit* returns *0* if it succeeds in enrolling your function, +*-1* if it fails (possible only if no space was available for +*malloc* to extend the list of functions). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/rand.rst b/posix-users/newlib/libc/stdlib/rand.rst new file mode 100644 index 0000000..8a84baa --- /dev/null +++ b/posix-users/newlib/libc/stdlib/rand.rst @@ -0,0 +1,66 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/rand.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rand, srand: + +rand, srand - Pseudo-random numbers +----------------------------------------- +.. index:: rand +.. index:: srand +.. index:: pseudo-random numbers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int rand(void); + void srand(unsigned int seed); + int rand_r(unsigned int *seed); + + + +**DESCRIPTION:** + +*rand* returns a different integer each time it is called; each +integer is chosen by an algorithm designed to be unpredictable, so +that you can use *rand* when you require a random number. +The algorithm depends on a static variable called the ``random seed``; +starting with a given value of the random seed always produces the +same sequence of numbers in successive calls to *rand*. + +You can set the random seed using *srand*; it does nothing beyond +storing its argument in the static variable used by *rand*. You can +exploit this to make the pseudo-random sequence less predictable, if +you wish, by using some other unpredictable value (often the least +significant parts of a time-varying value) as the random seed before +beginning a sequence of calls to *rand*; or, if you wish to ensure +(for example, while debugging) that successive runs of your program +use the same ``random`` numbers, you can use *srand* to set the same +random seed at the outset. + + + +**STATUS CODES:** + +*rand* returns the next pseudo-random integer in sequence; it is a +number between *0* and *RAND_MAX* (inclusive). + +*srand* does not return a result. + + + +**NOTES:** + +*rand* and *srand* are unsafe for multi-threaded applications. +*rand_r* is thread-safe and should be used instead. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/rand48.rst b/posix-users/newlib/libc/stdlib/rand48.rst new file mode 100644 index 0000000..1de8abc --- /dev/null +++ b/posix-users/newlib/libc/stdlib/rand48.rst @@ -0,0 +1,118 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/rand48.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rand48, drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, lcong48: + +rand48, drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, lcong48 - Pseudo-random number generators and initialization routines +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: rand48 +.. index:: drand48 +.. index:: erand48 +.. index:: lrand48 +.. index:: nrand48 +.. index:: mrand48 +.. index:: jrand48 +.. index:: srand48 +.. index:: seed48 +.. index:: lcong48 +.. index:: pseudo-random number generators and initialization routines + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + double drand48(void); + double erand48(unsigned short xseed[3]); + long lrand48(void); + long nrand48(unsigned short xseed[3]); + long mrand48(void); + long jrand48(unsigned short xseed[3]); + void srand48(long seed); + unsigned short *seed48(unsigned short xseed[3]); + void lcong48(unsigned short p[7]); + + + +**DESCRIPTION:** + +The *rand48* family of functions generates pseudo-random numbers +using a linear congruential algorithm working on integers 48 bits in size. +The particular formula employed is +r(n+1) = (a * r(n) + c) mod m +where the default values are +for the multiplicand a = 0xfdeece66d = 25214903917 and +the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. +r(n) is called the seed of the random number generator. + +For all the six generator routines described next, the first +computational step is to perform a single iteration of the algorithm. + +*drand48* and *erand48* +return values of type double. The full 48 bits of r(n+1) are +loaded into the mantissa of the returned value, with the exponent set +such that the values produced lie in the interval [0.0, 1.0]. + +*lrand48* and *nrand48* +return values of type long in the range +[0, 2**31-1]. The high-order (31) bits of +r(n+1) are loaded into the lower bits of the returned value, with +the topmost (sign) bit set to zero. + +*mrand48* and *jrand48* +return values of type long in the range +[-2**31, 2**31-1]. The high-order (32) bits of +r(n+1) are loaded into the returned value. + +*drand48*, *lrand48*, and *mrand48* +use an internal buffer to store r(n). For these functions +the initial value of r(0) = 0x1234abcd330e = 20017429951246. + +On the other hand, *erand48*, *nrand48*, and *jrand48* +use a user-supplied buffer to store the seed r(n), +which consists of an array of 3 shorts, where the zeroth member +holds the least significant bits. + +All functions share the same multiplicand and addend. + +*srand48* is used to initialize the internal buffer r(n) of +*drand48*, *lrand48*, and *mrand48* +such that the 32 bits of the seed value are copied into the upper 32 bits +of r(n), with the lower 16 bits of r(n) arbitrarily being set to 0x330e. +Additionally, the constant multiplicand and addend of the algorithm are +reset to the default values given above. + +*seed48* also initializes the internal buffer r(n) of +*drand48*, *lrand48*, and *mrand48*, +but here all 48 bits of the seed can be specified in an array of 3 shorts, +where the zeroth member specifies the lowest bits. Again, +the constant multiplicand and addend of the algorithm are +reset to the default values given above. +*seed48* returns a pointer to an array of 3 shorts which contains +the old seed. +This array is statically allocated, thus its contents are lost after +each new call to *seed48*. + +Finally, *lcong48* allows full control over the multiplicand and +addend used in *drand48*, *erand48*, *lrand48*, *nrand48*, +*mrand48*, and *jrand48*, +and the seed used in *drand48*, *lrand48*, and *mrand48*. +An array of 7 shorts is passed as parameter; the first three shorts are +used to initialize the seed; the second three are used to initialize the +multiplicand; and the last short is used to initialize the addend. +It is thus not possible to use values greater than 0xffff as the addend. + +Note that all three methods of seeding the random number generator +always also set the multiplicand and addend for any of the six +generator calls. + +For a more powerful random number generator, see *random*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/random.rst b/posix-users/newlib/libc/stdlib/random.rst new file mode 100644 index 0000000..27cd468 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/random.rst @@ -0,0 +1,68 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/random.c + +.. COMMENT: Generated on: 2018-08-20 + +.. random, srandom: + +random, srandom - Pseudo-random numbers +--------------------------------------------- +.. index:: random +.. index:: srandom +.. index:: pseudo-random numbers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #define _XOPEN_SOURCE 500 + #include <stdlib.h> + long int random(void); + void srandom(unsigned int seed); + + + + + +**DESCRIPTION:** + +*random* returns a different integer each time it is called; each +integer is chosen by an algorithm designed to be unpredictable, so +that you can use *random* when you require a random number. +The algorithm depends on a static variable called the ``random seed``; +starting with a given value of the random seed always produces the +same sequence of numbers in successive calls to *random*. + +You can set the random seed using *srandom*; it does nothing beyond +storing its argument in the static variable used by *rand*. You can +exploit this to make the pseudo-random sequence less predictable, if +you wish, by using some other unpredictable value (often the least +significant parts of a time-varying value) as the random seed before +beginning a sequence of calls to *rand*; or, if you wish to ensure +(for example, while debugging) that successive runs of your program +use the same ``random`` numbers, you can use *srandom* to set the same +random seed at the outset. + + + +**STATUS CODES:** + +*random* returns the next pseudo-random integer in sequence; it is a +number between *0* and *RAND_MAX* (inclusive). + +*srandom* does not return a result. + + + +**NOTES:** + +*random* and *srandom* are unsafe for multi-threaded applications. + +_XOPEN_SOURCE may be any value >= 500. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/rpmatch.rst b/posix-users/newlib/libc/stdlib/rpmatch.rst new file mode 100644 index 0000000..60a6c25 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/rpmatch.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/rpmatch.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rpmatch: + +rpmatch - Determine whether response to question is affirmative or negative +------------------------------------------------------------------------------- +.. index:: rpmatch +.. index:: determine whether response to question is affirmative or negative + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int rpmatch(const char *response); + + + +**DESCRIPTION:** + +The *rpmatch* function determines whether ``response`` is an affirmative +or negative response to a question according to the current locale. + + + +**STATUS CODES:** + +*rpmatch* returns 1 if ``response`` is affirmative, 0 if negative, or -1 +if not recognized as either. + + + +**PORTABILITY:** + +*rpmatch* is a BSD extension also found in glibc. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/strtod.rst b/posix-users/newlib/libc/stdlib/strtod.rst new file mode 100644 index 0000000..a8c9f99 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/strtod.rst @@ -0,0 +1,97 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/strtod.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtod, strtof, strtold, strtod_l, strtof_l, strtold_l: + +strtod, strtof, strtold, strtod_l, strtof_l, strtold_l - String to double or float +-------------------------------------------------------------------------------------------------------- +.. index:: strtod +.. index:: strtof +.. index:: strtold +.. index:: strtod_l +.. index:: strtof_l +.. index:: strtold_l +.. index:: string to double or float + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + double strtod(const char *restrict str, char **restrict tail); + float strtof(const char *restrict str, char **restrict tail); + long double strtold(const char *restrict str, + char **restrict tail); + + #include <stdlib.h> + double strtod_l(const char *restrict str, char **restrict tail, + locale_t locale); + float strtof_l(const char *restrict str, char **restrict tail, + locale_t locale); + long double strtold_l(const char *restrict str, + char **restrict tail, + locale_t locale); + + double _strtod_r(void *reent, + const char *restrict str, char **restrict tail); + + + +**DESCRIPTION:** + + *strtod*, *strtof*, *strtold* parse the character string + ``str``, producing a substring which can be converted to a double, + float, or long double value, respectively. The substring converted + is the longest initial subsequence of ``str``, beginning with the + first non-whitespace character, that has one of these formats: + .[+|-]``digits``[.[``digits``]][(e|E)[+|-]``digits``] + .[+|-].``digits``[(e|E)[+|-]``digits``] + .[+|-](i|I)(n|N)(f|F)[(i|I)(n|N)(i|I)(t|T)(y|Y)] + .[+|-](n|N)(a|A)(n|N)[<(>[``hexdigits``]<)>] + .[+|-]0(x|X)``hexdigits``[.[``hexdigits``]][(p|P)[+|-]``digits``] + .[+|-]0(x|X).``hexdigits``[(p|P)[+|-]``digits``] + The substring contains no characters if ``str`` is empty, consists + entirely of whitespace, or if the first non-whitespace + character is something other than *+*, *-*, *.*, or a + digit, and cannot be parsed as infinity or NaN. If the platform + does not support NaN, then NaN is treated as an empty substring. + If the substring is empty, no conversion is done, and + the value of ``str`` is stored in **``tail]*>. Otherwise, + the substring is converted, and a pointer to the final string + (which will contain at least the terminating null character of + ``str``) is stored in **``tail]*>. If you want no + assignment to **``tail]*>, pass a null pointer as ``tail``. + + This implementation returns the nearest machine number to the + input decimal string. Ties are broken by using the IEEE + round-even rule. However, *strtof* is currently subject to + double rounding errors. + + *strtod_l*, *strtof_l*, *strtold_l* are like *strtod*, + *strtof*, *strtold* but perform the conversion based on the + locale specified by the locale object locale. If ``locale`` is + LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is + undefined. + + The alternate function *_strtod_r* is a reentrant version. + The extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + + These functions return the converted substring value, if any. If + no conversion could be performed, 0 is returned. If the correct + value is out of the range of representable values, plus or minus + *HUGE_VAL* (*HUGE_VALF*, *HUGE_VALL*) is returned, and + *ERANGE* is stored in errno. If the correct value would cause + underflow, 0 is returned and *ERANGE* is stored in errno. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/strtol.rst b/posix-users/newlib/libc/stdlib/strtol.rst new file mode 100644 index 0000000..6840441 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/strtol.rst @@ -0,0 +1,95 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/strtol.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtol, strtol_l: + +strtol, strtol_l - String to long +------------------------------------------ +.. index:: strtol +.. index:: strtol_l +.. index:: string to long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long strtol(const char *restrict s, char **restrict ptr, + int base); + + #include <stdlib.h> + long strtol_l(const char *restrict s, char **restrict ptr, + int base, locale_t locale); + + long _strtol_r(void *reent, const char *restrict s, + char **restrict ptr,int base); + + + +**DESCRIPTION:** + +The function *strtol* converts the string **``s]*> to +a *long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of characters resembling an integer in the radix specified by ``base``; +and a trailing portion consisting of zero or more unparseable characters, +and always including the terminating null character. Then, it attempts +to convert the subject string into a *long* and returns the +result. + +If the value of ``base`` is 0, the subject string is expected to look +like a normal C integer constant: an optional sign, a possible `*0x*` +indicating a hexadecimal base, and a number. If ``base`` is between +2 and 36, the expected form of the subject is a sequence of letters +and digits representing an integer in the radix specified by ``base``, +with an optional plus or minus sign. The letters *a*--*z* (or, +equivalently, *A*--*Z*) are used to signify values from 10 to 35; +only letters whose ascribed values are less than ``base`` are +permitted. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible letter or digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*strtol* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading 0 and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. If the subject string begins with +a minus sign, the value is negated. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (or not in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +*strtol_l* is like *strtol* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +The alternate function *_strtol_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*strtol*, *strtol_l* return the converted value, if any. If no +conversion was made, 0 is returned. + +*strtol*, *strtol_l* return *LONG_MAX* or *LONG_MIN* if the +magnitude of the converted value is too large, and sets *errno* +to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/strtoll.rst b/posix-users/newlib/libc/stdlib/strtoll.rst new file mode 100644 index 0000000..9b54390 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/strtoll.rst @@ -0,0 +1,97 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/strtoll.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtoll, strtoll_l: + +strtoll, strtoll_l - String to long long +------------------------------------------------- +.. index:: strtoll +.. index:: strtoll_l +.. index:: string to long long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + long long strtoll(const char *restrict s, char **restrict ptr, + int base); + + #include <stdlib.h> + long long strtoll_l(const char *restrict s, + char **restrict ptr, int base, + locale_t locale); + + long long _strtoll_r(void *reent, + const char *restrict s, + char **restrict ptr, int base); + + + +**DESCRIPTION:** + +The function *strtoll* converts the string **``s]*> to +a *long long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of characters resembling an integer in the radix specified by ``base``; +and a trailing portion consisting of zero or more unparseable characters, +and always including the terminating null character. Then, it attempts +to convert the subject string into a *long long* and returns the +result. + +If the value of ``base`` is 0, the subject string is expected to look +like a normal C integer constant: an optional sign, a possible `*0x*` +indicating a hexadecimal base, and a number. If ``base`` is between +2 and 36, the expected form of the subject is a sequence of letters +and digits representing an integer in the radix specified by ``base``, +with an optional plus or minus sign. The letters *a*--*z* (or, +equivalently, *A*--*Z*) are used to signify values from 10 to 35; +only letters whose ascribed values are less than ``base`` are +permitted. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible letter or digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*strtoll* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading 0 and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. If the subject string begins with +a minus sign, the value is negated. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (or not in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +*strtoll_l* is like *strtoll* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +The alternate function *_strtoll_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*strtoll*, *strtoll_l* return the converted value, if any. If no +conversion was made, 0 is returned. + +*strtoll*, *strtoll_l* return *LONG_LONG_MAX* or *LONG_LONG_MIN* +if the magnitude of the converted value is too large, and sets *errno* +to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/strtoul.rst b/posix-users/newlib/libc/stdlib/strtoul.rst new file mode 100644 index 0000000..dc2428f --- /dev/null +++ b/posix-users/newlib/libc/stdlib/strtoul.rst @@ -0,0 +1,95 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/strtoul.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtoul, strtoul_l: + +strtoul, strtoul_l - String to unsigned long +--------------------------------------------------- +.. index:: strtoul +.. index:: strtoul_l +.. index:: string to unsigned long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + unsigned long strtoul(const char *restrict s, + char **restrict ptr, int base); + + #include <stdlib.h> + unsigned long strtoul_l(const char *restrict s, + char **restrict ptr, int base, + locale_t locale); + + unsigned long _strtoul_r(void *reent, const char *restrict s, + char **restrict ptr, int base); + + + +**DESCRIPTION:** + +The function *strtoul* converts the string **``s]*> to +an *unsigned long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of the digits meaningful in the radix specified by ``base`` +(for example, *0* through *7* if the value of ``base`` is 8); +and a trailing portion consisting of one or more unparseable characters, +which always includes the terminating null character. Then, it attempts +to convert the subject string into an unsigned long integer, and returns the +result. + +If the value of ``base`` is zero, the subject string is expected to look +like a normal C integer constant (save that no optional sign is permitted): +a possible *0x* indicating hexadecimal radix, and a number. +If ``base`` is between 2 and 36, the expected form of the subject is a +sequence of digits (which may include letters, depending on the +base) representing an integer in the radix specified by ``base``. +The letters *a*--*z* (or *A*--*Z*) are used as digits valued from +10 to 35. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*strtoul* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading *0* and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (that is, if ***``s`` does not start +with a substring in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +*strtoul_l* is like *strtoul* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +The alternate function *_strtoul_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*strtoul*, *strtoul_l* return the converted value, if any. If no +conversion was made, *0* is returned. + +*strtoul*, *strtoul_l* return *ULONG_MAX* if the magnitude of the +converted value is too large, and sets *errno* to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/strtoull.rst b/posix-users/newlib/libc/stdlib/strtoull.rst new file mode 100644 index 0000000..4053517 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/strtoull.rst @@ -0,0 +1,96 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/strtoull.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtoull, strtoull_l: + +strtoull, strtoull_l - String to unsigned long long +---------------------------------------------------------- +.. index:: strtoull +.. index:: strtoull_l +.. index:: string to unsigned long long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + unsigned long long strtoull(const char *restrict s, + char **restrict ptr, int base); + + #include <stdlib.h> + unsigned long long strtoull_l(const char *restrict s, + char **restrict ptr, int base, + locale_t locale); + + unsigned long long _strtoull_r(void *reent, + const char *restrict s, + char **restrict ptr, int base); + + + +**DESCRIPTION:** + +The function *strtoull* converts the string **``s]*> to +an *unsigned long long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of the digits meaningful in the radix specified by ``base`` +(for example, *0* through *7* if the value of ``base`` is 8); +and a trailing portion consisting of one or more unparseable characters, +which always includes the terminating null character. Then, it attempts +to convert the subject string into an unsigned long long integer, and returns the +result. + +If the value of ``base`` is zero, the subject string is expected to look +like a normal C integer constant (save that no optional sign is permitted): +a possible *0x* indicating hexadecimal radix, and a number. +If ``base`` is between 2 and 36, the expected form of the subject is a +sequence of digits (which may include letters, depending on the +base) representing an integer in the radix specified by ``base``. +The letters *a*--*z* (or *A*--*Z*) are used as digits valued from +10 to 35. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*strtoull* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading *0* and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (that is, if ***``s`` does not start +with a substring in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +*strtoull_l* is like *strtoull* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + +The alternate function *_strtoull_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*strtoull*, *strtoull_l* return the converted value, if any. If no +conversion was made, *0* is returned. + +*strtoull*, *strtoull_l* return *ULONG_LONG_MAX* if the magnitude +of the converted value is too large, and sets *errno* to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/system.rst b/posix-users/newlib/libc/stdlib/system.rst new file mode 100644 index 0000000..067e498 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/system.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/system.c + +.. COMMENT: Generated on: 2018-08-20 + +.. system: + +system - Execute command string +----------------------------------- +.. index:: system +.. index:: execute command string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int system(char *s); + + int _system_r(void *reent, char *s); + + + +**DESCRIPTION:** + + +Use *system* to pass a command string **``s]*> to */bin/sh* on +your system, and wait for it to finish executing. + +Use ``*system(NULL)*`` to test whether your system has */bin/sh* +available. + +The alternate function *_system_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + +*system(NULL)* returns a non-zero value if */bin/sh* is available, and +*0* if it is not. + +With a command argument, the result of *system* is the exit status +returned by */bin/sh*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/utoa.rst b/posix-users/newlib/libc/stdlib/utoa.rst new file mode 100644 index 0000000..59f0de5 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/utoa.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/utoa.c + +.. COMMENT: Generated on: 2018-08-20 + +.. utoa: + +utoa - Unsigned integer to string +------------------------------------- +.. index:: utoa +.. index:: unsigned integer to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + char *utoa(unsigned value, char *str, int base); + char *__utoa(unsigned value, char *str, int base); + + + +**DESCRIPTION:** + +*utoa* converts the unsigned integer [<value>] to a null-terminated string +using the specified base, which must be between 2 and 36, inclusive. +``str`` should be an array long enough to contain the converted +value, which in the worst case is sizeof(int)*8+1 bytes. + + + +**STATUS CODES:** + +A pointer to the string, ``str``, or NULL if ``base`` is invalid. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcsnrtombs.rst b/posix-users/newlib/libc/stdlib/wcsnrtombs.rst new file mode 100644 index 0000000..a94c0a4 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcsnrtombs.rst @@ -0,0 +1,75 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcsnrtombs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsrtombs, wcsnrtombs: + +wcsrtombs, wcsnrtombs - Convert a wide-character string to a character string +----------------------------------------------------------------------------------- +.. index:: wcsrtombs +.. index:: wcsnrtombs +.. index:: convert a wide-character string to a character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcsrtombs(char *__restrict dst, + const wchar_t **__restrict src, size_t len, + mbstate_t *__restrict ps); + + #include <wchar.h> + size_t _wcsrtombs_r(struct _reent *ptr, char *dst, + const wchar_t **src, size_t len, + mbstate_t *ps); + + #include <wchar.h> + size_t wcsnrtombs(char *__restrict dst, + const wchar_t **__restrict src, + size_t nwc, size_t len, + mbstate_t *__restrict ps); + + #include <wchar.h> + size_t _wcsnrtombs_r(struct _reent *ptr, char *dst, + const wchar_t **src, size_t nwc, + size_t len, mbstate_t *ps); + + + +**DESCRIPTION:** + +The *wcsrtombs* function converts a string of wide characters indirectly +pointed to by ``src`` to a corresponding multibyte character string stored in +the array pointed to by ``dst``. No more than ``len`` bytes are written to +``dst``. + +If ``dst`` is NULL, no characters are stored. + +If ``dst`` is not NULL, the pointer pointed to by ``src`` is updated to point +to the character after the one that conversion stopped at. If conversion +stops because a null character is encountered, *``src`` is set to NULL. + +The mbstate_t argument, ``ps``, is used to keep track of the shift state. If +it is NULL, *wcsrtombs* uses an internal, static mbstate_t object, which +is initialized to the initial conversion state at program startup. + +The *wcsnrtombs* function behaves identically to *wcsrtombs*, except that +conversion stops after reading at most ``nwc`` characters from the buffer +pointed to by ``src``. + + + +**STATUS CODES:** + +The *wcsrtombs* and *wcsnrtombs* functions return the number of bytes +stored in the array pointed to by ``dst`` (not including any terminating +null), if successful, otherwise it returns (size_t)-1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstod.rst b/posix-users/newlib/libc/stdlib/wcstod.rst new file mode 100644 index 0000000..be2d560 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstod.rst @@ -0,0 +1,102 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstod.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstod, wcstof, wcstold, wcstod_l, wcstof_l, wcstold_l: + +wcstod, wcstof, wcstold, wcstod_l, wcstof_l, wcstold_l - Wide char string to double or float +------------------------------------------------------------------------------------------------------------------ +.. index:: wcstod +.. index:: wcstof +.. index:: wcstold +.. index:: wcstod_l +.. index:: wcstof_l +.. index:: wcstold_l +.. index:: wide char string to double or float + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + double wcstod(const wchar_t *__restrict str, + wchar_t **__restrict tail); + float wcstof(const wchar_t *__restrict str, + wchar_t **__restrict tail); + long double wcstold(const wchar_t *__restrict str, + wchar_t **__restrict tail); + + #include <stdlib.h> + double wcstod_l(const wchar_t *__restrict str, + wchar_t **__restrict tail, locale_t locale); + float wcstof_l(const wchar_t *__restrict str, + wchar_t **__restrict tail, locale_t locale); + long double wcstold_l(const wchar_t *__restrict str, + wchar_t **__restrict tail, + locale_t locale); + + double _wcstod_r(void *reent, + const wchar_t *str, wchar_t **tail); + float _wcstof_r(void *reent, + const wchar_t *str, wchar_t **tail); + + + +**DESCRIPTION:** + + *wcstod*, *wcstof*, *wcstold* parse the wide-character string + ``str``, producing a substring which can be converted to a double, + float, or long double value. The substring converted is the longest + initial subsequence of ``str``, beginning with the first non-whitespace + character, that has one of these formats: + .[+|-]``digits``[.[``digits``]][(e|E)[+|-]``digits``] + .[+|-].``digits``[(e|E)[+|-]``digits``] + .[+|-](i|I)(n|N)(f|F)[(i|I)(n|N)(i|I)(t|T)(y|Y)] + .[+|-](n|N)(a|A)(n|N)[<(>[``hexdigits``]<)>] + .[+|-]0(x|X)``hexdigits``[.[``hexdigits``]][(p|P)[+|-]``digits``] + .[+|-]0(x|X).``hexdigits``[(p|P)[+|-]``digits``] + The substring contains no characters if ``str`` is empty, consists + entirely of whitespace, or if the first non-whitespace + character is something other than *+*, *-*, *.*, or a + digit, and cannot be parsed as infinity or NaN. If the platform + does not support NaN, then NaN is treated as an empty substring. + If the substring is empty, no conversion is done, and + the value of ``str`` is stored in **``tail]*>. Otherwise, + the substring is converted, and a pointer to the final string + (which will contain at least the terminating null character of + ``str``) is stored in **``tail]*>. If you want no + assignment to **``tail]*>, pass a null pointer as ``tail``. + + This implementation returns the nearest machine number to the + input decimal string. Ties are broken by using the IEEE + round-even rule. However, *wcstof* is currently subject to + double rounding errors. + + *wcstod_l*, *wcstof_l*, *wcstold_l* are like *wcstod*, + *wcstof*, *wcstold* but perform the conversion based on the + locale specified by the locale object locale. If ``locale`` is + LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is + undefined. + + The alternate functions *_wcstod_r* and *_wcstof_r* are + reentrant versions of *wcstod* and *wcstof*, respectively. + The extra argument ``reent`` is a pointer to a reentrancy structure. + + + +**STATUS CODES:** + + Return the converted substring value, if any. If + no conversion could be performed, 0 is returned. If the + correct value is out of the range of representable values, + plus or minus *HUGE_VAL* is returned, and *ERANGE* is + stored in errno. If the correct value would cause underflow, 0 + is returned and *ERANGE* is stored in errno. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstol.rst b/posix-users/newlib/libc/stdlib/wcstol.rst new file mode 100644 index 0000000..9809072 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstol.rst @@ -0,0 +1,96 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstol.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstol, wcstol_l: + +wcstol, wcstol_l - Wide string to long +----------------------------------------------- +.. index:: wcstol +.. index:: wcstol_l +.. index:: wide string to long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + long wcstol(const wchar_t *__restrict s, + wchar_t **__restrict ptr, int base); + + #include <wchar.h> + long wcstol_l(const wchar_t *__restrict s, + wchar_t **__restrict ptr, int base, + locale_t locale); + + long _wcstol_r(void *reent, const wchar_t *s, + wchar_t **ptr, int base); + + + +**DESCRIPTION:** + +The function *wcstol* converts the wide string **``s]*> to +a *long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of characters resembling an integer in the radix specified by ``base``; +and a trailing portion consisting of zero or more unparseable characters, +and always including the terminating null character. Then, it attempts +to convert the subject string into a *long* and returns the +result. + +If the value of ``base`` is 0, the subject string is expected to look +like a normal C integer constant: an optional sign, a possible `*0x*` +indicating a hexadecimal base, and a number. If ``base`` is between +2 and 36, the expected form of the subject is a sequence of letters +and digits representing an integer in the radix specified by ``base``, +with an optional plus or minus sign. The letters *a*--*z* (or, +equivalently, *A*--*Z*) are used to signify values from 10 to 35; +only letters whose ascribed values are less than ``base`` are +permitted. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible letter or digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*wcstol* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading 0 and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. If the subject string begins with +a minus sign, the value is negated. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (or not in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +The alternate function *_wcstol_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + +*wcstol_l* is like *wcstol* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wcstol*, *wcstol_l* return the converted value, if any. If no +conversion was made, 0 is returned. + +*wcstol*, *wcstol_l* return *LONG_MAX* or *LONG_MIN* if the +magnitude of the converted value is too large, and sets *errno* +to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstoll.rst b/posix-users/newlib/libc/stdlib/wcstoll.rst new file mode 100644 index 0000000..08609bd --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstoll.rst @@ -0,0 +1,96 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstoll.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstoll, wcstoll_l: + +wcstoll, wcstoll_l - Wide string to long long +------------------------------------------------------ +.. index:: wcstoll +.. index:: wcstoll_l +.. index:: wide string to long long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + long long wcstoll(const wchar_t *__restrict s, + wchar_t **__restrict ptr,int base); + + #include <wchar.h> + long long wcstoll_l(const wchar_t *__restrict s, + wchar_t **__restrict ptr, int base, + locale_t locale); + + long long _wcstoll_r(void *reent, const wchar_t *s, + wchar_t **ptr, int base); + + + +**DESCRIPTION:** + +The function *wcstoll* converts the wide string **``s]*> to +a *long long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of characters resembling an integer in the radix specified by ``base``; +and a trailing portion consisting of zero or more unparseable characters, +and always including the terminating null character. Then, it attempts +to convert the subject string into a *long long* and returns the +result. + +If the value of ``base`` is 0, the subject string is expected to look +like a normal C integer constant: an optional sign, a possible `*0x*` +indicating a hexadecimal base, and a number. If ``base`` is between +2 and 36, the expected form of the subject is a sequence of letters +and digits representing an integer in the radix specified by ``base``, +with an optional plus or minus sign. The letters *a*--*z* (or, +equivalently, *A*--*Z*) are used to signify values from 10 to 35; +only letters whose ascribed values are less than ``base`` are +permitted. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible letter or digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*wcstoll* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading 0 and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. If the subject string begins with +a minus sign, the value is negated. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (or not in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +The alternate function *_wcstoll_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + +*wcstoll_l* is like *wcstoll* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wcstoll*, *wcstoll_l* return the converted value, if any. If no +conversion was made, 0 is returned. + +*wcstoll*, *wcstoll_l* return *LONG_LONG_MAX* or *LONG_LONG_MIN* +if the magnitude of the converted value is too large, and sets *errno* +to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstombs.rst b/posix-users/newlib/libc/stdlib/wcstombs.rst new file mode 100644 index 0000000..7cd91b3 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstombs.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstombs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstombs: + +wcstombs - Minimal wide char string to multibyte string converter +--------------------------------------------------------------------- +.. index:: wcstombs +.. index:: minimal wide char string to multibyte string converter + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + size_t wcstombs(char *restrict s, const wchar_t *restrict pwc, size_t n); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *wcstombs*. In this case, +all wide-characters are expected to represent single bytes and so +are converted simply by casting to char. + +When _MB_CAPABLE is defined, this routine calls *_wcstombs_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + + + +**STATUS CODES:** + +This implementation of *wcstombs* returns *0* if +``s`` is *NULL* or is the empty string; +it returns *-1* if _MB_CAPABLE and one of the +wide-char characters does not represent a valid multi-byte character; +otherwise it returns the minimum of: *n* or the +number of bytes that are transferred to *s*, not including the +nul terminator. + +If the return value is -1, the state of the *pwc* string is +indeterminate. If the input has a length of 0, the output +string will be modified to contain a wchar_t nul terminator if +*n* > 0. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstoul.rst b/posix-users/newlib/libc/stdlib/wcstoul.rst new file mode 100644 index 0000000..d1d67a1 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstoul.rst @@ -0,0 +1,96 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstoul.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstoul, wcstoul_l: + +wcstoul, wcstoul_l - Wide string to unsigned long +-------------------------------------------------------- +.. index:: wcstoul +.. index:: wcstoul_l +.. index:: wide string to unsigned long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + unsigned long wcstoul(const wchar_t *__restrict s, + wchar_t **__restrict ptr, int base); + + #include <wchar.h> + unsigned long wcstoul_l(const wchar_t *__restrict s, + wchar_t **__restrict ptr, int base, + locale_t locale); + + unsigned long _wcstoul_r(void *reent, const wchar_t *s, + wchar_t **ptr, int base); + + + +**DESCRIPTION:** + +The function *wcstoul* converts the wide string **``s]*> to +an *unsigned long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of the digits meaningful in the radix specified by ``base`` +(for example, *0* through *7* if the value of ``base`` is 8); +and a trailing portion consisting of one or more unparseable characters, +which always includes the terminating null character. Then, it attempts +to convert the subject string into an unsigned long integer, and returns the +result. + +If the value of ``base`` is zero, the subject string is expected to look +like a normal C integer constant (save that no optional sign is permitted): +a possible *0x* indicating hexadecimal radix, and a number. +If ``base`` is between 2 and 36, the expected form of the subject is a +sequence of digits (which may include letters, depending on the +base) representing an integer in the radix specified by ``base``. +The letters *a*--*z* (or *A*--*Z*) are used as digits valued from +10 to 35. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*wcstoul* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading *0* and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (that is, if ***``s`` does not start +with a substring in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +The alternate function *_wcstoul_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + +*wcstoul_l* is like *wcstoul* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wcstoul*, *wcstoul_l* return the converted value, if any. If no +conversion was made, *0* is returned. + +*wcstoul*, *wcstoul_l* return *ULONG_MAX* if the magnitude of the +converted value is too large, and sets *errno* to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wcstoull.rst b/posix-users/newlib/libc/stdlib/wcstoull.rst new file mode 100644 index 0000000..b1aa1b2 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wcstoull.rst @@ -0,0 +1,102 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wcstoull.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstoull, wcstoull_l: + +wcstoull, wcstoull_l - Wide string to unsigned long long +--------------------------------------------------------------- +.. index:: wcstoull +.. index:: wcstoull_l +.. index:: wide string to unsigned long long + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + unsigned long long wcstoull(const wchar_t *__restrict s, + wchar_t **__restrict ptr, + int base); + + #include <wchar.h> + unsigned long long wcstoull_l(const wchar_t *__restrict s, + wchar_t **__restrict ptr, + int base, + locale_t locale); + + unsigned long long _wcstoull_r(void *reent, const wchar_t *s, + wchar_t **ptr, int base); + + + +**DESCRIPTION:** + +The function *wcstoull* converts the wide string **``s]*> to +an *unsigned long long*. First, it breaks down the string into three parts: +leading whitespace, which is ignored; a subject string consisting +of the digits meaningful in the radix specified by ``base`` +(for example, *0* through *7* if the value of ``base`` is 8); +and a trailing portion consisting of one or more unparseable characters, +which always includes the terminating null character. Then, it attempts +to convert the subject string into an unsigned long long integer, and returns the +result. + +If the value of ``base`` is zero, the subject string is expected to look +like a normal C integer constant: an optional sign (*+* or *-*), +a possible *0x* indicating hexadecimal radix or a possible <0> indicating +octal radix, and a number. +If ``base`` is between 2 and 36, the expected form of the subject is a +sequence of digits (which may include letters, depending on the +base) representing an integer in the radix specified by ``base``. +The letters *a*--*z* (or *A*--*Z*) are used as digits valued from +10 to 35. If ``base`` is 16, a leading *0x* is permitted. + +The subject sequence is the longest initial sequence of the input +string that has the expected form, starting with the first +non-whitespace character. If the string is empty or consists entirely +of whitespace, or if the first non-whitespace character is not a +permissible digit, the subject string is empty. + +If the subject string is acceptable, and the value of ``base`` is zero, +*wcstoull* attempts to determine the radix from the input string. A +string with a leading *0x* is treated as a hexadecimal value; a string with +a leading *0* and no *x* is treated as octal; all other strings are +treated as decimal. If ``base`` is between 2 and 36, it is used as the +conversion radix, as described above. Finally, a pointer to the first +character past the converted subject string is stored in ``ptr``, if +``ptr`` is not *NULL*. + +If the subject string is empty (that is, if ***``s`` does not start +with a substring in acceptable form), no conversion +is performed and the value of ``s`` is stored in ``ptr`` (if ``ptr`` is +not *NULL*). + +The alternate function *_wcstoull_r* is a reentrant version. The +extra argument ``reent`` is a pointer to a reentrancy structure. + + +*wcstoull_l* is like *wcstoull* but performs the conversion based on the +locale specified by the locale object locale. If ``locale`` is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + + + +**STATUS CODES:** + +*wcstoull*, *wcstoull_l* return *0* and sets *errno* to *EINVAL* +if the value of ``base`` is not supported. + +*wcstoull*, *wcstoull_l* return the converted value, if any. If no +conversion was made, *0* is returned. + +*wcstoull*, *wcstoull_l* return *ULLONG_MAX* if the magnitude of +the converted value is too large, and sets *errno* to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/stdlib/wctomb.rst b/posix-users/newlib/libc/stdlib/wctomb.rst new file mode 100644 index 0000000..12b5944 --- /dev/null +++ b/posix-users/newlib/libc/stdlib/wctomb.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/stdlib/wctomb.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wctomb: + +wctomb - Minimal wide char to multibyte converter +----------------------------------------------------- +.. index:: wctomb +.. index:: minimal wide char to multibyte converter + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <stdlib.h> + int wctomb(char *s, wchar_t wchar); + + + +**DESCRIPTION:** + +When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming +implementation of *wctomb*. The +only ``wide characters`` recognized are single bytes, +and they are ``converted`` to themselves. + +When _MB_CAPABLE is defined, this routine calls *_wctomb_r* to perform +the conversion, passing a state variable to allow state dependent +decoding. The result is based on the locale setting which may +be restricted to a defined set of locales. + +Each call to *wctomb* modifies **``s]*> unless ``s`` is a null +pointer or _MB_CAPABLE is defined and ``wchar`` is invalid. + + + +**STATUS CODES:** + +This implementation of *wctomb* returns *0* if +``s`` is *NULL*; it returns *-1* if _MB_CAPABLE is enabled +and the wchar is not a valid multi-byte character, it returns *1* +if _MB_CAPABLE is not defined or the wchar is in reality a single +byte character, otherwise it returns the number of bytes in the +multi-byte character. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/bcmp.rst b/posix-users/newlib/libc/string/bcmp.rst new file mode 100644 index 0000000..f93a385 --- /dev/null +++ b/posix-users/newlib/libc/string/bcmp.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/bcmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. bcmp: + +bcmp - Compare two memory areas +------------------------------------ +.. index:: bcmp +.. index:: compare two memory areas + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int bcmp(const void *s1, const void *s2, size_t n); + + + +**DESCRIPTION:** + + This function compares not more than ``n`` bytes of the + object pointed to by ``s1`` with the object pointed to by ``s2``. + + This function is identical to *memcmp*. + + + +**STATUS CODES:** + + The function returns an integer greater than, equal to or + less than zero according to whether the object pointed to by + ``s1`` is greater than, equal to or less than the object + pointed to by ``s2``. + + + +**PORTABILITY:** + +*bcmp* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/bcopy.rst b/posix-users/newlib/libc/string/bcopy.rst new file mode 100644 index 0000000..77a4fd8 --- /dev/null +++ b/posix-users/newlib/libc/string/bcopy.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/bcopy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. bcopy: + +bcopy - Copy memory regions +-------------------------------- +.. index:: bcopy +.. index:: copy memory regions + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + void bcopy(const void *in, void *out, size_t n); + + + +**DESCRIPTION:** + + This function copies ``n`` bytes from the memory region + pointed to by ``in`` to the memory region pointed to by + ``out``. + + This function is implemented in term of *memmove*. + + + +**PORTABILITY:** + +*bcopy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/bzero.rst b/posix-users/newlib/libc/string/bzero.rst new file mode 100644 index 0000000..ac7b204 --- /dev/null +++ b/posix-users/newlib/libc/string/bzero.rst @@ -0,0 +1,38 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/bzero.c + +.. COMMENT: Generated on: 2018-08-20 + +.. bzero: + +bzero - Initialize memory to zero +------------------------------------- +.. index:: bzero +.. index:: initialize memory to zero + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + void bzero(void *b, size_t length); + + + +**DESCRIPTION:** + +*bzero* initializes ``length`` bytes of memory, starting at address +``b``, to zero. + + + +**STATUS CODES:** + +*bzero* does not return a result. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/index.rst b/posix-users/newlib/libc/string/index.rst new file mode 100644 index 0000000..90aaf30 --- /dev/null +++ b/posix-users/newlib/libc/string/index.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/index.c + +.. COMMENT: Generated on: 2018-08-20 + +.. index: + +index - Search for character in string +------------------------------------------- +.. index:: index +.. index:: search for character in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + char * index(const char *string, int c); + + + +**DESCRIPTION:** + + This function finds the first occurence of ``c`` (converted to + a char) in the string pointed to by ``string`` (including the + terminating null character). + + This function is identical to *strchr*. + + + +**STATUS CODES:** + + Returns a pointer to the located character, or a null pointer + if ``c`` does not occur in ``string``. + + + +**PORTABILITY:** + +*index* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memccpy.rst b/posix-users/newlib/libc/string/memccpy.rst new file mode 100644 index 0000000..442f40b --- /dev/null +++ b/posix-users/newlib/libc/string/memccpy.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memccpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memccpy: + +memccpy - Copy memory regions with end-token check +-------------------------------------------------------------- +.. index:: memccpy +.. index:: copy memory regions with end-token check + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void* memccpy(void *restrict out, const void *restrict in, + int endchar, size_t n); + + + +**DESCRIPTION:** + + This function copies up to ``n`` bytes from the memory region + pointed to by ``in`` to the memory region pointed to by + ``out``. If a byte matching the ``endchar`` is encountered, + the byte is copied and copying stops. + + If the regions overlap, the behavior is undefined. + + + +**STATUS CODES:** + + *memccpy* returns a pointer to the first byte following the + ``endchar`` in the ``out`` region. If no byte matching + ``endchar`` was copied, then *NULL* is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memchr.rst b/posix-users/newlib/libc/string/memchr.rst new file mode 100644 index 0000000..b53a21d --- /dev/null +++ b/posix-users/newlib/libc/string/memchr.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memchr: + +memchr - Find character in memory +-------------------------------------- +.. index:: memchr +.. index:: find character in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void *memchr(const void *src, int c, size_t length); + + + +**DESCRIPTION:** + + This function searches memory starting at **``src]*> for the + character ``c``. The search only ends with the first + occurrence of ``c``, or after ``length`` characters; in + particular, *NUL* does not terminate the search. + + + +**STATUS CODES:** + + If the character ``c`` is found within ``length`` characters + of **``src]*>, a pointer to the character is returned. If + ``c`` is not found, then *NULL* is returned. + + + +**PORTABILITY:** + +*memchr* is ANSI C. + +*memchr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memcmp.rst b/posix-users/newlib/libc/string/memcmp.rst new file mode 100644 index 0000000..d4fbd16 --- /dev/null +++ b/posix-users/newlib/libc/string/memcmp.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memcmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memcmp: + +memcmp - Compare two memory areas +-------------------------------------- +.. index:: memcmp +.. index:: compare two memory areas + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + int memcmp(const void *s1, const void *s2, size_t n); + + + +**DESCRIPTION:** + + This function compares not more than ``n`` characters of the + object pointed to by ``s1`` with the object pointed to by ``s2``. + + + + +**STATUS CODES:** + + The function returns an integer greater than, equal to or + less than zero according to whether the object pointed to by + ``s1`` is greater than, equal to or less than the object + pointed to by ``s2``. + + + +**PORTABILITY:** + +*memcmp* is ANSI C. + +*memcmp* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memcpy.rst b/posix-users/newlib/libc/string/memcpy.rst new file mode 100644 index 0000000..9b238f4 --- /dev/null +++ b/posix-users/newlib/libc/string/memcpy.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memcpy: + +memcpy - Copy memory regions +---------------------------------------- +.. index:: memcpy +.. index:: copy memory regions + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void* memcpy(void *restrict out, const void *restrict in, + size_t n); + + + +**DESCRIPTION:** + + This function copies ``n`` bytes from the memory region + pointed to by ``in`` to the memory region pointed to by + ``out``. + + If the regions overlap, the behavior is undefined. + + + +**STATUS CODES:** + + *memcpy* returns a pointer to the first byte of the ``out`` + region. + + + +**PORTABILITY:** + +*memcpy* is ANSI C. + +*memcpy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memmem.rst b/posix-users/newlib/libc/string/memmem.rst new file mode 100644 index 0000000..97d516b --- /dev/null +++ b/posix-users/newlib/libc/string/memmem.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memmem.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memmem: + +memmem - Find memory segment +--------------------------------- +.. index:: memmem +.. index:: find memory segment + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *memmem(const void *s1, size_t l1, const void *s2, + size_t l2); + + + +**DESCRIPTION:** + + + Locates the first occurrence in the memory region pointed to + by ``s1`` with length ``l1`` of the sequence of bytes pointed + to by ``s2`` of length ``l2``. If you already know the + lengths of your haystack and needle, *memmem* can be much + faster than *strstr*. + + + +**STATUS CODES:** + + Returns a pointer to the located segment, or a null pointer if + ``s2`` is not found. If ``l2`` is 0, ``s1`` is returned. + + + +**PORTABILITY:** + +*memmem* is a newlib extension. + +*memmem* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memmove.rst b/posix-users/newlib/libc/string/memmove.rst new file mode 100644 index 0000000..7b112cb --- /dev/null +++ b/posix-users/newlib/libc/string/memmove.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memmove.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memmove: + +memmove - Move possibly overlapping memory +----------------------------------------------- +.. index:: memmove +.. index:: move possibly overlapping memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void *memmove(void *dst, const void *src, size_t length); + + + +**DESCRIPTION:** + + This function moves ``length`` characters from the block of + memory starting at **``src]*> to the memory starting at + **``dst]*>. *memmove* reproduces the characters correctly + at **``dst]*> even if the two areas overlap. + + + + +**STATUS CODES:** + + The function returns ``dst`` as passed. + + + +**PORTABILITY:** + +*memmove* is ANSI C. + +*memmove* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/mempcpy.rst b/posix-users/newlib/libc/string/mempcpy.rst new file mode 100644 index 0000000..0d97365 --- /dev/null +++ b/posix-users/newlib/libc/string/mempcpy.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/mempcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mempcpy: + +mempcpy - Copy memory regions and return end pointer +---------------------------------------------------------------- +.. index:: mempcpy +.. index:: copy memory regions and return end pointer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void* mempcpy(void *out, const void *in, size_t n); + + + +**DESCRIPTION:** + + This function copies ``n`` bytes from the memory region + pointed to by ``in`` to the memory region pointed to by + ``out``. + + If the regions overlap, the behavior is undefined. + + + +**STATUS CODES:** + + *mempcpy* returns a pointer to the byte following the + last byte copied to the ``out`` region. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memrchr.rst b/posix-users/newlib/libc/string/memrchr.rst new file mode 100644 index 0000000..bc0ffb7 --- /dev/null +++ b/posix-users/newlib/libc/string/memrchr.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memrchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memrchr: + +memrchr - Reverse search for character in memory +----------------------------------------------------- +.. index:: memrchr +.. index:: reverse search for character in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void *memrchr(const void *src, int c, size_t length); + + + +**DESCRIPTION:** + + This function searches memory starting at ``length`` bytes + beyond **``src]*> backwards for the character ``c``. + The search only ends with the first occurrence of ``c``; in + particular, *NUL* does not terminate the search. + + + +**STATUS CODES:** + + If the character ``c`` is found within ``length`` characters + of **``src]*>, a pointer to the character is returned. If + ``c`` is not found, then *NULL* is returned. + + + +**PORTABILITY:** + +*memrchr* is a GNU extension. + +*memrchr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/memset.rst b/posix-users/newlib/libc/string/memset.rst new file mode 100644 index 0000000..9d4cc7e --- /dev/null +++ b/posix-users/newlib/libc/string/memset.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/memset.c + +.. COMMENT: Generated on: 2018-08-20 + +.. memset: + +memset - Set an area of memory +----------------------------------- +.. index:: memset +.. index:: set an area of memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void *memset(void *dst, int c, size_t length); + + + +**DESCRIPTION:** + + This function converts the argument ``c`` into an unsigned + char and fills the first ``length`` characters of the array + pointed to by ``dst`` to the value. + + + +**STATUS CODES:** + + *memset* returns the value of ``dst``. + + + +**PORTABILITY:** + +*memset* is ANSI C. + + *memset* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/rawmemchr.rst b/posix-users/newlib/libc/string/rawmemchr.rst new file mode 100644 index 0000000..0816f1b --- /dev/null +++ b/posix-users/newlib/libc/string/rawmemchr.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/rawmemchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rawmemchr: + +rawmemchr - Find character in memory +----------------------------------------- +.. index:: rawmemchr +.. index:: find character in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + void *rawmemchr(const void *src, int c); + + + +**DESCRIPTION:** + + This function searches memory starting at **``src]*> for the + character ``c``. The search only ends with the first occurrence + of ``c``; in particular, *NUL* does not terminate the search. + No bounds checking is performed, so this function should only + be used when it is certain that the character ``c`` will be found. + + + +**STATUS CODES:** + + A pointer to the first occurance of character ``c``. + + + +**PORTABILITY:** + +*rawmemchr* is a GNU extension. + +*rawmemchr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/rindex.rst b/posix-users/newlib/libc/string/rindex.rst new file mode 100644 index 0000000..cc6184f --- /dev/null +++ b/posix-users/newlib/libc/string/rindex.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/rindex.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rindex: + +rindex - Reverse search for character in string +---------------------------------------------------- +.. index:: rindex +.. index:: reverse search for character in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char * rindex(const char *string, int c); + + + +**DESCRIPTION:** + + This function finds the last occurence of ``c`` (converted to + a char) in the string pointed to by ``string`` (including the + terminating null character). + + This function is identical to *strrchr*. + + + +**STATUS CODES:** + + Returns a pointer to the located character, or a null pointer + if ``c`` does not occur in ``string``. + + + +**PORTABILITY:** + +*rindex* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/stpcpy.rst b/posix-users/newlib/libc/string/stpcpy.rst new file mode 100644 index 0000000..843f213 --- /dev/null +++ b/posix-users/newlib/libc/string/stpcpy.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/stpcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. stpcpy: + +stpcpy - Copy string returning a pointer to its end +-------------------------------------------------------- +.. index:: stpcpy +.. index:: copy string returning a pointer to its end + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *stpcpy(char *restrict dst, const char *restrict src); + + + +**DESCRIPTION:** + + *stpcpy* copies the string pointed to by ``src`` + (including the terminating null character) to the array + pointed to by ``dst``. + + + +**STATUS CODES:** + + This function returns a pointer to the end of the destination string, + thus pointing to the trailing `\0`. + + + +**PORTABILITY:** + +*stpcpy* is a GNU extension, candidate for inclusion into POSIX/SUSv4. + +*stpcpy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/stpncpy.rst b/posix-users/newlib/libc/string/stpncpy.rst new file mode 100644 index 0000000..0bb0826 --- /dev/null +++ b/posix-users/newlib/libc/string/stpncpy.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/stpncpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. stpncpy: + +stpncpy - Counted copy string returning a pointer to its end +----------------------------------------------------------------- +.. index:: stpncpy +.. index:: counted copy string returning a pointer to its end + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *stpncpy(char *restrict dst, const char *restrict src, + size_t length); + + + +**DESCRIPTION:** + + *stpncpy* copies not more than ``length`` characters from the + the string pointed to by ``src`` (including the terminating + null character) to the array pointed to by ``dst``. If the + string pointed to by ``src`` is shorter than ``length`` + characters, null characters are appended to the destination + array until a total of ``length`` characters have been + written. + + + +**STATUS CODES:** + + This function returns a pointer to the end of the destination string, + thus pointing to the trailing `\0`, or, if the destination string is + not null-terminated, pointing to dst + n. + + + +**PORTABILITY:** + +*stpncpy* is a GNU extension, candidate for inclusion into POSIX/SUSv4. + +*stpncpy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcasecmp.rst b/posix-users/newlib/libc/string/strcasecmp.rst new file mode 100644 index 0000000..40e6a86 --- /dev/null +++ b/posix-users/newlib/libc/string/strcasecmp.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcasecmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcasecmp: + +strcasecmp - Case-insensitive character string compare +------------------------------------------------------------ +.. index:: strcasecmp +.. index:: case-insensitive character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int strcasecmp(const char *a, const char *b); + + + +**DESCRIPTION:** + + *strcasecmp* compares the string at ``a`` to + the string at ``b`` in a case-insensitive manner. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to lowercase), *strcasecmp* returns a + number greater than zero. If the two strings match, + *strcasecmp* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *strcasecmp* returns a + number less than zero. + + + +**PORTABILITY:** + +*strcasecmp* is in the Berkeley Software Distribution. + +*strcasecmp* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcasecmp_l.rst b/posix-users/newlib/libc/string/strcasecmp_l.rst new file mode 100644 index 0000000..c67ff6c --- /dev/null +++ b/posix-users/newlib/libc/string/strcasecmp_l.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcasecmp_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcasecmp_l: + +strcasecmp_l - Case-insensitive character string compare +-------------------------------------------------------------- +.. index:: strcasecmp_l +.. index:: case-insensitive character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int strcasecmp_l(const char *a, const char *b, + locale_t locale); + + + +**DESCRIPTION:** + + *strcasecmp_l* compares the string at ``a`` to + the string at ``b`` in a case-insensitive manner. + + if ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to lowercase), *strcasecmp_l* returns a + number greater than zero. If the two strings match, + *strcasecmp_l* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *strcasecmp_l* returns a + number less than zero. + + + +**PORTABILITY:** + +*strcasecmp_l* is POSIX-1.2008. + +*strcasecmp_l* requires no supporting OS subroutines. It uses +tolower_l() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcasestr.rst b/posix-users/newlib/libc/string/strcasestr.rst new file mode 100644 index 0000000..725c9d8 --- /dev/null +++ b/posix-users/newlib/libc/string/strcasestr.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcasestr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcasestr: + +strcasestr - Case-insensitive character string search +---------------------------------------------------------- +.. index:: strcasestr +.. index:: case-insensitive character string search + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strcasestr(const char *s, const char *find); + + + +**DESCRIPTION:** + + *strcasestr* searchs the string ``s`` for + the first occurrence of the sequence ``find``. *strcasestr* + is identical to *strstr* except the search is + case-insensitive. + + + +**STATUS CODES:** + + + A pointer to the first case-insensitive occurrence of the sequence + ``find`` or *NULL* if no match was found. + + + +**PORTABILITY:** + +*strcasestr* is in the Berkeley Software Distribution. + +*strcasestr* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcat.rst b/posix-users/newlib/libc/string/strcat.rst new file mode 100644 index 0000000..b466b27 --- /dev/null +++ b/posix-users/newlib/libc/string/strcat.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcat.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcat: + +strcat - Concatenate strings +--------------------------------- +.. index:: strcat +.. index:: concatenate strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strcat(char *restrict dst, const char *restrict src); + + + +**DESCRIPTION:** + + *strcat* appends a copy of the string pointed to by ``src`` + (including the terminating null character) to the end of the + string pointed to by ``dst``. The initial character of + ``src`` overwrites the null character at the end of ``dst``. + + + +**STATUS CODES:** + + This function returns the initial value of ``dst`` + + + +**PORTABILITY:** + +*strcat* is ANSI C. + +*strcat* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strchr.rst b/posix-users/newlib/libc/string/strchr.rst new file mode 100644 index 0000000..cc388a6 --- /dev/null +++ b/posix-users/newlib/libc/string/strchr.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strchr: + +strchr - Search for character in string +-------------------------------------------- +.. index:: strchr +.. index:: search for character in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char * strchr(const char *string, int c); + + + +**DESCRIPTION:** + + This function finds the first occurence of ``c`` (converted to + a char) in the string pointed to by ``string`` (including the + terminating null character). + + + +**STATUS CODES:** + + Returns a pointer to the located character, or a null pointer + if ``c`` does not occur in ``string``. + + + +**PORTABILITY:** + +*strchr* is ANSI C. + +*strchr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strchrnul.rst b/posix-users/newlib/libc/string/strchrnul.rst new file mode 100644 index 0000000..a373b57 --- /dev/null +++ b/posix-users/newlib/libc/string/strchrnul.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strchrnul.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strchrnul: + +strchrnul - Search for character in string +----------------------------------------------- +.. index:: strchrnul +.. index:: search for character in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char * strchrnul(const char *string, int c); + + + +**DESCRIPTION:** + + This function finds the first occurence of ``c`` (converted to + a char) in the string pointed to by ``string`` (including the + terminating null character). + + + +**STATUS CODES:** + + Returns a pointer to the located character, or a pointer + to the concluding null byte if ``c`` does not occur in ``string``. + + + +**PORTABILITY:** + +*strchrnul* is a GNU extension. + +*strchrnul* requires no supporting OS subroutines. It uses +strchr() and strlen() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcmp.rst b/posix-users/newlib/libc/string/strcmp.rst new file mode 100644 index 0000000..72225c3 --- /dev/null +++ b/posix-users/newlib/libc/string/strcmp.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcmp: + +strcmp - Character string compare +--------------------------------------- +.. index:: strcmp +.. index:: character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + int strcmp(const char *a, const char *b); + + + +**DESCRIPTION:** + + *strcmp* compares the string at ``a`` to + the string at ``b``. + + + +**STATUS CODES:** + + If **``a]*> sorts lexicographically after **``b]*>, + *strcmp* returns a number greater than zero. If the two + strings match, *strcmp* returns zero. If **``a]*> + sorts lexicographically before **``b]*>, *strcmp* returns a + number less than zero. + + + +**PORTABILITY:** + +*strcmp* is ANSI C. + +*strcmp* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcoll.rst b/posix-users/newlib/libc/string/strcoll.rst new file mode 100644 index 0000000..8a42214 --- /dev/null +++ b/posix-users/newlib/libc/string/strcoll.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcoll.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcoll: + +strcoll - Locale-specific character string compare +-------------------------------------------------------- +.. index:: strcoll +.. index:: locale-specific character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + int strcoll(const char *stra, const char * strb); + + + +**DESCRIPTION:** + + *strcoll* compares the string pointed to by ``stra`` to + the string pointed to by ``strb``, using an interpretation + appropriate to the current *LC_COLLATE* state. + + (NOT Cygwin:) The current implementation of *strcoll* simply + uses *strcmp* and does not support any language-specific sorting. + + + +**STATUS CODES:** + + If the first string is greater than the second string, + *strcoll* returns a number greater than zero. If the two + strings are equivalent, *strcoll* returns zero. If the first + string is less than the second string, *strcoll* returns a + number less than zero. + + + +**PORTABILITY:** + +*strcoll* is ANSI C. + +*strcoll* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcoll_l.rst b/posix-users/newlib/libc/string/strcoll_l.rst new file mode 100644 index 0000000..2d2e2c8 --- /dev/null +++ b/posix-users/newlib/libc/string/strcoll_l.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcoll_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcoll_l: + +strcoll_l - Locale-specific character string compare +---------------------------------------------------------- +.. index:: strcoll_l +.. index:: locale-specific character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + int strcoll_l(const char *stra, const char * strb, + locale_t locale); + + + +**DESCRIPTION:** + + *strcoll_l* compares the string pointed to by ``stra`` to + the string pointed to by ``strb``, using an interpretation + appropriate to the current *LC_COLLATE* state. + + (NOT Cygwin:) The current implementation of *strcoll_l* simply + uses *strcmp* and does not support any language-specific sorting. + + If ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + If the first string is greater than the second string, + *strcoll_l* returns a number greater than zero. If the two + strings are equivalent, *strcoll_l* returns zero. If the first + string is less than the second string, *strcoll_l* returns a + number less than zero. + + + +**PORTABILITY:** + +*strcoll_l* is POSIX-1.2008. + +*strcoll_l* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcpy.rst b/posix-users/newlib/libc/string/strcpy.rst new file mode 100644 index 0000000..ce0690b --- /dev/null +++ b/posix-users/newlib/libc/string/strcpy.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcpy: + +strcpy - Copy string +------------------------- +.. index:: strcpy +.. index:: copy string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strcpy(char *dst, const char *src); + + + +**DESCRIPTION:** + + *strcpy* copies the string pointed to by ``src`` + (including the terminating null character) to the array + pointed to by ``dst``. + + + +**STATUS CODES:** + + This function returns the initial value of ``dst``. + + + +**PORTABILITY:** + +*strcpy* is ANSI C. + +*strcpy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strcspn.rst b/posix-users/newlib/libc/string/strcspn.rst new file mode 100644 index 0000000..5998fad --- /dev/null +++ b/posix-users/newlib/libc/string/strcspn.rst @@ -0,0 +1,39 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strcspn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strcspn: + +strcspn - Count characters not in string +--------------------------------------------- +.. index:: strcspn +.. index:: count characters not in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + size_t strcspn(const char *s1, const char *s2); + + + +**DESCRIPTION:** + + This function computes the length of the initial part of + the string pointed to by ``s1`` which consists entirely of + characters ``NOT`` from the string pointed to by ``s2`` + (excluding the terminating null character). + + + +**STATUS CODES:** + + *strcspn* returns the length of the substring found. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strerror.rst b/posix-users/newlib/libc/string/strerror.rst new file mode 100644 index 0000000..681ba82 --- /dev/null +++ b/posix-users/newlib/libc/string/strerror.rst @@ -0,0 +1,393 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strerror.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strerror, strerror_l: + +strerror, strerror_l - Convert error number to string +------------------------------------------------------------ +.. index:: strerror +.. index:: strerror_l +.. index:: convert error number to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strerror(int errnum); + char *strerror_l(int errnum, locale_t locale); + char *_strerror_r(struct _reent ptr, int errnum, + int internal, int *error); + + + +**DESCRIPTION:** + +*strerror* converts the error number ``errnum`` into a +string. The value of ``errnum`` is usually a copy of *errno*. +If *errnum* is not a known error number, the result points to an +empty string. + +*strerror_l* is like *strerror* but creates a string in a format +as expected in locale ``locale``. If ``locale`` is LC_GLOBAL_LOCALE or +not a valid locale object, the behaviour is undefined. + +This implementation of *strerror* prints out the following strings +for each of the values defined in `*errno.h*`: + +o+ +o 0 +Success + +o E2BIG +Arg list too long + +o EACCES +Permission denied + +o EADDRINUSE +Address already in use + +o EADDRNOTAVAIL +Address not available + +o EADV +Advertise error + +o EAFNOSUPPORT +Address family not supported by protocol family + +o EAGAIN +No more processes + +o EALREADY +Socket already connected + +o EBADF +Bad file number + +o EBADMSG +Bad message + +o EBUSY +Device or resource busy + +o ECANCELED +Operation canceled + +o ECHILD +No children + +o ECOMM +Communication error + +o ECONNABORTED +Software caused connection abort + +o ECONNREFUSED +Connection refused + +o ECONNRESET +Connection reset by peer + +o EDEADLK +Deadlock + +o EDESTADDRREQ +Destination address required + +o EEXIST +File exists + +o EDOM +Mathematics argument out of domain of function + +o EFAULT +Bad address + +o EFBIG +File too large + +o EHOSTDOWN +Host is down + +o EHOSTUNREACH +Host is unreachable + +o EIDRM +Identifier removed + +o EILSEQ +Illegal byte sequence + +o EINPROGRESS +Connection already in progress + +o EINTR +Interrupted system call + +o EINVAL +Invalid argument + +o EIO +I/O error + +o EISCONN +Socket is already connected + +o EISDIR +Is a directory + +o ELIBACC +Cannot access a needed shared library + +o ELIBBAD +Accessing a corrupted shared library + +o ELIBEXEC +Cannot exec a shared library directly + +o ELIBMAX +Attempting to link in more shared libraries than system limit + +o ELIBSCN +*.lib* section in a.out corrupted + +o EMFILE +File descriptor value too large + +o EMLINK +Too many links + +o EMSGSIZE +Message too long + +o EMULTIHOP +Multihop attempted + +o ENAMETOOLONG +File or path name too long + +o ENETDOWN +Network interface is not configured + +o ENETRESET +Connection aborted by network + +o ENETUNREACH +Network is unreachable + +o ENFILE +Too many open files in system + +o ENOBUFS +No buffer space available + +o ENODATA +No data + +o ENODEV +No such device + +o ENOENT +No such file or directory + +o ENOEXEC +Exec format error + +o ENOLCK +No lock + +o ENOLINK +Virtual circuit is gone + +o ENOMEM +Not enough space + +o ENOMSG +No message of desired type + +o ENONET +Machine is not on the network + +o ENOPKG +No package + +o ENOPROTOOPT +Protocol not available + +o ENOSPC +No space left on device + +o ENOSR +No stream resources + +o ENOSTR +Not a stream + +o ENOSYS +Function not implemented + +o ENOTBLK +Block device required + +o ENOTCONN +Socket is not connected + +o ENOTDIR +Not a directory + +o ENOTEMPTY +Directory not empty + +o ENOTRECOVERABLE +State not recoverable + +o ENOTSOCK +Socket operation on non-socket + +o ENOTSUP +Not supported + +o ENOTTY +Not a character device + +o ENXIO +No such device or address + +o EOPNOTSUPP +Operation not supported on socket + +o EOVERFLOW +Value too large for defined data type + +o EOWNERDEAD +Previous owner died + +o EPERM +Not owner + +o EPIPE +Broken pipe + +o EPROTO +Protocol error + +o EPROTOTYPE +Protocol wrong type for socket + +o EPROTONOSUPPORT +Unknown protocol + +o ERANGE +Result too large + +o EREMOTE +Resource is remote + +o EROFS +Read-only file system + +o ESHUTDOWN +Can`t send after socket shutdown + +o ESOCKTNOSUPPORT +Socket type not supported + +o ESPIPE +Illegal seek + +o ESRCH +No such process + +o ESRMNT +Srmount error + +o ESTRPIPE +Strings pipe error + +o ETIME +Stream ioctl timeout + +o ETIMEDOUT +Connection timed out + +o ETXTBSY +Text file busy + +o EWOULDBLOCK +Operation would block (usually same as EAGAIN) + +o EXDEV +Cross-device link + +o- + +*_strerror_r* is a reentrant version of the above. + + + +**STATUS CODES:** + +This function returns a pointer to a string. Your application must +not modify that string. + + + +**PORTABILITY:** + +ANSI C requires *strerror*, but does not specify the strings used +for each error number. + +*strerror_l* is POSIX-1.2008. + +Although this implementation of *strerror* is reentrant (depending +on *_user_strerror*), ANSI C declares that subsequent calls to +*strerror* may overwrite the result string; therefore portable +code cannot depend on the reentrancy of this subroutine. + +Although this implementation of *strerror* guarantees a non-null +result with a NUL-terminator, some implementations return *NULL* +on failure. Although POSIX allows *strerror* to set *errno* +to EINVAL on failure, this implementation does not do so (unless +you provide *_user_strerror*). + +POSIX recommends that unknown ``errnum`` result in a message +including that value, however it is not a requirement and this +implementation does not provide that information (unless you +provide *_user_strerror*). + +This implementation of *strerror* provides for user-defined +extensibility. *errno.h* defines ``__ELASTERROR``, which can be +used as a base for user-defined error values. If the user supplies a +routine named *_user_strerror*, and ``errnum`` passed to +*strerror* does not match any of the supported values, +*_user_strerror* is called with three arguments. The first is of +type ``int``, and is the ``errnum`` value unknown to *strerror*. +The second is of type ``int``, and matches the ``internal`` argument +of *_strerror_r*; this should be zero if called from *strerror* +and non-zero if called from any other function; *_user_strerror* can +use this information to satisfy the POSIX rule that no other +standardized function can overwrite a static buffer reused by +*strerror*. The third is of type ``int *``, and matches the +``error`` argument of *_strerror_r*; if a non-zero value is stored +into that location (usually ``EINVAL``), then *strerror* will set +*errno* to that value, and the XPG variant of *strerror_r* will +return that value instead of zero or ``ERANGE``. *_user_strerror* +returns a ``char *`` value; returning ``NULL`` implies that the user +function did not choose to handle ``errnum``. The default +*_user_strerror* returns ``NULL`` for all input values. Note that +*_user_sterror* must be thread-safe, and only denote errors via the +third argument rather than modifying *errno*, if *strerror* and +*strerror_r* are are to comply with POSIX. + +*strerror* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strerror_r.rst b/posix-users/newlib/libc/string/strerror_r.rst new file mode 100644 index 0000000..d3c0ba7 --- /dev/null +++ b/posix-users/newlib/libc/string/strerror_r.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strerror_r.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strerror_r: + +strerror_r - Convert error number to string and copy to buffer +------------------------------------------------------------------- +.. index:: strerror_r +.. index:: convert error number to string and copy to buffer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + #ifdef _GNU_SOURCE + char *strerror_r(int errnum, char *buffer, size_t n); + #else + int strerror_r(int errnum, char *buffer, size_t n); + #endif + + + +**DESCRIPTION:** + +*strerror_r* converts the error number ``errnum`` into a +string and copies the result into the supplied ``buffer`` for +a length up to ``n``, including the NUL terminator. The value of +``errnum`` is usually a copy of *errno*. If *errnum* is not a known +error number, the result is the empty string. + +See *strerror* for how strings are mapped to *errnum*. + + + +**STATUS CODES:** + +There are two variants: the GNU version always returns a NUL-terminated +string, which is ``buffer`` if all went well, but which is another +pointer if ``n`` was too small (leaving ``buffer`` untouched). If the +return is not ``buffer``, your application must not modify that string. +The POSIX version returns 0 on success, ``EINVAL`` if *errnum* was not +recognized, and ``ERANGE`` if ``n`` was too small. The variant chosen +depends on macros that you define before inclusion of *string.h*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strlen.rst b/posix-users/newlib/libc/string/strlen.rst new file mode 100644 index 0000000..071e337 --- /dev/null +++ b/posix-users/newlib/libc/string/strlen.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strlen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strlen: + +strlen - Character string length +------------------------------------- +.. index:: strlen +.. index:: character string length + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + size_t strlen(const char *str); + + + +**DESCRIPTION:** + + The *strlen* function works out the length of the string + starting at **``str]*> by counting chararacters until it + reaches a *NULL* character. + + + +**STATUS CODES:** + + *strlen* returns the character count. + + + +**PORTABILITY:** + +*strlen* is ANSI C. + +*strlen* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strlwr.rst b/posix-users/newlib/libc/string/strlwr.rst new file mode 100644 index 0000000..b98716d --- /dev/null +++ b/posix-users/newlib/libc/string/strlwr.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strlwr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strlwr: + +strlwr - Force string to lowercase +---------------------------------------- +.. index:: strlwr +.. index:: force string to lowercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strlwr(char *a); + + + +**DESCRIPTION:** + + *strlwr* converts each character in the string at ``a`` to + lowercase. + + + +**STATUS CODES:** + + *strlwr* returns its argument, ``a``. + + + +**PORTABILITY:** + +*strlwr* is not widely portable. + +*strlwr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strncasecmp.rst b/posix-users/newlib/libc/string/strncasecmp.rst new file mode 100644 index 0000000..1874e42 --- /dev/null +++ b/posix-users/newlib/libc/string/strncasecmp.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strncasecmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strncasecmp: + +strncasecmp - Case-insensitive character string compare +------------------------------------------------------------- +.. index:: strncasecmp +.. index:: case-insensitive character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int strncasecmp(const char *a, const char * b, size_t length); + + + +**DESCRIPTION:** + + *strncasecmp* compares up to ``length`` characters + from the string at ``a`` to the string at ``b`` in a + case-insensitive manner. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to lowercase), *strncasecmp* returns a + number greater than zero. If the two strings are equivalent, + *strncasecmp* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *strncasecmp* returns a + number less than zero. + + + +**PORTABILITY:** + +*strncasecmp* is in the Berkeley Software Distribution. + +*strncasecmp* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strncasecmp_l.rst b/posix-users/newlib/libc/string/strncasecmp_l.rst new file mode 100644 index 0000000..b58c73b --- /dev/null +++ b/posix-users/newlib/libc/string/strncasecmp_l.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strncasecmp_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strncasecmp_l: + +strncasecmp_l - Case-insensitive character string compare +--------------------------------------------------------------- +.. index:: strncasecmp_l +.. index:: case-insensitive character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <strings.h> + int strncasecmp_l(const char *a, const char * b, + size_t length, locale_t locale); + + + +**DESCRIPTION:** + + *strncasecmp_l* compares up to ``length`` characters + from the string at ``a`` to the string at ``b`` in a + case-insensitive manner. + + if ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to lowercase), *strncasecmp_l* returns a + number greater than zero. If the two strings are equivalent, + *strncasecmp_l* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *strncasecmp_l* returns a + number less than zero. + + + +**PORTABILITY:** + +*strncasecmp_l* is POSIX-1.2008. + +*strncasecmp_l* requires no supporting OS subroutines. It uses +tolower_l() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strncat.rst b/posix-users/newlib/libc/string/strncat.rst new file mode 100644 index 0000000..f305a09 --- /dev/null +++ b/posix-users/newlib/libc/string/strncat.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strncat.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strncat: + +strncat - Concatenate strings +---------------------------------- +.. index:: strncat +.. index:: concatenate strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strncat(char *restrict dst, const char *restrict src, + size_t length); + + + +**DESCRIPTION:** + + *strncat* appends not more than ``length`` characters from + the string pointed to by ``src`` (including the terminating + null character) to the end of the string pointed to by + ``dst``. The initial character of ``src`` overwrites the null + character at the end of ``dst``. A terminating null character + is always appended to the result + + + +**WARNINGS:** + + Note that a null is always appended, so that if the copy is + limited by the ``length`` argument, the number of characters + appended to ``dst`` is *n + 1*. + + + +**STATUS CODES:** + + This function returns the initial value of ``dst`` + + + +**PORTABILITY:** + +*strncat* is ANSI C. + +*strncat* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strncmp.rst b/posix-users/newlib/libc/string/strncmp.rst new file mode 100644 index 0000000..33f7ef2 --- /dev/null +++ b/posix-users/newlib/libc/string/strncmp.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strncmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strncmp: + +strncmp - Character string compare +---------------------------------------- +.. index:: strncmp +.. index:: character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + int strncmp(const char *a, const char * b, size_t length); + + + +**DESCRIPTION:** + + *strncmp* compares up to ``length`` characters + from the string at ``a`` to the string at ``b``. + + + +**STATUS CODES:** + + If **``a]*> sorts lexicographically after **``b]*>, + *strncmp* returns a number greater than zero. If the two + strings are equivalent, *strncmp* returns zero. If **``a]*> + sorts lexicographically before **``b]*>, *strncmp* returns a + number less than zero. + + + +**PORTABILITY:** + +*strncmp* is ANSI C. + +*strncmp* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strncpy.rst b/posix-users/newlib/libc/string/strncpy.rst new file mode 100644 index 0000000..3266324 --- /dev/null +++ b/posix-users/newlib/libc/string/strncpy.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strncpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strncpy: + +strncpy - Counted copy string +---------------------------------- +.. index:: strncpy +.. index:: counted copy string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strncpy(char *restrict dst, const char *restrict src, + size_t length); + + + +**DESCRIPTION:** + + *strncpy* copies not more than ``length`` characters from the + the string pointed to by ``src`` (including the terminating + null character) to the array pointed to by ``dst``. If the + string pointed to by ``src`` is shorter than ``length`` + characters, null characters are appended to the destination + array until a total of ``length`` characters have been + written. + + + +**STATUS CODES:** + + This function returns the initial value of ``dst``. + + + +**PORTABILITY:** + +*strncpy* is ANSI C. + +*strncpy* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strnstr.rst b/posix-users/newlib/libc/string/strnstr.rst new file mode 100644 index 0000000..94af993 --- /dev/null +++ b/posix-users/newlib/libc/string/strnstr.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strnstr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strnstr: + +strnstr - Find string segment +---------------------------------- +.. index:: strnstr +.. index:: find string segment + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + size_t strnstr(const char *s1, const char *s2, size_t n); + + + +**DESCRIPTION:** + + Locates the first occurrence in the string pointed to by ``s1`` of + the sequence of limited to the ``n`` characters in the string + pointed to by ``s2`` + + + +**STATUS CODES:** + + Returns a pointer to the located string segment, or a null + pointer if the string ``s2`` is not found. If ``s2`` points to + a string with zero length, ``s1`` is returned. + + + + +**PORTABILITY:** + +*strnstr* is a BSD extension. + +*strnstr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strpbrk.rst b/posix-users/newlib/libc/string/strpbrk.rst new file mode 100644 index 0000000..f5e8ba3 --- /dev/null +++ b/posix-users/newlib/libc/string/strpbrk.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strpbrk.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strpbrk: + +strpbrk - Find characters in string +---------------------------------------- +.. index:: strpbrk +.. index:: find characters in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strpbrk(const char *s1, const char *s2); + + + +**DESCRIPTION:** + + This function locates the first occurence in the string + pointed to by ``s1`` of any character in string pointed to by + ``s2`` (excluding the terminating null character). + + + +**STATUS CODES:** + + *strpbrk* returns a pointer to the character found in ``s1``, or a + null pointer if no character from ``s2`` occurs in ``s1``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strrchr.rst b/posix-users/newlib/libc/string/strrchr.rst new file mode 100644 index 0000000..9314f8e --- /dev/null +++ b/posix-users/newlib/libc/string/strrchr.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strrchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strrchr: + +strrchr - Reverse search for character in string +----------------------------------------------------- +.. index:: strrchr +.. index:: reverse search for character in string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char * strrchr(const char *string, int c); + + + +**DESCRIPTION:** + + This function finds the last occurence of ``c`` (converted to + a char) in the string pointed to by ``string`` (including the + terminating null character). + + + +**STATUS CODES:** + + Returns a pointer to the located character, or a null pointer + if ``c`` does not occur in ``string``. + + + +**PORTABILITY:** + +*strrchr* is ANSI C. + +*strrchr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strsignal.rst b/posix-users/newlib/libc/string/strsignal.rst new file mode 100644 index 0000000..e45fbef --- /dev/null +++ b/posix-users/newlib/libc/string/strsignal.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strsignal.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strsignal: + +strsignal - Convert signal number to string +------------------------------------------------ +.. index:: strsignal +.. index:: convert signal number to string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strsignal(int signal); + + + +**DESCRIPTION:** + +*strsignal* converts the signal number ``signal`` into a +string. If ``signal`` is not a known signal number, the result +will be of the form "Unknown signal NN" where NN is the ``signal`` +is a decimal number. + + + +**STATUS CODES:** + +This function returns a pointer to a string. Your application must +not modify that string. + + + +**PORTABILITY:** + +POSIX.1-2008 C requires *strsignal*, but does not specify the strings used +for each signal number. + +*strsignal* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strspn.rst b/posix-users/newlib/libc/string/strspn.rst new file mode 100644 index 0000000..1d3bc99 --- /dev/null +++ b/posix-users/newlib/libc/string/strspn.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strspn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strspn: + +strspn - Find initial match +-------------------------------- +.. index:: strspn +.. index:: find initial match + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + size_t strspn(const char *s1, const char *s2); + + + +**DESCRIPTION:** + + This function computes the length of the initial segment of + the string pointed to by ``s1`` which consists entirely of + characters from the string pointed to by ``s2`` (excluding the + terminating null character). + + + +**STATUS CODES:** + + *strspn* returns the length of the segment found. + + + +**PORTABILITY:** + +*strspn* is ANSI C. + +*strspn* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strstr.rst b/posix-users/newlib/libc/string/strstr.rst new file mode 100644 index 0000000..cef105e --- /dev/null +++ b/posix-users/newlib/libc/string/strstr.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strstr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strstr: + +strstr - Find string segment +--------------------------------- +.. index:: strstr +.. index:: find string segment + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strstr(const char *s1, const char *s2); + + + +**DESCRIPTION:** + + Locates the first occurrence in the string pointed to by ``s1`` of + the sequence of characters in the string pointed to by ``s2`` + (excluding the terminating null character). + + + +**STATUS CODES:** + + Returns a pointer to the located string segment, or a null + pointer if the string ``s2`` is not found. If ``s2`` points to + a string with zero length, ``s1`` is returned. + + + +**PORTABILITY:** + +*strstr* is ANSI C. + +*strstr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strtok.rst b/posix-users/newlib/libc/string/strtok.rst new file mode 100644 index 0000000..504d9e0 --- /dev/null +++ b/posix-users/newlib/libc/string/strtok.rst @@ -0,0 +1,87 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strtok.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strtok, strtok_r, strsep: + +strtok, strtok_r, strsep - Get next token from a string +---------------------------------------------------------------- +.. index:: strtok +.. index:: strtok_r +.. index:: strsep +.. index:: get next token from a string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strtok(char *restrict source, + const char *restrict delimiters); + char *strtok_r(char *restrict source, + const char *restrict delimiters, + char **lasts); + char *strsep(char **source_ptr, const char *delimiters); + + + +**DESCRIPTION:** + + The *strtok* function is used to isolate sequential tokens in a + null-terminated string, **``source]*>. These tokens are delimited + in the string by at least one of the characters in **``delimiters]*>. + The first time that *strtok* is called, **``source]*> should be + specified; subsequent calls, wishing to obtain further tokens from + the same string, should pass a null pointer instead. The separator + string, **``delimiters]*>, must be supplied each time and may + change between calls. + + The *strtok* function returns a pointer to the beginning of each + subsequent token in the string, after replacing the separator + character itself with a null character. When no more tokens remain, + a null pointer is returned. + + The *strtok_r* function has the same behavior as *strtok*, except + a pointer to placeholder **``lasts]*> must be supplied by the caller. + + The *strsep* function is similar in behavior to *strtok*, except + a pointer to the string pointer must be supplied *``source_ptr]*> and + the function does not skip leading delimiters. When the string starts + with a delimiter, the delimiter is changed to the null character and + the empty string is returned. Like *strtok_r* and *strtok*, the + **``source_ptr]*> is updated to the next character following the + last delimiter found or NULL if the end of string is reached with + no more delimiters. + + + +**STATUS CODES:** + + *strtok*, *strtok_r*, and *strsep* all return a pointer to the + next token, or *NULL* if no more tokens can be found. For + *strsep*, a token may be the empty string. + + + +**NOTES:** + + *strtok* is unsafe for multi-threaded applications. *strtok_r* + and *strsep* are thread-safe and should be used instead. + + + +**PORTABILITY:** + +*strtok* is ANSI C. +*strtok_r* is POSIX. +*strsep* is a BSD extension. + +*strtok*, *strtok_r*, and *strsep* require no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strupr.rst b/posix-users/newlib/libc/string/strupr.rst new file mode 100644 index 0000000..3c8c18f --- /dev/null +++ b/posix-users/newlib/libc/string/strupr.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strupr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strupr: + +strupr - Force string to uppercase +---------------------------------------- +.. index:: strupr +.. index:: force string to uppercase + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + char *strupr(char *a); + + + +**DESCRIPTION:** + + *strupr* converts each character in the string at ``a`` to + uppercase. + + + +**STATUS CODES:** + + *strupr* returns its argument, ``a``. + + + +**PORTABILITY:** + +*strupr* is not widely portable. + +*strupr* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strverscmp.rst b/posix-users/newlib/libc/string/strverscmp.rst new file mode 100644 index 0000000..e333cdc --- /dev/null +++ b/posix-users/newlib/libc/string/strverscmp.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strverscmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strverscmp: + +strverscmp - Version string compare +---------------------------------------- +.. index:: strverscmp +.. index:: version string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #define _GNU_SOURCE + #include <string.h> + int strverscmp(const char *a, const char *b); + + + +**DESCRIPTION:** + + *strverscmp* compares the string at ``a`` to + the string at ``b`` in a version-logical order. + + + +**STATUS CODES:** + + + If **``a]*> version-sorts after **``b]*>, *strverscmp* returns + a number greater than zero. If the two strings match, *strverscmp* + returns zero. If **``a]*> version-sorts before **``b]*>, + *strverscmp* returns a number less than zero. + + + +**PORTABILITY:** + +*strverscmp* is a GNU extension. + +*strverscmp* requires no supporting OS subroutines. It uses +isdigit() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strxfrm.rst b/posix-users/newlib/libc/string/strxfrm.rst new file mode 100644 index 0000000..c862906 --- /dev/null +++ b/posix-users/newlib/libc/string/strxfrm.rst @@ -0,0 +1,64 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strxfrm.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strxfrm: + +strxfrm - Transform string +------------------------------- +.. index:: strxfrm +.. index:: transform string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + size_t strxfrm(char *restrict s1, const char *restrict s2, + size_t n); + + + +**DESCRIPTION:** + + This function transforms the string pointed to by ``s2`` and + places the resulting string into the array pointed to by + ``s1``. The transformation is such that if the *strcmp* + function is applied to the two transformed strings, it returns + a value greater than, equal to, or less than zero, + correspoinding to the result of a *strcoll* function applied + to the same two original strings. + + No more than ``n`` characters are placed into the resulting + array pointed to by ``s1``, including the terminating null + character. If ``n`` is zero, ``s1`` may be a null pointer. If + copying takes place between objects that overlap, the behavior + is undefined. + + (NOT Cygwin:) The current implementation of *strxfrm* simply copies + the input and does not support any language-specific transformations. + + + +**STATUS CODES:** + + The *strxfrm* function returns the length of the transformed string + (not including the terminating null character). If the value returned + is ``n`` or more, the contents of the array pointed to by + ``s1`` are indeterminate. + + + +**PORTABILITY:** + +*strxfrm* is ANSI C. + +*strxfrm* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/strxfrm_l.rst b/posix-users/newlib/libc/string/strxfrm_l.rst new file mode 100644 index 0000000..4663e11 --- /dev/null +++ b/posix-users/newlib/libc/string/strxfrm_l.rst @@ -0,0 +1,67 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/strxfrm_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strxfrm_l: + +strxfrm_l - Transform string +--------------------------------- +.. index:: strxfrm_l +.. index:: transform string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <string.h> + size_t strxfrm_l(char *restrict s1, const char *restrict s2, + size_t n, locale_t locale); + + + +**DESCRIPTION:** + + This function transforms the string pointed to by ``s2`` and + places the resulting string into the array pointed to by + ``s1``. The transformation is such that if the *strcmp* + function is applied to the two transformed strings, it returns + a value greater than, equal to, or less than zero, + correspoinding to the result of a *strcoll* function applied + to the same two original strings. + + No more than ``n`` characters are placed into the resulting + array pointed to by ``s1``, including the terminating null + character. If ``n`` is zero, ``s1`` may be a null pointer. If + copying takes place between objects that overlap, the behavior + is undefined. + + (NOT Cygwin:) The current implementation of *strxfrm_l* simply copies + the input and does not support any language-specific transformations. + + If ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + The *strxfrm_l* function returns the length of the transformed string + (not including the terminating null character). If the value returned + is ``n`` or more, the contents of the array pointed to by + ``s1`` are indeterminate. + + + +**PORTABILITY:** + +*strxfrm_l* is POSIX-1.2008. + +*strxfrm_l* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/swab.rst b/posix-users/newlib/libc/string/swab.rst new file mode 100644 index 0000000..90595d7 --- /dev/null +++ b/posix-users/newlib/libc/string/swab.rst @@ -0,0 +1,33 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/swab.c + +.. COMMENT: Generated on: 2018-08-20 + +.. swab: + +swab - Swap adjacent bytes +------------------------------- +.. index:: swab +.. index:: swap adjacent bytes + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <unistd.h> + void swab(const void *in, void *out, ssize_t n); + + + +**DESCRIPTION:** + + This function copies ``n`` bytes from the memory region + pointed to by ``in`` to the memory region pointed to by + ``out``, exchanging adjacent even and odd bytes. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcpcpy.rst b/posix-users/newlib/libc/string/wcpcpy.rst new file mode 100644 index 0000000..edb794d --- /dev/null +++ b/posix-users/newlib/libc/string/wcpcpy.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcpcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcpcpy: + +wcpcpy - Copy a wide-character string returning a pointer to its end +------------------------------------------------------------------------- +.. index:: wcpcpy +.. index:: copy a wide-character string returning a pointer to its end + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcpcpy(wchar_t *s1, const wchar_t *s2); + + + +**DESCRIPTION:** + + The *wcpcpy* function copies the wide-character string pointed to by + ``s2`` (including the terminating null wide-character code) into the + array pointed to by ``s1``. If copying takes place between objects that + overlap, the behaviour is undefined. + + + +**STATUS CODES:** + + This function returns a pointer to the end of the destination string, + thus pointing to the trailing `\0`. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcpncpy.rst b/posix-users/newlib/libc/string/wcpncpy.rst new file mode 100644 index 0000000..fea3b33 --- /dev/null +++ b/posix-users/newlib/libc/string/wcpncpy.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcpncpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcpncpy: + +wcpncpy - Copy part of a wide-character string returning a pointer to its end +---------------------------------------------------------------------------------- +.. index:: wcpncpy +.. index:: copy part of a wide-character string returning a pointer to its end + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcpncpy(wchar_t *__restrict s1, + const wchar_t *__restrict s2, size_t n); + + + +**DESCRIPTION:** + + The *wcpncpy* function copies not more than n wide-character codes + (wide-character codes that follow a null wide-character code are not + copied) from the array pointed to by ``s2`` to the array pointed to + by ``s1``. If copying takes place between objects that overlap, the + behaviour is undefined. + + If the array pointed to by ``s2`` is a wide-character string that is + shorter than ``n`` wide-character codes, null wide-character codes are + appended to the copy in the array pointed to by ``s1``, until ``n`` + wide-character codes in all are written. + + + +**STATUS CODES:** + + The *wcpncpy* function returns ``s1``; no return value is reserved to + indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscasecmp.rst b/posix-users/newlib/libc/string/wcscasecmp.rst new file mode 100644 index 0000000..1834ed8 --- /dev/null +++ b/posix-users/newlib/libc/string/wcscasecmp.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscasecmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscasecmp: + +wcscasecmp - Case-insensitive wide character string compare +----------------------------------------------------------------- +.. index:: wcscasecmp +.. index:: case-insensitive wide character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcscasecmp(const wchar_t *a, const wchar_t *b); + + + +**DESCRIPTION:** + + *wcscasecmp* compares the wide character string at ``a`` to + the wide character string at ``b`` in a case-insensitive manner. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to uppercase), *wcscasecmp* returns a + number greater than zero. If the two strings match, + *wcscasecmp* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *wcscasecmp* returns a + number less than zero. + + + +**PORTABILITY:** + +POSIX-1.2008 + +*wcscasecmp* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscasecmp_l.rst b/posix-users/newlib/libc/string/wcscasecmp_l.rst new file mode 100644 index 0000000..d792e8a --- /dev/null +++ b/posix-users/newlib/libc/string/wcscasecmp_l.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscasecmp_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscasecmp_l: + +wcscasecmp_l - Case-insensitive wide character string compare +------------------------------------------------------------------- +.. index:: wcscasecmp_l +.. index:: case-insensitive wide character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcscasecmp_l(const wchar_t *a, const wchar_t *b, + locale_t locale); + + + +**DESCRIPTION:** + + *wcscasecmp_l* compares the wide character string at ``a`` to + the wide character string at ``b`` in a case-insensitive manner. + + if ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, + the behaviour is undefined. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to uppercase), *wcscasecmp_l* returns a + number greater than zero. If the two strings match, + *wcscasecmp_l* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *wcscasecmp_l* returns a + number less than zero. + + + +**PORTABILITY:** + +*wcscasecmp_l* is POSIX-1.2008 + +*wcscasecmp_l* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscat.rst b/posix-users/newlib/libc/string/wcscat.rst new file mode 100644 index 0000000..201d9e2 --- /dev/null +++ b/posix-users/newlib/libc/string/wcscat.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscat.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscat: + +wcscat - Concatenate two wide-character strings +--------------------------------------------------- +.. index:: wcscat +.. index:: concatenate two wide-character strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcscat(wchar_t *__restrict s1, + const wchar_t *__restrict s2); + + + +**DESCRIPTION:** + + The *wcscat* function appends a copy of the wide-character string + pointed to by ``s2`` (including the terminating null wide-character + code) to the end of the wide-character string pointed to by ``s1``. + The initial wide-character code of ``s2`` overwrites the null + wide-character code at the end of ``s1``. If copying takes place between + objects that overlap, the behaviour is undefined. + + + +**STATUS CODES:** + + The *wcscat* function returns ``s1``; + no return value is reserved to indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcschr.rst b/posix-users/newlib/libc/string/wcschr.rst new file mode 100644 index 0000000..aaf647f --- /dev/null +++ b/posix-users/newlib/libc/string/wcschr.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcschr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcschr: + +wcschr - Wide-character string scanning operation +------------------------------------------------------ +.. index:: wcschr +.. index:: wide-character string scanning operation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcschr(const wchar_t *s, wchar_t c); + + + +**DESCRIPTION:** + + The *wcschr* function locates the first occurrence of ``c`` in the + wide-character string pointed to by ``s``. The value of ``c`` must be a + character representable as a type wchar_t and must be a wide-character + code corresponding to a valid character in the current locale. + The terminating null wide-character string. + + + +**STATUS CODES:** + + Upon completion, *wcschr* returns a pointer to the wide-character + code, or a null pointer if the wide-character code is not found. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscmp.rst b/posix-users/newlib/libc/string/wcscmp.rst new file mode 100644 index 0000000..d8dab5b --- /dev/null +++ b/posix-users/newlib/libc/string/wcscmp.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscmp: + +wcscmp - Compare two wide-character strings +------------------------------------------------ +.. index:: wcscmp +.. index:: compare two wide-character strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcscmp(const wchar_t *s1, *s2); + + + +**DESCRIPTION:** + + The *wcscmp* function compares the wide-character string pointed to + by ``s1`` to the wide-character string pointed to by ``s2``. + + The sign of a non-zero return value is determined by the sign of the + difference between the values of the first pair of wide-character codes + that differ in the objects being compared. + + + +**STATUS CODES:** + + Upon completion, *wcscmp* returns an integer greater than, equal to + or less than 0, if the wide-character string pointed to by ``s1`` is + greater than, equal to or less than the wide-character string pointed + to by ``s2`` respectively. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscoll.rst b/posix-users/newlib/libc/string/wcscoll.rst new file mode 100644 index 0000000..43690da --- /dev/null +++ b/posix-users/newlib/libc/string/wcscoll.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscoll.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscoll: + +wcscoll - Locale-specific wide-character string compare +------------------------------------------------------------- +.. index:: wcscoll +.. index:: locale-specific wide-character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcscoll(const wchar_t *stra, const wchar_t * strb); + + + +**DESCRIPTION:** + + *wcscoll* compares the wide-character string pointed to by + ``stra`` to the wide-character string pointed to by ``strb``, + using an interpretation appropriate to the current *LC_COLLATE* + state. + + (NOT Cygwin:) The current implementation of *wcscoll* simply + uses *wcscmp* and does not support any language-specific sorting. + + + +**STATUS CODES:** + + If the first string is greater than the second string, + *wcscoll* returns a number greater than zero. If the two + strings are equivalent, *wcscoll* returns zero. If the first + string is less than the second string, *wcscoll* returns a + number less than zero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscoll_l.rst b/posix-users/newlib/libc/string/wcscoll_l.rst new file mode 100644 index 0000000..10069f4 --- /dev/null +++ b/posix-users/newlib/libc/string/wcscoll_l.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscoll_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscoll_l: + +wcscoll_l - Locale-specific wide-character string compare +--------------------------------------------------------------- +.. index:: wcscoll_l +.. index:: locale-specific wide-character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcscoll_l(const wchar_t *stra, const wchar_t * strb, + locale_t locale); + + + +**DESCRIPTION:** + + *wcscoll_l* compares the wide-character string pointed to by + ``stra`` to the wide-character string pointed to by ``strb``, + using an interpretation appropriate to the current *LC_COLLATE* + state. + + (NOT Cygwin:) The current implementation of *wcscoll_l* simply + uses *wcscmp* and does not support any language-specific sorting. + + If ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + If the first string is greater than the second string, + *wcscoll_l* returns a number greater than zero. If the two + strings are equivalent, *wcscoll_l* returns zero. If the first + string is less than the second string, *wcscoll_l* returns a + number less than zero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscpy.rst b/posix-users/newlib/libc/string/wcscpy.rst new file mode 100644 index 0000000..4419d40 --- /dev/null +++ b/posix-users/newlib/libc/string/wcscpy.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscpy: + +wcscpy - Copy a wide-character string +------------------------------------------- +.. index:: wcscpy +.. index:: copy a wide-character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcscpy(wchar_t *__restrict s1, + const wchar_t *__restrict s2); + + + +**DESCRIPTION:** + + The *wcscpy* function copies the wide-character string pointed to by + ``s2`` (including the terminating null wide-character code) into the + array pointed to by ``s1``. If copying takes place between objects that + overlap, the behaviour is undefined. + + + +**STATUS CODES:** + + The *wcscpy* function returns ``s1``; no return value is reserved to + indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcscspn.rst b/posix-users/newlib/libc/string/wcscspn.rst new file mode 100644 index 0000000..660d9ff --- /dev/null +++ b/posix-users/newlib/libc/string/wcscspn.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcscspn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcscspn: + +wcscspn - Get length of a complementary wide substring +------------------------------------------------------------ +.. index:: wcscspn +.. index:: get length of a complementary wide substring + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcscspn(const wchar_t *s, wchar_t *set); + + + +**DESCRIPTION:** + + The *wcscspn* function computes the length of the maximum initial + segment of the wide-character string pointed to by ``s`` which consists + entirely of wide-character codes not from the wide-character string + pointed to by ``set``. + + + +**STATUS CODES:** + + The *wcscspn* function returns the length of the initial substring of + ``s1``; no return value is reserved to indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsdup.rst b/posix-users/newlib/libc/string/wcsdup.rst new file mode 100644 index 0000000..a222af1 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsdup.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsdup.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsdup: + +wcsdup - Wide character string duplicate +---------------------------------------------- +.. index:: wcsdup +.. index:: wide character string duplicate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcsdup(const wchar_t *str); + + #include <wchar.h> + wchar_t *_wcsdup_r(struct _reent *ptr, const wchar_t *str); + + + +**DESCRIPTION:** + + *wcsdup* allocates a new wide character string using *malloc*, + and copies the content of the argument ``str`` into the newly + allocated string, thus making a copy of ``str``. + + + +**STATUS CODES:** + + *wcsdup* returns a pointer to the copy of ``str`` if enough + memory for the copy was available. Otherwise it returns NULL + and errno is set to ENOMEM. + + + +**PORTABILITY:** + +POSIX-1.2008 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcslcat.rst b/posix-users/newlib/libc/string/wcslcat.rst new file mode 100644 index 0000000..1a34b8f --- /dev/null +++ b/posix-users/newlib/libc/string/wcslcat.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcslcat.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcslcat: + +wcslcat - Concatenate wide-character strings to specified length +--------------------------------------------------------------------- +.. index:: wcslcat +.. index:: concatenate wide-character strings to specified length + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t siz); + + + +**DESCRIPTION:** + + The *wcslcat* function appends wide characters from ``src`` to + end of the ``dst`` wide-character string so that the resultant + wide-character string is not more than ``siz`` wide characters + including the terminating null wide-character code. A terminating + null wide character is always added unless ``siz`` is 0. Thus, + the maximum number of wide characters that can be appended from + ``src`` is ``siz`` - 1. If copying takes place between objects + that overlap, the behaviour is undefined. + + + +**STATUS CODES:** + + Wide-character string length of initial ``dst`` plus the + wide-character string length of ``src`` (does not include + terminating null wide-characters). If the return value is + greater than or equal to ``siz``, then truncation occurred and + not all wide characters from ``src`` were appended. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcslcpy.rst b/posix-users/newlib/libc/string/wcslcpy.rst new file mode 100644 index 0000000..86ffb6c --- /dev/null +++ b/posix-users/newlib/libc/string/wcslcpy.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcslcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcslcpy: + +wcslcpy - Copy a wide-character string to specified length +--------------------------------------------------------------- +.. index:: wcslcpy +.. index:: copy a wide-character string to specified length + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz); + + + +**DESCRIPTION:** + + *wcslcpy* copies wide characters from ``src`` to ``dst`` + such that up to ``siz`` - 1 characters are copied. A + terminating null is appended to the result, unless ``siz`` + is zero. + + + +**STATUS CODES:** + + *wcslcpy* returns the number of wide characters in ``src``, + not including the terminating null wide character. If the + return value is greater than or equal to ``siz``, then + not all wide characters were copied from ``src`` and truncation + occurred. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcslen.rst b/posix-users/newlib/libc/string/wcslen.rst new file mode 100644 index 0000000..70dde76 --- /dev/null +++ b/posix-users/newlib/libc/string/wcslen.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcslen.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcslen: + +wcslen - Get wide-character string length +----------------------------------------------- +.. index:: wcslen +.. index:: get wide-character string length + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcslen(const wchar_t *s); + + + +**DESCRIPTION:** + + The *wcslen* function computes the number of wide-character codes + in the wide-character string to which ``s`` points, not including the + terminating null wide-character code. + + + +**STATUS CODES:** + + The *wcslen* function returns the length of ``s``; no return value is + reserved to indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsncasecmp.rst b/posix-users/newlib/libc/string/wcsncasecmp.rst new file mode 100644 index 0000000..495f108 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsncasecmp.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsncasecmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsncasecmp: + +wcsncasecmp - Case-insensitive wide character string compare +------------------------------------------------------------------ +.. index:: wcsncasecmp +.. index:: case-insensitive wide character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcsncasecmp(const wchar_t *a, const wchar_t * b, size_t length); + + + +**DESCRIPTION:** + + *wcsncasecmp* compares up to ``length`` wide characters + from the string at ``a`` to the string at ``b`` in a + case-insensitive manner. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to uppercase), *wcsncasecmp* returns a + number greater than zero. If the two strings are equivalent, + *wcsncasecmp* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *wcsncasecmp* returns a + number less than zero. + + + +**PORTABILITY:** + +POSIX-1.2008 + +*wcsncasecmp* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsncasecmp_l.rst b/posix-users/newlib/libc/string/wcsncasecmp_l.rst new file mode 100644 index 0000000..a862a34 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsncasecmp_l.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsncasecmp_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsncasecmp_l: + +wcsncasecmp_l - Case-insensitive wide character string compare +-------------------------------------------------------------------- +.. index:: wcsncasecmp_l +.. index:: case-insensitive wide character string compare + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcsncasecmp_l(const wchar_t *a, const wchar_t * b, + size_t length, locale_t locale); + + + +**DESCRIPTION:** + + *wcsncasecmp_l* compares up to ``length`` wide characters + from the string at ``a`` to the string at ``b`` in a + case-insensitive manner. + + if ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + + +**STATUS CODES:** + + + If **``a]*> sorts lexicographically after **``b]*> (after + both are converted to uppercase), *wcsncasecmp_l* returns a + number greater than zero. If the two strings are equivalent, + *wcsncasecmp_l* returns zero. If **``a]*> sorts + lexicographically before **``b]*>, *wcsncasecmp_l* returns a + number less than zero. + + + +**PORTABILITY:** + +POSIX-1.2008 + +*wcsncasecmp_l* requires no supporting OS subroutines. It uses +tolower() from elsewhere in this library. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsncat.rst b/posix-users/newlib/libc/string/wcsncat.rst new file mode 100644 index 0000000..ffa9aa1 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsncat.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsncat.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsncat: + +wcsncat - Concatenate part of two wide-character strings +-------------------------------------------------------------- +.. index:: wcsncat +.. index:: concatenate part of two wide-character strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcsncat(wchar_t *__restrict s1, + const wchar_t *__restrict s2, size_t n); + + + +**DESCRIPTION:** + + The *wcsncat* function appends not more than ``n`` wide-character + codes (a null wide-character code and wide-character codes that follow + it are not appended) from the array pointed to by ``s2`` to the end of + the wide-character string pointed to by ``s1``. The initial + wide-character code of ``s2`` overwrites the null wide-character code + at the end of ``s1``. + A terminating null wide-character code is always appended to the result. + If copying takes place between objects that overlap, the behaviour is + undefined. + + + +**STATUS CODES:** + + The *wcsncat* function returns ``s1``; no return value is reserved to + indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsncmp.rst b/posix-users/newlib/libc/string/wcsncmp.rst new file mode 100644 index 0000000..d8dff33 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsncmp.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsncmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsncmp: + +wcsncmp - Compare part of two wide-character strings +---------------------------------------------------------- +.. index:: wcsncmp +.. index:: compare part of two wide-character strings + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); + + + +**DESCRIPTION:** + + The *wcsncmp* function compares not more than ``n`` wide-character + codes (wide-character codes that follow a null wide-character code are + not compared) from the array pointed to by ``s1`` to the array pointed + to by ``s2``. + + The sign of a non-zero return value is determined by the sign of the + difference between the values of the first pair of wide-character codes + that differ in the objects being compared. + + + +**STATUS CODES:** + + Upon successful completion, *wcsncmp* returns an integer greater than, + equal to or less than 0, if the possibly null-terminated array pointed + to by ``s1`` is greater than, equal to or less than the possibly + null-terminated array pointed to by ``s2`` respectively. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsncpy.rst b/posix-users/newlib/libc/string/wcsncpy.rst new file mode 100644 index 0000000..7021349 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsncpy.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsncpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsncpy: + +wcsncpy - Copy part of a wide-character string +---------------------------------------------------- +.. index:: wcsncpy +.. index:: copy part of a wide-character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcsncpy(wchar_t *__restrict s1, + const wchar_t *__restrict s2, size_t n); + + + +**DESCRIPTION:** + + The *wcsncpy* function copies not more than ``n`` wide-character codes + (wide-character codes that follow a null wide-character code are not + copied) from the array pointed to by ``s2`` to the array pointed to + by ``s1``. If copying takes place between objects that overlap, the + behaviour is undefined. Note that if ``s1`` contains more than ``n`` + wide characters before its terminating null, the result is not + null-terminated. + + If the array pointed to by ``s2`` is a wide-character string that is + shorter than ``n`` wide-character codes, null wide-character codes are + appended to the copy in the array pointed to by ``s1``, until ``n`` + wide-character codes in all are written. + + + +**STATUS CODES:** + + The *wcsncpy* function returns ``s1``; no return value is reserved to + indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcspbrk.rst b/posix-users/newlib/libc/string/wcspbrk.rst new file mode 100644 index 0000000..2d50ea6 --- /dev/null +++ b/posix-users/newlib/libc/string/wcspbrk.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcspbrk.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcspbrk: + +wcspbrk - -scan wide-character string for a wide-character code +-------------------------------------------------------------------- +.. index:: wcspbrk +.. index:: -scan wide-character string for a wide-character code + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcspbrk(const wchar_t *s, const wchar_t *set); + + + +**DESCRIPTION:** + + The *wcspbrk* function locates the first occurrence in the + wide-character string pointed to by ``s`` of any wide-character code + from the wide-character string pointed to by ``set``. + + + +**STATUS CODES:** + + Upon successful completion, *wcspbrk* returns a pointer to the + wide-character code or a null pointer if no wide-character code from + ``set`` occurs in ``s``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsrchr.rst b/posix-users/newlib/libc/string/wcsrchr.rst new file mode 100644 index 0000000..c555901 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsrchr.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsrchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsrchr: + +wcsrchr - Wide-character string scanning operation +-------------------------------------------------------- +.. index:: wcsrchr +.. index:: wide-character string scanning operation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcsrchr(const wchar_t *s, wchar_t c); + + + +**DESCRIPTION:** + + The *wcsrchr* function locates the last occurrence of ``c`` in the + wide-character string pointed to by ``s``. The value of ``c`` must be a + character representable as a type wchar_t and must be a wide-character + code corresponding to a valid character in the current locale. + The terminating null wide-character code is considered to be part of + the wide-character string. + + + +**STATUS CODES:** + + Upon successful completion, *wcsrchr* returns a pointer to the + wide-character code or a null pointer if ``c`` does not occur in the + wide-character string. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsspn.rst b/posix-users/newlib/libc/string/wcsspn.rst new file mode 100644 index 0000000..4f2e3db --- /dev/null +++ b/posix-users/newlib/libc/string/wcsspn.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsspn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsspn: + +wcsspn - Get length of a wide substring +--------------------------------------------- +.. index:: wcsspn +.. index:: get length of a wide substring + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + size_t wcsspn(const wchar_t *s, const wchar_t *set); + + + +**DESCRIPTION:** + + The *wcsspn* function computes the length of the maximum initial + segment of the wide-character string pointed to by ``s`` which consists + entirely of wide-character codes from the wide-character string + pointed to by ``set``. + + + +**STATUS CODES:** + + The wcsspn() function returns the length ``s1``; no return value is + reserved to indicate an error. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsstr.rst b/posix-users/newlib/libc/string/wcsstr.rst new file mode 100644 index 0000000..6ed5c30 --- /dev/null +++ b/posix-users/newlib/libc/string/wcsstr.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsstr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsstr: + +wcsstr - Find a wide-character substring +---------------------------------------------- +.. index:: wcsstr +.. index:: find a wide-character substring + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcsstr(const wchar_t *__restrict big, + const wchar_t *__restrict little); + + + +**DESCRIPTION:** + + The *wcsstr* function locates the first occurrence in the + wide-character string pointed to by ``big`` of the sequence of + wide characters (excluding the terminating null wide character) in the + wide-character string pointed to by ``little``. + + + +**STATUS CODES:** + + On successful completion, *wcsstr* returns a pointer to the located + wide-character string, or a null pointer if the wide-character string + is not found. + + If ``little`` points to a wide-character string with zero length, + the function returns ``big``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcstok.rst b/posix-users/newlib/libc/string/wcstok.rst new file mode 100644 index 0000000..7739e65 --- /dev/null +++ b/posix-users/newlib/libc/string/wcstok.rst @@ -0,0 +1,81 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcstok.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcstok: + +wcstok - Get next token from a string +------------------------------------------ +.. index:: wcstok +.. index:: get next token from a string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wcstok(wchar_t *__restrict source, + const wchar_t *__restrict delimiters, + wchar_t **__restrict lasts); + + + +**DESCRIPTION:** + + The *wcstok* function is the wide-character equivalent of the + *strtok_r* function (which in turn is the same as the *strtok* + function with an added argument to make it thread-safe). + + The *wcstok* function is used to isolate (one at a time) + sequential tokens in a null-terminated wide-character string, + **``source]*>. A token is defined as a substring not containing + any wide-characters from **``delimiters]*>. + + The first time that *wcstok* is called, **``source]*> should + be specified with the wide-character string to be searched, and + **``lasts]*>--but not *lasts*, which must be non-NULL--may be + random; subsequent calls, wishing to obtain further tokens from + the same string, should pass a null pointer for **``source]*> + instead but must supply **``lasts]*> unchanged from the last + call. The separator wide-character string, **``delimiters]*>, + must be supplied each time and may change between calls. + A pointer to placeholder **``lasts]*> must be supplied by + the caller, and is set each time as needed to save the state + by *wcstok*. Every call to *wcstok* with **``source]*> + == *NULL* must pass the value of **``lasts]*> as last set + by *wcstok*. + + The *wcstok* function returns a pointer to the beginning of each + subsequent token in the string, after replacing the separator + wide-character itself with a null wide-character. When no more tokens + remain, a null pointer is returned. + + + +**STATUS CODES:** + + *wcstok* returns a pointer to the first wide character of a token, or + *NULL* if there is no token. + + + +**NOTES:** + + *wcstok* is thread-safe (unlike *strtok*, but like *strtok_r*). + *wcstok* writes into the string being searched. + + + +**PORTABILITY:** + +*wcstok* is C99 and POSIX.1-2001. + +*wcstok* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcswidth.rst b/posix-users/newlib/libc/string/wcswidth.rst new file mode 100644 index 0000000..91d2bc3 --- /dev/null +++ b/posix-users/newlib/libc/string/wcswidth.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcswidth.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcswidth: + +wcswidth - Number of column positions of a wide-character string +---------------------------------------------------------------------- +.. index:: wcswidth +.. index:: number of column positions of a wide-character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcswidth(const wchar_t *pwcs, size_t n); + + + +**DESCRIPTION:** + + The *wcswidth* function shall determine the number of column + positions required for ``n`` wide-character codes (or fewer than ``n`` + wide-character codes if a null wide-character code is encountered + before ``n`` wide-character codes are exhausted) in the string pointed + to by ``pwcs``. + + + +**STATUS CODES:** + + The *wcswidth* function either shall return 0 (if ``pwcs`` points to a + null wide-character code), or return the number of column positions + to be occupied by the wide-character string pointed to by ``pwcs``, or + return -1 (if any of the first ``n`` wide-character codes in the + wide-character string pointed to by ``pwcs`` is not a printable + wide-character code). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsxfrm.rst b/posix-users/newlib/libc/string/wcsxfrm.rst new file mode 100644 index 0000000..4d8883a --- /dev/null +++ b/posix-users/newlib/libc/string/wcsxfrm.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsxfrm.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsxfrm: + +wcsxfrm - Locale-specific wide-character string transformation +-------------------------------------------------------------------- +.. index:: wcsxfrm +.. index:: locale-specific wide-character string transformation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcsxfrm(wchar_t *__restrict stra, + const wchar_t *__restrict strb, size_t n); + + + +**DESCRIPTION:** + + *wcsxfrm* transforms the wide-character string pointed to by + ``strb`` to the wide-character string pointed to by ``stra``, + Comparing two transformed wide strings with *wcscmp* should return + the same result as comparing the original strings with *wcscoll*. + No more than ``n`` wide characters are transformed, including the + trailing null character. + + If ``n`` is 0, ``stra`` may be a NULL pointer. + + (NOT Cygwin:) The current implementation of *wcsxfrm* simply uses + *wcslcpy* and does not support any language-specific transformations. + + + +**STATUS CODES:** + + *wcsxfrm* returns the length of the transformed wide character + string. if the return value is greater or equal to ``n``, the + content of ``stra`` is undefined. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcsxfrm_l.rst b/posix-users/newlib/libc/string/wcsxfrm_l.rst new file mode 100644 index 0000000..957320e --- /dev/null +++ b/posix-users/newlib/libc/string/wcsxfrm_l.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcsxfrm_l.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsxfrm_l: + +wcsxfrm_l - Locale-specific wide-character string transformation +---------------------------------------------------------------------- +.. index:: wcsxfrm_l +.. index:: locale-specific wide-character string transformation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcsxfrm_l(wchar_t *__restrict stra, + const wchar_t *__restrict strb, size_t n, + locale_t locale); + + + +**DESCRIPTION:** + + *wcsxfrm_l* transforms the wide-character string pointed to by + ``strb`` to the wide-character string pointed to by ``stra``, + Comparing two transformed wide strings with *wcscmp* should return + the same result as comparing the original strings with *wcscoll*. + No more than ``n`` wide characters are transformed, including the + trailing null character. + + If ``n`` is 0, ``stra`` may be a NULL pointer. + + If ``locale`` is LC_GLOBAL_LOCALE or not a valid locale object, the + behaviour is undefined. + + (NOT Cygwin:) The current implementation of *wcsxfrm_l* simply uses + *wcslcpy* and does not support any language-specific transformations. + + + +**STATUS CODES:** + + *wcsxfrm_l* returns the length of the transformed wide character + string. if the return value is greater or equal to ``n``, the + content of ``stra`` is undefined. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wcwidth.rst b/posix-users/newlib/libc/string/wcwidth.rst new file mode 100644 index 0000000..503d5bc --- /dev/null +++ b/posix-users/newlib/libc/string/wcwidth.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wcwidth.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcwidth: + +wcwidth - Number of column positions of a wide-character code +------------------------------------------------------------------- +.. index:: wcwidth +.. index:: number of column positions of a wide-character code + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wcwidth(const wint_t wc); + + + +**DESCRIPTION:** + + The *wcwidth* function shall determine the number of column + positions required for the wide character ``wc``. The application + shall ensure that the value of ``wc`` is a character representable + as a wint_t (combining Unicode surrogate pairs into single 21-bit + Unicode code points), and is a wide-character code corresponding to a + valid character in the current locale. + + + +**STATUS CODES:** + + The *wcwidth* function shall either return 0 (if ``wc`` is a null + wide-character code), or return the number of column positions to + be occupied by the wide-character code ``wc``, or return -1 (if ``wc`` + does not correspond to a printable wide-character code). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmemchr.rst b/posix-users/newlib/libc/string/wmemchr.rst new file mode 100644 index 0000000..0accfbc --- /dev/null +++ b/posix-users/newlib/libc/string/wmemchr.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmemchr.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmemchr: + +wmemchr - Find a wide character in memory +------------------------------------------------ +.. index:: wmemchr +.. index:: find a wide character in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n); + + + +**DESCRIPTION:** + + The *wmemchr* function locates the first occurrence of ``c`` in the + initial ``n`` wide characters of the object pointed to be ``s``. This + function is not affected by locale and all wchar_t values are treated + identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If ``n`` is zero, ``s`` must be a valid pointer and the function + behaves as if no valid occurrence of ``c`` is found. + + + +**STATUS CODES:** + + The *wmemchr* function returns a pointer to the located + wide character, or a null pointer if the wide character does not occur + in the object. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmemcmp.rst b/posix-users/newlib/libc/string/wmemcmp.rst new file mode 100644 index 0000000..f138da0 --- /dev/null +++ b/posix-users/newlib/libc/string/wmemcmp.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmemcmp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmemcmp: + +wmemcmp - Compare wide characters in memory +------------------------------------------------- +.. index:: wmemcmp +.. index:: compare wide characters in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n); + + + +**DESCRIPTION:** + + The *wmemcmp* function compares the first ``n`` wide characters of the + object pointed to by ``s1`` to the first ``n`` wide characters of the + object pointed to by ``s2``. This function is not affected by locale + and all wchar_t values are treated identically. The null wide character + and wchar_t values not corresponding to valid characters are not treated + specially. + + If ``n`` is zero, ``s1`` and ``s2`` must be a valid pointers and the + function behaves as if the two objects compare equal. + + + +**STATUS CODES:** + + The *wmemcmp* function returns an integer greater than, equal to, + or less than zero, accordingly as the object pointed to by ``s1`` is + greater than, equal to, or less than the object pointed to by ``s2``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmemcpy.rst b/posix-users/newlib/libc/string/wmemcpy.rst new file mode 100644 index 0000000..533a71e --- /dev/null +++ b/posix-users/newlib/libc/string/wmemcpy.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmemcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmemcpy: + +wmemcpy - Copy wide characters in memory +---------------------------------------------- +.. index:: wmemcpy +.. index:: copy wide characters in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wmemcpy(wchar_t *__restrict d, + const wchar_t *__restrict s, size_t n); + + + +**DESCRIPTION:** + + The *wmemcpy* function copies ``n`` wide characters from the object + pointed to by ``s`` to the object pointed to be ``d``. This function + is not affected by locale and all wchar_t values are treated + identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If ``n`` is zero, ``d`` and ``s`` must be a valid pointers, and the + function copies zero wide characters. + + + +**STATUS CODES:** + + The *wmemcpy* function returns the value of ``d``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmemmove.rst b/posix-users/newlib/libc/string/wmemmove.rst new file mode 100644 index 0000000..81f599b --- /dev/null +++ b/posix-users/newlib/libc/string/wmemmove.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmemmove.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmemmove: + +wmemmove - Copy wide characters in memory with overlapping areas +---------------------------------------------------------------------- +.. index:: wmemmove +.. index:: copy wide characters in memory with overlapping areas + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n); + + + +**DESCRIPTION:** + + The *wmemmove* function copies ``n`` wide characters from the object + pointed to by ``s`` to the object pointed to by ``d``. Copying takes + place as if the ``n`` wide characters from the object pointed to by + ``s`` are first copied into a temporary array of ``n`` wide characters + that does not overlap the objects pointed to by ``d`` or ``s``, and then + the ``n`` wide characters from the temporary array are copied into the + object pointed to by ``d``. + + This function is not affected by locale and all wchar_t values are + treated identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If ``n`` is zero, ``d`` and ``s`` must be a valid pointers, and the + function copies zero wide characters. + + + +**STATUS CODES:** + + The *wmemmove* function returns the value of ``d``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmempcpy.rst b/posix-users/newlib/libc/string/wmempcpy.rst new file mode 100644 index 0000000..7ecd762 --- /dev/null +++ b/posix-users/newlib/libc/string/wmempcpy.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmempcpy.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmempcpy: + +wmempcpy - Copy wide characters in memory and return end pointer +--------------------------------------------------------------------- +.. index:: wmempcpy +.. index:: copy wide characters in memory and return end pointer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #define _GNU_SOURCE + #include <wchar.h> + wchar_t *wmempcpy(wchar_t *d, + const wchar_t *s, size_t n); + + + +**DESCRIPTION:** + + The *wmemcpy* function copies ``n`` wide characters from the object + pointed to by ``s`` to the object pointed to be ``d``. This function + is not affected by locale and all wchar_t values are treated + identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If ``n`` is zero, ``d`` and ``s`` must be a valid pointers, and the + function copies zero wide characters. + + + +**STATUS CODES:** + + *wmempcpy* returns a pointer to the wide character following the + last wide character copied to the ``out`` region. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/string/wmemset.rst b/posix-users/newlib/libc/string/wmemset.rst new file mode 100644 index 0000000..4e18c65 --- /dev/null +++ b/posix-users/newlib/libc/string/wmemset.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/string/wmemset.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wmemset: + +wmemset - Set wide characters in memory +--------------------------------------------------- +.. index:: wmemset +.. index:: set wide characters in memory + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <wchar.h> + wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n); + + + +**DESCRIPTION:** + + The *wmemset* function copies the value of ``c`` into each of the + first ``n`` wide characters of the object pointed to by ``s``. This + function is not affected by locale and all wchar_t values are treated + identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If ``n`` is zero, ``s`` must be a valid pointer and the function + copies zero wide characters. + + + +**STATUS CODES:** + + The *wmemset* function returns the value of ``s``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/asctime.rst b/posix-users/newlib/libc/time/asctime.rst new file mode 100644 index 0000000..e06a331 --- /dev/null +++ b/posix-users/newlib/libc/time/asctime.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/asctime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. asctime: + +asctime - Format time as string +----------------------------------- +.. index:: asctime +.. index:: format time as string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + char *asctime(const struct tm *clock); + char *_asctime_r(const struct tm *clock, char *buf); + + + +**DESCRIPTION:** + +Format the time value at ``clock`` into a string of the form +. Wed Jun 15 11:38:07 1988\n\0 +The string is generated in a static buffer; each call to *asctime* +overwrites the string generated by previous calls. + + + +**STATUS CODES:** + +A pointer to the string containing a formatted timestamp. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/clock.rst b/posix-users/newlib/libc/time/clock.rst new file mode 100644 index 0000000..0484442 --- /dev/null +++ b/posix-users/newlib/libc/time/clock.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/clock.c + +.. COMMENT: Generated on: 2018-08-20 + +.. clock: + +clock - Cumulative processor time +------------------------------------- +.. index:: clock +.. index:: cumulative processor time + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + clock_t clock(void); + + + +**DESCRIPTION:** + +Calculates the best available approximation of the cumulative amount +of time used by your program since it started. To convert the result +into seconds, divide by the macro *CLOCKS_PER_SEC*. + + + +**STATUS CODES:** + +The amount of processor time used so far by your program, in units +defined by the machine-dependent macro *CLOCKS_PER_SEC*. If no +measurement is available, the result is (clock_t)*-1*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/ctime.rst b/posix-users/newlib/libc/time/ctime.rst new file mode 100644 index 0000000..3d87e02 --- /dev/null +++ b/posix-users/newlib/libc/time/ctime.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/ctime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ctime: + +ctime - Convert time to local and format as string +------------------------------------------------------ +.. index:: ctime +.. index:: convert time to local and format as string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + char *ctime(const time_t *clock); + char *ctime_r(const time_t *clock, char *buf); + + + +**DESCRIPTION:** + +Convert the time value at ``clock`` to local time (like *localtime*) +and format it into a string of the form +. Wed Jun 15 11:38:07 1988\n\0 +(like *asctime*). + + + +**STATUS CODES:** + +A pointer to the string containing a formatted timestamp. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/difftime.rst b/posix-users/newlib/libc/time/difftime.rst new file mode 100644 index 0000000..aa0397f --- /dev/null +++ b/posix-users/newlib/libc/time/difftime.rst @@ -0,0 +1,37 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/difftime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. difftime: + +difftime - Subtract two times +--------------------------------- +.. index:: difftime +.. index:: subtract two times + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + double difftime(time_t tim1, time_t tim2); + + + +**DESCRIPTION:** + +Subtracts the two times in the arguments: `*``tim1`` - ``tim2]*>`. + + + +**STATUS CODES:** + +The difference (in seconds) between ``tim2`` and ``tim1``, as a *double*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/gmtime.rst b/posix-users/newlib/libc/time/gmtime.rst new file mode 100644 index 0000000..286d21c --- /dev/null +++ b/posix-users/newlib/libc/time/gmtime.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/gmtime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. gmtime: + +gmtime - Convert time to utc traditional form +------------------------------------------------- +.. index:: gmtime +.. index:: convert time to UTC traditional form + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + struct tm *gmtime(const time_t *clock); + struct tm *gmtime_r(const time_t *clock, struct tm *res); + + + +**DESCRIPTION:** + +*gmtime* takes the time at ``clock`` representing the number +of elapsed seconds since 00:00:00 on January 1, 1970, Universal +Coordinated Time (UTC, also known in some countries as GMT, +Greenwich Mean time) and converts it to a *struct tm* +representation. + +*gmtime* constructs the traditional time representation in static +storage; each call to *gmtime* or *localtime* will overwrite the +information generated by previous calls to either function. + + + +**STATUS CODES:** + +A pointer to the traditional time representation (*struct tm*). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/lcltime.rst b/posix-users/newlib/libc/time/lcltime.rst new file mode 100644 index 0000000..10abeb7 --- /dev/null +++ b/posix-users/newlib/libc/time/lcltime.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/lcltime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. localtime: + +localtime - Convert time to local representation +---------------------------------------------------- +.. index:: localtime +.. index:: convert time to local representation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + struct tm *localtime(time_t *clock); + struct tm *localtime_r(time_t *clock, struct tm *res); + + + +**DESCRIPTION:** + +*localtime* converts the time at ``clock`` into local time, then +converts its representation from the arithmetic representation to the +traditional representation defined by *struct tm*. + +*localtime* constructs the traditional time representation in static +storage; each call to *gmtime* or *localtime* will overwrite the +information generated by previous calls to either function. + +*mktime* is the inverse of *localtime*. + + + +**STATUS CODES:** + +A pointer to the traditional time representation (*struct tm*). + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/mktime.rst b/posix-users/newlib/libc/time/mktime.rst new file mode 100644 index 0000000..16d69ce --- /dev/null +++ b/posix-users/newlib/libc/time/mktime.rst @@ -0,0 +1,43 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/mktime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. mktime: + +mktime - Convert time to arithmetic representation +------------------------------------------------------ +.. index:: mktime +.. index:: convert time to arithmetic representation + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + time_t mktime(struct tm *timp); + + + +**DESCRIPTION:** + +*mktime* assumes the time at ``timp`` is a local time, and converts +its representation from the traditional representation defined by +*struct tm* into a representation suitable for arithmetic. + +*localtime* is the inverse of *mktime*. + + + +**STATUS CODES:** + +If the contents of the structure at ``timp`` do not form a valid +calendar time representation, the result is *-1*. Otherwise, the +result is the time, converted to a *time_t* value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/strftime.rst b/posix-users/newlib/libc/time/strftime.rst new file mode 100644 index 0000000..8d5a0fb --- /dev/null +++ b/posix-users/newlib/libc/time/strftime.rst @@ -0,0 +1,271 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/strftime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. strftime, strftime_l: + +strftime, strftime_l - Convert date and time to a formatted string +------------------------------------------------------------------------ +.. index:: strftime +.. index:: strftime_l +.. index:: convert date and time to a formatted string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + size_t strftime(char *restrict s, size_t maxsize, + const char *restrict format, + const struct tm *restrict timp); + size_t strftime_l(char *restrict s, size_t maxsize, + const char *restrict format, + const struct tm *restrict timp, + locale_t locale); + + + +**DESCRIPTION:** + +*strftime* converts a *struct tm* representation of the time (at +``timp``) into a null-terminated string, starting at ``s`` and occupying +no more than ``maxsize`` characters. + +*strftime_l* is like *strftime* but creates a string in a format +as expected in locale ``locale``. If ``locale`` is LC_GLOBAL_LOCALE or +not a valid locale object, the behaviour is undefined. + +You control the format of the output using the string at ``format``. +**``format]*> can contain two kinds of specifications: text to be +copied literally into the formatted string, and time conversion +specifications. Time conversion specifications are two- and +three-character sequences beginning with `*%*` (use `*%%*` to +include a percent sign in the output). Each defined conversion +specification selects only the specified field(s) of calendar time +data from **``timp]*>, and converts it to a string in one of the +following ways: + +o+ +o %a +The abbreviated weekday name according to the current locale. [tm_wday] + +o %A +The full weekday name according to the current locale. +In the default "C" locale, one of `*Sunday*`, `*Monday*`, `*Tuesday*`, +`*Wednesday*`, `*Thursday*`, `*Friday*`, `*Saturday*`. [tm_wday] + +o %b +The abbreviated month name according to the current locale. [tm_mon] + +o %B +The full month name according to the current locale. +In the default "C" locale, one of `*January*`, `*February*`, +`*March*`, `*April*`, `*May*`, `*June*`, `*July*`, +`*August*`, `*September*`, `*October*`, `*November*`, +`*December*`. [tm_mon] + +o %c +The preferred date and time representation for the current locale. +[tm_sec, tm_min, tm_hour, tm_mday, tm_mon, tm_year, tm_wday] + +o %C +The century, that is, the year divided by 100 then truncated. For +4-digit years, the result is zero-padded and exactly two characters; +but for other years, there may a negative sign or more digits. In +this way, `*%C%y*` is equivalent to `*%Y*`. [tm_year] + +o %d +The day of the month, formatted with two digits (from `*01*` to +`*31*`). [tm_mday] + +o %D +A string representing the date, in the form `*"%m/%d/%y"*`. +[tm_mday, tm_mon, tm_year] + +o %e +The day of the month, formatted with leading space if single digit +(from `*1*` to `*31*`). [tm_mday] + +o %E*x* +In some locales, the E modifier selects alternative representations of +certain modifiers *x*. In newlib, it is ignored, and treated as %*x*. + +o %F +A string representing the ISO 8601:2000 date format, in the form +`*"%Y-%m-%d"*`. [tm_mday, tm_mon, tm_year] + +o %g +The last two digits of the week-based year, see specifier %G (from +`*00*` to `*99*`). [tm_year, tm_wday, tm_yday] + +o %G +The week-based year. In the ISO 8601:2000 calendar, week 1 of the year +includes January 4th, and begin on Mondays. Therefore, if January 1st, +2nd, or 3rd falls on a Sunday, that day and earlier belong to the last +week of the previous year; and if December 29th, 30th, or 31st falls +on Monday, that day and later belong to week 1 of the next year. For +consistency with %Y, it always has at least four characters. +Example: "%G" for Saturday 2nd January 1999 gives "1998", and for +Tuesday 30th December 1997 gives "1998". [tm_year, tm_wday, tm_yday] + +o %h +Synonym for "%b". [tm_mon] + +o %H +The hour (on a 24-hour clock), formatted with two digits (from +`*00*` to `*23*`). [tm_hour] + +o %I +The hour (on a 12-hour clock), formatted with two digits (from +`*01*` to `*12*`). [tm_hour] + +o %j +The count of days in the year, formatted with three digits +(from `*001*` to `*366*`). [tm_yday] + +o %k +The hour (on a 24-hour clock), formatted with leading space if single +digit (from `*0*` to `*23*`). Non-POSIX extension (c.p. %I). [tm_hour] + +o %l +The hour (on a 12-hour clock), formatted with leading space if single +digit (from `*1*` to `*12*`). Non-POSIX extension (c.p. %H). [tm_hour] + +o %m +The month number, formatted with two digits (from `*01*` to `*12*`). +[tm_mon] + +o %M +The minute, formatted with two digits (from `*00*` to `*59*`). [tm_min] + +o %n +A newline character (`*\n*`). + +o %O*x* +In some locales, the O modifier selects alternative digit characters +for certain modifiers *x*. In newlib, it is ignored, and treated as %*x*. + +o %p +Either `*AM*` or `*PM*` as appropriate, or the corresponding strings for +the current locale. [tm_hour] + +o %P +Same as `*%p*`, but in lowercase. This is a GNU extension. [tm_hour] + +o %r +Replaced by the time in a.m. and p.m. notation. In the "C" locale this +is equivalent to "%I:%M:%S %p". In locales which don`t define a.m./p.m. +notations, the result is an empty string. [tm_sec, tm_min, tm_hour] + +o %R +The 24-hour time, to the minute. Equivalent to "%H:%M". [tm_min, tm_hour] + +o %s +The time elapsed, in seconds, since the start of the Unix epoch at +1970-01-01 00:00:00 UTC. + +o %S +The second, formatted with two digits (from `*00*` to `*60*`). The +value 60 accounts for the occasional leap second. [tm_sec] + +o %t +A tab character (`*\t*`). + +o %T +The 24-hour time, to the second. Equivalent to "%H:%M:%S". [tm_sec, +tm_min, tm_hour] + +o %u +The weekday as a number, 1-based from Monday (from `*1*` to +`*7*`). [tm_wday] + +o %U +The week number, where weeks start on Sunday, week 1 contains the first +Sunday in a year, and earlier days are in week 0. Formatted with two +digits (from `*00*` to `*53*`). See also *%W*. [tm_wday, tm_yday] + +o %V +The week number, where weeks start on Monday, week 1 contains January 4th, +and earlier days are in the previous year. Formatted with two digits +(from `*01*` to `*53*`). See also *%G*. [tm_year, tm_wday, tm_yday] + +o %w +The weekday as a number, 0-based from Sunday (from `*0*` to `*6*`). +[tm_wday] + +o %W +The week number, where weeks start on Monday, week 1 contains the first +Monday in a year, and earlier days are in week 0. Formatted with two +digits (from `*00*` to `*53*`). [tm_wday, tm_yday] + +o %x +Replaced by the preferred date representation in the current locale. +In the "C" locale this is equivalent to "%m/%d/%y". +[tm_mon, tm_mday, tm_year] + +o %X +Replaced by the preferred time representation in the current locale. +In the "C" locale this is equivalent to "%H:%M:%S". [tm_sec, tm_min, tm_hour] + +o %y +The last two digits of the year (from `*00*` to `*99*`). [tm_year] +(Implementation interpretation: always positive, even for negative years.) + +o %Y +The full year, equivalent to *%C%y*. It will always have at least four +characters, but may have more. The year is accurate even when tm_year +added to the offset of 1900 overflows an int. [tm_year] + +o %z +The offset from UTC. The format consists of a sign (negative is west of +Greewich), two characters for hour, then two characters for minutes +(-hhmm or +hhmm). If tm_isdst is negative, the offset is unknown and no +output is generated; if it is zero, the offset is the standard offset for +the current time zone; and if it is positive, the offset is the daylight +savings offset for the current timezone. The offset is determined from +the TZ environment variable, as if by calling tzset(). [tm_isdst] + +o %Z +The time zone name. If tm_isdst is negative, no output is generated. +Otherwise, the time zone name is based on the TZ environment variable, +as if by calling tzset(). [tm_isdst] + +o %% +A single character, `*%*`. +o- + + + +**STATUS CODES:** + +When the formatted time takes up no more than ``maxsize`` characters, +the result is the length of the formatted string. Otherwise, if the +formatting operation was abandoned due to lack of room, the result is +*0*, and the string starting at ``s`` corresponds to just those +parts of **``format]*> that could be completely filled in within the +``maxsize`` limit. + + + +**PORTABILITY:** + +ANSI C requires *strftime*, but does not specify the contents of +**``s]*> when the formatted string would require more than +``maxsize`` characters. Unrecognized specifiers and fields of +*timp* that are out of range cause undefined results. Since some +formats expand to 0 bytes, it is wise to set **``s]*> to a nonzero +value beforehand to distinguish between failure and an empty string. +This implementation does not support *s* being NULL, nor overlapping +*s* and *format*. + +*strftime_l* is POSIX-1.2008. + +*strftime* and *strftime_l* require no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/time.rst b/posix-users/newlib/libc/time/time.rst new file mode 100644 index 0000000..e3f5a3a --- /dev/null +++ b/posix-users/newlib/libc/time/time.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/time.c + +.. COMMENT: Generated on: 2018-08-20 + +.. time: + +time - Get current calendar time (as single number) +------------------------------------------------------- +.. index:: time +.. index:: get current calendar time (as single number) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + time_t time(time_t *t); + + + +**DESCRIPTION:** + +*time* looks up the best available representation of the current +time and returns it, encoded as a *time_t*. It stores the same +value at ``t`` unless the argument is *NULL*. + + + +**STATUS CODES:** + +A *-1* result means the current time is not available; otherwise the +result represents the current time. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/tzlock.rst b/posix-users/newlib/libc/time/tzlock.rst new file mode 100644 index 0000000..d6ef9a1 --- /dev/null +++ b/posix-users/newlib/libc/time/tzlock.rst @@ -0,0 +1,27 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/tzlock.c + +.. COMMENT: Generated on: 2018-08-20 + +.. __tz_lock, __tz_unlock: + +__tz_lock, __tz_unlock - Lock time zone global variables +-------------------------------------------------------------- +.. index:: __tz_lock +.. index:: __tz_unlock +.. index:: lock time zone global variables + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include "local.h" + void __tz_lock (void); + void __tz_unlock (void); + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/tzset.rst b/posix-users/newlib/libc/time/tzset.rst new file mode 100644 index 0000000..d9a9572 --- /dev/null +++ b/posix-users/newlib/libc/time/tzset.rst @@ -0,0 +1,70 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/tzset.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tzset: + +tzset - Set timezone characteristics from tz environment variable +--------------------------------------------------------------------- +.. index:: tzset +.. index:: set timezone characteristics from TZ environment variable + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + void tzset(void); + void _tzset_r (struct _reent *reent_ptr); + + + +**DESCRIPTION:** + +*tzset* examines the TZ environment variable and sets up the three +external variables: *_timezone*, *_daylight*, and *tzname*. The +value of *_timezone* shall be the offset from the current time zone +to GMT. The value of *_daylight* shall be 0 if there is no daylight +savings time for the current time zone, otherwise it will be non-zero. +The *tzname* array has two entries: the first is the name of the +standard time zone, the second is the name of the daylight-savings time +zone. + +The TZ environment variable is expected to be in the following POSIX +format: + + stdoffset1[dst[offset2][,start[/time1],end[/time2]]] + +where: std is the name of the standard time-zone (minimum 3 chars) + offset1 is the value to add to local time to arrive at Universal time + it has the form: hh[:mm[:ss]] + dst is the name of the alternate (daylight-savings) time-zone (min 3 chars) + offset2 is the value to add to local time to arrive at Universal time + it has the same format as the std offset + start is the day that the alternate time-zone starts + time1 is the optional time that the alternate time-zone starts + (this is in local time and defaults to 02:00:00 if not specified) + end is the day that the alternate time-zone ends + time2 is the time that the alternate time-zone ends + (it is in local time and defaults to 02:00:00 if not specified) + +Note that there is no white-space padding between fields. Also note that +if TZ is null, the default is Universal GMT which has no daylight-savings +time. If TZ is empty, the default EST5EDT is used. + +The function *_tzset_r* is identical to *tzset* only it is reentrant +and is used for applications that use multiple threads. + + + +**STATUS CODES:** + +There is no return value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/time/wcsftime.rst b/posix-users/newlib/libc/time/wcsftime.rst new file mode 100644 index 0000000..9d2151a --- /dev/null +++ b/posix-users/newlib/libc/time/wcsftime.rst @@ -0,0 +1,75 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/time/wcsftime.c + +.. COMMENT: Generated on: 2018-08-20 + +.. wcsftime: + +wcsftime - Convert date and time to a formatted wide-character string +------------------------------------------------------------------------- +.. index:: wcsftime +.. index:: convert date and time to a formatted wide-character string + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <time.h> + #include <wchar.h> + size_t wcsftime(wchar_t *s, size_t maxsize, + const wchar_t *format, const struct tm *timp); + + + +**DESCRIPTION:** + +*wcsftime* is equivalent to *strftime*, except that: + +O+ +o The argument s points to the initial element of an array of wide characters +into which the generated output is to be placed. + +o The argument maxsize indicates the limiting number of wide characters. + +o The argument format is a wide-character string and the conversion specifiers +are replaced by corresponding sequences of wide characters. + +o The return value indicates the number of wide characters. +O- +(The difference in all of the above being wide characters versus regular +characters.) + +See *strftime* for the details of the format specifiers. + + + +**STATUS CODES:** + +When the formatted time takes up no more than ``maxsize`` wide characters, +the result is the length of the formatted wide string. Otherwise, if the +formatting operation was abandoned due to lack of room, the result is +*0*, and the wide-character string starting at ``s`` corresponds to just those +parts of **``format]*> that could be completely filled in within the +``maxsize`` limit. + + + +**PORTABILITY:** + +C99 and POSIX require *wcsftime*, but do not specify the contents of +**``s]*> when the formatted string would require more than +``maxsize`` characters. Unrecognized specifiers and fields of +*timp* that are out of range cause undefined results. Since some +formats expand to 0 bytes, it is wise to set **``s]*> to a nonzero +value beforehand to distinguish between failure and an empty string. +This implementation does not support *s* being NULL, nor overlapping +*s* and *format*. + +*wcsftime* requires no supporting OS subroutines. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/unix/pread.rst b/posix-users/newlib/libc/unix/pread.rst new file mode 100644 index 0000000..d81fbdd --- /dev/null +++ b/posix-users/newlib/libc/unix/pread.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/unix/pread.c + +.. COMMENT: Generated on: 2018-08-20 + +.. pread: + +pread - Read a file from specified position +----------------------------------------------- +.. index:: pread +.. index:: read a file from specified position + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <unistd.h> + ssize_t pread(int fd, void *buf, size_t n, off_t off); + ssize_t _pread_r(struct _reent *rptr, int fd, + void *buf, size_t n, off_t off); + + + +**DESCRIPTION:** + +The *pread* function is similar to *read*. One difference is that +*pread* has an additional parameter ``off`` which is the offset to +position in the file before reading. The function also differs in that +the file position is unchanged by the function (i.e. the file position +is the same before and after a call to *pread*). + +The *_pread_r* function is the same as *pread*, only a reentrant +struct pointer ``rptr`` is provided to preserve reentrancy. + + + +**STATUS CODES:** + +*pread* returns the number of bytes read or *-1* if failure occurred. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libc/unix/pwrite.rst b/posix-users/newlib/libc/unix/pwrite.rst new file mode 100644 index 0000000..29198cc --- /dev/null +++ b/posix-users/newlib/libc/unix/pwrite.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libc/unix/pwrite.c + +.. COMMENT: Generated on: 2018-08-20 + +.. pwrite: + +pwrite - Write a file from specified position +------------------------------------------------- +.. index:: pwrite +.. index:: write a file from specified position + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <unistd.h> + ssize_t pwrite(int fd, const void *buf, + size_t n, off_t off); + ssize_t _pwrite_r(struct _reent *rptr, int fd, + const void *buf, size_t n, off_t off); + + + +**DESCRIPTION:** + +The *pwrite* function is similar to *write*. One difference is that +*pwrite* has an additional parameter ``off`` which is the offset to +position in the file before writing. The function also differs in that +the file position is unchanged by the function (i.e. the file position +is the same before and after a call to *pwrite*). + +The *_pwrite_r* function is the same as *pwrite*, only a reentrant +struct pointer ``rptr`` is provided to preserve reentrancy. + + + +**STATUS CODES:** + +*pwrite* returns the number of bytes written or *-1* if failure occurred. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/isgreater.rst b/posix-users/newlib/libm/common/isgreater.rst new file mode 100644 index 0000000..0f0a812 --- /dev/null +++ b/posix-users/newlib/libm/common/isgreater.rst @@ -0,0 +1,84 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/isgreater.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered: + +isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered - Comparison macros +--------------------------------------------------------------------------------------------------------------- +.. index:: isgreater +.. index:: isgreaterequal +.. index:: isless +.. index:: islessequal +.. index:: islessgreater +.. index:: isunordered +.. index:: comparison macros + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + int isgreater(real-floating x, real-floating y); + int isgreaterequal(real-floating x, real-floating y); + int isless(real-floating x, real-floating y); + int islessequal(real-floating x, real-floating y); + int islessgreater(real-floating x, real-floating y); + int isunordered(real-floating x, real-floating y); + + + +**DESCRIPTION:** + +*isgreater*, *isgreaterequal*, *isless*, *islessequal*, +*islessgreater*, and *isunordered* are macros defined for use in +comparing floating-point numbers without raising any floating-point +exceptions. + +The relational operators (i.e. <, >, <=, and >=) support the usual mathematical +relationships between numeric values. For any ordered pair of numeric +values exactly one of the relationships--less, greater, and equal--is +true. Relational operators may raise the "invalid" floating-point +exception when argument values are NaNs. For a NaN and a numeric value, or +for two NaNs, just the unordered relationship is true (i.e., if one or both +of the arguments a NaN, the relationship is called unordered). The specified +macros are quiet (non floating-point exception raising) versions of the +relational operators, and other comparison macros that facilitate writing +efficient code that accounts for NaNs without suffering the "invalid" +floating-point exception. In the synopses shown, "real-floating" indicates +that the argument is an expression of real floating type. + +Please note that saying that the macros do not raise floating-point +exceptions, it is referring to the function that they are performing. It +is certainly possible to give them an expression which causes an exception. +For example: +o+ +o NaN < 1.0 + causes an "invalid" exception, +o isless(NaN, 1.0) + does not, and +o isless(NaN*0., 1.0) + causes an exception due to the "NaN*0.", but not from the +resultant reduced comparison of isless(NaN, 1.0). +o- + + + +**STATUS CODES:** + +@comment Formatting note: "$@" forces a new line +No floating-point exceptions are raised for any of the macros.@* +The *isgreater* macro returns the value of (x) > (y).@* +The *isgreaterequal* macro returns the value of (x) >= (y).@* +The *isless* macro returns the value of (x) < (y).@* +The *islessequal* macro returns the value of (x) <= (y).@* +The *islessgreater* macro returns the value of (x) < (y) || (x) > (y).@* +The *isunordered* macro returns 1 if either of its arguments is NaN and 0 otherwise. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_cbrt.rst b/posix-users/newlib/libm/common/s_cbrt.rst new file mode 100644 index 0000000..6bff7d4 --- /dev/null +++ b/posix-users/newlib/libm/common/s_cbrt.rst @@ -0,0 +1,39 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_cbrt.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cbrt, cbrtf: + +cbrt, cbrtf - Cube root +------------------------------ +.. index:: cbrt +.. index:: cbrtf +.. index:: cube root + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double cbrt(double x); + float cbrtf(float x); + + + +**DESCRIPTION:** + + *cbrt* computes the cube root of the argument. + + + +**STATUS CODES:** + + The cube root is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_copysign.rst b/posix-users/newlib/libm/common/s_copysign.rst new file mode 100644 index 0000000..e29dfaf --- /dev/null +++ b/posix-users/newlib/libm/common/s_copysign.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_copysign.c + +.. COMMENT: Generated on: 2018-08-20 + +.. copysign, copysignf: + +copysign, copysignf - Sign of ``y``, magnitude of ``x`` +------------------------------------------------------------- +.. index:: copysign +.. index:: copysignf +.. index:: sign of ``y``, magnitude of ``x`` + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double copysign (double x, double y); + float copysignf (float x, float y); + + + +**DESCRIPTION:** + +*copysign* constructs a number with the magnitude (absolute value) +of its first argument, ``x``, and the sign of its second argument, +``y``. + +*copysignf* does the same thing; the two functions differ only in +the type of their arguments and result. + + + +**STATUS CODES:** + +*copysign* returns a *double* with the magnitude of +``x`` and the sign of ``y``. +*copysignf* returns a *float* with the magnitude of +``x`` and the sign of ``y``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_exp10.rst b/posix-users/newlib/libm/common/s_exp10.rst new file mode 100644 index 0000000..03380cc --- /dev/null +++ b/posix-users/newlib/libm/common/s_exp10.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_exp10.c + +.. COMMENT: Generated on: 2018-08-20 + +.. exp10, exp10f: + +exp10, exp10f - Exponential, base 10 +------------------------------------------ +.. index:: exp10 +.. index:: exp10f +.. index:: exponential, base 10 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double exp10(double x); + float exp10f(float x); + + + +**DESCRIPTION:** + + *exp10* and *exp10f* calculate 10 ^ ``x``, that is, + @ifnottex + 10 raised to the power ``x``. + @end ifnottex + @tex + $10^x$ + @end tex + + You can use the (non-ANSI) function *matherr* to specify + error handling for these functions. + + + +**STATUS CODES:** + + On success, *exp10* and *exp10f* return the calculated value. + If the result underflows, the returned value is *0*. If the + result overflows, the returned value is *HUGE_VAL*. In + either case, *errno* is set to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_expm1.rst b/posix-users/newlib/libm/common/s_expm1.rst new file mode 100644 index 0000000..0b15c2d --- /dev/null +++ b/posix-users/newlib/libm/common/s_expm1.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_expm1.c + +.. COMMENT: Generated on: 2018-08-20 + +.. expm1, expm1f: + +expm1, expm1f - Exponential minus 1 +----------------------------------------- +.. index:: expm1 +.. index:: expm1f +.. index:: exponential minus 1 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double expm1(double x); + float expm1f(float x); + + + +**DESCRIPTION:** + + *expm1* and *expm1f* calculate the exponential of ``x`` + and subtract 1, that is, + @ifnottex + e raised to the power ``x`` minus 1 (where e + @end ifnottex + @tex + $e^x - 1$ (where $e$ + @end tex + is the base of the natural system of logarithms, approximately + 2.71828). The result is accurate even for small values of + ``x``, where using *exp(``x``)-1* would lose many + significant digits. + + + +**STATUS CODES:** + + e raised to the power ``x``, minus 1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_fdim.rst b/posix-users/newlib/libm/common/s_fdim.rst new file mode 100644 index 0000000..a4ed46e --- /dev/null +++ b/posix-users/newlib/libm/common/s_fdim.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_fdim.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fdim, fdimf: + +fdim, fdimf - Positive difference +-------------------------------------- +.. index:: fdim +.. index:: fdimf +.. index:: positive difference + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fdim(double x, double y); + float fdimf(float x, float y); + + + +**DESCRIPTION:** + +The *fdim* functions determine the positive difference between their +arguments, returning: +. ``x`` - ``y`` if ``x`` > ``y``, or + @ifnottex +. +0 if ``x`` <= ``y``, or + @end ifnottex + @tex +. +0 if ``x`` $\leq$ ``y``, or + @end tex +. NAN if either argument is NAN. +A range error may occur. + + + +**STATUS CODES:** + +The *fdim* functions return the positive difference value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_fma.rst b/posix-users/newlib/libm/common/s_fma.rst new file mode 100644 index 0000000..ea62f2e --- /dev/null +++ b/posix-users/newlib/libm/common/s_fma.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_fma.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fma, fmaf: + +fma, fmaf - Floating multiply add +-------------------------------------- +.. index:: fma +.. index:: fmaf +.. index:: floating multiply add + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fma(double x, double y, double z); + float fmaf(float x, float y, float z); + + + +**DESCRIPTION:** + +The *fma* functions compute (``x`` * ``y``) + ``z``, rounded as one ternary +operation: they compute the value (as if) to infinite precision and round once +to the result format, according to the rounding mode characterized by the value +of FLT_ROUNDS. That is, they are supposed to do this: see below. + + + +**STATUS CODES:** + +The *fma* functions return (``x`` * ``y``) + ``z``, rounded as one ternary +operation. + + + +**BUGS:** + +This implementation does not provide the function that it should, purely +returning "(``x`` * ``y``) + ``z``;" with no attempt at all to provide the +simulated infinite precision intermediates which are required. DO NOT USE THEM. + +If double has enough more precision than float, then *fmaf* should provide +the expected numeric results, as it does use double for the calculation. But +since this is not the case for all platforms, this manual cannot determine +if it is so for your case. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_fmax.rst b/posix-users/newlib/libm/common/s_fmax.rst new file mode 100644 index 0000000..530ec33 --- /dev/null +++ b/posix-users/newlib/libm/common/s_fmax.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_fmax.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fmax, fmaxf: + +fmax, fmaxf - Maximum +-------------------------- +.. index:: fmax +.. index:: fmaxf +.. index:: maximum + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fmax(double x, double y); + float fmaxf(float x, float y); + + + +**DESCRIPTION:** + +The *fmax* functions determine the maximum numeric value of their arguments. +NaN arguments are treated as missing data: if one argument is a NaN and the +other numeric, then the *fmax* functions choose the numeric value. + + + +**STATUS CODES:** + +The *fmax* functions return the maximum numeric value of their arguments. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_fmin.rst b/posix-users/newlib/libm/common/s_fmin.rst new file mode 100644 index 0000000..e835f2b --- /dev/null +++ b/posix-users/newlib/libm/common/s_fmin.rst @@ -0,0 +1,41 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_fmin.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fmin, fminf: + +fmin, fminf - Minimum +-------------------------- +.. index:: fmin +.. index:: fminf +.. index:: minimum + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fmin(double x, double y); + float fminf(float x, float y); + + + +**DESCRIPTION:** + +The *fmin* functions determine the minimum numeric value of their arguments. +NaN arguments are treated as missing data: if one argument is a NaN and the +other numeric, then the *fmin* functions choose the numeric value. + + + +**STATUS CODES:** + +The *fmin* functions return the minimum numeric value of their arguments. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_ilogb.rst b/posix-users/newlib/libm/common/s_ilogb.rst new file mode 100644 index 0000000..3945ef4 --- /dev/null +++ b/posix-users/newlib/libm/common/s_ilogb.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_ilogb.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ilogb, ilogbf: + +ilogb, ilogbf - Get exponent of floating-point number +----------------------------------------------------------------- +.. index:: ilogb +.. index:: ilogbf +.. index:: get exponent of floating-point number + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + int ilogb(double val); + int ilogbf(float val); + + + +**DESCRIPTION:** + + + All nonzero, normal numbers can be described as ``m`` * + 2**``p``. *ilogb* and *ilogbf* examine the argument + ``val``, and return ``p``. The functions *frexp* and + *frexpf* are similar to *ilogb* and *ilogbf*, but also + return ``m``. + + + +**STATUS CODES:** + + +*ilogb* and *ilogbf* return the power of two used to form the +floating-point argument. +If ``val`` is *0*, they return *FP_ILOGB0*. +If ``val`` is infinite, they return *INT_MAX*. +If ``val`` is NaN, they return *FP_ILOGBNAN*. +(*FP_ILOGB0* and *FP_ILOGBNAN* are defined in math.h, but in turn are +defined as INT_MIN or INT_MAX from limits.h. The value of FP_ILOGB0 may be +either INT_MIN or -INT_MAX. The value of FP_ILOGBNAN may be either INT_MAX or +INT_MIN.) + +@comment The bugs might not be worth noting, given the mass non-C99/POSIX +@comment behavior of much of the Newlib math library. +@comment BUGS +@comment On errors, errno is not set per C99 and POSIX requirements even if +@comment (math_errhandling & MATH_ERRNO) is non-zero. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_infinity.rst b/posix-users/newlib/libm/common/s_infinity.rst new file mode 100644 index 0000000..e629a2f --- /dev/null +++ b/posix-users/newlib/libm/common/s_infinity.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_infinity.c + +.. COMMENT: Generated on: 2018-08-20 + +.. infinity, infinityf: + +infinity, infinityf - Representation of infinity +------------------------------------------------------- +.. index:: infinity +.. index:: infinityf +.. index:: representation of infinity + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double infinity(void); + float infinityf(void); + + + +**DESCRIPTION:** + + *infinity* and *infinityf* return the special number IEEE + infinity in double- and single-precision arithmetic + respectively. + + + +**PORTABILITY:** + +*infinity* and *infinityf* are neither standard C nor POSIX. C and +POSIX require macros HUGE_VAL and HUGE_VALF to be defined in math.h, which +Newlib defines to be infinities corresponding to these archaic infinity() +and infinityf() functions in floating-point implementations which do have +infinities. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_isnan.rst b/posix-users/newlib/libm/common/s_isnan.rst new file mode 100644 index 0000000..be39caf --- /dev/null +++ b/posix-users/newlib/libm/common/s_isnan.rst @@ -0,0 +1,161 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_isnan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fpclassify, isfinite, isinf, isnan, isnormal, finite, finitef, isinf, isinff, isnan, isnanf: + +fpclassify, isfinite, isinf, isnan, isnormal, finite, finitef, isinf, isinff, isnan, isnanf - Test for exceptional numbers + +@c c99 (start +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: fpclassify +.. index:: isfinite +.. index:: isinf +.. index:: isnan +.. index:: isnormal +.. index:: finite +.. index:: finitef +.. index:: isinf +.. index:: isinff +.. index:: isnan +.. index:: isnanf +.. index:: test for exceptional numbers + +@c C99 (start + +**CALLING SEQUENCE:** + +.. code-block:: c + + [C99 standard macros:] + #include <math.h> + int fpclassify(real-floating x); + int isfinite(real-floating x); + int isinf(real-floating x); + int isnan(real-floating x); + int isnormal(real-floating x); + + [Archaic SUSv2 functions:] + #include <math.h> + int isnan(double arg); + int isinf(double arg); + int finite(double arg); + int isnanf(float arg); + int isinff(float arg); + int finitef(float arg); + + + +**DESCRIPTION:** + +*fpclassify*, *isfinite*, *isinf*, *isnan*, and *isnormal* are macros +defined for use in classifying floating-point numbers. This is a help because +of special "values" like NaN and infinities. In the synopses shown, +"real-floating" indicates that the argument is an expression of real floating +type. These function-like macros are C99 and POSIX-compliant, and should be +used instead of the now-archaic SUSv2 functions. + +The *fpclassify* macro classifies its argument value as NaN, infinite, normal, +subnormal, zero, or into another implementation-defined category. First, an +argument represented in a format wider than its semantic type is converted to +its semantic type. Then classification is based on the type of the argument. +The *fpclassify* macro returns the value of the number classification macro +appropriate to the value of its argument: + +o+ +o FP_INFINITE + ``x`` is either plus or minus infinity; +o FP_NAN + ``x`` is "Not A Number" (plus or minus); +o FP_NORMAL + ``x`` is a "normal" number (i.e. is none of the other special forms); +o FP_SUBNORMAL + ``x`` is too small be stored as a regular normalized number (i.e. loss of precision is likely); or +o FP_ZERO + ``x`` is 0 (either plus or minus). +o- + +The "*is*" set of macros provide a useful set of shorthand ways for +classifying floating-point numbers, providing the following equivalent +relations: + +o+ +o *isfinite*(``x``) +returns non-zero if ``x`` is finite. (It is equivalent to +(*fpclassify*(``x``) != FP_INFINITE && *fpclassify*(``x``) != FP_NAN).) + +o *isinf*(``x``) +returns non-zero if ``x`` is infinite. (It is equivalent to +(*fpclassify*(``x``) == FP_INFINITE).) + +o *isnan*(``x``) +returns non-zero if ``x`` is NaN. (It is equivalent to +(*fpclassify*(``x``) == FP_NAN).) + +o *isnormal*(``x``) +returns non-zero if ``x`` is normal. (It is equivalent to +(*fpclassify*(``x``) == FP_NORMAL).) +o- + + The archaic SUSv2 functions provide information on the floating-point + argument supplied. + + There are five major number formats ("exponent" referring to the + biased exponent in the binary-encoded number): + o+ + o zero + A number which contains all zero bits, excluding the sign bit. + o subnormal + A number with a zero exponent but a nonzero fraction. + o normal + A number with an exponent and a fraction. + o infinity + A number with an all 1`s exponent and a zero fraction. + o NAN + A number with an all 1`s exponent and a nonzero fraction. + + o- + + *isnan* returns 1 if the argument is a nan. *isinf* + returns 1 if the argument is infinity. *finite* returns 1 if the + argument is zero, subnormal or normal. + + The *isnanf*, *isinff* and *finitef* functions perform the same + operations as their *isnan*, *isinf* and *finite* + counterparts, but on single-precision floating-point numbers. + + It should be noted that the C99 standard dictates that *isnan* + and *isinf* are macros that operate on multiple types of + floating-point. The SUSv2 standard declares *isnan* as + a function taking double. Newlib has decided to declare + them both as functions and as macros in math.h to + maintain backward compatibility. + + + +**STATUS CODES:** + +@comment Formatting note: "$@" forces a new line +The fpclassify macro returns the value corresponding to the appropriate FP_ macro.@* +The isfinite macro returns nonzero if ``x`` is finite, else 0.@* +The isinf macro returns nonzero if ``x`` is infinite, else 0.@* +The isnan macro returns nonzero if ``x`` is an NaN, else 0.@* +The isnormal macro returns nonzero if ``x`` has a normal value, else 0. + + + +**PORTABILITY:** + +math.h macros are C99, POSIX.1-2001. + +The functions originate from BSD; isnan was listed in the X/Open +Portability Guide and Single Unix Specification, but was dropped when +the macro was standardized in POSIX.1-2001. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_isnand.rst b/posix-users/newlib/libm/common/s_isnand.rst new file mode 100644 index 0000000..1a46079 --- /dev/null +++ b/posix-users/newlib/libm/common/s_isnand.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_isnand.c + +.. COMMENT: Generated on: 2018-08-20 + +.. isnan, isnanf, isinf, isinff, finite, finitef: + +isnan, isnanf, isinf, isinff, finite, finitef - Test for exceptional numbers +------------------------------------------------------------------------------------------- +.. index:: isnan +.. index:: isnanf +.. index:: isinf +.. index:: isinff +.. index:: finite +.. index:: finitef +.. index:: test for exceptional numbers + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + int isnan(double arg); + int isinf(double arg); + int finite(double arg); + int isnanf(float arg); + int isinff(float arg); + int finitef(float arg); + + + + +**DESCRIPTION:** + + These functions provide information on the floating-point + argument supplied. + + There are five major number formats: + o+ + o zero + A number which contains all zero bits. + o subnormal + A number with a zero exponent but a nonzero fraction. + o normal + A number with an exponent and a fraction. + o infinity + A number with an all 1`s exponent and a zero fraction. + o NAN + A number with an all 1`s exponent and a nonzero fraction. + + o- + + *isnan* returns 1 if the argument is a nan. *isinf* + returns 1 if the argument is infinity. *finite* returns 1 if the + argument is zero, subnormal or normal. + + Note that by the C99 standard, *isnan* and *isinf* are macros + taking any type of floating-point and are declared in + *math.h*. Newlib has chosen to declare these both as functions + and as macros in *math.h*. + + The *isnanf*, *isinff* and *finitef* functions perform the same + operations as their *isnan*, *isinf* and *finite* + counterparts, but on single-precision floating-point numbers. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_log1p.rst b/posix-users/newlib/libm/common/s_log1p.rst new file mode 100644 index 0000000..a6c0436 --- /dev/null +++ b/posix-users/newlib/libm/common/s_log1p.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_log1p.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log1p, log1pf: + +log1p, log1pf - Log of *1 + ``x]*> +---------------------------------------- +.. index:: log1p +.. index:: log1pf +.. index:: log of *1 + ``x]*> + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log1p(double x); + float log1pf(float x); + + + +**DESCRIPTION:** + +*log1p* calculates +@tex +$ln(1+x)$, +@end tex +the natural logarithm of *1+``x]*>. You can use *log1p* rather +than `*log(1+``x``)*` for greater precision when ``x`` is very +small. + +*log1pf* calculates the same thing, but accepts and returns +*float* values rather than *double*. + + + +**STATUS CODES:** + +*log1p* returns a *double*, the natural log of *1+``x]*>. +*log1pf* returns a *float*, the natural log of *1+``x]*>. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_log2.rst b/posix-users/newlib/libm/common/s_log2.rst new file mode 100644 index 0000000..14750e9 --- /dev/null +++ b/posix-users/newlib/libm/common/s_log2.rst @@ -0,0 +1,65 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_log2.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log2, log2f: + +log2, log2f - Base 2 logarithm +------------------------------------ +.. index:: log2 +.. index:: log2f +.. index:: base 2 logarithm + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log2(double x); + float log2f(float x); + + + +**DESCRIPTION:** + +The *log2* functions compute the base-2 logarithm of ``x``. A domain error +occurs if the argument is less than zero. A range error occurs if the +argument is zero. + +The Newlib implementations are not full, intrinisic calculations, but +rather are derivatives based on *log*. (Accuracy might be slightly off from +a direct calculation.) In addition to functions, they are also implemented as +macros defined in math.h: +. #define log2(x) (log (x) / _M_LN2) +. #define log2f(x) (logf (x) / (float) _M_LN2) +To use the functions instead, just undefine the macros first. + +You can use the (non-ANSI) function *matherr* to specify error +handling for these functions, indirectly through the respective *log* +function. + + + +**STATUS CODES:** + +The *log2* functions return +@ifnottex +*log base-2(``x``)* +@end ifnottex +@tex +$log_2(x)$ +@end tex +on success. +When ``x`` is zero, the +returned value is *-HUGE_VAL* and *errno* is set to *ERANGE*. +When ``x`` is negative, the returned value is NaN (not a number) and +*errno* is set to *EDOM*. You can control the error behavior via +*matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_logb.rst b/posix-users/newlib/libm/common/s_logb.rst new file mode 100644 index 0000000..27f0e62 --- /dev/null +++ b/posix-users/newlib/libm/common/s_logb.rst @@ -0,0 +1,72 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_logb.c + +.. COMMENT: Generated on: 2018-08-20 + +.. logb, logbf: + +logb, logbf - Get exponent of floating-point number +--------------------------------------------------------------- +.. index:: logb +.. index:: logbf +.. index:: get exponent of floating-point number + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double logb(double x); + float logbf(float x); + + + +**DESCRIPTION:** + +The *logb* functions extract the exponent of ``x``, as a signed integer value +in floating-point format. If ``x`` is subnormal it is treated as though it were +normalized; thus, for positive finite ``x``, +@ifnottex +1 <= (``x`` * FLT_RADIX to the power (-logb(``x``))) < FLT_RADIX. +@end ifnottex +@tex +$1 \leq ( x \cdot FLT\_RADIX ^ {-logb(x)} ) < FLT\_RADIX$. +@end tex +A domain error may occur if the argument is zero. +In this floating-point implementation, FLT_RADIX is 2. Which also means +that for finite ``x``, *logb*(``x``) = *floor*(*log2*(*fabs*(``x``))). + +All nonzero, normal numbers can be described as +@ifnottex +``m`` * 2**``p``, where 1.0 <= ``m`` < 2.0. +@end ifnottex +@tex +$m \cdot 2^p$, where $1.0 \leq m < 2.0$. +@end tex +The *logb* functions examine the argument ``x``, and return ``p``. +The *frexp* functions are similar to the *logb* functions, but +returning ``m`` adjusted to the interval [.5, 1) or 0, and ``p``+1. + + + +**STATUS CODES:** + +@comment Formatting note: "$@" forces a new line +When ``x`` is:@* ++inf or -inf, +inf is returned;@* +NaN, NaN is returned;@* +0, -inf is returned, and the divide-by-zero exception is raised;@* +otherwise, the *logb* functions return the signed exponent of ``x``. + + + +**PORTABILITY:** + +ANSI C, POSIX + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_lrint.rst b/posix-users/newlib/libm/common/s_lrint.rst new file mode 100644 index 0000000..6d9c702 --- /dev/null +++ b/posix-users/newlib/libm/common/s_lrint.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_lrint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. lrint, lrintf, llrint, llrintf: + +lrint, lrintf, llrint, llrintf - Round to integer +---------------------------------------------------------- +.. index:: lrint +.. index:: lrintf +.. index:: llrint +.. index:: llrintf +.. index:: round to integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + long int lrint(double x); + long int lrintf(float x); + long long int llrint(double x); + long long int llrintf(float x); + + + +**DESCRIPTION:** + +The *lrint* and *llrint* functions round their argument to the nearest +integer value, using the current rounding direction. If the rounded value is +outside the range of the return type, the numeric result is unspecified. A +range error may occur if the magnitude of ``x`` is too large. +The "inexact" floating-point exception is raised in implementations that +support it when the result differs in value from the argument (i.e., when +a fraction actually has been truncated). + + + +**STATUS CODES:** + +``x`` rounded to an integral value, using the current rounding direction. + + + +**SEEALSO:** + +*lround* + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_lround.rst b/posix-users/newlib/libm/common/s_lround.rst new file mode 100644 index 0000000..21b4b5c --- /dev/null +++ b/posix-users/newlib/libm/common/s_lround.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_lround.c + +.. COMMENT: Generated on: 2018-08-20 + +.. lround, lroundf, llround, llroundf: + +lround, lroundf, llround, llroundf - Round to integer, to nearest +-------------------------------------------------------------------------- +.. index:: lround +.. index:: lroundf +.. index:: llround +.. index:: llroundf +.. index:: round to integer, to nearest + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + long int lround(double x); + long int lroundf(float x); + long long int llround(double x); + long long int llroundf(float x); + + + +**DESCRIPTION:** + + The *lround* and *llround* functions round their argument to the + nearest integer value, rounding halfway cases away from zero, regardless + of the current rounding direction. If the rounded value is outside the + range of the return type, the numeric result is unspecified (depending + upon the floating-point implementation, not the library). A range + error may occur if the magnitude of x is too large. + + + +**STATUS CODES:** + +``x`` rounded to an integral value as an integer. + + + +**SEEALSO:** + +See the *round* functions for the return being the same floating-point type +as the argument. *lrint*, *llrint*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_modf.rst b/posix-users/newlib/libm/common/s_modf.rst new file mode 100644 index 0000000..cab60c5 --- /dev/null +++ b/posix-users/newlib/libm/common/s_modf.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_modf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. modf, modff: + +modf, modff - Split fractional and integer parts +------------------------------------------------------------- +.. index:: modf +.. index:: modff +.. index:: split fractional and integer parts + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double modf(double val, double *ipart); + float modff(float val, float *ipart); + + + +**DESCRIPTION:** + + *modf* splits the double ``val`` apart into an integer part + and a fractional part, returning the fractional part and + storing the integer part in **``ipart]*>. No rounding + whatsoever is done; the sum of the integer and fractional + parts is guaranteed to be exactly equal to ``val``. That + is, if ``realpart`` = modf(``val``, &``intpart``); then + `*``realpart``+``intpart]*>` is the same as ``val``. + *modff* is identical, save that it takes and returns + *float* rather than *double* values. + + + +**STATUS CODES:** + + The fractional part is returned. Each result has the same + sign as the supplied argument ``val``. + + + +**PORTABILITY:** + + *modf* is ANSI C. *modff* is an extension. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_nan.rst b/posix-users/newlib/libm/common/s_nan.rst new file mode 100644 index 0000000..f447939 --- /dev/null +++ b/posix-users/newlib/libm/common/s_nan.rst @@ -0,0 +1,36 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_nan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. nan, nanf: + +nan, nanf - Representation of ``not a number`` +----------------------------------------------------- +.. index:: nan +.. index:: nanf +.. index:: representation of ``Not a Number`` + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double nan(const char *unused); + float nanf(const char *unused); + + + + +**DESCRIPTION:** + + *nan* and *nanf* return an IEEE NaN (Not a Number) in + double- and single-precision arithmetic respectively. The + argument is currently disregarded. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_nearbyint.rst b/posix-users/newlib/libm/common/s_nearbyint.rst new file mode 100644 index 0000000..b39e67d --- /dev/null +++ b/posix-users/newlib/libm/common/s_nearbyint.rst @@ -0,0 +1,60 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_nearbyint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. nearbyint, nearbyintf: + +nearbyint, nearbyintf - Round to integer +--------------------------------------------- +.. index:: nearbyint +.. index:: nearbyintf +.. index:: round to integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double nearbyint(double x); + float nearbyintf(float x); + + + +**DESCRIPTION:** + +The *nearbyint* functions round their argument to an integer value in +floating-point format, using the current rounding direction and +(supposedly) without raising the "inexact" floating-point exception. +See the *rint* functions for the same function with the "inexact" +floating-point exception being raised when appropriate. + + + +**BUGS:** + +Newlib does not support the floating-point exception model, so that +the floating-point exception control is not present and thereby what may +be seen will be compiler and hardware dependent in this regard. +The Newlib *nearbyint* functions are identical to the *rint* +functions with respect to the floating-point exception behavior, and +will cause the "inexact" exception to be raised for most targets. + + + +**STATUS CODES:** + +``x`` rounded to an integral value, using the current rounding direction. + + + +**PORTABILITY:** + +ANSI C, POSIX + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_nextafter.rst b/posix-users/newlib/libm/common/s_nextafter.rst new file mode 100644 index 0000000..8344e76 --- /dev/null +++ b/posix-users/newlib/libm/common/s_nextafter.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_nextafter.c + +.. COMMENT: Generated on: 2018-08-20 + +.. nextafter, nextafterf: + +nextafter, nextafterf - Get next number +---------------------------------------------------- +.. index:: nextafter +.. index:: nextafterf +.. index:: get next number + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double nextafter(double val, double dir); + float nextafterf(float val, float dir); + + + +**DESCRIPTION:** + +*nextafter* returns the double-precision floating-point number +closest to ``val`` in the direction toward ``dir``. *nextafterf* +performs the same operation in single precision. For example, +*nextafter(0.0,1.0)* returns the smallest positive number which is +representable in double precision. + + + +**STATUS CODES:** + +Returns the next closest number to ``val`` in the direction toward +``dir``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_pow10.rst b/posix-users/newlib/libm/common/s_pow10.rst new file mode 100644 index 0000000..6c4909e --- /dev/null +++ b/posix-users/newlib/libm/common/s_pow10.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_pow10.c + +.. COMMENT: Generated on: 2018-08-20 + +.. pow10, pow10f: + +pow10, pow10f - Base 10 power functions +--------------------------------------------- +.. index:: pow10 +.. index:: pow10f +.. index:: base 10 power functions + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double pow10(double x); + float pow10f(float x); + + + +**DESCRIPTION:** + + *pow10* and *pow10f* calculate 10 ^ ``x``, that is, + @ifnottex + 10 raised to the power ``x``. + @end ifnottex + @tex + $10^x$ + @end tex + + You can use the (non-ANSI) function *matherr* to specify + error handling for these functions. + + + +**STATUS CODES:** + + On success, *pow10* and *pow10f* return the calculated value. + If the result underflows, the returned value is *0*. If the + result overflows, the returned value is *HUGE_VAL*. In + either case, *errno* is set to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_remquo.rst b/posix-users/newlib/libm/common/s_remquo.rst new file mode 100644 index 0000000..2bc9050 --- /dev/null +++ b/posix-users/newlib/libm/common/s_remquo.rst @@ -0,0 +1,64 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_remquo.c + +.. COMMENT: Generated on: 2018-08-20 + +.. remquo, remquof: + +remquo, remquof - Remainder and part of quotient +----------------------------------------------------- +.. index:: remquo +.. index:: remquof +.. index:: remainder and part of quotient + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double remquo(double x, double y, int *quo); + float remquof(float x, float y, int *quo); + + + +**DESCRIPTION:** + +The *remquo* functions compute the same remainder as the *remainder* +functions; this value is in the range -``y``/2 ... +``y``/2. In the object +pointed to by *quo* they store a value whose sign is the sign of *x*/*y* +and whose magnitude is congruent modulo 2**n to the magnitude of the integral +quotient of *x*/*y*. (That is, *quo* is given the n lsbs of the +quotient, not counting the sign.) This implementation uses n=31 if int is 32 +bits or more, otherwise, n is 1 less than the width of int. + +For example: +. remquo(-29.0, 3.0, &``quo``) +returns -1.0 and sets ``quo``=10, and +. remquo(-98307.0, 3.0, &``quo``) +returns -0.0 and sets ``quo``=-32769, although for 16-bit int, ``quo``=-1. In +the latter case, the actual quotient of -(32769=0x8001) is reduced to -1 +because of the 15-bit limitation for the quotient. + + + +**STATUS CODES:** + +When either argument is NaN, NaN is returned. If ``y`` is 0 or ``x`` is +infinite (and neither is NaN), a domain error occurs (i.e. the "invalid" +floating point exception is raised or errno is set to EDOM), and NaN is +returned. +Otherwise, the *remquo* functions return ``x`` REM ``y``. + + + +**BUGS:** + +IEEE754-2008 calls for *remquo*(subnormal, inf) to cause the "underflow" +floating-point exception. This implementation does not. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_rint.rst b/posix-users/newlib/libm/common/s_rint.rst new file mode 100644 index 0000000..79b8ee6 --- /dev/null +++ b/posix-users/newlib/libm/common/s_rint.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_rint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rint, rintf: + +rint, rintf - Round to integer +----------------------------------- +.. index:: rint +.. index:: rintf +.. index:: round to integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double rint(double x); + float rintf(float x); + + + +**DESCRIPTION:** + + The *rint* functions round their argument to an integer value in + floating-point format, using the current rounding direction. They + raise the "inexact" floating-point exception if the result differs + in value from the argument. See the *nearbyint* functions for the + same function with the "inexact" floating-point exception never being + raised. Newlib does not directly support floating-point exceptions. + The *rint* functions are written so that the "inexact" exception is + raised in hardware implementations that support it, even though Newlib + does not provide access. + + + +**STATUS CODES:** + +``x`` rounded to an integral value, using the current rounding direction. + + + +**PORTABILITY:** + +ANSI C, POSIX + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_round.rst b/posix-users/newlib/libm/common/s_round.rst new file mode 100644 index 0000000..9f34edf --- /dev/null +++ b/posix-users/newlib/libm/common/s_round.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_round.c + +.. COMMENT: Generated on: 2018-08-20 + +.. round, roundf: + +round, roundf - Round to integer, to nearest +------------------------------------------------- +.. index:: round +.. index:: roundf +.. index:: round to integer, to nearest + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double round(double x); + float roundf(float x); + + + +**DESCRIPTION:** + + The *round* functions round their argument to the nearest integer + value in floating-point format, rounding halfway cases away from zero, + regardless of the current rounding direction. (While the "inexact" + floating-point exception behavior is unspecified by the C standard, the + *round* functions are written so that "inexact" is not raised if the + result does not equal the argument, which behavior is as recommended by + IEEE 754 for its related functions.) + + + +**STATUS CODES:** + +``x`` rounded to an integral value. + + + +**PORTABILITY:** + +ANSI C, POSIX + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_scalbn.rst b/posix-users/newlib/libm/common/s_scalbn.rst new file mode 100644 index 0000000..1a373dc --- /dev/null +++ b/posix-users/newlib/libm/common/s_scalbn.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_scalbn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. scalbn, scalbnf, scalbln, scalblnf: + +scalbn, scalbnf, scalbln, scalblnf - Scale by power of flt_radix (=2) +------------------------------------------------------------------------------ +.. index:: scalbn +.. index:: scalbnf +.. index:: scalbln +.. index:: scalblnf +.. index:: scale by power of FLT_RADIX (=2) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double scalbn(double x, int n); + float scalbnf(float x, int n); + double scalbln(double x, long int n); + float scalblnf(float x, long int n); + + + +**DESCRIPTION:** + +The *scalbn* and *scalbln* functions compute + @ifnottex + ``x`` times FLT_RADIX to the power ``n``. + @end ifnottex + @tex + $x \cdot FLT\_RADIX^n$. + @end tex +efficiently. The result is computed by manipulating the exponent, rather than +by actually performing an exponentiation or multiplication. In this +floating-point implementation FLT_RADIX=2, which makes the *scalbn* +functions equivalent to the *ldexp* functions. + + + +**STATUS CODES:** + +``x`` times 2 to the power ``n``. A range error may occur. + + + +**PORTABILITY:** + +ANSI C, POSIX + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_signbit.rst b/posix-users/newlib/libm/common/s_signbit.rst new file mode 100644 index 0000000..21ae630 --- /dev/null +++ b/posix-users/newlib/libm/common/s_signbit.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_signbit.c + +.. COMMENT: Generated on: 2018-08-20 + +.. signbit: + +signbit - Does floating-point number have negative sign? +------------------------------------------------------------ +.. index:: signbit +.. index:: Does floating-point number have negative sign? + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + int signbit(real-floating x); + + + +**DESCRIPTION:** + +The *signbit* macro determines whether the sign of its argument value is +negative. The macro reports the sign of all values, including infinities, +zeros, and NaNs. If zero is unsigned, it is treated as positive. As shown in +the synopsis, the argument is "real-floating," meaning that any of the real +floating-point types (float, double, etc.) may be given to it. + +Note that because of the possibilities of signed 0 and NaNs, the expression +"``x`` < 0.0" does not give the same result as *signbit* in all cases. + + + +**STATUS CODES:** + +The *signbit* macro returns a nonzero value if and only if the sign of its +argument value is negative. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/common/s_trunc.rst b/posix-users/newlib/libm/common/s_trunc.rst new file mode 100644 index 0000000..bfead75 --- /dev/null +++ b/posix-users/newlib/libm/common/s_trunc.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/common/s_trunc.c + +.. COMMENT: Generated on: 2018-08-20 + +.. trunc, truncf: + +trunc, truncf - Round to integer, towards zero +--------------------------------------------------- +.. index:: trunc +.. index:: truncf +.. index:: round to integer, towards zero + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double trunc(double x); + float truncf(float x); + + + +**DESCRIPTION:** + + The *trunc* functions round their argument to the integer value, in + floating format, nearest to but no larger in magnitude than the + argument, regardless of the current rounding direction. (While the + "inexact" floating-point exception behavior is unspecified by the C + standard, the *trunc* functions are written so that "inexact" is not + raised if the result does not equal the argument, which behavior is as + recommended by IEEE 754 for its related functions.) + + + +**STATUS CODES:** + +``x`` truncated to an integral value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cabs.rst b/posix-users/newlib/libm/complex/cabs.rst new file mode 100644 index 0000000..c5ada29 --- /dev/null +++ b/posix-users/newlib/libm/complex/cabs.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cabs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cabs, cabsf, cabsl: + +cabs, cabsf, cabsl - Complex absolute-value +----------------------------------------------------------- +.. index:: cabs +.. index:: cabsf +.. index:: cabsl +.. index:: complex absolute-value + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double cabs(double complex z); + float cabsf(float complex z); + long double cabsl(long double complex z); + + + + +**DESCRIPTION:** + + These functions compute compute the complex absolute value + (also called norm, modulus, or magnitude) of ``z``. + + *cabsf* is identical to *cabs*, except that it performs + its calculations on *float complex*. + + *cabsl* is identical to *cabs*, except that it performs + its calculations on *long double complex*. + + + +**STATUS CODES:** + + The cabs* functions return the complex absolute value. + + + +**PORTABILITY:** + + *cabs*, *cabsf* and *cabsl* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cacos.rst b/posix-users/newlib/libm/complex/cacos.rst new file mode 100644 index 0000000..2612ec6 --- /dev/null +++ b/posix-users/newlib/libm/complex/cacos.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cacos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cacos, cacosf: + +cacos, cacosf - Complex arc cosine +------------------------------------------------ +.. index:: cacos +.. index:: cacosf +.. index:: complex arc cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex cacos(double complex z); + float complex cacosf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex arc cosine of ``z``, + with branch cuts outside the interval [-1, +1] along the real axis. + + *cacosf* is identical to *cacos*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc cosine value, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [0, pi] along the real axis. + @end ifnottex + @tex + These functions return the complex arc cosine value, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [*0*, $\pi$] along the real axis. + @end tex + + + +**PORTABILITY:** + + *cacos* and *cacosf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cacosh.rst b/posix-users/newlib/libm/complex/cacosh.rst new file mode 100644 index 0000000..54e3264 --- /dev/null +++ b/posix-users/newlib/libm/complex/cacosh.rst @@ -0,0 +1,61 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cacosh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cacosh, cacoshf: + +cacosh, cacoshf - Complex arc hyperbolic cosine +------------------------------------------------------------- +.. index:: cacosh +.. index:: cacoshf +.. index:: complex arc hyperbolic cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex cacosh(double complex z); + float complex cacoshf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex arc hyperbolic cosine of ``z``, + with a branch cut at values less than 1 along the real axis. + + *cacoshf* is identical to *cacosh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc hyperbolic cosine value, + in the range of a half-strip of non-negative values along the + real axis and in the interval [-i * pi, +i * pi] along the + imaginary axis. + @end ifnottex + @tex + These functions return the complex arc hyperbolic cosine value, + in the range of a half-strip of non-negative values along the + real axis and in the interval [$-i\pi$, $+i\pi$] along the + imaginary axis. + @end tex + + + +**PORTABILITY:** + + *cacosh* and *cacoshf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/carg.rst b/posix-users/newlib/libm/complex/carg.rst new file mode 100644 index 0000000..dde31d1 --- /dev/null +++ b/posix-users/newlib/libm/complex/carg.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/carg.c + +.. COMMENT: Generated on: 2018-08-20 + +.. carg, cargf: + +carg, cargf - Argument (phase angle) +-------------------------------------------------- +.. index:: carg +.. index:: cargf +.. index:: argument (phase angle) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double carg(double complex z); + float cargf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the argument (also called phase angle) + of ``z``, with a branch cut along the negative real axis. + + *cargf* is identical to *carg*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + The carg functions return the value of the argument in the + interval [-pi, +pi] + @end ifnottex + @tex + The carg functions return the value of the argument in the + interval [$-\pi$, $+\pi$] + @end tex + + + +**PORTABILITY:** + + *carg* and *cargf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/casin.rst b/posix-users/newlib/libm/complex/casin.rst new file mode 100644 index 0000000..1ff4295 --- /dev/null +++ b/posix-users/newlib/libm/complex/casin.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/casin.c + +.. COMMENT: Generated on: 2018-08-20 + +.. casin, casinf: + +casin, casinf - Complex arc sine +---------------------------------------------- +.. index:: casin +.. index:: casinf +.. index:: complex arc sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex casin(double complex z); + float complex casinf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex arc sine of ``z``, + with branch cuts outside the interval [-1, +1] along the real axis. + + *casinf* is identical to *casin*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc sine value, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [-pi/2, +pi/2] along the real axis. + @end ifnottex + @tex + These functions return the complex arc sine value, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [$-\pi/2$, $+\pi/2$] along the real axis. + @end tex + + + +**PORTABILITY:** + + *casin* and *casinf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/casinh.rst b/posix-users/newlib/libm/complex/casinh.rst new file mode 100644 index 0000000..db6e57d --- /dev/null +++ b/posix-users/newlib/libm/complex/casinh.rst @@ -0,0 +1,69 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/casinh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. casinh, casinhf: + +casinh, casinhf - Complex arc hyperbolic sine +----------------------------------------------------------- +.. index:: casinh +.. index:: casinhf +.. index:: complex arc hyperbolic sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex casinh(double complex z); + float complex casinhf(float complex z); + + + + +**DESCRIPTION:** + + @ifnottex + These functions compute the complex arc hyperbolic sine of ``z``, + with branch cuts outside the interval [-i, +i] along the + imaginary axis. + @end ifnottex + @tex + These functions compute the complex arc hyperbolic sine of ``z``, + with branch cuts outside the interval [$-i$, $+i$] along the + imaginary axis. + @end tex + + *casinhf* is identical to *casinh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc hyperbolic sine value, + in the range of a strip mathematically unbounded along the + real axis and in the interval [-i*p/2, +i*p/2] along the + imaginary axis. + @end ifnottex + @tex + These functions return the complex arc hyperbolic sine value, + in the range of a strip mathematically unbounded along the + real axis and in the interval [$-i\pi/2$, $+i\pi/2$] along the + imaginary axis. + @end tex + + + +**PORTABILITY:** + + *casinh* and *casinhf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/catan.rst b/posix-users/newlib/libm/complex/catan.rst new file mode 100644 index 0000000..712a6a3 --- /dev/null +++ b/posix-users/newlib/libm/complex/catan.rst @@ -0,0 +1,67 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/catan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. catan, catanf: + +catan, catanf - Complex arc tangent +------------------------------------------------- +.. index:: catan +.. index:: catanf +.. index:: complex arc tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex catan(double complex z); + float complex catanf(float complex z); + + + + +**DESCRIPTION:** + + @ifnottex + These functions compute the complex arc tangent of ``z``, + with branch cuts outside the interval [-i, +i] along the + imaginary axis. + @end ifnottex + @tex + These functions compute the complex arc tangent of ``z``, + with branch cuts outside the interval [$-i$, $+i$] along the + imaginary axis. + @end tex + + *catanf* is identical to *catan*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc tangent value, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [-pi/2, +pi/2] along the real axis. + @end ifnottex + @tex + These functions return the complex arc tangent, in the range + of a strip mathematically unbounded along the imaginary axis + and in the interval [$-\pi/2$, $+\pi/2$] along the real axis. + @end tex + + + +**PORTABILITY:** + + *catan* and *catanf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/catanh.rst b/posix-users/newlib/libm/complex/catanh.rst new file mode 100644 index 0000000..f6351d5 --- /dev/null +++ b/posix-users/newlib/libm/complex/catanh.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/catanh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. catanh, catanhf: + +catanh, catanhf - Complex arc hyperbolic tangent +-------------------------------------------------------------- +.. index:: catanh +.. index:: catanhf +.. index:: complex arc hyperbolic tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex catanh(double complex z); + float complex catanhf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex arc hyperbolic tan of ``z``, + with branch cuts outside the interval [-1, +1] along the + real axis. + + *catanhf* is identical to *catanh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + These functions return the complex arc hyperbolic tangent value, + in the range of a strip mathematically unbounded along the + real axis and in the interval [-i*p/2, +i*p/2] along the + imaginary axis. + @end ifnottex + @tex + These functions return the complex arc hyperbolic tangent value, + in the range of a strip mathematically unbounded along the + real axis and in the interval [$-i\pi/2$, $+i\pi/2$] along the + imaginary axis. + @end tex + + + +**PORTABILITY:** + + *catanh* and *catanhf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/ccos.rst b/posix-users/newlib/libm/complex/ccos.rst new file mode 100644 index 0000000..e4aebff --- /dev/null +++ b/posix-users/newlib/libm/complex/ccos.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/ccos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ccos, ccosf: + +ccos, ccosf - Complex cosine +------------------------------------------ +.. index:: ccos +.. index:: ccosf +.. index:: complex cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex ccos(double complex z); + float complex ccosf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex cosine of ``z``. + + *ccosf* is identical to *ccos*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex cosine value. + + + +**PORTABILITY:** + + *ccos* and *ccosf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/ccosh.rst b/posix-users/newlib/libm/complex/ccosh.rst new file mode 100644 index 0000000..739cd58 --- /dev/null +++ b/posix-users/newlib/libm/complex/ccosh.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/ccosh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ccosh, ccoshf: + +ccosh, ccoshf - Complex hyperbolic cosine +------------------------------------------------------- +.. index:: ccosh +.. index:: ccoshf +.. index:: complex hyperbolic cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex ccosh(double complex z); + float complex ccoshf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex hyperbolic cosine of ``z``. + + *ccoshf* is identical to *ccosh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex hyperbolic cosine value. + + + +**PORTABILITY:** + + *ccosh* and *ccoshf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cexp.rst b/posix-users/newlib/libm/complex/cexp.rst new file mode 100644 index 0000000..76890f8 --- /dev/null +++ b/posix-users/newlib/libm/complex/cexp.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cexp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cexp, cexpf: + +cexp, cexpf - Complex base-e exponential +------------------------------------------------------ +.. index:: cexp +.. index:: cexpf +.. index:: complex base-e exponential + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex cexp(double complex z); + float complex cexpf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex base-``e`` exponential of ``z``. + + *cexpf* is identical to *cexp*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The cexp functions return the complex base-``e`` exponential value. + + + +**PORTABILITY:** + + *cexp* and *cexpf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cimag.rst b/posix-users/newlib/libm/complex/cimag.rst new file mode 100644 index 0000000..adb3ead --- /dev/null +++ b/posix-users/newlib/libm/complex/cimag.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cimag.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cimag, cimagf, cimagl: + +cimag, cimagf, cimagl - Imaginary part +------------------------------------------------------ +.. index:: cimag +.. index:: cimagf +.. index:: cimagl +.. index:: imaginary part + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double cimag(double complex z); + float cimagf(float complex z); + long double cimagl(long double complex z); + + + + +**DESCRIPTION:** + + These functions compute the imaginary part of ``z``. + + *cimagf* is identical to *cimag*, except that it performs + its calculations on *float complex*. + + *cimagl* is identical to *cimag*, except that it performs + its calculations on *long double complex*. + + + +**STATUS CODES:** + + The cimag* functions return the imaginary part value (as a real). + + + +**PORTABILITY:** + + *cimag*, *cimagf* and *cimagl* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/clog.rst b/posix-users/newlib/libm/complex/clog.rst new file mode 100644 index 0000000..9808731 --- /dev/null +++ b/posix-users/newlib/libm/complex/clog.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/clog.c + +.. COMMENT: Generated on: 2018-08-20 + +.. clog, clogf: + +clog, clogf - Complex base-e logarithm +---------------------------------------------------- +.. index:: clog +.. index:: clogf +.. index:: complex base-e logarithm + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex clog(double complex z); + float complex clogf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex natural (base-``e``) logarithm + of ``z``, with a branch cut along the negative real axis. + + *clogf* is identical to *clog*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + @ifnottex + The clog functions return the complex natural logarithm value, in + the range of a strip mathematically unbounded along the real axis + and in the interval [-i*pi , +i*pi] along the imaginary axis. + @end ifnottex + @tex + The clog functions return the complex natural logarithm value, in + the range of a strip mathematically unbounded along the real axis + and in the interval [$-i\pi$, $+i\pi$] along the imaginary axis. + @end tex + + + +**PORTABILITY:** + + *clog* and *clogf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/clog10.rst b/posix-users/newlib/libm/complex/clog10.rst new file mode 100644 index 0000000..0187952 --- /dev/null +++ b/posix-users/newlib/libm/complex/clog10.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/clog10.c + +.. COMMENT: Generated on: 2018-08-20 + +.. clog10, clog10f: + +clog10, clog10f - Complex base-10 logarithm +--------------------------------------------------------- +.. index:: clog10 +.. index:: clog10f +.. index:: complex base-10 logarithm + +**CALLING SEQUENCE:** + +.. code-block:: c + + #define _GNU_SOURCE + #include <complex.h> + double complex clog10(double complex z); + float complex clog10f(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex base-10 logarithm of ``z``. + *clog10* is equivalent to *clog*(``z``)/*log*(10). + + *clog10f* is identical to *clog10*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The clog10 functions return the complex base-10 logarithm value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/conj.rst b/posix-users/newlib/libm/complex/conj.rst new file mode 100644 index 0000000..e8d4364 --- /dev/null +++ b/posix-users/newlib/libm/complex/conj.rst @@ -0,0 +1,50 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/conj.c + +.. COMMENT: Generated on: 2018-08-20 + +.. conj, conjf: + +conj, conjf - Complex conjugate +--------------------------------------------- +.. index:: conj +.. index:: conjf +.. index:: complex conjugate + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex conj(double complex z); + float complex conjf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex conjugate of ``z``, + by reversing the sign of its imaginary part. + + *conjf* is identical to *conj*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The conj functions return the complex conjugate value. + + + +**PORTABILITY:** + + *conj* and *conjf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cpow.rst b/posix-users/newlib/libm/complex/cpow.rst new file mode 100644 index 0000000..f0d3568 --- /dev/null +++ b/posix-users/newlib/libm/complex/cpow.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cpow.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cpow, cpowf: + +cpow, cpowf - Complex power +----------------------------------------- +.. index:: cpow +.. index:: cpowf +.. index:: complex power + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex cpow(double complex x, double complex y); + float complex cpowf(float complex x, float complex y); + + + + +**DESCRIPTION:** + + @ifnottex + The cpow functions compute the complex power function x^y + power, with a branch cut for the first parameter along the + negative real axis. + @end ifnottex + @tex + The cpow functions compute the complex power function $x^y$ + power, with a branch cut for the first parameter along the + negative real axis. + @end tex + + *cpowf* is identical to *cpow*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The cpow functions return the complex power function value. + + + +**PORTABILITY:** + + *cpow* and *cpowf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/cproj.rst b/posix-users/newlib/libm/complex/cproj.rst new file mode 100644 index 0000000..9522487 --- /dev/null +++ b/posix-users/newlib/libm/complex/cproj.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/cproj.c + +.. COMMENT: Generated on: 2018-08-20 + +.. cproj, cprojf: + +cproj, cprojf - riemann sphere projection +--------------------------------------------------------- +.. index:: cproj +.. index:: cprojf +.. index:: Riemann sphere projection + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex cproj(double complex z); + float complex cprojf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute a projection of ``z`` onto the Riemann + sphere: ``z`` projects to ``z`` except that all complex infinities + (even those with one infinite part and one NaN part) project + to positive infinity on the real axis. If ``z`` has an infinite part, + then *cproj*(``z``) is equivalent to + + INFINITY + I * copysign(0.0, cimag(z)) + + *cprojf* is identical to *cproj*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The cproj functions return the value of the projection onto + the Riemann sphere. + + + +**PORTABILITY:** + + *cproj* and *cprojf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/creal.rst b/posix-users/newlib/libm/complex/creal.rst new file mode 100644 index 0000000..0c36b75 --- /dev/null +++ b/posix-users/newlib/libm/complex/creal.rst @@ -0,0 +1,54 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/creal.c + +.. COMMENT: Generated on: 2018-08-20 + +.. creal, crealf, creall: + +creal, crealf, creall - Real part +------------------------------------------------- +.. index:: creal +.. index:: crealf +.. index:: creall +.. index:: real part + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double creal(double complex z); + float crealf(float complex z); + double long creall(long double complex z); + + + + +**DESCRIPTION:** + + These functions compute the real part of ``z``. + + *crealf* is identical to *creal*, except that it performs + its calculations on *float complex*. + + *creall* is identical to *creal*, except that it performs + its calculations on *long double complex*. + + + +**STATUS CODES:** + + The creal* functions return the real part value. + + + +**PORTABILITY:** + + *creal*, *crealf* and *creall* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/csin.rst b/posix-users/newlib/libm/complex/csin.rst new file mode 100644 index 0000000..2513126 --- /dev/null +++ b/posix-users/newlib/libm/complex/csin.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/csin.c + +.. COMMENT: Generated on: 2018-08-20 + +.. csin, csinf: + +csin, csinf - Complex sine +---------------------------------------- +.. index:: csin +.. index:: csinf +.. index:: complex sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex csin(double complex z); + float complex csinf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex sine of ``z``. + + *csinf* is identical to *csin*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex sine value. + + + +**PORTABILITY:** + + *csin* and *csinf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/csinh.rst b/posix-users/newlib/libm/complex/csinh.rst new file mode 100644 index 0000000..9b01be6 --- /dev/null +++ b/posix-users/newlib/libm/complex/csinh.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/csinh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. csinh, csinhf: + +csinh, csinhf - Complex hyperbolic sine +----------------------------------------------------- +.. index:: csinh +.. index:: csinhf +.. index:: complex hyperbolic sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex csinh(double complex z); + float complex csinhf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex hyperbolic sine of ``z``. + + *ccoshf* is identical to *ccosh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex hyperbolic sine value. + + + +**PORTABILITY:** + + *csinh* and *csinhf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/csqrt.rst b/posix-users/newlib/libm/complex/csqrt.rst new file mode 100644 index 0000000..42dd996 --- /dev/null +++ b/posix-users/newlib/libm/complex/csqrt.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/csqrt.c + +.. COMMENT: Generated on: 2018-08-20 + +.. csqrt, csqrtf: + +csqrt, csqrtf - Complex square root +------------------------------------------------- +.. index:: csqrt +.. index:: csqrtf +.. index:: complex square root + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex csqrt(double complex z); + float complex csqrtf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex square root of ``z``, with + a branch cut along the negative real axis. + + *csqrtf* is identical to *csqrt*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + The csqrt functions return the complex square root value, in + the range of the right halfplane (including the imaginary axis). + + + +**PORTABILITY:** + + *csqrt* and *csqrtf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/ctan.rst b/posix-users/newlib/libm/complex/ctan.rst new file mode 100644 index 0000000..aa07ecb --- /dev/null +++ b/posix-users/newlib/libm/complex/ctan.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/ctan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ctan, ctanf: + +ctan, ctanf - Complex tangent +------------------------------------------- +.. index:: ctan +.. index:: ctanf +.. index:: complex tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex ctan(double complex z); + float complex ctanf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex tangent of ``z``. + + *ctanf* is identical to *ctan*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex tangent value. + + + +**PORTABILITY:** + + *ctan* and *ctanf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/complex/ctanh.rst b/posix-users/newlib/libm/complex/ctanh.rst new file mode 100644 index 0000000..ea3eaaa --- /dev/null +++ b/posix-users/newlib/libm/complex/ctanh.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/complex/ctanh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ctanh, ctanf: + +ctanh, ctanf - Complex hyperbolic tangent +------------------------------------------------------- +.. index:: ctanh +.. index:: ctanf +.. index:: complex hyperbolic tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <complex.h> + double complex ctanh(double complex z); + float complex ctanhf(float complex z); + + + + +**DESCRIPTION:** + + These functions compute the complex hyperbolic tangent of ``z``. + + *ctanhf* is identical to *ctanh*, except that it performs + its calculations on *floats complex*. + + + +**STATUS CODES:** + + These functions return the complex hyperbolic tangent value. + + + +**PORTABILITY:** + + *ctanh* and *ctanhf* are ISO C99 + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/machine/i386/f_llrint.rst b/posix-users/newlib/libm/machine/i386/f_llrint.rst new file mode 100644 index 0000000..798e0f5 --- /dev/null +++ b/posix-users/newlib/libm/machine/i386/f_llrint.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/machine/i386/f_llrint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. llrint, llrintf, llrintl: + +llrint, llrintf, llrintl - Round and convert to long long integer +------------------------------------------------------------------------ +.. index:: llrint +.. index:: llrintf +.. index:: llrintl +.. index:: round and convert to long long integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + long long int llrint(double x); + long long int llrintf(float x); + long long int llrintl(long double x); + + + +**DESCRIPTION:** + +The *llrint*, *llrintf* and *llrintl* functions round ``x`` to the nearest integer value, +according to the current rounding direction. If the rounded value is outside the +range of the return type, the numeric result is unspecified. A range error may +occur if the magnitude of ``x`` is too large. + + + +**STATUS CODES:** + +These functions return the rounded integer value of ``x``. +*llrint*, *llrintf* and *llrintl* return the result as a long long integer. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/machine/i386/f_lrint.rst b/posix-users/newlib/libm/machine/i386/f_lrint.rst new file mode 100644 index 0000000..6284379 --- /dev/null +++ b/posix-users/newlib/libm/machine/i386/f_lrint.rst @@ -0,0 +1,45 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/machine/i386/f_lrint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. lrint, lrintf, lrintl: + +lrint, lrintf, lrintl - Round and convert to long integer +---------------------------------------------------------------- +.. index:: lrint +.. index:: lrintf +.. index:: lrintl +.. index:: round and convert to long integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + long int lrint(double x); + long int lrintf(float x); + long int lrintl(long double x); + + + +**DESCRIPTION:** + +The *lrint*, *lrintf* and *lrintl* functions round ``x`` to the nearest integer value, +according to the current rounding direction. If the rounded value is outside the +range of the return type, the numeric result is unspecified. A range error may +occur if the magnitude of ``x`` is too large. + + + +**STATUS CODES:** + +These functions return the rounded integer value of ``x``. +*lrint*, *lrintf* and *lrintl* return the result as a long integer. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/machine/i386/f_rint.rst b/posix-users/newlib/libm/machine/i386/f_rint.rst new file mode 100644 index 0000000..8ea5bb9 --- /dev/null +++ b/posix-users/newlib/libm/machine/i386/f_rint.rst @@ -0,0 +1,43 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/machine/i386/f_rint.c + +.. COMMENT: Generated on: 2018-08-20 + +.. rint, rintf, rintl: + +rint, rintf, rintl - Round to integer +-------------------------------------------- +.. index:: rint +.. index:: rintf +.. index:: rintl +.. index:: round to integer + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double rint(double x); + float rintf(float x); + long double rintl(long double x); + + + +**DESCRIPTION:** + +The *rint*, *rintf* and *rintl* functions round ``x`` to an integer value +in floating-point format, using the current rounding direction. They may +raise the inexact exception if the result differs in value from the argument. + + + +**STATUS CODES:** + +These functions return the rounded integer value of ``x``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_asinh.rst b/posix-users/newlib/libm/math/s_asinh.rst new file mode 100644 index 0000000..a65557b --- /dev/null +++ b/posix-users/newlib/libm/math/s_asinh.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_asinh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. asinh, asinhf: + +asinh, asinhf - Inverse hyperbolic sine +----------------------------------------------- +.. index:: asinh +.. index:: asinhf +.. index:: inverse hyperbolic sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double asinh(double x); + float asinhf(float x); + + + +**DESCRIPTION:** + +*asinh* calculates the inverse hyperbolic sine of ``x``. +*asinh* is defined as +@ifnottex +. sgn(``x``) * log(abs(``x``) + sqrt(1+``x``*``x``)) +@end ifnottex +@tex +$$sign(x) \times ln\Bigl(|x| + \sqrt{1+x^2}\Bigr)$$ +@end tex + +*asinhf* is identical, other than taking and returning floats. + + + +**STATUS CODES:** + +*asinh* and *asinhf* return the calculated value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_atan.rst b/posix-users/newlib/libm/math/s_atan.rst new file mode 100644 index 0000000..a7cfa77 --- /dev/null +++ b/posix-users/newlib/libm/math/s_atan.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_atan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atan, atanf: + +atan, atanf - Arc tangent +--------------------------------------- +.. index:: atan +.. index:: atanf +.. index:: arc tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atan(double x); + float atanf(float x); + + + +**DESCRIPTION:** + + +*atan* computes the inverse tangent (arc tangent) of the input value. + +*atanf* is identical to *atan*, save that it operates on *floats*. + + + +**STATUS CODES:** + +@ifnottex +*atan* returns a value in radians, in the range of -pi/2 to pi/2. +@end ifnottex +@tex +*atan* returns a value in radians, in the range of $-\pi/2$ to $\pi/2$. +@end tex + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_erf.rst b/posix-users/newlib/libm/math/s_erf.rst new file mode 100644 index 0000000..124e5a3 --- /dev/null +++ b/posix-users/newlib/libm/math/s_erf.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_erf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. erf, erff, erfc, erfcf: + +erf, erff, erfc, erfcf - Error function +--------------------------------------------------------- +.. index:: erf +.. index:: erff +.. index:: erfc +.. index:: erfcf +.. index:: error function + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double erf(double x); + float erff(float x); + double erfc(double x); + float erfcf(float x); + + + +**DESCRIPTION:** + + *erf* calculates an approximation to the ``error function``, + which estimates the probability that an observation will fall within + ``x`` standard deviations of the mean (assuming a normal + distribution). + @tex + The error function is defined as + $${2\over\sqrt\pi}\times\int_0^x e^{-t^2}dt$$ + @end tex + + *erfc* calculates the complementary probability; that is, + *erfc(``x``)* is *1 - erf(``x``)*. *erfc* is computed directly, + so that you can use it to avoid the loss of precision that would + result from subtracting large probabilities (on large ``x``) from 1. + + *erff* and *erfcf* differ from *erf* and *erfc* only in the + argument and result types. + + + +**STATUS CODES:** + + For positive arguments, *erf* and all its variants return a + probability---a number between 0 and 1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_fabs.rst b/posix-users/newlib/libm/math/s_fabs.rst new file mode 100644 index 0000000..29d9a81 --- /dev/null +++ b/posix-users/newlib/libm/math/s_fabs.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_fabs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fabs, fabsf: + +fabs, fabsf - Absolute value (magnitude) +---------------------------------------------------- +.. index:: fabs +.. index:: fabsf +.. index:: absolute value (magnitude) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fabs(double x); + float fabsf(float x); + + + +**DESCRIPTION:** + +*fabs* and *fabsf* calculate +@tex +$|x|$, +@end tex +the absolute value (magnitude) of the argument ``x``, by direct +manipulation of the bit representation of ``x``. + + + +**STATUS CODES:** + +The calculated value is returned. No errors are detected. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_floor.rst b/posix-users/newlib/libm/math/s_floor.rst new file mode 100644 index 0000000..e7c7320 --- /dev/null +++ b/posix-users/newlib/libm/math/s_floor.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_floor.c + +.. COMMENT: Generated on: 2018-08-20 + +.. floor, floorf, ceil, ceilf: + +floor, floorf, ceil, ceilf - Floor and ceiling +------------------------------------------------------- +.. index:: floor +.. index:: floorf +.. index:: ceil +.. index:: ceilf +.. index:: floor and ceiling + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double floor(double x); + float floorf(float x); + double ceil(double x); + float ceilf(float x); + + + +**DESCRIPTION:** + +*floor* and *floorf* find +@tex +$\lfloor x \rfloor$, +@end tex +the nearest integer less than or equal to ``x``. +*ceil* and *ceilf* find +@tex +$\lceil x\rceil$, +@end tex +the nearest integer greater than or equal to ``x``. + + + +**STATUS CODES:** + +*floor* and *ceil* return the integer result as a double. +*floorf* and *ceilf* return the integer result as a float. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_frexp.rst b/posix-users/newlib/libm/math/s_frexp.rst new file mode 100644 index 0000000..26b9e9a --- /dev/null +++ b/posix-users/newlib/libm/math/s_frexp.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_frexp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. frexp, frexpf: + +frexp, frexpf - Split floating-point number +------------------------------------------------------- +.. index:: frexp +.. index:: frexpf +.. index:: split floating-point number + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double frexp(double val, int *exp); + float frexpf(float val, int *exp); + + + +**DESCRIPTION:** + + All nonzero, normal numbers can be described as ``m`` * 2**``p``. + *frexp* represents the double ``val`` as a mantissa ``m`` + and a power of two ``p``. The resulting mantissa will always + be greater than or equal to *0.5*, and less than *1.0* (as + long as ``val`` is nonzero). The power of two will be stored + in ***``exp``. + +@ifnottex +``m`` and ``p`` are calculated so that +``val`` is ``m`` times *2* to the power ``p``. +@end ifnottex +@tex +``m`` and ``p`` are calculated so that +$ val = m \times 2^p $. +@end tex + +*frexpf* is identical, other than taking and returning +floats rather than doubles. + + + +**STATUS CODES:** + +*frexp* returns the mantissa ``m``. If ``val`` is *0*, infinity, +or Nan, *frexp* will set ***``exp`` to *0* and return ``val``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_ldexp.rst b/posix-users/newlib/libm/math/s_ldexp.rst new file mode 100644 index 0000000..34ce5d9 --- /dev/null +++ b/posix-users/newlib/libm/math/s_ldexp.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_ldexp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ldexp, ldexpf: + +ldexp, ldexpf - Load exponent +------------------------------------------ +.. index:: ldexp +.. index:: ldexpf +.. index:: load exponent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double ldexp(double val, int exp); + float ldexpf(float val, int exp); + + + +**DESCRIPTION:** + +*ldexp* calculates the value +@ifnottex +``val`` times 2 to the power ``exp``. +@end ifnottex +@tex +$val\times 2^{exp}$. +@end tex +*ldexpf* is identical, save that it takes and returns *float* +rather than *double* values. + + + +**STATUS CODES:** + +*ldexp* returns the calculated value. + +Underflow and overflow both set *errno* to *ERANGE*. +On underflow, *ldexp* and *ldexpf* return 0.0. +On overflow, *ldexp* returns plus or minus *HUGE_VAL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/s_sin.rst b/posix-users/newlib/libm/math/s_sin.rst new file mode 100644 index 0000000..997f900 --- /dev/null +++ b/posix-users/newlib/libm/math/s_sin.rst @@ -0,0 +1,55 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/s_sin.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sin, sinf, cos, cosf: + +sin, sinf, cos, cosf - Sine or cosine +------------------------------------------------------ +.. index:: sin +.. index:: sinf +.. index:: cos +.. index:: cosf +.. index:: sine or cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sin(double x); + float sinf(float x); + double cos(double x); + float cosf(float x); + + + +**DESCRIPTION:** + + *sin* and *cos* compute (respectively) the sine and cosine + of the argument ``x``. Angles are specified in radians. + + *sinf* and *cosf* are identical, save that they take and + return *float* values. + + + + +**STATUS CODES:** + + The sine or cosine of ``x`` is returned. + + + +**PORTABILITY:** + + *sin* and *cos* are ANSI C. + *sinf* and *cosf* are extensions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_acos.rst b/posix-users/newlib/libm/math/w_acos.rst new file mode 100644 index 0000000..eb273ce --- /dev/null +++ b/posix-users/newlib/libm/math/w_acos.rst @@ -0,0 +1,56 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_acos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. acos, acosf: + +acos, acosf - Arc cosine +-------------------------------------- +.. index:: acos +.. index:: acosf +.. index:: arc cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double acos(double x); + float acosf(float x); + + + +**DESCRIPTION:** + + + *acos* computes the inverse cosine (arc cosine) of the input value. + Arguments to *acos* must be in the range @minus{}1 to 1. + + *acosf* is identical to *acos*, except that it performs + its calculations on *floats*. + + + +**STATUS CODES:** + + @ifnottex + *acos* and *acosf* return values in radians, in the range of 0 to pi. + @end ifnottex + @tex + *acos* and *acosf* return values in radians, in the range of *0* to $\pi$. + @end tex + + If ``x`` is not between @minus{}1 and 1, the returned value is NaN + (not a number) the global variable *errno* is set to *EDOM*, and a + *DOMAIN error* message is sent as standard error output. + + You can modify error handling for these functions using *matherr*. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_acosh.rst b/posix-users/newlib/libm/math/w_acosh.rst new file mode 100644 index 0000000..7fb52b4 --- /dev/null +++ b/posix-users/newlib/libm/math/w_acosh.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_acosh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. acosh, acoshf: + +acosh, acoshf - Inverse hyperbolic cosine +------------------------------------------------ +.. index:: acosh +.. index:: acoshf +.. index:: inverse hyperbolic cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double acosh(double x); + float acoshf(float x); + + + +**DESCRIPTION:** + +*acosh* calculates the inverse hyperbolic cosine of ``x``. +*acosh* is defined as +@ifnottex +. log(``x`` + sqrt(``x``*``x``-1)) +@end ifnottex +@tex +$$ln\Bigl(x + \sqrt{x^2-1}\Bigr)$$ +@end tex + +``x`` must be a number greater than or equal to 1. + +*acoshf* is identical, other than taking and returning floats. + + + +**STATUS CODES:** + +*acosh* and *acoshf* return the calculated value. If ``x`` +less than 1, the return value is NaN and *errno* is set to *EDOM*. + +You can change the error-handling behavior with the non-ANSI +*matherr* function. + + + +**PORTABILITY:** + +Neither *acosh* nor *acoshf* are ANSI C. They are not recommended +for portable programs. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_asin.rst b/posix-users/newlib/libm/math/w_asin.rst new file mode 100644 index 0000000..29446f4 --- /dev/null +++ b/posix-users/newlib/libm/math/w_asin.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_asin.c + +.. COMMENT: Generated on: 2018-08-20 + +.. asin, asinf: + +asin, asinf - Arc sine +------------------------------------ +.. index:: asin +.. index:: asinf +.. index:: arc sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double asin(double x); + float asinf(float x); + + + +**DESCRIPTION:** + + +*asin* computes the inverse sine (arc sine) of the argument ``x``. +Arguments to *asin* must be in the range @minus{}1 to 1. + +*asinf* is identical to *asin*, other than taking and +returning floats. + +You can modify error handling for these routines using *matherr*. + + + +**STATUS CODES:** + +@ifnottex +*asin* returns values in radians, in the range of -pi/2 to pi/2. +@end ifnottex +@tex +*asin* returns values in radians, in the range of $-\pi/2$ to $\pi/2$. +@end tex + +If ``x`` is not in the range @minus{}1 to 1, *asin* and *asinf* +return NaN (not a number), set the global variable *errno* to +*EDOM*, and issue a *DOMAIN error* message. + +You can change this error treatment using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_atan2.rst b/posix-users/newlib/libm/math/w_atan2.rst new file mode 100644 index 0000000..a6dec77 --- /dev/null +++ b/posix-users/newlib/libm/math/w_atan2.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_atan2.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atan2, atan2f: + +atan2, atan2f - Arc tangent of y/x +------------------------------------------------ +.. index:: atan2 +.. index:: atan2f +.. index:: arc tangent of y/x + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atan2(double y,double x); + float atan2f(float y,float x); + + + +**DESCRIPTION:** + + +*atan2* computes the inverse tangent (arc tangent) of ``y``/``x``. +*atan2* produces the correct result even for angles near +@ifnottex +pi/2 or -pi/2 +@end ifnottex +@tex +$\pi/2$ or $-\pi/2$ +@end tex +(that is, when ``x`` is near 0). + +*atan2f* is identical to *atan2*, save that it takes and returns +*float*. + + + +**STATUS CODES:** + +*atan2* and *atan2f* return a value in radians, in the range of +@ifnottex +-pi to pi. +@end ifnottex +@tex +$-\pi$ to $\pi$. +@end tex + +You can modify error handling for these functions using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_atanh.rst b/posix-users/newlib/libm/math/w_atanh.rst new file mode 100644 index 0000000..e238733 --- /dev/null +++ b/posix-users/newlib/libm/math/w_atanh.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_atanh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atanh, atanhf: + +atanh, atanhf - Inverse hyperbolic tangent +-------------------------------------------------- +.. index:: atanh +.. index:: atanhf +.. index:: inverse hyperbolic tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atanh(double x); + float atanhf(float x); + + + +**DESCRIPTION:** + + *atanh* calculates the inverse hyperbolic tangent of ``x``. + + *atanhf* is identical, other than taking and returning + *float* values. + + + +**STATUS CODES:** + + *atanh* and *atanhf* return the calculated value. + + If + @ifnottex + |``x``| + @end ifnottex + @tex + $|x|$ + @end tex + is greater than 1, the global *errno* is set to *EDOM* and + the result is a NaN. A *DOMAIN error* is reported. + + If + @ifnottex + |``x``| + @end ifnottex + @tex + $|x|$ + @end tex + is 1, the global *errno* is set to *EDOM*; and the result is + infinity with the same sign as *x*. A *SING error* is reported. + + You can modify the error handling for these routines using + *matherr*. + + + +**PORTABILITY:** + + Neither *atanh* nor *atanhf* are ANSI C. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_exp.rst b/posix-users/newlib/libm/math/w_exp.rst new file mode 100644 index 0000000..dce7f01 --- /dev/null +++ b/posix-users/newlib/libm/math/w_exp.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_exp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. exp, expf: + +exp, expf - Exponential +----------------------------- +.. index:: exp +.. index:: expf +.. index:: exponential + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double exp(double x); + float expf(float x); + + + +**DESCRIPTION:** + + *exp* and *expf* calculate the exponential of ``x``, that is, + @ifnottex + e raised to the power ``x`` (where e + @end ifnottex + @tex + $e^x$ (where $e$ + @end tex + is the base of the natural system of logarithms, approximately 2.71828). + + You can use the (non-ANSI) function *matherr* to specify + error handling for these functions. + + + +**STATUS CODES:** + + On success, *exp* and *expf* return the calculated value. + If the result underflows, the returned value is *0*. If the + result overflows, the returned value is *HUGE_VAL*. In + either case, *errno* is set to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_exp2.rst b/posix-users/newlib/libm/math/w_exp2.rst new file mode 100644 index 0000000..025afdf --- /dev/null +++ b/posix-users/newlib/libm/math/w_exp2.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_exp2.c + +.. COMMENT: Generated on: 2018-08-20 + +.. exp2, exp2f: + +exp2, exp2f - Exponential, base 2 +--------------------------------------- +.. index:: exp2 +.. index:: exp2f +.. index:: exponential, base 2 + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double exp2(double x); + float exp2f(float x); + + + +**DESCRIPTION:** + + *exp2* and *exp2f* calculate 2 ^ ``x``, that is, + @ifnottex + 2 raised to the power ``x``. + @end ifnottex + @tex + $2^x$ + @end tex + + You can use the (non-ANSI) function *matherr* to specify + error handling for these functions. + + + +**STATUS CODES:** + + On success, *exp2* and *exp2f* return the calculated value. + If the result underflows, the returned value is *0*. If the + result overflows, the returned value is *HUGE_VAL*. In + either case, *errno* is set to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_gamma.rst b/posix-users/newlib/libm/math/w_gamma.rst new file mode 100644 index 0000000..08b6937 --- /dev/null +++ b/posix-users/newlib/libm/math/w_gamma.rst @@ -0,0 +1,112 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_gamma.c + +.. COMMENT: Generated on: 2018-08-20 + +.. gamma, gammaf, lgamma, lgammaf, gamma_r, gammaf_r, lgamma_r, lgammaf_r, tgamma, tgammaf: + +gamma, gammaf, lgamma, lgammaf, gamma_r, gammaf_r, lgamma_r, lgammaf_r, tgamma, tgammaf - Logarithmic and plain gamma functions +----------------------------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: gamma +.. index:: gammaf +.. index:: lgamma +.. index:: lgammaf +.. index:: gamma_r +.. index:: gammaf_r +.. index:: lgamma_r +.. index:: lgammaf_r +.. index:: tgamma +.. index:: tgammaf +.. index:: logarithmic and plain gamma functions + +**CALLING SEQUENCE:** + +.. code-block:: c + +#include <math.h> +double gamma(double x); +float gammaf(float x); +double lgamma(double x); +float lgammaf(float x); +double gamma_r(double x, int *signgamp); +float gammaf_r(float x, int *signgamp); +double lgamma_r(double x, int *signgamp); +float lgammaf_r(float x, int *signgamp); +double tgamma(double x); +float tgammaf(float x); + + + +**DESCRIPTION:** + +*gamma* calculates +@tex +$\mit ln\bigl(\Gamma(x)\bigr)$, +@end tex +the natural logarithm of the gamma function of ``x``. The gamma function +(*exp(gamma(``x``))*) is a generalization of factorial, and retains +the property that +@ifnottex +*exp(gamma(N))* is equivalent to *N*exp(gamma(N-1))*. +@end ifnottex +@tex +$\mit \Gamma(N)\equiv N\times\Gamma(N-1)$. +@end tex +Accordingly, the results of the gamma function itself grow very +quickly. *gamma* is defined as +@tex +$\mit ln\bigl(\Gamma(x)\bigr)$ rather than simply $\mit \Gamma(x)$ +@end tex +@ifnottex +the natural log of the gamma function, rather than the gamma function +itself, +@end ifnottex +to extend the useful range of results representable. + +The sign of the result is returned in the global variable *signgam*, +which is declared in math.h. + +*gammaf* performs the same calculation as *gamma*, but uses and +returns *float* values. + +*lgamma* and *lgammaf* are alternate names for *gamma* and +*gammaf*. The use of *lgamma* instead of *gamma* is a reminder +that these functions compute the log of the gamma function, rather +than the gamma function itself. + +The functions *gamma_r*, *gammaf_r*, *lgamma_r*, and +*lgammaf_r* are just like *gamma*, *gammaf*, *lgamma*, and +*lgammaf*, respectively, but take an additional argument. This +additional argument is a pointer to an integer. This additional +argument is used to return the sign of the result, and the global +variable *signgam* is not used. These functions may be used for +reentrant calls (but they will still set the global variable *errno* +if an error occurs). + +*tgamma* and *tgammaf* are the "true gamma" functions, returning +@tex +$\mit \Gamma(x)$, +@end tex +the gamma function of ``x``--without a logarithm. +(They are apparently so named because of the prior existence of the old, +poorly-named *gamma* functions which returned the log of gamma up +through BSD 4.2.) + + + +**STATUS CODES:** + +Normally, the computed result is returned. + +When ``x`` is a nonpositive integer, *gamma* returns *HUGE_VAL* +and *errno* is set to *EDOM*. If the result overflows, *gamma* +returns *HUGE_VAL* and *errno* is set to *ERANGE*. + +You can modify this error treatment using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_hypot.rst b/posix-users/newlib/libm/math/w_hypot.rst new file mode 100644 index 0000000..b09bb51 --- /dev/null +++ b/posix-users/newlib/libm/math/w_hypot.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_hypot.c + +.. COMMENT: Generated on: 2018-08-20 + +.. hypot, hypotf: + +hypot, hypotf - Distance from origin +------------------------------------------ +.. index:: hypot +.. index:: hypotf +.. index:: distance from origin + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double hypot(double x, double y); + float hypotf(float x, float y); + + + +**DESCRIPTION:** + + *hypot* calculates the Euclidean distance + @tex + $\sqrt{x^2+y^2}$ + @end tex + @ifnottex + *sqrt(``x``*``x`` + ``y``*``y``)* + @end ifnottex + between the origin (0,0) and a point represented by the + Cartesian coordinates (``x``,``y``). *hypotf* differs only + in the type of its arguments and result. + + + +**STATUS CODES:** + + Normally, the distance value is returned. On overflow, + *hypot* returns *HUGE_VAL* and sets *errno* to + *ERANGE*. + + You can change the error treatment with *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_j0.rst b/posix-users/newlib/libm/math/w_j0.rst new file mode 100644 index 0000000..e1a1a4f --- /dev/null +++ b/posix-users/newlib/libm/math/w_j0.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_j0.c + +.. COMMENT: Generated on: 2018-08-20 + +.. jN, jNf, yN, yNf: + +jN, jNf, yN, yNf - Bessel functions +---------------------------------------------- +.. index:: jN +.. index:: jNf +.. index:: yN +.. index:: yNf +.. index:: Bessel functions + +**CALLING SEQUENCE:** + +.. code-block:: c + +#include <math.h> +double j0(double x); +float j0f(float x); +double j1(double x); +float j1f(float x); +double jn(int n, double x); +float jnf(int n, float x); +double y0(double x); +float y0f(float x); +double y1(double x); +float y1f(float x); +double yn(int n, double x); +float ynf(int n, float x); + + + +**DESCRIPTION:** + +The Bessel functions are a family of functions that solve the +differential equation +@ifnottex +. 2 2 2 +. x y`` + xy` + (x - p )y = 0 +@end ifnottex +@tex +$$x^2{d^2y\over dx^2} + x{dy\over dx} + (x^2-p^2)y = 0$$ +@end tex +These functions have many applications in engineering and physics. + +*jn* calculates the Bessel function of the first kind of order +``n``. *j0* and *j1* are special cases for order 0 and order +1 respectively. + +Similarly, *yn* calculates the Bessel function of the second kind of +order ``n``, and *y0* and *y1* are special cases for order 0 and +1. + +*jnf*, *j0f*, *j1f*, *ynf*, *y0f*, and *y1f* perform the +same calculations, but on *float* rather than *double* values. + + + +**STATUS CODES:** + +The value of each Bessel function at ``x`` is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_log.rst b/posix-users/newlib/libm/math/w_log.rst new file mode 100644 index 0000000..b4e015a --- /dev/null +++ b/posix-users/newlib/libm/math/w_log.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_log.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log, logf: + +log, logf - Natural logarithms +------------------------------------------- +.. index:: log +.. index:: logf +.. index:: natural logarithms + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log(double x); + float logf(float x); + + + +**DESCRIPTION:** + +Return the natural logarithm of ``x``, that is, its logarithm base e +(where e is the base of the natural system of logarithms, 2.71828@dots{}). +*log* and *logf* are identical save for the return and argument types. + +You can use the (non-ANSI) function *matherr* to specify error +handling for these functions. + + + +**STATUS CODES:** + +Normally, returns the calculated value. When ``x`` is zero, the +returned value is *-HUGE_VAL* and *errno* is set to *ERANGE*. +When ``x`` is negative, the returned value is NaN (not a number) and +*errno* is set to *EDOM*. You can control the error behavior via +*matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_log10.rst b/posix-users/newlib/libm/math/w_log10.rst new file mode 100644 index 0000000..88f4462 --- /dev/null +++ b/posix-users/newlib/libm/math/w_log10.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_log10.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log10, log10f: + +log10, log10f - Base 10 logarithms +----------------------------------------- +.. index:: log10 +.. index:: log10f +.. index:: base 10 logarithms + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log10(double x); + float log10f(float x); + + + +**DESCRIPTION:** + +*log10* returns the base 10 logarithm of ``x``. +It is implemented as *log(``x``) / log(10)*. + +*log10f* is identical, save that it takes and returns *float* values. + + + +**STATUS CODES:** + +*log10* and *log10f* return the calculated value. + +See the description of *log* for information on errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_pow.rst b/posix-users/newlib/libm/math/w_pow.rst new file mode 100644 index 0000000..026be3e --- /dev/null +++ b/posix-users/newlib/libm/math/w_pow.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_pow.c + +.. COMMENT: Generated on: 2018-08-20 + +.. pow, powf: + +pow, powf - X to the power y +---------------------------------- +.. index:: pow +.. index:: powf +.. index:: x to the power y + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double pow(double x, double y); + float powf(float x, float y); + + + +**DESCRIPTION:** + + *pow* and *powf* calculate ``x`` raised to the exponent ``y``. + @tex + (That is, $x^y$.) + @end tex + + + +**STATUS CODES:** + + On success, *pow* and *powf* return the value calculated. + + When the argument values would produce overflow, *pow* + returns *HUGE_VAL* and set *errno* to *ERANGE*. If the + argument ``x`` passed to *pow* or *powf* is a negative + noninteger, and ``y`` is also not an integer, then *errno* + is set to *EDOM*. If ``x`` and ``y`` are both 0, then + *pow* and *powf* return *1*. + + You can modify error handling for these functions using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_remainder.rst b/posix-users/newlib/libm/math/w_remainder.rst new file mode 100644 index 0000000..a80f1e3 --- /dev/null +++ b/posix-users/newlib/libm/math/w_remainder.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_remainder.c + +.. COMMENT: Generated on: 2018-08-20 + +.. remainder, remainderf: + +remainder, remainderf - Round and remainder +------------------------------------------------- +.. index:: remainder +.. index:: remainderf +.. index:: round and remainder + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double remainder(double x, double y); + float remainderf(float x, float y); + + + +**DESCRIPTION:** + +*remainder* and *remainderf* find the remainder of +``x``/``y``; this value is in the range -``y``/2 .. +``y``/2. + + + +**STATUS CODES:** + +*remainder* returns the integer result as a double. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_sinh.rst b/posix-users/newlib/libm/math/w_sinh.rst new file mode 100644 index 0000000..7257dfe --- /dev/null +++ b/posix-users/newlib/libm/math/w_sinh.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_sinh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sinh, sinhf: + +sinh, sinhf - Hyperbolic sine +------------------------------------------- +.. index:: sinh +.. index:: sinhf +.. index:: hyperbolic sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sinh(double x); + float sinhf(float x); + + + +**DESCRIPTION:** + + *sinh* computes the hyperbolic sine of the argument ``x``. + Angles are specified in radians. *sinh*(``x``) is defined as + @ifnottex + . (exp(``x``) - exp(-``x``))/2 + @end ifnottex + @tex + $${e^x - e^{-x}}\over 2$$ + @end tex + + *sinhf* is identical, save that it takes and returns *float* values. + + + +**STATUS CODES:** + + The hyperbolic sine of ``x`` is returned. + + When the correct result is too large to be representable (an + overflow), *sinh* returns *HUGE_VAL* with the + appropriate sign, and sets the global value *errno* to + *ERANGE*. + + You can modify error handling for these functions with *matherr*. + + + +**PORTABILITY:** + + *sinh* is ANSI C. + *sinhf* is an extension. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/math/w_sqrt.rst b/posix-users/newlib/libm/math/w_sqrt.rst new file mode 100644 index 0000000..17645fe --- /dev/null +++ b/posix-users/newlib/libm/math/w_sqrt.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/math/w_sqrt.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sqrt, sqrtf: + +sqrt, sqrtf - Positive square root +----------------------------------------- +.. index:: sqrt +.. index:: sqrtf +.. index:: positive square root + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sqrt(double x); + float sqrtf(float x); + + + +**DESCRIPTION:** + + *sqrt* computes the positive square root of the argument. + You can modify error handling for this function with + *matherr*. + + + +**STATUS CODES:** + + On success, the square root is returned. If ``x`` is real and + positive, then the result is positive. If ``x`` is real and + negative, the global value *errno* is set to *EDOM* (domain error). + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/e_acosh.rst b/posix-users/newlib/libm/mathfp/e_acosh.rst new file mode 100644 index 0000000..e82f942 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/e_acosh.rst @@ -0,0 +1,62 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/e_acosh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. acosh, acoshf: + +acosh, acoshf - Inverse hyperbolic cosine +----------------------------------------------- +.. index:: acosh +.. index:: acoshf +.. index:: inverse hyperbolic cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double acosh(double x); + float acoshf(float x); + + + +**DESCRIPTION:** + +*acosh* calculates the inverse hyperbolic cosine of ``x``. +*acosh* is defined as +@ifnottex +. log(``x`` + sqrt(``x``*``x``-1)) +@end ifnottex +@tex +$$ln\Bigl(x + \sqrt{x^2-1}\Bigr)$$ +@end tex + +``x`` must be a number greater than or equal to 1. + +*acoshf* is identical, other than taking and returning floats. + + + +**STATUS CODES:** + +*acosh* and *acoshf* return the calculated value. If ``x`` +less than 1, the return value is NaN and *errno* is set to *EDOM*. + +You can change the error-handling behavior with the non-ANSI +*matherr* function. + + + +**PORTABILITY:** + +Neither *acosh* nor *acoshf* are ANSI C. They are not recommended +for portable programs. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/e_atanh.rst b/posix-users/newlib/libm/mathfp/e_atanh.rst new file mode 100644 index 0000000..127f023 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/e_atanh.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/e_atanh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atanh, atanhf: + +atanh, atanhf - Inverse hyperbolic tangent +-------------------------------------------------------- +.. index:: atanh +.. index:: atanhf +.. index:: inverse hyperbolic tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atanh(double x); + float atanhf(float x); + + + +**DESCRIPTION:** + + *atanh* calculates the inverse hyperbolic tangent of ``x``. + + *atanhf* is identical, other than taking and returning + *float* values. + + + +**STATUS CODES:** + + *atanh* and *atanhf* return the calculated value. + + If + @ifnottex + |``x``| + @end ifnottex + @tex + $|x|$ + @end tex + is greater than 1, the global *errno* is set to *EDOM* and + the result is a NaN. A *DOMAIN error* is reported. + + If + @ifnottex + |``x``| + @end ifnottex + @tex + $|x|$ + @end tex + is 1, the global *errno* is set to *EDOM*; and the result is + infinity with the same sign as *x*. A *SING error* is reported. + + You can modify the error handling for these routines using + *matherr*. + + + +**PORTABILITY:** + + Neither *atanh* nor *atanhf* are ANSI C. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/e_hypot.rst b/posix-users/newlib/libm/mathfp/e_hypot.rst new file mode 100644 index 0000000..7a15e32 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/e_hypot.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/e_hypot.c + +.. COMMENT: Generated on: 2018-08-20 + +.. hypot, hypotf: + +hypot, hypotf - Distance from origin +------------------------------------------------- +.. index:: hypot +.. index:: hypotf +.. index:: distance from origin + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double hypot(double x, double y); + float hypotf(float x, float y); + + + +**DESCRIPTION:** + + *hypot* calculates the Euclidean distance + @tex + $\sqrt{x^2+y^2}$ + @end tex + @ifnottex + *sqrt(``x``*``x`` + ``y``*``y``)* + @end ifnottex + between the origin (0,0) and a point represented by the + Cartesian coordinates (``x``,``y``). *hypotf* differs only + in the type of its arguments and result. + + + +**STATUS CODES:** + + Normally, the distance value is returned. On overflow, + *hypot* returns *HUGE_VAL* and sets *errno* to + *ERANGE*. + + You can change the error treatment with *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/e_remainder.rst b/posix-users/newlib/libm/mathfp/e_remainder.rst new file mode 100644 index 0000000..f70d310 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/e_remainder.rst @@ -0,0 +1,40 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/e_remainder.c + +.. COMMENT: Generated on: 2018-08-20 + +.. remainder, remainderf: + +remainder, remainderf - Round and remainder +------------------------------------------------- +.. index:: remainder +.. index:: remainderf +.. index:: round and remainder + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double remainder(double x, double y); + float remainderf(float x, float y); + + + +**DESCRIPTION:** + +*remainder* and *remainderf* find the remainder of +``x``/``y``; this value is in the range -``y``/2 .. +``y``/2. + + + +**STATUS CODES:** + +*remainder* returns the integer result as a double. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/er_lgamma.rst b/posix-users/newlib/libm/mathfp/er_lgamma.rst new file mode 100644 index 0000000..30972da --- /dev/null +++ b/posix-users/newlib/libm/mathfp/er_lgamma.rst @@ -0,0 +1,101 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/er_lgamma.c + +.. COMMENT: Generated on: 2018-08-20 + +.. gamma, gammaf, lgamma, lgammaf, gamma_r, gammaf_r, lgamma_r, lgammaf_r: + +gamma, gammaf, lgamma, lgammaf, gamma_r, gammaf_r, lgamma_r, lgammaf_r - Logarithmic gamma + function +-------------------------------------------------------------------------------------------------------------------------------------------- +.. index:: gamma +.. index:: gammaf +.. index:: lgamma +.. index:: lgammaf +.. index:: gamma_r +.. index:: gammaf_r +.. index:: lgamma_r +.. index:: lgammaf_r +.. index:: logarithmic gamma + function + +**CALLING SEQUENCE:** + +.. code-block:: c + +#include <math.h> +double gamma(double x); +float gammaf(float x); +double lgamma(double x); +float lgammaf(float x); +double gamma_r(double x, int *signgamp); +float gammaf_r(float x, int *signgamp); +double lgamma_r(double x, int *signgamp); +float lgammaf_r(float x, int *signgamp); + + + +**DESCRIPTION:** + +*gamma* calculates +@tex +$\mit ln\bigl(\Gamma(x)\bigr)$, +@end tex +the natural logarithm of the gamma function of ``x``. The gamma function +(*exp(gamma(``x``))*) is a generalization of factorial, and retains +the property that +@ifnottex +*exp(gamma(N))* is equivalent to *N*exp(gamma(N-1))*. +@end ifnottex +@tex +$\mit \Gamma(N)\equiv N\times\Gamma(N-1)$. +@end tex +Accordingly, the results of the gamma function itself grow very +quickly. *gamma* is defined as +@tex +$\mit ln\bigl(\Gamma(x)\bigr)$ rather than simply $\mit \Gamma(x)$ +@end tex +@ifnottex +the natural log of the gamma function, rather than the gamma function +itself, +@end ifnottex +to extend the useful range of results representable. + +The sign of the result is returned in the global variable *signgam*, +which is declared in math.h. + +*gammaf* performs the same calculation as *gamma*, but uses and +returns *float* values. + +*lgamma* and *lgammaf* are alternate names for *gamma* and +*gammaf*. The use of *lgamma* instead of *gamma* is a reminder +that these functions compute the log of the gamma function, rather +than the gamma function itself. + +The functions *gamma_r*, *gammaf_r*, *lgamma_r*, and +*lgammaf_r* are just like *gamma*, *gammaf*, *lgamma*, and +*lgammaf*, respectively, but take an additional argument. This +additional argument is a pointer to an integer. This additional +argument is used to return the sign of the result, and the global +variable *signgam* is not used. These functions may be used for +reentrant calls (but they will still set the global variable *errno* +if an error occurs). + + + +**STATUS CODES:** + +Normally, the computed result is returned. + +When ``x`` is a nonpositive integer, *gamma* returns *HUGE_VAL* +and *errno* is set to *EDOM*. If the result overflows, *gamma* +returns *HUGE_VAL* and *errno* is set to *ERANGE*. + +You can modify this error treatment using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_acos.rst b/posix-users/newlib/libm/mathfp/s_acos.rst new file mode 100644 index 0000000..9230d33 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_acos.rst @@ -0,0 +1,58 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_acos.c + +.. COMMENT: Generated on: 2018-08-20 + +.. acos, acosf: + +acos, acosf - Arc cosine +-------------------------------------- +.. index:: acos +.. index:: acosf +.. index:: arc cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double acos(double x); + float acosf(float x); + + + +**DESCRIPTION:** + + + *acos* computes the inverse cosine (arc cosine) of the input value. + Arguments to *acos* must be in the range @minus{}1 to 1. + + *acosf* is identical to *acos*, except that it performs + its calculations on *floats*. + + + +**STATUS CODES:** + + @ifnottex + *acos* and *acosf* return values in radians, in the range of 0 to pi +. + @end ifnottex + @tex + *acos* and *acosf* return values in radians, in the range of *0* t +o $\pi$. + @end tex + + If ``x`` is not between @minus{}1 and 1, the returned value is NaN + (not a number) the global variable *errno* is set to *EDOM*, and a + *DOMAIN error* message is sent as standard error output. + + You can modify error handling for these functions using *matherr*. + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_asine.rst b/posix-users/newlib/libm/mathfp/s_asine.rst new file mode 100644 index 0000000..58793e9 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_asine.rst @@ -0,0 +1,46 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_asine.c + +.. COMMENT: Generated on: 2018-08-20 + +.. asin, asinf, acos, acosf, asine, asinef: + +asin, asinf, acos, acosf, asine, asinef - Arc sine or cosine +---------------------------------------------------------------------------------- +.. index:: asin +.. index:: asinf +.. index:: acos +.. index:: acosf +.. index:: asine +.. index:: asinef +.. index:: arc sine or cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double asine(double x); + float asinef(float x); + double asin(double x); + float asinf(float x); + double acos(double x); + float acosf(float x); + + + +**DESCRIPTION:** + + +*asin* computes the inverse sine or cosine of the argument ``x``. +Arguments to *asin* and *acos* must be in the range @minus{}1 to 1. + +*asinf* and *acosf* are identical to *asin* and *acos*, other +than taking and returning floats. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_asinh.rst b/posix-users/newlib/libm/mathfp/s_asinh.rst new file mode 100644 index 0000000..b19305c --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_asinh.rst @@ -0,0 +1,48 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_asinh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. asinh, asinhf: + +asinh, asinhf - Inverse hyperbolic sine +----------------------------------------------- +.. index:: asinh +.. index:: asinhf +.. index:: inverse hyperbolic sine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double asinh(double x); + float asinhf(float x); + + + +**DESCRIPTION:** + +*asinh* calculates the inverse hyperbolic sine of ``x``. +*asinh* is defined as +@ifnottex +. sgn(``x``) * log(abs(``x``) + sqrt(1+``x``*``x``)) +@end ifnottex +@tex +$$sign(x) \times ln\Bigl(|x| + \sqrt{1+x^2}\Bigr)$$ +@end tex + +*asinhf* is identical, other than taking and returning floats. + + + +**STATUS CODES:** + +*asinh* and *asinhf* return the calculated value. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_atan.rst b/posix-users/newlib/libm/mathfp/s_atan.rst new file mode 100644 index 0000000..4586256 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_atan.rst @@ -0,0 +1,47 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_atan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atan, atanf: + +atan, atanf - Arc tangent +--------------------------------------- +.. index:: atan +.. index:: atanf +.. index:: arc tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atan(double x); + float atanf(float x); + + + +**DESCRIPTION:** + + +*atan* computes the inverse tangent (arc tangent) of the input value. + +*atanf* is identical to *atan*, save that it operates on *floats*. + + + +**STATUS CODES:** + +@ifnottex +*atan* returns a value in radians, in the range of -pi/2 to pi/2. +@end ifnottex +@tex +*atan* returns a value in radians, in the range of $-\pi/2$ to $\pi/2$. +@end tex + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_atan2.rst b/posix-users/newlib/libm/mathfp/s_atan2.rst new file mode 100644 index 0000000..cbf3952 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_atan2.rst @@ -0,0 +1,61 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_atan2.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atan2, atan2f: + +atan2, atan2f - Arc tangent of y/x +------------------------------------------------ +.. index:: atan2 +.. index:: atan2f +.. index:: arc tangent of y/x + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atan2(double y,double x); + float atan2f(float y,float x); + + + +**DESCRIPTION:** + + +*atan2* computes the inverse tangent (arc tangent) of ``y``/``x``. +*atan2* produces the correct result even for angles near +@ifnottex +pi/2 or -pi/2 +@end ifnottex +@tex +$\pi/2$ or $-\pi/2$ +@end tex +(that is, when ``x`` is near 0). + +*atan2f* is identical to *atan2*, save that it takes and returns +*float*. + + + +**STATUS CODES:** + +*atan2* and *atan2f* return a value in radians, in the range of +@ifnottex +-pi to pi. +@end ifnottex +@tex +$-\pi$ to $\pi$. +@end tex + +If both ``x`` and ``y`` are 0.0, *atan2* causes a *DOMAIN* error. + +You can modify error handling for these functions using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_atangent.rst b/posix-users/newlib/libm/mathfp/s_atangent.rst new file mode 100644 index 0000000..4f165b5 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_atangent.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_atangent.c + +.. COMMENT: Generated on: 2018-08-20 + +.. atan, atanf, atan2, atan2f, atangent, atangentf: + +atan, atanf, atan2, atan2f, atangent, atangentf - Arc tangent +----------------------------------------------------------------------------------- +.. index:: atan +.. index:: atanf +.. index:: atan2 +.. index:: atan2f +.. index:: atangent +.. index:: atangentf +.. index:: arc tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double atan(double x); + float atan(float x); + double atan2(double y,double x); + float atan2f(float y,float x); + + + +**DESCRIPTION:** + + +*atan2* computes the inverse tangent (arc tangent) of y / x. + +*atan2f* is identical to *atan2*, save that it operates on *floats*. + +*atan* computes the inverse tangent (arc tangent) of the input value. + +*atanf* is identical to *atan*, save that it operates on *floats*. + + + +**STATUS CODES:** + +@ifnottex +*atan* returns a value in radians, in the range of -pi/2 to pi/2. +*atan2* returns a value in radians, in the range of -pi/2 to pi/2. +@end ifnottex +@tex +*atan* returns a value in radians, in the range of $-\pi/2$ to $\pi/2$. +*atan2* returns a value in radians, in the range of $-\pi/2$ to $\pi/2$. +@end tex + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_erf.rst b/posix-users/newlib/libm/mathfp/s_erf.rst new file mode 100644 index 0000000..68ab573 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_erf.rst @@ -0,0 +1,59 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_erf.c + +.. COMMENT: Generated on: 2018-08-20 + +.. erf, erff, erfc, erfcf: + +erf, erff, erfc, erfcf - Error function +--------------------------------------------------------- +.. index:: erf +.. index:: erff +.. index:: erfc +.. index:: erfcf +.. index:: error function + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double erf(double x); + float erff(float x); + double erfc(double x); + float erfcf(float x); + + + +**DESCRIPTION:** + + *erf* calculates an approximation to the ``error function``, + which estimates the probability that an observation will fall within + ``x`` standard deviations of the mean (assuming a normal + distribution). + @tex + The error function is defined as + $${2\over\sqrt\pi}\times\int_0^x e^{-t^2}dt$$ + @end tex + + *erfc* calculates the complementary probability; that is, + *erfc(``x``)* is *1 - erf(``x``)*. *erfc* is computed directly, + so that you can use it to avoid the loss of precision that would + result from subtracting large probabilities (on large ``x``) from 1. + + *erff* and *erfcf* differ from *erf* and *erfc* only in the + argument and result types. + + + +**STATUS CODES:** + + For positive arguments, *erf* and all its variants return a + probability---a number between 0 and 1. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_exp.rst b/posix-users/newlib/libm/mathfp/s_exp.rst new file mode 100644 index 0000000..d24a555 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_exp.rst @@ -0,0 +1,49 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_exp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. exp, expf: + +exp, expf - Exponential +------------------------------------ +.. index:: exp +.. index:: expf +.. index:: exponential + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double exp(double x); + float expf(float x); + + + +**DESCRIPTION:** + + *exp* and *expf* calculate the exponential of ``x``, that is, + @ifnottex + e raised to the power ``x`` (where e + @end ifnottex + @tex + $e^x$ (where $e$ + @end tex + is the base of the natural system of logarithms, approximately 2.71828). + + + +**STATUS CODES:** + + On success, *exp* and *expf* return the calculated value. + If the result underflows, the returned value is *0*. If the + result overflows, the returned value is *HUGE_VAL*. In + either case, *errno* is set to *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_fabs.rst b/posix-users/newlib/libm/mathfp/s_fabs.rst new file mode 100644 index 0000000..f7b0b5c --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_fabs.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_fabs.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fabs, fabsf: + +fabs, fabsf - Absolute value (magnitude) +---------------------------------------------------- +.. index:: fabs +.. index:: fabsf +.. index:: absolute value (magnitude) + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double fabs(double x); + float fabsf(float x); + + + +**DESCRIPTION:** + +*fabs* and *fabsf* calculate +@tex +$|x|$, +@end tex +the absolute value (magnitude) of the argument ``x``, by direct +manipulation of the bit representation of ``x``. + + + +**STATUS CODES:** + +The calculated value is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_floor.rst b/posix-users/newlib/libm/mathfp/s_floor.rst new file mode 100644 index 0000000..e4d51de --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_floor.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_floor.c + +.. COMMENT: Generated on: 2018-08-20 + +.. floor, floorf, ceil, ceilf: + +floor, floorf, ceil, ceilf - Floor and ceiling +------------------------------------------------------- +.. index:: floor +.. index:: floorf +.. index:: ceil +.. index:: ceilf +.. index:: floor and ceiling + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double floor(double x); + float floorf(float x); + double ceil(double x); + float ceilf(float x); + + + +**DESCRIPTION:** + +*floor* and *floorf* find +@tex +$\lfloor x \rfloor$, +@end tex +the nearest integer less than or equal to ``x``. +*ceil* and *ceilf* find +@tex +$\lceil x\rceil$, +@end tex +the nearest integer greater than or equal to ``x``. + + + +**STATUS CODES:** + +*floor* and *ceil* return the integer result as a double. +*floorf* and *ceilf* return the integer result as a float. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_fmod.rst b/posix-users/newlib/libm/mathfp/s_fmod.rst new file mode 100644 index 0000000..294a934 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_fmod.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_fmod.c + +.. COMMENT: Generated on: 2018-08-20 + +.. fmod, fmodf: + +fmod, fmodf - Floating-point remainder (modulo) +----------------------------------------------------- +.. index:: fmod +.. index:: fmodf +.. index:: floating-point remainder (modulo) + +**CALLING SEQUENCE:** + +.. code-block:: c + +#include <math.h> +double fmod(double x, double y); +float fmodf(float x, float y); + + + +**DESCRIPTION:** + +The *fmod* and *fmodf* functions compute the floating-point +remainder of ``x``/``y`` (``x`` modulo ``y``). + + + +**STATUS CODES:** + +The *fmod* function returns the value +@ifnottex +``x``-``i``*``y``, +@end ifnottex +@tex +$x-i\times y$, +@end tex +for the largest integer ``i`` such that, if ``y`` is nonzero, the +result has the same sign as ``x`` and magnitude less than the +magnitude of ``y``. + +*fmod(``x``,0)* returns NaN, and sets *errno* to *EDOM*. + +You can modify error treatment for these functions using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_frexp.rst b/posix-users/newlib/libm/mathfp/s_frexp.rst new file mode 100644 index 0000000..b550ac8 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_frexp.rst @@ -0,0 +1,57 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_frexp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. frexp, frexpf: + +frexp, frexpf - Split floating-point number +------------------------------------------------------- +.. index:: frexp +.. index:: frexpf +.. index:: split floating-point number + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double frexp(double val, int *exp); + float frexpf(float val, int *exp); + + + +**DESCRIPTION:** + + All nonzero, normal numbers can be described as ``m`` * 2**``p``. + *frexp* represents the double ``val`` as a mantissa ``m`` + and a power of two ``p``. The resulting mantissa will always + be greater than or equal to *0.5*, and less than *1.0* (as + long as ``val`` is nonzero). The power of two will be stored + in ***``exp``. + +@ifnottex +``m`` and ``p`` are calculated so that +``val`` is ``m`` times *2* to the power ``p``. +@end ifnottex +@tex +``m`` and ``p`` are calculated so that +$ val = m \times 2^p $. +@end tex + +*frexpf* is identical, other than taking and returning +floats rather than doubles. + + + +**STATUS CODES:** + +*frexp* returns the mantissa ``m``. If ``val`` is *0*, infinity, +or Nan, *frexp* will set ***``exp`` to *0* and return ``val``. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_ldexp.rst b/posix-users/newlib/libm/mathfp/s_ldexp.rst new file mode 100644 index 0000000..6f02c5e --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_ldexp.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_ldexp.c + +.. COMMENT: Generated on: 2018-08-20 + +.. ldexp, ldexpf: + +ldexp, ldexpf - Load exponent +------------------------------------------ +.. index:: ldexp +.. index:: ldexpf +.. index:: load exponent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double ldexp(double val, int exp); + float ldexpf(float val, int exp); + + + +**DESCRIPTION:** + +*ldexp* calculates the value +@ifnottex +``val`` times 2 to the power ``exp``. +@end ifnottex +@tex +$val\times 2^{exp}$. +@end tex +*ldexpf* is identical, save that it takes and returns *float* +rather than *double* values. + + + +**STATUS CODES:** + +*ldexp* returns the calculated value. + +Underflow and overflow both set *errno* to *ERANGE*. +On underflow, *ldexp* and *ldexpf* return 0.0. +On overflow, *ldexp* returns plus or minus *HUGE_VAL*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_log10.rst b/posix-users/newlib/libm/mathfp/s_log10.rst new file mode 100644 index 0000000..d756280 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_log10.rst @@ -0,0 +1,44 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_log10.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log10, log10f: + +log10, log10f - Base 10 logarithms +------------------------------------------------ +.. index:: log10 +.. index:: log10f +.. index:: base 10 logarithms + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log10(double x); + float log10f(float x); + + + +**DESCRIPTION:** + +*log10* returns the base 10 logarithm of ``x``. +It is implemented as *log(``x``) / log(10)*. + +*log10f* is identical, save that it takes and returns *float* values. + + + +**STATUS CODES:** + +*log10* and *log10f* return the calculated value. + +See the description of *log* for information on errors. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_logarithm.rst b/posix-users/newlib/libm/mathfp/s_logarithm.rst new file mode 100644 index 0000000..54f287a --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_logarithm.rst @@ -0,0 +1,53 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_logarithm.c + +.. COMMENT: Generated on: 2018-08-20 + +.. log, logf, log10, log10f, logarithm, logarithmf: + +log, logf, log10, log10f, logarithm, logarithmf - Natural or base 10 logarithms +---------------------------------------------------------------------------------------------------- +.. index:: log +.. index:: logf +.. index:: log10 +.. index:: log10f +.. index:: logarithm +.. index:: logarithmf +.. index:: natural or base 10 logarithms + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double log(double x); + float logf(float x); + double log10(double x); + float log10f(float x); + + + +**DESCRIPTION:** + +Return the natural or base 10 logarithm of ``x``, that is, its logarithm base e +(where e is the base of the natural system of logarithms, 2.71828@dots{}) or +base 10. +*log* and *logf* are identical save for the return and argument types. +*log10* and *log10f* are identical save for the return and argument types. + + + +**STATUS CODES:** + +Normally, returns the calculated value. When ``x`` is zero, the +returned value is *-HUGE_VAL* and *errno* is set to *ERANGE*. +When ``x`` is negative, the returned value is *-HUGE_VAL* and +*errno* is set to *EDOM*. You can control the error behavior via +*matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_pow.rst b/posix-users/newlib/libm/mathfp/s_pow.rst new file mode 100644 index 0000000..7e43978 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_pow.rst @@ -0,0 +1,51 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_pow.c + +.. COMMENT: Generated on: 2018-08-20 + +.. pow, powf: + +pow, powf - X to the power y +----------------------------------------- +.. index:: pow +.. index:: powf +.. index:: x to the power y + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double pow(double x, double y); + float pow(float x, float y); + + + +**DESCRIPTION:** + + *pow* and *powf* calculate ``x`` raised to the exponent ``y``. + @tex + (That is, $x^y$.) + @end tex + + + +**STATUS CODES:** + + On success, *pow* and *powf* return the value calculated. + + When the argument values would produce overflow, *pow* + returns *HUGE_VAL* and set *errno* to *ERANGE*. If the + argument ``x`` passed to *pow* or *powf* is a negative + noninteger, and ``y`` is also not an integer, then *errno* + is set to *EDOM*. If ``x`` and ``y`` are both 0, then + *pow* and *powf* return *1*. + + You can modify error handling for these functions using *matherr*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_sine.rst b/posix-users/newlib/libm/mathfp/s_sine.rst new file mode 100644 index 0000000..5d70be1 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_sine.rst @@ -0,0 +1,52 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_sine.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sin, cos, sine, sinf, cosf, sinef: + +sin, cos, sine, sinf, cosf, sinef - Sine or cosine +----------------------------------------------------------------------- +.. index:: sin +.. index:: cos +.. index:: sine +.. index:: sinf +.. index:: cosf +.. index:: sinef +.. index:: sine or cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sin(double x); + float sinf(float x); + double cos(double x); + float cosf(float x); + + + +**DESCRIPTION:** + + *sin* and *cos* compute (respectively) the sine and cosine + of the argument ``x``. Angles are specified in radians. + + +**STATUS CODES:** + + The sine or cosine of ``x`` is returned. + + + +**PORTABILITY:** + + *sin* and *cos* are ANSI C. + *sinf* and *cosf* are extensions. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_sineh.rst b/posix-users/newlib/libm/mathfp/s_sineh.rst new file mode 100644 index 0000000..abef4e9 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_sineh.rst @@ -0,0 +1,67 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_sineh.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sinh, sinhf, cosh, coshf, sineh: + +sinh, sinhf, cosh, coshf, sineh - Hyperbolic sine or cosine +------------------------------------------------------------------------------- +.. index:: sinh +.. index:: sinhf +.. index:: cosh +.. index:: coshf +.. index:: sineh +.. index:: hyperbolic sine or cosine + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sinh(double x); + float sinhf(float x); + double cosh(double x); + float coshf(float x); + + + +**DESCRIPTION:** + + *sinh* and *cosh* compute the hyperbolic sine or cosine + of the argument ``x``. + Angles are specified in radians. *sinh*(``x``) is defined as + @ifnottex + . (exp(``x``) - exp(-``x``))/2 + @end ifnottex + @tex + $${e^x - e^{-x}}\over 2$$ + @end tex + *cosh* is defined as + @ifnottex + . (exp(``x``) - exp(-``x``))/2 + @end ifnottex + @tex + $${e^x + e^{-x}}\over 2$$ + @end tex + + *sinhf* and *coshf* are identical, save that they take + and returns *float* values. + + + +**STATUS CODES:** + + The hyperbolic sine or cosine of ``x`` is returned. + + When the correct result is too large to be representable (an + overflow), the functions return *HUGE_VAL* with the + appropriate sign, and sets the global value *errno* to + *ERANGE*. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_sqrt.rst b/posix-users/newlib/libm/mathfp/s_sqrt.rst new file mode 100644 index 0000000..054c40b --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_sqrt.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_sqrt.c + +.. COMMENT: Generated on: 2018-08-20 + +.. sqrt, sqrtf: + +sqrt, sqrtf - Positive square root +------------------------------------------------ +.. index:: sqrt +.. index:: sqrtf +.. index:: positive square root + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double sqrt(double x); + float sqrtf(float x); + + + +**DESCRIPTION:** + + *sqrt* computes the positive square root of the argument. + + + +**STATUS CODES:** + + On success, the square root is returned. If ``x`` is real and + positive, then the result is positive. If ``x`` is real and + negative, the global value *errno* is set to *EDOM* (domain error). + + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/s_tan.rst b/posix-users/newlib/libm/mathfp/s_tan.rst new file mode 100644 index 0000000..427cbf6 --- /dev/null +++ b/posix-users/newlib/libm/mathfp/s_tan.rst @@ -0,0 +1,42 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/s_tan.c + +.. COMMENT: Generated on: 2018-08-20 + +.. tan, tanf: + +tan, tanf - Tangent +--------------------------------- +.. index:: tan +.. index:: tanf +.. index:: tangent + +**CALLING SEQUENCE:** + +.. code-block:: c + + #include <math.h> + double tan(double x); + float tanf(float x); + + + +**DESCRIPTION:** + +*tan* computes the tangent of the argument ``x``. +Angles are specified in radians. + +*tanf* is identical, save that it takes and returns *float* values. + + + +**STATUS CODES:** + +The tangent of ``x`` is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/newlib/libm/mathfp/w_jn.rst b/posix-users/newlib/libm/mathfp/w_jn.rst new file mode 100644 index 0000000..3e3de8e --- /dev/null +++ b/posix-users/newlib/libm/mathfp/w_jn.rst @@ -0,0 +1,71 @@ +.. COMMENT: This file was automatically generated from the file: + +.. COMMENT: /home/joel/test-gcc/newlib-cygwin/newlib/libm/mathfp/w_jn.c + +.. COMMENT: Generated on: 2018-08-20 + +.. jN, jNf, yN, yNf: + +jN, jNf, yN, yNf - Bessel functions +--------------------------------------------- +.. index:: jN +.. index:: jNf +.. index:: yN +.. index:: yNf +.. index:: Bessel functions + +**CALLING SEQUENCE:** + +.. code-block:: c + +#include <math.h> +double j0(double x); +float j0f(float x); +double j1(double x); +float j1f(float x); +double jn(int n, double x); +float jnf(int n, float x); +double y0(double x); +float y0f(float x); +double y1(double x); +float y1f(float x); +double yn(int n, double x); +float ynf(int n, float x); + + + +**DESCRIPTION:** + +The Bessel functions are a family of functions that solve the +differential equation +@ifnottex +. 2 2 2 +. x y`` + xy` + (x - p )y = 0 +@end ifnottex +@tex +$$x^2{d^2y\over dx^2} + x{dy\over dx} + (x^2-p^2)y = 0$$ +@end tex +These functions have many applications in engineering and physics. + +*jn* calculates the Bessel function of the first kind of order +``n``. *j0* and *j1* are special cases for order 0 and order +1 respectively. + +Similarly, *yn* calculates the Bessel function of the second kind of +order ``n``, and *y0* and *y1* are special cases for order 0 and +1. + +*jnf*, *j0f*, *j1f*, *ynf*, *y0f*, and *y1f* perform the +same calculations, but on *float* rather than *double* values. + + + +**STATUS CODES:** + +The value of each Bessel function at ``x`` is returned. + + + +**ORIGIN:** + +The information in this section was generated from documentation included with the `Newlib C Library <https://sourceware.org/newlib/>`_. diff --git a/posix-users/services_provided_by_math.rst b/posix-users/services_provided_by_math.rst index 43a6aa5..d3feec7 100644 --- a/posix-users/services_provided_by_math.rst +++ b/posix-users/services_provided_by_math.rst @@ -90,9 +90,3 @@ Standard Math Functions (math.h) - ``tanh`` - Hyperbolic tangent -.. COMMENT: COPYRIGHT (c) 1988-2002. - -.. COMMENT: On-Line Applications Research Corporation (OAR). - -.. COMMENT: All rights reserved. - |