Merge branch 'master' into next
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index 238f2ab9d4d1c39f4b4b0e0bca46632c6c44762c..34cea48c6a81ab2d7d6743e28706181415362824 100644 (file)
--- a/write.c
+++ b/write.c
@@ -6,6 +6,7 @@
 
 /** \file write.c Paraslash's standalone wav/raw player. */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
 
@@ -153,7 +154,7 @@ static struct writer_node_group *check_args(void)
                        conf.writer_arg[i], &writer_num);
                if (!g->writer_nodes[i].conf)
                        goto out;
-               g->writer_nodes[i].writer = &writers[writer_num];
+               g->writer_nodes[i].writer_num = writer_num;
        }
        ret = 1;
 out:
@@ -196,7 +197,7 @@ int main(int argc, char *argv[])
        struct check_wav_task *cwt = &the_check_wav_task;
        struct initial_delay_task *idt = &the_initial_delay_task;
 
-       init_supported_writers();
+       writer_init();
        write_cmdline_parser(argc, argv, &conf);
        HANDLE_VERSION_FLAG("write", conf);
        if (conf.help_given || conf.detailed_help_given)
@@ -214,7 +215,7 @@ int main(int argc, char *argv[])
        sit.bufsize = conf.bufsize_arg * 1024;
        sit.buf = para_malloc(sit.bufsize);
 
-       wng->buf = sit.buf;
+       wng->bufp = &sit.buf;
        wng->loaded = &sit.loaded;
        wng->input_error = &sit.task.error;