X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2aaa919aa7451546f9576b3a71fc41f896c24b31..089f75c8f83b841c91e74cdfd4e925d027ff7769:/examples/msg/chainsend/iterator.h diff --git a/examples/msg/chainsend/iterator.h b/examples/msg/chainsend/iterator.h index 59a42a204a..5d3d06d559 100644 --- a/examples/msg/chainsend/iterator.h +++ b/examples/msg/chainsend/iterator.h @@ -1,7 +1,11 @@ -#ifndef KADEPLOY_ITERATOR_H -#define KADEPLOY_ITERATOR_H +/* Copyright (c) 2012-2014. The SimGrid Team. + * All rights reserved. */ -#include +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifndef ITERATOR_H +#define ITERATOR_H #include "xbt/dynar.h" #include "xbt/sysdep.h" @@ -18,6 +22,8 @@ typedef struct xbt_dynar_iterator_struct xbt_dynar_iterator_s; /* Iterator methods */ xbt_dynar_iterator_t xbt_dynar_iterator_new(xbt_dynar_t list, xbt_dynar_t (*criteria_fn)(int)); +void xbt_dynar_iterator_reset(xbt_dynar_iterator_t it); +void xbt_dynar_iterator_seek(xbt_dynar_iterator_t it, int pos); void *xbt_dynar_iterator_next(xbt_dynar_iterator_t it); void xbt_dynar_iterator_delete(xbt_dynar_iterator_t it); @@ -28,7 +34,6 @@ xbt_dynar_t random_indices_list(int size); /* Shuffle */ /**************************************/ -static int rand_int(int n); void xbt_dynar_shuffle_in_place(xbt_dynar_t indices_list); #define xbt_dynar_swap_elements(d, type, i, j) \ @@ -38,4 +43,4 @@ void xbt_dynar_shuffle_in_place(xbt_dynar_t indices_list); xbt_dynar_get_as(indices_list, (unsigned int)i, type)); \ xbt_dynar_set_as(indices_list, (unsigned int)i, type, tmp); -#endif /* KADEPLOY_ITERATOR_H */ +#endif /* ITERATOR_H */