]> andersk Git - moira.git/blobdiff - backup/dump_db.pc
Command line printer manipulation client, and build goo.
[moira.git] / backup / dump_db.pc
index c1ed4cdb92ed2e61a0375b8f759900dbf13cef0d..850d01346aa151d05f32f500d248834ef8de5dcc 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id $
+/* $Id$
  *
  *     This program dumps the Moira database to a series of output files
  * which can be later read back into Moira in the event of a crash.
@@ -115,3 +115,27 @@ FILE *open_file(char *prefix, char *suffix)
   fprintf(stderr, "Working on %s\n", name);
   return f;
 }
+
+/*
+ * Trim whitespace off the tail end of a string
+ */
+char *endtrim(char *save)
+{
+  char *t, *s;
+
+  s = save;
+  for (t = s; *t; t++)
+    continue;
+  while (t > s)
+    {
+      --t;
+      if (!isspace(*t))
+       {
+         t++;
+         break;
+       }
+    }
+  if (*t)
+    *t = '\0';
+  return s;
+}
This page took 0.032758 seconds and 4 git commands to generate.