Ignore:
Timestamp:
Mar 2, 2008, 12:29:06 AM (15 years ago)
Author:
Sam Hocevar
Message:
  • Fix almost 2,000 warnings by using proper "const" keywords where needed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/include/specs.hpp

    r17 r39  
    99#include <stdint.h>
    1010
    11 extern char *spec_types[];
     11extern char const *spec_types[];
    1212
    1313#define SPEC_INVALID_TYPE    0
     
    6161*/
    6262
    63 void set_spec_main_file(char *filename, int search_order=SPEC_SEARCH_OUTSIDE_INSIDE);
    64 
    65 void set_filename_prefix(char *prefix);
     63void set_spec_main_file(char const *filename, int search_order=SPEC_SEARCH_OUTSIDE_INSIDE);
     64
     65void set_filename_prefix(char const *prefix);
    6666char *get_filename_prefix();
    67 void set_save_filename_prefix(char *prefix);
     67void set_save_filename_prefix(char const *prefix);
    6868char *get_save_filename_prefix();
    6969#define JFILE_CLONED 1
     
    7878
    7979  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;
    8181  virtual int unbuffered_tell()                         = 0;
    8282  virtual int unbuffered_seek(long offset, int whence)  = 0;   // whence=SEEK_SET, SEEK_CUR,
     
    8787  bFILE();
    8888  virtual int open_failure() = 0;
    89   int read(void *buf, size_t count);       // returns number of bytes read, calls unbuffer_read
    90   int write(void *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
     89  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
    9292  int tell();
    9393  virtual int file_size() = 0;
     
    121121        int get_fd() const { return fd; }
    122122
    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 parameters
     123  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
    127127  jFILE(FILE *file_pointer);                      // assumes fp is at begining of file
    128128  virtual int open_failure() { return fd<0; }
    129129  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 written
     130  virtual int unbuffered_write(void const *buf, size_t count);     // returns number of bytes written
    131131  virtual int unbuffered_seek(long offset, int whence);      // whence=SEEK_SET, SEEK_CUR,
    132132                                                             // SEEK_END, ret=0=success
     
    144144 
    145145  spec_entry(unsigned char spec_type,
    146              char *object_name,
    147              char *link_filename,
     146             char const *object_name,
     147             char const *link_filename,
    148148             unsigned long data_size,
    149149             unsigned long data_offset)
     
    170170  spec_directory(bFILE *fp);
    171171  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);
    174174  spec_entry *find(int type);
    175   long find_number(char*name);
     175  long find_number(char const *name);
    176176  long find_number(int type);
    177177  void remove(spec_entry *e);
     
    181181  long data_end_offset();    // this should be the end of the file
    182182  long type_total(int type);
    183   jFILE *write(char *filename);
     183  jFILE *write(char const *filename);
    184184  int    write(bFILE *fp);
    185185  void print();
     
    207207
    208208void set_spec_main_file(char *filename, int Search_order);
    209 void set_file_opener(bFILE *(*open_fun)(char *, char *));
     209void set_file_opener(bFILE *(*open_fun)(char const *, char const *));
    210210void set_no_space_handler(void (*handle_fun)());
    211 bFILE *open_file(char *filename, char *mode);
     211bFILE *open_file(char const *filename, char const *mode);
    212212#endif
    213213
Note: See TracChangeset for help on using the changeset viewer.