From 9802ef0e5c124fb7a805a4ea11db10c398e88a03 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Mon, 2 Aug 2010 18:56:24 +0000
Subject: [PATCH] fixed individual to only really look at the 'i' instead of
 all on individual.  And also made it so acct was accepted more places

---
 src/sreport/cluster_reports.c | 4 +++-
 src/sreport/job_reports.c     | 9 ++++++---
 src/sreport/user_reports.c    | 4 +++-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/sreport/cluster_reports.c b/src/sreport/cluster_reports.c
index 3a17a78aaea..90ed99ac676 100644
--- a/src/sreport/cluster_reports.c
+++ b/src/sreport/cluster_reports.c
@@ -225,7 +225,9 @@ static int _set_assoc_cond(int *start, int argc, char *argv[],
 					      argv[i]+end);
 			set = 1;
 		} else if (!strncasecmp (argv[i], "Accounts",
-					 MAX(command_len, 2))) {
+					 MAX(command_len, 2))
+			   || !strncasecmp(argv[i], "Acct",
+					   MAX(command_len, 4))) {
 			if(!assoc_cond->acct_list)
 				assoc_cond->acct_list =
 					list_create(slurm_destroy_char);
diff --git a/src/sreport/job_reports.c b/src/sreport/job_reports.c
index 3fafcc48675..a448db5c1c0 100644
--- a/src/sreport/job_reports.c
+++ b/src/sreport/job_reports.c
@@ -254,7 +254,9 @@ static int _set_cond(int *start, int argc, char *argv[],
 					      argv[i]+end);
 			set = 1;
 		} else if (!strncasecmp (argv[i], "Accounts",
-					 MAX(command_len, 2))) {
+					 MAX(command_len, 2))
+			   || !strncasecmp(argv[i], "Acct",
+					   MAX(command_len, 4))) {
 			if(!job_cond->acct_list)
 				job_cond->acct_list =
 					list_create(slurm_destroy_char);
@@ -285,7 +287,7 @@ static int _set_cond(int *start, int argc, char *argv[],
 			set = 1;
 		} else if (!strncasecmp (argv[i], "grouping",
 					 MAX(command_len, 2))) {
-			if(!strcasecmp(argv[i]+end, "individual")) {
+			if(!strncasecmp(argv[i]+end, "individual", 1)) {
 				individual_grouping = 1;
 			} else if(grouping_list)
 				slurm_addto_char_list(grouping_list,
@@ -420,7 +422,8 @@ static int _setup_print_fields_list(List format_list)
 		command_len = strlen(object);
 
 		field = xmalloc(sizeof(print_field_t));
-		if(!strncasecmp("Account", object, MAX(command_len, 1))) {
+		if(!strncasecmp("Account", object, MAX(command_len, 1))
+		   || !strncasecmp("Acct", object, MAX(command_len, 4))) {
 			field->type = PRINT_JOB_ACCOUNT;
 			field->name = xstrdup("Account");
 			field->len = 9;
diff --git a/src/sreport/user_reports.c b/src/sreport/user_reports.c
index 3ed69bb157f..410e247a42a 100644
--- a/src/sreport/user_reports.c
+++ b/src/sreport/user_reports.c
@@ -103,7 +103,9 @@ static int _set_cond(int *start, int argc, char *argv[],
 					      argv[i]+end);
 			set = 1;
 		} else if (!strncasecmp (argv[i], "Accounts",
-					 MAX(command_len, 2))) {
+					 MAX(command_len, 2))
+			   || !strncasecmp(argv[i], "Acct",
+					   MAX(command_len, 4))) {
 			if(!assoc_cond->acct_list)
 				assoc_cond->acct_list =
 					list_create(slurm_destroy_char);
-- 
GitLab