IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 21, 2007, 2:10:20 PM (19 years ago)
Author:
eugene
Message:

convert str_to_time and related functions to ohana_...; various cleanups for -Wall -Werror

Location:
trunk/Ohana/src/kapa2
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/include/icons.h

    r13320 r14590  
     1
     2#define icon_width 29
     3#define icon_height 29
     4static unsigned char icon_bits[] = {
     5   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,
     6   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
     7   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
     8   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
     9   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
     10   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
     11   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
     12   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
     13   0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
     14   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     15
     16/* *** icons for buttons, not used ***
    117#define arrow_width 6
    218#define arrow_height 9
     
    1935   0xfc, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x0f, 0xfc, 0x03, 0xfc, 0x00,
    2036   0x3c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00};
    21 #define icon_width 29
    22 #define icon_height 29
    23 static unsigned char icon_bits[] = {
    24    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,
    25    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
    26    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
    27    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
    28    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
    29    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
    30    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
    31    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04,
    32    0x04, 0x41, 0x10, 0x04, 0x04, 0x41, 0x10, 0x04, 0xfc, 0xff, 0xff, 0x07,
    33    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
    3437#define stop_width 16
    3538#define stop_height 16
     
    3841   0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f,
    3942   0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     43*/
  • trunk/Ohana/src/kapa2/include/prototypes.h

    r14500 r14590  
    2323void          NameWindow          PROTO((Graphic *graphic, char *name));
    2424void          MapWindow           PROTO((Graphic *graphic));
     25void CheckVisual (Graphic *graphic, int *argc, char **argv);
    2526
    2627/* X drawing utilities */
     
    8586int           SetActiveSectionByNumber PROTO((int N));
    8687int           ListSection         PROTO((int sock));
     88void SetSectionSizes (Section *section);
    8789
    8890KapaGraphWidget *InitGraph        PROTO(());
     
    188190int           Overlay3            PROTO((Graphic *graphic, KapaImageWidget *image));
    189191int           PSfunction          PROTO((Graphic *graphic, KapaImageWidget *image));
     192
     193/* misc functions */
     194void SetToolbox (int sock);
     195int EraseOverlay (int sock);
     196int LoadOverlay (int sock);
     197int SaveOverlay (int sock);
     198int CSaveOverlay (int sock);
     199int JPEGit24 (int sock);
     200
     201int UpdatePointer (Graphic *graphic, XMotionEvent *event);
     202int InterpretPresses (Graphic *graphic, XButtonEvent *event);
     203int InterpretKeys (Graphic *graphic, XKeyEvent *event);
     204void InitPipe (char *namedSocket);
     205void EraseGraph (KapaGraphWidget *graph);
     206void StatusBox (Graphic *graphic, KapaImageWidget *image);
     207
     208void CreatePicture (KapaImageWidget *image, Graphic *graphic);
     209void CreateColorbar (KapaImageWidget *image, Graphic *graphic);
     210void CreateZoom (KapaImageWidget *image, Graphic *graphic, double x, double y);
     211void UpdateStatusBox (Graphic *graphic, KapaImageWidget *image, double x, double y, double z, int mode);
     212
     213void CreateZoom8  (KapaImageWidget *image, Graphic *graphic, double x, double y);
     214void CreateZoom16 (KapaImageWidget *image, Graphic *graphic, double x, double y);
     215void CreateZoom24 (KapaImageWidget *image, Graphic *graphic, double x, double y);
     216void CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y);
     217
     218int GetActiveSocket ();
     219void InvertButton (Graphic *graphic, Button *button);
     220void bDrawOverlay (KapaImageWidget *image, int N);
  • trunk/Ohana/src/kapa2/include/structures.h

    r14498 r14590  
    1313  Cursor         cursor;
    1414  int            x,  y;
    15   int            dx, dy;
     15  unsigned int   dx, dy;
    1616  XColor         cmap[256];
    1717  Colormap       colormap;
  • trunk/Ohana/src/kapa2/src/CheckGeometry.c

    r13320 r14590  
    44void CheckGeometry (Graphic *graphic, int *argc, char **argv) {
    55
    6   int status, x, y, N;
    7   unsigned int dx, dy;
    8   int X, Y, dX, dY;
     6  int status, N;
    97  char *temp_name;
    108 
  • trunk/Ohana/src/kapa2/src/CheckPipe.c

    r14500 r14590  
    186186 
    187187  if (!strcmp (word, "TOOL")) {
    188     status = SetToolbox (sock);
     188    SetToolbox (sock);
    189189    KiiSendCommand (sock, 4, "DONE");
    190190    FINISHED (TRUE);
  • trunk/Ohana/src/kapa2/src/CreateZoom8.c

    r13479 r14590  
    6868  if ((i_end - i_start) % expand_out == 0) dropback = 0;
    6969
    70   out_pix = (char *) image[0].zoom.data;
     70  out_pix = (unsigned char *) image[0].zoom.data;
    7171  imdata  = (float *) image[0].matrix.buffer;
    7272  in_pix  = &imdata[DX*(int)MAX(Ry,0) + (int)MAX(Rx,0)];
  • trunk/Ohana/src/kapa2/src/DefineSection.c

    r13479 r14590  
    44int DefineSection (int sock) {
    55 
    6   int i, N, MoveSection;
     6  int N, MoveSection;
    77  char name[128];
    88  double x, y, dx, dy;
  • trunk/Ohana/src/kapa2/src/DrawButton.c

    r13320 r14590  
    22
    33void DrawButton (Graphic *graphic, Button *button) {
    4  
    5   int y, dX;
    64 
    75  XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].back);
  • trunk/Ohana/src/kapa2/src/EraseImage.c

    r13479 r14590  
    33int EraseImage () {
    44
    5   char buffer[256];
    6   int i, status, N;
    75  Graphic *graphic;
    86  Section *section;
  • trunk/Ohana/src/kapa2/src/EraseOverlay.c

    r13479 r14590  
    33int EraseOverlay (int sock) {
    44
    5   char buffer[256];
    6   int i, status, N;
     5  int i, N;
    76  Graphic *graphic;
    87  Section *section;
  • trunk/Ohana/src/kapa2/src/EventLoop.c

    r13331 r14590  
    5050    if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, (XMotionEvent *) &event);
    5151    if (LastEvent (display, ButtonPress,     &event)) InterpretPresses (graphic, (XButtonEvent *) &event);
    52     if (LastEvent (display, KeyPress,        &event)) InterpretKeys (graphic, &event);
     52    if (LastEvent (display, KeyPress,        &event)) InterpretKeys (graphic, (XKeyEvent *) &event);
    5353
    5454    /* drop and ignore the following StructureNotifyMask events */
  • trunk/Ohana/src/kapa2/src/GetPixelCount.c

    r13479 r14590  
    33int GetPixelCount (int sock) {
    44 
    5   int i;
    6   double xmin, xmax, ymin, ymax;
    75  Graphic *graphic;
    86
  • trunk/Ohana/src/kapa2/src/InterpretKeys.c

    r13479 r14590  
    66  double           X, Y, Z, R, D, offset;
    77  int              sock, DX, DY, modstate;
    8   char            *name, string[16], line[40];
     8  char            *name, string[16];
    99  KeySym           keysym;
    1010  XComposeStatus   composestatus;
     
    134134    case XK_Tab:
    135135      image[0].MovePointer = image[0].MovePointer ^ TRUE;
    136       if (image[0].MovePointer) UpdatePointer (graphic, image, (XMotionEvent *)event);
     136      if (image[0].MovePointer) UpdatePointer (graphic, (XMotionEvent *)event);
    137137      break;
    138138  }
  • trunk/Ohana/src/kapa2/src/InterpretPresses.c

    r13479 r14590  
    33int InterpretPresses (Graphic *graphic, XButtonEvent *event) {
    44
    5   int              sock, DX, DY, status, done, this_button, old_cursor;
    6   char             name[16], line[40];
     5  int              sock, DX, DY, status, done, this_button;
     6  char             name[16];
    77  double           X, Y, Z, R, D;
    88  float           *imdata;
    9   KeySym           keysym;
    109  Button          *button;
    1110  Section         *section;
  • trunk/Ohana/src/kapa2/src/JPEGit24.c

    r13479 r14590  
    3333  int dropback;  /* this is a bit of a kludge... */
    3434  int dx, dy, DX, DY, pixelN;
    35   int status, Nbytes, quality;
     35  int quality;
    3636  int expand_in, expand_out;
    3737  double expand, Rx, Ry, X, Y;
  • trunk/Ohana/src/kapa2/src/LoadFrame.c

    r13479 r14590  
    33int LoadFrame (int sock) {
    44 
    5   int i, status;
     5  int i;
    66  char Axis[16], Labels[16], Ticks[16];
    77  Section *section;
  • trunk/Ohana/src/kapa2/src/LoadObject.c

    r13479 r14590  
    123123  }
    124124  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));
     125    fprintf (stderr, "Kapa Communication error: unexpected data size %d vs %ld\n", Nbytes_send, Npts_send*sizeof(float));
    126126  }
    127127
  • trunk/Ohana/src/kapa2/src/LoadOverlay.c

    r13479 r14590  
    44 
    55  int i, j, Ntotal, Nbytes, Nread, Nfound, Ntext, Nobjects, overnum;
    6   int Noverlay, NOVERLAY, Ntextdata;
     6  int Noverlay, Ntextdata;
    77  char *textdata, *buffer, *p, *q;
    88  Section *section;
  • trunk/Ohana/src/kapa2/src/SetImageData.c

    r14500 r14590  
    33int SetImageData (int sock) {
    44 
    5   int i;
    6   double xmin, xmax, ymin, ymax;
    75  Graphic *graphic;
    86  Section *section;
     
    5553int SetImageCoords (int sock) {
    5654 
    57   int i;
    58   double xmin, xmax, ymin, ymax;
    5955  Graphic *graphic;
    6056  Section *section;
  • trunk/Ohana/src/kapa2/src/SetImageSize.c

    r14500 r14590  
    77void SetImageSize (Section *section) {
    88
    9   int Xs, Ys, Xe, Ye, dX, dY;
     9  int Xs, Ys, dX, dY;
    1010  int textpad, textdY, WdY;
    1111  KapaImageWidget *image;
Note: See TracChangeset for help on using the changeset viewer.