]> Nishi Git Mirror - mandshurica.git/commitdiff
add some op to template
authornishi <nishi@f982e544-4a7d-3444-ad1a-fde59a2a69f1>
Fri, 19 Apr 2024 06:19:13 +0000 (06:19 +0000)
committernishi <nishi@f982e544-4a7d-3444-ad1a-fde59a2a69f1>
Fri, 19 Apr 2024 06:19:13 +0000 (06:19 +0000)
git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@39 f982e544-4a7d-3444-ad1a-fde59a2a69f1

Mandshurica/template.c

index f91ae0be3d7cff3cc584f4b76f03f0a0bae1452e..e08c0d6983870fb6e6db0fdf2e807a315c023976 100644 (file)
 #include "mandshurica.h"
 
 #include <stdbool.h>
-#include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 char* mandshurica_parse_template(const char* data) {
        char* webroot = mandshurica_get_param("HTTPRoot");
@@ -103,6 +103,11 @@ char* mandshurica_parse_template(const char* data) {
                                        free(tmp);
                                } else if(strcmp(op, "chdir_webroot") == 0) {
                                        chdir(webroot);
+                               } else if(strcmp(op, "comment") == 0) {
+                                       /* Do nothing */
+                               } else if(strcmp(op, "stop") == 0) {
+                                       free(tmpl);
+                                       break;
                                }
 
                                free(tmpl);