IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13409


Ignore:
Timestamp:
May 17, 2007, 9:58:42 AM (19 years ago)
Author:
eugene
Message:

rationalized kapa block/non-block, fixed comm problems

Location:
branches/kapa-mods-2007-05/Ohana/src
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/CheckPipe.c

    r13404 r13409  
    1212}
    1313
     14// after we have processed the command, we unblock the socket
     15# define FINISHED(A) { fcntl (sock, F_SETFL, O_NONBLOCK); return (A); }
     16
    1417int CheckPipe () {
    1518
     
    2124    sock = KapaServerWait (InitSocket, &Address);
    2225    if (sock == -1) return (TRUE);
    23     close (InitSocket); /* stop listening on this socket */
     26    close (InitSocket); /* stop listening for new connections */
    2427    fcntl (sock, F_SETFL, O_NONBLOCK); 
    2528  }
     
    4750  }
    4851 
     52  /* once we get a command, we block to ensure we get complete messages */
     53  fcntl (sock, F_SETFL, !O_NONBLOCK); 
     54
    4955  /***** handle different messages ****/
    5056  if (ACTIVE_CURSOR) {
    5157    if (strcmp (word, "NCUR")) {
    5258      fprintf (stderr, "wrong end message %s\n", word);
    53       return (TRUE);
     59      FINISHED (TRUE);
    5460    }
    5561    ACTIVE_CURSOR = FALSE;
    56     return (TRUE);
     62    FINISHED (TRUE);
    5763  }
    5864
    59   if (!strcmp (word, "QUIT")) return (FALSE);
     65  if (!strcmp (word, "QUIT")) FINISHED (FALSE);
    6066 
    6167  if (!strcmp (word, "CURS")) {
    6268    ACTIVE_CURSOR = TRUE;
    63     return (TRUE);
     69    FINISHED (TRUE);
    6470  }
    6571 
     
    6773    status = PScommand (sock);
    6874    KiiSendCommand (sock, 4, "DONE");
    69     return (status);
     75    FINISHED (status);
    7076  }
    7177 
     
    7379    status = PNGit (sock);
    7480    KiiSendCommand (sock, 4, "DONE");
    75     return (status);
     81    FINISHED (status);
    7682  }
    7783 
     
    7985    status = PPMit (sock);
    8086    KiiSendCommand (sock, 4, "DONE");
    81     return (status);
     87    FINISHED (status);
    8288  }
    8389 
     
    8591    status = LoadFrame (sock);
    8692    KiiSendCommand (sock, 4, "DONE");
    87     return (status);
     93    FINISHED (status);
    8894  }
    8995 
    9096  if (!strcmp (word, "PLOT")) {
    9197    status = LoadObject (sock);
    92     KiiSendCommand (sock, 4, "DONE");
    93     return (status);
     98    // LoadObject sends its own handshake
     99    // KiiSendCommand (sock, 4, "DONE");
     100    FINISHED (status);
    94101  }
    95102 
     
    97104    status = LoadLabels (sock);
    98105    KiiSendCommand (sock, 4, "DONE");
    99     return (TRUE);
     106    FINISHED (TRUE);
    100107  }
    101108 
     
    103110    status = LoadTextlines (sock);
    104111    KiiSendCommand (sock, 4, "DONE");
    105     return (TRUE);
     112    FINISHED (TRUE);
    106113  }
    107114 
     
    109116    status = Resize (sock);
    110117    KiiSendCommand (sock, 4, "DONE");
    111     return (status);
     118    FINISHED (status);
    112119  }
    113120
     
    115122    GetLimits (sock);
    116123    KiiSendCommand (sock, 4, "DONE");
    117     return (TRUE);
     124    FINISHED (TRUE);
    118125  }
    119126 
     
    121128    status = SetLimits (sock);
    122129    KiiSendCommand (sock, 4, "DONE");
    123     return (TRUE);
     130    FINISHED (TRUE);
    124131  }
    125132 
     
    127134    status = SetSection (sock);
    128135    KiiSendCommand (sock, 4, "DONE");
    129     return (TRUE);
     136    FINISHED (TRUE);
    130137  }
    131138 
     
    133140    status = ListSection (sock);
    134141    KiiSendCommand (sock, 4, "DONE");
    135     return (TRUE);
     142    FINISHED (TRUE);
    136143  }
    137144 
     
    139146    status = DefineSection (sock);
    140147    KiiSendCommand (sock, 4, "DONE");
    141     return (TRUE);
     148    FINISHED (TRUE);
    142149  }
    143150 
     
    145152    status = MoveSection (sock);
    146153    KiiSendCommand (sock, 4, "DONE");
    147     return (TRUE);
     154    FINISHED (TRUE);
    148155  }
    149156 
     
    151158    status = SetFont (sock);
    152159    KiiSendCommand (sock, 4, "DONE");
    153     return (TRUE);
     160    FINISHED (TRUE);
    154161  }
    155162 
     
    158165    status = EraseCurrentPlot ();
    159166    KiiSendCommand (sock, 4, "DONE");
    160     return (status);
     167    FINISHED (status);
    161168  }
    162169 
     
    165172    status = ErasePlots ();
    166173    KiiSendCommand (sock, 4, "DONE");
    167     return (status);
     174    FINISHED (status);
    168175  }
    169176 
     
    172179    status = EraseSections ();
    173180    KiiSendCommand (sock, 4, "DONE");
    174     return (status);
     181    FINISHED (status);
    175182  }
    176183
     
    179186    status = EraseImage ();
    180187    KiiSendCommand (sock, 4, "DONE");
    181     return (status);
     188    FINISHED (status);
    182189  }
    183190
     
    186193    status = EraseOverlay (sock);
    187194    KiiSendCommand (sock, 4, "DONE");
    188     return (status);
     195    FINISHED (status);
    189196  }
    190197
     
    192199    status = LoadPicture (sock);
    193200    KiiSendCommand (sock, 4, "DONE");
    194     return (status);
     201    FINISHED (status);
    195202  }
    196203
     
    198205    status = LoadOverlay (sock);
    199206    KiiSendCommand (sock, 4, "DONE");
    200     return (status);
     207    FINISHED (status);
    201208  }
    202209
     
    207214    status = LoadTickmarks (sock);
    208215    KiiSendCommand (sock, 4, "DONE");
    209     return (status);
     216    FINISHED (status);
    210217  }
    211218  */
     
    214221    status = SaveOverlay (sock);
    215222    KiiSendCommand (sock, 4, "DONE");
    216     return (status);
     223    FINISHED (status);
    217224  }
    218225
     
    220227    status = CSaveOverlay (sock);
    221228    KiiSendCommand (sock, 4, "DONE");
    222     return (status);
     229    FINISHED (status);
    223230  }
    224231
     
    226233    status = JPEGit24 (sock);
    227234    KiiSendCommand (sock, 4, "DONE");
    228     return (status);
     235    FINISHED (status);
    229236  }
    230237
     
    232239    status = Center (sock);
    233240    KiiSendCommand (sock, 4, "DONE");
    234     return (status);
     241    FINISHED (status);
    235242  }
    236243
     
    238245    GetPixelCount (sock);
    239246    KiiSendCommand (sock, 4, "DONE");
    240     return (TRUE);
     247    FINISHED (TRUE);
    241248  }
    242249
    243250  fprintf (stderr, "unknown signal %s\n", word);
    244 
    245   return (TRUE);
    246 
     251  FINISHED (TRUE);
    247252}
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadLabels.c

    r13401 r13409  
    1515  graph = section->graph;
    1616 
    17   fcntl (sock, F_SETFL, !O_NONBLOCK); 
    18  
    1917  KiiScanMessage (sock, "%d", &mode);
    2018  label = KiiRecvData (sock);
     
    2523  strncpy (graph[0].label[mode].text, label, Nbytes);
    2624  label[Nbytes] = 0;
    27 
    28   fcntl (sock, F_SETFL, O_NONBLOCK); 
    2925 
    3026  c = GetRotFont (&size);
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadObject.c

    r13401 r13409  
    11# include "Ximage.h"
    22# include <errno.h>
     3# define DEBUG 1
    34
    45int LoadObject (int sock) {
     
    1415  }
    1516  graph = section->graph;
    16  
    17   fcntl (sock, F_SETFL, !O_NONBLOCK); 
    1817 
    1918  N = graph[0].Nobjects;
     
    4544                  &graph[0].objects[N].x0, &graph[0].objects[N].x1,
    4645                  &graph[0].objects[N].y0, &graph[0].objects[N].y1);
    47  
    48   fcntl (sock, F_SETFL, O_NONBLOCK); 
    49  
     46
     47  // acknowledge receipt of the metadata
     48  KiiSendCommand (sock, 4, "DONE");
     49 
     50  // XXX Currently, I require these in a special order.  The data includes a message defining the
     51  // object type.  This could be made more flexible by using the information (though we still need
     52  // to know how many items will be sent)
     53
    5054  if (!LoadVectorData (sock, graph, N, "x")) {
    5155    FreeObjectData (&graph[0].objects[N]);
     
    100104}
    101105
    102 /* load data for the named component */
    103106int LoadVectorData (int sock, KapaGraphWidget *graph, int N, char *type) {
    104107 
    105108  int Npts, Ninpts, status, Ntry;
    106109  int bytes_left;
    107   char *buff;
     110  char *buff, type_send[16];
     111  int Npts_send, Nbytes_send;
    108112
    109113  buff = NULL;
    110114  Npts = graph[0].objects[N].Npts;
     115
     116  KiiWaitAnswer (sock, "PLOB");
     117  KiiScanMessage (sock, "%s %d %d", type_send, &Npts_send, &Nbytes_send);
     118  if (strcmp (type, type_send)) {
     119    fprintf (stderr, "Kapa Communication error: unexpected data type %s vs %s\n", type_send, type);
     120  }
     121  if (Npts_send != Npts) {
     122    fprintf (stderr, "Kapa Communication error: unexpected number of points %d vs %d\n", Npts_send, Npts);
     123  }
     124  if (Nbytes_send != Npts_send*sizeof(float)) {
     125    fprintf (stderr, "Kapa Communication error: unexpected data size %d vs %d\n", Nbytes_send, Npts_send*sizeof(float));
     126  }
     127
    111128  status = 1;
    112129  if (!strcmp (type, "x")) {
     
    140157
    141158  bytes_left = Npts*sizeof (float);
     159
     160  fcntl (sock, F_SETFL, O_NONBLOCK); 
    142161
    143162  Ntry = 0;
     
    169188    perror ("kapa load");
    170189  }
     190
     191  fcntl (sock, F_SETFL, !O_NONBLOCK); 
     192  KiiSendCommand (sock, 4, "DONE");
     193
    171194  if (Ninpts != Npts*sizeof(float)) { 
    172195    fprintf (stderr, "error: expected %d bytes, but got only %d\n", Ninpts, (unsigned int)(Npts*sizeof(float)));
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadOverlay.c

    r13401 r13409  
    4242        fprintf (stderr, "error: pipe closed\n");
    4343        free (buffer);
    44         fcntl (sock, F_SETFL, O_NONBLOCK); 
     44        fcntl (sock, F_SETFL, !O_NONBLOCK); 
    4545        return (FALSE);
    4646      }
     
    8989  REALLOCATE (image[0].overlay[N].objects, Object, MAX (1, image[0].overlay[N].Nobjects));
    9090  image[0].overlay[N].active = TRUE;
    91   fcntl (sock, F_SETFL, O_NONBLOCK); 
    9291
    9392  if (USE_XWINDOW) {
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadPicture.c

    r13401 r13409  
    2020  KiiSendMessage (sock, "%d", graphic->Npixels);
    2121
    22   fcntl (sock, F_SETFL, !O_NONBLOCK); 
    23 
    2422  header.Naxes = 2;
    25 
    2623  KiiScanMessage (sock, "%d %d %d %d %lf %lf", &header.Naxis[0], &header.Naxis[1]);
    2724  KiiScanMessage (sock, "%d %d %d %d %lf %lf", &header.bitpix, &header.unsign, &header.bzero, &header.bscale);
     
    5552  }
    5653
     54  fcntl (sock, F_SETFL, !O_NONBLOCK); 
     55
    5756  if (DEBUG) fprintf (stderr, "read %d bytes\n", image[0].matrix.size);
    5857  /* it it not obvious this condition should kill kii, but ... */
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTextlines.c

    r13401 r13409  
    1616  }
    1717
    18   fcntl (sock, F_SETFL, !O_NONBLOCK); 
    19  
    2018  graph[0].Ntextline = MAX (graph[0].Ntextline, 0);
    2119  N = graph[0].Ntextline;
     
    3836  strcpy (graph[0].textline[N].text, string);
    3937  free (string);
    40 
    41   fcntl (sock, F_SETFL, O_NONBLOCK); 
    4238 
    4339  string = GetRotFont (&size);
  • branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTickmarks.c

    r13401 r13409  
    1515  }
    1616  image   = section->image;
    17 
    18   fcntl (sock, F_SETFL, !O_NONBLOCK); 
    1917
    2018  Nobjects = image[0].tickmarks.Nobjects;
     
    6563
    6664  if (USE_XWINDOW) Refresh ();
    67 
    68   fcntl (sock, F_SETFL, O_NONBLOCK); 
    6965  return (TRUE);
    7066}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/include/kapa.h

    r13405 r13409  
    107107int KiiSendData (int device, char *data, int Nbytes);
    108108char *KiiRecvData (int device);
     109int KiiWaitAnswer (int device, char *expect);
    109110
    110111/* KiiOpen.c */
     
    146147int KapaInitGraph (Graphdata *graphdata);
    147148int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode);
    148 int KapaPlotVector (int fd, int Npts, float *values);
     149int KapaPlotVector (int fd, int Npts, float *values, char *type);
    149150int KapaSetFont (int fd, char *name, int size);
    150151int KapaSendLabel (int fd, char *string, int mode);
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/IOfuncs.c

    r13402 r13409  
    11# include <kapa_internal.h>
     2
     3/** these function expect to operate with a BLOCKing socket **/
    24
    35/* why is this not defined in stdarg.h for linux/x64? */
     
    6163  status = read (device, buffer, 16);
    6264  buffer[16] = 0;
     65  if (status != 16) fprintf (stderr, "dropped message length\n");
    6366
    6467  /* find the message length, allocate space */
     
    7174  message[status] = 0;
    7275  /* make the string easy to parse */
     76
     77  fprintf (stderr, "message recv: %s\n", message);
    7378
    7479  /* scan the incoming message */
     
    116121
    117122  ALLOCATE (message, char, length + 1);
    118   fcntl (device, F_SETFL, !O_NONBLOCK);  // block until we get the response??
    119123
    120124  /* read Nbytes from the device */
    121125  status = read (device, message, length);
    122   fcntl (device, F_SETFL, O_NONBLOCK);  // unblock
    123126
    124127  if (status != length) {
     
    135138  return (1);
    136139}
     140
     141int KiiWaitAnswer (int device, char *expect) {
     142
     143  int Nbytes;
     144  char *answer;
     145
     146  Nbytes = strlen (expect);
     147  ALLOCATE (answer, char, Nbytes + 1);
     148
     149  KiiScanCommand (device, Nbytes, "%s", answer);
     150  if (strcmp (answer, expect)) {
     151      fprintf (stderr, "unexpected response %s, expected %s\n", answer, expect);
     152      REALLOCATE (answer, char, 128);
     153      Nbytes = read (device, answer, 127);
     154      answer[Nbytes] = 0;
     155      fprintf (stderr, "extra data in buffer: %d bytes\n", Nbytes);
     156      fprintf (stderr, "garbage: %s\n", answer);
     157      return (FALSE);
     158  }
     159  return (TRUE);
     160}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaOpen.c

    r13391 r13409  
    7575  }
    7676  if (!status) return (-1);
    77 
    78   /* this is a blocking wait; use in a separate thread */
    79   // fcntl (InitSocket, F_SETFL, !O_NONBLOCK);
    8077
    8178  if (DEBUG) fprintf (stderr, "init sock: %d, len: %d\n", InitSocket, length);
     
    120117accepted:
    121118  if (DEBUG) fprintf (stderr, "connection accepted\n");
    122   // fcntl (BindSocket, F_SETFL, O_NONBLOCK);
    123119  return (BindSocket);
    124120}
     
    206202  if (DEBUG) fprintf (stderr, "connected on port: %d\n", Address.sin_port);
    207203  if (DEBUG) fprintf (stderr, "connected\n");
    208   fcntl (InitSocket, F_SETFL, O_NONBLOCK);
     204
     205  // the client uses a BLOCKing socket by default
     206  fcntl (InitSocket, F_SETFL, !O_NONBLOCK);
    209207  return (InitSocket);
    210208}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaWindow.c

    r13405 r13409  
    22
    33int KiiCenter (int fd, double x, double y, int zoom) {
    4 
    5   char word[5];
    64
    75  KiiSendCommand (fd, 4, "CENT");
    86  KiiSendMessage (fd, "%8.3f %8.3f %8d ", x, y, zoom);
    9   KiiScanCommand (fd, 4, "%s", word);
    10   if (strcmp (word, "DONE")) {
    11       fprintf (stderr, "unexpected response %s\n", word);
    12       return (FALSE);
    13   }
     7  KiiWaitAnswer (fd, "DONE");
    148 
    159  return (TRUE);
     
    1711
    1812int KiiResize (int fd, int Nx, int Ny) {
    19 
    20   char word[5];
    2113
    2214  KiiSendCommand (fd, 4, "RSIZ");
    2315  KiiSendMessage (fd, "%d %d", Nx, Ny);
    24   KiiScanCommand (fd, 4, "%s", word);
    25   if (strcmp (word, "DONE")) {
    26       fprintf (stderr, "unexpected response %s\n", word);
    27       return (FALSE);
    28   }
    29  
     16  KiiWaitAnswer (fd, "DONE");
    3017  return (TRUE);
    3118}
    3219
    3320int KapaBox (int fd, Graphdata *graphdata) {
    34 
    35   char word[5];
    3621
    3722  KiiSendCommand (fd, 4, "DBOX");
     
    4025
    4126  KiiSendMessage (fd, "%s %s %s", graphdata[0].axis, graphdata[0].labels, graphdata[0].ticks);
    42   KiiScanCommand (fd, 4, "%s", word);
    43   if (strcmp (word, "DONE")) {
    44       fprintf (stderr, "unexpected response %s\n", word);
    45       return (FALSE);
    46   }
    47  
     27  KiiWaitAnswer (fd, "DONE");
    4828  return (TRUE);
    4929}
     
    5131int KapaClearCurrentPlot (int fd) {
    5232 
    53   char word[5];
    54 
    5533  KiiSendCommand (fd, 4, "ERSC");
    56   KiiScanCommand (fd, 4, "%s", word);
    57   if (strcmp (word, "DONE")) {
    58       fprintf (stderr, "unexpected response %s\n", word);
    59       return (FALSE);
    60   }
     34  KiiWaitAnswer (fd, "DONE");
    6135  return (TRUE);
    6236}
     
    6438int KapaClearPlots (int fd) {
    6539 
    66   char word[5];
    67 
    6840  KiiSendCommand (fd, 4, "ERSP");
    69   KiiScanCommand (fd, 4, "%s", word);
    70   if (strcmp (word, "DONE")) {
    71       fprintf (stderr, "unexpected response %s\n", word);
    72       return (FALSE);
    73   }
     41  KiiWaitAnswer (fd, "DONE");
    7442  return (TRUE);
    7543}
     
    7745int KapaClearSections (int fd) {
    7846 
    79   char word[5];
    80 
    8147  KiiSendCommand (fd, 4, "ERSS");
    82   KiiScanCommand (fd, 4, "%s", word);
    83   if (strcmp (word, "DONE")) {
    84       fprintf (stderr, "unexpected response %s\n", word);
    85       return (FALSE);
    86   }
     48  KiiWaitAnswer (fd, "DONE");
    8749  return (TRUE);
    8850}
     
    9052int KapaClearImage (int fd) {
    9153 
    92   char word[5];
    93 
    9454  KiiSendCommand (fd, 4, "ERSI");
    95   KiiScanCommand (fd, 4, "%s", word);
    96   if (strcmp (word, "DONE")) {
    97       fprintf (stderr, "unexpected response %s\n", word);
    98       return (FALSE);
    99   }
     55  KiiWaitAnswer (fd, "DONE");
    10056  return (TRUE);
    10157}
     
    12985int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode) {
    13086
    131   char word[5];
    132 
    13387  /* tell kapa to look for the incoming image */
    13488  KiiSendCommand (fd, 4, "PLOT");
     
    14397                  graphmode[0].xmin, graphmode[0].xmax,
    14498                  graphmode[0].ymin, graphmode[0].ymax);
    145 
    146   KiiScanCommand (fd, 4, "%s", word);
    147   if (strcmp (word, "DONE")) {
    148       fprintf (stderr, "unexpected response %s\n", word);
    149       return (FALSE);
    150   }
    151  
    152   return (TRUE);
    153 }
    154 
    155 int KapaPlotVector (int fd, int Npts, float *values) {
     99  KiiWaitAnswer (fd, "DONE");
     100  return (TRUE);
     101}
     102
     103int KapaPlotVector (int fd, int Npts, float *values, char *type) {
    156104
    157105  int Nbytes;
    158106
    159107  Nbytes = Npts * sizeof (float);
     108
     109  if (!strcmp(type, "x")) goto valid;
     110  if (!strcmp(type, "y")) goto valid;
     111  if (!strcmp(type, "z")) goto valid;
     112  if (!strcmp(type, "dym")) goto valid;
     113  if (!strcmp(type, "dyp")) goto valid;
     114  if (!strcmp(type, "dxm")) goto valid;
     115  if (!strcmp(type, "dxp")) goto valid;
     116  return (FALSE);
     117
     118valid:
     119  KiiSendCommand (fd, 4, "PLOB");
     120  KiiSendMessage (fd, "%s %d %d", type, Npts, Nbytes);
     121  // XXX send the byte-swap as well...
     122
    160123  write (fd, values, Nbytes);
     124  KiiWaitAnswer (fd, "DONE");
    161125  return (TRUE);
    162126}
    163127
    164128int KapaSetFont (int fd, char *name, int size) {
    165 
    166   char word[5];
    167129
    168130  KiiSendCommand (fd, 4, "FONT");
    169131  KiiSendCommand (fd, 16, "%s", name);
    170132  KiiSendCommand (fd, 16, "%d", size);
    171 
    172   KiiScanCommand (fd, 4, "%s", word);
    173   if (strcmp (word, "DONE")) {
    174       fprintf (stderr, "unexpected response %s\n", word);
    175       return (FALSE);
    176   }
    177  
     133  KiiWaitAnswer (fd, "DONE");
    178134  return (TRUE);
    179135}
    180136
    181137int KapaSendLabel (int fd, char *string, int mode) {
    182  
    183   char word[5];
    184138
    185139  KiiSendCommand (fd, 4, "LABL");
    186140  KiiSendMessage (fd, "%6d", mode);
    187141  KiiSendData (fd, string, strlen(string));
    188 
    189   KiiScanCommand (fd, 4, "%s", word);
    190   if (strcmp (word, "DONE")) {
    191       fprintf (stderr, "unexpected response %s\n", word);
    192       return (FALSE);
    193   }
    194  
     142  KiiWaitAnswer (fd, "DONE");
    195143  return (TRUE);
    196144}
     
    198146int KapaSendTextline (int fd, char *string, float x, float y, float angle) {
    199147 
    200   char word[5];
    201 
    202148  KiiSendCommand (fd, 4, "PTXT");
    203149  KiiSendMessage (fd, "%f %f %f", x, y, angle);
    204150  KiiSendData (fd, string, strlen(string));
    205 
    206   KiiScanCommand (fd, 4, "%s", word);
    207   if (strcmp (word, "DONE")) {
    208       fprintf (stderr, "unexpected response %s\n", word);
    209       return (FALSE);
    210   }
    211  
     151  KiiWaitAnswer (fd, "DONE");
    212152  return (TRUE);
    213153}
    214154
    215155int KapaSetLimits (int fd, Graphdata *graphmode) {
    216 
    217   char word[5];
    218156
    219157  KiiSendCommand (fd, 4, "SLIM");
    220158  KiiSendMessage (fd, "%g %g %g %g ", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
    221 
    222   KiiScanCommand (fd, 4, "%s", word);
    223   if (strcmp (word, "DONE")) {
    224       fprintf (stderr, "unexpected response %s\n", word);
    225       return (FALSE);
    226   }
    227  
     159  KiiWaitAnswer (fd, "DONE");
    228160  return (TRUE);
    229161}
     
    232164int KapaGetLimits (int fd, float *dx, float *dy) {
    233165
    234   char word[5];
    235 
    236166  KiiSendCommand (fd, 4, "LIMS");
    237167  KiiScanMessage (fd, "%lf %lf", dx, dy);
    238 
    239   KiiScanCommand (fd, 4, "%s", word);
    240   if (strcmp (word, "DONE")) {
    241       fprintf (stderr, "unexpected response %s\n", word);
    242       return (FALSE);
    243   }
    244  
     168  KiiWaitAnswer (fd, "DONE");
    245169  return (TRUE);
    246170}
    247171
    248172int KapaSetSection (int fd, KapaSection *section) {
    249 
    250   char word[5];
    251173
    252174  KiiSendCommand (fd, 4, "DSEC");
     
    257179                  section[0].dx,
    258180                  section[0].dy);
    259 
    260   KiiScanCommand (fd, 4, "%s", word);
    261   if (strcmp (word, "DONE")) {
    262       fprintf (stderr, "unexpected response %s\n", word);
    263       return (FALSE);
    264   }
    265  
     181  KiiWaitAnswer (fd, "DONE");
    266182  return (TRUE);
    267183}
    268184
    269185int KapaMoveSection (int fd, char *name, char *direction) {
    270 
    271   char word[5];
    272186
    273187  if (!strcasecmp(direction, "up")) goto valid;
     
    282196  KiiSendCommand (fd, 4, "MSEC");
    283197  KiiSendMessage (fd, "%s %s", name, direction);
    284   KiiScanCommand (fd, 4, "%s", word);
    285   if (strcmp (word, "DONE")) {
    286       fprintf (stderr, "unexpected response %s\n", word);
    287       return (FALSE);
    288   }
    289  
     198  KiiWaitAnswer (fd, "DONE");
    290199  return (TRUE);
    291200}
    292201
    293202int KapaSelectSection (int fd, char *name) {
    294 
    295   char word[5];
    296203
    297204  KiiSendCommand (fd, 4, "SSEC");
    298205  KiiSendMessage (fd, "%s", name);
    299 
    300   KiiScanCommand (fd, 4, "%s", word);
    301   if (strcmp (word, "DONE")) {
    302       fprintf (stderr, "unexpected response %s\n", word);
    303       return (FALSE);
    304   }
    305  
     206  KiiWaitAnswer (fd, "DONE");
    306207  return (TRUE);
    307208}
    308209
    309210int KapaGetSection (int fd, char *name) {
    310 
    311   char word[5];
    312211
    313212  KiiSendCommand (fd, 4, "LSEC");
    314213  KiiSendMessage (fd, "%s", name);
    315 
    316   KiiScanCommand (fd, 4, "%s", word);
    317   if (strcmp (word, "DONE")) {
    318       fprintf (stderr, "unexpected response %s\n", word);
    319       return (FALSE);
    320   }
    321  
    322   return (TRUE);
    323 }
     214  KiiWaitAnswer (fd, "DONE");
     215  return (TRUE);
     216}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiConvert.c

    r13405 r13409  
    33int KiiJPEG (int fd, const char *filename) {
    44
    5   char buffer[20], word[5];
    6 
    75  KiiSendCommand (fd, 4, "JPEG");
    86  KiiSendMessage (fd, "%s", filename);
    9 
    10   /* block for the response, which says the operation completed */
    11   KiiScanCommand (fd, 4, "%s", word);
    12   if (strcmp (word, "DONE")) {
    13       fprintf (stderr, "unexpected response %s\n", word);
    14       return (FALSE);
    15   }
     7  KiiWaitAnswer (fd, "DONE");
    168  return (TRUE);
    179}
     
    1911int KapaPNG (int fd, const char *filename) {
    2012
    21   char buffer[20], word[5];
    22 
    2313  KiiSendCommand (fd, 4, "PNGF");
    2414  KiiSendMessage (fd, "%s", filename);
    25 
    26   /* block for the response, which says the operation completed */
    27   KiiScanCommand (fd, 4, "%s", word);
    28   if (strcmp (word, "DONE")) {
    29       fprintf (stderr, "unexpected response %s\n", word);
    30       return (FALSE);
    31   }
     15  KiiWaitAnswer (fd, "DONE");
    3216  return (TRUE);
    3317}
     
    3519int KapaPPM (int fd, const char *filename) {
    3620
    37   char buffer[20], word[5];
    38 
    3921  KiiSendCommand (fd, 4, "PPMF");
    4022  KiiSendMessage (fd, "%s", filename);
    41 
    42   /* block for the response, which says the operation completed */
    43   KiiScanCommand (fd, 4, "%s", word);
    44   if (strcmp (word, "DONE")) {
    45       fprintf (stderr, "unexpected response %s\n", word);
    46       return (FALSE);
    47   }
     23  KiiWaitAnswer (fd, "DONE");
    4824  return (TRUE);
    4925}
     
    5127int KiiPS (int fd, const char *filename, int scaleMode, int pageMode, char *pagename) {
    5228
    53   char buffer[20], word[5];
    54 
    55   /* the default operation */
    5629  KiiSendCommand (fd, 4, "PSIT");
    57 
    5830  KiiSendMessage (fd, "%s %s %d %d", filename, pagename, scaleMode, pageMode);
    59 
    60   /* block for the response, which says the operation completed */
    61   KiiScanCommand (fd, 4, "%s", word);
    62   if (strcmp (word, "DONE")) {
    63       fprintf (stderr, "unexpected response %s\n", word);
    64       return (FALSE);
    65   }
     31  KiiWaitAnswer (fd, "DONE");
    6632  return (TRUE);
    6733}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiCursor.c

    r13405 r13409  
    22
    33int KiiCursorOn (int fd) {
    4   char word[5];
    54
    65  KiiSendCommand (fd, 4, "CURS");
    7   KiiScanCommand (fd, 4, "%s", word);
    8   if (strcmp (word, "DONE")) {
    9       fprintf (stderr, "unexpected response %s\n", word);
    10       return (FALSE);
    11   }
     6  KiiWaitAnswer (fd, "DONE");
    127  return (TRUE);
    138}
    149
    1510int KiiCursorOff (int fd) {
    16   char word[5];
    1711
    1812  KiiSendCommand (fd, 4, "NCUR");
    19   KiiScanCommand (fd, 4, "%s", word);
    20   if (strcmp (word, "DONE")) {
    21       fprintf (stderr, "unexpected response %s\n", word);
    22       return (FALSE);
    23   }
     13  KiiWaitAnswer (fd, "DONE");
    2414  return (TRUE);
    2515}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiOverlay.c

    r13405 r13409  
    5353
    5454  int i, n, Nline;
    55   char *buffer, *type, word[5];
     55  char *buffer, *type;
    5656
    5757  KiiSelectOverlay (overname, &n);
     
    8484
    8585  free (buffer);
     86  KiiWaitAnswer (fd, "DONE");
    8687
    8788  /* this is very inefficient: 128 bytes per object vs 17 as binary, plus the
    8889     conversions back and forth
    8990  */
    90   KiiScanCommand (fd, 4, "%s", word);
    91   if (strcmp (word, "DONE")) {
    92       fprintf (stderr, "unexpected response %s\n", word);
    93       return (FALSE);
    94   }
     91
    9592  return (TRUE);
    9693}
     
    9996
    10097  int n;
    101   char word[5];
    10298
    10399  KiiSelectOverlay (overname, &n);
     
    105101  KiiSendCommand (fd, 4, "ERSO");
    106102  KiiSendCommand (fd, 16, "OVERLAY %7d ", n);
    107 
    108   KiiScanCommand (fd, 4, "%s", word);
    109   if (strcmp (word, "DONE")) {
    110       fprintf (stderr, "unexpected response %s\n", word);
    111       return (FALSE);
    112   }
     103  KiiWaitAnswer (fd, "DONE");
    113104  return (TRUE);
    114105}
     
    117108
    118109  int n;
    119   char word[5];
    120110
    121111  KiiSelectOverlay (overname, &n);
     
    128118
    129119  KiiSendMessage (fd, "FILE: %d %s", n, file);
    130 
    131   KiiScanCommand (fd, 4, "%s", word);
    132   if (strcmp (word, "DONE")) {
    133       fprintf (stderr, "unexpected response %s\n", word);
    134       return (FALSE);
    135   }
     120  KiiWaitAnswer (fd, "DONE");
    136121  return (TRUE);
    137122}
  • branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiPicture.c

    r13405 r13409  
    66  int Npix, Ncolors, NNcolors, size;
    77  float *in, min, max;
    8   char *out, *outbuffer, *root, word[5];
     8  char *out, *outbuffer, *root, extra[1024];
    99  double a1, a2;
    1010
     
    5858  free (outbuffer);
    5959
    60   KiiScanCommand (fd, 4, "%s", word);
    61   if (strcmp (word, "DONE")) {
    62       fprintf (stderr, "unexpected response %s\n", word);
    63       return (FALSE);
    64   }
     60  KiiWaitAnswer (fd, "DONE");
    6561  return (TRUE);
    6662}
     
    7268  float *in, min, max;
    7369  char *out, *outbuffer, *root;
    74   char buffer[1024], word[5];
     70  char buffer[1024];
    7571  double a1, a2;
    7672
     
    130126  free (outbuffer);
    131127
    132   KiiScanCommand (fd, 4, "%s", word);
    133   if (strcmp (word, "DONE")) {
    134       fprintf (stderr, "unexpected response %s\n", word);
    135       return (FALSE);
    136   }
     128  KiiWaitAnswer (fd, "DONE");
    137129  return (TRUE);
    138130}
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/cgrid.c

    r13391 r13409  
    393393  graphmode.etype = 0;
    394394  PrepPlotting (N, &graphmode);
    395   PlotVector (N, Xvec.elements);
    396   PlotVector (N, Yvec.elements);
     395  PlotVector (N, Xvec.elements, "x");
     396  PlotVector (N, Yvec.elements, "y");
    397397
    398398  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/cplot.c

    r13391 r13409  
    6868  graphmode.etype = 0;
    6969  PrepPlotting (Npts, &graphmode);
    70   PlotVector (Npts, Xvec.elements);
    71   PlotVector (Npts, Yvec.elements);
     70  PlotVector (Npts, Xvec.elements, "x");
     71  PlotVector (Npts, Yvec.elements, "y");
    7272 
    7373  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/czplot.c

    r13391 r13409  
    6161  PrepPlotting (Npts, &graphmode);
    6262
    63   PlotVector (Npts, Xvec.elements);
    64   PlotVector (Npts, Yvec.elements);
    65   PlotVector (Npts, Zvec.elements);
     63  PlotVector (Npts, Xvec.elements, "x");
     64  PlotVector (Npts, Yvec.elements, "y");
     65  PlotVector (Npts, Zvec.elements, "z");
    6666
    6767  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/dot.c

    r13391 r13409  
    2424  if (!PrepPlotting (1, &graphmode)) return (FALSE);
    2525 
    26   PlotVector (1, &x);
    27   PlotVector (1, &y);
     26  PlotVector (1, &x, "x");
     27  PlotVector (1, &y, "y");
    2828 
    2929  return (TRUE);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/grid.c

    r13391 r13409  
    194194  graphmode.etype = 0;
    195195  PrepPlotting (N, &graphmode);
    196   PlotVector (N, Xvec.elements);
    197   PlotVector (N, Yvec.elements);
     196  PlotVector (N, Xvec.elements, "x");
     197  PlotVector (N, Yvec.elements, "y");
    198198
    199199  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/line.c

    r13391 r13409  
    2525  if (!PrepPlotting (2, &graphmode)) return (FALSE);
    2626 
    27   PlotVector (2, x);
    28   PlotVector (2, y);
     27  PlotVector (2, x, "x");
     28  PlotVector (2, y, "y");
    2929 
    3030  return (TRUE);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/plot.c

    r13391 r13409  
    5959  if (!PrepPlotting (Npts, &graphmode)) return (FALSE);
    6060 
    61   PlotVector (Npts, xvec[0].elements);
    62   PlotVector (Npts, yvec[0].elements);
     61  PlotVector (Npts, xvec[0].elements, "x");
     62  PlotVector (Npts, yvec[0].elements, "y");
    6363  if (graphmode.etype & 0x01) {
    64     PlotVector (Npts, dymvec[0].elements);
    65     PlotVector (Npts, dypvec[0].elements);
     64    PlotVector (Npts, dymvec[0].elements, "dym");
     65    PlotVector (Npts, dypvec[0].elements, "dyp");
    6666  }
    6767  if (graphmode.etype & 0x02) {
    68     PlotVector (Npts, dxmvec[0].elements);
    69     PlotVector (Npts, dxpvec[0].elements);
     68    PlotVector (Npts, dxmvec[0].elements, "dxm");
     69    PlotVector (Npts, dxpvec[0].elements, "dxp");
    7070  }
    7171 
  • branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/zplot.c

    r13391 r13409  
    4747  PrepPlotting (Npts, &graphmode);
    4848
    49   PlotVector (Npts, xvec[0].elements);
    50   PlotVector (Npts, yvec[0].elements);
    51   PlotVector (Npts, Zvec.elements);
     49  PlotVector (Npts, xvec[0].elements, "x");
     50  PlotVector (Npts, yvec[0].elements, "y");
     51  PlotVector (Npts, Zvec.elements, "z");
    5252
    5353  free (Zvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/catalog.c

    r13391 r13409  
    391391    PrepPlotting (N, &graphmode);
    392392   
    393     PlotVector (N, Xvec.elements);
    394     PlotVector (N, Yvec.elements);
    395     PlotVector (N, Zvec.elements);
     393    PlotVector (N, Xvec.elements, "x");
     394    PlotVector (N, Yvec.elements, "y");
     395    PlotVector (N, Zvec.elements, "z");
    396396   
    397397    free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/dmt.c

    r13391 r13409  
    145145    PrepPlotting (N, &graphmode);
    146146   
    147     PlotVector (N, Xvec.elements);
    148     PlotVector (N, Yvec.elements);
     147    PlotVector (N, Xvec.elements, "x");
     148    PlotVector (N, Yvec.elements, "y");
    149149
    150150    free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/fitcolors.c

    r13404 r13409  
    305305        KapaBox (kapa, &graphdata);
    306306        KapaPrepPlot (kapa, Npts, &graphdata);
    307         KapaPlotVector (kapa, Npts, xvec[0].elements);
    308         KapaPlotVector (kapa, Npts, yvec[0].elements);
     307        KapaPlotVector (kapa, Npts, xvec[0].elements, "x");
     308        KapaPlotVector (kapa, Npts, yvec[0].elements, "y");
    309309
    310310        for (i = 0; i < 11; i++) {
     
    314314        graphdata.color = KapaColorByName ("red");
    315315        KapaPrepPlot (kapa, 11, &graphdata);
    316         KapaPlotVector (kapa, 11, colorFit);
    317         KapaPlotVector (kapa, 11, deltaFit);
     316        KapaPlotVector (kapa, 11, colorFit, "x");
     317        KapaPlotVector (kapa, 11, deltaFit, "y");
    318318
    319319        KapaSetFont (kapa, "helvetica", 8);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/fitsed.c

    r13404 r13409  
    268268        graphdata.etype = 0;
    269269        KapaPrepPlot (kapa, Nfilter, &graphdata);
    270         KapaPlotVector (kapa, Nfilter, wavecode);
    271         KapaPlotVector (kapa, Nfilter, SEDtable[minFit.row][0].mags);
     270        KapaPlotVector (kapa, Nfilter, wavecode, "x");
     271        KapaPlotVector (kapa, Nfilter, SEDtable[minFit.row][0].mags, "y");
    272272        graphdata.color = KapaColorByName ("red");
    273273        graphdata.etype = 1;
     
    280280        }
    281281        KapaPrepPlot (kapa, Nfilter, &graphdata);
    282         KapaPlotVector (kapa, Nfilter, wavecode);
    283         KapaPlotVector (kapa, Nfilter, fitmags);
    284         KapaPlotVector (kapa, Nfilter, fiterrs);
    285         KapaPlotVector (kapa, Nfilter, fiterrs);
     282        KapaPlotVector (kapa, Nfilter, wavecode, "x");
     283        KapaPlotVector (kapa, Nfilter, fitmags, "y");
     284        KapaPlotVector (kapa, Nfilter, fiterrs, "dym");
     285        KapaPlotVector (kapa, Nfilter, fiterrs, "dyp");
    286286        KapaSendLabel (kapa, "model,fit (mags)", 1);
    287287
     
    308308        }
    309309        KapaPrepPlot (kapa, Nfilter, &graphdata);
    310         KapaPlotVector (kapa, Nfilter, wavecode);
    311         KapaPlotVector (kapa, Nfilter, fitmags);
    312         KapaPlotVector (kapa, Nfilter, fiterrs);
    313         KapaPlotVector (kapa, Nfilter, fiterrs);
     310        KapaPlotVector (kapa, Nfilter, wavecode, "x");
     311        KapaPlotVector (kapa, Nfilter, fitmags, "y");
     312        KapaPlotVector (kapa, Nfilter, fiterrs, "dym");
     313        KapaPlotVector (kapa, Nfilter, fiterrs, "dyp");
    314314        KapaSendLabel (kapa, "wavelength (nm)", 0);
    315315        KapaSendLabel (kapa, "resid (mags)", 1);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/images.c

    r13391 r13409  
    283283    graphmode.etype = 0;
    284284    PrepPlotting (N, &graphmode);
    285     PlotVector (N, Xvec.elements);
    286     PlotVector (N, Yvec.elements);
     285    PlotVector (N, Xvec.elements, "x");
     286    PlotVector (N, Yvec.elements, "y");
    287287  }
    288288
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imbox.c

    r13391 r13409  
    7777      graphmode.etype = 0;
    7878      PrepPlotting (8, &graphmode);
    79       PlotVector (8, Xvec.elements);
    80       PlotVector (8, Yvec.elements);
     79      PlotVector (8, Xvec.elements, "x");
     80      PlotVector (8, Yvec.elements, "y");
    8181    }
    8282  skip:
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imdense.c

    r13391 r13409  
    6363    graphmode.etype = 0;
    6464    PrepPlotting (N, &graphmode);
    65     PlotVector (N, Xvec.elements);
    66     PlotVector (N, Yvec.elements);
     65    PlotVector (N, Xvec.elements, "x");
     66    PlotVector (N, Yvec.elements, "y");
    6767  }
    6868
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imstats.c

    r13391 r13409  
    5555  graphmode.etype = 0;
    5656  PrepPlotting (Nimage, &graphmode);
    57   PlotVector (Nimage, Xvec.elements);
    58   PlotVector (Nimage, Yvec.elements);
     57  PlotVector (Nimage, Xvec.elements, "x");
     58  PlotVector (Nimage, Yvec.elements, "y");
    5959 
    6060  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/lcurve.c

    r13391 r13409  
    155155
    156156  PrepPlotting (N, &graphmode);
    157   PlotVector (N, Xvec.elements);
    158   PlotVector (N, Yvec.elements);
     157  PlotVector (N, Xvec.elements, "x");
     158  PlotVector (N, Yvec.elements, "y");
    159159  if (ErrorBars) {
    160     PlotVector (N, dYvec.elements);
    161     PlotVector (N, dYvec.elements);
     160    PlotVector (N, dYvec.elements, "x");
     161    PlotVector (N, dYvec.elements, "y");
    162162  }
    163163
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/pcat.c

    r13391 r13409  
    8484    graphmode.etype = 0;
    8585    PrepPlotting (Npts, &graphmode);
    86     PlotVector (Npts, Xvec.elements);
    87     PlotVector (Npts, Yvec.elements);
     86    PlotVector (Npts, Xvec.elements, "x");
     87    PlotVector (Npts, Yvec.elements, "y");
    8888  }
    8989
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/procks.c

    r13391 r13409  
    115115  PrepPlotting (N, &graphmode);
    116116 
    117   PlotVector (N, Xvec.elements);
    118   PlotVector (N, Yvec.elements);
     117  PlotVector (N, Xvec.elements, "x");
     118  PlotVector (N, Yvec.elements, "y");
    119119
    120120  /* now plot vectors between two extrema */
     
    148148  PrepPlotting (N, &graphmode);
    149149 
    150   PlotVector (N, Xvec.elements);
    151   PlotVector (N, Yvec.elements);
     150  PlotVector (N, Xvec.elements, "x");
     151  PlotVector (N, Yvec.elements, "y");
    152152
    153153  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/showtile.c

    r13391 r13409  
    8787    graphmode.etype = 0;
    8888    PrepPlotting (N, &graphmode);
    89     PlotVector (N, Xvec.elements);
    90     PlotVector (N, Yvec.elements);
     89    PlotVector (N, Xvec.elements, "x");
     90    PlotVector (N, Yvec.elements, "y");
    9191  }
    9292
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/simage.c

    r13391 r13409  
    156156  PrepPlotting (Npts, &graphmode);
    157157
    158   PlotVector (Npts, Xvec.elements);
    159   PlotVector (Npts, Yvec.elements);
    160   PlotVector (Npts, Zvec.elements);
     158  PlotVector (Npts, Xvec.elements, "x");
     159  PlotVector (Npts, Yvec.elements, "y");
     160  PlotVector (Npts, Zvec.elements, "z");
    161161
    162162  free (Xvec.elements);
  • branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/skycat.c

    r13391 r13409  
    9898    graphmode.etype = 0;
    9999    PrepPlotting (Npts, &graphmode);
    100     PlotVector (Npts, Xvec.elements);
    101     PlotVector (Npts, Yvec.elements);
     100    PlotVector (Npts, Xvec.elements, "x");
     101    PlotVector (Npts, Yvec.elements, "y");
    102102  }
    103103
  • branches/kapa-mods-2007-05/Ohana/src/opihi/include/display.h

    r13394 r13409  
    88int           GetCurrentDevice      PROTO((void));
    99int           PrepPlotting          PROTO((int Npts, Graphdata *graphmode));
    10 int           PlotVector            PROTO((int, float *));
     10int           PlotVector            PROTO((int Npts, float *values, char *type));
    1111int           PlotVectorTriplet     PROTO((int N, float *xValues, float *yValues, float *zValues, Graphdata *graphmode));
    1212int           GetGraphData          PROTO((Graphdata *data, int *kapa, char *name));
  • branches/kapa-mods-2007-05/Ohana/src/opihi/lib.data/PlotVectors.c

    r13402 r13409  
    1010}
    1111
    12 int PlotVector (int Npts, float *values) {
     12int PlotVector (int Npts, float *values, char *type) {
    1313
    14   KapaPlotVector (kapa, Npts, values);
     14  KapaPlotVector (kapa, Npts, values, type);
    1515  return (TRUE);
    1616}
     
    1919
    2020  PrepPlotting (N, graphmode);
    21   PlotVector (N, xValues);
    22   PlotVector (N, yValues);
     21  PlotVector (N, xValues, "x");
     22  PlotVector (N, yValues, "y");
    2323
    2424  return (TRUE);
     
    2828
    2929  PrepPlotting (N, graphmode);
    30   PlotVector (N, xValues);
    31   PlotVector (N, yValues);
    32   PlotVector (N, zValues);
     30  PlotVector (N, xValues, "x");
     31  PlotVector (N, yValues, "y");
     32  PlotVector (N, zValues, "z");
    3333
    3434  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.