summaryrefslogtreecommitdiff
path: root/utility.h
diff options
context:
space:
mode:
authorbeatrice <beatrice@dangofactory.net>2026-11-22 19:25:05 +0900
committerbeatrice <beatrice@dangofactory.net>2026-11-22 19:25:05 +0900
commitc7a201b58080c7a0f57b38c59e7865aa42c1d029 (patch)
treecde6146e3aada31e68594fd4f034abe90621ce34 /utility.h
downloadvsftpd-master.tar.gz
vsftpd-master.zip
Import vsftpd-3.0.5.tar.gzHEADlocal/vsftpdmaster
Diffstat (limited to 'utility.h')
-rw-r--r--utility.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/utility.h b/utility.h
new file mode 100644
index 0000000..aae3052
--- /dev/null
+++ b/utility.h
@@ -0,0 +1,44 @@
+#ifndef VSF_UTILITY_H
+#define VSF_UTILITY_H
+
+struct mystr;
+
+/* die()
+ * PURPOSE
+ * Terminate execution of the process, due to an abnormal (but non-bug)
+ * situation.
+ * PARAMETERS
+ * p_text - text string describing why the process is exiting
+ */
+void die(const char* p_text);
+
+/* die2()
+ * PURPOSE
+ * Terminate execution of the process, due to an abnormal (but non-bug)
+ * situation.
+ * PARAMETERS
+ * p_text1 - text string describing why the process is exiting
+ * p_text2 - text to safely concatenate to p_text1
+ */
+void die2(const char* p_text1, const char* p_text2);
+
+/* bug()
+ * PURPOSE
+ * Terminate execution of the process, due to a suspected bug, trying to emit
+ * the reason this happened down the network in FTP response format.
+ * PARAMETERS
+ * p_text - text string describing what bug trap has triggered
+ * */
+void bug(const char* p_text);
+
+/* vsf_exit()
+ * PURPOSE
+ * Terminate execution of the process, writing out the specified text string
+ * in the process.
+ * PARAMETERS
+ * p_text - text string describing why the process is exiting
+ */
+void vsf_exit(const char* p_text);
+
+#endif
+