diff --git a/include/pdp10-stdio.h b/include/pdp10-stdio.h index f17a464..e7c0436 100644 --- a/include/pdp10-stdio.h +++ b/include/pdp10-stdio.h @@ -7,6 +7,7 @@ #ifndef PDP10_STDIO_H #define PDP10_STDIO_H +#include /* off_t */ #include struct pdp10_file; @@ -26,6 +27,7 @@ enum { PDP10_SEEK_END = 2, }; int pdp10_fseeko(PDP10_FILE *pdp10fp, off_t offset, int whence); +off_t pdp10_ftello(PDP10_FILE *pdp10fp); /* pdp10_fread() and pdp10_fwrite() deliberately only permit transfers of strings * (size == 1), marshalled 9/18/36-bit primitives (nmemb == 1, size == 1, 2, or 4), diff --git a/lib/pdp10-stdio.c b/lib/pdp10-stdio.c index b8bf6d2..8c1ebae 100644 --- a/lib/pdp10-stdio.c +++ b/lib/pdp10-stdio.c @@ -332,6 +332,11 @@ int pdp10_fseeko(PDP10_FILE *pdp10fp, off_t offset, int whence) return 0; } +off_t pdp10_ftello(PDP10_FILE *pdp10fp) +{ + return pdp10fp->nonet_pos; +} + /* * On an octet-based host, in-core data structures representing nonet-based * target data will in fact contain oversize octet-based host data. For