summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/AsciiSrc.c2
-rw-r--r--src/MultiSrc.c2
-rw-r--r--src/TextPop.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c
index 87efdf2..9e5fa5e 100644
--- a/src/AsciiSrc.c
+++ b/src/AsciiSrc.c
@@ -1514,7 +1514,7 @@ LoadPieces(AsciiSrcObject src, FILE *file, char *string)
int len;
left = 0;
- fseek(file, 0, 0);
+ fseek(file, 0, SEEK_SET);
while (left < src->ascii_src.length) {
ptr = XtMalloc((unsigned)src->ascii_src.piece_size);
if ((len = fread(ptr, sizeof(unsigned char),
diff --git a/src/MultiSrc.c b/src/MultiSrc.c
index 701fe2c..15bdaf8 100644
--- a/src/MultiSrc.c
+++ b/src/MultiSrc.c
@@ -1321,7 +1321,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string)
if (src->multi_src.length != 0) {
temp_mb_holder =
XtMalloc((src->multi_src.length + 1) * sizeof(unsigned char));
- fseek(file, 0, 0);
+ fseek(file, 0, SEEK_SET);
src->multi_src.length = fread(temp_mb_holder,
sizeof(unsigned char),
(size_t)src->multi_src.length, file);
diff --git a/src/TextPop.c b/src/TextPop.c
index 953fa9a..3ff29b9 100644
--- a/src/TextPop.c
+++ b/src/TextPop.c
@@ -310,14 +310,14 @@ InsertFileNamed(Widget tw, char *str)
pos = XawTextGetInsertionPoint(tw);
- fseek(file, 0L, 2);
+ fseek(file, 0L, SEEK_END);
text.firstPos = 0;
text.length = ftell(file);
text.ptr = XtMalloc(text.length + 1);
text.format = XawFmt8Bit;
- fseek(file, 0L, 0);
+ fseek(file, 0L, SEEK_SET);
if (fread(text.ptr, 1, text.length, file) != text.length)
XtErrorMsg("readError", "insertFileNamed", "XawError",
"fread returned error", NULL, NULL);