From 5711671c999a0014dab398f27f35aa27e4bd0620 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 26 Feb 2026 20:24:04 +0100 Subject: [PATCH] refactor: roster export uses GString and g_file_set_contents now Modernize the /export command implementation by adopting GLib-based patterns for string manipulation and file handling. * Replace _writecsv with _append_csv_escaped to efficiently handle CSV quote doubling directly within a GString buffer * Refactor cmd_export to build the CSV content in memory using GString, minimizing system calls * Use g_file_set_contents for atomic writing --- src/command/cmd_funcs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index c378b7b3..1ce9e782 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -1074,7 +1074,6 @@ cmd_script(ProfWin* window, const char* const command, gchar** args) return TRUE; } -/* escape a string into csv and write it to the file descriptor */ static void _append_csv_escaped(GString* buffer, const char* const str) {