[PATCH 1/5] [WineHelp]: added basic infrastructure for a new wineconsole mode: line

Alexandre Julliard julliard at winehq.org
Thu Dec 13 13:08:25 CST 2012


Eric Pouech <eric.pouech at orange.fr> writes:

> +/******************************************************************
> + *		WCLINE_SetTitle
> + *
> + * Sets the title to the wine console
> + */
> +static void	WCLINE_SetTitle(const struct inner_data* data)
> +{
> +    WCHAR   wbuf[256];
> +
> +    if (WINECON_GetConsoleTitle(data->hConIn, wbuf, sizeof(wbuf)/sizeof(WCHAR)))
> +    {
> +        char        buffer[256];
> +
> +        WideCharToMultiByte(CP_UNIXCP, 0, wbuf, -1, buffer, sizeof(buffer),
> +                            NULL, NULL);
> +        fputs("\033]2;", stdout);
> +        fputs(buffer, stdout);
> +        fputc('\a', stdout);
> +        fflush(stdout);
> +    }
> +}

I don't think you want to do that. You would need at least to check the
terminal type, and make sure that stdout is actually going to the
terminal. I'm not sure it's worth the trouble.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list