cvs: php4 /ext/standard/ basic_functions.c levenshtein.c php_string.h

[email protected] ("Hartmut Holzgraefe")
Newsgroups php.version4
Message-ID <cvshholzgra959092659@cvsserver>
hholzgra		Tue May 23 16:37:39 2000 EDT

  Modified files:
    /php4/ext/standard	basic_functions.c levenshtein.c php_string.h 
  Log:
  name changed from levdist() to levenshtein()
  (although i bet we'll get a    levenstein() alias some day)
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.192 php4/ext/standard/basic_functions.c:1.193
--- php4/ext/standard/basic_functions.c:1.192	Tue May 23 16:10:37 2000
+++ php4/ext/standard/basic_functions.c	Tue May 23 16:37:39 2000
@@ -162,7 +162,7 @@
 	PHP_FE(implode,									NULL)
 	PHP_FE(setlocale,								NULL)
 	PHP_FE(soundex,									NULL)
-	PHP_FE(levdist,									NULL)
+	PHP_FE(levenshtein,									NULL)
 	PHP_FE(chr,										NULL)
 	PHP_FE(ord,										NULL)
 	PHP_FE(parse_str,								NULL)
Index: php4/ext/standard/levenshtein.c
diff -u php4/ext/standard/levenshtein.c:1.1 php4/ext/standard/levenshtein.c:1.2
--- php4/ext/standard/levenshtein.c:1.1	Tue May 23 16:10:37 2000
+++ php4/ext/standard/levenshtein.c	Tue May 23 16:37:39 2000
@@ -15,7 +15,7 @@
    | Author: Bjørn Borud - Guardian Networks AS <[email protected]>       |
    +----------------------------------------------------------------------+
  */
-/* $Id: levenshtein.c,v 1.1 2000/05/23 14:10:37 hholzgra Exp $ */
+/* $Id: levenshtein.c,v 1.2 2000/05/23 14:37:39 hholzgra Exp $ */
 
 #include "php.h"
 #include <stdlib.h>
@@ -93,9 +93,9 @@
 }
 
 
-/* {{{ proto int levdist(string str1, string str2)
+/* {{{ proto int levenshtein(string str1, string str2)
    Calculate Levenshtein distance between two strings */
-PHP_FUNCTION(levdist){
+PHP_FUNCTION(levenshtein){
 	zval **str1, **str2;
 	int l;
 
@@ -108,7 +108,7 @@
 	l = calc_levdist((*str1)->value.str.val, (*str2)->value.str.val);
 
 	if(l<0) {
-		php_error(E_WARNING,"levdist(): argument string(s) to long");
+		php_error(E_WARNING,"levenshtein(): argument string(s) to long");
 	}
 
 	RETURN_LONG(l);
Index: php4/ext/standard/php_string.h
diff -u php4/ext/standard/php_string.h:1.16 php4/ext/standard/php_string.h:1.17
--- php4/ext/standard/php_string.h:1.16	Tue May 23 16:10:37 2000
+++ php4/ext/standard/php_string.h	Tue May 23 16:37:39 2000
@@ -29,7 +29,7 @@
  */
 
 
-/* $Id: php_string.h,v 1.16 2000/05/23 14:10:37 hholzgra Exp $ */
+/* $Id: php_string.h,v 1.17 2000/05/23 14:37:39 hholzgra Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
@@ -43,7 +43,7 @@
 PHP_FUNCTION(trim);
 PHP_FUNCTION(ltrim);
 PHP_FUNCTION(soundex);
-PHP_FUNCTION(levdist);
+PHP_FUNCTION(levenshtein);
 
 PHP_FUNCTION(count_chars);
 PHP_FUNCTION(explode);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.