Move general functions out of typedefs.h
[alexxy/gromacs.git] / src / gromacs / utility / cstringutil.h
index a02d2b7ec171654d27975fca4420e4b89108cbde..bfd1d6f0adbabd7d08dfbbfea369a301f0e67a4c 100644 (file)
@@ -203,6 +203,18 @@ char *wrap_lines(const char *buf, int line_width, int indent,
  */
 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