X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/052d7bfb0a9a541c6975c3ed679dd3ac9e5c0886..877306f0cf8700241efc2e245f66df5ba95113f9:/h/utils.h diff --git a/h/utils.h b/h/utils.h index 0c6c7347..297746de 100644 --- a/h/utils.h +++ b/h/utils.h @@ -106,6 +106,19 @@ int contains8bit(const char *start, const char *end); */ int scan_input (int fd, int *eightbit); +/* + * Returns string representation of int, in static memory. + */ +char *m_str(int value); + +/* + * Returns string representation of an int, in static memory. If width + * == 0, does not limit the width. If width > 0 and value will not fit + * in field of that size, including any negative sign but excluding + * terminating null, then returns "?". + */ +char *m_strn(int value, unsigned int width); + /* * program initialization *