summaryrefslogtreecommitdiffstats
path: root/generic/tkOption.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkOption.c')
-rw-r--r--generic/tkOption.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 5754dbf..64832ad 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -254,16 +254,16 @@ Tk_AddOption(
* TK_MAX_PRIO. */
{
TkWindow *winPtr = ((TkWindow *) tkwin)->mainPtr->winPtr;
- register ElArray **arrayPtrPtr;
- register Element *elPtr;
+ ElArray **arrayPtrPtr;
+ Element *elPtr;
Element newEl;
- register const char *p;
+ const char *p;
const char *field;
int count, firstField;
size_t length;
#define TMP_SIZE 100
char tmp[TMP_SIZE+1];
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (winPtr->mainPtr->optionRootPtr == NULL) {
@@ -407,11 +407,11 @@ Tk_GetOption(
{
Tk_Uid nameId, classId = NULL;
char *masqName;
- register Element *elPtr, *bestPtr;
- register int count;
+ Element *elPtr, *bestPtr;
+ int count;
StackLevel *levelPtr;
int stackDepth[NUM_STACKS];
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -521,8 +521,8 @@ Tk_GetOption(
if (masqName != NULL) {
char *masqClass;
Tk_Uid nodeId, winClassId, winNameId;
- unsigned int classNameLength;
- register Element *nodePtr, *leafPtr;
+ size_t classNameLength;
+ Element *nodePtr, *leafPtr;
static const int searchOrder[] = {
EXACT_NODE_NAME, WILDCARD_NODE_NAME, EXACT_NODE_CLASS,
WILDCARD_NODE_CLASS, -1
@@ -535,7 +535,7 @@ Tk_GetOption(
*/
classNameLength = (unsigned) (masqName - name);
- masqClass = ckalloc(classNameLength + 1);
+ masqClass = (char *)ckalloc(classNameLength + 1);
strncpy(masqClass, name, classNameLength);
masqClass[classNameLength] = '\0';
@@ -615,9 +615,9 @@ Tk_OptionObjCmd(
int objc, /* Number of Tcl_Obj arguments. */
Tcl_Obj *const objv[]) /* Tcl_Obj arguments. */
{
- Tk_Window tkwin = clientData;
+ Tk_Window tkwin = (Tk_Window)clientData;
int index, result;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
static const char *const optionCmds[] = {
"add", "clear", "get", "readfile", NULL
@@ -738,9 +738,9 @@ Tk_OptionObjCmd(
void
TkOptionDeadWindow(
- register TkWindow *winPtr) /* Window to be cleaned up. */
+ TkWindow *winPtr) /* Window to be cleaned up. */
{
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -796,7 +796,7 @@ TkOptionClassChanged(
{
int i, j, *basePtr;
ElArray *arrayPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (winPtr->optionLevel == -1) {
@@ -922,7 +922,7 @@ AddFromString(
* TK_INTERACTIVE_PRIO. Must be between 0 and
* TK_MAX_PRIO. */
{
- register char *src, *dst;
+ char *src, *dst;
char *name, *value;
int lineNum;
@@ -1150,7 +1150,7 @@ static ElArray *
NewArray(
int numEls) /* How many elements of space to allocate. */
{
- register ElArray *arrayPtr = ckalloc(EL_ARRAY_SIZE(numEls));
+ ElArray *arrayPtr = (ElArray *)ckalloc(EL_ARRAY_SIZE(numEls));
arrayPtr->arraySize = numEls;
arrayPtr->numUsed = 0;
@@ -1177,17 +1177,17 @@ NewArray(
static ElArray *
ExtendArray(
- register ElArray *arrayPtr, /* Array to be extended. */
- register Element *elPtr) /* Element to be copied into array. */
+ ElArray *arrayPtr, /* Array to be extended. */
+ Element *elPtr) /* Element to be copied into array. */
{
/*
* If the current array has filled up, make it bigger.
*/
if (arrayPtr->numUsed >= arrayPtr->arraySize) {
- register int newSize = 2*arrayPtr->arraySize;
+ int newSize = 2*arrayPtr->arraySize;
- arrayPtr = ckrealloc(arrayPtr, EL_ARRAY_SIZE(newSize));
+ arrayPtr = (ElArray *)ckrealloc(arrayPtr, EL_ARRAY_SIZE(newSize));
arrayPtr->arraySize = newSize;
arrayPtr->nextToUse = &arrayPtr->els[arrayPtr->numUsed];
}
@@ -1226,9 +1226,9 @@ SetupStacks(
{
int level, i;
const int *iPtr;
- register StackLevel *levelPtr;
- register ElArray *arrayPtr;
- ThreadSpecificData *tsdPtr =
+ StackLevel *levelPtr;
+ ElArray *arrayPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -1305,7 +1305,7 @@ SetupStacks(
*/
if (tsdPtr->curLevel >= tsdPtr->numLevels) {
- StackLevel *newLevels =
+ StackLevel *newLevels = (StackLevel *)
ckalloc(tsdPtr->numLevels * 2 * sizeof(StackLevel));
memcpy(newLevels, tsdPtr->levels,
@@ -1332,7 +1332,7 @@ SetupStacks(
*/
for (iPtr = searchOrder; *iPtr != -1; iPtr++) {
- register Element *elPtr;
+ Element *elPtr;
int count;
Tk_Uid id;
@@ -1387,9 +1387,9 @@ ExtendStacks(
int leaf) /* If zero, then don't copy exact leaf
* elements. */
{
- register int count;
- register Element *elPtr;
- ThreadSpecificData *tsdPtr =
+ int count;
+ Element *elPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (elPtr = arrayPtr->els, count = arrayPtr->numUsed;
@@ -1420,10 +1420,11 @@ ExtendStacks(
static void
OptionThreadExitProc(
- ClientData clientData) /* not used */
+ ClientData dummy) /* not used */
{
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ (void)dummy;
if (tsdPtr->initialized) {
int i;
@@ -1454,13 +1455,13 @@ OptionThreadExitProc(
static void
OptionInit(
- register TkMainInfo *mainPtr)
+ TkMainInfo *mainPtr)
/* Top-level information about window that
* isn't initialized yet. */
{
int i;
Tcl_Interp *interp;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Element *defaultMatchPtr = &tsdPtr->defaultMatch;
@@ -1475,7 +1476,7 @@ OptionInit(
tsdPtr->curLevel = -1;
tsdPtr->serial = 0;
- tsdPtr->levels = ckalloc(5 * sizeof(StackLevel));
+ tsdPtr->levels = (StackLevel *)ckalloc(5 * sizeof(StackLevel));
for (i = 0; i < NUM_STACKS; i++) {
tsdPtr->stacks[i] = NewArray(10);
tsdPtr->levels[0].bases[i] = 0;
@@ -1522,7 +1523,7 @@ ClearOptionTree(
ElArray *arrayPtr) /* Array of options; delete everything
* referred to recursively by this. */
{
- register Element *elPtr;
+ Element *elPtr;
int count;
for (count = arrayPtr->numUsed, elPtr = arrayPtr->els; count > 0;