diff options
Diffstat (limited to 'GnuPG/tools.h')
-rw-r--r-- | GnuPG/tools.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/GnuPG/tools.h b/GnuPG/tools.h new file mode 100644 index 0000000..fd92086 --- /dev/null +++ b/GnuPG/tools.h @@ -0,0 +1,31 @@ +#ifndef __TOOLS_H__
+#define __TOOLS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void replace(char *atext, const char *apattern, const char *areplacement);
+char *replace_dup(const char *atext, const char *apattern, const char *areplacement);
+char *getNextPart(char *aresult, char *atext, const char *aseparator);
+void getLastPart(char *aresult, char *atext);
+void appendText(char **abuffer, const char *atext, int atextsize=0);
+void quoteEscapeSequences(char *atext);
+void unquoteEscapeSequences(char *atext);
+
+BOOL existsFile(const char *afilename);
+BOOL writeToFile(char *afilename, const char *atext, bool isUnicode=false);
+BOOL fnFALSE(char **ppc); // mir_free *ppc, *ppc=NULL, return FALSE.
+BOOL readFromFile(char **aresult, const char *afilename);
+void getTemporaryFileName(char *aresult);
+
+char* u2a(const wchar_t *src);
+wchar_t* a2u(const char *src);
+char *fixcrlf_dup(const char *buf);
+char *makemix_dup(const char *buf);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __TOOLS_H__
|