Commit Graph

16 Commits

Author SHA1 Message Date
Joel Sherrill ecf453f963 Add simple versions of random() and srandom()
Prototypes also added for initstate() and setstate() but they
were not implemented in the shared newlib code.

	* newlib/libc/include/cygwin/stdlib.h: Prototypes added.
	* winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed.
	* newlib/libc/stdlib/random.c: New file.
	* newlib/libc/machine/epiphany/machine/stdlib.h: Removed
	* newlib/libc/stdlib/Makefile.am: Added random.c.
	* newlib/libc/stdlib/stdlib.tex: Added random.def.
	* newlib/libc/stdlib/Makefile.in: Regenerated.
2016-03-28 22:39:50 -05:00
Yaakov Selkowitz 1c1a925fc4 Fix typo in rpmatch doc reference
* libc/stdlib/stdlib.tex: Fix typo in rpmatch reference.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2015-11-19 15:28:06 -06:00
Yaakov Selkowitz 9a6acafd04 Add rpmatch(3)
2015-11-17  Yaakov Selkowitz  <yselkowi@redhat.com>

* libc/include/stdlib.h (rpmatch): Declare.
* libc/stdlib/Makefile.am (ELIX_4_SOURCES): Add rpmatch.c.
(CHEWOUT_FILES): Add rpmatch.def.
* libc/stdlib/Makefile.in: Regenerate.
* libc/stdlib/rpmatch.c: New file.
* libc/stdlib/stdlib.tex: Add references to rpmatch.
2015-11-17 12:00:20 -06:00
Jon TURNEY a4dd7dd87c Use makedoc output files which are generated but aren't included
I think these are accidental omissions, as these source files are listed to be
chewed by makedoc, but the result is not included by any texinfo source file.

Future work: Nothing in libc/reent/ which is processed by makedoc is included by
reent.tex

2015-06-23  Jon Turney  <jon.turney@dronecode.org.uk>

	* libc/stdlib/stdlib.tex: Include itoa and utoa, and add to menu.
	* libc/string/strings.tex: Include memrchr and rawmemchr, and add
	to menu.
	* libm/math/math.tex: Include exp10 and pow10, and add to menu.
	* libm/common/s_exp10.c: Improve one-line description.
	* libm/common/s_exp10.c: Ditto.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-24 12:23:55 +01:00
Jon TURNEY de5e58a640 Fix typo-ed function names in efgcvt.c documentation
Fix typo-ed function names in efgcvt.c documentation, neither gvcvt nor gdvtf
exists.

2015-06-23  Jon Turney  <jon.turney@dronecode.org.uk>

	* libc/stdlib/efgcvt.c: Fix typo-ed function names in
	documentation.
	* libc/stdlib/stdlib.tex: Fix function name in menu to match.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 20:56:30 +01:00
Jeff Johnston 2d69f00e6e 2010-01-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/search/Makefile.am: Create .def files for bsearch and qsort.
        * libc/search/Makefile.in: Regenerated.
        * libc/stdlib/stdlib.tex: Add bsearch and qsort.
2010-01-29 23:04:21 +00:00
Jeff Johnston 297367e3b3 2009-02-25 Brooks Moses <brooks@codesourcery.com>
* libc/stdlib/Makefile.am (CHEWOUT_FILES): Add
          mbsnrtowcs.def, wcsnrtombs.def.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/stdlib/stdlib.tex (@menu): Use correct section
          names for mbsrtowcs, wcsrtombs.
        * libc/stdlib/wcstod.c: Remove stray character in
          documentation.
2009-02-25 21:33:18 +00:00
Corinna Vinschen 2e10d61ccb * libc/include/wchar.h (mbsnrtowcs): Declare.
(_mbsnrtowcs_r): Declare.
	(wcsnrtombs): Declare.
	(_wcsnrtombs_r): Declare.
	* libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c
	and wcsnrtombs.c.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r
	and mbsnrtowcs.  Document mbsnrtowcs and mbsrtowcs.
	* libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r.
	(mbsrtowcs): Ditto.
	* libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r
	and wcsnrtombs.  Document wcsrtombs and wcsnrtombs.
	* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r.
	(wcsrtombs): Ditto.
	* libc/stdlib/stdlib.tex: Accommodate new documentation.
2009-02-19 09:19:42 +00:00
Jeff Johnston 77ea728b96 2009-02-12 Corinna Vinschen <corinna@vinschen.de>
* libc/include/wchar.h (_wcstod_r): Declare.
        (_wcstof_r): Declare.
        (wcstod): Declare.
        (wcstof): Declare.
        * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstod.c.
        (CHEWOUT_FILES): Add wcstod.def.
        * libc/stdlib/Makefile.in: Regenerate.
        * libc/stdlib/stdlib.tex: Add wcstod.
        * libc/stdlib/wcstod.c: New file.
2009-02-12 23:10:01 +00:00
Corinna Vinschen dec27025b2 * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul,
wcstoull, _wcstol_r, _wcstoll_r, _wcstoul_r and _wcstoull_r.
	* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstol.c and wcstoul.c.
	(EXTENDED_SOURCES): Add wcstoll.c, wcstoll_r.c, wcstoull.c and
	wcstoull_r.c.
	(CHEWOUT_FILES): Add .def files accordingly.
	* libc/stdlib/Makefile.in: Regenerate.
	* libc/stdlib/stdlib.tex: Add documentation links for above functions.
	* libc/stdlib/strtoll.c: Fix portability note.
	* libc/stdlib/strtoull.c: Ditto.
	* libc/stdlib/wcstol.c: New file.
	* libc/stdlib/wcstoll.c: New file.
	* libc/stdlib/wcstoll_r.c: New file.
	* libc/stdlib/wcstoul.c: New file.
	* libc/stdlib/wcstoull.c: New file.
	* libc/stdlib/wcstoull_r.c: New file.
2007-07-06 20:03:28 +00:00
Jeff Johnston 14613e5e74 2004-09-16 Antony King <antony.king@st.com>
* libc/ctype/ctype.tex: Added missing documentation.
        * libc/stdio/stdio.tex Ditto.
        * libc/stdlib/stdlib.tex Ditto.
        * libc/string/strings.tex Ditto.
        * libc/time/time.tex: Ditto.
        * libc/stdio/setbuffer.c: Removed setlinebuf documentation.
2004-09-16 21:15:14 +00:00
Jeff Johnston 6bbb700c34 2003-11-27 Artem B. Bityuckiy <mail_lists@mail.ru>
Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/stdlib.h (lldiv_t): New type.
        (atoll, llabs, lldiv): New prototypes.
        * libc/stdlib/Makefile.am: Add support for atoll, llabs, and lldiv.
        * libc/stdlib/stdlib.tex: Ditto.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/atoll.c: New file.
        * libc/stdlib/llabs.c: Ditto.
        * libc/stdlib/lldiv.c: Ditto.
2003-11-27 19:47:19 +00:00
Thomas Fitzsimmons a7b23a8f11 * Makefile.am (LIB_OBJECTLISTS): Add
libc/search/objectlist.awk.in.
	* libc/Makefile.am (SUBDIRS): Add search.
	(SUBLIBS): Add search/libsearch.la.
	* libc/configure.in (AC_OUTPUT): Add search/Makefile.
	* libc/search: New directory.
	* libc/search/Makefile.am: New file.
	* libc/search/extern.h: New file.
	* libc/search/hash.c: New file.
	* libc/search/hash.h: New file.
	* libc/search/hash_bigkey.c: New file.
	* libc/search/hash_buf.c: New file.
	* libc/search/hash_func.c: New file.
	* libc/search/hash_log2.c: New file.
	* libc/search/hash_page.c: New file.
	* libc/search/hcreate.3: New file.
	* libc/search/hcreate.c: New file.
	* libc/search/hcreate.c~: New file.
	* libc/search/hcreate_r.c: New file.
	* libc/search/ndbm.c: New file.
	* libc/search/page.h: New file.
	* libc/search/tdelete.c: New file.
	* libc/search/tdestroy.c: New file.
	* libc/search/tfind.c: New file.
	* libc/search/tsearch.3: New file.
	* libc/search/tsearch.c: New file.
	* libc/search/twalk.c: New file.
	* libc/include/db.h: New file.
	* libc/include/ndbm.h: New file.
	* libc/include/search.h: New file.
	* libc/include/sys/queue.h: New file.
	* libc/include/sys/cdefs.h: New file.
	* libc/include/sys/param.h
	[__IEEE_LITTLE_ENDIAN,__IEEE_BIG_ENDIAN]: Set BYTE_ORDER to
	LITTLE_ENDIAN or BIG_ENDIAN.
	* libc/include/sys/errno.h (EFTYPE): New macro.
	* libc/search/bsearch.c: Move from libc/stdlib.
	* libc/search/qsort.c: Likewise.
	* libc/stdlib/Makefile.am (LIB_SOURCES): Remove bsearch.c and
	qsort.c.
	(CHEWOUT_FILES): Remove bsearch.def and qsort.def.
	* libc/stdlib/stdlib.tex: Remove references to bsearch and qsort.
2002-06-20 19:51:40 +00:00
Thomas Fitzsimmons bfc27bae1a * Various formatting and whitespace changes. 2002-04-30 18:23:40 +00:00
Jeff Johnston ab4745dcb2 2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* libc/include/stdlib.h: Add declarations of rand48 functions and
        their reentrant versions.
        * libc/include/sys/reent.h: Move macros from rand48.h. Add
        struct _rand48 for shared parameters of rand48 functions.
        (struct _reent): Add a variable _r48 of struct _rand48.
        (_REENT_INIT): Add _r48 initialization.
        * libc/stdlib/Makefile.am (lib_a_SOURCES): Add rand48 functions.
        (CHEWOUT_FILES): Add rand48.def.
        * libc/stdlib/Makefile.am: Add dependencies for rand48 functions.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/drand48.c (drand48, _drand48_r): Derived from the
        NetBSD C library.
        * libc/stdlib/erand48.c (erand48, _erand48_r): Ditto.
        * libc/stdlib/jrand48.c (jrand48, _jrand48_r): Ditto.
        * libc/stdlib/lcong48.c (lcong48, _lcong48_r): Ditto.
        * libc/stdlib/lrand48.c (lrand48, _lrand48_r): Ditto.
        * libc/stdlib/mrand48.c (mrand48, _mrand48_r): Ditto.
        * libc/stdlib/nrand48.c (nrand48, _nrand48_r): Ditto.
        * libc/stdlib/seed48.c (seed48, _seed48_r): Ditto.
        * libc/stdlib/srand48.c (srand48, _srand48_r): Ditto.
        * libc/stdlib/rand48.c (__dorand48): Ditto.
        * libc/stdlib/rand48.h: Ditto, and modify declarations of global
        parameters into macros referring them in the reentrant structure.
2001-02-15 02:04:55 +00:00
Christopher Faylor 8a0efa53e4 import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00