diff --git a/lib/modules/Array.pmod b/lib/modules/Array.pmod index 7c7a6bc03489035a4643b0168fdd520833cc88dc..397e75a547ded7b7579a5102ee85867a5eaccc57 100644 --- a/lib/modules/Array.pmod +++ b/lib/modules/Array.pmod @@ -8,6 +8,8 @@ constant diff_compare_table = __builtin.diff_compare_table; constant longest_ordered_sequence = __builtin.longest_ordered_sequence; constant interleave_array = __builtin.interleave_array; +constant diff_dyn_longest_sequence = __builtin.diff_dyn_longest_sequence; + constant sort = predef::sort; constant everynth = __builtin.everynth; constant splice = __builtin.splice; @@ -209,7 +211,16 @@ array sort_array(array foo, function|void cmp, mixed ... args) return foo; } -array columns(array x, array ind) +//! Get multiple columns from an array. +//! +//! This function is equvivalent to +//! @pre{ +//! map(ind, lambda(mixed i) { return column(x, i); }) +//! @} +//! +//! @seealso +//! @[column()] +array(array) columns(array x, array ind) { array ret=allocate(sizeof(ind)); for(int e=0;e<sizeof(ind);e++) ret[e]=column(x,ind[e]); @@ -226,6 +237,10 @@ array transpose_old(array(array|string) x) // diff3, complement to diff +//! Return the three-way difference between the arrays. +//! +//! @seealso +//! @[Array.diff()], @[Array.diff_longest_sequence()] array(array(array)) diff3 (array a, array b, array c) { // This does not necessarily produce the optimal sequence between diff --git a/lib/modules/Getopt.pmod b/lib/modules/Getopt.pmod index bc02e3dcb2a8b95acb3896811811619620394b2a..ecce0714a4d774b92d1e4a4301434a669b81ef2a 100644 --- a/lib/modules/Getopt.pmod +++ b/lib/modules/Getopt.pmod @@ -169,13 +169,22 @@ string|int(0..1) find_option(array(string) argv, return def; } -//! +//! Used with @[find_all_options()] to indicate that an option +//! requires an argument. +//! @seealso +//! @[find_all_options()] constant HAS_ARG=1; -//! +//! Used with @[find_all_options()] to indicate that an option +//! does not take an argument. +//! @seealso +//! @[find_all_options()] constant NO_ARG=2; -//! +//! Used with @[find_all_options()] to indicate that an option +//! takes an optional argument. +//! @seealso +//! @[find_all_options()] constant MAY_HAVE_ARG=3; diff --git a/lib/modules/Mapping.pmod b/lib/modules/Mapping.pmod index 5f59bb85bab5f615d42cfe7fc1152142a2c7665d..ec7a687f773d8c718d89b8206778335ce2191e36 100644 --- a/lib/modules/Mapping.pmod +++ b/lib/modules/Mapping.pmod @@ -1,6 +1,8 @@ #pike __REAL_VERSION__ #pragma strict_types +//! Alias for @[m_delete()] constant delete=m_delete; + constant Iterator = __builtin.mapping_iterator; diff --git a/src/iterators.cmod b/src/iterators.cmod index ca37724df3a3e3c7f8334fdb8f748cabf60af3f8..ca767b9c71a45e5c19e9d7b938dd6acd27c6cfd4 100644 --- a/src/iterators.cmod +++ b/src/iterators.cmod @@ -2,11 +2,11 @@ || 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: iterators.cmod,v 1.42 2003/05/30 23:19:26 mast Exp $ +|| $Id: iterators.cmod,v 1.43 2003/07/24 15:56:48 grubba Exp $ */ #include "global.h" -RCSID("$Id: iterators.cmod,v 1.42 2003/05/30 23:19:26 mast Exp $"); +RCSID("$Id: iterators.cmod,v 1.43 2003/07/24 15:56:48 grubba Exp $"); #include "main.h" #include "object.h" #include "mapping.h" @@ -380,6 +380,16 @@ PIKECLASS mapping_iterator } }; +/*! @module Array + */ +/*! @class Iterator + *! + *! An object of this class is returned by @[get_iterator()] when + *! called with an array. + *! + *! @seealso + *! @[get_iterator] + */ PIKECLASS array_iterator { CVAR int pos; @@ -477,6 +487,11 @@ PIKECLASS array_iterator }; +/*! @endclass + */ +/*! @endmodule + */ + #ifdef PIKE_NEW_MULTISETS PIKECLASS multiset_iterator