reindent-20030715
[openafs.git] / src / gtx / curseswindows.c
index 8b8d96e..a1d351b 100644 (file)
@@ -18,7 +18,8 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID("$Header$");
+RCSID
+    ("$Header$");
 
 
 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
@@ -26,7 +27,7 @@ RCSID("$Header$");
 #endif
 
 #ifndef        AFS_SUN5_ENV
-#include <curses.h>                        /*Curses library*/
+#include <curses.h>            /*Curses library */
 #endif
 #include <sys/types.h>
 #include <sys/file.h>
@@ -46,14 +47,14 @@ RCSID("$Header$");
 #endif
 #include <stdlib.h>
 
-#include "gtxcurseswin.h"              /*Interface definition*/
+#include "gtxcurseswin.h"      /*Interface definition */
 #include "gtxobjects.h"
 #include "gtxframe.h"
 
 
 
-int curses_debug;                          /*Is debugging turned on?*/
-static char mn[] = "gator_curseswindows";   /*Module name*/
+int curses_debug;              /*Is debugging turned on? */
+static char mn[] = "gator_curseswindows";      /*Module name */
 
 /*
  * Version of standard operations for a curses window.
@@ -106,13 +107,14 @@ struct gwinbaseops gator_curses_gwinbops = {
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_init(adebug)
-    int adebug;
+int
+gator_cursesgwin_init(adebug)
+     int adebug;
 
-{ /*gator_cursesgwin_init*/
+{                              /*gator_cursesgwin_init */
 
-    static char        rn[] = "gator_cursesgwin_init"; /*Routine name*/
-    struct gator_cursesgwin *c_data;           /*Ptr to curses-specific data*/
+    static char rn[] = "gator_cursesgwin_init";        /*Routine name */
+    struct gator_cursesgwin *c_data;   /*Ptr to curses-specific data */
 
     /*
      * Remember if we'll be doing debugging, then init the curses package.
@@ -127,33 +129,38 @@ int gator_cursesgwin_init(adebug)
      * Fill out the base window structure for curses.
      */
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Allocating %d bytes for curses window private space in base window\n", mn, rn, sizeof(struct gator_cursesgwin));
-    c_data = (struct gator_cursesgwin *) malloc(sizeof(struct gator_cursesgwin));
-    if (c_data == (struct gator_cursesgwin *)0){
-       fprintf(stderr, "[%s:%s] Can't allocate %d bytes for curses window private space in base window\n", mn, rn, sizeof(struct gator_cursesgwin));
-       return(-1);
+       fprintf(stderr,
+               "[%s:%s] Allocating %d bytes for curses window private space in base window\n",
+               mn, rn, sizeof(struct gator_cursesgwin));
+    c_data =
+       (struct gator_cursesgwin *)malloc(sizeof(struct gator_cursesgwin));
+    if (c_data == (struct gator_cursesgwin *)0) {
+       fprintf(stderr,
+               "[%s:%s] Can't allocate %d bytes for curses window private space in base window\n",
+               mn, rn, sizeof(struct gator_cursesgwin));
+       return (-1);
     }
 
     /*
      * Fill in the curses-specific base window info.  We assume that chars are 8x13.
      */
-    c_data->wp           = stdscr;
-    c_data->charwidth    = 8;
-    c_data->charheight   = 13;
-    c_data->box_vertchar  = '|';
+    c_data->wp = stdscr;
+    c_data->charwidth = 8;
+    c_data->charheight = 13;
+    c_data->box_vertchar = '|';
     c_data->box_horizchar = '-';
 
     /*
      * Fill in the generic base window info.
      */
-    gator_basegwin.w_type    = GATOR_WIN_CURSES;
-    gator_basegwin.w_x      = 0;
-    gator_basegwin.w_y      = 0;
-    gator_basegwin.w_width   = c_data->charwidth  * COLS;
-    gator_basegwin.w_height  = c_data->charheight * LINES;
+    gator_basegwin.w_type = GATOR_WIN_CURSES;
+    gator_basegwin.w_x = 0;
+    gator_basegwin.w_y = 0;
+    gator_basegwin.w_width = c_data->charwidth * COLS;
+    gator_basegwin.w_height = c_data->charheight * LINES;
     gator_basegwin.w_changed = 0;
-    gator_basegwin.w_op             = &curses_gwinops;
-    gator_basegwin.w_parent  = NULL;
+    gator_basegwin.w_op = &curses_gwinops;
+    gator_basegwin.w_parent = NULL;
 
     /*
      * Plug the private data into the generic part of the base window.
@@ -163,7 +170,7 @@ int gator_cursesgwin_init(adebug)
     /*
      * Now, set the terminal into the right mode for handling input
      */
-    raw();     /* curses raw mode */
+    raw();                     /* curses raw mode */
 
     /* init the frame */
     gator_basegwin.w_frame = gtxframe_Create();
@@ -172,9 +179,9 @@ int gator_cursesgwin_init(adebug)
      * Clear out the screen and return the good news.
      */
     wclear(((struct gator_cursesgwin *)(gator_basegwin.w_data))->wp);
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_init*/
+}                              /*gator_cursesgwin_init */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_create
@@ -196,60 +203,72 @@ int gator_cursesgwin_init(adebug)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-struct gwin *gator_cursesgwin_create(params)
-    struct gator_cursesgwin_params *params;
+struct gwin *
+gator_cursesgwin_create(params)
+     struct gator_cursesgwin_params *params;
 
-{ /*gator_cursesgwin_create*/
+{                              /*gator_cursesgwin_create */
 
-    static char        rn[] = "gator_cursesgwin_create";   /*Routine name*/
-    struct gwin        *newgwin;                           /*Ptr to new curses window*/
-    struct gator_cursesgwin *c_data;               /*Ptr to curses-specific data*/
-    WINDOW *newcursgwin;                           /*Ptr to new curses window*/
+    static char rn[] = "gator_cursesgwin_create";      /*Routine name */
+    struct gwin *newgwin;      /*Ptr to new curses window */
+    struct gator_cursesgwin *c_data;   /*Ptr to curses-specific data */
+    WINDOW *newcursgwin;       /*Ptr to new curses window */
 
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Allocating %d bytes for new gwin structure\n", mn, rn, sizeof(struct gwin));
-    newgwin = (struct gwin *) malloc(sizeof(struct gwin));
+       fprintf(stderr,
+               "[%s:%s] Allocating %d bytes for new gwin structure\n", mn,
+               rn, sizeof(struct gwin));
+    newgwin = (struct gwin *)malloc(sizeof(struct gwin));
     if (newgwin == NULL) {
-       fprintf(stderr, "[%s:%s] Can't malloc() %d bytes for new gwin structure: Errno is %d\n", mn, rn, sizeof(struct gwin), errno);
-       return(NULL);
+       fprintf(stderr,
+               "[%s:%s] Can't malloc() %d bytes for new gwin structure: Errno is %d\n",
+               mn, rn, sizeof(struct gwin), errno);
+       return (NULL);
     }
 
-    newgwin->w_type    = GATOR_WIN_CURSES;
-    newgwin->w_x       = params->gwin_params.cr_x;
-    newgwin->w_y       = params->gwin_params.cr_y;
-    newgwin->w_width   = params->gwin_params.cr_width;
-    newgwin->w_height  = params->gwin_params.cr_height;
-    newgwin->w_changed = 1;
-    newgwin->w_op      = &curses_gwinops;
-    newgwin->w_parent  = params->gwin_params.cr_parentwin;
+    newgwin->w_type = GATOR_WIN_CURSES;
+    newgwin->w_x = params->gwin_params.cr_x;
+    newgwin->w_y = params->gwin_params.cr_y;
+    newgwin->w_width = params->gwin_params.cr_width;
+    newgwin->w_height = params->gwin_params.cr_height;
+    newgwin->w_changed = 1;
+    newgwin->w_op = &curses_gwinops;
+    newgwin->w_parent = params->gwin_params.cr_parentwin;
 
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Allocating %d bytes for curses window private space\n", mn, rn, sizeof(struct gator_cursesgwin));
-    c_data = (struct gator_cursesgwin *) malloc(sizeof(struct gator_cursesgwin));
-    if (c_data == (struct gator_cursesgwin *)0){
-       fprintf(stderr, "[%s:%s] Can't allocate %d bytes for curses window private space\n", mn, rn, sizeof(struct gator_cursesgwin));
+       fprintf(stderr,
+               "[%s:%s] Allocating %d bytes for curses window private space\n",
+               mn, rn, sizeof(struct gator_cursesgwin));
+    c_data =
+       (struct gator_cursesgwin *)malloc(sizeof(struct gator_cursesgwin));
+    if (c_data == (struct gator_cursesgwin *)0) {
+       fprintf(stderr,
+               "[%s:%s] Can't allocate %d bytes for curses window private space\n",
+               mn, rn, sizeof(struct gator_cursesgwin));
        free(newgwin);
-       return(NULL);
+       return (NULL);
     }
 
-    newcursgwin        = newwin(newgwin->w_height,     /*Number of lines*/
-                         newgwin->w_width,     /*Number of columns*/
-                         newgwin->w_y,         /*Beginning y value*/
-                         newgwin->w_x);        /*Beginning x value*/
-    if (newcursgwin == (WINDOW *)0) {
-       fprintf(stderr, "[%s:%s] Failed to create curses window via newwin()\n", mn, rn);
+    newcursgwin = newwin(newgwin->w_height,    /*Number of lines */
+                        newgwin->w_width,      /*Number of columns */
+                        newgwin->w_y,  /*Beginning y value */
+                        newgwin->w_x); /*Beginning x value */
+    if (newcursgwin == (WINDOW *) 0) {
+       fprintf(stderr,
+               "[%s:%s] Failed to create curses window via newwin()\n", mn,
+               rn);
        free(newgwin);
        free(c_data);
-       return(NULL);
+       return (NULL);
     }
 
     /*
      * Now, fill in the curses-specific window info.
      */
-    c_data->wp           = newcursgwin;
-    c_data->charwidth    = params->charwidth;
-    c_data->charheight   = params->charheight;
-    c_data->box_vertchar  = params->box_vertchar;
+    c_data->wp = newcursgwin;
+    c_data->charwidth = params->charwidth;
+    c_data->charheight = params->charheight;
+    c_data->box_vertchar = params->box_vertchar;
     c_data->box_horizchar = params->box_horizchar;
 
     /*
@@ -261,10 +280,10 @@ struct gwin *gator_cursesgwin_create(params)
      * Plug the curses private data into the generic window object, then
      * return the new window's info.
      */
-    newgwin->w_data = (int *) c_data;
-    return(newgwin);
+    newgwin->w_data = (int *)c_data;
+    return (newgwin);
 
-} /*gator_cursesgwin_create*/
+}                              /*gator_cursesgwin_create */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_cleanup
@@ -286,13 +305,14 @@ struct gwin *gator_cursesgwin_create(params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_cleanup(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_cleanup(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_cleanup*/
+{                              /*gator_cursesgwin_cleanup */
 
-    static char        rn[] = "gator_cursesgwin_cleanup";  /*Routine name*/
-    struct gator_cursesgwin *cwp;                  /*Curses private area ptr*/
+    static char rn[] = "gator_cursesgwin_cleanup";     /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Curses private area ptr */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
 
@@ -301,7 +321,8 @@ int gator_cursesgwin_cleanup(gwp)
      * want to clear the screen before we go.
      */
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn, rn, cwp->wp);
+       fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn,
+               rn, cwp->wp);
     wclear(cwp->wp);
     wrefresh(cwp->wp);
 
@@ -314,9 +335,9 @@ int gator_cursesgwin_cleanup(gwp)
        fprintf(stderr, "[%s:%s] Calling endwin()\n", mn, rn);
     endwin();
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_cleanup*/
+}                              /*gator_cursesgwin_cleanup */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_box
@@ -339,22 +360,24 @@ int gator_cursesgwin_cleanup(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_box(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_box(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_box*/
+{                              /*gator_cursesgwin_box */
 
-    static char        rn[] = "gator_cursesgwin_box";  /*Routine name*/
-    struct gator_cursesgwin *cwp;              /*Ptr to curses private area*/
+    static char rn[] = "gator_cursesgwin_box"; /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Ptr to curses private area */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Calling box() on window at 0x%x\n", mn, rn, cwp->wp);
+       fprintf(stderr, "[%s:%s] Calling box() on window at 0x%x\n", mn, rn,
+               cwp->wp);
     box(cwp->wp, cwp->box_vertchar, cwp->box_horizchar);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_box*/
+}                              /*gator_cursesgwin_box */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_clear
@@ -376,25 +399,27 @@ int gator_cursesgwin_box(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_clear(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_clear(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_clear*/
+{                              /*gator_cursesgwin_clear */
 
-    static char        rn[] = "gator_cursesgwin_clear";    /*Routine name*/
-    struct gator_cursesgwin *cwp;                  /*Ptr to curses private area*/
+    static char rn[] = "gator_cursesgwin_clear";       /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Ptr to curses private area */
 
     /*
      * Clearing windows is very easy in curses; just one call will do it.
      */
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn, rn, cwp->wp);
+       fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn,
+               rn, cwp->wp);
     wclear(cwp->wp);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_clear*/
+}                              /*gator_cursesgwin_clear */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_destroy
@@ -416,22 +441,24 @@ int gator_cursesgwin_clear(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_destroy(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_destroy(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_destroy*/
+{                              /*gator_cursesgwin_destroy */
 
-    static char        rn[] = "gator_cursesgwin_destroy";  /*Routine name*/
-    struct gator_cursesgwin *cwp;                  /*Ptr to curses private area*/
+    static char rn[] = "gator_cursesgwin_destroy";     /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Ptr to curses private area */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Calling delwin() on window at 0x%x\n", mn, rn, cwp->wp);
+       fprintf(stderr, "[%s:%s] Calling delwin() on window at 0x%x\n", mn,
+               rn, cwp->wp);
     delwin(cwp->wp);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_destroy*/
+}                              /*gator_cursesgwin_destroy */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_display
@@ -453,21 +480,22 @@ int gator_cursesgwin_destroy(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_display(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_display(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_display*/
+{                              /*gator_cursesgwin_display */
 
-    struct gator_cursesgwin *cwp;      /*Curses private area ptr*/
+    struct gator_cursesgwin *cwp;      /*Curses private area ptr */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
 
-    wclear(cwp->wp);   /* clear screen */
+    wclear(cwp->wp);           /* clear screen */
     gtxframe_Display(gwp->w_frame, gwp);       /* display the frame */
-    wrefresh(cwp->wp); /* redraw the guy */
-    return(0);
+    wrefresh(cwp->wp);         /* redraw the guy */
+    return (0);
 
-} /*gator_cursesgwin_display*/
+}                              /*gator_cursesgwin_display */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_drawline
@@ -492,20 +520,22 @@ int gator_cursesgwin_display(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_drawline(gwp, params)
-    struct gwin *gwp;
-    struct gwin_lineparams *params;
+int
+gator_cursesgwin_drawline(gwp, params)
+     struct gwin *gwp;
+     struct gwin_lineparams *params;
 
-{ /*gator_cursesgwin_drawline*/
+{                              /*gator_cursesgwin_drawline */
 
-    static char        rn[] = "gator_cursesgwin_drawline"; /*Routine name*/
+    static char rn[] = "gator_cursesgwin_drawline";    /*Routine name */
 
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn, rn);
+       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
+               rn);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_drawline*/
+}                              /*gator_cursesgwin_drawline */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_drawrectangle
@@ -529,20 +559,22 @@ int gator_cursesgwin_drawline(gwp, params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_drawrectangle(gwp, params)
-    struct gwin *gwp;
-    struct gwin_rectparams *params;
+int
+gator_cursesgwin_drawrectangle(gwp, params)
+     struct gwin *gwp;
+     struct gwin_rectparams *params;
 
-{ /*gator_cursesgwin_drawrectangle*/
+{                              /*gator_cursesgwin_drawrectangle */
 
-    static char        rn[] = "gator_cursesgwin_drawrectangle";    /*Routine name*/
+    static char rn[] = "gator_cursesgwin_drawrectangle";       /*Routine name */
 
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn, rn);
+       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
+               rn);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_drawrectangle*/
+}                              /*gator_cursesgwin_drawrectangle */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_drawchar
@@ -566,21 +598,25 @@ int gator_cursesgwin_drawrectangle(gwp, params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_drawchar(gwp, params)
-    struct gwin *gwp;
-    struct gwin_charparams *params;
+int
+gator_cursesgwin_drawchar(gwp, params)
+     struct gwin *gwp;
+     struct gwin_charparams *params;
 
-{ /*gator_cursesgwin_drawchar*/
+{                              /*gator_cursesgwin_drawchar */
 
-    static char        rn[] = "gator_cursesgwin_drawchar"; /*Routine name*/
-    struct gator_cursesgwin *cwp;                  /*Ptr to curses private area*/
-    int        curses_x, curses_y;                         /*Mapped x,y positions*/
+    static char rn[] = "gator_cursesgwin_drawchar";    /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Ptr to curses private area */
+    int curses_x, curses_y;    /*Mapped x,y positions */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
     curses_x = GATOR_MAP_X_TO_COL(cwp, params->x);
     curses_y = GATOR_MAP_Y_TO_LINE(cwp, params->y);
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Drawing char '%c' on window at 0x%x at (%d, %d) [line %d, column %d]%s\n", mn, rn, params->c, cwp->wp, params->x, params->y, curses_y, curses_x, (params->highlight ? ", using standout mode" : ""));
+       fprintf(stderr,
+               "[%s:%s] Drawing char '%c' on window at 0x%x at (%d, %d) [line %d, column %d]%s\n",
+               mn, rn, params->c, cwp->wp, params->x, params->y, curses_y,
+               curses_x, (params->highlight ? ", using standout mode" : ""));
     wmove(cwp->wp, curses_y, curses_x);
     if (params->highlight)
        wstandout(cwp->wp);
@@ -588,9 +624,9 @@ int gator_cursesgwin_drawchar(gwp, params)
     if (params->highlight)
        wstandend(cwp->wp);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_drawchar*/
+}                              /*gator_cursesgwin_drawchar */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_drawstring
@@ -614,21 +650,25 @@ int gator_cursesgwin_drawchar(gwp, params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_drawstring(gwp, params)
-    struct gwin *gwp;
-    struct gwin_strparams *params;
+int
+gator_cursesgwin_drawstring(gwp, params)
+     struct gwin *gwp;
+     struct gwin_strparams *params;
 
-{ /*gator_cursesgwin_drawstring*/
+{                              /*gator_cursesgwin_drawstring */
 
-    static char        rn[] = "gator_cursesgwin_drawstring";   /*Routine name*/
-    struct gator_cursesgwin *cwp;                      /*Ptr to curses private area*/
-    int        curses_x, curses_y;                             /*Mapped x,y positions*/
+    static char rn[] = "gator_cursesgwin_drawstring";  /*Routine name */
+    struct gator_cursesgwin *cwp;      /*Ptr to curses private area */
+    int curses_x, curses_y;    /*Mapped x,y positions */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
     curses_x = GATOR_MAP_X_TO_COL(cwp, params->x);
     curses_y = GATOR_MAP_Y_TO_LINE(cwp, params->y);
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] Drawing string '%s' on window at 0x%x at (%d, %d) [line %d, column %d]%s\n", mn, rn, params->s, cwp->wp, params->x, params->y, curses_y, curses_x, (params->highlight ? ", using standout mode" : ""));
+       fprintf(stderr,
+               "[%s:%s] Drawing string '%s' on window at 0x%x at (%d, %d) [line %d, column %d]%s\n",
+               mn, rn, params->s, cwp->wp, params->x, params->y, curses_y,
+               curses_x, (params->highlight ? ", using standout mode" : ""));
     wmove(cwp->wp, curses_y, curses_x);
     if (params->highlight)
        wstandout(cwp->wp);
@@ -636,9 +676,9 @@ int gator_cursesgwin_drawstring(gwp, params)
     if (params->highlight)
        wstandend(cwp->wp);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_drawstring*/
+}                              /*gator_cursesgwin_drawstring */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_invert
@@ -662,20 +702,22 @@ int gator_cursesgwin_drawstring(gwp, params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_invert(gwp, params)
-    struct gwin *gwp;
-    struct gwin_invparams *params;
+int
+gator_cursesgwin_invert(gwp, params)
+     struct gwin *gwp;
+     struct gwin_invparams *params;
 
-{ /*gator_cursesgwin_invert*/
+{                              /*gator_cursesgwin_invert */
 
-    static char        rn[] = "gator_cursesgwin_invert";   /*Routine name*/
+    static char rn[] = "gator_cursesgwin_invert";      /*Routine name */
 
     if (curses_debug)
-       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn, rn);
+       fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
+               rn);
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_invert*/
+}                              /*gator_cursesgwin_invert */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_getchar
@@ -697,14 +739,15 @@ int gator_cursesgwin_invert(gwp, params)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_getchar(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_getchar(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_getchar*/
+{                              /*gator_cursesgwin_getchar */
 
-    return(getc(stdin));
+    return (getc(stdin));
 
-} /*gator_cursesgwin_getchar*/
+}                              /*gator_cursesgwin_getchar */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_wait
@@ -726,16 +769,17 @@ int gator_cursesgwin_getchar(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_wait(gwp)
-    struct gwin *gwp;
+int
+gator_cursesgwin_wait(gwp)
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_wait*/
+{                              /*gator_cursesgwin_wait */
 
     while (!LWP_WaitForKeystroke(-1));
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_wait*/
+}                              /*gator_cursesgwin_wait */
 
 /*------------------------------------------------------------------------
  * gator_cursesgwin_getdimensions
@@ -758,13 +802,14 @@ int gator_cursesgwin_wait(gwp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-int gator_cursesgwin_getdimensions(gwp, aparms)
-    struct gwin_sizeparams *aparms;
-    struct gwin *gwp;
+int
+gator_cursesgwin_getdimensions(gwp, aparms)
+     struct gwin_sizeparams *aparms;
+     struct gwin *gwp;
 
-{ /*gator_cursesgwin_getdimensions*/
+{                              /*gator_cursesgwin_getdimensions */
 
-    struct gator_cursesgwin *cwp;      /*Curses-specific data*/
+    struct gator_cursesgwin *cwp;      /*Curses-specific data */
 
     cwp = (struct gator_cursesgwin *)(gwp->w_data);
 #if defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN60_ENV)
@@ -778,6 +823,6 @@ int gator_cursesgwin_getdimensions(gwp, aparms)
     aparms->maxy = cwp->wp->_maxy;
 #endif
 
-    return(0);
+    return (0);
 
-} /*gator_cursesgwin_getdimensions*/
+}                              /*gator_cursesgwin_getdimensions */