You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/08/03 21:31:36 UTC
cvs commit: apr/include apr_strings.h
wrowe 2002/08/03 12:31:36
Modified: . CHANGES
strings apr_strings.c
include apr_strings.h
Log:
Step one, rename from the meaningless 'll' to 'i64'.
I have nothing against spelling out apr_atoint64 but I think that's
probably excessive.
Revision Changes Path
1.314 +5 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -r1.313 -r1.314
--- CHANGES 2 Aug 2002 16:45:45 -0000 1.313
+++ CHANGES 3 Aug 2002 19:31:36 -0000 1.314
@@ -1,5 +1,10 @@
Changes with APR b1
+ *) Renamed apr_strtoll()/apr_atoll() to follow int64 convention,
+ so these new helpers are apr_strtoi64/apr_atoi64(), since
+ 'll' (long long) is a nonportable and aspecific construct.
+ [William Rowe]
+
*) don't perform a strlen on that name value without checking for NULL
first (in getopt)
[David Waite <ma...@akuma.org>, Ian Holsman]
1.33 +4 -4 apr/strings/apr_strings.c
Index: apr_strings.c
===================================================================
RCS file: /home/cvs/apr/strings/apr_strings.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- apr_strings.c 24 Jul 2002 23:31:57 -0000 1.32
+++ apr_strings.c 3 Aug 2002 19:31:36 -0000 1.33
@@ -233,19 +233,19 @@
}
#endif
-APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base)
+APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base)
{
#if (APR_HAVE_STRTOLL)
return (apr_int64_t)strtoll(buf, end, base);
#else
- /* best-effort function. If no strtoll, use strtol */
+ /* XXX This Is Absolutely Bogus */
return (apr_int64_t)strtol(buf, end, base);
#endif
}
-APR_DECLARE(apr_int64_t) apr_atoll(const char *buf)
+APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf)
{
- return apr_strtoll(buf, NULL, 0);
+ return apr_strtoi64(buf, NULL, 0);
}
APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n)
1.30 +3 -3 apr/include/apr_strings.h
Index: apr_strings.h
===================================================================
RCS file: /home/cvs/apr/include/apr_strings.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- apr_strings.h 24 Jul 2002 23:31:57 -0000 1.29
+++ apr_strings.h 3 Aug 2002 19:31:36 -0000 1.30
@@ -340,15 +340,15 @@
* base 16.
* @return The numeric value of the string.
*/
-APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base);
+APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);
/**
* parse a base-10 numeric string into a 64-bit numeric value.
- * Equivalent to apr_strtoll(buf, (char**)NULL, 10).
+ * Equivalent to apr_strtoi64(buf, (char**)NULL, 10).
* @param buf The string to parse
* @return The numeric value of the string
*/
-APR_DECLARE(apr_int64_t) apr_atoll(const char *buf);
+APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);
/**
* Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,