diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-11-17 10:57:35 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-11-17 10:57:35 (GMT) |
commit | ade22ba319d8ff4395c82135981cc073804ce97a (patch) | |
tree | 551a8431a7603d8f0d73f739344653f03f7c3a35 /generic/tkPanedWindow.c | |
parent | 3857560b944b318c14b18b5105c6e25d169bb9a6 (diff) | |
download | tk-ade22ba319d8ff4395c82135981cc073804ce97a.zip tk-ade22ba319d8ff4395c82135981cc073804ce97a.tar.gz tk-ade22ba319d8ff4395c82135981cc073804ce97a.tar.bz2 |
Lots of ANSIfying of function decls.
Also a few spots where code has been cleaned up more completely.
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r-- | generic/tkPanedWindow.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 36002b4..ca1c1b6 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.24 2005/11/15 15:18:22 dkf Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.25 2005/11/17 10:57:35 dkf Exp $ */ #include "tkPort.h" @@ -752,7 +752,7 @@ ConfigureSlaves( int i, firstOptionArg, j, found, doubleBw, index, numNewSlaves, haveLoc; int insertIndex; Tk_Window tkwin = NULL, ancestor, parent; - Slave *slavePtr, **inserts, **new; + Slave *slavePtr, **inserts, **newSlaves; Slave options; char *arg; @@ -986,16 +986,16 @@ ConfigureSlaves( */ i = sizeof(Slave *) * (pwPtr->numSlaves+numNewSlaves); - new = (Slave **)ckalloc((unsigned) i); - memset(new, 0, (size_t) i); + newSlaves = (Slave **)ckalloc((unsigned) i); + memset(newSlaves, 0, (size_t) i); if (index == -1) { /* * If none of the existing slaves have to be moved, just copy the old * and append the new. */ - memcpy((void *)&(new[0]), pwPtr->slaves, + memcpy((void *)&(newSlaves[0]), pwPtr->slaves, sizeof(Slave *) * pwPtr->numSlaves); - memcpy((void *)&(new[pwPtr->numSlaves]), inserts, + memcpy((void *)&(newSlaves[pwPtr->numSlaves]), inserts, sizeof(Slave *) * numNewSlaves); } else { /* @@ -1009,17 +1009,17 @@ ConfigureSlaves( for (i = 0, j = 0; i < index; i++) { if (pwPtr->slaves[i] != NULL) { - new[j] = pwPtr->slaves[i]; + newSlaves[j] = pwPtr->slaves[i]; j++; } } - memcpy((void *)&(new[j]), inserts, sizeof(Slave *) * (insertIndex)); + memcpy((void *)&(newSlaves[j]), inserts, sizeof(Slave *)*insertIndex); j += firstOptionArg - 2; for (i = index; i < pwPtr->numSlaves; i++) { if (pwPtr->slaves[i] != NULL) { - new[j] = pwPtr->slaves[i]; + newSlaves[j] = pwPtr->slaves[i]; j++; } } @@ -1031,7 +1031,7 @@ ConfigureSlaves( ckfree((void *)pwPtr->slaves); ckfree((void *)inserts); - pwPtr->slaves = new; + pwPtr->slaves = newSlaves; /* * Set the paned window's slave count to the new value. |