Tcl Source Code

Check-in [d8e6c3b83e]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:modified the Tcl_SetDefaultEncodingDir routine to use its own memory when caching the tclDefaultEncodingDir variable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-1-branch-old
Files: files | file ages | folders
SHA1: d8e6c3b83ea7a8e7715827134fb7fb1b459a347e
User & Date: surles 1999-03-12 23:47:49
Context
1999-03-13
02:55
Add code to set the encoding for the console. check-in: b4ff1c850f user: redman tags: core-8-1-branch-old
1999-03-12
23:47
modified the Tcl_SetDefaultEncodingDir routine to use its own memory when caching the tclDefaultEnco... check-in: d8e6c3b83e user: surles tags: core-8-1-branch-old
23:47
updated the man page for the Tcl_GetDefaultEncodingDir and Tcl_SetDefaultEncodingDir routines check-in: e3948f7aa8 user: surles tags: core-8-1-branch-old
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclEncoding.c.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
357
358
359
360
361
362
363

364
365
366
367
368
369
370
371
 *	Contains the implementation of the encoding conversion package.
 *
 * Copyright (c) 1996-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclEncoding.c,v 1.1.2.7 1999/03/12 23:29:13 surles Exp $
 */

#include "tclInt.h"
#include "tclPort.h"

typedef size_t (LengthProc)_ANSI_ARGS_((CONST char *src));

................................................................................
 *-------------------------------------------------------------------------
 */

void
Tcl_SetDefaultEncodingDir(path)
    char *path;
{

    tclDefaultEncodingDir = path;
}
 
/*
 *-------------------------------------------------------------------------
 *
 * Tcl_GetEncoding --
 *






|







 







>
|







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
 *	Contains the implementation of the encoding conversion package.
 *
 * Copyright (c) 1996-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclEncoding.c,v 1.1.2.8 1999/03/12 23:47:49 surles Exp $
 */

#include "tclInt.h"
#include "tclPort.h"

typedef size_t (LengthProc)_ANSI_ARGS_((CONST char *src));

................................................................................
 *-------------------------------------------------------------------------
 */

void
Tcl_SetDefaultEncodingDir(path)
    char *path;
{
    tclDefaultEncodingDir = (char *)ckalloc((unsigned) strlen(path) + 1);
    strcpy(tclDefaultEncodingDir, path);
}
 
/*
 *-------------------------------------------------------------------------
 *
 * Tcl_GetEncoding --
 *