- Timestamp:
- May 15, 2007, 3:25:20 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/kapa-mods-2007-05/Ohana/src/opihi/lib.data/open_kapa.c
r13354 r13391 1 1 # include "display.h" 2 2 # include "shell.h" 3 # include <assert.h> 4 3 5 4 6 /* kapa support for the new version of kapa (v2.0), which has both graph and image … … 20 22 ALLOCATE (Device, char *, 1); // for future REALLOCATE calls 21 23 ALLOCATE (Socket, int, 1); // for future REALLOCATE calls 24 25 InitGraph (); 26 InitImage (); 22 27 } 23 28 … … 41 46 int DelKapaDevice (char *name) { 42 47 43 int N;48 int i, N; 44 49 45 50 N = FindKapaDevice (name); … … 75 80 76 81 // 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); 79 84 80 85 // if the (now) active socket is not open, open it … … 138 143 # endif 139 144 145 // return the current device name, if set 146 char *GetGraphName () { 147 if (Active < 0) return NULL; 148 return Device[Active]; 149 } 150 140 151 /* return pointers for named device or current; open if needed */ 141 152 // if fd == NULL, don't return the value … … 176 187 return (FALSE); 177 188 } 178 entry = Active 189 entry = Active; 179 190 } else { 180 191 entry = FindKapaDevice (name);
Note:
See TracChangeset
for help on using the changeset viewer.
