From: Jon Trulson Date: Wed, 27 Jun 2018 21:06:10 +0000 (-0600) Subject: DtSvc/DtUtil2: remove register keyword X-Git-Tag: 2.3.0a~326 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00aafb206e8db20296dba4f9ec7edf9d9361895e;p=oweals%2Fcde.git DtSvc/DtUtil2: remove register keyword --- diff --git a/cde/lib/DtSvc/DtUtil2/EnvControl.c b/cde/lib/DtSvc/DtUtil2/EnvControl.c index 798ce64c..7d5d0038 100644 --- a/cde/lib/DtSvc/DtUtil2/EnvControl.c +++ b/cde/lib/DtSvc/DtUtil2/EnvControl.c @@ -825,7 +825,7 @@ static void _EnvAdd setenv(envVar, envVarSetting + strlen(envVar) + 1, 1); #else - register int i; + int i; size_t envVarLen = strlen(envVar); char *envPtr = NULL; diff --git a/cde/lib/DtSvc/DtUtil2/Hash.c b/cde/lib/DtSvc/DtUtil2/Hash.c index deff6a93..cc2b78c0 100644 --- a/cde/lib/DtSvc/DtUtil2/Hash.c +++ b/cde/lib/DtSvc/DtUtil2/Hash.c @@ -57,15 +57,15 @@ SOFTWARE. /******** Static Function Declarations ********/ static unsigned int GetTableIndex( - register DtHashTable tab, - register DtHashKey key, + DtHashTable tab, + DtHashKey key, #if NeedWidePrototypes - register int new) ; + int new) ; #else - register Boolean new) ; + Boolean new) ; #endif /* NeedWidePrototypes */ static void ExpandHashTable( - register DtHashTable tab) ; + DtHashTable tab) ; /******** End Static Function Declarations ********/ @@ -101,19 +101,19 @@ static DtHashEntryRec DtHashfake; /* placeholder for deletions */ static unsigned int GetTableIndex( - register DtHashTable tab, - register DtHashKey key, + DtHashTable tab, + DtHashKey key, #if NeedWidePrototypes - register int new) + int new) #else - register Boolean new) + Boolean new) #endif /* NeedWidePrototypes */ { - register DtHashEntry *entries = tab->entries; - register int len, idx, i, rehash = 0; - register char c; - register Signature sig = 0; - register DtHashEntry entry; + DtHashEntry *entries = tab->entries; + int len, idx, i, rehash = 0; + char c; + Signature sig = 0; + DtHashEntry entry; String s1, s2; DtHashKey compKey; @@ -168,9 +168,9 @@ nomatch: void _DtRegisterHashEntry( - register DtHashTable tab, - register DtHashKey key, - register DtHashEntry entry ) + DtHashTable tab, + DtHashKey key, + DtHashEntry entry ) { unsigned int idx; @@ -186,11 +186,11 @@ _DtRegisterHashEntry( void _DtUnregisterHashEntry( - register DtHashTable tab, - register DtHashEntry entry ) + DtHashTable tab, + DtHashEntry entry ) { - register int idx, rehash; - register DtHashEntry *entries = tab->entries; + int idx, rehash; + DtHashEntry *entries = tab->entries; DtHashKey key = KEY(tab, entry); idx = GetTableIndex(tab, key, False); @@ -203,13 +203,13 @@ _DtUnregisterHashEntry( static void ExpandHashTable( - register DtHashTable tab ) + DtHashTable tab ) { unsigned int oldmask; - register DtHashEntry *oldentries, *entries; - register int oldidx, newidx, rehash, len; - register DtHashEntry entry; - register DtHashKey key; + DtHashEntry *oldentries, *entries; + int oldidx, newidx, rehash, len; + DtHashEntry entry; + DtHashKey key; oldmask = tab->mask; oldentries = tab->entries; @@ -232,11 +232,11 @@ ExpandHashTable( DtHashEntry _DtEnumerateHashTable( - register DtHashTable tab, - register DtHashEnumerateFunc enumFunc, - register XtPointer clientData ) + DtHashTable tab, + DtHashEnumerateFunc enumFunc, + XtPointer clientData ) { - register unsigned int i; + unsigned int i; for (i = 0; i <= tab->mask; i++) if (tab->entries[i] && @@ -249,11 +249,11 @@ _DtEnumerateHashTable( DtHashEntry _DtKeyToHashEntry( - register DtHashTable tab, - register DtHashKey key ) + DtHashTable tab, + DtHashKey key ) { - register int idx, rehash, len; - register DtHashEntry entry, *entries = tab->entries; + int idx, rehash, len; + DtHashEntry entry, *entries = tab->entries; if (!key) return NULL; idx = GetTableIndex(tab, key, False); @@ -269,7 +269,7 @@ _DtAllocHashTable(DtHashEntryType *hashEntryTypes, Boolean keyIsString) #endif /* NeedWidePrototypes */ { - register DtHashTable tab; + DtHashTable tab; tab = (DtHashTable) XtMalloc(sizeof(struct _DtHashTableRec)); tab->types = hashEntryTypes; diff --git a/cde/lib/DtSvc/DtUtil2/HashP.h b/cde/lib/DtSvc/DtUtil2/HashP.h index bd32755d..0c4b6068 100644 --- a/cde/lib/DtSvc/DtUtil2/HashP.h +++ b/cde/lib/DtSvc/DtUtil2/HashP.h @@ -142,19 +142,19 @@ typedef struct _DtHashTableRec *DtHashTable; /******** Private Function Declarations for Hash.c ********/ extern void _DtRegisterHashEntry( - register DtHashTable tab, - register DtHashKey key, - register DtHashEntry entry) ; + DtHashTable tab, + DtHashKey key, + DtHashEntry entry) ; extern void _DtUnregisterHashEntry( - register DtHashTable tab, - register DtHashEntry entry) ; + DtHashTable tab, + DtHashEntry entry) ; extern DtHashEntry _DtEnumerateHashTable( - register DtHashTable tab, - register DtHashEnumerateFunc enumFunc, - register XtPointer clientData) ; + DtHashTable tab, + DtHashEnumerateFunc enumFunc, + XtPointer clientData) ; extern DtHashEntry _DtKeyToHashEntry( - register DtHashTable tab, - register DtHashKey key) ; + DtHashTable tab, + DtHashKey key) ; extern DtHashTable _DtAllocHashTable( DtHashEntryType *hashEntryTypes, Cardinal numHashEntryTypes, diff --git a/cde/lib/DtSvc/DtUtil2/PrintXErr.c b/cde/lib/DtSvc/DtUtil2/PrintXErr.c index 8c3d7114..d7dcd563 100644 --- a/cde/lib/DtSvc/DtUtil2/PrintXErr.c +++ b/cde/lib/DtSvc/DtUtil2/PrintXErr.c @@ -81,7 +81,7 @@ _DtPrintDefaultErrorSafe( char number[32]; char *mtype = "XlibMessage"; int nbytes = bytes-1; - register _XExtension *ext = (_XExtension *)NULL; + _XExtension *ext = (_XExtension *)NULL; memset(msg, 0, bytes); diff --git a/cde/lib/DtSvc/DtUtil2/addToRes.c b/cde/lib/DtSvc/DtUtil2/addToRes.c index eab95f65..7b916132 100644 --- a/cde/lib/DtSvc/DtUtil2/addToRes.c +++ b/cde/lib/DtSvc/DtUtil2/addToRes.c @@ -111,26 +111,26 @@ typedef struct _Entries { static Buffer * _DtAllocBuffer(const char **buff); static void _DtFreeBuffer(Buffer *b); static void _DtAppendToBuffer( - register Buffer *b, + Buffer *b, char *str, - register int len) ; + int len) ; static void _DtAppendEntryToBuffer( - register Buffer *buffer, + Buffer *buffer, Entry entry) ; static Entries * _DtAllocEntries( void) ; static void _DtFreeEntries( Entries *) ; static void _DtAddEntry( - register Entries *e, + Entries *e, Entry entry) ; static int _DtCompareEntries( Entry *e1, Entry *e2) ; static char * _DtFindFirst( - register char *string, - register char dest) ; + char *string, + char dest) ; static void _DtGetEntries( - register Entries *entries, + Entries *entries, Buffer *buff, int dosort) ; static void _DtMergeEntries( @@ -176,9 +176,9 @@ _DtFreeBuffer( static void _DtAppendToBuffer( - register Buffer *b, + Buffer *b, char *str, - register int len ) + int len ) { while (b->used + len > b->room) { b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char))); @@ -216,10 +216,10 @@ _DtFreeEntries( static void _DtAddEntry( - register Entries *e, + Entries *e, Entry entry ) { - register int n; + int n; for (n = 0; n < e->used; n++) { @@ -250,7 +250,7 @@ _DtCompareEntries( static void _DtAppendEntryToBuffer( - register Buffer *buffer, + Buffer *buffer, Entry entry ) { _DtAppendToBuffer(buffer, entry.tag, strlen(entry.tag)); @@ -261,8 +261,8 @@ _DtAppendEntryToBuffer( static char * _DtFindFirst( - register char *string, - register char dest ) + char *string, + char dest ) { int len; @@ -285,13 +285,13 @@ _DtFindFirst( static void _DtGetEntries( - register Entries *entries, + Entries *entries, Buffer *buff, int dosort ) { - register char *line, *colon, *temp, *str, *temp2; + char *line, *colon, *temp, *str, *temp2; Entry entry; - register int length; + int length; int lineno = 0; str = buff->buff;