IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 15, 2007, 3:25:20 PM (19 years ago)
Author:
eugene
Message:

changed device numbers to device names; using inet sockets

File:
1 edited

Legend:

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

    r13354 r13391  
    11# include "display.h"
    22# include "shell.h"
     3# include <assert.h>
     4
    35
    46/* kapa support for the new version of kapa (v2.0), which has both graph and image
     
    2022  ALLOCATE (Device, char *, 1);                   // for future REALLOCATE calls
    2123  ALLOCATE (Socket, int, 1);                      // for future REALLOCATE calls
     24
     25  InitGraph ();
     26  InitImage ();
    2227}
    2328
     
    4146int DelKapaDevice (char *name) {
    4247
    43   int N;
     48  int i, N;
    4449
    4550  N = FindKapaDevice (name);
     
    7580
    7681  // find the given device number, or create. set this to active
    77   assert (entry > 0);
    78   assert (entry < Ndevice);
     82  assert (entry >= 0);
     83  assert (entry <  Ndevice);
    7984
    8085  // if the (now) active socket is not open, open it
     
    138143# endif
    139144
     145// return the current device name, if set
     146char *GetGraphName () {
     147  if (Active < 0) return NULL;
     148  return Device[Active];
     149}
     150
    140151/* return pointers for named device or current; open if needed */
    141152// if fd == NULL, don't return the value
     
    176187      return (FALSE);
    177188    }
    178     entry = Active
     189    entry = Active;
    179190  } else {
    180191    entry = FindKapaDevice (name);
Note: See TracChangeset for help on using the changeset viewer.