IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 16, 2007, 4:00:06 PM (19 years ago)
Author:
eugene
Message:

asserting libkapa API, adding section and erase commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/clear.c

    r13391 r13404  
    11# include "data.h"
    22
     3// default is to clear all plots, but not the sections or the images
    34int clear (int argc, char **argv) {
    45 
    5   int N, ClearSection;
     6  int N;
    67  int kapa;
    78  char *name;
     
    1617  FREE (name);
    1718
    18   /* XXX need to distinguish between Plot, AllPlots, Image, AllSections */
    19   ClearSection = FALSE;
    20   if ((N = get_argument (argc, argv, "-s"))) {
    21     remove_argument (N, &argc, argv);
    22     ClearSection = TRUE;
     19  // clear all sections
     20  if ((N = get_argument (argc, argv, "-s")) ||
     21      (N = get_argument (argc, argv, "-section"))) {
     22      KapaClearSections (kapa);
     23      return (TRUE);
     24  }
     25
     26  // clear all sections
     27  if ((N = get_argument (argc, argv, "-graph"))) {
     28      KapaClearCurrentPlot (kapa);
     29      return (TRUE);
     30  }
     31
     32  // clear image
     33  if ((N = get_argument (argc, argv, "-image"))) {
     34      KapaClearImage (kapa);
     35      return (TRUE);
    2336  }
    2437
    2538  if (argc != 1) {
    26     gprint (GP_ERR, "USAGE: clear [-n Xgraph]\n");
     39    gprint (GP_ERR, "USAGE: clear [-n Xgraph] [-s|-section] [-image] [-graph]\n");
     40    gprint (GP_ERR, "       [-s|-section] : clear all sections\n");
     41    gprint (GP_ERR, "       [-graph]      : clear current graph\n");
     42    gprint (GP_ERR, "       [-image]      : clear current image\n");
    2743    return (FALSE);
    2844  }
    2945
    30   KapaClear (kapa, ClearSection);
     46  KapaClearPlots (kapa);
    3147  return (TRUE);
    3248}
Note: See TracChangeset for help on using the changeset viewer.