#ifndef GMX_UTILITY_CSTRINGUTIL_H
#define GMX_UTILITY_CSTRINGUTIL_H
+#include "gromacs/utility/gmx_header_config.h"
+
#include <stdio.h>
#include <time.h>
-#include "../legacyheaders/types/simple.h"
-
-#include "gmx_header_config.h"
-
-/* Suppress Cygwin compiler warnings from using newlib version of
- * ctype.h */
-#ifdef GMX_CYGWIN
-#include <ctype.h>
-
-#undef isdigit
-#undef isstring
-#undef isspace
-#undef isalnum
-#undef isalpha
-#undef ispunct
-#undef isxdigit
-#undef isupper
-#undef islower
-#undef toupper
-#undef tolower
-#endif
+#include "gromacs/utility/basedefinitions.h"
#ifdef __cplusplus
extern "C" {
#define CONTINUE '\\'
/** Comment sign to use. */
#define COMMENTSIGN ';'
+/** Standard size for char* string buffers. */
+#define STRLEN 4096
/*! \brief
* Strip trailing spaces and if s ends with a ::CONTINUE remove that too.
*/
gmx_int64_t str_to_int64_t(const char *str, char **endptr);
+/** Minimum size of buffer to pass to gmx_step_str(). */
+#define STEPSTRSIZE 22
+
+/*! \brief
+ * Prints a gmx_int64_t value in buf and returns the pointer to buf.
+ *
+ * buf should be large enough to contain i: STEPSTRSIZE (22) chars.
+ * When multiple gmx_int64_t values are printed in the same printf call,
+ * be sure to call gmx_step_str with different buffers.
+ */
+char *gmx_step_str(gmx_int64_t i, char *buf);
+
#ifdef GMX_NATIVE_WINDOWS
#define snprintf _snprintf
#endif