Message-ID: <001401c28231$db1d3cd0$0100a8c0@p4> From: "Andrew Cottrell" To: Subject: LIBC 2.04 new function atoll() implementation Date: Sat, 2 Nov 2002 16:36:21 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Reply-To: djgpp-workers AT delorie DOT com Below are atoll.c and atoll.txh, which together implement the missing atoll() function. I copied the existing atol.c and atol.txh and made hopefully the correct changes. Please let me know if I have made any mistakes as I don't know if I got the compatability right. The files are all from the src\libc\ansi\stdlib directory. ==================== START atoll.c ==================== /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */ #include long long atoll(const char *str) { return strtoll(str, 0, 10); } ==================== END atoll.c ==================== ==================== START atoll.txh ==================== @node atoll, string @subheading Syntax @example #include long long atoll(const char *string); @end example @subheading Description Convert as much of the string as possible to an equivalent long long integer value. This function is almost like @code{strtoll(string, NULL, 10)} (@pxref{strtol}). @subheading Return Value The equivalent value, or zero if the string does not represent a number. @subheading Portability @portability !ansi-c89, ansi-c99 @subheading Example @example main(int argc, char **argv) @{ long long l = atoll(argv[1]); @dots{} @end example ==================== END atoll.txh =================== ==================== START src\libc\ansi\stdlib\makefile patch ============ *** makefile.old Sat Nov 2 16:12:56 2002 --- makefile Sat Nov 2 15:40:50 2002 *************** *** 10,15 **** --- 10,16 ---- SRC += atof.c SRC += atoi.c SRC += atol.c + SRC += atoll.c SRC += atold.c SRC += bsearch.c SRC += calloc.c ==================== END src\libc\ansi\stdlib\makefile patch ============