Skip to content

Commit

Permalink
Remove use of CONST84 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
snoe925 authored Jun 27, 2018
1 parent 8b01a0d commit 74f1674
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 37 deletions.
4 changes: 0 additions & 4 deletions generic/tclExtend.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

#ifndef CONST84
# define CONST84
#endif

/*
* The TCLX_DEBUG flag turns on asserts etc. Its an internal flag, however
* its normally true for alpha and beta release and false for final releases,
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXbsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ StandardKeyCompare (char *key, char *line)
static int
TclProcKeyCompare (binSearchCB_t *searchCBPtr)
{
CONST84 char *cmdArgv [3];
const char *cmdArgv [3];
char *command, *oldResult;
int result;

Expand Down
22 changes: 11 additions & 11 deletions generic/tclXdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ TraceDelete (Tcl_Interp *interp,

static void
PrintStr (Tcl_Channel channel,
CONST84 char *string,
const char *string,
int numChars,
int quoted);

static void
PrintArg (Tcl_Channel channel,
CONST84 char *argStr,
const char *argStr,
int noTruncate);

static void
TraceCode (traceInfo_pt infoPtr,
int level,
char *command,
int argc,
CONST84 char **argv);
const char **argv);

static int
TraceCallbackErrorHandler (ClientData clientData,
Expand All @@ -74,7 +74,7 @@ TraceCallBack (Tcl_Interp *interp,
int level,
char *command,
int argc,
CONST84 char **argv);
const char **argv);

static void
CmdTraceRoutine (ClientData clientData,
Expand All @@ -84,7 +84,7 @@ CmdTraceRoutine (ClientData clientData,
Tcl_CmdProc *cmdProc,
ClientData cmdClientData,
int argc,
CONST84 char **argv);
const char **argv);

static int
TclX_CmdtraceObjCmd (ClientData clientData,
Expand Down Expand Up @@ -129,7 +129,7 @@ TraceDelete (Tcl_Interp *interp, traceInfo_pt infoPtr)
*-----------------------------------------------------------------------------
*/
static void
PrintStr (Tcl_Channel channel, CONST84 char *string, int numChars, int quoted)
PrintStr (Tcl_Channel channel, const char *string, int numChars, int quoted)
{
int idx;

Expand Down Expand Up @@ -157,7 +157,7 @@ PrintStr (Tcl_Channel channel, CONST84 char *string, int numChars, int quoted)
*-----------------------------------------------------------------------------
*/
static void
PrintArg (Tcl_Channel channel, CONST84 char *argStr, int noTruncate)
PrintArg (Tcl_Channel channel, const char *argStr, int noTruncate)
{
int idx, argLen, printLen;
int quoted;
Expand Down Expand Up @@ -190,7 +190,7 @@ TraceCode (traceInfo_pt infoPtr,
int level,
char *command,
int argc,
CONST84 char **argv)
const char **argv)
{
int idx, printLen;
char buf [32];
Expand All @@ -208,7 +208,7 @@ TraceCode (traceInfo_pt infoPtr,
if ((!infoPtr->noTruncate) && (printLen > CMD_TRUNCATE_SIZE))
printLen = CMD_TRUNCATE_SIZE;

PrintStr (infoPtr->channel, (CONST84 char *) command, printLen, FALSE);
PrintStr (infoPtr->channel, (const char *) command, printLen, FALSE);
} else {
for (idx = 0; idx < argc; idx++) {
if (idx > 0)
Expand Down Expand Up @@ -276,7 +276,7 @@ TraceCallBack (Tcl_Interp *interp,
int level,
char *command,
int argc,
CONST84 char **argv)
const char **argv)
{
Interp *iPtr = (Interp *) interp;
Tcl_DString callback;
Expand Down Expand Up @@ -340,7 +340,7 @@ CmdTraceRoutine (ClientData clientData,
Tcl_CmdProc *cmdProc,
ClientData cmdClientData,
int argc,
CONST84 char **argv)
const char **argv)
{
Interp *iPtr = (Interp *) interp;
traceInfo_pt infoPtr = (traceInfo_pt) clientData;
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXdup.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DupChannelOptions (Tcl_Interp *interp,
Tcl_Channel targetChannel)
{
Tcl_DString strValues;
CONST84 char *option, *value, **optArgv = NULL;
const char *option, *value, **optArgv = NULL;
int optArgc, idx;

Tcl_DStringInit (&strValues);
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXfilecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TclX_PipeObjCmd (ClientData clientData,
Tcl_Obj *CONST objv[])
{
Tcl_Channel channels [2];
CONST84 char *channelNames [2];
const char *channelNames [2];

if (!((objc == 1) || (objc == 3)))
return TclX_WrongArgs (interp, objv [0], "?fileId_var_r fileId_var_w?");
Expand Down
20 changes: 10 additions & 10 deletions generic/tclXlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ MakeAbsFile (Tcl_Interp *interp,

static int
SetPackageIndexEntry (Tcl_Interp *interp,
CONST84 char *packageName,
CONST84 char *fileName,
const char *packageName,
const char *fileName,
off_t offset,
unsigned length);

Expand All @@ -91,8 +91,8 @@ GetPackageIndexEntry (Tcl_Interp *interp,

static int
SetProcIndexEntry (Tcl_Interp *interp,
CONST84 char *procName,
CONST84 char *package);
const char *procName,
const char *package);

static void
AddLibIndexErrorInfo (Tcl_Interp *interp,
Expand Down Expand Up @@ -349,8 +349,8 @@ MakeAbsFile (Tcl_Interp *interp,
*/
static int
SetPackageIndexEntry (Tcl_Interp *interp,
CONST84 char *packageName,
CONST84 char *fileName,
const char *packageName,
const char *fileName,
off_t offset,
unsigned length)
{
Expand Down Expand Up @@ -458,11 +458,11 @@ GetPackageIndexEntry (Tcl_Interp *interp,
*/
static int
SetProcIndexEntry (Tcl_Interp *interp,
CONST84 char *procName,
CONST84 char *package)
const char *procName,
const char *package)
{
Tcl_DString command;
CONST84 char *result;
const char *result;

Tcl_DStringInit (&command);
Tcl_DStringAppendElement (&command, "auto_load_pkg");
Expand Down Expand Up @@ -525,7 +525,7 @@ ProcessIndexFile (Tcl_Interp *interp,
Tcl_Channel indexChannel = NULL;
Tcl_DString lineBuffer;
int lineArgc, idx, result, tmpNum;
CONST84 char **lineArgv = NULL;
const char **lineArgv = NULL;
off_t offset;
unsigned length;

Expand Down
8 changes: 4 additions & 4 deletions generic/tclXprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static int
ProfStrCommandEval (ClientData clientData,
Tcl_Interp *interp,
int argc,
CONST84 char **argv);
const char **argv);

static int
ProfObjCommandEval (ClientData clientData,
Expand Down Expand Up @@ -271,7 +271,7 @@ RecordData (profInfo_t *infoPtr,
stackArgv [idx++] = scanPtr->cmdName;
}
}
stackListPtr = Tcl_Merge (idx, (CONST84 char **) stackArgv);
stackListPtr = Tcl_Merge (idx, (const char **) stackArgv);
ckfree ((char *) stackArgv);

/*
Expand Down Expand Up @@ -507,7 +507,7 @@ static int
ProfStrCommandEval (ClientData clientData,
Tcl_Interp *interp,
int argc,
CONST84 char **argv)
const char **argv)
{
profInfo_t *infoPtr = (profInfo_t *) clientData;
int isProc, result;
Expand Down Expand Up @@ -750,7 +750,7 @@ TurnOffProfiling (Tcl_Interp *interp, profInfo_t *infoPtr, char *varName)
Tcl_HashEntry *hashEntryPtr;
Tcl_HashSearch searchCookie;
profDataEntry_t *dataEntryPtr;
CONST84 char *dataArgv [3];
const char *dataArgv [3];
char countBuf [32], realTimeBuf [32], cpuTimeBuf [32], *dataListPtr;

DeleteProfTrace (infoPtr);
Expand Down
6 changes: 3 additions & 3 deletions generic/tclXsignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static char *signalTrapCmds[MAXSIG];
/*
* Prototypes of internal functions.
*/
static CONST84 char *
static const char *
GetSignalName (int signalNum);

static int
Expand Down Expand Up @@ -345,7 +345,7 @@ TclX_KillObjCmd (ClientData clientData,
* Static signal name.
*-----------------------------------------------------------------------------
*/
static CONST84 char *
static const char *
GetSignalName (int signalNum)
{
#ifdef SIGCHLD
Expand Down Expand Up @@ -779,7 +779,7 @@ ProcessASignal (Tcl_Interp *interp, int background, int signalNum)
* If evaluating code, call it for each time the signal occured.
*/
if (signalTrapCmds [signalNum] == NULL) {
CONST84 char *signalName = GetSignalName (signalNum);
const char *signalName = GetSignalName (signalNum);

signalsReceived [signalNum] = 0;
Tcl_SetErrorCode (interp, "POSIX", "SIG", signalName, (char*) NULL);
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ TclX_CrangeObjCmd (ClientData clientData,
int strLen, utfLen, first, subLen;
size_t isRange = (size_t) clientData;
char *str;
CONST84 char *start, *end;
const char *start, *end;

if (objc != 4) {
if (isRange)
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ TclX_SetChannelOption (Tcl_Interp *interp,
char *
TclX_JoinPath (char *path1, char *path2, Tcl_DString *joinedPath)
{
CONST84 char *joinArgv [2];
const char *joinArgv [2];

joinArgv [0] = path1;
joinArgv [1] = path2;
Expand Down

0 comments on commit 74f1674

Please sign in to comment.