DtSvc/DtUtil2: remove register keyword
authorJon Trulson <jon@radscan.com>
Wed, 27 Jun 2018 21:06:10 +0000 (15:06 -0600)
committerJon Trulson <jon@radscan.com>
Thu, 28 Jun 2018 03:58:04 +0000 (21:58 -0600)
cde/lib/DtSvc/DtUtil2/EnvControl.c
cde/lib/DtSvc/DtUtil2/Hash.c
cde/lib/DtSvc/DtUtil2/HashP.h
cde/lib/DtSvc/DtUtil2/PrintXErr.c
cde/lib/DtSvc/DtUtil2/addToRes.c

index 798ce64c25e13564da090ac9f34b732ce545680c..7d5d0038c7b5a47fca7814ee3c6532a891993fef 100644 (file)
@@ -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;
 
index deff6a936ff4e4c478d19a29e99ef1b5e296195b..cc2b78c04b47da097a89e741b44759ac130d7b41 100644 (file)
@@ -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;
index bd32755dd34d67d714985b81f18cb296e96e7594..0c4b60680396442e62549a29d8e2d64a03b999a8 100644 (file)
@@ -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,
index 8c3d71142776ac8deb0d1bb1b90a611b7bac2542..d7dcd5633a027b1889164a7ddc5921b9cf096100 100644 (file)
@@ -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);
 
index eab95f6513c1f7be18c479b43b83ea734eef6514..7b9161328e4c663aa190249f23fd5069da583529 100644 (file)
@@ -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;