Sat Mar 26 11:26:00 2005  Soeren Sandmann  <sandmann@redhat.com>

	* TODO: Updates

	* sfile.c (add_string): Use g_markup_escape_text() to escape the
	string before adding it to the file.

	* sysprof.c (empty_file_descriptor): New function to make sure
	samples generated before profiling started are ignored.
	(set_busy): New commented out function to set a busy cursor.
This commit is contained in:
Soeren Sandmann
2005-03-26 16:34:11 +00:00
committed by Søren Sandmann Pedersen
parent 1787419687
commit cc25479579
4 changed files with 107 additions and 28 deletions

22
sfile.c
View File

@ -1369,27 +1369,11 @@ add_integer (GString *output, int value)
static void
add_string (GString *output, const char *str)
{
#if 0
/* FIXME: strings need to be encoded so that special
* xml characters can be added, and so they don't get
* confused with the deletion of whitespace-only
* text entries
*/
g_string_append_printf (output, "%s", str);
#endif
int i;
char *escaped = g_markup_escape_text (str, -1);
g_string_append_c (output, '\"');
for (i = 0; str[i] != '\0'; ++i)
{
if (str[i] == '\"')
g_string_append_printf (output, "%s", "\\\"");
else if (str[i] == '\\')
g_string_append_printf (output, "\\\\");
else
g_string_append_c (output, str[i]);
}
g_string_append (output, escaped);
g_string_append_c (output, '\"');
g_free (escaped);
}
static void