summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f54b6d)
There is no longer any user of this function, so we don't really need
it in the lbx_file_ops structure.
/*
* 2ooM: The Master of Orion II Reverse Engineering Project
* Default file operations structures for liblbx.
/*
* 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
*
* 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
-static long file_tell(void *handle)
-{
- return ftell((FILE *)handle);
-}
-
static int file_eof(void *handle)
{
return feof((FILE *)handle);
static int file_eof(void *handle)
{
return feof((FILE *)handle);
const struct lbx_file_ops lbx_default_fops = {
.read = file_read,
.seek = file_seek,
const struct lbx_file_ops lbx_default_fops = {
.read = file_read,
.seek = file_seek,
-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;
static int pipe_eof(void *handle)
{
struct lbx_pipe_state *state = handle;
const struct lbx_file_ops lbx_pipe_fops = {
.read = pipe_read,
.seek = pipe_seek,
const struct lbx_file_ops lbx_pipe_fops = {
.read = pipe_read,
.seek = pipe_seek,
return lbx_file_seek(handle, offset, 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);
static int lbx_eof(void *handle)
{
return lbx_file_eof(handle);
const struct lbx_file_ops lbx_arch_fops = {
.read = lbx_read,
.seek = lbx_seek,
const struct lbx_file_ops lbx_arch_fops = {
.read = lbx_read,
.seek = lbx_seek,
struct lbx_file_ops {
size_t (*read)(void *buf, size_t size, void *handle);
int (*seek)(void *handle, long offset, int whence);
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);
};
int (*eof) (void *handle);
};