]> diplodocus.org Git - nmh/blobdiff - h/utils.h
cppflags.m4: Don't trample CFLAGS and CPPFLAGS.
[nmh] / h / utils.h
index 0c6c7347024f4d432ed12db363754b396e85aed0..19fbdcc6d253675e94f227cbb47c8f35306faa7f 100644 (file)
--- a/h/utils.h
+++ b/h/utils.h
@@ -80,18 +80,7 @@ void trim_suffix_c(char *s, int c);
 void to_lower(char *s);
 void to_upper(char *s);
 
 void to_lower(char *s);
 void to_upper(char *s);
 
-/*
- * See if a string contains 8 bit characters (use isascii() for the test).
- * Arguments include:
- *
- * start       - Pointer to start of string to test.
- * end         - End of string to test (test will stop before reaching
- *               this point).  If NULL, continue until reaching '\0'.
- *
- * This function always stops at '\0' regardless of the value of 'end'.
- * Returns 1 if the string contains an 8-bit character, 0 if it does not.
- */
-int contains8bit(const char *start, const char *end);
+bool contains8bit(const char *start, const char *end);
 
 /*
  * See if file has any 8-bit bytes.
 
 /*
  * See if file has any 8-bit bytes.
@@ -106,6 +95,19 @@ int contains8bit(const char *start, const char *end);
  */
 int scan_input (int fd, int *eightbit);
 
  */
 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
  *
 /*
  * program initialization
  *