sreplace.c
changeset 11 0ef0d9c52f82
parent 7 fcde17ef6af6
child 12 f81dd70a9b0b
--- a/sreplace.c	Wed Jul 04 21:43:09 2007 +0200
+++ b/sreplace.c	Wed Jul 04 21:44:29 2007 +0200
@@ -10,6 +10,8 @@
 
 #include "sreplace.h"
 
+const int verbose = 0;
+
 enum {
   BUFFER_SIZE = 2048
 };
@@ -249,14 +251,20 @@
   new_str.ptr = argv[2];
 
   old_str.length = parse_backslashes(old_str.ptr);
-  fprintf(stderr, "OLD: ");
-  print_hex(stderr, &old_str);
-  fprintf(stderr, "\n");
+  if (verbose)
+  {
+      fprintf(stderr, "OLD: ");
+      print_hex(stderr, &old_str);
+      fprintf(stderr, "\n");
+  }
 
   new_str.length = parse_backslashes(new_str.ptr);
-  fprintf(stderr, "NEW: ");
-  print_hex(stderr, &new_str);
-  fprintf(stderr, "\n");
+  if (verbose)
+  {
+      fprintf(stderr, "NEW: ");
+      print_hex(stderr, &new_str);
+      fprintf(stderr, "\n");
+  }
 }
 
 int main(int argc, char ** argv)