Branch: Tag:

1999-03-20

1999-03-20 03:00:03 by Per Hedbor <ph@opera.com>

Bugfixes

Rev: src/builtin_functions.c:1.160

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.159 1999/03/20 02:31:55 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.160 1999/03/20 03:00:03 per Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
172:   static struct case_info *find_ci(int c)   {    static struct case_info *cache = NULL; -  struct case_info ci = cache; +  struct case_info *ci = cache;    int lo = 0;    int hi = NELEM(case_info);   
209:    case CIM_CASEBITOFF: C = ((c - ci->data) | ci->data) + ci->data; break; \    default: fatal("lower_case(): Unknown case_info mode: %d\n", ci->mode); \    } \ +  } \    } while(0)      #define DO_UPPER_CASE(C) do {\
222:    case CIM_CASEBITOFF: C = ((c - ci->data)& ~ci->data) + ci->data; break; \    default: fatal("lower_case(): Unknown case_info mode: %d\n", ci->mode); \    } \ +  } \    } while(0)      void f_lower_case(INT32 args)
271:    int widen = 0;    get_all_args("upper_case",args,"%W",&orig);    -  ret=begin_wide_shared_string(orig->len); +  ret=begin_wide_shared_string(orig->len,orig->size_shift);    MEMCPY(ret->str, orig->str, orig->len);       i = orig->len;
313:    i = orig->len;       while(i--) { -  if ((ret[i] = orig[i]) == 0xff) { -  ret[i] = 0x178; +  if ((STR1(ret)[i] = STR0(orig)[i]) == 0xff) { +  STR1(ret)[i] = 0x178;    }    }    free_string(sp[-1].u.string);