diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-10-30 05:49:41 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-10-30 05:49:41 +0000 |
commit | d33e4cc381cdffe9905ff511ada87c0a416efb89 (patch) | |
tree | 3d6f645e250d9204aae3f99733b40e6e78baa91d /plugins/wimaxasncp/wimaxasncp_dict.l | |
parent | c5f289590709db4fd7f5bd1e8e7d6ce67f9b3bac (diff) |
Change a few g_string_append_printf() (GTK2 only) calls to g_strdup_printf()
and g_string_append() to work on GTK 1.2 also.
svn path=/trunk/; revision=23311
Diffstat (limited to 'plugins/wimaxasncp/wimaxasncp_dict.l')
-rw-r--r-- | plugins/wimaxasncp/wimaxasncp_dict.l | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l index 8f63dfa3e8..2b7b69d615 100644 --- a/plugins/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/wimaxasncp/wimaxasncp_dict.l @@ -252,7 +252,7 @@ decoder_attr decoder=\042 <LOADING>{any} APPEND(yytext,yyleng); <LOADING,IN_DICT>{entity} { - gchar *p = ++yytext; + gchar *p = ++yytext, *temp_str; entity_t* e; while(*p != ';') p++; @@ -262,7 +262,7 @@ decoder_attr decoder=\042 D(("looking for entity: %s\n",yytext)); if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) { - g_string_append_printf( + dict_error = g_string_append( dict_error, "included files nested too deeply\n"); yyterminate(); } @@ -284,8 +284,10 @@ decoder_attr decoder=\042 } if (!e) { - g_string_append_printf( - dict_error, "cannot find entity: '%s'\n", e->name); + temp_str = g_strdup_printf( + "cannot find entity: '%s'\n", e->name); + dict_error = g_string_append(dict_error, temp_str); + g_free(temp_str); yyterminate(); } @@ -567,7 +569,7 @@ static FILE *wimaxasncp_dict_open( const gchar *filename) { FILE *fh; - gchar *fname; + gchar *fname, *temp_str; if (system_directory) { int len = strlen(system_directory) + strlen(filename) @@ -587,11 +589,13 @@ static FILE *wimaxasncp_dict_open( if ( ! fh) { - g_string_append_printf( - dict_error, + temp_str = g_strdup_printf( "cannot open file: '%s', error: %s\n", fname, g_strerror(errno)); + + dict_error = g_string_append(dict_error, temp_str); + g_free(temp_str); } g_free(fname); |