]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/picointernal.h
q3map2 is now waring free
[xonotic/netradiant.git] / libs / picomodel / picointernal.h
index 6ede9f60c5240334cd1c98193093789ab221ae7b..10769e335a0981dc1755f4dc9e7b86b8d1690610 100644 (file)
@@ -78,22 +78,22 @@ extern "C"
 /* types */
 typedef struct picoParser_s
 {
-       char    *buffer;
+       const char      *buffer;
        int              bufSize;
        char    *token;
        int              tokenSize;
        int              tokenMax;
-       char    *cursor;
-       char    *max;
+       const char      *cursor;
+       const char      *max;
        int              curLine;
 }
 picoParser_t;
 
 typedef struct picoMemStream_s
 {
-       picoByte_t      *buffer;
+       const picoByte_t        *buffer;
        int                     bufSize;
-       picoByte_t      *curPos;
+       const picoByte_t        *curPos;
        int                     flag;
 }
 picoMemStream_t;
@@ -104,7 +104,7 @@ extern const picoModule_t   *picoModules[];
 
 extern void                                    *(*_pico_ptr_malloc)( size_t );
 extern void                                    (*_pico_ptr_free)( void* );
-extern void                                    (*_pico_ptr_load_file)( char*, unsigned char**, int* );
+extern void                                    (*_pico_ptr_load_file)( const char*, unsigned char**, int* );
 extern void                                    (*_pico_ptr_free_file)( void* );
 extern void                                    (*_pico_ptr_print)( int, const char* );
 
@@ -120,7 +120,7 @@ char                        *_pico_clone_alloc( const char *str );
 void                   _pico_free( void *ptr );
 
 /* files */
-void                   _pico_load_file( char *name, unsigned char **buffer, int *bufSize );
+void                   _pico_load_file( const char *name, unsigned char **buffer, int *bufSize );
 void                   _pico_free_file( void *buffer );
 
 /* strings */
@@ -129,7 +129,7 @@ char                        *_pico_strltrim( char *str );
 char                   *_pico_strrtrim( char *str );
 int                            _pico_strchcount( char *str, int ch );
 void                   _pico_printf( int level, const char *format, ... );
-char                   *_pico_stristr( char *str, const char *substr );
+const char             *_pico_stristr( const char *str, const char *substr );
 void                   _pico_unixify( char *path );
 int                            _pico_nofname( const char *path, char *dest, int destSize );
 const char *_pico_nopath( const char *path );
@@ -168,7 +168,7 @@ short                       _pico_little_short( short src );
 float                  _pico_little_float( float src );
 
 /* pico ascii parser */
-picoParser_t   *_pico_new_parser( picoByte_t *buffer, int bufSize );
+picoParser_t   *_pico_new_parser( const picoByte_t *buffer, int bufSize );
 void                   _pico_free_parser( picoParser_t *p );
 int                            _pico_parse_ex( picoParser_t *p, int allowLFs, int handleQuoted );
 char                   *_pico_parse_first( picoParser_t *p );
@@ -189,7 +189,7 @@ int                         _pico_parse_vec4( picoParser_t *p, picoVec4_t out);
 int                    _pico_parse_vec4_def( picoParser_t *p, picoVec4_t out, picoVec4_t def);
 
 /* pico memory stream */
-picoMemStream_t        *_pico_new_memstream( picoByte_t *buffer, int bufSize );
+picoMemStream_t        *_pico_new_memstream( const picoByte_t *buffer, int bufSize );
 void                   _pico_free_memstream( picoMemStream_t *s );
 int                            _pico_memstream_read( picoMemStream_t *s, void *buffer, int len );
 int                            _pico_memstream_getc( picoMemStream_t *s );