Branch: Tag:

2000-07-28

2000-07-28 17:16:56 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

JUMBOPATCH: dynamic loading now works on Win* !!!! (somewhat experimental :)

Rev: src/.cvsignore:1.24
Rev: src/Makefile.in:1.198
Rev: src/aclocal.m4:1.17
Rev: src/array.c:1.79
Rev: src/array.h:1.22
Rev: src/backend.c:1.53
Rev: src/backend.h:1.9
Rev: src/bignum.c:1.17
Rev: src/bignum.h:1.14
Rev: src/builtin_functions.c:1.293
Rev: src/builtin_functions.h:1.14
Rev: src/callback.c:1.20
Rev: src/configure.in:1.387
Rev: src/constants.c:1.22
Rev: src/dynamic_buffer.c:1.10
Rev: src/dynamic_load.c:1.41
Rev: src/error.c:1.56
Rev: src/error.h:1.46
Rev: src/fd_control.c:1.32
Rev: src/fdlib.c:1.37
Rev: src/fdlib.h:1.34
Rev: src/fsort.c:1.13
Rev: src/fsort_template.h:1.7
Rev: src/gc.c:1.110
Rev: src/gc.h:1.57
Rev: src/global.h:1.44
Rev: src/interpret.c:1.158
Rev: src/interpret.h:1.52
Rev: src/main.c:1.94
Rev: src/mapping.c:1.94
Rev: src/mapping.h:1.28
Rev: src/module_magic.h:1.1
Rev: src/module_support.c:1.34
Rev: src/module_support.h:1.7
Rev: src/multiset.c:1.26
Rev: src/object.c:1.137
Rev: src/object.h:1.50
Rev: src/opcodes.c:1.78
Rev: src/operators.c:1.93
Rev: src/operators.h:1.8
Rev: src/pike_macros.h:1.17
Rev: src/pike_memory.c:1.71
Rev: src/pike_memory.h:1.14
Rev: src/pike_types.c:1.132
Rev: src/port.c:1.28
Rev: src/precompile.sh.in:1.2
Rev: src/program.c:1.252
Rev: src/program.h:1.97
Rev: src/signal_handler.c:1.173
Rev: src/stralloc.c:1.85
Rev: src/stralloc.h:1.42
Rev: src/stuff.c:1.11
Rev: src/svalue.c:1.85
Rev: src/svalue.h:1.62
Rev: src/testsuite.in:1.316
Rev: src/threads.c:1.133
Rev: src/threads.h:1.99

23:   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.78 2000/07/18 05:48:20 mast Exp $"); + RCSID("$Id: array.c,v 1.79 2000/07/28 17:16:54 hubbe Exp $");    - struct array empty_array= + PMOD_EXPORT struct array empty_array=   {    1, /* Never free */   #ifdef PIKE_SECURITY
48:    * NOTE: the new array have zero references    */    - struct array *low_allocate_array(INT32 size,INT32 extra_space) + PMOD_EXPORT struct array *low_allocate_array(INT32 size,INT32 extra_space)   {    struct array *v;    INT32 e;
109:   /*    * Free an array, call this when the array has zero references    */ - void really_free_array(struct array *v) + PMOD_EXPORT void really_free_array(struct array *v)   {   #ifdef PIKE_DEBUG    if(v == & empty_array)
127:    array_free_no_free(v);   }    - void do_free_array(struct array *a) + PMOD_EXPORT void do_free_array(struct array *a)   {    if (a)    free_array(a);
136:   /*    * Extract an svalue from an array    */ - void array_index_no_free(struct svalue *s,struct array *v,INT32 index) + PMOD_EXPORT void array_index_no_free(struct svalue *s,struct array *v,INT32 index)   {   #ifdef PIKE_DEBUG    if(index<0 || index>=v->size)
149:   /*    * Extract an svalue from an array    */ - void array_index(struct svalue *s,struct array *v,INT32 index) + PMOD_EXPORT void array_index(struct svalue *s,struct array *v,INT32 index)   {   #ifdef PIKE_DEBUG    if(index<0 || index>=v->size)
161:    free_array(v);   }    - void simple_array_index_no_free(struct svalue *s, + PMOD_EXPORT void simple_array_index_no_free(struct svalue *s,    struct array *a,struct svalue *ind)   {    INT32 i;
208:   /*    * Extract an svalue from an array    */ - void array_free_index(struct array *v,INT32 index) + PMOD_EXPORT void array_free_index(struct array *v,INT32 index)   {   #ifdef PIKE_DEBUG    if(index<0 || index>=v->size)
221:   /*    * Set an index in an array    */ - void array_set_index(struct array *v,INT32 index, struct svalue *s) + PMOD_EXPORT void array_set_index(struct array *v,INT32 index, struct svalue *s)   {   #ifdef PIKE_DEBUG    if(index<0 || index>v->size)
237:   }       - void simple_set_index(struct array *a,struct svalue *ind,struct svalue *s) + PMOD_EXPORT void simple_set_index(struct array *a,struct svalue *ind,struct svalue *s)   {    INT32 i;    switch (ind->type) {
281:   /*    * Insert an svalue into an array, grow the array if nessesary    */ - struct array *array_insert(struct array *v,struct svalue *s,INT32 index) + PMOD_EXPORT struct array *array_insert(struct array *v,struct svalue *s,INT32 index)   {   #ifdef PIKE_DEBUG    if(index<0 || index>v->size)
326:   /*    * resize array, resize an array destructively    */ - struct array *resize_array(struct array *a, INT32 size) + PMOD_EXPORT struct array *resize_array(struct array *a, INT32 size)   {   #ifdef PIKE_DEBUG    if(d_flag > 1) array_check_type_field(a);
367:   /*    * Shrink an array destructively    */ - struct array *array_shrink(struct array *v,INT32 size) + PMOD_EXPORT struct array *array_shrink(struct array *v,INT32 size)   {    struct array *a;   
399:   /*    * Remove an index from an array and shrink the array    */ - struct array *array_remove(struct array *v,INT32 index) + PMOD_EXPORT struct array *array_remove(struct array *v,INT32 index)   {    struct array *a;   
443:    * Search for in svalue in an array.    * return the index if found, -1 otherwise    */ - INT32 array_search(struct array *v, struct svalue *s,INT32 start) + PMOD_EXPORT INT32 array_search(struct array *v, struct svalue *s,INT32 start)   {    INT32 e;   #ifdef PIKE_DEBUG
485:    * Slice a pice of an array (nondestructively)    * return an array consisting of v[start..end-1]    */ - struct array *slice_array(struct array *v,INT32 start,INT32 end) + PMOD_EXPORT struct array *slice_array(struct array *v,INT32 start,INT32 end)   {    struct array *a;   
514:    * Slice a pice of an array (nondestructively)    * return an array consisting of v[start..end-1]    */ - struct array *friendly_slice_array(struct array *v,INT32 start,INT32 end) + PMOD_EXPORT struct array *friendly_slice_array(struct array *v,INT32 start,INT32 end)   {    struct array *a;   
536:   /*    * Copy an array    */ - struct array *copy_array(struct array *v) + PMOD_EXPORT struct array *copy_array(struct array *v)   {    struct array *a;   
551:   /*    * Clean an array from destructed objects    */ - void check_array_for_destruct(struct array *v) + PMOD_EXPORT void check_array_for_destruct(struct array *v)   {    int e;    INT16 types;
588:    * it could be optimized to search out the object part with a binary    * search lookup if the array is mixed    */ - INT32 array_find_destructed_object(struct array *v) + PMOD_EXPORT INT32 array_find_destructed_object(struct array *v)   {    INT32 e;    TYPE_FIELD types;
753:   #undef ID       - void sort_array_destructively(struct array *v) + PMOD_EXPORT void sort_array_destructively(struct array *v)   {    if(!v->size) return;    low_sort_svalues(ITEM(v), ITEM(v)+v->size-1);
764:   /*    * return an 'order' suitable for making mappings and multisets    */ - INT32 *get_set_order(struct array *a) + PMOD_EXPORT INT32 *get_set_order(struct array *a)   {    return get_order(a, set_svalue_cmpfun);   }
776:    * sorting rules for all the types that function allows in multiset    * and mapping indices.    */ - INT32 *get_switch_order(struct array *a) + PMOD_EXPORT INT32 *get_switch_order(struct array *a)   {    return get_order(a, switch_svalue_cmpfun);   }
785:   /*    * return an 'order' suitable for sorting.    */ - INT32 *get_alpha_order(struct array *a) + PMOD_EXPORT INT32 *get_alpha_order(struct array *a)   {    return get_order(a, alpha_svalue_cmpfun);   }
852:   /*    * reorganize an array in the order specifyed by 'order'    */ - struct array *order_array(struct array *v, INT32 *order) + PMOD_EXPORT struct array *order_array(struct array *v, INT32 *order)   {    reorder((char *)ITEM(v),v->size,sizeof(struct svalue),order);    return v;
862:   /*    * copy and reorganize an array    */ - struct array *reorder_and_copy_array(struct array *v, INT32 *order) + PMOD_EXPORT struct array *reorder_and_copy_array(struct array *v, INT32 *order)   {    INT32 e;    struct array *ret;
876:   }      /* Maybe I should have a 'clean' flag for this computation */ - void array_fix_type_field(struct array *v) + PMOD_EXPORT void array_fix_type_field(struct array *v)   {    int e;    TYPE_FIELD t;
929:   }   #endif    - struct array *compact_array(struct array *v) { return v; } + PMOD_EXPORT struct array *compact_array(struct array *v) { return v; }      /*    * Get a pointer to the 'union anything' specified IF it is of the specified
1036:    * This routine merges two arrays in the order specified by 'zipper'    * zipper normally produced by merge() above    */ - struct array *array_zip(struct array *a, struct array *b,INT32 *zipper) + PMOD_EXPORT struct array *array_zip(struct array *a, struct array *b,INT32 *zipper)   {    INT32 size,e;    struct array *ret;
1056:    return ret;   }    - struct array *add_arrays(struct svalue *argp, INT32 args) + PMOD_EXPORT struct array *add_arrays(struct svalue *argp, INT32 args)   {    INT32 e, size;    struct array *v;
1090:    return v;   }    - int array_equal_p(struct array *a, struct array *b, struct processing *p) + PMOD_EXPORT int array_equal_p(struct array *a, struct array *b, struct processing *p)   {    struct processing curr;    INT32 e;
1162:    * into ordered sets, merging them as sets and then rearranging the zipper    * before zipping the sets together.    */ - struct array *merge_array_with_order(struct array *a, struct array *b,INT32 op) + PMOD_EXPORT struct array *merge_array_with_order(struct array *a, struct array *b,INT32 op)   {    INT32 *zipper;    struct array *tmpa,*tmpb,*ret;
1204:    * into ordered sets, merging them as sets and then rearranging the zipper    * before zipping the sets together.    */ - struct array *merge_array_without_order2(struct array *a, struct array *b,INT32 op) + PMOD_EXPORT struct array *merge_array_without_order2(struct array *a, struct array *b,INT32 op)   {    INT32 ap,bp,i;    struct svalue *arra,*arrb;
1277:   /* merge two arrays without paying attention to the order    * the elements has presently    */ - struct array *merge_array_without_order(struct array *a, + PMOD_EXPORT struct array *merge_array_without_order(struct array *a,    struct array *b,    INT32 op)   {
1313:   }      /* subtract an array from another */ - struct array *subtract_arrays(struct array *a, struct array *b) + PMOD_EXPORT struct array *subtract_arrays(struct array *a, struct array *b)   {   #ifdef PIKE_DEBUG    if(d_flag > 1)
1337:   }      /* and two arrays */ - struct array *and_arrays(struct array *a, struct array *b) + PMOD_EXPORT struct array *and_arrays(struct array *a, struct array *b)   {   #ifdef PIKE_DEBUG    if(d_flag > 1)
1449:    }   }    - void push_array_items(struct array *a) + PMOD_EXPORT void push_array_items(struct array *a)   {    check_stack(a->size);    check_array_for_destruct(a);
1479:    }   }    - void simple_describe_array(struct array *a) + PMOD_EXPORT void simple_describe_array(struct array *a)   {    char *s;    init_buf();
1531:    my_strcat("})");   }    - struct array *aggregate_array(INT32 args) + PMOD_EXPORT struct array *aggregate_array(INT32 args)   {    struct array *a;   
1543:    return a;   }    - struct array *append_array(struct array *a, struct svalue *s) + PMOD_EXPORT struct array *append_array(struct array *a, struct svalue *s)   {    a=resize_array(a,a->size+1);    array_set_index(a, a->size-1, s);    return a;   }    - struct array *explode(struct pike_string *str, + PMOD_EXPORT struct array *explode(struct pike_string *str,    struct pike_string *del)   {    INT32 e;
1626:    return ret;   }    - struct pike_string *implode(struct array *a,struct pike_string *del) + PMOD_EXPORT struct pike_string *implode(struct array *a,struct pike_string *del)   {    INT32 len,e, inited;    PCHARP r;
1669:    return low_end_shared_string(ret);   }    - struct array *copy_array_recursively(struct array *a,struct processing *p) + PMOD_EXPORT struct array *copy_array_recursively(struct array *a,struct processing *p)   {    struct processing doing;    struct array *ret;
1699:    return ret;   }    - void apply_array(struct array *a, INT32 args) + PMOD_EXPORT void apply_array(struct array *a, INT32 args)   {    INT32 e;    struct array *ret;
1720:    push_array(ret);   }    - struct array *reverse_array(struct array *a) + PMOD_EXPORT struct array *reverse_array(struct array *a)   {    INT32 e;    struct array *ret;
1732:    return ret;   }    - void array_replace(struct array *a, + PMOD_EXPORT void array_replace(struct array *a,    struct svalue *from,    struct svalue *to)   {
1742:   }      #ifdef PIKE_DEBUG - void check_array(struct array *a) + PMOD_EXPORT void check_array(struct array *a)   {    INT32 e;   
2049:    *size_=size;   }    - struct array *explode_array(struct array *a, struct array *b) + PMOD_EXPORT struct array *explode_array(struct array *a, struct array *b)   {    INT32 e,d,q,start;    struct array *tmp;
2092:    return tmp;   }    - struct array *implode_array(struct array *a, struct array *b) + PMOD_EXPORT struct array *implode_array(struct array *a, struct array *b)   {    INT32 e,size;    struct array *ret;