Index: trunk/Ohana/src/opihi/cmd.data/vcontour.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/vcontour.c	(revision 2598)
+++ trunk/Ohana/src/opihi/cmd.data/vcontour.c	(revision 3693)
@@ -45,6 +45,5 @@
 Nline ++; \
 if (Nline == 512) { \
-  sprintf (line, "NLINES  %7d \0", Nline); \
-  write (Ximage, line, 16); \
+  SendGraphCommand (Ximage, 16, "NLINES  %7d \0", Nline); \
   write (Ximage, buffer, Nline*128); \
   bzero (buffer, 65536); \
@@ -57,6 +56,5 @@
 Nline ++; \
 if (Nline == 512) { \
-  sprintf (line, "NLINES  %7d \0", Nline); \
-  write (Ximage, line, 16); \
+  SendGraphCommand (Ximage, 16, "NLINES  %7d \0", Nline); \
   write (Ximage, buffer, Nline*128); \
   bzero (buffer, 65536); \
@@ -263,15 +261,11 @@
   
   if (Nline > 0) {
-    sprintf (line, "NLINES  %7d \0", Nline); 
-    write (Ximage, line, 16); 
+    SendGraphCommand (Ximage, 16, "NLINES  %7d \0", Nline); 
     write (Ximage, buffer, Nline*128); 
   }
 
   free (buffer);
-  sprintf (line, "DONE \0");
-  write (Ximage, line, 16);
-  if (Npix != 1) {
-    free (matrix);
-  }
+  SendGraphCommand (Ximage, 16, "DONE");
+  if (Npix != 1) free (matrix);
   fprintf (stderr, "\n");
 }
