IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2005, 3:21:40 PM (21 years ago)
Author:
eugene
Message:

substantial work to move kii/kapa call into libkapa

File:
1 edited

Legend:

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

    r5849 r5850  
    44 
    55  int i, N, Ngraph, Xgraph;
    6   char Ticks[16], Axis[16], Labels[16];
    76  Graphdata graphmode;
    87 
    9   strcpy (Ticks, "2222");
     8  if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);
     9
     10  strcpy (graphmode.ticks, "2222");
    1011  if ((N = get_argument (argc, argv, "-ticks"))) {
    1112    remove_argument (N, &argc, argv);
    12     strcpy (Ticks, argv[N]);
     13    strcpy (graphmode.ticks, argv[N]);
    1314    remove_argument (N, &argc, argv);
    14     if (strlen (Ticks) != 4) { goto usage; }
    15     for (i = 0; i < strlen (Ticks); i++) {
    16       if ((Ticks[i] != '0') && (Ticks[i] != '1') && (Ticks[i] != '2')) { goto usage; }
     15    if (strlen (graphmode.ticks) != 4) { goto usage; }
     16    for (i = 0; i < strlen (graphmode.ticks); i++) {
     17      if ((graphmode.ticks[i] != '0') && (graphmode.ticks[i] != '1') && (graphmode.ticks[i] != '2')) { goto usage; }
    1718    }
    1819  }
    1920 
    20   strcpy (Labels, "2222");
     21  strcpy (graphmode.labels, "2222");
    2122  if ((N = get_argument (argc, argv, "-labels"))) {
    2223    remove_argument (N, &argc, argv);
    23     strcpy (Labels, argv[N]);
     24    strcpy (graphmode.labels, argv[N]);
    2425    remove_argument (N, &argc, argv);
    25     if (strlen (Labels) != 4) { goto usage; }
    26     for (i = 0; i < strlen (Labels); i++) {
    27       if ((Labels[i] != '0') && (Labels[i] != '1') && (Labels[i] != '2')) { goto usage; }
     26    if (strlen (graphmode.labels) != 4) { goto usage; }
     27    for (i = 0; i < strlen (graphmode.labels); i++) {
     28      if ((graphmode.labels[i] != '0') && (graphmode.labels[i] != '1') && (graphmode.labels[i] != '2')) { goto usage; }
    2829    }
    2930  }
    3031
    31   strcpy (Axis, "2222");
     32  strcpy (graphmode.axis, "2222");
    3233  if ((N = get_argument (argc, argv, "-axis"))) {
    3334    remove_argument (N, &argc, argv);
    34     strcpy (Axis, argv[N]);
     35    strcpy (graphmode.axis, argv[N]);
    3536    remove_argument (N, &argc, argv);
    36     if (strlen (Axis) != 4) { goto usage; }
    37     for (i = 0; i < strlen (Axis); i++) {
    38       if ((Axis[i] != '0') && (Axis[i] != '1') && (Axis[i] != '2')) { goto usage; }
     37    if (strlen (graphmode.axis) != 4) { goto usage; }
     38    for (i = 0; i < strlen (graphmode.axis); i++) {
     39      if ((graphmode.axis[i] != '0') && (graphmode.axis[i] != '1') && (graphmode.axis[i] != '2')) { goto usage; }
    3940    }
    4041  }
     
    4647    remove_argument (N, &argc, argv);
    4748  }
    48   if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);
    4949
    5050  if (argc != 1) goto usage;
    5151
    52   KapaBox (Xgraph, &graphmode, Axis, Labels, Ticks);
     52  KapaBox (Xgraph, &graphmode);
    5353  return (TRUE);
    5454     
     
    7373   -labels 1100
    7474   -ticks 1111
    75    
    76 
    7775
    7876   messages to kapa:
Note: See TracChangeset for help on using the changeset viewer.