Branch: Tag:

2002-09-12

2002-09-12 13:15:50 by Marcus Comstedt <marcus@mc.pp.se>

Added a bunch of missing 'const'.

Rev: src/constants.c:1.39
Rev: src/constants.h:1.23
Rev: src/dmalloc.h:1.36
Rev: src/module_support.c:1.49
Rev: src/module_support.h:1.13
Rev: src/pike_memory.c:1.121
Rev: src/pike_types.c:1.195
Rev: src/pike_types.h:1.81
Rev: src/port.c:1.53
Rev: src/port.h:1.44
Rev: src/program.c:1.443
Rev: src/program.h:1.166

5:   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.194 2002/08/15 14:49:24 marcus Exp $"); + RCSID("$Id: pike_types.c,v 1.195 2002/09/12 13:15:49 marcus Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
168:   static int low_check_indexing(struct pike_type *type,    struct pike_type *index_type,    node *n); - static void internal_parse_type(char **s); + static void internal_parse_type(const char **s);      /*    * New and improved type representation system.
834:      /******/    - static void internal_parse_typeA(char **_s) + static void internal_parse_typeA(const char **_s)   {    char buf[80];    unsigned int len; -  unsigned char **s = (unsigned char **)_s; +  const unsigned char **s = (const unsigned char **)_s;       while(ISSPACE(**s)) ++*s;   
866:    INT32 min,max;    ++*s;    while(ISSPACE(**s)) ++*s; -  min=STRTOL((char *)*s,(char **)s,0); +  min=STRTOL((const char *)*s,(char **)s,0);    while(ISSPACE(**s)) ++*s;    if(s[0][0]=='.' && s[0][1]=='.')    s[0]+=2;
874:    Pike_error("Missing .. in integer type.\n");       while(ISSPACE(**s)) ++*s; -  max=STRTOL((char *)*s,(char **)s,0); +  max=STRTOL((const char *)*s,(char **)s,0);    while(ISSPACE(**s)) ++*s;       if(**s != ')') Pike_error("Missing ')' in integer range.\n");
1129:   }       - static void internal_parse_typeB(char **s) + static void internal_parse_typeB(const char **s)   { -  while(ISSPACE(**((unsigned char **)s))) ++*s; +  while(ISSPACE(**((const unsigned char **)s))) ++*s;    switch(**s)    {    case '!':
1143:    case '(':    ++*s;    internal_parse_type(s); -  while(ISSPACE(**((unsigned char **)s))) ++*s; +  while(ISSPACE(**((const unsigned char **)s))) ++*s;    if(**s != ')') Pike_error("Expecting ')'.\n");    ++*s;    break;
1154:    }   }    - static void internal_parse_typeCC(char **s) + static void internal_parse_typeCC(const char **s)   {    internal_parse_typeB(s);    -  while(ISSPACE(**((unsigned char **)s))) ++*s; +  while(ISSPACE(**((const unsigned char **)s))) ++*s;       while(**s == '*')    {    ++*s; -  while(ISSPACE(**((unsigned char **)s))) ++*s; +  while(ISSPACE(**((const unsigned char **)s))) ++*s;    push_type(T_ARRAY);    }   }    - static void internal_parse_typeC(char **s) + static void internal_parse_typeC(const char **s)   {    internal_parse_typeCC(s);   
1180:    }   }    - static void internal_parse_type(char **s) + static void internal_parse_type(const char **s)   {    internal_parse_typeC(s);   
1197:    * It takes a string on the exact same format as Pike and returns a type    * struct.    */ - struct pike_type *parse_type(char *s) + struct pike_type *parse_type(const char *s)   {    struct pike_type *ret;   #ifdef PIKE_DEBUG