* USA
*/
-#include <config.h>
-#include "types.h"
+#include "common.h"
#include <getopt.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <stdio.h>
#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
#include <locale.h>
#include <time.h>
#include <stddef.h>
#include <unistd.h>
-#include <assert.h>
#include <pcre.h>
#include <ctype.h>
#include "kvp.h"
#include "split.h"
#include "sink.h"
-#include "plugin.h"
#include "mem.h"
#include "defs.h"
#include "authorize.h"
#include "vector.h"
#include "version.h"
+#include "dateparse.h"
static disorder_client *client;
static void cf_schedule_play(char **argv) {
if(disorder_schedule_add(getclient(),
- atoll(argv[0]),
+ dateparse(argv[0]),
argv[1],
"play",
argv[2]))
static void cf_schedule_set_global(char **argv) {
if(disorder_schedule_add(getclient(),
- atoll(argv[0]),
+ dateparse(argv[0]),
argv[1],
"set-global",
argv[2],
static void cf_schedule_unset_global(char **argv) {
if(disorder_schedule_add(getclient(),
- atoll(argv[0]),
+ dateparse(argv[0]),
argv[1],
"set-global",
argv[2],
pcre_malloc = xmalloc;
pcre_free = xfree;
if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
+ if(!setlocale(LC_TIME, "")) fatal(errno, "error calling setlocale");
while((n = getopt_long(argc, argv, "+hVc:dHlNu:p:", options, 0)) >= 0) {
switch(n) {
case 'h': help();
optind = 1; /* for subsequent getopt calls */
/* accumulate command args */
while(n < argc) {
- if((i = TABLE_FIND(commands, struct command, name, argv[n])) < 0)
+ if((i = TABLE_FIND(commands, name, argv[n])) < 0)
fatal(0, "unknown command '%s'", argv[n]);
if(n + commands[i].min >= argc)
fatal(0, "missing arguments to '%s'", argv[n]);