Win16 fixes
authorRichard Basch <probe@mit.edu>
Tue, 18 Feb 1997 08:25:28 +0000 (08:25 +0000)
committerRichard Basch <probe@mit.edu>
Tue, 18 Feb 1997 08:25:28 +0000 (08:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9896 dc483132-0cff-0310-8789-dd5450dbe970

src/util/et/error_message.c
src/util/et/error_table.h
src/util/et/et_name.c

index e24bb2ced77295fcef10f7fd107fa68a352c6c97..cf55af0c45036ecde2dbcabc707c8b1b00e509b5 100644 (file)
@@ -52,7 +52,7 @@ KRB5_DLLIMP const char FAR * KRB5_CALLCONV error_message(code)
        unsigned long offset;
        unsigned long l_offset;
        struct et_list *et;
-       long table_num;
+       unsigned long table_num;
        int started = 0;
        unsigned int divisor = 100;
        char *cp;
@@ -83,8 +83,7 @@ KRB5_DLLIMP const char FAR * KRB5_CALLCONV error_message(code)
 
        et = _et_list;
        while (et) {
-               /* Work-around for a DEC/Alpha compiler bug comparing longs */
-               if (((int) (et->table->base - table_num)) == 0) {
+           if (et->table->base == table_num) {
                        /* This is the right table */
                        if (et->table->n_msgs <= offset)
                                break;
@@ -195,7 +194,7 @@ add_error_table(et)
     el->table = et;
     el->next = _et_list;
     _et_list = el;
-    
+
     return 0;
 }
 
index 5c2c6008702fc7e05ca7e5d0002a527f10f92b7b..becb1eca0b579bb114d4a2ca62e44ce3d9467e28 100644 (file)
@@ -23,8 +23,8 @@ extern struct et_list * _et_list;
 #define        ERRCODE_RANGE   8       /* # of bits to shift table number */
 #define        BITS_PER_CHAR   6       /* # bits to shift per character in name */
 
-extern const char FAR *error_table_name ET_P((long));
-extern const char FAR *error_table_name_r ET_P((long, char FAR *));
+extern const char FAR *error_table_name ET_P((unsigned long));
+extern const char FAR *error_table_name_r ET_P((unsigned long, char FAR *));
 
 #define _ET_H
 #endif
index 6b1c869f87cea0c13cc937d38c7f570a741e5aaa..34edbca15f02fabc6b5784334cb34da189e090e8 100644 (file)
@@ -23,7 +23,7 @@ static const char char_set[] =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
 
 const char * error_table_name_r(num, out)
-       long num;
+       unsigned long num;
        char FAR *out;
 {
        long ch;
@@ -43,7 +43,7 @@ const char * error_table_name_r(num, out)
 }
 
 const char FAR * error_table_name(num)
-       long num;
+       unsigned long num;
 {
        static char buf[6];