+/*
+ * Trim newlines (and backslashes preceding those) and tab characters to
+ * help simplify scripting of the quick-dump feature. Leave spaces and
+ * other backslashes alone.
+ */
+static void
+trim_formatting(char *source)
+{
+ char *target = source;
+ char ch;
+
+ while ((ch = *source++) != '\0') {
+ if (ch == '\\' && *source == '\n')
+ continue;
+ if (ch == '\n' || ch == '\t')
+ continue;
+ *target++ = ch;
+ }
+ *target = '\0';
+}
+