summaryrefslogtreecommitdiffstats
path: root/src/blogc-make
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-make')
-rw-r--r--src/blogc-make/atom.c9
-rw-r--r--src/blogc-make/atom.h14
-rw-r--r--src/blogc-make/ctx.c9
-rw-r--r--src/blogc-make/ctx.h14
-rw-r--r--src/blogc-make/exec-native.c9
-rw-r--r--src/blogc-make/exec-native.h14
-rw-r--r--src/blogc-make/exec.c9
-rw-r--r--src/blogc-make/exec.h14
-rw-r--r--src/blogc-make/httpd.c9
-rw-r--r--src/blogc-make/httpd.h14
-rw-r--r--src/blogc-make/main.c9
-rw-r--r--src/blogc-make/reloader.c9
-rw-r--r--src/blogc-make/reloader.h14
-rw-r--r--src/blogc-make/rules.c9
-rw-r--r--src/blogc-make/rules.h14
-rw-r--r--src/blogc-make/settings.c9
-rw-r--r--src/blogc-make/settings.h14
-rw-r--r--src/blogc-make/utils.c9
-rw-r--r--src/blogc-make/utils.h14
19 files changed, 47 insertions, 169 deletions
diff --git a/src/blogc-make/atom.c b/src/blogc-make/atom.c
index 0b8cfd1..baf5eeb 100644
--- a/src/blogc-make/atom.c
+++ b/src/blogc-make/atom.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <stdlib.h>
#include <string.h>
diff --git a/src/blogc-make/atom.h b/src/blogc-make/atom.h
index 29a6dcb..ccd8d37 100644
--- a/src/blogc-make/atom.h
+++ b/src/blogc-make/atom.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_ATOM_H
-#define _MAKE_ATOM_H
+#pragma once
#include "../common/error.h"
#include "settings.h"
@@ -15,5 +9,3 @@
char* bm_atom_generate(bm_settings_t *settings);
char* bm_atom_deploy(bm_settings_t *settings, bc_error_t **err);
void bm_atom_destroy(const char *fname);
-
-#endif /* _MAKE_ATOM_H */
diff --git a/src/blogc-make/ctx.c b/src/blogc-make/ctx.c
index b8d23dd..0745529 100644
--- a/src/blogc-make/ctx.c
+++ b/src/blogc-make/ctx.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/src/blogc-make/ctx.h b/src/blogc-make/ctx.h
index a66d51c..774601f 100644
--- a/src/blogc-make/ctx.h
+++ b/src/blogc-make/ctx.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_CTX_H
-#define _MAKE_CTX_H
+#pragma once
#include <sys/stat.h>
#include <stdbool.h>
@@ -80,5 +74,3 @@ void bm_ctx_free_internal(bm_ctx_t *ctx);
void bm_ctx_free(bm_ctx_t *ctx);
const char* bm_ctx_settings_lookup(bm_ctx_t *ctx, const char *key);
const char* bm_ctx_settings_lookup_str(bm_ctx_t *ctx, const char *key);
-
-#endif /* _MAKE_CTX_H */
diff --git a/src/blogc-make/exec-native.c b/src/blogc-make/exec-native.c
index 6d7f58f..f18ed9c 100644
--- a/src/blogc-make/exec-native.c
+++ b/src/blogc-make/exec-native.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <stdbool.h>
#include <stdlib.h>
diff --git a/src/blogc-make/exec-native.h b/src/blogc-make/exec-native.h
index 56a1da1..bade6a2 100644
--- a/src/blogc-make/exec-native.h
+++ b/src/blogc-make/exec-native.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_EXEC_NATIVE_H
-#define _MAKE_EXEC_NATIVE_H
+#pragma once
#include <stdbool.h>
#include "../common/error.h"
@@ -16,5 +10,3 @@
int bm_exec_native_cp(bm_filectx_t *source, bm_filectx_t *dest, bool verbose);
bool bm_exec_native_is_empty_dir(const char *dir, bc_error_t **err);
int bm_exec_native_rm(const char *output_dir, bm_filectx_t *dest, bool verbose);
-
-#endif /* _MAKE_EXEC_NATIVE_H */
diff --git a/src/blogc-make/exec.c b/src/blogc-make/exec.c
index 4b1f6df..4dd6f8b 100644
--- a/src/blogc-make/exec.c
+++ b/src/blogc-make/exec.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/src/blogc-make/exec.h b/src/blogc-make/exec.h
index 6bc206f..aa0784a 100644
--- a/src/blogc-make/exec.h
+++ b/src/blogc-make/exec.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_EXEC_H
-#define _MAKE_EXEC_H
+#pragma once
#include <stdbool.h>
#include "../common/error.h"
@@ -31,5 +25,3 @@ char* bm_exec_blogc_get_variable(bm_ctx_t *ctx, bc_trie_t *global_variables,
bc_slist_t *sources, bool only_first_source);
int bm_exec_blogc_runserver(bm_ctx_t *ctx, const char *host, const char *port,
const char *threads);
-
-#endif /* _MAKE_EXEC_H */
diff --git a/src/blogc-make/httpd.c b/src/blogc-make/httpd.c
index c352da0..1491095 100644
--- a/src/blogc-make/httpd.c
+++ b/src/blogc-make/httpd.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/blogc-make/httpd.h b/src/blogc-make/httpd.h
index b0fa87d..73a8007 100644
--- a/src/blogc-make/httpd.h
+++ b/src/blogc-make/httpd.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_HTTPD_H
-#define _MAKE_HTTPD_H
+#pragma once
#include "../common/utils.h"
#include "ctx.h"
@@ -15,5 +9,3 @@
int bm_httpd_run(bm_ctx_t **ctx, bm_rule_exec_func_t rule_exec, bc_slist_t *outputs,
bc_trie_t *args);
-
-#endif /* _MAKE_HTTPD_H */
diff --git a/src/blogc-make/main.c b/src/blogc-make/main.c
index 5b4a030..5d3f686 100644
--- a/src/blogc-make/main.c
+++ b/src/blogc-make/main.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/src/blogc-make/reloader.c b/src/blogc-make/reloader.c
index fea8bd4..e025998 100644
--- a/src/blogc-make/reloader.c
+++ b/src/blogc-make/reloader.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <stdbool.h>
#include <stdio.h>
diff --git a/src/blogc-make/reloader.h b/src/blogc-make/reloader.h
index f3fddf4..d6a9370 100644
--- a/src/blogc-make/reloader.h
+++ b/src/blogc-make/reloader.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_RELOADER_H
-#define _MAKE_RELOADER_H
+#pragma once
#include "../common/utils.h"
#include "ctx.h"
@@ -16,5 +10,3 @@
int bm_reloader_run(bm_ctx_t **ctx, bm_rule_exec_func_t rule_exec,
bc_slist_t *outputs, bc_trie_t *args);
void bm_reloader_stop(int status_code);
-
-#endif /* _MAKE_RELOADER_H */
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index 7d92b95..9cfc969 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <stdbool.h>
#include <stdio.h>
diff --git a/src/blogc-make/rules.h b/src/blogc-make/rules.h
index 9ff39ca..ad1fa8f 100644
--- a/src/blogc-make/rules.h
+++ b/src/blogc-make/rules.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2020 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_RULES_H
-#define _MAKE_RULES_H
+#pragma once
#include <stdbool.h>
#include "ctx.h"
@@ -32,5 +26,3 @@ bool bm_rule_need_rebuild(bc_slist_t *sources, bm_filectx_t *settings,
bool only_first_source);
bc_slist_t* bm_rule_list_built_files(bm_ctx_t *ctx);
void bm_rule_print_help(void);
-
-#endif /* _MAKE_RULES_H */
diff --git a/src/blogc-make/settings.c b/src/blogc-make/settings.c
index 1079fc0..4accc6d 100644
--- a/src/blogc-make/settings.c
+++ b/src/blogc-make/settings.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <libgen.h>
#include <stdbool.h>
diff --git a/src/blogc-make/settings.h b/src/blogc-make/settings.h
index 69fdbb6..dc28033 100644
--- a/src/blogc-make/settings.h
+++ b/src/blogc-make/settings.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_SETTINGS_H
-#define _MAKE_SETTINGS_H
+#pragma once
#include <stddef.h>
#include "../common/error.h"
@@ -25,5 +19,3 @@ typedef struct {
bm_settings_t* bm_settings_parse(const char *content, size_t content_len,
bc_error_t **err);
void bm_settings_free(bm_settings_t *settings);
-
-#endif /* _MAKE_SETTINGS_H */
diff --git a/src/blogc-make/utils.c b/src/blogc-make/utils.c
index 8f69e44..c987cfd 100644
--- a/src/blogc-make/utils.c
+++ b/src/blogc-make/utils.c
@@ -1,10 +1,5 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
#include <errno.h>
#include <limits.h>
diff --git a/src/blogc-make/utils.h b/src/blogc-make/utils.h
index cbcfc0e..801bf0f 100644
--- a/src/blogc-make/utils.h
+++ b/src/blogc-make/utils.h
@@ -1,13 +1,7 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
+// SPDX-FileCopyrightText: 2014-2024 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+// SPDX-License-Identifier: BSD-3-Clause
-#ifndef _MAKE_UTILS_H
-#define _MAKE_UTILS_H
+#pragma once
#include "../common/error.h"
@@ -16,5 +10,3 @@ char* bm_generate_filename(const char *dir, const char *prefix, const char *fnam
char* bm_generate_filename2(const char *dir, const char *prefix, const char *fname,
const char *prefix2, const char *fname2, const char *ext);
char* bm_abspath(const char *path, bc_error_t **err);
-
-#endif /* _MAKE_UTILS_H */