IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 8, 2005, 5:38:38 PM (21 years ago)
Author:
eugene
Message:

converted Xgraph messages to SendGraphCommand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/section.c

    r2843 r3692  
    2424  if (argc == 1) {
    2525    /* list section */
    26     write (Xgraph, "LSEC", 4);
    27     sprintf (buffer, "* %s", argv[1]);
    28     sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
    29     write (Xgraph, buffer2, 16);
    30     write (Xgraph, buffer, strlen (buffer));
     26    SendGraphCommand (Xgraph, 4, "LSEC");
     27    SendGraphMessage (Xgraph, "* %s", argv[1]);
    3128    fprintf (stderr, "USAGE: section name [x y dx dy]\n");
    3229    return (TRUE);
     
    3633    /* set section */
    3734    if (List) {
    38       write (Xgraph, "LSEC", 4);
     35      SendGraphCommand (Xgraph, 4, "LSEC");
    3936    } else {
    40       write (Xgraph, "SSEC", 4);
     37      SendGraphCommand (Xgraph, 4, "SSEC");
    4138    }
    42     sprintf (buffer, "%s", argv[1]);
    43     sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
    44     write (Xgraph, buffer2, 16);
    45     write (Xgraph, buffer, strlen (buffer));
     39    SendGraphMessage (Xgraph, "%s", argv[1]);
    4640    return (TRUE);
    4741  }
     
    4943  if (argc == 6) {
    5044    /* define section */
    51     write (Xgraph, "DSEC", 4);
    52     snprintf (buffer, 65, "%s %6.3f %6.3f %6.3f %6.3f", argv[1], atof (argv[2]), atof (argv[3]), atof (argv[4]), atof (argv[5]));
    53     snprintf (buffer2, 65, "NBYTES: %6d ", strlen (buffer));
    54     write (Xgraph, buffer2, 16);
    55     write (Xgraph, buffer, strlen (buffer));
     45    SendGraphCommand (Xgraph, 4, "DSEC");
     46    SendGraphMessage (Xgraph, "%s %6.3f %6.3f %6.3f %6.3f", argv[1], atof (argv[2]), atof (argv[3]), atof (argv[4]), atof (argv[5]));
    5647    return (TRUE);
    5748  }
    58      
    5949  fprintf (stderr, "USAGE: section name [x y dx dy]\n");
    6050  return (FALSE);
    61  
    6251}
    6352
Note: See TracChangeset for help on using the changeset viewer.