From 9634760d5eae4e8618e4b9ed9752d7305b3695a9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 27 Aug 2002 21:10:30 +0000 Subject: 17582: Improved option argument handling. unposted: Updated version to 4.1.0-dev-6 because of interface change. --- Src/Builtins/sched.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Src/Builtins/sched.c') diff --git a/Src/Builtins/sched.c b/Src/Builtins/sched.c index b4914899e..05e3cfb3f 100644 --- a/Src/Builtins/sched.c +++ b/Src/Builtins/sched.c @@ -46,7 +46,7 @@ static struct schedcmd *schedcmds; /**/ static int -bin_sched(char *nam, char **argv, char *ops, int func) +bin_sched(char *nam, char **argv, Options ops, int func) { char *s = *argv++; time_t t; @@ -143,9 +143,7 @@ bin_sched(char *nam, char **argv, char *ops, int func) of scheduled commands. */ sch = (struct schedcmd *) zcalloc(sizeof *sch); sch->time = t; - PERMALLOC { - sch->cmd = zjoin(argv, ' '); - } LASTALLOC; + sch->cmd = zjoin(argv, ' ', 0); sch->next = NULL; for (sch2 = (struct schedcmd *)&schedcmds; sch2->next; sch2 = sch2->next); sch2->next = sch; @@ -185,7 +183,14 @@ static struct builtin bintab[] = { /**/ int -boot_sched(Module m) +setup_(Module m) +{ + return 0; +} + +/**/ +int +boot_(Module m) { if(!addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab))) return 1; @@ -193,11 +198,9 @@ boot_sched(Module m) return 0; } -#ifdef MODULE - /**/ int -cleanup_sched(Module m) +cleanup_(Module m) { struct schedcmd *sch, *schn; @@ -211,4 +214,9 @@ cleanup_sched(Module m) return 0; } -#endif +/**/ +int +finish_(Module m) +{ + return 0; +} -- cgit 1.4.1