mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
added argument assertments.
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org> * gutils.c (g_snprintf): (g_vsnprintf): added argument assertments. * gstring.c (g_string_assign): added argument assertments. (g_string_truncate): make len a guint.
This commit is contained in:
parent
1e5d06d4ce
commit
1fe02b28ad
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf):
|
||||||
|
(g_vsnprintf): added argument assertments.
|
||||||
|
|
||||||
|
* gstring.c (g_string_assign): added argument assertments.
|
||||||
|
(g_string_truncate): make len a guint.
|
||||||
|
|
||||||
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
* gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
|
||||||
|
2
glib.h
2
glib.h
@ -1864,7 +1864,7 @@ void g_string_free (GString *string,
|
|||||||
GString* g_string_assign (GString *string,
|
GString* g_string_assign (GString *string,
|
||||||
const gchar *rval);
|
const gchar *rval);
|
||||||
GString* g_string_truncate (GString *string,
|
GString* g_string_truncate (GString *string,
|
||||||
gint len);
|
guint len);
|
||||||
GString* g_string_insert_len (GString *string,
|
GString* g_string_insert_len (GString *string,
|
||||||
gint pos,
|
gint pos,
|
||||||
const gchar *val,
|
const gchar *val,
|
||||||
|
@ -1864,7 +1864,7 @@ void g_string_free (GString *string,
|
|||||||
GString* g_string_assign (GString *string,
|
GString* g_string_assign (GString *string,
|
||||||
const gchar *rval);
|
const gchar *rval);
|
||||||
GString* g_string_truncate (GString *string,
|
GString* g_string_truncate (GString *string,
|
||||||
gint len);
|
guint len);
|
||||||
GString* g_string_insert_len (GString *string,
|
GString* g_string_insert_len (GString *string,
|
||||||
gint pos,
|
gint pos,
|
||||||
const gchar *val,
|
const gchar *val,
|
||||||
|
@ -280,7 +280,7 @@ g_string_assign (GString *string,
|
|||||||
|
|
||||||
GString*
|
GString*
|
||||||
g_string_truncate (GString *fstring,
|
g_string_truncate (GString *fstring,
|
||||||
gint len)
|
guint len)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString *) fstring;
|
GRealString *string = (GRealString *) fstring;
|
||||||
|
|
||||||
|
@ -149,6 +149,10 @@ g_snprintf (gchar *str,
|
|||||||
va_list args;
|
va_list args;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
@ -164,6 +168,10 @@ g_snprintf (gchar *str,
|
|||||||
gchar *printed;
|
gchar *printed;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
printed = g_strdup_vprintf (fmt, args);
|
printed = g_strdup_vprintf (fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
@ -186,6 +194,10 @@ g_vsnprintf (gchar *str,
|
|||||||
#ifdef HAVE_VSNPRINTF
|
#ifdef HAVE_VSNPRINTF
|
||||||
gint retval;
|
gint retval;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
|
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
@ -198,6 +210,10 @@ g_vsnprintf (gchar *str,
|
|||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
printed = g_strdup_vprintf (fmt, args);
|
printed = g_strdup_vprintf (fmt, args);
|
||||||
strncpy (str, printed, n);
|
strncpy (str, printed, n);
|
||||||
str[n-1] = '\0';
|
str[n-1] = '\0';
|
||||||
|
@ -280,7 +280,7 @@ g_string_assign (GString *string,
|
|||||||
|
|
||||||
GString*
|
GString*
|
||||||
g_string_truncate (GString *fstring,
|
g_string_truncate (GString *fstring,
|
||||||
gint len)
|
guint len)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString *) fstring;
|
GRealString *string = (GRealString *) fstring;
|
||||||
|
|
||||||
|
16
gutils.c
16
gutils.c
@ -149,6 +149,10 @@ g_snprintf (gchar *str,
|
|||||||
va_list args;
|
va_list args;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
@ -164,6 +168,10 @@ g_snprintf (gchar *str,
|
|||||||
gchar *printed;
|
gchar *printed;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
printed = g_strdup_vprintf (fmt, args);
|
printed = g_strdup_vprintf (fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
@ -186,6 +194,10 @@ g_vsnprintf (gchar *str,
|
|||||||
#ifdef HAVE_VSNPRINTF
|
#ifdef HAVE_VSNPRINTF
|
||||||
gint retval;
|
gint retval;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
|
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
@ -198,6 +210,10 @@ g_vsnprintf (gchar *str,
|
|||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
|
|
||||||
|
g_return_val_if_fail (str != NULL, 0);
|
||||||
|
g_return_val_if_fail (n > 0, 0);
|
||||||
|
g_return_val_if_fail (fmt != NULL, 0);
|
||||||
|
|
||||||
printed = g_strdup_vprintf (fmt, args);
|
printed = g_strdup_vprintf (fmt, args);
|
||||||
strncpy (str, printed, n);
|
strncpy (str, printed, n);
|
||||||
str[n-1] = '\0';
|
str[n-1] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user