|
Lines 1-80
Link Here
|
| 1 |
--- arj_proc.c.orig 2005-06-21 19:53:12 UTC |
|
|
| 2 |
+++ arj_proc.c |
| 3 |
@@ -585,7 +585,7 @@ int search_for_extension(char *name, cha |
| 4 |
/* Returns the exact amount of data that could be safely written to the |
| 5 |
destination volume */ |
| 6 |
|
| 7 |
-unsigned long get_volfree(unsigned int increment) |
| 8 |
+unsigned long get_volfree(unsigned long increment) |
| 9 |
{ |
| 10 |
unsigned long pvol; |
| 11 |
unsigned int arjsec_overhead; |
| 12 |
@@ -605,7 +605,7 @@ unsigned long get_volfree(unsigned int i |
| 13 |
remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead- |
| 14 |
(long)out_bytes-(long)cpos-(long)ext_voldata- |
| 15 |
MULTIVOLUME_RESERVE-t_volume_offset; |
| 16 |
- return((unsigned long)min(remain, (unsigned long)increment)); |
| 17 |
+ return((unsigned long)min(remain, increment)); |
| 18 |
} |
| 19 |
|
| 20 |
/* Performs various checks when multivolume data is packed to predict an |
| 21 |
@@ -2466,14 +2466,14 @@ static int get_str_from_jq() |
| 22 |
*tsptr='\0'; |
| 23 |
endptr=tsptr; |
| 24 |
tsptr=sptr; |
| 25 |
- while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX) |
| 26 |
+ while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX) |
| 27 |
{ |
| 28 |
while(*tsptr=='\0') |
| 29 |
tsptr++; |
| 30 |
- if((unsigned int)tsptr<(unsigned int)endptr) |
| 31 |
+ if((intptr_t)tsptr<(intptr_t)endptr) |
| 32 |
{ |
| 33 |
search_str[patterns++]=tsptr; |
| 34 |
- while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr) |
| 35 |
+ while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr) |
| 36 |
tsptr++; |
| 37 |
} |
| 38 |
} |
| 39 |
@@ -2901,9 +2901,9 @@ char *ltrim(char *str) |
| 40 |
#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER) |
| 41 |
/* Model-independent routine to get 2 bytes from far RAM */ |
| 42 |
|
| 43 |
-unsigned int mget_word(char FAR *p) |
| 44 |
+uint16_t mget_word(char FAR *p) |
| 45 |
{ |
| 46 |
- unsigned int b0, b1; |
| 47 |
+ uint16_t b0, b1; |
| 48 |
|
| 49 |
b0=mget_byte(p); |
| 50 |
b1=mget_byte(p+1); |
| 51 |
@@ -2912,9 +2912,9 @@ unsigned int mget_word(char FAR *p) |
| 52 |
|
| 53 |
/* Model-independent routine to get 4 bytes from far RAM */ |
| 54 |
|
| 55 |
-unsigned long mget_dword(char FAR *p) |
| 56 |
+uint32_t mget_dword(char FAR *p) |
| 57 |
{ |
| 58 |
- unsigned long w0, w1; |
| 59 |
+ uint32_t w0, w1; |
| 60 |
|
| 61 |
w0=mget_word(p); |
| 62 |
w1=mget_word(p+2); |
| 63 |
@@ -2923,7 +2923,7 @@ unsigned long mget_dword(char FAR *p) |
| 64 |
|
| 65 |
/* Model-independent routine to store 2 bytes in far RAM */ |
| 66 |
|
| 67 |
-void mput_word(unsigned int w, char FAR *p) |
| 68 |
+void mput_word(uint16_t w, char FAR *p) |
| 69 |
{ |
| 70 |
mput_byte(w&0xFF, p); |
| 71 |
mput_byte(w>>8 , p+1); |
| 72 |
@@ -2931,7 +2931,7 @@ void mput_word(unsigned int w, char FAR |
| 73 |
|
| 74 |
/* Model-independent routine to store 4 bytes in far RAM */ |
| 75 |
|
| 76 |
-void mput_dword(unsigned long d, char FAR *p) |
| 77 |
+void mput_dword(uint32_t d, char FAR *p) |
| 78 |
{ |
| 79 |
mput_word(d&0xFFFF, p); |
| 80 |
mput_word(d>>16 , p+2); |