aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalev Lember <kalev@smartlink.ee>2009-04-08 18:24:23 (GMT)
committerKalev Lember <kalev@smartlink.ee>2009-04-08 18:24:23 (GMT)
commit9410f5ad102904863ab9e70930437c573c46961e (patch)
tree5b210a34427993c3a1ae2fb253bb5fe17dc7127c
parentae1a28da4f393133b528b49913954b2e7d5ba3e2 (diff)
downloadpowwow-9410f5ad102904863ab9e70930437c573c46961e.zip
powwow-9410f5ad102904863ab9e70930437c573c46961e.tar.gz
powwow-9410f5ad102904863ab9e70930437c573c46961e.tar.bz2
cmd2.c: Move aliases/actions back to default group if it was specified as '*'.
-rw-r--r--ChangeLog5
-rw-r--r--cmd2.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9c8f7e..87544c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-08 kalev
+
+ * cmd2.c: Move aliases/actions back to default group if it was
+ specified as '*'.
+
2009-04-07 jahara
* cmd2.c: Fixed setting alias/action groups back to default.
diff --git a/cmd2.c b/cmd2.c
index 0c00202..41a26eb 100644
--- a/cmd2.c
+++ b/cmd2.c
@@ -196,7 +196,7 @@ void parse_alias __P1 (char *,str)
if( (*np)->group != NULL )
free((*np)->group);
- if (*group == '\0')
+ if ( *group == '\0' || strcmp(group,"*") == 0 )
group = NULL;
(*np)->group = my_strdup(group);
@@ -576,7 +576,7 @@ void parse_action __P2 (char *,str, int,onprompt)
if( (*np)->group != NULL )
free( (*np)->group );
- if (*group == '\0')
+ if ( *group == '\0' || strcmp(group,"*") == 0 )
group = NULL;
(*np) -> group = my_strdup( group );