summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 09:52:46 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 09:52:46 -0800
commitef7b330df43bca2d595386824ff266f73cc45731 (patch)
treefc26312b13390076d29e0ba2ce66711f39134c77
parentef6cc7ce80c9ba3ff24bfd7b2374fb014efec279 (diff)
Modernize lseek() calls
Use off_t for second argument, symbolic constant for third. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--tocutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tocutil.c b/tocutil.c
index e31297c..14fc82c 100644
--- a/tocutil.c
+++ b/tocutil.c
@@ -468,7 +468,7 @@ void TUSaveTocFile(Toc toc)
Msg msg;
int fid;
int i;
- XawTextPosition position;
+ off_t position;
char c;
if (toc->stopupdate) {
toc->needscachesave = TRUE;
@@ -480,7 +480,7 @@ void TUSaveTocFile(Toc toc)
msg = toc->msgs[i];
if (fid < 0 && msg->changed) {
fid = myopen(toc->scanfile, O_RDWR, 0666);
- (void) lseek(fid, (long)position, 0);
+ (void) lseek(fid, position, SEEK_SET);
}
if (fid >= 0) {
c = msg->buf[MARKPOS];