IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2009, 10:43:26 AM (18 years ago)
Author:
eugene
Message:

lots of very minor API mods to satisfy some pickier compilers (supply void to prototypes for argument-less functions)

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

Legend:

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

    r13320 r21153  
    2929  int      width, height;
    3030  char    *bitmap;          /* picture on button */
    31   int    (*function_1) ();  /* mouse_button 1 function */
    32   int    (*function_2) ();  /* mouse_button 2 function */
    33   int    (*function_3) ();  /* mouse_button 3 function */
     31  int    (*function_1) (void);  /* mouse_button 1 function */
     32  int    (*function_2) (void);  /* mouse_button 2 function */
     33  int    (*function_3) (void);  /* mouse_button 3 function */
    3434} Button;
    3535
     
    4141  int      outline;        /* draw an outline?  */
    4242  int      cursor;         /* location of cursor (if selected) */
    43   int    (*function) ();   /* textline function */
     43  int    (*function) (void);   /* textline function */
    4444} TextLine;
    4545
     
    5454  int      cursor_x;       /* location of cursor (if selected) */
    5555  int      cursor_y;       /* location of cursor (if selected) */
    56   int    (*function) ();   /* textline function */
     56  int    (*function) (void);   /* textline function */
    5757} TextBox;
    5858
  • trunk/Ohana/src/kapa2/include/prototypes.h

    r21060 r21153  
    44void          SetUpGraphic        PROTO((int *argc, char **argv));
    55void          DefineLayout        PROTO((int, char **));
    6 int           EventLoop           PROTO(());
    7 void          CloseDisplay        PROTO(());
     6int           EventLoop           PROTO((void));
     7void          CloseDisplay        PROTO((void));
    88
    99/* SetUpGraphic */
     
    4343/* EventLoop */
    4444int           PScommand           PROTO((int sock));
    45 int           CheckPipe           PROTO(());
     45int           CheckPipe           PROTO((void));
    4646int           Reconfig            PROTO((XEvent *event));
    47 void          Refresh             PROTO(());
     47void          Refresh             PROTO((void));
    4848
    4949/* CheckPipe */
     
    7979
    8080/* Section Utilities */
    81 Section      *InitSection         PROTO(());
     81Section      *InitSection         PROTO((void));
    8282void          FreeSection         PROTO((Section *section));
    83 void          FreeSections        PROTO(());
     83void          FreeSections        PROTO((void));
    8484Section      *AddSection          PROTO((char *name, float x, float y, float dx, float dy));
    8585int           DelSection          PROTO((char *name));
    8686int           GetSectionByName    PROTO((char *name));
    87 int           GetNumberOfSections PROTO(());
     87int           GetNumberOfSections PROTO((void));
    8888Section      *GetSectionByNumber  PROTO((int N));
    89 Section      *GetActiveSection    PROTO(());
     89Section      *GetActiveSection    PROTO((void));
    9090int           SetActiveSectionByNumber PROTO((int N));
    9191int           ListSection         PROTO((int sock));
    9292void          SetSectionSizes     PROTO((Section *section));
    9393
    94 KapaGraphWidget *InitGraph        PROTO(());
     94KapaGraphWidget *InitGraph        PROTO((void));
    9595void          DrawGraph           PROTO((KapaGraphWidget *graph));
    9696void          SetGraphSize        PROTO((Section *section));
     
    131131void          bDrawTick           PROTO((double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int IsLabel, int IsMajor, int naxis));
    132132void          bDrawClipLine       PROTO((double x0, double y0, double x1, double y1, double X0, double Y1, double X1, double Y0));
    133 bDrawBuffer  *bDrawIt             PROTO(());
     133bDrawBuffer  *bDrawIt             PROTO((void));
    134134void          bDrawGraph          PROTO((KapaGraphWidget *graph));
    135135
     
    137137int           LastEvent           PROTO((Display *display, int type, XEvent *event));
    138138void          FreeObjectData      PROTO((Gobjects *object));
    139 void          FlushDisplay        PROTO(());
     139void          FlushDisplay        PROTO((void));
    140140unsigned long GetColor            PROTO((Display *display, char *name, Colormap colormap, unsigned long default_color));
    141141void          QuitX               PROTO((Display *display, char *message));
    142 Graphic      *GetGraphic          PROTO(());
     142Graphic      *GetGraphic          PROTO((void));
    143143int           GetPixelCount       PROTO((int sock));
    144144
    145 int           Center              PROTO(());
    146 int           Parity              PROTO(());
     145int           Center              PROTO((int sock));
     146int           Parity              PROTO((int sock));
    147147void          SetColorScale       PROTO((Graphic *graphic, KapaImageWidget *image));
    148148void          SetColorScale1D     PROTO((Graphic *graphic, KapaImageWidget *image));
     
    155155int           LoadPicture         PROTO((int sock));
    156156
    157 KapaImageWidget *InitImageWidget  PROTO(());
     157KapaImageWidget *InitImageWidget  PROTO((void));
    158158int           InitImageChannel    PROTO((KapaImageChannel *channel));
    159159void          FreeImage           PROTO((KapaImageWidget *image));
     
    161161
    162162void          InitButtonSize      PROTO((Button *button, int width, int height, char *bitmap));
    163 void          InitButtonFunc      PROTO((Button *button, int (*function)()));
     163void          InitButtonFunc      PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image)));
    164164void          DrawImage           PROTO((KapaImageWidget *image));
    165165void          DrawButton          PROTO((Graphic *graphic, Button *button));
     
    232232// void               CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y);
    233233
    234 int           GetActiveSocket ();
     234int           GetActiveSocket (void);
    235235void          InvertButton (Graphic *graphic, Button *button);
    236236void          bDrawOverlay (KapaImageWidget *image, int N);
    237237
    238238/* color cube tools */
    239 CCNode *CCNodeAlloc ();
     239CCNode *CCNodeAlloc (void);
    240240CCNode *CCFindChild (CCNode *node, float x, float y, float z);
    241241int CCSplitNode (CCNode *node);
     
    253253
    254254int SetColorScale3D_CC (Graphic *graphic, KapaImageWidget *image);
    255 int SetColorCubeHistogram ();
     255int SetColorCubeHistogram (void);
  • trunk/Ohana/src/kapa2/include/structures.h

    r17530 r21153  
    7878  int      cursor_x;       /* location of cursor (if selected) */
    7979  int      cursor_y;       /* location of cursor (if selected) */
    80   int    (*function) ();   /* textline function */
     80  int    (*function) (void);   /* textline function */
    8181} TextBox;
    8282
  • trunk/Ohana/src/kapa2/src/ButtonFunctions.c

    r16810 r21153  
    102102  image[0].DecimalDegrees = image[0].DecimalDegrees ^ TRUE;
    103103  StatusBox (graphic, image);
    104   FlushDisplay (graphic[0].display);
     104  FlushDisplay ();
    105105  return (TRUE);
    106106
  • trunk/Ohana/src/kapa2/src/CheckVisual.c

    r16810 r21153  
    3434  }
    3535 
     36// skip the default and the PseudoColor visuals, go for TrueColor first
     37# if (0)
    3638  /* check default visual first */
    3739  for (i = 0; (i < Nfound) && (graphic[0].visual != visual_list[i].visual); i++);
     
    4042    exit (0);
    4143  }
     44# endif
    4245
    4346  // set these based on selected visual
    4447  isColor = isDefault = isDynamic = FALSE;
    4548
     49# if (0)
    4650  // attempt to select the most desirable type of visual: Default as PseudoColor (XXX is it still true?)
    4751  if (DEBUG) fprintf (stderr, "default visual class is %d\n", visual_list[i].class);
     
    5256    goto test_pixels;
    5357  }
     58# endif
     59
     60  // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
     61  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
     62  if (i != Nfound) {
     63    isColor = TRUE;
     64    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
     65    isDefault = (graphic[0].visual == visual_list[i].visual);
     66    graphic[0].visual = visual_list[i].visual;
     67    graphic[0].visualclass = FALSE;
     68    goto test_pixels;
     69  }
    5470
    5571  // attempt to select the most desirable type of visual: PseudoColor (XXX is it still true?)
     
    7288    graphic[0].visual = visual_list[i].visual;
    7389    graphic[0].visualclass = TRUE;
    74     goto test_pixels;
    75   }
    76 
    77   // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
    78   for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
    79   if (i != Nfound) {
    80     isColor = TRUE;
    81     if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
    82     isDefault = (graphic[0].visual == visual_list[i].visual);
    83     graphic[0].visual = visual_list[i].visual;
    84     graphic[0].visualclass = FALSE;
    8590    goto test_pixels;
    8691  }
  • trunk/Ohana/src/kapa2/src/DefineSection.c

    r14590 r21153  
    3434  if (MoveSection) {
    3535    SetSectionSizes (section);
    36     Refresh (1);
     36    Refresh ();
    3737  }
    3838
  • trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c

    r13479 r21153  
    1515 
    1616  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    17   Refresh (1);
     17  Refresh ();
    1818
    1919  return (TRUE);
  • trunk/Ohana/src/kapa2/src/ErasePlots.c

    r13320 r21153  
    1818
    1919  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    20   Refresh (1);
     20  Refresh ();
    2121
    2222  return (TRUE);
  • trunk/Ohana/src/kapa2/src/EraseSections.c

    r13320 r21153  
    1111
    1212  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    13   Refresh (1);
     13  Refresh ();
    1414
    1515  return (TRUE);
  • trunk/Ohana/src/kapa2/src/EventLoop.c

    r14590 r21153  
    2525  display = graphic->display;
    2626 
    27   if (USE_XWINDOW) Refresh (1);
     27  if (USE_XWINDOW) Refresh ();
    2828
    2929  status = TRUE;
     
    4646    if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);
    4747    if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);
    48     if (LastEvent (display, Expose,          &event)) Refresh (1);
     48    if (LastEvent (display, Expose,          &event)) Refresh ();
    4949    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
    5050    if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, (XMotionEvent *) &event);
  • trunk/Ohana/src/kapa2/src/FlushDisplay.c

    r13320 r21153  
    55# define DTIME(A,B) ((A.tv_sec - B.tv_sec) + 1e-6*(A.tv_usec - B.tv_usec))
    66
    7 void FlushDisplay () {
     7void FlushDisplay (void) {
    88
    99  struct timeval now;
  • trunk/Ohana/src/kapa2/src/Image.c

    r16810 r21153  
    190190  }
    191191
    192   FlushDisplay (graphic[0].display);
     192  FlushDisplay ();
    193193}
    194194
  • trunk/Ohana/src/kapa2/src/InvertButton.c

    r13320 r21153  
    1212
    1313  DrawButton (graphic, button);
    14   FlushDisplay (graphic[0].display);
     14  FlushDisplay ();
    1515 
    1616  graphic[0].fore = fore;
  • trunk/Ohana/src/kapa2/src/LoadFrame.c

    r18426 r21153  
    8181    }
    8282    if (USE_XWINDOW) XClearWindow (graphic.display, graphic.window);
    83     Refresh (1);
     83    Refresh ();
    8484  } else {
    8585    FlushDisplay ();
  • trunk/Ohana/src/kapa2/src/MapWindow.c

    r13320 r21153  
    66  XMapRaised (graphic->display, graphic->window);
    77  XMapSubwindows (graphic->display, graphic->window);
    8   FlushDisplay (graphic);
     8  FlushDisplay ();
    99}
  • trunk/Ohana/src/kapa2/src/Reconfig.c

    r13479 r21153  
    2929
    3030  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    31   Refresh (1);
     31  Refresh ();
    3232
    3333  return (TRUE);
  • trunk/Ohana/src/kapa2/src/Refresh.c

    r16388 r21153  
    11# include "Ximage.h"
    22
    3 void Refresh () {
     3void Refresh (void) {
    44
    55  int i, Nsection;
  • trunk/Ohana/src/kapa2/src/Resize.c

    r13479 r21153  
    3434
    3535  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    36   Refresh (1);
     36  Refresh ();
    3737
    3838  return (TRUE);
  • trunk/Ohana/src/kapa2/src/Sections.c

    r13479 r21153  
    177177      sections[N] = sections[N+1];
    178178      sections[N+1] = tmpSection;
    179       Refresh (1);
     179      Refresh ();
    180180      return (TRUE);
    181181  }
     
    187187      sections[N] = sections[N-1];
    188188      sections[N-1] = tmpSection;
    189       Refresh (1);
     189      Refresh ();
    190190      return (TRUE);
    191191  }
     
    199199      }
    200200      sections[i] = tmpSection;
    201       Refresh (1);
     201      Refresh ();
    202202      return (TRUE);
    203203  }
     
    211211      }
    212212      sections[i] = tmpSection;
    213       Refresh (1);
     213      Refresh ();
    214214      return (TRUE);
    215215  }
  • trunk/Ohana/src/kapa2/src/SetGraphData.c

    r13479 r21153  
    7373
    7474  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    75   Refresh (1);
     75  Refresh ();
    7676
    7777  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetGraphStyle.c

    r13479 r21153  
    5555
    5656  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    57   Refresh (1);
     57  Refresh ();
    5858
    5959  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetLimits.c

    r13479 r21153  
    3333
    3434  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    35   Refresh (1);
     35  Refresh ();
    3636
    3737  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetUpGraphic.c

    r16039 r21153  
    4444  LoadFont (graphic, argc, argv, "fixed");
    4545
    46   // FlushDisplay (graphic);
    4746  XSetWindowBackground (graphic->display, graphic->window, graphic->back);
    4847
  • trunk/Ohana/src/kapa2/src/TopWindow.c

    r13320 r21153  
    1515  MakeCursor (graphic, DEFAULT_CURSOR);
    1616  XFreeCursor (graphic->display, graphic->cursor);
    17   // FlushDisplay (graphic);
    1817}
Note: See TracChangeset for help on using the changeset viewer.