Xming: Slightly adjust the formatting of the logged command line

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Colin Harrison 2008-11-02 20:46:40 +00:00 committed by Jon TURNEY
parent 6583477035
commit d053c3b35f

View File

@ -1448,13 +1448,13 @@ winLogCommandLine (int argc, char *argv[])
for (i = 0, iCurrLen = 0; i < argc; ++i)
if (argv[i])
{
/* Add a character for lines that overflow */
/* Adds two characters for lines that overflow */
if ((strlen (argv[i]) < CHARS_PER_LINE
&& iCurrLen + strlen (argv[i]) > CHARS_PER_LINE)
|| strlen (argv[i]) > CHARS_PER_LINE)
{
iCurrLen = 0;
++iSize;
iSize += 2;
}
/* Add space for item and trailing space */
@ -1484,7 +1484,7 @@ winLogCommandLine (int argc, char *argv[])
iCurrLen = 0;
/* Add line break if it fits */
strncat (g_pszCommandLine, "\n", iSize - strlen (g_pszCommandLine));
strncat (g_pszCommandLine, "\n ", iSize - strlen (g_pszCommandLine));
}
strncat (g_pszCommandLine, argv[i], iSize - strlen (g_pszCommandLine));