minor code cleanups.

Thu Apr 29 02:16:36 1999  Tim Janik  <timj@gtk.org>

        * gstrfuncs.c: minor code cleanups.
This commit is contained in:
Tim Janik 1999-04-29 00:18:54 +00:00 committed by Tim Janik
parent ff140aa613
commit d5a1c85ba6
12 changed files with 114 additions and 68 deletions

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

View File

@ -1,3 +1,7 @@
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: minor code cleanups.
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from

2
glib.h
View File

@ -702,6 +702,7 @@ typedef struct _GTuples GTuples;
typedef union _GTokenValue GTokenValue;
typedef struct _GIOChannel GIOChannel;
/* Tree traverse flags */
typedef enum
{
G_TRAVERSE_LEAFS = 1 << 0,
@ -710,6 +711,7 @@ typedef enum
G_TRAVERSE_MASK = 0x03
} GTraverseFlags;
/* Tree traverse orders */
typedef enum
{
G_IN_ORDER,

View File

@ -702,6 +702,7 @@ typedef struct _GTuples GTuples;
typedef union _GTokenValue GTokenValue;
typedef struct _GIOChannel GIOChannel;
/* Tree traverse flags */
typedef enum
{
G_TRAVERSE_LEAFS = 1 << 0,
@ -710,6 +711,7 @@ typedef enum
G_TRAVERSE_MASK = 0x03
} GTraverseFlags;
/* Tree traverse orders */
typedef enum
{
G_IN_ORDER,

View File

@ -1254,30 +1254,35 @@ g_strjoin (const gchar *separator,
s = va_arg (args, gchar*);
if(s) {
len = strlen(s) + 1;
if (s)
{
len = strlen (s);
while((s = va_arg(args, gchar*)))
s = va_arg (args, gchar*);
while (s)
{
len += separator_len + strlen (s);
s = va_arg (args, gchar*);
}
va_end (args);
string = g_new (gchar, len);
string = g_new (gchar, len + 1);
*string = 0;
va_start (args, separator);
*string = 0;
s = va_arg (args, gchar*);
strcat (string, s);
while((s = va_arg(args, gchar*)))
s = va_arg (args, gchar*);
while (s)
{
strcat (string, separator);
strcat (string, s);
s = va_arg (args, gchar*);
}
} else
}
else
string = g_strdup ("");
va_end (args);

View File

@ -1254,30 +1254,35 @@ g_strjoin (const gchar *separator,
s = va_arg (args, gchar*);
if(s) {
len = strlen(s) + 1;
if (s)
{
len = strlen (s);
while((s = va_arg(args, gchar*)))
s = va_arg (args, gchar*);
while (s)
{
len += separator_len + strlen (s);
s = va_arg (args, gchar*);
}
va_end (args);
string = g_new (gchar, len);
string = g_new (gchar, len + 1);
*string = 0;
va_start (args, separator);
*string = 0;
s = va_arg (args, gchar*);
strcat (string, s);
while((s = va_arg(args, gchar*)))
s = va_arg (args, gchar*);
while (s)
{
strcat (string, separator);
strcat (string, s);
s = va_arg (args, gchar*);
}
} else
}
else
string = g_strdup ("");
va_end (args);