| 1 |
#ifdef RCSID |
| 2 |
static char RCSid[] = |
| 3 |
"$Header: d:/cvsroot/tads/TADS2/LINFDUM.C,v 1.2 1999/05/17 02:52:12 MJRoberts Exp $"; |
| 4 |
#endif |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#include <stdio.h> |
| 27 |
#include <string.h> |
| 28 |
#include <stdlib.h> |
| 29 |
#include <limits.h> |
| 30 |
|
| 31 |
#include "os.h" |
| 32 |
#include "std.h" |
| 33 |
#include "err.h" |
| 34 |
#include "mch.h" |
| 35 |
#include "linf.h" |
| 36 |
#include "dbg.h" |
| 37 |
#include "tok.h" |
| 38 |
|
| 39 |
|
| 40 |
int linfload(osfildef *fp, dbgcxdef *dbgctx, errcxdef *ec, tokpdef *path) |
| 41 |
{ |
| 42 |
uchar buf[UCHAR_MAX + 6]; |
| 43 |
uint pgcnt; |
| 44 |
ulong reccnt; |
| 45 |
|
| 46 |
VARUSED(ec); |
| 47 |
VARUSED(dbgctx); |
| 48 |
VARUSED(path); |
| 49 |
|
| 50 |
|
| 51 |
if (osfrb(fp, buf, 6) |
| 52 |
|| osfrb(fp, buf + 6, (int)buf[1])) |
| 53 |
return(TRUE); |
| 54 |
|
| 55 |
|
| 56 |
reccnt = osrp4(buf + 2); |
| 57 |
if (!reccnt) return(FALSE); |
| 58 |
pgcnt = 1 + ((reccnt - 1) >> 10); |
| 59 |
while (pgcnt--) |
| 60 |
{ |
| 61 |
if (osfseek(fp, (1024 * DBGLINFSIZ), OSFSK_CUR)) return(TRUE); |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
return(FALSE); |
| 66 |
} |
| 67 |
|
| 68 |
|