]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/picointernal.c
q3map2 is now waring free
[xonotic/netradiant.git] / libs / picomodel / picointernal.c
index 22214923ffbf90d9fe289a80c7cafc1bae25c755..f08a9962705efaebfa721ee58480db45b6850bae 100644 (file)
@@ -52,7 +52,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /* function pointers */
 void *(*_pico_ptr_malloc       )( size_t ) = malloc;
 void  (*_pico_ptr_free         )( void* ) = free;
-void  (*_pico_ptr_load_file    )( char*, unsigned char**, int* ) = NULL;
+void  (*_pico_ptr_load_file    )( const char*, unsigned char**, int* ) = NULL;
 void  (*_pico_ptr_free_file    )( void* ) = NULL;
 void  (*_pico_ptr_print                )( int, const char* ) = NULL;
 
@@ -193,7 +193,7 @@ void _pico_free( void *ptr )
 /* _pico_load_file:
  * wrapper around the loadfile function pointer
  */
-void _pico_load_file( char *name, unsigned char **buffer, int *bufSize )
+void _pico_load_file( const char *name, unsigned char **buffer, int *bufSize )
 {
        /* sanity checks */
        if( name == NULL )
@@ -266,7 +266,7 @@ void _pico_first_token( char *str )
        if( !str || !*str )
                return;
        while( *str && !isspace( *str ) )
-               *str++;
+               str++;
        *str = '\0';
 }
 
@@ -555,7 +555,7 @@ float _pico_big_float( float src )
 /* _pico_stristr:
  *  case-insensitive strstr. -sea
  */
-char *_pico_stristr( char *str, const char *substr )
+const char *_pico_stristr( const char *str, const char *substr )
 {
        const size_t sublen = strlen(substr);
        while (*str)
@@ -738,7 +738,7 @@ void _pico_parse_skip_white( picoParser_t *p, int *hasLFs )
 /* _pico_new_parser:
  *  allocates a new ascii parser object.
  */
-picoParser_t *_pico_new_parser( picoByte_t *buffer, int bufSize )
+picoParser_t *_pico_new_parser( const picoByte_t *buffer, int bufSize )
 {
        picoParser_t *p;
        
@@ -761,8 +761,8 @@ picoParser_t *_pico_new_parser( picoByte_t *buffer, int bufSize )
                return NULL;
        }
        /* setup */
-       p->buffer       = buffer;
-       p->cursor       = buffer;
+       p->buffer       = (const char *) buffer;
+       p->cursor       = (const char *) buffer;
        p->bufSize      = bufSize;
        p->max          = p->buffer + bufSize;
        p->curLine = 1; /* sea: new */
@@ -798,7 +798,7 @@ void _pico_free_parser( picoParser_t *p )
 int _pico_parse_ex( picoParser_t *p, int allowLFs, int handleQuoted )
 {
        int hasLFs = 0;
-       char *old;
+       const char *old;
 
        /* sanity checks */
        if( p == NULL || p->buffer == NULL ||
@@ -1218,7 +1218,7 @@ int _pico_parse_vec4_def( picoParser_t *p, picoVec4_t out, picoVec4_t def )
 /* _pico_new_memstream:
  *  allocates a new memorystream object.
  */
-picoMemStream_t *_pico_new_memstream( picoByte_t *buffer, int bufSize )
+picoMemStream_t *_pico_new_memstream( const picoByte_t *buffer, int bufSize )
 {
        picoMemStream_t *s;