summaryrefslogtreecommitdiff
path: root/rdoff/rdfdump.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:08 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:08 +0000
commitd7ed89eac9580f280fe0017b22c8e38ca75ed8e3 (patch)
tree98c4fcdd286b44e14f79aa65271e5caa1c2c7be4 /rdoff/rdfdump.c
parentea8382740dbe5e1607742d0a7c7c139dffcc5ae5 (diff)
downloadnasm-d7ed89eac9580f280fe0017b22c8e38ca75ed8e3.tar.gz
nasm-d7ed89eac9580f280fe0017b22c8e38ca75ed8e3.tar.bz2
nasm-d7ed89eac9580f280fe0017b22c8e38ca75ed8e3.zip
NASM 0.94
Diffstat (limited to 'rdoff/rdfdump.c')
-rw-r--r--rdoff/rdfdump.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/rdoff/rdfdump.c b/rdoff/rdfdump.c
index 4d4f4df..bc55a97 100644
--- a/rdoff/rdfdump.c
+++ b/rdoff/rdfdump.c
@@ -17,7 +17,7 @@ long translatelong(long in) { /* translate from little endian to
return r;
}
-
+
int translateshort(short in) {
int r;
unsigned char *i;
@@ -28,8 +28,8 @@ int translateshort(short in) {
return r;
}
void print_header(long length) {
- unsigned char buf[129],t,s,l;
- long o;
+ char buf[129],t,s,l;
+ long o,ll;
short rs;
while (length > 0) {
@@ -39,7 +39,7 @@ void print_header(long length) {
fread(&s,1,1,infile);
fread(&o,4,1,infile);
fread(&l,1,1,infile);
- fread(&rs,2,1,infile);
+ fread(&rs,2,1,infile);
printf(" relocation: location (%04x:%08lx), length %d, "
"referred seg %04x\n",(int)s,translatelong(o),(int)l,
translateshort(rs));
@@ -47,34 +47,34 @@ void print_header(long length) {
break;
case 2: /* import record */
fread(&rs,2,1,infile);
- l = 0;
+ ll = 0;
do {
- fread(&buf[l],1,1,infile);
- } while (buf[l++]);
+ fread(&buf[ll],1,1,infile);
+ } while (buf[ll++]);
printf(" import: segment %04x = %s\n",translateshort(rs),buf);
- length -= l + 3;
+ length -= ll + 3;
break;
case 3: /* export record */
fread(&s,1,1,infile);
fread(&o,4,1,infile);
l = 0;
do {
- fread(&buf[l],1,1,infile);
- } while (buf[l++]);
+ fread(&buf[ll],1,1,infile);
+ } while (buf[ll++]);
printf(" export: (%04x:%08lx) = %s\n",(int)s,translatelong(o),buf);
- length -= l + 6;
+ length -= ll + 6;
break;
case 4: /* DLL record */
l = 0;
do {
- fread(&buf[l],1,1,infile);
- } while (buf[l++]);
+ fread(&buf[ll],1,1,infile);
+ } while (buf[ll++]);
printf(" dll: %s\n",buf);
- length -= l + 1;
+ length -= ll + 1;
break;
case 5: /* BSS reservation */
- fread(&l,4,1,infile);
- printf(" bss reservation: %08lx bytes\n",translatelong(l));
+ fread(&ll,4,1,infile);
+ printf(" bss reservation: %08lx bytes\n",translatelong(ll));
length -= 5;
break;
default: