Commit 42d19621 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Return 0 on error, not NULL.

2000-07-26  Tor Lillqvist  <tml@iki.fi>

	* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.

	* glib.def: Add g_strlcpy, g_strlcat.

	* glibconfig.h.win32.in: Add gsize and gssize.
parent f0cdf868
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
2000-07-26 Tor Lillqvist <tml@iki.fi>
* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.
* glib.def: Add g_strlcpy, g_strlcat.
* glibconfig.h.win32.in: Add gsize and gssize.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
......
......@@ -423,6 +423,8 @@ EXPORTS
g_string_up
g_strjoin
g_strjoinv
g_strlcat
g_strlcpy
g_strncasecmp
g_strndup
g_strnfill
......
......@@ -423,6 +423,8 @@ EXPORTS
g_string_up
g_strjoin
g_strjoinv
g_strlcat
g_strlcpy
g_strncasecmp
g_strndup
g_strnfill
......
......@@ -850,8 +850,8 @@ g_strlcpy (gchar *dest,
register const gchar *s = src;
register gsize n = dest_size;
g_return_val_if_fail (dest != NULL, NULL);
g_return_val_if_fail (src != NULL, NULL);
g_return_val_if_fail (dest != NULL, 0);
g_return_val_if_fail (src != NULL, 0);
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0)
......@@ -899,8 +899,8 @@ g_strlcat (gchar *dest,
register gsize bytes_left = dest_size;
gsize dlength; /* Logically, MIN (strlen (d), dest_size) */
g_return_val_if_fail (dest != NULL, NULL);
g_return_val_if_fail (src != NULL, NULL);
g_return_val_if_fail (dest != NULL, 0);
g_return_val_if_fail (src != NULL, 0);
/* Find the end of dst and adjust bytes left but don't go past end */
while (*d != 0 && bytes_left-- != 0)
......@@ -1343,7 +1343,7 @@ g_filename_from_utf8 (const gchar *utf8string)
{
#ifdef G_OS_WIN32
gint i, mask, clen, wclen, mblen;
gint i, mask, clen, mblen;
const gint len = strlen (utf8string);
wchar_t *wcs, *wcp;
gchar *result;
......
......@@ -82,6 +82,9 @@ typedef unsigned long long guint64;
#define G_GINT64_FORMAT "I64i"
#define G_GUINT64_FORMAT "I64u"
typedef gint32 gssize;
typedef guint32 gsize;
#define GPOINTER_TO_INT(p) ((gint)(p))
#define GPOINTER_TO_UINT(p) ((guint)(p))
......
......@@ -850,8 +850,8 @@ g_strlcpy (gchar *dest,
register const gchar *s = src;
register gsize n = dest_size;
g_return_val_if_fail (dest != NULL, NULL);
g_return_val_if_fail (src != NULL, NULL);
g_return_val_if_fail (dest != NULL, 0);
g_return_val_if_fail (src != NULL, 0);
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0)
......@@ -899,8 +899,8 @@ g_strlcat (gchar *dest,
register gsize bytes_left = dest_size;
gsize dlength; /* Logically, MIN (strlen (d), dest_size) */
g_return_val_if_fail (dest != NULL, NULL);
g_return_val_if_fail (src != NULL, NULL);
g_return_val_if_fail (dest != NULL, 0);
g_return_val_if_fail (src != NULL, 0);
/* Find the end of dst and adjust bytes left but don't go past end */
while (*d != 0 && bytes_left-- != 0)
......@@ -1343,7 +1343,7 @@ g_filename_from_utf8 (const gchar *utf8string)
{
#ifdef G_OS_WIN32
gint i, mask, clen, wclen, mblen;
gint i, mask, clen, mblen;
const gint len = strlen (utf8string);
wchar_t *wcs, *wcp;
gchar *result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment