static char sccsid
[] = "@(#)old.c 4.1 10/9/80";
* sdb - a symbolic debugger for UNIX.
* This file contains support routines for older versions of the system.
* These routines are used only if the system
* doesn't have virtual memory. They
* are used only to read the symbol table, which
* is simply kept in VM on VMUNIX.
struct brbuf
*brs
; char *buff
; {
for (nb
=nbytes
; nb
>0; nb
--) {
brs
->nr
= read(brs
->fd
, brs
->next
=brs
->b
, BSIZE
);
if (brs
->nr
< 0) return(-1);
if (brs
->nr
== 0) return(nbytes
-nb
);
for (nb
=nbytes
; nb
>0; nb
--) {
if ((k
=tell(brs
->fd
)) >= BSIZE
+ brs
->nr
) {
lseek(brs
->fd
, (long) -(BSIZE
+ brs
->nr
), 1);
brs
->nl
= read(brs
->fd
, brs
->b
, BSIZE
);
brs
->nl
= read(brs
->fd
, brs
->b
, k
);
if (brs
->nl
== 0) return(nbytes
-nb
);
brs
->next
= brs
->b
+ brs
->nl
;
blseek(brs
, offset
, flag
)
struct brbuf
*brs
; long offset
; {
return(lseek(brs
->fd
,offset
,flag
));
return(lseek(fildes
, 0L, 1));