Fossil SCM

Get rid of the (silly?) int_least16_t type in sha1.c and just use good old "int" instead. Makes things easier to compile on older systems.

drh 2007-10-23 16:35 UTC trunk
Commit 8fb641e071dc2298638dd2aa8e32211c4398261a
1 file changed +1 -3
+1 -3
--- src/sha1.c
+++ src/sha1.c
@@ -11,11 +11,10 @@
1111
* If you do not have the ISO standard stdint.h header file, then you
1212
* must typdef the following:
1313
* name meaning
1414
* uint32_t unsigned 32 bit integer
1515
* uint8_t unsigned 8 bit integer (i.e., unsigned char)
16
- * int_least16_t integer of >= 16 bits
1716
*
1817
*/
1918
#define SHA1HashSize 20
2019
#define shaSuccess 0
2120
#define shaInputTooLong 1
@@ -30,12 +29,11 @@
3029
uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
3130
3231
uint32_t Length_Low; /* Message length in bits */
3332
uint32_t Length_High; /* Message length in bits */
3433
35
- /* Index into message block array */
36
- int_least16_t Message_Block_Index;
34
+ int Message_Block_Index; /* Index into message block array */
3735
uint8_t Message_Block[64]; /* 512-bit message blocks */
3836
3937
int Computed; /* Is the digest computed? */
4038
int Corrupted; /* Is the message digest corrupted? */
4139
};
4240
--- src/sha1.c
+++ src/sha1.c
@@ -11,11 +11,10 @@
11 * If you do not have the ISO standard stdint.h header file, then you
12 * must typdef the following:
13 * name meaning
14 * uint32_t unsigned 32 bit integer
15 * uint8_t unsigned 8 bit integer (i.e., unsigned char)
16 * int_least16_t integer of >= 16 bits
17 *
18 */
19 #define SHA1HashSize 20
20 #define shaSuccess 0
21 #define shaInputTooLong 1
@@ -30,12 +29,11 @@
30 uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
31
32 uint32_t Length_Low; /* Message length in bits */
33 uint32_t Length_High; /* Message length in bits */
34
35 /* Index into message block array */
36 int_least16_t Message_Block_Index;
37 uint8_t Message_Block[64]; /* 512-bit message blocks */
38
39 int Computed; /* Is the digest computed? */
40 int Corrupted; /* Is the message digest corrupted? */
41 };
42
--- src/sha1.c
+++ src/sha1.c
@@ -11,11 +11,10 @@
11 * If you do not have the ISO standard stdint.h header file, then you
12 * must typdef the following:
13 * name meaning
14 * uint32_t unsigned 32 bit integer
15 * uint8_t unsigned 8 bit integer (i.e., unsigned char)
 
16 *
17 */
18 #define SHA1HashSize 20
19 #define shaSuccess 0
20 #define shaInputTooLong 1
@@ -30,12 +29,11 @@
29 uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
30
31 uint32_t Length_Low; /* Message length in bits */
32 uint32_t Length_High; /* Message length in bits */
33
34 int Message_Block_Index; /* Index into message block array */
 
35 uint8_t Message_Block[64]; /* 512-bit message blocks */
36
37 int Computed; /* Is the digest computed? */
38 int Corrupted; /* Is the message digest corrupted? */
39 };
40

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button