Handle entries without name
This commit is contained in:
parent
492be74d94
commit
2b23822015
1 changed files with 9 additions and 5 deletions
|
@ -159,9 +159,6 @@ char **argv;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbuf.on_foff == 0)
|
|
||||||
continue; /* skip entries without names */
|
|
||||||
|
|
||||||
if (globl_flg && (nbuf.on_type&S_EXT)==0)
|
if (globl_flg && (nbuf.on_type&S_EXT)==0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -170,7 +167,8 @@ char **argv;
|
||||||
((nbuf.on_type&S_TYP)!=S_UND || (nbuf.on_type&S_ETC)!=0))
|
((nbuf.on_type&S_TYP)!=S_UND || (nbuf.on_type&S_ETC)!=0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
nbuf.on_mptr = (char *) (nbuf.on_foff + fi_to_co);
|
if (nbuf.on_foff == 0) nbuf.on_mptr = 0;
|
||||||
|
else nbuf.on_mptr = (char *) (nbuf.on_foff + fi_to_co);
|
||||||
|
|
||||||
/* adjust value for specially encoded bases */
|
/* adjust value for specially encoded bases */
|
||||||
if (hbuf.oh_flags & HF_8086) {
|
if (hbuf.oh_flags & HF_8086) {
|
||||||
|
@ -245,7 +243,7 @@ char **argv;
|
||||||
sprintf(cs2, " ?");
|
sprintf(cs2, " ?");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%8lx %s %s %s\n",nbufp[n].on_valu,cs1,cs2,nbufp[n].on_mptr);
|
printf("%8lx %s %s %s\n",nbufp[n].on_valu,cs1,cs2,nbufp[n].on_mptr ? nbufp[n].on_mptr : "(NULL)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbufp)
|
if (nbufp)
|
||||||
|
@ -276,6 +274,12 @@ struct outname *p1, *p2;
|
||||||
return(-revsort_flg);
|
return(-revsort_flg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! p1->on_mptr) {
|
||||||
|
if (! p2->on_mptr) return 0;
|
||||||
|
return -revsort_flg;
|
||||||
|
}
|
||||||
|
if (! p2->on_mptr) return revsort_flg;
|
||||||
|
|
||||||
i = strcmp(p1->on_mptr, p2->on_mptr);
|
i = strcmp(p1->on_mptr, p2->on_mptr);
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue