aboutsummaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 5ff6123..e66c6a4 100644
--- a/buffer.c
+++ b/buffer.c
@@ -621,6 +621,18 @@ buf_parse (struct buffer *buf, const int delim, char *line, const int size)
}
/*
+ * Print a string which might be NULL
+ */
+const char *
+np (const char *str)
+{
+ if (str)
+ return str;
+ else
+ return "[NULL]";
+}
+
+/*
* Classify and mutate strings based on character types.
*/