summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-07 22:01:06 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-07 22:01:06 -0800
commit1955d3917b8d24d7a8621ad80b160e4cefde6fc9 (patch)
tree484ab783bbdcffdb41f9073196dd4ed0bd998510 /src
parent3b0de83ef4f2cdb0bfa52aba9092b56a1a1dc6ea (diff)
downloadxorg-lib-libXaw-1955d3917b8d24d7a8621ad80b160e4cefde6fc9.tar.gz
Use SEEK_* names instead of raw numbers for fseek whence argument
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-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);