Button       *CheckButtons        PROTO((XButtonEvent *, Layout *));
void          CheckColors         PROTO((int *, char **));
void          CheckDisplayName    PROTO((int *, char **, char *));
void          CheckFontName       PROTO((int *, char **, char *));
void          CheckGeometry       PROTO((int *, char **));
int           CheckPipe           PROTO(());
void          CreateWindow        PROTO((Window, int, long));
void          DefineLayout        PROTO((int, char **));
void          DrawConnect         PROTO((Layout *, Gobjects *));
void          DrawFrame           PROTO((Layout *));
void          DrawHistogram       PROTO((Layout *, Gobjects *));
void          DrawLabels          PROTO((Layout *));
int           DrawObjectN         PROTO((Layout *, Gobjects *));
int           DrawObjects         PROTO((Layout *));
void          DrawPoints          PROTO((Layout *, Gobjects *));
void          DrawXErrors         PROTO((Layout *, Gobjects *));
void          DrawYErrors         PROTO((Layout *, Gobjects *));
int           ErasePlot           PROTO(());
unsigned long GetColor            PROTO((Display *, char *, Colormap, unsigned long));
int           GetColormapSize     PROTO(());
char         *GetRGBString        PROTO((int N));
int           InButton            PROTO((XButtonEvent *, Button *));
int           InPicture           PROTO((XButtonEvent *, Picture *));
int           ListSection         PROTO(());
int           LoadBox             PROTO(());
void          LoadFont            PROTO((int *, char **, char *));
int           LoadLabels          PROTO(());
int           LoadObject          PROTO(());
int           LoadPtext           PROTO(());
int           LoadVectorData      PROTO((Layout *, int, char *));
void          MakeColormap        PROTO((int, char **));
void          MakeCursor          PROTO((unsigned int));
void          MapWindow           PROTO(());
void          NameWindow          PROTO((char *));
Display      *OpenDisplay         PROTO((char *, int *));
int           PNGit               PROTO(());
int           PPMit               PROTO(());
void          PSConnect           PROTO((Layout *, Gobjects *, FILE *));
int           PSFrame             PROTO((Layout *, FILE *));
void          PSHistogram         PROTO((Layout *, Gobjects *, FILE *));
void          PSLabels            PROTO((Layout *, FILE *));
int           PSObjects           PROTO((Layout *, FILE *));
void          PSPoints            PROTO((Layout *, Gobjects *, FILE *));
void          PSXErrors           PROTO((Layout *, Gobjects *, FILE *));
void          PSYErrors           PROTO((Layout *, Gobjects *, FILE *));
int           PSit                PROTO(());
void          PositionPicture     PROTO((Layout *));
void          QuitX               PROTO((Display *, char *, char *));
int           Reconfig            PROTO((XEvent *));
void          Refresh             PROTO((int));
void          Remap               PROTO((Layout *, Matrix  *));
int           Resize              PROTO(());
int           SetFont             PROTO(());
int           SetLimits           PROTO(());
void          SetNormalHints      PROTO(());
int           SetSection          PROTO((int SwitchSection));
void          SetUpDisplay        PROTO((int *, char **));
void          SetUpWindow         PROTO((int *, char **));
void          SetWMHints          PROTO((Icon *));
void          TopWindow           PROTO((Icon *));
int           cursor              PROTO(());
int           get_argument        PROTO((int, char **, char *));
void          hh_hms              PROTO((char *, double, double, char));
int           remove_argument     PROTO((int, int *, char **));

void MakeGC ();

int EventLoop ();
void CloseDisplay ();
int args (int *argc, char **argv);

void DrawPtext (Layout *layout);
void FlushDisplay ();
void AxisTickScale (Axis *axis, double *major, double *minor);
void DrawFrame (Layout *layout);
void DrawTick (int fx, int fy, int dfx, int dfy, int P, double min, double max, double value, int mode, int naxis);
void FreeObjectData (Gobjects *object);
void PSPtext (Layout *layout, FILE *f);
void PSTick (FILE *f, double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int mode, int naxis);

/* kapa bDraw Functions */
int bDrawObjects (Layout *layout);
void bDrawConnect (Layout *layout, Gobjects *object);
void bDrawClipLine (double x0, double y0, double x1, double y1, double X0, double Y1, double X1, double Y0);
void bDrawHistogram (Layout *layout, Gobjects *object);
void bDrawPoints (Layout *layout, Gobjects *object);
void bDrawXErrors (Layout *layout, Gobjects *object);
void bDrawYErrors (Layout *layout, Gobjects *object);

int bDrawFrame (Layout *layout);
void bDrawTick (double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int mode, int naxis);
void bDrawLabels (Layout *layout);
void bDrawPtext (Layout *layout);

bDrawBuffer *bDrawIt ();

/******************* XGRAPH **
void          StatusBox           PROTO((Graphic *, Layout *));
void          ResetColorbar       PROTO((Graphic *, Layout *, double, double));
void          Reorient            PROTO((Graphic *, Layout *, XButtonEvent *));
void          PaintOverlay        PROTO((Graphic *, Layout *, int));
void          MakeGC              PROTO((Graphic *));
void          InvertButton        PROTO((Graphic *, Button *));
void          FlashButton         PROTO((Graphic *, Button *));
void          DrawButton          PROTO((Graphic *, Button *));
void          DrawBitmap          PROTO((Graphic *, int, int, int, int, char *, int));
void          DragColorbar        PROTO((Graphic *, Layout *, XButtonEvent *));
void          CrossHairs          PROTO((Graphic *, Layout *));
void          CreateZoom          PROTO((Layout *, Graphic *, double, double));
void          CreatePicture       PROTO((Layout *, Graphic *));
int           rainbow             PROTO((Graphic *, Layout *));
int           puns                PROTO((Graphic *, Layout *));
int           greycolors          PROTO((Graphic *, Layout *));
int           UpdatePointer       PROTO((Graphic *, Layout *, XMotionEvent *));
int           ToggleDEG           PROTO((Graphic *, Layout *));
int           Stop                PROTO((Graphic *, Layout *));
int           SaveOverlay         PROTO((Graphic *, Layout *));
int           Rescale             PROTO((Graphic *, Layout *));
int           RecenterRescale     PROTO((Graphic *, Layout *));
int           Recenter            PROTO((Graphic *, Layout *));
int           Overlay3            PROTO((Graphic *, Layout *));
int           Overlay2            PROTO((Graphic *, Layout *));
int           Overlay1            PROTO((Graphic *, Layout *));
int           Overlay0            PROTO((Graphic *, Layout *));
int           NewPicture          PROTO((Graphic *, Layout *));
int           LoadOverlay         PROTO((Graphic *, Layout *));
int           InterpretPresses    PROTO((Graphic *, Layout *, XButtonEvent *));
int           InterpretKeys       PROTO((Graphic *, Layout *, XEvent *));
int           EventLoop           PROTO((Graphic *, Layout *));
int           EraseOverlay        PROTO((Graphic *, Layout *));
int           CSaveOverlay        PROTO((Graphic *, Layout *));
*/
