mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-13 07:20:02 +00:00
pdp10-stdio: add pdp10_ftello(), include <sys/types.h> for off_t
This commit is contained in:
parent
8ea37e57b9
commit
73e1d21104
@ -7,6 +7,7 @@
|
||||
#ifndef PDP10_STDIO_H
|
||||
#define PDP10_STDIO_H
|
||||
|
||||
#include <sys/types.h> /* off_t */
|
||||
#include <stdint.h>
|
||||
|
||||
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),
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user