]> git.draconx.ca Git - liblbx.git/commitdiff
liblbx: Remove tell function from lbx_file_ops.
authorNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 03:22:53 +0000 (22:22 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 05:39:02 +0000 (00:39 -0500)
There is no longer any user of this function, so we don't really need
it in the lbx_file_ops structure.

src/fops.c
src/lbx.h

index 5ae349faa33ea6057b8c51dc475a57e79b03d572..2f35dc43d466778d1adf8fbd957d25c7a18108ba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  2ooM: The Master of Orion II Reverse Engineering Project
  *  Default file operations structures for liblbx.
- *  Copyright (C) 2010 Nick Bowler
+ *  Copyright © 2010, 2014 Nick Bowler
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,11 +44,6 @@ static int file_seek(void *handle, long offset, int whence)
        return 0;
 }
 
-static long file_tell(void *handle)
-{
-       return ftell((FILE *)handle);
-}
-
 static int file_eof(void *handle)
 {
        return feof((FILE *)handle);
@@ -57,7 +52,6 @@ static int file_eof(void *handle)
 const struct lbx_file_ops lbx_default_fops = {
        .read = file_read,
        .seek = file_seek,
-       .tell = file_tell,
        .eof  = file_eof,
 };
 
@@ -110,13 +104,6 @@ static int pipe_seek(void *handle, long offset, int whence)
        return 0;
 }
 
-static long pipe_tell(void *handle)
-{
-       struct lbx_pipe_state *state = handle;
-
-       return state->offset;
-}
-
 static int pipe_eof(void *handle)
 {
        struct lbx_pipe_state *state = handle;
@@ -127,7 +114,6 @@ static int pipe_eof(void *handle)
 const struct lbx_file_ops lbx_pipe_fops = {
        .read = pipe_read,
        .seek = pipe_seek,
-       .tell = pipe_tell,
        .eof  = pipe_eof,
 };
 
@@ -141,11 +127,6 @@ static int lbx_seek(void *handle, long offset, int whence)
        return lbx_file_seek(handle, offset, whence);
 }
 
-static long lbx_tell(void *handle)
-{
-       return lbx_file_tell(handle);
-}
-
 static int lbx_eof(void *handle)
 {
        return lbx_file_eof(handle);
@@ -154,6 +135,5 @@ static int lbx_eof(void *handle)
 const struct lbx_file_ops lbx_arch_fops = {
        .read = lbx_read,
        .seek = lbx_seek,
-       .tell = lbx_tell,
        .eof  = lbx_eof,
 };
index 51244322b429c7a6a13e79e08bd7523ab76ac903..410d829246f8d7d8c0a99e2c6bef3eca4614ce8a 100644 (file)
--- a/src/lbx.h
+++ b/src/lbx.h
@@ -6,7 +6,6 @@
 struct lbx_file_ops {
        size_t (*read)(void *buf, size_t size, void *handle);
        int    (*seek)(void *handle, long offset, int whence);
-       long   (*tell)(void *handle);
        int    (*eof) (void *handle);
 };