IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 16, 2005, 3:00:56 PM (21 years ago)
Author:
eugene
Message:

moving to internal vs external measure/average: R,D + dR,dD.
NOTE * dR,dD now represent 1.0 arcsec, not 0.01 arcsec.

* all use has been updated to match

also, cleanups to pass Wall,Werror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/plotstuff.c

    r2486 r4796  
    44static int Xgraph[5] = {0,0,0,0,0};
    55static int active;
     6
     7/*
     8static union { unsigned char c[4]; float f; } f_undef = { {0xff, 0xff, 0xff, 0xfe} };
     9# define fUNDEF (f_undef.f)
     10*/
     11
     12static union { unsigned char c[8]; float d; } d_undef = { {0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00} };
     13# define dUNDEF (d_undef.d)
    614
    715void XDead () {
     
    2129# endif /* ANSI */
    2230
    23   int i, InitSocket, status, addreslen;
     31  int InitSocket, status, addreslen;
    2432  struct sockaddr_un Address;
    25   char temp[100], *display_name;
     33  char temp[100];
    2634  char socket_name[100];
    27   FILE *f;
    2835 
    2936  active = N;
     
    3542  Address.sun_family = AF_UNIX;
    3643  InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
    37   status = bind (InitSocket, &Address, sizeof (Address));
     44  status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
    3845  status = listen (InitSocket, 1);
    3946 
     
    4754 
    4855  addreslen =  sizeof (Address);
    49   Xgraph[N] = accept (InitSocket, &Address, &addreslen);
     56  Xgraph[N] = accept (InitSocket, (struct sockaddr *) &Address, &addreslen);
    5057  if (Xgraph[N] < 0) {
    5158    fprintf (stderr, "error starting kapa\n");
     
    6572  write (Xgraph[N], "DBOX", 4);
    6673  sprintf (buffer, "%f %f %f %f", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
    67   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     74  sprintf (buffer2, "NBYTES: %6d", (int) strlen (buffer));
    6875  write (Xgraph[N], buffer2, 16);
    6976  write (Xgraph[N], buffer, strlen (buffer));
    7077
    7178  sprintf (buffer, "%s %s %s", "2222", "2222", "2222");
    72   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     79  sprintf (buffer2, "NBYTES: %6d", (int) strlen (buffer));
    7380  write (Xgraph[N], buffer2, 16);
    7481  write (Xgraph[N], buffer, strlen (buffer));
     
    7683
    7784void JpegPlot (Graphdata *graphmode, int N, char *filename) {
    78   char buffer[65], buffer2[65];
     85
     86  char buffer[65];
    7987
    8088  if (Xgraph[N] == 0) return;
    8189
    8290  write (Xgraph[N], "PNGF", 4);
    83   sprintf (buffer, "LEN: %11d", strlen (filename));
     91  sprintf (buffer, "LEN: %11d", (int) strlen (filename));
    8492  write (Xgraph[N], buffer, 16);
    8593  write (Xgraph[N], filename, strlen (filename));
     
    8896
    8997void PSPlot (Graphdata *graphmode, int N, char *filename) {
    90   char buffer[65], buffer2[65];
     98
     99  char buffer[65];
    91100
    92101  if (Xgraph[N] == 0) return;
    93102
    94103  write (Xgraph[N], "PSIT", 4);
    95   sprintf (buffer, "LEN: %11d", strlen (filename));
     104  sprintf (buffer, "LEN: %11d", (int) strlen (filename));
    96105  write (Xgraph[N], buffer, 16);
    97106  write (Xgraph[N], filename, strlen (filename));
     
    126135           graphmode[0].etype, graphmode[0].color,
    127136           graphmode[0].lweight, graphmode[0].size);
    128   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     137  sprintf (buffer2, "NBYTES: %6d", (int) strlen (buffer));
    129138  write (Xgraph[N], buffer2, 16);
    130139  write (Xgraph[N], buffer, strlen (buffer));
     
    133142           graphmode[0].xmin, graphmode[0].xmax,
    134143           graphmode[0].ymin, graphmode[0].ymax);
    135   sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
     144  sprintf (buffer2, "NBYTES: %6d", (int) strlen (buffer));
    136145  write (Xgraph[N], buffer2, 16);
    137146  write (Xgraph[N], buffer, strlen (buffer));
     
    146155
    147156  write (Xgraph[N], "LABL", 4);
    148   sprintf (buffer, " %6d %6d", strlen (string), 2);
     157  sprintf (buffer, " %6d %6d", (int) strlen (string), 2);
    149158  write (Xgraph[N], buffer, 16);
    150159  write (Xgraph[N], string, strlen (string));
     
    170179}
    171180
    172 plot_list (Graphdata *graphdata, double *xlist, double *ylist, int N, char *label, char *file) {
     181void plot_list (Graphdata *graphdata, double *xlist, double *ylist, int N, char *label, char *file) {
    173182
    174183  int i;
    175   char c;
    176184  StatType stats;
    177185 
     
    207215}
    208216
    209 plot_defaults (Graphdata *graphdata) {
     217void plot_defaults (Graphdata *graphdata) {
    210218
    211219  graphdata[0].style = 2;
Note: See TracChangeset for help on using the changeset viewer.