no more characters are available if read() returns anything less than 1,

Sun Oct 25 07:30:10 1998  Tim Janik  <timj@gtk.org>

        * gscanner.c:
        (g_scanner_peek_next_char):
        (g_scanner_get_char): no more characters are available if read() returns
        anything less than 1, not only on 0 return.

        * glib.h:
        * gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
        argument order requirements.
        (g_strsplit): renamed from g_str_array_split().
        (g_strjoinv): renamed from g_str_array_joinv(), string array is
        now passed as last parameter. removed `const' qualifier from string
        array pointer (again).
        (g_strjoin): new function from sopwith to concatenate strings with
        an additional seperator.
        (g_strfreev): renamed from g_str_array_free.
This commit is contained in:
Tim Janik 1998-10-25 06:44:49 +00:00 committed by Tim Janik
parent 36ab196523
commit e86746f168
14 changed files with 182 additions and 38 deletions

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

View File

@ -1,3 +1,21 @@
Sun Oct 25 07:30:10 1998 Tim Janik <timj@gtk.org>
* gscanner.c:
(g_scanner_peek_next_char):
(g_scanner_get_char): no more characters are available if read() returns
anything less than 1, not only on 0 return.
* glib.h:
* gstrfuncs.c: final API cleanup of string arrays to suit sopwith's
argument order requirements.
(g_strsplit): renamed from g_str_array_split().
(g_strjoinv): renamed from g_str_array_joinv(), string array is
now passed as last parameter. removed `const' qualifier from string
array pointer (again).
(g_strjoin): new function from sopwith to concatenate strings with
an additional seperator.
(g_strfreev): renamed from g_str_array_free.
Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org> Sat Oct 24 22:23:04 PDT 1998 Manish Singh <yosh@gimp.org>
* gnode.c: small fix to g_node_children_foreach to make it work right. * gnode.c: small fix to g_node_children_foreach to make it work right.

18
glib.h
View File

@ -1373,22 +1373,22 @@ gchar* g_strnfill (guint length,
gchar fill_char); gchar fill_char);
gchar* g_strconcat (const gchar *string1, gchar* g_strconcat (const gchar *string1,
...); /* NULL terminated */ ...); /* NULL terminated */
gchar* g_strjoin (const gchar *separator,
...); /* NULL terminated */
/* NULL terminated string arrays. /* NULL terminated string arrays.
* g_str_array_split() splits up string into max_tokens tokens at delim and * g_strsplit() splits up string into max_tokens tokens at delim and
* returns a newly allocated string array. * returns a newly allocated string array.
* g_str_array_joinv() concatenates all of str_array's strings, sliding in an * g_strjoinv() concatenates all of str_array's strings, sliding in an
* optional separator, the returned string is newly allocated. * optional separator, the returned string is newly allocated.
* g_str_array_free() frees the array itself and all of its strings. * g_strfreev() frees the array itself and all of its strings.
*/ */
gchar** g_str_array_split (const gchar *string, gchar** g_strsplit (const gchar *string,
const gchar *delimiter, const gchar *delimiter,
gint max_tokens); gint max_tokens);
gchar* g_str_array_joinv (const gchar *separator, gchar* g_strjoinv (const gchar *separator,
const gchar **str_array); gchar **str_array);
gchar* g_str_array_join (const gchar *separator, void g_strfreev (gchar **str_array);
...);
void g_str_array_free (gchar **str_array);

View File

@ -1373,22 +1373,22 @@ gchar* g_strnfill (guint length,
gchar fill_char); gchar fill_char);
gchar* g_strconcat (const gchar *string1, gchar* g_strconcat (const gchar *string1,
...); /* NULL terminated */ ...); /* NULL terminated */
gchar* g_strjoin (const gchar *separator,
...); /* NULL terminated */
/* NULL terminated string arrays. /* NULL terminated string arrays.
* g_str_array_split() splits up string into max_tokens tokens at delim and * g_strsplit() splits up string into max_tokens tokens at delim and
* returns a newly allocated string array. * returns a newly allocated string array.
* g_str_array_joinv() concatenates all of str_array's strings, sliding in an * g_strjoinv() concatenates all of str_array's strings, sliding in an
* optional separator, the returned string is newly allocated. * optional separator, the returned string is newly allocated.
* g_str_array_free() frees the array itself and all of its strings. * g_strfreev() frees the array itself and all of its strings.
*/ */
gchar** g_str_array_split (const gchar *string, gchar** g_strsplit (const gchar *string,
const gchar *delimiter, const gchar *delimiter,
gint max_tokens); gint max_tokens);
gchar* g_str_array_joinv (const gchar *separator, gchar* g_strjoinv (const gchar *separator,
const gchar **str_array); gchar **str_array);
gchar* g_str_array_join (const gchar *separator, void g_strfreev (gchar **str_array);
...);
void g_str_array_free (gchar **str_array);

View File

@ -711,7 +711,7 @@ g_scanner_peek_next_char (GScanner *scanner)
} }
while (count == -1 && (errno == EINTR || errno == EAGAIN)); while (count == -1 && (errno == EINTR || errno == EAGAIN));
if (!count) if (count < 1)
{ {
scanner->input_fd = -1; scanner->input_fd = -1;
@ -750,7 +750,7 @@ g_scanner_get_char (GScanner *scanner,
} }
while (count == -1 && (errno == EINTR || errno == EAGAIN)); while (count == -1 && (errno == EINTR || errno == EAGAIN));
if (!count) if (count < 1)
{ {
scanner->input_fd = -1; scanner->input_fd = -1;
fchar = 0; fchar = 0;

View File

@ -1021,9 +1021,9 @@ g_strchomp (gchar *string)
} }
gchar** gchar**
g_str_array_split (const gchar *string, g_strsplit (const gchar *string,
const gchar *delimiter, const gchar *delimiter,
gint max_tokens) gint max_tokens)
{ {
GSList *string_list = NULL, *slist; GSList *string_list = NULL, *slist;
gchar **str_array, *s; gchar **str_array, *s;
@ -1076,7 +1076,7 @@ g_str_array_split (const gchar *string,
} }
void void
g_str_array_free (gchar **str_array) g_strfreev (gchar **str_array)
{ {
if (str_array) if (str_array)
{ {
@ -1090,8 +1090,8 @@ g_str_array_free (gchar **str_array)
} }
gchar* gchar*
g_str_array_joinv (const gchar *separator, g_strjoinv (const gchar *separator,
const gchar **str_array) gchar **str_array)
{ {
gchar *string; gchar *string;
@ -1126,8 +1126,8 @@ g_str_array_joinv (const gchar *separator,
} }
gchar* gchar*
g_str_array_join (const gchar *separator, g_strjoin (const gchar *separator,
...) ...)
{ {
gchar *string, *s; gchar *string, *s;
va_list args; va_list args;

View File

@ -711,7 +711,7 @@ g_scanner_peek_next_char (GScanner *scanner)
} }
while (count == -1 && (errno == EINTR || errno == EAGAIN)); while (count == -1 && (errno == EINTR || errno == EAGAIN));
if (!count) if (count < 1)
{ {
scanner->input_fd = -1; scanner->input_fd = -1;
@ -750,7 +750,7 @@ g_scanner_get_char (GScanner *scanner,
} }
while (count == -1 && (errno == EINTR || errno == EAGAIN)); while (count == -1 && (errno == EINTR || errno == EAGAIN));
if (!count) if (count < 1)
{ {
scanner->input_fd = -1; scanner->input_fd = -1;
fchar = 0; fchar = 0;

View File

@ -1021,9 +1021,9 @@ g_strchomp (gchar *string)
} }
gchar** gchar**
g_str_array_split (const gchar *string, g_strsplit (const gchar *string,
const gchar *delimiter, const gchar *delimiter,
gint max_tokens) gint max_tokens)
{ {
GSList *string_list = NULL, *slist; GSList *string_list = NULL, *slist;
gchar **str_array, *s; gchar **str_array, *s;
@ -1076,7 +1076,7 @@ g_str_array_split (const gchar *string,
} }
void void
g_str_array_free (gchar **str_array) g_strfreev (gchar **str_array)
{ {
if (str_array) if (str_array)
{ {
@ -1090,8 +1090,8 @@ g_str_array_free (gchar **str_array)
} }
gchar* gchar*
g_str_array_joinv (const gchar *separator, g_strjoinv (const gchar *separator,
const gchar **str_array) gchar **str_array)
{ {
gchar *string; gchar *string;
@ -1126,8 +1126,8 @@ g_str_array_joinv (const gchar *separator,
} }
gchar* gchar*
g_str_array_join (const gchar *separator, g_strjoin (const gchar *separator,
...) ...)
{ {
gchar *string, *s; gchar *string, *s;
va_list args; va_list args;