=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/cmo.c,v retrieving revision 1.18 retrieving revision 1.20 diff -u -p -r1.18 -r1.20 --- OpenXM/src/ox_toolkit/cmo.c 2005/03/03 07:25:17 1.18 +++ OpenXM/src/ox_toolkit/cmo.c 2005/07/26 12:52:04 1.20 @@ -1,5 +1,5 @@ /* -*- mode: C; coding: euc-japan -*- */ -/* $OpenXM: OpenXM/src/ox_toolkit/cmo.c,v 1.17 2003/11/02 03:09:16 iwane Exp $ */ +/* $OpenXM: OpenXM/src/ox_toolkit/cmo.c,v 1.19 2005/07/20 17:48:03 ohara Exp $ */ /* This module includes functions for sending/receiveng CMO's. @@ -110,6 +110,30 @@ cmo *list_nth(cmo_list* this, int n) return NULL; } +void **list_to_array(cmo_list *c) +{ + int i; + int n = list_length(c); + void **array = MALLOC(sizeof(void *)*(n+1)); + for(i=0; ilength = 0; c->head->next = c->head; c->head->prev = c->head; + return c; +} + +cmo_list* new_cmo_list_set(void *array[], int n) +{ + int i; + cmo_list* c = new_cmo_list(); + for(i=0; i