mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
DtSvc/DtUtil2: remove register keyword
This commit is contained in:
parent
f446ca54e9
commit
00aafb206e
5 changed files with 64 additions and 64 deletions
|
@ -825,7 +825,7 @@ static void _EnvAdd
|
||||||
setenv(envVar, envVarSetting + strlen(envVar) + 1, 1);
|
setenv(envVar, envVarSetting + strlen(envVar) + 1, 1);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
register int i;
|
int i;
|
||||||
size_t envVarLen = strlen(envVar);
|
size_t envVarLen = strlen(envVar);
|
||||||
char *envPtr = NULL;
|
char *envPtr = NULL;
|
||||||
|
|
||||||
|
|
|
@ -57,15 +57,15 @@ SOFTWARE.
|
||||||
/******** Static Function Declarations ********/
|
/******** Static Function Declarations ********/
|
||||||
|
|
||||||
static unsigned int GetTableIndex(
|
static unsigned int GetTableIndex(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key,
|
DtHashKey key,
|
||||||
#if NeedWidePrototypes
|
#if NeedWidePrototypes
|
||||||
register int new) ;
|
int new) ;
|
||||||
#else
|
#else
|
||||||
register Boolean new) ;
|
Boolean new) ;
|
||||||
#endif /* NeedWidePrototypes */
|
#endif /* NeedWidePrototypes */
|
||||||
static void ExpandHashTable(
|
static void ExpandHashTable(
|
||||||
register DtHashTable tab) ;
|
DtHashTable tab) ;
|
||||||
|
|
||||||
/******** End Static Function Declarations ********/
|
/******** End Static Function Declarations ********/
|
||||||
|
|
||||||
|
@ -101,19 +101,19 @@ static DtHashEntryRec DtHashfake; /* placeholder for deletions */
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
GetTableIndex(
|
GetTableIndex(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key,
|
DtHashKey key,
|
||||||
#if NeedWidePrototypes
|
#if NeedWidePrototypes
|
||||||
register int new)
|
int new)
|
||||||
#else
|
#else
|
||||||
register Boolean new)
|
Boolean new)
|
||||||
#endif /* NeedWidePrototypes */
|
#endif /* NeedWidePrototypes */
|
||||||
{
|
{
|
||||||
register DtHashEntry *entries = tab->entries;
|
DtHashEntry *entries = tab->entries;
|
||||||
register int len, idx, i, rehash = 0;
|
int len, idx, i, rehash = 0;
|
||||||
register char c;
|
char c;
|
||||||
register Signature sig = 0;
|
Signature sig = 0;
|
||||||
register DtHashEntry entry;
|
DtHashEntry entry;
|
||||||
String s1, s2;
|
String s1, s2;
|
||||||
DtHashKey compKey;
|
DtHashKey compKey;
|
||||||
|
|
||||||
|
@ -168,9 +168,9 @@ nomatch:
|
||||||
|
|
||||||
void
|
void
|
||||||
_DtRegisterHashEntry(
|
_DtRegisterHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key,
|
DtHashKey key,
|
||||||
register DtHashEntry entry )
|
DtHashEntry entry )
|
||||||
{
|
{
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
|
|
||||||
|
@ -186,11 +186,11 @@ _DtRegisterHashEntry(
|
||||||
|
|
||||||
void
|
void
|
||||||
_DtUnregisterHashEntry(
|
_DtUnregisterHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashEntry entry )
|
DtHashEntry entry )
|
||||||
{
|
{
|
||||||
register int idx, rehash;
|
int idx, rehash;
|
||||||
register DtHashEntry *entries = tab->entries;
|
DtHashEntry *entries = tab->entries;
|
||||||
DtHashKey key = KEY(tab, entry);
|
DtHashKey key = KEY(tab, entry);
|
||||||
|
|
||||||
idx = GetTableIndex(tab, key, False);
|
idx = GetTableIndex(tab, key, False);
|
||||||
|
@ -203,13 +203,13 @@ _DtUnregisterHashEntry(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ExpandHashTable(
|
ExpandHashTable(
|
||||||
register DtHashTable tab )
|
DtHashTable tab )
|
||||||
{
|
{
|
||||||
unsigned int oldmask;
|
unsigned int oldmask;
|
||||||
register DtHashEntry *oldentries, *entries;
|
DtHashEntry *oldentries, *entries;
|
||||||
register int oldidx, newidx, rehash, len;
|
int oldidx, newidx, rehash, len;
|
||||||
register DtHashEntry entry;
|
DtHashEntry entry;
|
||||||
register DtHashKey key;
|
DtHashKey key;
|
||||||
|
|
||||||
oldmask = tab->mask;
|
oldmask = tab->mask;
|
||||||
oldentries = tab->entries;
|
oldentries = tab->entries;
|
||||||
|
@ -232,11 +232,11 @@ ExpandHashTable(
|
||||||
|
|
||||||
DtHashEntry
|
DtHashEntry
|
||||||
_DtEnumerateHashTable(
|
_DtEnumerateHashTable(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashEnumerateFunc enumFunc,
|
DtHashEnumerateFunc enumFunc,
|
||||||
register XtPointer clientData )
|
XtPointer clientData )
|
||||||
{
|
{
|
||||||
register unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i <= tab->mask; i++)
|
for (i = 0; i <= tab->mask; i++)
|
||||||
if (tab->entries[i] &&
|
if (tab->entries[i] &&
|
||||||
|
@ -249,11 +249,11 @@ _DtEnumerateHashTable(
|
||||||
|
|
||||||
DtHashEntry
|
DtHashEntry
|
||||||
_DtKeyToHashEntry(
|
_DtKeyToHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key )
|
DtHashKey key )
|
||||||
{
|
{
|
||||||
register int idx, rehash, len;
|
int idx, rehash, len;
|
||||||
register DtHashEntry entry, *entries = tab->entries;
|
DtHashEntry entry, *entries = tab->entries;
|
||||||
|
|
||||||
if (!key) return NULL;
|
if (!key) return NULL;
|
||||||
idx = GetTableIndex(tab, key, False);
|
idx = GetTableIndex(tab, key, False);
|
||||||
|
@ -269,7 +269,7 @@ _DtAllocHashTable(DtHashEntryType *hashEntryTypes,
|
||||||
Boolean keyIsString)
|
Boolean keyIsString)
|
||||||
#endif /* NeedWidePrototypes */
|
#endif /* NeedWidePrototypes */
|
||||||
{
|
{
|
||||||
register DtHashTable tab;
|
DtHashTable tab;
|
||||||
|
|
||||||
tab = (DtHashTable) XtMalloc(sizeof(struct _DtHashTableRec));
|
tab = (DtHashTable) XtMalloc(sizeof(struct _DtHashTableRec));
|
||||||
tab->types = hashEntryTypes;
|
tab->types = hashEntryTypes;
|
||||||
|
|
|
@ -142,19 +142,19 @@ typedef struct _DtHashTableRec *DtHashTable;
|
||||||
/******** Private Function Declarations for Hash.c ********/
|
/******** Private Function Declarations for Hash.c ********/
|
||||||
|
|
||||||
extern void _DtRegisterHashEntry(
|
extern void _DtRegisterHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key,
|
DtHashKey key,
|
||||||
register DtHashEntry entry) ;
|
DtHashEntry entry) ;
|
||||||
extern void _DtUnregisterHashEntry(
|
extern void _DtUnregisterHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashEntry entry) ;
|
DtHashEntry entry) ;
|
||||||
extern DtHashEntry _DtEnumerateHashTable(
|
extern DtHashEntry _DtEnumerateHashTable(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashEnumerateFunc enumFunc,
|
DtHashEnumerateFunc enumFunc,
|
||||||
register XtPointer clientData) ;
|
XtPointer clientData) ;
|
||||||
extern DtHashEntry _DtKeyToHashEntry(
|
extern DtHashEntry _DtKeyToHashEntry(
|
||||||
register DtHashTable tab,
|
DtHashTable tab,
|
||||||
register DtHashKey key) ;
|
DtHashKey key) ;
|
||||||
extern DtHashTable _DtAllocHashTable(
|
extern DtHashTable _DtAllocHashTable(
|
||||||
DtHashEntryType *hashEntryTypes,
|
DtHashEntryType *hashEntryTypes,
|
||||||
Cardinal numHashEntryTypes,
|
Cardinal numHashEntryTypes,
|
||||||
|
|
|
@ -81,7 +81,7 @@ _DtPrintDefaultErrorSafe(
|
||||||
char number[32];
|
char number[32];
|
||||||
char *mtype = "XlibMessage";
|
char *mtype = "XlibMessage";
|
||||||
int nbytes = bytes-1;
|
int nbytes = bytes-1;
|
||||||
register _XExtension *ext = (_XExtension *)NULL;
|
_XExtension *ext = (_XExtension *)NULL;
|
||||||
|
|
||||||
memset(msg, 0, bytes);
|
memset(msg, 0, bytes);
|
||||||
|
|
||||||
|
|
|
@ -111,26 +111,26 @@ typedef struct _Entries {
|
||||||
static Buffer * _DtAllocBuffer(const char **buff);
|
static Buffer * _DtAllocBuffer(const char **buff);
|
||||||
static void _DtFreeBuffer(Buffer *b);
|
static void _DtFreeBuffer(Buffer *b);
|
||||||
static void _DtAppendToBuffer(
|
static void _DtAppendToBuffer(
|
||||||
register Buffer *b,
|
Buffer *b,
|
||||||
char *str,
|
char *str,
|
||||||
register int len) ;
|
int len) ;
|
||||||
static void _DtAppendEntryToBuffer(
|
static void _DtAppendEntryToBuffer(
|
||||||
register Buffer *buffer,
|
Buffer *buffer,
|
||||||
Entry entry) ;
|
Entry entry) ;
|
||||||
|
|
||||||
static Entries * _DtAllocEntries( void) ;
|
static Entries * _DtAllocEntries( void) ;
|
||||||
static void _DtFreeEntries( Entries *) ;
|
static void _DtFreeEntries( Entries *) ;
|
||||||
static void _DtAddEntry(
|
static void _DtAddEntry(
|
||||||
register Entries *e,
|
Entries *e,
|
||||||
Entry entry) ;
|
Entry entry) ;
|
||||||
static int _DtCompareEntries(
|
static int _DtCompareEntries(
|
||||||
Entry *e1,
|
Entry *e1,
|
||||||
Entry *e2) ;
|
Entry *e2) ;
|
||||||
static char * _DtFindFirst(
|
static char * _DtFindFirst(
|
||||||
register char *string,
|
char *string,
|
||||||
register char dest) ;
|
char dest) ;
|
||||||
static void _DtGetEntries(
|
static void _DtGetEntries(
|
||||||
register Entries *entries,
|
Entries *entries,
|
||||||
Buffer *buff,
|
Buffer *buff,
|
||||||
int dosort) ;
|
int dosort) ;
|
||||||
static void _DtMergeEntries(
|
static void _DtMergeEntries(
|
||||||
|
@ -176,9 +176,9 @@ _DtFreeBuffer(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_DtAppendToBuffer(
|
_DtAppendToBuffer(
|
||||||
register Buffer *b,
|
Buffer *b,
|
||||||
char *str,
|
char *str,
|
||||||
register int len )
|
int len )
|
||||||
{
|
{
|
||||||
while (b->used + len > b->room) {
|
while (b->used + len > b->room) {
|
||||||
b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char)));
|
b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char)));
|
||||||
|
@ -216,10 +216,10 @@ _DtFreeEntries(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_DtAddEntry(
|
_DtAddEntry(
|
||||||
register Entries *e,
|
Entries *e,
|
||||||
Entry entry )
|
Entry entry )
|
||||||
{
|
{
|
||||||
register int n;
|
int n;
|
||||||
|
|
||||||
for (n = 0; n < e->used; n++)
|
for (n = 0; n < e->used; n++)
|
||||||
{
|
{
|
||||||
|
@ -250,7 +250,7 @@ _DtCompareEntries(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_DtAppendEntryToBuffer(
|
_DtAppendEntryToBuffer(
|
||||||
register Buffer *buffer,
|
Buffer *buffer,
|
||||||
Entry entry )
|
Entry entry )
|
||||||
{
|
{
|
||||||
_DtAppendToBuffer(buffer, entry.tag, strlen(entry.tag));
|
_DtAppendToBuffer(buffer, entry.tag, strlen(entry.tag));
|
||||||
|
@ -261,8 +261,8 @@ _DtAppendEntryToBuffer(
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_DtFindFirst(
|
_DtFindFirst(
|
||||||
register char *string,
|
char *string,
|
||||||
register char dest )
|
char dest )
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
@ -285,13 +285,13 @@ _DtFindFirst(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_DtGetEntries(
|
_DtGetEntries(
|
||||||
register Entries *entries,
|
Entries *entries,
|
||||||
Buffer *buff,
|
Buffer *buff,
|
||||||
int dosort )
|
int dosort )
|
||||||
{
|
{
|
||||||
register char *line, *colon, *temp, *str, *temp2;
|
char *line, *colon, *temp, *str, *temp2;
|
||||||
Entry entry;
|
Entry entry;
|
||||||
register int length;
|
int length;
|
||||||
int lineno = 0;
|
int lineno = 0;
|
||||||
|
|
||||||
str = buff->buff;
|
str = buff->buff;
|
||||||
|
|
Loading…
Reference in a new issue