[gnumeric] Special case INDEX in function_def_count_args



commit baa4f674344073d93fe39659fd6b6c8e4e8625dd
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri May 6 10:57:52 2011 -0600

    Special case INDEX in function_def_count_args
    
    2011-05-06  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/func.c (function_def_count_args): special case INDEX

 ChangeLog  |    4 ++++
 src/func.c |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7cfd19d..370a5a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-06  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/func.c (function_def_count_args): special case INDEX
+	
 2011-05-05  Morten Welinder  <terra gnome org>
 
 	* src/style.c (gnm_font_override_codepage): New function.
diff --git a/src/func.c b/src/func.c
index e9db396..b46684e 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1297,7 +1297,10 @@ function_def_count_args (GnmFunc const *fn_def,
 	 */
 	if (fn_def->fn_type == GNM_FUNC_TYPE_NODES) {
 		*min = 0;
-		*max = G_MAXINT;
+		if (g_ascii_strcasecmp ("INDEX",fn_def->name) == 0)
+			*max = 4;
+		else
+			*max = G_MAXINT;
 		return;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]