summaryrefslogtreecommitdiffstats
path: root/generic/tclConfig.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-11-01 15:30:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-11-01 15:30:52 (GMT)
commit2998dff7d6013d8de26a9f995195109ccdfb7fe8 (patch)
tree5ba6f151c506b01e44fe93c528465126f2ab35d5 /generic/tclConfig.c
parent2df2847723320a5dade13d3ae8133d879725a887 (diff)
downloadtcl-2998dff7d6013d8de26a9f995195109ccdfb7fe8.zip
tcl-2998dff7d6013d8de26a9f995195109ccdfb7fe8.tar.gz
tcl-2998dff7d6013d8de26a9f995195109ccdfb7fe8.tar.bz2
ANSIfy. Also converted some deeply nested code to a less nested form for easier reading.
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r--generic/tclConfig.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 49eb04b..756b396 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclConfig.c,v 1.9 2005/07/24 22:56:43 dkf Exp $
+ * RCS: @(#) $Id: tclConfig.c,v 1.10 2005/11/01 15:30:52 dkf Exp $
*/
#include "tclInt.h"
@@ -33,13 +33,13 @@
* Static functions in this file:
*/
-static int QueryConfigObjCmd _ANSI_ARGS_((ClientData clientData,
+static int QueryConfigObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
- struct Tcl_Obj * CONST * objv));
-static void QueryConfigDelete _ANSI_ARGS_((ClientData clientData));
-static Tcl_Obj * GetConfigDict _ANSI_ARGS_((Tcl_Interp* interp));
-static void ConfigDictDeleteProc _ANSI_ARGS_((
- ClientData clientData, Tcl_Interp *interp));
+ struct Tcl_Obj * CONST * objv);
+static void QueryConfigDelete(ClientData clientData);
+static Tcl_Obj * GetConfigDict(Tcl_Interp* interp);
+static void ConfigDictDeleteProc(ClientData clientData,
+ Tcl_Interp *interp);
/*
*----------------------------------------------------------------------
@@ -58,19 +58,19 @@ static void ConfigDictDeleteProc _ANSI_ARGS_((
*/
void
-Tcl_RegisterConfig(interp, pkgName, configuration, valEncoding)
- Tcl_Interp *interp; /* Interpreter the configuration command is
+Tcl_RegisterConfig(
+ Tcl_Interp *interp, /* Interpreter the configuration command is
* registered in. */
- CONST char *pkgName; /* Name of the package registering the
+ CONST char *pkgName, /* Name of the package registering the
* embedded configuration. ASCII, thus in
* UTF-8 too. */
- Tcl_Config *configuration; /* Embedded configuration. */
- CONST char *valEncoding; /* Name of the encoding used to store the
+ Tcl_Config *configuration, /* Embedded configuration. */
+ CONST char *valEncoding) /* Name of the encoding used to store the
* configuration values, ASCII, thus UTF-8. */
{
Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding);
- Tcl_Obj *pDB = GetConfigDict(interp);
- Tcl_Obj *pkg = Tcl_NewStringObj(pkgName, -1);
+ Tcl_Obj *pDB = GetConfigDict(interp);
+ Tcl_Obj *pkg = Tcl_NewStringObj(pkgName, -1);
Tcl_Obj *pkgDict;
Tcl_DString cmdName;
Tcl_Config *cfg;
@@ -180,11 +180,11 @@ Tcl_RegisterConfig(interp, pkgName, configuration, valEncoding)
*/
static int
-QueryConfigObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- struct Tcl_Obj * CONST *objv;
+QueryConfigObjCmd(
+ ClientData clientData,
+ Tcl_Interp *interp,
+ int objc,
+ struct Tcl_Obj * CONST *objv)
{
Tcl_Obj *pkgName = (Tcl_Obj *) clientData;
Tcl_Obj *pDB, *pkgDict, *val, *listPtr;
@@ -294,8 +294,8 @@ QueryConfigObjCmd(clientData, interp, objc, objv)
*/
static void
-QueryConfigDelete(clientData)
- ClientData clientData;
+QueryConfigDelete(
+ ClientData clientData)
{
Tcl_Obj *pkgName = (Tcl_Obj *) clientData;
Tcl_DecrRefCount(pkgName);
@@ -319,12 +319,12 @@ QueryConfigDelete(clientData)
*/
static Tcl_Obj *
-GetConfigDict(interp)
- Tcl_Interp *interp;
+GetConfigDict(
+ Tcl_Interp *interp)
{
Tcl_Obj *pDB = Tcl_GetAssocData(interp, ASSOC_KEY, NULL);
- if (pDB == (Tcl_Obj *) NULL) {
+ if (pDB == NULL) {
pDB = Tcl_NewDictObj();
Tcl_IncrRefCount(pDB);
Tcl_SetAssocData(interp, ASSOC_KEY, ConfigDictDeleteProc, pDB);
@@ -353,9 +353,9 @@ GetConfigDict(interp)
*/
static void
-ConfigDictDeleteProc(clientData, interp)
- ClientData clientData; /* Pointer to Tcl_Obj. */
- Tcl_Interp *interp; /* Interpreter being deleted. */
+ConfigDictDeleteProc(
+ ClientData clientData, /* Pointer to Tcl_Obj. */
+ Tcl_Interp *interp) /* Interpreter being deleted. */
{
Tcl_Obj *pDB = (Tcl_Obj *) clientData;
Tcl_DecrRefCount(pDB);