Changeset 13409
- Timestamp:
- May 17, 2007, 9:58:42 AM (19 years ago)
- Location:
- branches/kapa-mods-2007-05/Ohana/src
- Files:
-
- 39 edited
-
kapa2/src/CheckPipe.c (modified) (30 diffs)
-
kapa2/src/LoadLabels.c (modified) (2 diffs)
-
kapa2/src/LoadObject.c (modified) (6 diffs)
-
kapa2/src/LoadOverlay.c (modified) (2 diffs)
-
kapa2/src/LoadPicture.c (modified) (2 diffs)
-
kapa2/src/LoadTextlines.c (modified) (2 diffs)
-
kapa2/src/LoadTickmarks.c (modified) (2 diffs)
-
libkapa/include/kapa.h (modified) (2 diffs)
-
libkapa/src/IOfuncs.c (modified) (5 diffs)
-
libkapa/src/KapaOpen.c (modified) (3 diffs)
-
libkapa/src/KapaWindow.c (modified) (13 diffs)
-
libkapa/src/KiiConvert.c (modified) (4 diffs)
-
libkapa/src/KiiCursor.c (modified) (1 diff)
-
libkapa/src/KiiOverlay.c (modified) (6 diffs)
-
libkapa/src/KiiPicture.c (modified) (4 diffs)
-
opihi/cmd.astro/cgrid.c (modified) (1 diff)
-
opihi/cmd.astro/cplot.c (modified) (1 diff)
-
opihi/cmd.astro/czplot.c (modified) (1 diff)
-
opihi/cmd.data/dot.c (modified) (1 diff)
-
opihi/cmd.data/grid.c (modified) (1 diff)
-
opihi/cmd.data/line.c (modified) (1 diff)
-
opihi/cmd.data/plot.c (modified) (1 diff)
-
opihi/cmd.data/zplot.c (modified) (1 diff)
-
opihi/dvo/catalog.c (modified) (1 diff)
-
opihi/dvo/dmt.c (modified) (1 diff)
-
opihi/dvo/fitcolors.c (modified) (2 diffs)
-
opihi/dvo/fitsed.c (modified) (3 diffs)
-
opihi/dvo/images.c (modified) (1 diff)
-
opihi/dvo/imbox.c (modified) (1 diff)
-
opihi/dvo/imdense.c (modified) (1 diff)
-
opihi/dvo/imstats.c (modified) (1 diff)
-
opihi/dvo/lcurve.c (modified) (1 diff)
-
opihi/dvo/pcat.c (modified) (1 diff)
-
opihi/dvo/procks.c (modified) (2 diffs)
-
opihi/dvo/showtile.c (modified) (1 diff)
-
opihi/dvo/simage.c (modified) (1 diff)
-
opihi/dvo/skycat.c (modified) (1 diff)
-
opihi/include/display.h (modified) (1 diff)
-
opihi/lib.data/PlotVectors.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/CheckPipe.c
r13404 r13409 12 12 } 13 13 14 // after we have processed the command, we unblock the socket 15 # define FINISHED(A) { fcntl (sock, F_SETFL, O_NONBLOCK); return (A); } 16 14 17 int CheckPipe () { 15 18 … … 21 24 sock = KapaServerWait (InitSocket, &Address); 22 25 if (sock == -1) return (TRUE); 23 close (InitSocket); /* stop listening on this socket*/26 close (InitSocket); /* stop listening for new connections */ 24 27 fcntl (sock, F_SETFL, O_NONBLOCK); 25 28 } … … 47 50 } 48 51 52 /* once we get a command, we block to ensure we get complete messages */ 53 fcntl (sock, F_SETFL, !O_NONBLOCK); 54 49 55 /***** handle different messages ****/ 50 56 if (ACTIVE_CURSOR) { 51 57 if (strcmp (word, "NCUR")) { 52 58 fprintf (stderr, "wrong end message %s\n", word); 53 return(TRUE);59 FINISHED (TRUE); 54 60 } 55 61 ACTIVE_CURSOR = FALSE; 56 return(TRUE);62 FINISHED (TRUE); 57 63 } 58 64 59 if (!strcmp (word, "QUIT")) return(FALSE);65 if (!strcmp (word, "QUIT")) FINISHED (FALSE); 60 66 61 67 if (!strcmp (word, "CURS")) { 62 68 ACTIVE_CURSOR = TRUE; 63 return(TRUE);69 FINISHED (TRUE); 64 70 } 65 71 … … 67 73 status = PScommand (sock); 68 74 KiiSendCommand (sock, 4, "DONE"); 69 return(status);75 FINISHED (status); 70 76 } 71 77 … … 73 79 status = PNGit (sock); 74 80 KiiSendCommand (sock, 4, "DONE"); 75 return(status);81 FINISHED (status); 76 82 } 77 83 … … 79 85 status = PPMit (sock); 80 86 KiiSendCommand (sock, 4, "DONE"); 81 return(status);87 FINISHED (status); 82 88 } 83 89 … … 85 91 status = LoadFrame (sock); 86 92 KiiSendCommand (sock, 4, "DONE"); 87 return(status);93 FINISHED (status); 88 94 } 89 95 90 96 if (!strcmp (word, "PLOT")) { 91 97 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); 94 101 } 95 102 … … 97 104 status = LoadLabels (sock); 98 105 KiiSendCommand (sock, 4, "DONE"); 99 return(TRUE);106 FINISHED (TRUE); 100 107 } 101 108 … … 103 110 status = LoadTextlines (sock); 104 111 KiiSendCommand (sock, 4, "DONE"); 105 return(TRUE);112 FINISHED (TRUE); 106 113 } 107 114 … … 109 116 status = Resize (sock); 110 117 KiiSendCommand (sock, 4, "DONE"); 111 return(status);118 FINISHED (status); 112 119 } 113 120 … … 115 122 GetLimits (sock); 116 123 KiiSendCommand (sock, 4, "DONE"); 117 return(TRUE);124 FINISHED (TRUE); 118 125 } 119 126 … … 121 128 status = SetLimits (sock); 122 129 KiiSendCommand (sock, 4, "DONE"); 123 return(TRUE);130 FINISHED (TRUE); 124 131 } 125 132 … … 127 134 status = SetSection (sock); 128 135 KiiSendCommand (sock, 4, "DONE"); 129 return(TRUE);136 FINISHED (TRUE); 130 137 } 131 138 … … 133 140 status = ListSection (sock); 134 141 KiiSendCommand (sock, 4, "DONE"); 135 return(TRUE);142 FINISHED (TRUE); 136 143 } 137 144 … … 139 146 status = DefineSection (sock); 140 147 KiiSendCommand (sock, 4, "DONE"); 141 return(TRUE);148 FINISHED (TRUE); 142 149 } 143 150 … … 145 152 status = MoveSection (sock); 146 153 KiiSendCommand (sock, 4, "DONE"); 147 return(TRUE);154 FINISHED (TRUE); 148 155 } 149 156 … … 151 158 status = SetFont (sock); 152 159 KiiSendCommand (sock, 4, "DONE"); 153 return(TRUE);160 FINISHED (TRUE); 154 161 } 155 162 … … 158 165 status = EraseCurrentPlot (); 159 166 KiiSendCommand (sock, 4, "DONE"); 160 return(status);167 FINISHED (status); 161 168 } 162 169 … … 165 172 status = ErasePlots (); 166 173 KiiSendCommand (sock, 4, "DONE"); 167 return(status);174 FINISHED (status); 168 175 } 169 176 … … 172 179 status = EraseSections (); 173 180 KiiSendCommand (sock, 4, "DONE"); 174 return(status);181 FINISHED (status); 175 182 } 176 183 … … 179 186 status = EraseImage (); 180 187 KiiSendCommand (sock, 4, "DONE"); 181 return(status);188 FINISHED (status); 182 189 } 183 190 … … 186 193 status = EraseOverlay (sock); 187 194 KiiSendCommand (sock, 4, "DONE"); 188 return(status);195 FINISHED (status); 189 196 } 190 197 … … 192 199 status = LoadPicture (sock); 193 200 KiiSendCommand (sock, 4, "DONE"); 194 return(status);201 FINISHED (status); 195 202 } 196 203 … … 198 205 status = LoadOverlay (sock); 199 206 KiiSendCommand (sock, 4, "DONE"); 200 return(status);207 FINISHED (status); 201 208 } 202 209 … … 207 214 status = LoadTickmarks (sock); 208 215 KiiSendCommand (sock, 4, "DONE"); 209 return(status);216 FINISHED (status); 210 217 } 211 218 */ … … 214 221 status = SaveOverlay (sock); 215 222 KiiSendCommand (sock, 4, "DONE"); 216 return(status);223 FINISHED (status); 217 224 } 218 225 … … 220 227 status = CSaveOverlay (sock); 221 228 KiiSendCommand (sock, 4, "DONE"); 222 return(status);229 FINISHED (status); 223 230 } 224 231 … … 226 233 status = JPEGit24 (sock); 227 234 KiiSendCommand (sock, 4, "DONE"); 228 return(status);235 FINISHED (status); 229 236 } 230 237 … … 232 239 status = Center (sock); 233 240 KiiSendCommand (sock, 4, "DONE"); 234 return(status);241 FINISHED (status); 235 242 } 236 243 … … 238 245 GetPixelCount (sock); 239 246 KiiSendCommand (sock, 4, "DONE"); 240 return(TRUE);247 FINISHED (TRUE); 241 248 } 242 249 243 250 fprintf (stderr, "unknown signal %s\n", word); 244 245 return (TRUE); 246 251 FINISHED (TRUE); 247 252 } -
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadLabels.c
r13401 r13409 15 15 graph = section->graph; 16 16 17 fcntl (sock, F_SETFL, !O_NONBLOCK);18 19 17 KiiScanMessage (sock, "%d", &mode); 20 18 label = KiiRecvData (sock); … … 25 23 strncpy (graph[0].label[mode].text, label, Nbytes); 26 24 label[Nbytes] = 0; 27 28 fcntl (sock, F_SETFL, O_NONBLOCK);29 25 30 26 c = GetRotFont (&size); -
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadObject.c
r13401 r13409 1 1 # include "Ximage.h" 2 2 # include <errno.h> 3 # define DEBUG 1 3 4 4 5 int LoadObject (int sock) { … … 14 15 } 15 16 graph = section->graph; 16 17 fcntl (sock, F_SETFL, !O_NONBLOCK);18 17 19 18 N = graph[0].Nobjects; … … 45 44 &graph[0].objects[N].x0, &graph[0].objects[N].x1, 46 45 &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 50 54 if (!LoadVectorData (sock, graph, N, "x")) { 51 55 FreeObjectData (&graph[0].objects[N]); … … 100 104 } 101 105 102 /* load data for the named component */103 106 int LoadVectorData (int sock, KapaGraphWidget *graph, int N, char *type) { 104 107 105 108 int Npts, Ninpts, status, Ntry; 106 109 int bytes_left; 107 char *buff; 110 char *buff, type_send[16]; 111 int Npts_send, Nbytes_send; 108 112 109 113 buff = NULL; 110 114 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 111 128 status = 1; 112 129 if (!strcmp (type, "x")) { … … 140 157 141 158 bytes_left = Npts*sizeof (float); 159 160 fcntl (sock, F_SETFL, O_NONBLOCK); 142 161 143 162 Ntry = 0; … … 169 188 perror ("kapa load"); 170 189 } 190 191 fcntl (sock, F_SETFL, !O_NONBLOCK); 192 KiiSendCommand (sock, 4, "DONE"); 193 171 194 if (Ninpts != Npts*sizeof(float)) { 172 195 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 42 42 fprintf (stderr, "error: pipe closed\n"); 43 43 free (buffer); 44 fcntl (sock, F_SETFL, O_NONBLOCK);44 fcntl (sock, F_SETFL, !O_NONBLOCK); 45 45 return (FALSE); 46 46 } … … 89 89 REALLOCATE (image[0].overlay[N].objects, Object, MAX (1, image[0].overlay[N].Nobjects)); 90 90 image[0].overlay[N].active = TRUE; 91 fcntl (sock, F_SETFL, O_NONBLOCK);92 91 93 92 if (USE_XWINDOW) { -
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadPicture.c
r13401 r13409 20 20 KiiSendMessage (sock, "%d", graphic->Npixels); 21 21 22 fcntl (sock, F_SETFL, !O_NONBLOCK);23 24 22 header.Naxes = 2; 25 26 23 KiiScanMessage (sock, "%d %d %d %d %lf %lf", &header.Naxis[0], &header.Naxis[1]); 27 24 KiiScanMessage (sock, "%d %d %d %d %lf %lf", &header.bitpix, &header.unsign, &header.bzero, &header.bscale); … … 55 52 } 56 53 54 fcntl (sock, F_SETFL, !O_NONBLOCK); 55 57 56 if (DEBUG) fprintf (stderr, "read %d bytes\n", image[0].matrix.size); 58 57 /* it it not obvious this condition should kill kii, but ... */ -
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTextlines.c
r13401 r13409 16 16 } 17 17 18 fcntl (sock, F_SETFL, !O_NONBLOCK);19 20 18 graph[0].Ntextline = MAX (graph[0].Ntextline, 0); 21 19 N = graph[0].Ntextline; … … 38 36 strcpy (graph[0].textline[N].text, string); 39 37 free (string); 40 41 fcntl (sock, F_SETFL, O_NONBLOCK);42 38 43 39 string = GetRotFont (&size); -
branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTickmarks.c
r13401 r13409 15 15 } 16 16 image = section->image; 17 18 fcntl (sock, F_SETFL, !O_NONBLOCK);19 17 20 18 Nobjects = image[0].tickmarks.Nobjects; … … 65 63 66 64 if (USE_XWINDOW) Refresh (); 67 68 fcntl (sock, F_SETFL, O_NONBLOCK);69 65 return (TRUE); 70 66 } -
branches/kapa-mods-2007-05/Ohana/src/libkapa/include/kapa.h
r13405 r13409 107 107 int KiiSendData (int device, char *data, int Nbytes); 108 108 char *KiiRecvData (int device); 109 int KiiWaitAnswer (int device, char *expect); 109 110 110 111 /* KiiOpen.c */ … … 146 147 int KapaInitGraph (Graphdata *graphdata); 147 148 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode); 148 int KapaPlotVector (int fd, int Npts, float *values );149 int KapaPlotVector (int fd, int Npts, float *values, char *type); 149 150 int KapaSetFont (int fd, char *name, int size); 150 151 int KapaSendLabel (int fd, char *string, int mode); -
branches/kapa-mods-2007-05/Ohana/src/libkapa/src/IOfuncs.c
r13402 r13409 1 1 # include <kapa_internal.h> 2 3 /** these function expect to operate with a BLOCKing socket **/ 2 4 3 5 /* why is this not defined in stdarg.h for linux/x64? */ … … 61 63 status = read (device, buffer, 16); 62 64 buffer[16] = 0; 65 if (status != 16) fprintf (stderr, "dropped message length\n"); 63 66 64 67 /* find the message length, allocate space */ … … 71 74 message[status] = 0; 72 75 /* make the string easy to parse */ 76 77 fprintf (stderr, "message recv: %s\n", message); 73 78 74 79 /* scan the incoming message */ … … 116 121 117 122 ALLOCATE (message, char, length + 1); 118 fcntl (device, F_SETFL, !O_NONBLOCK); // block until we get the response??119 123 120 124 /* read Nbytes from the device */ 121 125 status = read (device, message, length); 122 fcntl (device, F_SETFL, O_NONBLOCK); // unblock123 126 124 127 if (status != length) { … … 135 138 return (1); 136 139 } 140 141 int 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 75 75 } 76 76 if (!status) return (-1); 77 78 /* this is a blocking wait; use in a separate thread */79 // fcntl (InitSocket, F_SETFL, !O_NONBLOCK);80 77 81 78 if (DEBUG) fprintf (stderr, "init sock: %d, len: %d\n", InitSocket, length); … … 120 117 accepted: 121 118 if (DEBUG) fprintf (stderr, "connection accepted\n"); 122 // fcntl (BindSocket, F_SETFL, O_NONBLOCK);123 119 return (BindSocket); 124 120 } … … 206 202 if (DEBUG) fprintf (stderr, "connected on port: %d\n", Address.sin_port); 207 203 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); 209 207 return (InitSocket); 210 208 } -
branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KapaWindow.c
r13405 r13409 2 2 3 3 int KiiCenter (int fd, double x, double y, int zoom) { 4 5 char word[5];6 4 7 5 KiiSendCommand (fd, 4, "CENT"); 8 6 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"); 14 8 15 9 return (TRUE); … … 17 11 18 12 int KiiResize (int fd, int Nx, int Ny) { 19 20 char word[5];21 13 22 14 KiiSendCommand (fd, 4, "RSIZ"); 23 15 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"); 30 17 return (TRUE); 31 18 } 32 19 33 20 int KapaBox (int fd, Graphdata *graphdata) { 34 35 char word[5];36 21 37 22 KiiSendCommand (fd, 4, "DBOX"); … … 40 25 41 26 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"); 48 28 return (TRUE); 49 29 } … … 51 31 int KapaClearCurrentPlot (int fd) { 52 32 53 char word[5];54 55 33 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"); 61 35 return (TRUE); 62 36 } … … 64 38 int KapaClearPlots (int fd) { 65 39 66 char word[5];67 68 40 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"); 74 42 return (TRUE); 75 43 } … … 77 45 int KapaClearSections (int fd) { 78 46 79 char word[5];80 81 47 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"); 87 49 return (TRUE); 88 50 } … … 90 52 int KapaClearImage (int fd) { 91 53 92 char word[5];93 94 54 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"); 100 56 return (TRUE); 101 57 } … … 129 85 int KapaPrepPlot (int fd, int Npts, Graphdata *graphmode) { 130 86 131 char word[5];132 133 87 /* tell kapa to look for the incoming image */ 134 88 KiiSendCommand (fd, 4, "PLOT"); … … 143 97 graphmode[0].xmin, graphmode[0].xmax, 144 98 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 103 int KapaPlotVector (int fd, int Npts, float *values, char *type) { 156 104 157 105 int Nbytes; 158 106 159 107 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 118 valid: 119 KiiSendCommand (fd, 4, "PLOB"); 120 KiiSendMessage (fd, "%s %d %d", type, Npts, Nbytes); 121 // XXX send the byte-swap as well... 122 160 123 write (fd, values, Nbytes); 124 KiiWaitAnswer (fd, "DONE"); 161 125 return (TRUE); 162 126 } 163 127 164 128 int KapaSetFont (int fd, char *name, int size) { 165 166 char word[5];167 129 168 130 KiiSendCommand (fd, 4, "FONT"); 169 131 KiiSendCommand (fd, 16, "%s", name); 170 132 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"); 178 134 return (TRUE); 179 135 } 180 136 181 137 int KapaSendLabel (int fd, char *string, int mode) { 182 183 char word[5];184 138 185 139 KiiSendCommand (fd, 4, "LABL"); 186 140 KiiSendMessage (fd, "%6d", mode); 187 141 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"); 195 143 return (TRUE); 196 144 } … … 198 146 int KapaSendTextline (int fd, char *string, float x, float y, float angle) { 199 147 200 char word[5];201 202 148 KiiSendCommand (fd, 4, "PTXT"); 203 149 KiiSendMessage (fd, "%f %f %f", x, y, angle); 204 150 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"); 212 152 return (TRUE); 213 153 } 214 154 215 155 int KapaSetLimits (int fd, Graphdata *graphmode) { 216 217 char word[5];218 156 219 157 KiiSendCommand (fd, 4, "SLIM"); 220 158 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"); 228 160 return (TRUE); 229 161 } … … 232 164 int KapaGetLimits (int fd, float *dx, float *dy) { 233 165 234 char word[5];235 236 166 KiiSendCommand (fd, 4, "LIMS"); 237 167 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"); 245 169 return (TRUE); 246 170 } 247 171 248 172 int KapaSetSection (int fd, KapaSection *section) { 249 250 char word[5];251 173 252 174 KiiSendCommand (fd, 4, "DSEC"); … … 257 179 section[0].dx, 258 180 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"); 266 182 return (TRUE); 267 183 } 268 184 269 185 int KapaMoveSection (int fd, char *name, char *direction) { 270 271 char word[5];272 186 273 187 if (!strcasecmp(direction, "up")) goto valid; … … 282 196 KiiSendCommand (fd, 4, "MSEC"); 283 197 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"); 290 199 return (TRUE); 291 200 } 292 201 293 202 int KapaSelectSection (int fd, char *name) { 294 295 char word[5];296 203 297 204 KiiSendCommand (fd, 4, "SSEC"); 298 205 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"); 306 207 return (TRUE); 307 208 } 308 209 309 210 int KapaGetSection (int fd, char *name) { 310 311 char word[5];312 211 313 212 KiiSendCommand (fd, 4, "LSEC"); 314 213 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 3 3 int KiiJPEG (int fd, const char *filename) { 4 4 5 char buffer[20], word[5];6 7 5 KiiSendCommand (fd, 4, "JPEG"); 8 6 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"); 16 8 return (TRUE); 17 9 } … … 19 11 int KapaPNG (int fd, const char *filename) { 20 12 21 char buffer[20], word[5];22 23 13 KiiSendCommand (fd, 4, "PNGF"); 24 14 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"); 32 16 return (TRUE); 33 17 } … … 35 19 int KapaPPM (int fd, const char *filename) { 36 20 37 char buffer[20], word[5];38 39 21 KiiSendCommand (fd, 4, "PPMF"); 40 22 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"); 48 24 return (TRUE); 49 25 } … … 51 27 int KiiPS (int fd, const char *filename, int scaleMode, int pageMode, char *pagename) { 52 28 53 char buffer[20], word[5];54 55 /* the default operation */56 29 KiiSendCommand (fd, 4, "PSIT"); 57 58 30 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"); 66 32 return (TRUE); 67 33 } -
branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiCursor.c
r13405 r13409 2 2 3 3 int KiiCursorOn (int fd) { 4 char word[5];5 4 6 5 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"); 12 7 return (TRUE); 13 8 } 14 9 15 10 int KiiCursorOff (int fd) { 16 char word[5];17 11 18 12 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"); 24 14 return (TRUE); 25 15 } -
branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiOverlay.c
r13405 r13409 53 53 54 54 int i, n, Nline; 55 char *buffer, *type , word[5];55 char *buffer, *type; 56 56 57 57 KiiSelectOverlay (overname, &n); … … 84 84 85 85 free (buffer); 86 KiiWaitAnswer (fd, "DONE"); 86 87 87 88 /* this is very inefficient: 128 bytes per object vs 17 as binary, plus the 88 89 conversions back and forth 89 90 */ 90 KiiScanCommand (fd, 4, "%s", word); 91 if (strcmp (word, "DONE")) { 92 fprintf (stderr, "unexpected response %s\n", word); 93 return (FALSE); 94 } 91 95 92 return (TRUE); 96 93 } … … 99 96 100 97 int n; 101 char word[5];102 98 103 99 KiiSelectOverlay (overname, &n); … … 105 101 KiiSendCommand (fd, 4, "ERSO"); 106 102 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"); 113 104 return (TRUE); 114 105 } … … 117 108 118 109 int n; 119 char word[5];120 110 121 111 KiiSelectOverlay (overname, &n); … … 128 118 129 119 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"); 136 121 return (TRUE); 137 122 } -
branches/kapa-mods-2007-05/Ohana/src/libkapa/src/KiiPicture.c
r13405 r13409 6 6 int Npix, Ncolors, NNcolors, size; 7 7 float *in, min, max; 8 char *out, *outbuffer, *root, word[5];8 char *out, *outbuffer, *root, extra[1024]; 9 9 double a1, a2; 10 10 … … 58 58 free (outbuffer); 59 59 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"); 65 61 return (TRUE); 66 62 } … … 72 68 float *in, min, max; 73 69 char *out, *outbuffer, *root; 74 char buffer[1024] , word[5];70 char buffer[1024]; 75 71 double a1, a2; 76 72 … … 130 126 free (outbuffer); 131 127 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"); 137 129 return (TRUE); 138 130 } -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/cgrid.c
r13391 r13409 393 393 graphmode.etype = 0; 394 394 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"); 397 397 398 398 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/cplot.c
r13391 r13409 68 68 graphmode.etype = 0; 69 69 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"); 72 72 73 73 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.astro/czplot.c
r13391 r13409 61 61 PrepPlotting (Npts, &graphmode); 62 62 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"); 66 66 67 67 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/dot.c
r13391 r13409 24 24 if (!PrepPlotting (1, &graphmode)) return (FALSE); 25 25 26 PlotVector (1, &x );27 PlotVector (1, &y );26 PlotVector (1, &x, "x"); 27 PlotVector (1, &y, "y"); 28 28 29 29 return (TRUE); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/grid.c
r13391 r13409 194 194 graphmode.etype = 0; 195 195 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"); 198 198 199 199 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/line.c
r13391 r13409 25 25 if (!PrepPlotting (2, &graphmode)) return (FALSE); 26 26 27 PlotVector (2, x );28 PlotVector (2, y );27 PlotVector (2, x, "x"); 28 PlotVector (2, y, "y"); 29 29 30 30 return (TRUE); -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/plot.c
r13391 r13409 59 59 if (!PrepPlotting (Npts, &graphmode)) return (FALSE); 60 60 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"); 63 63 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"); 66 66 } 67 67 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"); 70 70 } 71 71 -
branches/kapa-mods-2007-05/Ohana/src/opihi/cmd.data/zplot.c
r13391 r13409 47 47 PrepPlotting (Npts, &graphmode); 48 48 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"); 52 52 53 53 free (Zvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/catalog.c
r13391 r13409 391 391 PrepPlotting (N, &graphmode); 392 392 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"); 396 396 397 397 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/dmt.c
r13391 r13409 145 145 PrepPlotting (N, &graphmode); 146 146 147 PlotVector (N, Xvec.elements );148 PlotVector (N, Yvec.elements );147 PlotVector (N, Xvec.elements, "x"); 148 PlotVector (N, Yvec.elements, "y"); 149 149 150 150 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/fitcolors.c
r13404 r13409 305 305 KapaBox (kapa, &graphdata); 306 306 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"); 309 309 310 310 for (i = 0; i < 11; i++) { … … 314 314 graphdata.color = KapaColorByName ("red"); 315 315 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"); 318 318 319 319 KapaSetFont (kapa, "helvetica", 8); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/fitsed.c
r13404 r13409 268 268 graphdata.etype = 0; 269 269 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"); 272 272 graphdata.color = KapaColorByName ("red"); 273 273 graphdata.etype = 1; … … 280 280 } 281 281 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"); 286 286 KapaSendLabel (kapa, "model,fit (mags)", 1); 287 287 … … 308 308 } 309 309 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"); 314 314 KapaSendLabel (kapa, "wavelength (nm)", 0); 315 315 KapaSendLabel (kapa, "resid (mags)", 1); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/images.c
r13391 r13409 283 283 graphmode.etype = 0; 284 284 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"); 287 287 } 288 288 -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imbox.c
r13391 r13409 77 77 graphmode.etype = 0; 78 78 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"); 81 81 } 82 82 skip: -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imdense.c
r13391 r13409 63 63 graphmode.etype = 0; 64 64 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"); 67 67 } 68 68 -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/imstats.c
r13391 r13409 55 55 graphmode.etype = 0; 56 56 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"); 59 59 60 60 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/lcurve.c
r13391 r13409 155 155 156 156 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"); 159 159 if (ErrorBars) { 160 PlotVector (N, dYvec.elements );161 PlotVector (N, dYvec.elements );160 PlotVector (N, dYvec.elements, "x"); 161 PlotVector (N, dYvec.elements, "y"); 162 162 } 163 163 -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/pcat.c
r13391 r13409 84 84 graphmode.etype = 0; 85 85 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"); 88 88 } 89 89 -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/procks.c
r13391 r13409 115 115 PrepPlotting (N, &graphmode); 116 116 117 PlotVector (N, Xvec.elements );118 PlotVector (N, Yvec.elements );117 PlotVector (N, Xvec.elements, "x"); 118 PlotVector (N, Yvec.elements, "y"); 119 119 120 120 /* now plot vectors between two extrema */ … … 148 148 PrepPlotting (N, &graphmode); 149 149 150 PlotVector (N, Xvec.elements );151 PlotVector (N, Yvec.elements );150 PlotVector (N, Xvec.elements, "x"); 151 PlotVector (N, Yvec.elements, "y"); 152 152 153 153 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/showtile.c
r13391 r13409 87 87 graphmode.etype = 0; 88 88 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"); 91 91 } 92 92 -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/simage.c
r13391 r13409 156 156 PrepPlotting (Npts, &graphmode); 157 157 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"); 161 161 162 162 free (Xvec.elements); -
branches/kapa-mods-2007-05/Ohana/src/opihi/dvo/skycat.c
r13391 r13409 98 98 graphmode.etype = 0; 99 99 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"); 102 102 } 103 103 -
branches/kapa-mods-2007-05/Ohana/src/opihi/include/display.h
r13394 r13409 8 8 int GetCurrentDevice PROTO((void)); 9 9 int PrepPlotting PROTO((int Npts, Graphdata *graphmode)); 10 int PlotVector PROTO((int , float *));10 int PlotVector PROTO((int Npts, float *values, char *type)); 11 11 int PlotVectorTriplet PROTO((int N, float *xValues, float *yValues, float *zValues, Graphdata *graphmode)); 12 12 int GetGraphData PROTO((Graphdata *data, int *kapa, char *name)); -
branches/kapa-mods-2007-05/Ohana/src/opihi/lib.data/PlotVectors.c
r13402 r13409 10 10 } 11 11 12 int PlotVector (int Npts, float *values ) {12 int PlotVector (int Npts, float *values, char *type) { 13 13 14 KapaPlotVector (kapa, Npts, values );14 KapaPlotVector (kapa, Npts, values, type); 15 15 return (TRUE); 16 16 } … … 19 19 20 20 PrepPlotting (N, graphmode); 21 PlotVector (N, xValues );22 PlotVector (N, yValues );21 PlotVector (N, xValues, "x"); 22 PlotVector (N, yValues, "y"); 23 23 24 24 return (TRUE); … … 28 28 29 29 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"); 33 33 34 34 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
