libxlsxwriter/include/xlsxwriter/utility.h in fast_excel-0.2.6 vs libxlsxwriter/include/xlsxwriter/utility.h in fast_excel-0.3.0
- old
+ new
@@ -1,24 +1,25 @@
/*
* libxlsxwriter
*
- * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
+ * Copyright 2014-2019, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
*/
/**
* @file utility.h
*
* @brief Utility functions for libxlsxwriter.
*
- * <!-- Copyright 2014-2018, John McNamara, jmcnamara@cpan.org -->
+ * <!-- Copyright 2014-2019, John McNamara, jmcnamara@cpan.org -->
*
*/
#ifndef __LXW_UTILITY_H__
#define __LXW_UTILITY_H__
#include <stdint.h>
+#include <strings.h>
#include "common.h"
#include "xmlwriter.h"
/**
* @brief Convert an Excel `A1` cell string into a `(row, col)` pair.
@@ -85,10 +86,24 @@
extern "C" {
#endif
/* *INDENT-ON* */
/**
+ * @brief Retrieve the library version.
+ *
+ * @return The "X.Y.Z" version string.
+ *
+ * Get the library version as a "X.Y.Z" version string
+ *
+ * @code
+ * printf("Libxlsxwriter version = %s\n", lxw_version());
+ * @endcode
+ *
+ */
+const char *lxw_version(void);
+
+/**
* @brief Converts a libxlsxwriter error number to a string.
*
* The `%lxw_strerror` function converts a libxlsxwriter error number defined
* by #lxw_error to a pointer to a string description of the error.
* Similar to the standard library strerror(3) function.
@@ -150,19 +165,28 @@
size_t lxw_utf8_strlen(const char *str);
void lxw_str_tolower(char *str);
+/* Define a portable version of strcasecmp(). */
+#ifdef _MSC_VER
+#define lxw_strcasecmp _stricmp
+#else
+#define lxw_strcasecmp strcasecmp
+#endif
+
FILE *lxw_tmpfile(char *tmpdir);
/* Use a user defined function to format doubles in sprintf or else a simple
* macro (the default). */
#ifdef USE_DOUBLE_FUNCTION
int lxw_sprintf_dbl(char *data, double number);
#else
#define lxw_sprintf_dbl(data, number) \
lxw_snprintf(data, LXW_ATTR_32, "%.16g", number)
#endif
+
+uint16_t lxw_hash_password(const char *password);
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif