Changeset 3693 for trunk/Ohana/src/opihi/dvo/cmpload.c
- Timestamp:
- Apr 11, 2005, 10:37:51 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/cmpload.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/cmpload.c
r3462 r3693 12 12 double dtmp; 13 13 FILE *f; 14 char *buffer, *buffer2, *line; 14 char *buffer, *buffer2; 15 int Ximage, Nimage; 15 16 Header header; 16 int Ximage, Nimage;17 17 18 18 Nimage = -1; … … 121 121 fclose (f); 122 122 123 ALLOCATE (line, char, 129); 124 write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */ 125 sprintf (line, "OVER %9d ", n); 126 write (Ximage, line, 16); 127 123 SendGraphCommand (Ximage, 4, "LOAD"); 124 SendGraphCommand (Ximage, 16, "OVER %9d ", n); 128 125 ALLOCATE (buffer2, char, 66000); 129 126 bzero (buffer2, 65536); 127 130 128 for (Nout = i = 0; i < Nin; i++, Nout++) { 131 129 sprintf (&buffer2[Nout*128], "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX", X[i], Y[i], 5.0, 5.0); 132 130 if (Nout == 512) { 133 sprintf (line, "NLINES %7d ", Nout); 134 write (Ximage, line, 16); 131 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nout); 135 132 write (Ximage, buffer2, Nout*128); 136 133 bzero (buffer2, 65536); … … 140 137 141 138 if (Nout) { 142 sprintf (line, "NLINES %7d ", Nout); 143 write (Ximage, line, 16); 139 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nout); 144 140 write (Ximage, buffer2, Nout*128); 145 141 } 146 sprintf (line, "DONE "); 147 write (Ximage, line, 16); 142 SendGraphCommand (Ximage, 16, "DONE"); 148 143 149 144 fits_free_header (&header); … … 152 147 free (M); 153 148 free (buffer); 154 /* */155 156 149 free (buffer2); 157 free (line);158 150 159 151 fprintf (stderr, "loaded %d objects\n", Nin);
Note:
See TracChangeset
for help on using the changeset viewer.
