GNOME Bugzilla – Bug 680459
Extra newline char in local implementation of g_application_command_line_print/err
Last modified: 2012-08-06 14:18:00 UTC
Created attachment 219503 [details] The small example program to reproduce the problem. There is an extra newline char in the g_print string used by the local implementations of g_application_command_line_print() and g_application_command_line_printerr() functions. This causes an unwanted extra newline after printing any string with the local GApplicationCommandLine. According to the documentation, these functions are "... exactly equivalent to g_print/err()". Attached is a small example program to reproduce the problem with the g_application_command_line_print() function.
I have attached a patch removing the two extra newline chars.
Created attachment 219504 [details] [review] Patch to remove the two extra newline chars.
Created attachment 219505 [details] [review] Patch to remove the two extra newline chars.
Review of attachment 219505 [details] [review]: Looks good (particularly in light of the documentation and the fact that the D-Bus implementation of it doesn't add newlines).
The following fix has been pushed: 10474ac Remove extra newline chars in local g_application_command_line_print/err
Created attachment 220450 [details] [review] Remove extra newline chars in local g_application_command_line_print/err The extra newline chars in the local implementation of g_application_command_line_print and g_application_command_line_printerr() cause an unwanted newline after printed strings. This patch removes the newline chars to make the functions consistent with their documentation.