Tk Source Code

Check-in [bf2fb9f3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:_Xconst -> const
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bf2fb9f3f364d8b5ee0060a5c276a234f2eb60ce
User & Date: jan.nijtmans 2012-02-21 05:46:53
Context
2012-02-22
22:58
Patch for font metrics and colorspace provided by Adrian Robert check-in: 983e48df user: kevin_walzer tags: trunk
2012-02-21
05:46
_Xconst -> const check-in: bf2fb9f3 user: jan.nijtmans tags: trunk
05:41
_Xconst -> CONST check-in: 52840c0c user: jan.nijtmans tags: core-8-5-branch
2012-02-15
21:09
[Bug 3486474]: Inconsistent color scaling check-in: 23d5395c user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkColor.c.

828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
#ifndef __WIN32__
/* This function is not necessary for Win32,
 * since XParseColor already does the right thing */
Status
TkParseColor(
    Display * display,		/* The display */
    Colormap map,			/* Color map */
    _Xconst char* spec,     /* String to be parsed */
    XColor * colorPtr)
{
    if (*spec == '#') {
    char buf[14];
    buf[0] = '#'; buf[13] = '\0';
	if (!*(++spec) || !*(++spec) || !*(++spec)) {
	/* Not at least 3 hex digits, so invalid */







|







828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
#ifndef __WIN32__
/* This function is not necessary for Win32,
 * since XParseColor already does the right thing */
Status
TkParseColor(
    Display * display,		/* The display */
    Colormap map,			/* Color map */
    const char* spec,     /* String to be parsed */
    XColor * colorPtr)
{
    if (*spec == '#') {
    char buf[14];
    buf[0] = '#'; buf[13] = '\0';
	if (!*(++spec) || !*(++spec) || !*(++spec)) {
	/* Not at least 3 hex digits, so invalid */

Changes to generic/tkConsole.c.

508
509
510
511
512
513
514
515
516
517
518
519
520
521
522

	    /*
	     * Not checking for utf8 == NULL.  Did not check for TCL_ERROR
	     * from Tcl_SetChannelOption() in Tk_InitConsoleChannels() either.
	     * Assumption is utf-8 Tcl_Encoding is reliably present.
	     */

	    CONST char *bytes
		    = Tcl_ExternalToUtfDString(utf8, buf, toWrite, &ds);
	    int numBytes = Tcl_DStringLength(&ds);
	    Tcl_Obj *cmd = Tcl_NewStringObj("tk::ConsoleOutput", -1);

	    Tcl_FreeEncoding(utf8);

	    if (data->type == TCL_STDERR) {







|







508
509
510
511
512
513
514
515
516
517
518
519
520
521
522

	    /*
	     * Not checking for utf8 == NULL.  Did not check for TCL_ERROR
	     * from Tcl_SetChannelOption() in Tk_InitConsoleChannels() either.
	     * Assumption is utf-8 Tcl_Encoding is reliably present.
	     */

	    const char *bytes
		    = Tcl_ExternalToUtfDString(utf8, buf, toWrite, &ds);
	    int numBytes = Tcl_DStringLength(&ds);
	    Tcl_Obj *cmd = Tcl_NewStringObj("tk::ConsoleOutput", -1);

	    Tcl_FreeEncoding(utf8);

	    if (data->type == TCL_STDERR) {

Changes to generic/tkInt.h.

1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
			    ClientData clientData);
MODULE_SCOPE void	TkpWarpPointer(TkDisplay *dispPtr);

#ifdef __WIN32__
#define TkParseColor XParseColor
#else
MODULE_SCOPE Status TkParseColor (Display * display,
				Colormap map, _Xconst char* spec,
				XColor * colorPtr);
#endif

/*
 * Unsupported commands.
 */








|







1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
			    ClientData clientData);
MODULE_SCOPE void	TkpWarpPointer(TkDisplay *dispPtr);

#ifdef __WIN32__
#define TkParseColor XParseColor
#else
MODULE_SCOPE Status TkParseColor (Display * display,
				Colormap map, const char* spec,
				XColor * colorPtr);
#endif

/*
 * Unsupported commands.
 */