Branch: Tag:

2006-03-11

2006-03-11 17:21:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added replace_many() replated functions and structs.

Rev: src/builtin_functions.h:1.33

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.h,v 1.32 2004/09/28 16:55:07 grubba Exp $ + || $Id: builtin_functions.h,v 1.33 2006/03/11 17:21:34 grubba Exp $   */      #ifndef BUILTIN_EFUNS_H
27:   #define f_aggregate(X) debug_f_aggregate(X)   #endif    + struct replace_many_tupel + { +  int prefix; +  int is_prefix; +  struct pike_string *ind; +  struct pike_string *val; + }; +  + struct replace_many_context + { +  struct replace_many_tupel *v; +  struct pike_string *empty_repl; +  int set_start[256]; +  int set_end[256]; +  int other_start; +  int num; +  int flags; + }; +    PMOD_EXPORT void f_equal(INT32 args);   PMOD_EXPORT void f_hash(INT32 args);   PMOD_EXPORT void f_copy_value(INT32 args);
61:   PMOD_EXPORT void f_values(INT32 args);   PMOD_EXPORT void f_next_object(INT32 args);   PMOD_EXPORT void f_object_program(INT32 args); + int find_longest_prefix(char *str, +  ptrdiff_t len, +  int size_shift, +  struct replace_many_tupel *v, +  INT32 a, +  INT32 b); + void free_replace_many_context(struct replace_many_context *ctx); + void compile_replace_many(struct replace_many_context *ctx, +  struct array *from, +  struct array *to, +  int reference_strings); + struct pike_string *execute_replace_many(struct replace_many_context *ctx, +  struct pike_string *str);   PMOD_EXPORT void f_reverse(INT32 args); - struct tupel; +    PMOD_EXPORT void f_replace(INT32 args);   PMOD_EXPORT void f_compile(INT32 args);   PMOD_EXPORT void f_objectp(INT32 args);