Changeset 39 for abuse/trunk/src/imlib/include/specs.hpp
- Timestamp:
- Mar 2, 2008, 12:29:06 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/include/specs.hpp
r17 r39 9 9 #include <stdint.h> 10 10 11 extern char *spec_types[];11 extern char const *spec_types[]; 12 12 13 13 #define SPEC_INVALID_TYPE 0 … … 61 61 */ 62 62 63 void set_spec_main_file(char *filename, int search_order=SPEC_SEARCH_OUTSIDE_INSIDE);64 65 void set_filename_prefix(char *prefix);63 void set_spec_main_file(char const *filename, int search_order=SPEC_SEARCH_OUTSIDE_INSIDE); 64 65 void set_filename_prefix(char const *prefix); 66 66 char *get_filename_prefix(); 67 void set_save_filename_prefix(char *prefix);67 void set_save_filename_prefix(char const *prefix); 68 68 char *get_save_filename_prefix(); 69 69 #define JFILE_CLONED 1 … … 78 78 79 79 virtual int unbuffered_read(void *buf, size_t count) = 0; 80 virtual int unbuffered_write(void *buf, size_t count) = 0;80 virtual int unbuffered_write(void const *buf, size_t count) = 0; 81 81 virtual int unbuffered_tell() = 0; 82 82 virtual int unbuffered_seek(long offset, int whence) = 0; // whence=SEEK_SET, SEEK_CUR, … … 87 87 bFILE(); 88 88 virtual int open_failure() = 0; 89 int read(void *buf, size_t count); // returns number of bytes read, calls unbuffer_read90 int write(void *buf, size_t count);// returns number of bytes written91 int seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success89 int read(void *buf, size_t count); // returns number of bytes read, calls unbuffer_read 90 int write(void const *buf, size_t count); // returns number of bytes written 91 int seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success 92 92 int tell(); 93 93 virtual int file_size() = 0; … … 121 121 int get_fd() const { return fd; } 122 122 123 void open_internal(char *filename, char*mode, int flags);124 void open_external(char *filename, char*mode, int flags);125 126 jFILE(char *filename, char*access_string); // same as fopen parameters123 void open_internal(char const *filename, char const *mode, int flags); 124 void open_external(char const *filename, char const *mode, int flags); 125 126 jFILE(char const *filename, char const *access_string); // same as fopen parameters 127 127 jFILE(FILE *file_pointer); // assumes fp is at begining of file 128 128 virtual int open_failure() { return fd<0; } 129 129 virtual int unbuffered_read(void *buf, size_t count); // returns number of bytes read 130 virtual int unbuffered_write(void *buf, size_t count); // returns number of bytes written130 virtual int unbuffered_write(void const *buf, size_t count); // returns number of bytes written 131 131 virtual int unbuffered_seek(long offset, int whence); // whence=SEEK_SET, SEEK_CUR, 132 132 // SEEK_END, ret=0=success … … 144 144 145 145 spec_entry(unsigned char spec_type, 146 char *object_name,147 char *link_filename,146 char const *object_name, 147 char const *link_filename, 148 148 unsigned long data_size, 149 149 unsigned long data_offset) … … 170 170 spec_directory(bFILE *fp); 171 171 spec_directory(); 172 spec_entry *find(char *name);173 spec_entry *find(char *name, int type);172 spec_entry *find(char const *name); 173 spec_entry *find(char const *name, int type); 174 174 spec_entry *find(int type); 175 long find_number(char *name);175 long find_number(char const *name); 176 176 long find_number(int type); 177 177 void remove(spec_entry *e); … … 181 181 long data_end_offset(); // this should be the end of the file 182 182 long type_total(int type); 183 jFILE *write(char *filename);183 jFILE *write(char const *filename); 184 184 int write(bFILE *fp); 185 185 void print(); … … 207 207 208 208 void set_spec_main_file(char *filename, int Search_order); 209 void set_file_opener(bFILE *(*open_fun)(char *, char*));209 void set_file_opener(bFILE *(*open_fun)(char const *, char const *)); 210 210 void set_no_space_handler(void (*handle_fun)()); 211 bFILE *open_file(char *filename, char*mode);211 bFILE *open_file(char const *filename, char const *mode); 212 212 #endif 213 213
Note: See TracChangeset
for help on using the changeset viewer.