Branch: Tag:

2001-07-30

2001-07-30 14:59:25 by Martin Nilsson <mani@lysator.liu.se>

Fixed a few typos and added an diff_compare_table example.

Rev: src/builtin_functions.c:1.401

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.400 2001/07/27 21:03:07 nilsson Exp $"); + RCSID("$Id: builtin_functions.c,v 1.401 2001/07/30 14:59:25 nilsson Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
5264:    *! array @[a], and the second is an array of parts in array @[b].    *!    *! @seealso -  *! @[diff_compare_table()], @[diff_longset_sequence()], +  *! @[diff_compare_table()], @[diff_longest_sequence()],    *! @[String.fuzzymatch()]    */   PMOD_EXPORT void f_diff(INT32 args)
5317:    *! Returns an array which maps from index in @[a] to corresponding    *! indices in @[b].    *! +  *! @pre{ +  *! > Array.diff_compare_table( ({ "a","b","c" }), ({ "b", "b", "c", "d", "b" })); +  *! Result: ({ +  *! ({ }), +  *! ({ +  *! 0, +  *! 1, +  *! 4 +  *! }), +  *! ({ +  *! 2 +  *! }) +  *! }) +  *! @} +  *!    *! @seealso -  *! @[diff()], @[diff_longset_sequence()], @[String.fuzzymatch()] +  *! @[diff()], @[diff_longest_sequence()], @[String.fuzzymatch()]    */   void f_diff_compare_table(INT32 args)   {
5366:    *! Gives the longest sequence of indices in @[b] that have corresponding    *! values in the same order in @[a].    *! -  *! This function performs the same operation as @[diff_longset_sequence()], +  *! This function performs the same operation as @[diff_longest_sequence()],    *! but uses a different algorithm, which in some rare cases might be faster    *! (usually it's slower though).    *!