Changeset 3693 for trunk/Ohana/src/opihi/cmd.astro
- Timestamp:
- Apr 11, 2005, 10:37:51 AM (21 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.astro
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/gauss.c
r2843 r3693 51 51 52 52 fcntl (Ximage, F_SETFL, !O_NONBLOCK); 53 write (Ximage, "CURS", 4); /* ask Ximage to look for the keystrokes */53 SendGraphCommand (Ximage, 4, "CURS"); 54 54 55 55 for (i = 0; (i < Nspot) || (Nspot == 0); i++) { … … 64 64 65 65 } 66 write (Ximage, "NCUR", 4); /* tell Ximage "end of keystrokes" */ 66 SendGraphCommand (Ximage, 4, "NCUR"); 67 67 68 return (TRUE); 68 69 } -
trunk/Ohana/src/opihi/cmd.astro/objload.c
r3462 r3693 66 66 free (buffer); 67 67 68 write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */ 69 sprintf (line, "OVER %9d ", n); 70 write (Ximage, line, 16); 68 SendGraphCommand (Ximage, 4, "LOAD"); 69 SendGraphCommand (Ximage, 16, "OVER %9d ", n); 71 70 71 /** NOTE: modify to use NBYTE **/ 72 72 ALLOCATE (buffer, char, 66000); 73 73 bzero (buffer, 65536); … … 75 75 snprintf (&buffer[Nout*128], 129, "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX", X[i], Y[i], 5.0, 5.0); 76 76 if (Nout == 512) { 77 sprintf (line, "NLINES %7d ", Nout); 78 write (Ximage, line, 16); 77 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nout); 79 78 write (Ximage, buffer, Nout*128); 80 79 bzero (buffer, 65536); … … 84 83 85 84 if (Nout) { 86 sprintf (line, "NLINES %7d ", Nout); 87 write (Ximage, line, 16); 85 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nout); 88 86 write (Ximage, buffer, Nout*128); 89 87 } 90 sprintf (line, "DONE "); 91 write (Ximage, line, 16); 88 SendGraphCommand (Ximage, 16, "DONE"); 92 89 93 90 free (X); -
trunk/Ohana/src/opihi/cmd.astro/outline.c
r2598 r3693 158 158 Nline = 0; 159 159 160 write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */ 161 sprintf (line, "OVER %9d ", 0); 162 write (Ximage, line, 16); 160 SendGraphCommand (Ximage, 4, "LOAD"); 161 SendGraphCommand (Ximage, 16, "OVER %9d ", 0); 163 162 164 163 dx = par[2]; … … 178 177 179 178 if (Nline >= 510) { 180 sprintf (line, "NLINES %7d ", Nline); 181 write (Ximage, line, 16); 179 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 182 180 write (Ximage, buffer, Nline*128); 183 181 bzero (buffer, 65536); … … 185 183 } 186 184 } 187 188 sprintf (line, "NLINES %7d ", Nline); 189 write (Ximage, line, 16); 185 186 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 190 187 write (Ximage, buffer, Nline*128); 191 sprintf (line, "DONE");192 write (Ximage, line, 16); 188 SendGraphCommand (Ximage, 16, "DONE"); 189 193 190 free (buffer); 194 191 free (line); -
trunk/Ohana/src/opihi/cmd.astro/outline2.c
r2843 r3693 316 316 Nline = 0; 317 317 318 write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */ 319 sprintf (line, "OVER %9d ", 0); 320 write (Ximage, line, 16); 318 SendGraphCommand (Ximage, 4, "LOAD"); 319 SendGraphCommand (Ximage, 16, "OVER %9d ", 0); 321 320 322 321 dx = par[2]; … … 336 335 337 336 if (Nline >= 510) { 338 sprintf (line, "NLINES %7d ", Nline); 339 write (Ximage, line, 16); 337 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 340 338 write (Ximage, buffer, Nline*128); 341 339 bzero (buffer, 65536); … … 344 342 } 345 343 346 sprintf (line, "NLINES %7d ", Nline); 347 write (Ximage, line, 16); 344 SendGraphCommand (Ximage, 16, "NLINES %7d ", Nline); 348 345 write (Ximage, buffer, Nline*128); 349 sprintf (line, "DONE");350 write (Ximage, line, 16); 346 SendGraphCommand (Ximage, 16, "DONE"); 347 351 348 free (buffer); 352 349 free (line);
Note:
See TracChangeset
for help on using the changeset viewer.
