summaryrefslogtreecommitdiff
path: root/group.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-06-27 10:31:53 -0700
committerlouie <lshprung@yahoo.com>2020-06-27 10:31:53 -0700
commit7b9771701e55592d9aeffaa78fe827ff73ef65ac (patch)
tree8537b4e6cdcad60887337b54ee4ee46b8e640520 /group.c
parent0eb46442f5541f365ebb327375b9e5992194fbd8 (diff)
Added ability to set flags in config
Diffstat (limited to 'group.c')
-rw-r--r--group.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/group.c b/group.c
index 7c6bc03..9c1736c 100644
--- a/group.c
+++ b/group.c
@@ -11,6 +11,7 @@
typedef struct group{
char name[BUF_LEN];
char program[BUF_LEN];
+ char flags[BUF_LEN];
struct entry *head;
struct entry *tail;
struct group *next;
@@ -23,6 +24,8 @@ GROUP **get_groups();
char *get_gname(GROUP *g);
char *get_gprog(GROUP *g);
void set_gprog(GROUP *g, char *p);
+char *get_gflags(GROUP *g);
+void set_gflags(GROUP *g, char *p);
ENTRY *get_ghead(GROUP *g);
int get_ecount(GROUP *g);
int get_gcount();
@@ -38,6 +41,7 @@ GROUP *create_group(char *new_name){
strcpy(new->name, new_name); //by default, group name is equivalent to the path
strcpy(new->program, "./"); //by default, launch an entry by executing it
+ new->flags[0] = '\0'; //by default, no command line flags
new->head = NULL;
new->tail = NULL;
new->next = NULL;
@@ -132,6 +136,17 @@ char *get_gprog(GROUP *g){
void set_gprog(GROUP *g, char *p){
assert(g != NULL);
strcpy(g->program, p);
+ return;
+}
+
+char *get_gflags(GROUP *g){
+ assert(g != NULL);
+ return g->flags;
+}
+
+void set_gflags(GROUP *g, char *p){
+ assert(g != NULL);
+ strcpy(g->flags, p);
}
ENTRY *get_ghead(GROUP *g){