Changeset 5288
- Timestamp:
- Oct 12, 2005, 8:17:23 AM (21 years ago)
- Location:
- trunk/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
NewImage.c (modified) (4 diffs)
-
addstarc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/NewImage.c
r5271 r5288 3 3 int NewImage (int BindSocket) { 4 4 5 int i, Nstars, Noptions ;5 int i, Nstars, Noptions, Nimage; 6 6 Stars *stars; 7 Image *image; 7 8 AddstarClientOptions *options; 8 9 … … 13 14 } 14 15 15 # if (0) 16 if (!Recv_Image (BindSocket, &image)) { 16 if (!Recv_Image (BindSocket, &image, &Nimage)) { 17 17 close (BindSocket); 18 18 return (FALSE); 19 19 } 20 # endif21 20 22 21 if (!Recv_Stars (BindSocket, &stars, &Nstars)) { … … 24 23 return (FALSE); 25 24 } 25 /* XXX EAM : error check : 1 option, 1 image */ 26 26 27 27 /* add to db */ … … 33 33 options[0].skip_missed); 34 34 35 for (i = 0; i < Nstars; i++) { 36 fprintf (stderr, "R, D: %f, %f\n", stars[i].R, stars[i].D); 35 // for (i = 0; i < Nstars; i++) { 36 // fprintf (stderr, "R, D: %f, %f\n", stars[i].R, stars[i].D); 37 // } 38 39 for (i = 0; i < Nimage; i++) { 40 fprintf (stderr, "name: %s\n", image[i].name); 37 41 } 38 42 -
trunk/Ohana/src/addstar/src/addstarc.c
r5271 r5288 3 3 int main (int argc, char **argv) { 4 4 5 int Nstars ;5 int Nstars, Nimage; 6 6 int BindSocket; 7 7 AddstarClientOptions options; 8 8 Stars *stars; 9 Image image; 9 10 10 11 /* load config and options */ … … 12 13 options = args_client (argc, argv); 13 14 14 # if (0)15 15 /* load data */ 16 16 stars = gstars (argv[1], &Nstars, &image); 17 # endif18 17 19 18 /* set up server connection */ … … 21 20 SendCommand (BindSocket, strlen(PASSWORD), PASSWORD); 22 21 23 ALLOCATE (stars, Stars, 2);24 Nstars = 2;25 26 stars[0].R = 10.0;27 stars[0].D = 40.0;28 29 stars[1].R = 25.0;30 stars[1].D = 60.0;31 32 22 /* send new data to server */ 33 23 SendCommand (BindSocket, 5, "IMAGE"); 34 24 Send_AddstarClientOptions (BindSocket, &options, 1, TRUE); 25 Send_Image (BindSocket, &image, 1, FALSE); 35 26 Send_Stars (BindSocket, stars, Nstars, FALSE); 36 37 # if (0)38 SendImage (BindSocket, &image);39 # endif40 27 41 28 exit (0);
Note:
See TracChangeset
for help on using the changeset viewer.
