diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-07 21:54:54 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-07 21:54:54 -0800 |
commit | 342d3a8f74bf272235c5eca2b62bd63d3e1e556d (patch) | |
tree | b555ec2276482b5f166d562fd01d5d669ec5b0e9 /src/AsciiSrc.c | |
parent | e616514e74e8120869bb4b04f12e6c0fcb45d27f (diff) |
Use SEEK_* names instead of raw numbers for fseek whence argument
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/AsciiSrc.c')
-rw-r--r-- | src/AsciiSrc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c index ff7b9df..cdc6277 100644 --- a/src/AsciiSrc.c +++ b/src/AsciiSrc.c @@ -1032,7 +1032,7 @@ InitStringOrFile(AsciiSrcObject src, Boolean newString) if (!src->ascii_src.is_tempfile) { if ((file = fopen(src->ascii_src.string, open_mode)) != 0) { - (void) fseek(file, 0, 2); + (void) fseek(file, 0, SEEK_END); src->ascii_src.length = (XawTextPosition) ftell(file); return file; } else { @@ -1062,7 +1062,7 @@ LoadPieces(AsciiSrcObject src, FILE * file, char * string) local_str = XtMalloc((unsigned) (src->ascii_src.length + 1) * sizeof(unsigned char)); if (src->ascii_src.length != 0) { - fseek(file, 0, 0); + fseek(file, 0, SEEK_SET); src->ascii_src.length = fread(local_str, sizeof(unsigned char), (size_t)src->ascii_src.length, file); if (src->ascii_src.length <= 0) |