Change all short variables to unsigned int (looks like affected variables are always positive) and remove a cast to short

This commit is contained in:
Mark Pictor
2011-07-16 14:20:34 -04:00
parent 1ef8a0b6e1
commit d2baec0a09
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ struct tag {
/* location of fulltext of algorithm in source file */
struct FullText {
char *filename;
short start, end;
unsigned int start, end;
};
/* 'parameters' are lists of lists of (type) expressions */
+5 -5
View File
@@ -133,12 +133,12 @@ typedef struct Hash_Table_ {
#if 0
int in_use; /* If someone is traversing the hash table */
#endif
short p; /* Next bucket to be split */
short maxp; /* upper bound on p during expansion */
unsigned int p; /* Next bucket to be split */
unsigned int maxp; /* upper bound on p during expansion */
long KeyCount; /* current # keys */
short SegmentCount; /* current # segments */
short MinLoadFactor;
short MaxLoadFactor;
unsigned int SegmentCount; /* current # segments */
unsigned int MinLoadFactor;
unsigned int MaxLoadFactor;
Segment Directory[DIRECTORY_SIZE];
} *Hash_Table;
+1 -1
View File
@@ -64,7 +64,7 @@ typedef struct Symbol_ Symbol;
struct Symbol_ {
char *name;
char *filename;
short line;
unsigned int line;
char resolved;
};
+1 -1
View File
@@ -114,7 +114,7 @@ HASHcreate(unsigned count)
count = DIV(i, SEGMENT_SIZE);
table = (Hash_TableP) HASH_Table_new();
table->SegmentCount = table->p = (short) (table->KeyCount = 0);
table->SegmentCount = table->p = table->KeyCount = 0;
/*
** First initialize directory to 0\'s
** DIRECTORY_SIZE must be same as in header