openbsd-ports/games/abuse/patches/patch-specs.hpp

38 lines
2.2 KiB
C++
Raw Normal View History

2004-01-14 12:18:12 -05:00
$OpenBSD: patch-specs.hpp,v 1.3 2004/01/14 17:18:12 naddy Exp $
1999-11-01 17:06:48 -05:00
Need const here...
2004-01-14 12:18:12 -05:00
--- imlib/include/specs.hpp.orig 1996-04-15 21:25:42.000000000 +0200
+++ imlib/include/specs.hpp 2004-01-14 18:14:33.000000000 +0100
@@ -76,7 +76,7 @@ class bFILE // base file type which
1999-11-01 17:06:48 -05:00
int flush_writes(); // returns 0 on failure, else # of bytes written
virtual int unbuffered_read(void *buf, size_t count) = 0;
- virtual int unbuffered_write(void *buf, size_t count) = 0;
+ virtual int unbuffered_write(const void *buf, size_t count) = 0;
virtual int unbuffered_tell() = 0;
virtual int unbuffered_seek(long offset, int whence) = 0; // whence=SEEK_SET, SEEK_CUR,
// SEEK_END, ret=0=success
2004-01-14 12:18:12 -05:00
@@ -85,9 +85,9 @@ class bFILE // base file type which
1999-11-01 17:06:48 -05:00
public :
bFILE();
virtual int open_failure() = 0;
- int read(void *buf, size_t count); // returns number of bytes read, calls unbuffer_read
- int write(void *buf, size_t count); // returns number of bytes written
- int seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success
+ int read(void *buf, size_t count); // returns number of bytes read, calls unbuffer_read
+ int write(const void *buf, size_t count); // returns number of bytes written
+ int seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success
int tell();
virtual int file_size() = 0;
2004-01-14 12:18:12 -05:00
@@ -126,7 +126,7 @@ public :
1999-11-01 17:06:48 -05:00
jFILE(FILE *file_pointer); // assumes fp is at begining of file
virtual int open_failure() { return fd<0; }
virtual int unbuffered_read(void *buf, size_t count); // returns number of bytes read
- virtual int unbuffered_write(void *buf, size_t count); // returns number of bytes written
+ virtual int unbuffered_write(const void *buf, size_t count);// returns number of bytes written
virtual int unbuffered_seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR,
// SEEK_END, ret=0=success
virtual int unbuffered_tell();