*------------------------------------------------------------------------*/
int
-gator_X11gwin_init(adebug)
- int adebug;
-
+gator_X11gwin_init(int adebug)
{ /*gator_X11gwin_init */
static char rn[] = "gator_X11gwin_init"; /*Routine name */
*------------------------------------------------------------------------*/
struct gwin *
-gator_X11gwin_create(params)
- struct gator_X11gwin_params *params;
-
+gator_X11gwin_create(struct gator_X11gwin_params *params)
{ /*gator_X11gwin_create */
static char rn[] = "gator_X11gwin_create"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_cleanup(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_cleanup(struct gwin *gwp)
{ /*gator_X11gwin_cleanup */
static char rn[] = "gator_X11gwin_cleanup"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_box(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_box(struct gwin *gwp)
{ /*gator_X11gwin_box */
static char rn[] = "gator_X11gwin_box"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_clear(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_clear(struct gwin *gwp)
{ /*gator_X11gwin_clear */
static char rn[] = "gator_X11gwin_clear"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_destroy(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_destroy(struct gwin *gwp)
{ /*gator_X11gwin_destroy */
static char rn[] = "gator_X11gwin_destroy"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_display(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_display(struct gwin *gwp)
{ /*gator_X11gwin_display */
static char rn[] = "gator_X11gwin_display"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_drawline(gwp, params)
- struct gwin *gwp;
- struct gwin_lineparams *params;
-
+gator_X11gwin_drawline(struct gwin *gwp, struct gwin_lineparams *params)
{ /*gator_X11gwin_drawline */
static char rn[] = "gator_X11gwin_drawline"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_drawrectangle(gwp, params)
- struct gwin *gwp;
- struct gwin_rectparams *params;
-
+gator_X11gwin_drawrectangle(struct gwin *gwp, struct gwin_rectparams *params)
{ /*gator_X11gwin_drawrectangle */
static char rn[] = "gator_X11gwin_drawrectangle"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_drawchar(gwp, params)
- struct gwin *gwp;
- struct gwin_charparams *params;
-
+gator_X11gwin_drawchar(struct gwin *gwp, struct gwin_charparams *params)
{ /*gator_X11gwin_drawchar */
static char rn[] = "gator_X11gwin_drawchar"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_drawstring(gwp, params)
- struct gwin *gwp;
- struct gwin_strparams *params;
-
+gator_X11gwin_drawstring(struct gwin *gwp, struct gwin_strparams *params)
{ /*gator_X11gwin_drawstring */
static char rn[] = "gator_X11gwin_drawstring"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_invert(gwp, params)
- struct gwin *gwp;
- struct gwin_invparams *params;
-
+gator_X11gwin_invert(struct gwin *gwp, struct gwin_invparams *params)
{ /*gator_X11gwin_invert */
static char rn[] = "gator_X11gwin_invert"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_getchar(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_getchar(struct gwin *gwp)
{ /*gator_X11gwin_getchar */
static char rn[] = "gator_X11gwin_getchar"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_getdimensions(gwp, aparms)
- struct gwin *gwp;
- struct gwin_sizeparams *aparms;
-
+gator_X11gwin_getdimensions(struct gwin *gwp, struct gwin_sizeparams *aparms)
{ /*gator_X11gwin_getdimensions */
static char rn[] = "gator_X11gwin_getdimensions"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_X11gwin_wait(gwp)
- struct gwin *gwp;
-
+gator_X11gwin_wait(struct gwin *gwp)
{ /*gator_X11gwin_wait */
static char rn[] = "gator_X11gwin_wait"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_init(adebug)
- int adebug;
-
+gator_cursesgwin_init(int adebug)
{ /*gator_cursesgwin_init */
static char rn[] = "gator_cursesgwin_init"; /*Routine name */
*/
if (curses_debug)
fprintf(stderr,
- "[%s:%s] Allocating %d bytes for curses window private space in base window\n",
+ "[%s:%s] Allocating %lu 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",
+ "[%s:%s] Can't allocate %lu bytes for curses window private space in base window\n",
mn, rn, sizeof(struct gator_cursesgwin));
return (-1);
}
*------------------------------------------------------------------------*/
struct gwin *
-gator_cursesgwin_create(params)
- struct gator_cursesgwin_params *params;
-
+gator_cursesgwin_create(struct gator_cursesgwin_params *params)
{ /*gator_cursesgwin_create */
static char rn[] = "gator_cursesgwin_create"; /*Routine name */
if (curses_debug)
fprintf(stderr,
- "[%s:%s] Allocating %d bytes for new gwin structure\n", mn,
+ "[%s:%s] Allocating %lu 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",
+ "[%s:%s] Can't malloc() %lu bytes for new gwin structure: Errno is %d\n",
mn, rn, sizeof(struct gwin), errno);
return (NULL);
}
if (curses_debug)
fprintf(stderr,
- "[%s:%s] Allocating %d bytes for curses window private space\n",
+ "[%s:%s] Allocating %lu 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",
+ "[%s:%s] Can't allocate %lu bytes for curses window private space\n",
mn, rn, sizeof(struct gator_cursesgwin));
free(newgwin);
return (NULL);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_cleanup(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_cleanup(struct gwin *gwp)
{ /*gator_cursesgwin_cleanup */
static char rn[] = "gator_cursesgwin_cleanup"; /*Routine name */
* want to clear the screen before we go.
*/
if (curses_debug)
- fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn,
+ fprintf(stderr, "[%s:%s] Calling wclear() on window at %p\n", mn,
rn, cwp->wp);
wclear(cwp->wp);
wrefresh(cwp->wp);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_box(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_box(struct gwin *gwp)
{ /*gator_cursesgwin_box */
static char rn[] = "gator_cursesgwin_box"; /*Routine name */
cwp = (struct gator_cursesgwin *)(gwp->w_data);
if (curses_debug)
- fprintf(stderr, "[%s:%s] Calling box() on window at 0x%x\n", mn, rn,
+ fprintf(stderr, "[%s:%s] Calling box() on window at %p\n", mn, rn,
cwp->wp);
box(cwp->wp, cwp->box_vertchar, cwp->box_horizchar);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_clear(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_clear(struct gwin *gwp)
{ /*gator_cursesgwin_clear */
static char rn[] = "gator_cursesgwin_clear"; /*Routine name */
*/
cwp = (struct gator_cursesgwin *)(gwp->w_data);
if (curses_debug)
- fprintf(stderr, "[%s:%s] Calling wclear() on window at 0x%x\n", mn,
+ fprintf(stderr, "[%s:%s] Calling wclear() on window at %p\n", mn,
rn, cwp->wp);
wclear(cwp->wp);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_destroy(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_destroy(struct gwin *gwp)
{ /*gator_cursesgwin_destroy */
static char rn[] = "gator_cursesgwin_destroy"; /*Routine name */
cwp = (struct gator_cursesgwin *)(gwp->w_data);
if (curses_debug)
- fprintf(stderr, "[%s:%s] Calling delwin() on window at 0x%x\n", mn,
+ fprintf(stderr, "[%s:%s] Calling delwin() on window at %p\n", mn,
rn, cwp->wp);
delwin(cwp->wp);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_display(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_display(struct gwin *gwp)
{ /*gator_cursesgwin_display */
struct gator_cursesgwin *cwp; /*Curses private area ptr */
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_drawline(gwp, params)
- struct gwin *gwp;
- struct gwin_lineparams *params;
-
+gator_cursesgwin_drawline(struct gwin *gwp, struct gwin_lineparams *params)
{ /*gator_cursesgwin_drawline */
static char rn[] = "gator_cursesgwin_drawline"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_drawrectangle(gwp, params)
- struct gwin *gwp;
- struct gwin_rectparams *params;
-
+gator_cursesgwin_drawrectangle(struct gwin *gwp, struct gwin_rectparams *params)
{ /*gator_cursesgwin_drawrectangle */
static char rn[] = "gator_cursesgwin_drawrectangle"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_drawchar(gwp, params)
- struct gwin *gwp;
- struct gwin_charparams *params;
-
+gator_cursesgwin_drawchar(struct gwin *gwp, struct gwin_charparams *params)
{ /*gator_cursesgwin_drawchar */
static char rn[] = "gator_cursesgwin_drawchar"; /*Routine name */
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",
+ "[%s:%s] Drawing char '%c' on window at %p 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);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_drawstring(gwp, params)
- struct gwin *gwp;
- struct gwin_strparams *params;
-
+gator_cursesgwin_drawstring(struct gwin *gwp, struct gwin_strparams *params)
{ /*gator_cursesgwin_drawstring */
static char rn[] = "gator_cursesgwin_drawstring"; /*Routine name */
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",
+ "[%s:%s] Drawing string '%s' on window at %p 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);
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_invert(gwp, params)
- struct gwin *gwp;
- struct gwin_invparams *params;
-
+gator_cursesgwin_invert(struct gwin *gwp, struct gwin_invparams *params)
{ /*gator_cursesgwin_invert */
static char rn[] = "gator_cursesgwin_invert"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_getchar(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_getchar(struct gwin *gwp)
{ /*gator_cursesgwin_getchar */
return (getc(stdin));
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_wait(gwp)
- struct gwin *gwp;
-
+gator_cursesgwin_wait(struct gwin *gwp)
{ /*gator_cursesgwin_wait */
while (!LWP_WaitForKeystroke(-1));
*------------------------------------------------------------------------*/
int
-gator_cursesgwin_getdimensions(gwp, aparms)
- struct gwin_sizeparams *aparms;
- struct gwin *gwp;
-
+gator_cursesgwin_getdimensions(struct gwin *gwp, struct gwin_sizeparams *aparms)
{ /*gator_cursesgwin_getdimensions */
struct gator_cursesgwin *cwp; /*Curses-specific data */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_init(adebug)
- int adebug;
-
+gator_dumbgwin_init(int adebug)
{ /*gator_dumbgwin_init */
static char rn[] = "gator_dumbgwin_init"; /*Routine name */
*------------------------------------------------------------------------*/
struct gwin *
-gator_dumbgwin_create(params)
- struct gator_dumbgwin_params *params;
-
+gator_dumbgwin_create(struct gator_dumbgwin_params *params)
{ /*gator_dumbgwin_create */
static char rn[] = "gator_dumbgwin_create"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_cleanup(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_cleanup(struct gwin *gwp)
{ /*gator_dumbgwin_cleanup */
static char rn[] = "gator_dumbgwin_cleanup"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_box(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_box(struct gwin *gwp)
{ /*gator_dumbgwin_box */
static char rn[] = "gator_dumbgwin_box"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_clear(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_clear(struct gwin *gwp)
{ /*gator_dumbgwin_clear */
static char rn[] = "gator_dumbgwin_clear"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_destroy(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_destroy(struct gwin *gwp)
{ /*gator_dumbgwin_destroy */
static char rn[] = "gator_dumbgwin_destroy"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_display(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_display(struct gwin *gwp)
{ /*gator_dumbgwin_display */
static char rn[] = "gator_dumbgwin_display"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_drawline(gwp, params)
- struct gwin *gwp;
- struct gwin_lineparams *params;
-
+gator_dumbgwin_drawline(struct gwin *gwp, struct gwin_lineparams *params)
{ /*gator_dumbgwin_drawline */
static char rn[] = "gator_dumbgwin_drawline"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_drawrectangle(gwp, params)
- struct gwin *gwp;
- struct gwin_rectparams *params;
-
+gator_dumbgwin_drawrectangle(struct gwin *gwp, struct gwin_rectparams *params)
{ /*gator_dumbgwin_drawrectangle */
static char rn[] = "gator_dumbgwin_drawrectangle"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_drawchar(gwp, params)
- struct gwin *gwp;
- struct gwin_charparams *params;
-
+gator_dumbgwin_drawchar(struct gwin *gwp, struct gwin_charparams *params)
{ /*gator_dumbgwin_drawchar */
static char rn[] = "gator_dumbgwin_drawchar"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_drawstring(gwp, params)
- struct gwin *gwp;
- struct gwin_strparams *params;
-
+gator_dumbgwin_drawstring(struct gwin *gwp, struct gwin_strparams *params)
{ /*gator_dumbgwin_drawstring */
static char rn[] = "gator_dumbgwin_drawstring"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_invert(gwp, params)
- struct gwin *gwp;
- struct gwin_invparams *params;
-
+gator_dumbgwin_invert(struct gwin *gwp, struct gwin_invparams *params)
{ /*gator_dumbgwin_invert */
static char rn[] = "gator_dumbgwin_invert"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_getchar(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_getchar(struct gwin *gwp)
{ /*gator_dumbgwin_getchar */
static char rn[] = "gator_dumbgwin_getchar"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_getdimensions(gwp, aparms)
- struct gwin *gwp;
- struct gwin_sizeparams *aparms;
-
+gator_dumbgwin_getdimensions(struct gwin *gwp, struct gwin_sizeparams *aparms)
{ /*gator_dumbgwin_getdimensions */
static char rn[] = "gator_dumbgwin_getdimensions"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_dumbgwin_wait(gwp)
- struct gwin *gwp;
-
+gator_dumbgwin_wait(struct gwin *gwp)
{ /*gator_dumbgwin_wait */
static char rn[] = "gator_dumbgwin_wait"; /*Routine name */
#include <afsconfig.h>
#include <afs/param.h>
-
+#include <afs/stds.h>
RCSID
("$Header$");
#include "gtxkeymap.h"
#include "gtxframe.h"
-extern char *gtx_CopyString();
static struct keymap_map *recursiveMap = 0;
static char menubuffer[1024]; /*Buffer for menu selections */
int gtxframe_exitValue = 0; /*Program exit value */
-gtxframe_CtrlUCmd(awindow, arock)
- char *arock;
- struct gwin *awindow;
+int
+gtxframe_CtrlUCmd(void *aparam, void *arock)
{
+ struct gwin *awindow = (struct gwin *) aparam;
struct gtx_frame *tframe;
tframe = awindow->w_frame;
return 0;
}
-gtxframe_CtrlHCmd(awindow, arock)
- char *arock;
- struct gwin *awindow;
+int
+gtxframe_CtrlHCmd(void *aparam, void *arock)
{
+ struct gwin *awindow = (struct gwin *) aparam;
+
register struct gtx_frame *tframe;
register char *tp;
register int pos;
return 0;
}
-gtxframe_RecursiveEndCmd(awindow, arock)
- char *arock;
- register struct gwin *awindow;
+int
+gtxframe_RecursiveEndCmd(void *aparam, void *arock)
{
+ struct gwin *awindow = (struct gwin *) aparam;
+
register struct gtx_frame *tframe;
tframe = awindow->w_frame;
return 0;
}
-gtxframe_RecursiveErrCmd(awindow, arock)
- char *arock;
- register struct gwin *awindow;
+int
+gtxframe_RecursiveErrCmd(void *aparam, void *arock)
{
+ struct gwin *awindow = (struct gwin *) aparam;
+
register struct gtx_frame *tframe;
tframe = awindow->w_frame;
return 0;
}
-gtxframe_SelfInsertCmd(awindow, arock)
- int arock;
- struct gwin *awindow;
+int
+gtxframe_SelfInsertCmd(void *aparam, void *rockparam)
{
+ struct gwin *awindow = (struct gwin *) aparam;
+
+ int arock = (int) rockparam;
+
register struct gtx_frame *tframe;
register int pos;
register char *tp;
}
/* save map, setup recursive map and install it */
-static
-SaveMap(aframe)
- register struct gtx_frame *aframe;
+static int
+SaveMap(struct gtx_frame *aframe)
{
char tstring[2];
register int i;
tstring[0] = i;
tstring[1] = 0;
keymap_BindToString(recursiveMap, tstring, gtxframe_SelfInsertCmd,
- NULL, i);
+ NULL, (void *)i);
}
}
aframe->savemap = aframe->keymap;
}
/* Restore map to previous value */
-static
-RestoreMap(aframe)
- register struct gtx_frame *aframe;
+static int
+RestoreMap(struct gtx_frame *aframe)
{
aframe->keymap = aframe->savemap;
aframe->savemap = (struct keymap_map *)0;
return 0;
}
-gtxframe_SetFrame(awin, aframe)
- struct gtx_frame *aframe;
- struct gwin *awin;
+int
+gtxframe_SetFrame(struct gwin *awin, struct gtx_frame *aframe)
{
if (awin->w_frame) {
/* Unthread this frame */
}
struct gtx_frame *
-gtxframe_GetFrame(awin)
- struct gwin *awin;
+gtxframe_GetFrame(struct gwin *awin)
{
return awin->w_frame;
}
/* Add a menu string to display list */
-gtxframe_AddMenu(aframe, alabel, astring)
- char *alabel;
- char *astring;
- struct gtx_frame *aframe;
+int
+gtxframe_AddMenu(struct gtx_frame *aframe, char *alabel, char *astring)
{
register struct gtxframe_menu *tmenu;
}
/* Delete a given menu from a frame*/
-gtxframe_DeleteMenu(aframe, alabel)
- struct gtx_frame *aframe;
- char *alabel;
+int
+gtxframe_DeleteMenu(struct gtx_frame *aframe, char *alabel)
{
register struct gtxframe_menu *tm, **lm;
}
/* Function to remove all known menus */
-gtxframe_ClearMenus(aframe)
- struct gtx_frame *aframe;
+int
+gtxframe_ClearMenus(struct gtx_frame *aframe)
{
register struct gtxframe_menu *tm, *nm;
return 0;
}
-gtxframe_AskForString(aframe, aprompt, adefault, aresult, aresultSize)
- register struct gtx_frame *aframe;
- char *aprompt;
- char *adefault;
- char *aresult;
- int aresultSize;
+int
+gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
+ char *adefault, char *aresult, int aresultSize)
{
register int code;
register char *tp;
return (code);
}
-gtxframe_DisplayString(aframe, amsgLine)
- char *amsgLine;
- register struct gtx_frame *aframe;
+int
+gtxframe_DisplayString(struct gtx_frame *aframe, char *amsgLine)
{
if (aframe->messageLine)
free(aframe->messageLine);
}
/* Called by input processor to try to clear the dude */
-gtxframe_ClearMessageLine(aframe)
- struct gtx_frame *aframe;
+int
+gtxframe_ClearMessageLine(struct gtx_frame *aframe)
{
/* If we haven't shown message long enough yet, just return */
if (aframe->flags & GTXFRAME_NEWDISPLAY)
return (0);
}
-static
-ShowMessageLine(aframe)
- struct gtx_frame *aframe;
+static int
+ShowMessageLine(struct gtx_frame *aframe)
{
struct gwin_strparams strparms;
struct gwin_sizeparams sizeparms;
/* Exit function, returning whatever has been put in its argument */
int
-gtxframe_ExitCmd(a_exitValuep)
- char *a_exitValuep;
-
+gtxframe_ExitCmd(void *a_exitValuep, void *arock)
{ /*gtxframe_ExitCmd */
int exitval; /*Value we've been asked to exit with */
} /*gtxframe_ExitCmd */
struct gtx_frame *
-gtxframe_Create()
+gtxframe_Create(void)
{
struct gtx_frame *tframe;
struct keymap_map *newkeymap;
return (tframe);
}
-gtxframe_Delete(aframe)
- register struct gtx_frame *aframe;
+int
+gtxframe_Delete(struct gtx_frame *aframe)
{
keymap_Delete(aframe->keymap);
free(aframe->keystate);
return 0;
}
-gtxframe_Display(aframe, awm)
- struct gwin *awm;
- register struct gtx_frame *aframe;
+int
+gtxframe_Display(struct gtx_frame *aframe, struct gwin *awm)
{
register struct gtxframe_dlist *tlist;
register struct gtxframe_menu *tm;
}
/* Add an object to a window's display list */
-gtxframe_AddToList(aframe, aobj)
- struct onode *aobj;
- register struct gtx_frame *aframe;
+int
+gtxframe_AddToList(struct gtx_frame *aframe, struct onode *aobj)
{
register struct gtxframe_dlist *tlist;
}
/* Remove an object from a display list, if it is already there */
-gtxframe_RemoveFromList(aframe, aobj)
- struct onode *aobj;
- register struct gtx_frame *aframe;
+int
+gtxframe_RemoveFromList(struct gtx_frame *aframe, struct onode *aobj)
{
register struct gtxframe_dlist *tlist, **plist;
}
/* Clear out everything on the display list for the given frame*/
-gtxframe_ClearList(aframe)
- register struct gtx_frame *aframe;
+int
+gtxframe_ClearList(struct gtx_frame *aframe)
{
register struct gtxframe_dlist *tlist, *nlist;
/*X11 initialization routine*/
-extern int gator_X11gwin_init();
+extern int gator_X11gwin_init(int);
/*
* Summary:
* Initialize the X11 window package.
/*X11 window's creation routine*/
-extern struct gwin *gator_X11gwin_create();
+extern struct gwin *gator_X11gwin_create(struct gator_X11gwin_params *);
/*
* Summary:
* Create a X11 window.
/*X11 cleanup routine*/
-extern int gator_X11gwin_cleanup();
+extern int gator_X11gwin_cleanup(struct gwin *);
/*
* Summary:
* Clean up after the X11 window package.
/*X11 window's routines*/
-extern int gator_X11gwin_box();
+extern int gator_X11gwin_box(struct gwin *);
/*
* Summary:
* Draw a box around the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_clear();
+extern int gator_X11gwin_clear(struct gwin *);
/*
* Summary:
* Clear out the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_destroy();
+extern int gator_X11gwin_destroy(struct gwin *);
/*
* Summary:
* Destroy the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_display();
+extern int gator_X11gwin_display(struct gwin *);
/*
* Summary:
* Display/redraw the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_drawline();
+extern int gator_X11gwin_drawline(struct gwin *, struct gwin_lineparams *);
/*
* Summary:
* Draw a line between two points in the given X11
* Error value otherwise.
*/
-extern int gator_X11gwin_drawrectangle();
+extern int gator_X11gwin_drawrectangle(struct gwin *,
+ struct gwin_rectparams *);
/*
* Summary:
* Draw a rectangle in the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_drawchar();
+extern int gator_X11gwin_drawchar(struct gwin *,
+ struct gwin_charparams *);
/*
* Summary:
* Draw a character in the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_drawstring();
+extern int gator_X11gwin_drawstring(struct gwin *,
+ struct gwin_strparams *);
/*
* Summary:
* Draw a string in the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_invert();
+extern int gator_X11gwin_invert(struct gwin *,
+ struct gwin_invparams *);
/*
* Summary:
* Invert a region in the given X11 window.
* Error value otherwise.
*/
-extern int gator_X11gwin_getchar();
+extern int gator_X11gwin_getchar(struct gwin *);
-extern int gator_X11gwin_getdimensions();
+extern int gator_X11gwin_getdimensions(struct gwin *,
+ struct gwin_sizeparams *);
-extern int gator_X11gwin_wait();
+extern int gator_X11gwin_wait(struct gwin *);
#endif /* __gator_X11windows_h */
/*Curses initialization routine*/
-extern int gator_cursesgwin_init();
+extern int gator_cursesgwin_init(int adebug);
/*
* Summary:
* Initialize the curses window package.
/*Curses window's creation routine*/
-extern struct gwin *gator_cursesgwin_create();
+extern struct gwin *gator_cursesgwin_create(struct gator_cursesgwin_params *);
/*
* Summary:
* Create a curses window.
/*Curses cleanup routine*/
-extern int gator_cursesgwin_cleanup();
+extern int gator_cursesgwin_cleanup(struct gwin *);
/*
* Summary:
* Clean up after the curses window package.
/*Curses window's routines*/
-extern int gator_cursesgwin_box();
+extern int gator_cursesgwin_box(struct gwin *);
/*
* Summary:
* Draw a box around the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_clear();
+extern int gator_cursesgwin_clear(struct gwin *);
/*
* Summary:
* Clear out the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_destroy();
+extern int gator_cursesgwin_destroy(struct gwin *);
/*
* Summary:
* Destroy the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_display();
+extern int gator_cursesgwin_display(struct gwin *);
/*
* Summary:
* Display/redraw the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_drawline();
+extern int gator_cursesgwin_drawline(struct gwin *, struct gwin_lineparams *);
/*
* Summary:
* Draw a line between two points in the given curses
* Error value otherwise.
*/
-extern int gator_cursesgwin_drawrectangle();
+extern int gator_cursesgwin_drawrectangle(struct gwin *,
+ struct gwin_rectparams *);
/*
* Summary:
* Draw a rectangle in the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_drawchar();
+extern int gator_cursesgwin_drawchar(struct gwin *, struct gwin_charparams *);
/*
* Summary:
* Draw a character in the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_drawstring();
+extern int gator_cursesgwin_drawstring(struct gwin *, struct gwin_strparams *);
/*
* Summary:
* Draw a string in the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_invert();
+extern int gator_cursesgwin_invert(struct gwin *, struct gwin_invparams *);
/*
* Summary:
* Invert a region in the given curses window.
* Error value otherwise.
*/
-extern int gator_cursesgwin_getchar();
+extern int gator_cursesgwin_getchar(struct gwin *);
-extern int gator_cursesgwin_getdimensions();
+extern int gator_cursesgwin_getdimensions(struct gwin *,
+ struct gwin_sizeparams *aparms);
-extern int gator_cursesgwin_wait();
+extern int gator_cursesgwin_wait(struct gwin *);
#endif /* __gator_curseswindows_h */
/*Dumb windows initialization routine*/
-extern int gator_dumbgwin_init();
+extern int gator_dumbgwin_init(int);
/*
* Summary:
* Initialize the dumb window package.
/*Dumb window's creation routine*/
-extern struct gwin *gator_dumbgwin_create();
+extern struct gwin *gator_dumbgwin_create(struct gator_dumbgwin_params *);
/*
* Summary:
* Create a dumb window.
/*Dumb cleanup routine*/
-extern int gator_dumbgwin_cleanup();
+extern int gator_dumbgwin_cleanup(struct gwin *);
/*
* Summary:
* Clean up after the dumb window package.
/*Dumb window's routines*/
-extern int gator_dumbgwin_box();
+extern int gator_dumbgwin_box(struct gwin *);
/*
* Summary:
* Draw a box around the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_clear();
+extern int gator_dumbgwin_clear(struct gwin *);
/*
* Summary:
* Clear out the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_destroy();
+extern int gator_dumbgwin_destroy(struct gwin *);
/*
* Summary:
* Destroy the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_display();
+extern int gator_dumbgwin_display(struct gwin *);
/*
* Summary:
* Display/redraw the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_drawline();
+extern int gator_dumbgwin_drawline(struct gwin *, struct gwin_lineparams *);
/*
* Summary:
* Draw a line between two points in the given dumb
* Error value otherwise.
*/
-extern int gator_dumbgwin_drawrectangle();
+extern int gator_dumbgwin_drawrectangle(struct gwin *,
+ struct gwin_rectparams *);
/*
* Summary:
* Draw a rectangle in the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_drawchar();
+extern int gator_dumbgwin_drawchar(struct gwin *,
+ struct gwin_charparams *);
/*
* Summary:
* Draw a character in the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_drawstring();
+extern int gator_dumbgwin_drawstring(struct gwin *, struct gwin_strparams *);
/*
* Summary:
* Draw a string in the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_invert();
+extern int gator_dumbgwin_invert(struct gwin *, struct gwin_invparams *);
/*
* Summary:
* Invert a region in the given dumb window.
* Error value otherwise.
*/
-extern int gator_dumbgwin_getchar();
+extern int gator_dumbgwin_getchar(struct gwin *gwp);
/* get a character from a window */
-extern int gator_dumbgwin_getdimensions();
+extern int gator_dumbgwin_getdimensions(struct gwin *,
+ struct gwin_sizeparams *);
-extern int gator_dumbgwin_wait();
+extern int gator_dumbgwin_wait(struct gwin *gwp);
#endif /* __gator_dumbwindows_h */
#define GTXFRAME_RECURSIVEEND 2 /* end recursive edit */
#define GTXFRAME_RECURSIVEERR 4 /* recursive edit failed due to error */
-extern struct gtx_frame *gtxframe_Create();
-extern struct gtx_frame *gtxframe_GetFrame();
+extern int gtxframe_SetFrame(struct gwin *awin, struct gtx_frame *aframe);
+extern struct gtx_frame *gtxframe_GetFrame(struct gwin *);
+extern int gtxframe_AddMenu(struct gtx_frame *aframe, char *alabel,
+ char *astring);
+extern int gtxframe_DeleteMenu(struct gtx_frame *aframe, char *alabel);
+extern int gtxframe_ClearMenus(struct gtx_frame *aframe);
+extern int gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
+ char *adefault, char *aresult,
+ int aresultSize);
+extern int gtxframe_DisplayString(struct gtx_frame *, char *);
+extern int gtxframe_ClearMessageLine(struct gtx_frame *aframe);
+extern struct gtx_frame *gtxframe_Create(void);
+extern int gtxframe_Delete(struct gtx_frame *aframe);
+extern int gtxframe_Display(struct gtx_frame *aframe, struct gwin *awm);
+extern int gtxframe_AddToList(struct gtx_frame *aframe, struct onode *aobj);
+extern int gtxframe_RemoveFromList(struct gtx_frame *aframe,
+ struct onode *aobj);
+extern int gtxframe_ClearList(struct gtx_frame *aframe);
/*
* The gtxframe_ExitCmd() routine, normally bound to ^C, allows a caller
* window to its normal state. If a non-zero exit value is desired, then
* the caller should place it in gtxframe_exitValue.
*/
-extern int gtxframe_ExitCmd();
+extern int gtxframe_ExitCmd(void *, void *);
extern int gtxframe_exitValue;
#endif /* __GTX_FRAME_INCL_ */
*/
/* Input structure */
+
+void *gtx_InputServer(void *);
+
char pad[3]; /* padding */
char *name; /* descriptive name of function, if function */
union { /* value (proc, submap, etc) */
- int (*proc) ();
+ int (*proc) (void *, void *);
struct keymap_map *submap;
- char *generic;
+ void *generic;
} u;
- char *rock; /* rock to use */
+ void *rock; /* rock to use */
};
struct keymap_map {
struct keymap_map *currentMap;
};
-extern struct keymap_map *keymap_Create();
-extern int keymap_BindToString();
-extern int keymap_Delete();
-extern int keymap_InitState();
-extern int keymap_ProcessState();
-extern int keymap_ResetState();
+extern struct keymap_map *keymap_Create(void);
+extern int keymap_BindToString(struct keymap_map *, char *,
+ int (*aproc)(void *, void *), char *, void *);
+extern int keymap_Delete(struct keymap_map *);
+extern int keymap_InitState(struct keymap_state *, struct keymap_map *);
+extern int keymap_ProcessKey(struct keymap_state *, int, void *);
+extern int keymap_ResetState(struct keymap_state *);
+
+extern char *gtx_CopyString(char *);
+
#endif /* define for file */
/*Light object's creation routine*/
-extern int gator_light_create();
+extern int gator_light_create(struct onode *, struct onode_createparams *);
/*
* Summary:
* Create a gator light object.
/*Light object's generic onode routines*/
-extern int gator_light_destroy();
+extern int gator_light_destroy(struct onode *);
/*
* Summary:
* Destroy a gator light object.
* Error value otherwise.
*/
-extern int gator_light_display();
+extern int gator_light_display(struct onode *);
/*
* Summary:
* Display/redraw a gator light object.
* Error value otherwise.
*/
-extern int gator_light_release();
+extern int gator_light_release(struct onode *);
/*
* Summary:
* Drop the refcount on a gator light object.
* Additional, light-specific operations.
*/
-extern int gator_light_set();
+extern int gator_light_set(struct onode *, int);
/*
* Summary:
* Set the value of the given gator light object.
#include "gtxobjects.h" /*Standard gator object defns */
-extern int gator_objdict_init();
+extern int gator_objdict_init(int adebug);
/*
* Summary:
* Initialize the gator object dictionary package.
* Error value otherwise.
*/
-extern int gator_objdict_add();
+extern int gator_objdict_add(struct onode *objtoadd);
/*
* Summary:
* Add an entry to the gator object dictionary.
* Error value otherwise.
*/
-extern int gator_objdict_delete();
+extern int gator_objdict_delete(struct onode *objtodelete);
/*
* Summary:
* Delete an entry from the gator object dictionary.
* Error value otherwise.
*/
-extern struct onode *gator_objdict_lookup();
+extern struct onode *gator_objdict_lookup(char *nametofind);
/*
* Summary:
* Look up a gator object by name.
* slots.
*/
struct onodeops {
- int (*on_destroy) (); /*Destroy an onode */
- int (*on_display) (); /*Display an onode */
- int (*on_release) (); /*Decrement an onode ref count */
+ int (*on_destroy) (struct onode *); /*Destroy an onode */
+ int (*on_display) (struct onode *); /*Display an onode */
+ int (*on_release) (struct onode *); /*Decrement an onode ref count */
};
/*
*/
extern int objects_debug;
-extern int gator_objects_init();
+extern int gator_objects_init(struct onode_initparams *);
/*
* Summary:
* Initialize the gator object package.
* Error value otherwise.
*/
-extern struct onode *gator_objects_create();
+extern struct onode *gator_objects_create(struct onode_createparams *params);
/*
* Summary:
* Create an onode of the given type.
* Null pointer otherwise.
*/
-extern struct onode *gator_objects_lookup();
+extern struct onode *gator_objects_lookup(char *);
/*
* Summary:
* Look up a gator onode by name.
#include "gtxlightobj.h"
#include "gtxkeymap.h"
#include "gtxframe.h"
+#include "gtxinput.h"
struct gtx_frame *frameA, *frameB;
struct onode *lightA, *lightB;
static int
-ChangeMenuCmd(awin, arock)
- afs_int32 arock;
- register struct gwin *awin;
+ChangeMenuCmd(void *param1, void *param2)
{
+ struct gwin * awin = (struct gwin *) param1;
+ afs_int32 arock = (afs_int32) param2;
+
register struct gtx_frame *tf;
register afs_int32 code;
}
static int
-ChangeListCmd(awin, arock)
- afs_int32 arock;
- register struct gwin *awin;
+ChangeListCmd(void *param1, void *param2)
{
+ struct gwin *awin = (struct gwin *) param1;
+ afs_int32 arock = (afs_int32) param2;
+
register struct gtx_frame *tf;
register afs_int32 code;
}
static int
-NoCallCmd(awin)
- struct gwin *awin;
+NoCallCmd(void *param, void *unused)
{
+ struct gwin *awin = (struct gwin *)param;
+
gtxframe_DisplayString(awin->w_frame,
"Function should be mapped on '$d', not 'd'");
return 0;
}
static int
-ChangeCmd(awin)
- struct gwin *awin;
+ChangeCmd(void *param, void *unused)
{
+ struct gwin *awin = (struct gwin *) param;
char tbuffer[100];
register afs_int32 code;
}
static int
-StupidCmd(awin)
- struct gwin *awin;
+StupidCmd(void *param, void *unused)
{
+ struct gwin *awin = (struct gwin *)param;
+
gtxframe_DisplayString(awin->w_frame,
"You're already showing that frame!");
return 0;
}
static int
-SwitchToACmd(awin)
- struct gwin *awin;
+SwitchToACmd(void *param, void *unused)
{
+ struct gwin *awin = (struct gwin *)param;
gtxframe_SetFrame(awin, frameA);
return 0;
}
static int
-SwitchToBCmd(awin)
- struct gwin *awin;
+SwitchToBCmd(void *param, void *unused)
{
+ struct gwin *awin = (struct gwin *)param;
gtxframe_SetFrame(awin, frameB);
return 0;
}
#include "AFS_component_version_number.c"
-main()
+int
+main(int argc, char **argv)
{
struct gwin *win;
struct gator_textobj_params textcrparams;
/*
* Operations for text circular buffers.
*/
-extern int gator_textcb_Init();
+extern int gator_textcb_Init(int);
/*
* Summary:
* Initialize this package. MUST BE THE FIRST ROUTINE CALLED!
* Error code otherwise.
*/
-extern struct gator_textcb_hdr *gator_textcb_Create();
+extern struct gator_textcb_hdr *gator_textcb_Create(int, int);
/*
* Summary:
* Create a new text circular buffer.
* Null pointer otherwise.
*/
-extern int gator_textcb_Write();
+extern int gator_textcb_Write(struct gator_textcb_hdr *, char *a_textToWrite,
+ int, int, int);
/*
* Summary:
* Write the given string to the text circular buffer. Line
* Error code otherwise.
*/
-extern int gator_textcb_BlankLine();
+extern int gator_textcb_BlankLine(struct gator_textcb_hdr *, int);
/*
* Summary:
* Write out some number of blank lines to the given circular
* Error code otherwise.
*/
-extern int gator_textcb_Delete();
+extern int gator_textcb_Delete(struct gator_textcb_hdr *a_cbhdr);
/*
* Summary:
* Delete the storage used by the given circular buffer, including
/*Text object's creation routine*/
-extern int gator_text_create();
+extern int gator_text_create(struct onode *, struct onode_createparams *);
/*
* Summary:
* Create a gator text object.
/*Text object's generic onode routines*/
-extern int gator_text_destroy();
+extern int gator_text_destroy(struct onode *);
/*
* Summary:
* Destroy a gator text object.
* Error value otherwise.
*/
-extern int gator_text_display();
+extern int gator_text_display(struct onode *);
/*
* Summary:
* Display/redraw a gator text object.
* Error value otherwise.
*/
-extern int gator_text_release();
+extern int gator_text_release(struct onode *);
/*
* Summary:
* Drop the refcount on a gator text object.
* Additional, text-specific operations.
*/
-extern int gator_text_Scroll();
+extern int gator_text_Scroll(struct onode *, int, int);
/*
* Summary:
* Scroll a text object some number of lines.
* Error value otherwise.
*/
-extern int gator_text_Write();
+extern int gator_text_Write(struct onode *, char *, int, int, int);
/*
* Summary:
* Write the given string to the end of the gator text object.
* Error value otherwise.
*/
-extern int gator_text_BlankLine();
+extern int gator_text_BlankLine(struct onode *, int);
/*
* Summary:
* Write a given number of blank lines to the given text object.
* Operations on gator windows.
*/
struct gwinops {
- int (*gw_box) (); /* Draw a box around the given window */
- int (*gw_clear) (); /* Clear out a window */
- int (*gw_destroy) (); /* Destroy a window */
- int (*gw_display) (); /* [Re]display a window */
- int (*gw_drawline) (); /* Draw a line between two points */
- int (*gw_drawrectangle) (); /* Draw a rectangle at the given loc & dimensions */
- int (*gw_drawchar) (); /* Draw a char at the given location */
- int (*gw_drawstring) (); /* Draw a char string at the given location */
- int (*gw_invert) (); /* Invert region */
- int (*gw_getchar) (); /* Get a character from a window */
- int (*gw_getdimensions) (); /* Get dimensions of a window */
- int (*gw_wait) (); /* Wait for input */
+ int (*gw_box) (struct gwin *); /* Draw a box around the given window */
+ int (*gw_clear) (struct gwin *); /* Clear out a window */
+ int (*gw_destroy) (struct gwin *); /* Destroy a window */
+ int (*gw_display) (struct gwin *); /* [Re]display a window */
+ int (*gw_drawline) (struct gwin *, struct gwin_lineparams *);
+ /* Draw a line between two points */
+ int (*gw_drawrectangle) (struct gwin *, struct gwin_rectparams *);
+ /* Draw a rectangle at the given loc & dimensions */
+ int (*gw_drawchar) (struct gwin *, struct gwin_charparams *);
+ /* Draw a char at the given location */
+ int (*gw_drawstring) (struct gwin *, struct gwin_strparams *);
+ /* Draw a char string at the given location */
+ int (*gw_invert) (struct gwin *, struct gwin_invparams *);
+ /* Invert region */
+ int (*gw_getchar) (struct gwin *); /* Get a character from a window */
+ int (*gw_getdimensions) (struct gwin *, struct gwin_sizeparams *);
+ /* Get dimensions of a window */
+ int (*gw_wait) (struct gwin *); /* Wait for input */
};
/*
* Base operations on the lower-level window system.
*/
struct gwinbaseops {
- struct gwin *(*gw_createwin) (); /*Create a window */
- int (*gw_cleanup) (); /*Clean up before program exit */
+ struct gwin *(*gw_createwin) (void *);
+ /*Create a window */
+ int (*gw_cleanup) (struct gwin *); /*Clean up before program exit */
};
/*
*/
extern struct gwin gator_basegwin;
-extern int gw_init();
+extern int gw_init(struct gwin_initparams *);
/*
* Summary:
* Initialize the gator window package.
*/
/* initialize the whole gator toolkit package */
-extern struct gwin *gtx_Init();
+extern struct gwin *gtx_Init(int, int);
#endif /* __gator_windows_h */
#include <sys/types.h>
#endif
#include <lwp.h>
-
#include "gtxobjects.h"
#include "gtxwindows.h"
#include "gtxcurseswin.h"
}
struct gwin *
-gtx_Init(astartInput, atype)
- int atype; /* type of window to create */
- int astartInput;
+gtx_Init(int astartInput,
+ int atype) /* type of window to create */
{
PROCESS junk;
struct onode_initparams oi_params; /* object init params */
#include "gtxkeymap.h"
struct keymap_map *
-keymap_Create()
+keymap_Create(void)
{
register struct keymap_map *tmap;
/* make a copy of a string; generic utility */
char *
-gtx_CopyString(aval)
- register char *aval;
+gtx_CopyString(register char *aval)
{
register char *tp;
}
static int
-BindIt(amap, aslot, atype, aproc, aname, arock)
- struct keymap_map *amap;
- char *arock;
- int aslot;
- int atype;
- char *aproc;
- char *aname;
+BindIt(struct keymap_map *amap, int aslot, int atype, void *aproc, char *aname, void *arock)
{
register char *tp;
register struct keymap_entry *tentry;
return -1;
tentry = &amap->entries[aslot];
tentry->type = atype;
- if (tp = tentry->name)
+ if ((tp = tentry->name))
free(tp);
if (atype == KEYMAP_EMPTY) {
tentry->u.generic = NULL;
return 0;
}
-keymap_BindToString(amap, astring, aproc, aname, arock)
- register struct keymap_map *amap;
- char *astring;
- char *arock;
- int (*aproc) ();
- char *aname;
+int
+keymap_BindToString(struct keymap_map *amap, char *astring,
+ int (*aproc)(void *, void *),
+ char *aname, void *arock)
{
register char *cptr;
register int tc;
cptr = astring;
/* walk down string, building submaps if possible, until we get to function
* at the end */
- while (tc = *cptr++) {
+ while ((tc = *cptr++)) {
/* see if we should do submap or final function */
if (*cptr == 0) { /* we're peeking: already skipped command char */
/* last character, do final function */
code = BindIt(amap, tc, KEYMAP_EMPTY, NULL, NULL, NULL);
else
code =
- BindIt(amap, tc, KEYMAP_PROC, (char *)aproc, aname,
- arock);
+ BindIt(amap, tc, KEYMAP_PROC, aproc, aname, arock);
if (code)
return code;
} else {
if (amap->entries[tc].type != KEYMAP_SUBMAP) {
tmap = keymap_Create();
code =
- BindIt(amap, tc, KEYMAP_SUBMAP, (char *)tmap, NULL, NULL);
+ BindIt(amap, tc, KEYMAP_SUBMAP, tmap, NULL, NULL);
} else {
tmap = amap->entries[tc].u.submap;
code = 0;
}
/* delete a keymap and all of its recursively-included maps */
-keymap_Delete(amap)
- register struct keymap_map *amap;
+int
+keymap_Delete(struct keymap_map *amap)
{
register int i;
register struct keymap_entry *tentry;
return 0;
}
-keymap_InitState(astate, amap)
- register struct keymap_state *astate;
- struct keymap_map *amap;
+int
+keymap_InitState(struct keymap_state *astate, struct keymap_map *amap)
{
memset(astate, 0, sizeof(*astate));
astate->initMap = amap;
return 0;
}
-keymap_ProcessKey(astate, akey, arock)
- register struct keymap_state *astate;
- char *arock;
- register int akey;
+int
+keymap_ProcessKey(struct keymap_state *astate, int akey, void *arock)
{
register struct keymap_entry *tentry;
register afs_int32 code;
return code;
}
-keymap_ResetState(astate)
- register struct keymap_state *astate;
+int
+keymap_ResetState(struct keymap_state *astate)
{
return keymap_InitState(astate, astate->initMap);
}
*------------------------------------------------------------------------*/
int
-gator_light_create(light_onp, params)
- struct onode *light_onp;
- struct onode_createparams *params;
-
+gator_light_create(struct onode *light_onp, struct onode_createparams *params)
{ /*gator_light_create */
static char rn[] = "gator_light_create"; /*Routine name */
(struct gator_lightobj *)malloc(sizeof(struct gator_lightobj));
if (light_data == (struct gator_lightobj *)0) {
fprintf(stderr,
- "[%s:%s] Can't allocate %d bytes for light object private data region, errno is %d\n",
+ "[%s:%s] Can't allocate %lu bytes for light object private data region, errno is %d\n",
mn, rn, sizeof(struct gator_lightobj), errno);
return (errno);
}
(struct gwin_strparams *)malloc(sizeof(struct gwin_strparams));
if (light_strparams == (struct gwin_strparams *)0) {
fprintf(stderr,
- "[%s:%s] Can't allocate %d bytes for light object label in private data region, errno is %d\n",
+ "[%s:%s] Can't allocate %lu bytes for light object label in private data region, errno is %d\n",
mn, rn, sizeof(struct gwin_strparams), errno);
free(light_data);
return (errno);
*------------------------------------------------------------------------*/
int
-gator_light_destroy(onp)
- struct onode *onp;
-
+gator_light_destroy(struct onode *onp)
{ /*gator_light_destroy */
/*
*------------------------------------------------------------------------*/
int
-gator_light_display(onp)
- struct onode *onp;
-
+gator_light_display(struct onode *onp)
{ /*gator_light_display */
static char rn[] = "gator_light_display"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_light_release(onp)
- struct onode *onp;
-
+gator_light_release(struct onode *onp)
{ /*gator_light_release */
/*
*------------------------------------------------------------------------*/
int
-gator_light_set(onp, setting)
- struct onode *onp;
- int setting;
-
+gator_light_set(struct onode *onp, int setting)
{ /*gator_light_set */
static char rn[] = "gator_light_set"; /*Routine name */
light_data = (struct gator_lightobj *)(onp->o_data);
label_strparams = (struct gwin_strparams *)(light_data->llrock);
if (objects_debug)
- fprintf(stderr, "[%s:%s] Setting light object at 0x%x to %d (%s)", mn,
+ fprintf(stderr, "[%s:%s] Setting light object at %p to %d (%s)", mn,
rn, onp, setting, (setting ? "ON" : "OFF"));
light_data->setting = setting;
label_strparams->highlight = setting;
*------------------------------------------------------------------------*/
int
-gator_objdict_init(adebug)
- int adebug;
-
+gator_objdict_init(int adebug)
{ /*gator_objdict_init */
static char rn[] = "gator_objdict_init"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_objdict_add(objtoadd)
- struct onode *objtoadd;
-
+gator_objdict_add(struct onode *objtoadd)
{ /*gator_objdict_add */
static char rn[] = "gator_objdict_add"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_objdict_delete(objtodelete)
- struct onode *objtodelete;
-
+gator_objdict_delete(struct onode *objtodelete)
{ /*gator_objdict_delete */
static char rn[] = "gator_objdict_delete"; /*Routine name */
*------------------------------------------------------------------------*/
struct onode *
-gator_objdict_lookup(nametofind)
- char *nametofind;
-
+gator_objdict_lookup(char *nametofind)
{ /*gator_objdict_lookup */
static char rn[] = "gator_objdict_lookup"; /*Routine name */
static char mn[] = "gator_objects"; /*Module name */
int objects_debug; /*Is debugging output on? */
-int (*on_create[GATOR_NUM_OBJTYPES]) (); /*Array of ptrs to creation functions */
+int (*on_create[GATOR_NUM_OBJTYPES]) (struct onode *,
+ struct onode_createparams *);
+ /*Array of ptrs to creation functions */
+
struct onodeops objops[GATOR_NUM_OBJTYPES]; /*Per-type op arrays */
*--------------------------------------------------------------------------------*/
int
-gator_objects_init(params)
- struct onode_initparams *params;
-
+gator_objects_init(struct onode_initparams *params)
{ /*gator_objects_init */
static char rn[] = "gator_objects_init"; /*Routine name */
*--------------------------------------------------------------------------------*/
struct onode *
-gator_objects_create(params)
- struct onode_createparams *params;
-
+gator_objects_create(struct onode_createparams *params)
{ /*gator_objects_create */
static char rn[] = "gator_objects_create"; /*Routine name */
fprintf(stderr, "\tWidth=%d, height=%d\n", params->cr_width,
params->cr_height);
fprintf(stderr, "\tHelpstring='%s'\n", params->cr_helpstring);
- fprintf(stderr, "\tWindow struct at 0x%x\n", params->cr_window);
+ fprintf(stderr, "\tWindow struct at %p\n", params->cr_window);
}
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Allocating %d bytes for new onode structure\n", mn,
+ "[%s:%s] Allocating %lu bytes for new onode structure\n", mn,
rn, sizeof(struct onode));
new_onode = (struct onode *)malloc(sizeof(struct onode));
if (new_onode == NULL) {
fprintf(stderr,
- "[%s:%s] Can't allocate %d bytes for new onode structure; errno is %d\n",
+ "[%s:%s] Can't allocate %lu bytes for new onode structure; errno is %d\n",
mn, rn, sizeof(struct onode), errno);
return (NULL);
}
* we'll create a scrollable text help object with it ****
*/
if (objects_debug)
- fprintf(stderr, "[%s:%s] Filling in onode fields\n", mn, rn,
- sizeof(struct onode));
+ fprintf(stderr, "[%s:%s] Filling in onode fields\n", mn, rn);
new_onode->o_type = params->cr_type;
strcpy(new_onode->o_name, params->cr_name);
new_onode->o_x = params->cr_x;
if (params->cr_prev_obj != NULL) {
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Setting o_nextobj pointer in the previous object located at 0x%x (previous value was 0x%x)\n",
+ "[%s:%s] Setting o_nextobj pointer in the previous object located at %p (previous value was %p)\n",
mn, rn, params->cr_prev_obj,
params->cr_prev_obj->o_nextobj);
params->cr_prev_obj->o_nextobj = new_onode;
if (params->cr_parent_obj != NULL) {
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Setting o_downobj pointer in the parent object located at 0x%x (previous value was 0x%x)\n",
+ "[%s:%s] Setting o_downobj pointer in the parent object located at %p (previous value was %p)\n",
mn, rn, params->cr_parent_obj,
params->cr_parent_obj->o_downobj);
params->cr_parent_obj->o_downobj = new_onode;
*--------------------------------------------------------------------------------*/
struct onode *
-gator_objects_lookup(onode_name)
- char *onode_name;
-
+gator_objects_lookup(char *onode_name)
{ /*gator_objects_lookup */
static char rn[] = "gator_objects_lookup"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_textcb_Init(a_debug)
- int a_debug;
-
+gator_textcb_Init(int a_debug)
{ /*gator_textcb_Init */
static int initd; /*Have we been called already? */
*------------------------------------------------------------------------*/
struct gator_textcb_hdr *
-gator_textcb_Create(a_maxEntriesStored, a_maxCharsPerEntry)
- int a_maxEntriesStored;
- int a_maxCharsPerEntry;
-
+gator_textcb_Create(int a_maxEntriesStored, int a_maxCharsPerEntry)
{ /*gator_textcb_Create */
static char rn[] = "gator_textcb_Create"; /*Routine name */
rn, bytesToAllocate, errno);
return ((struct gator_textcb_hdr *)0);
} else if (gator_textcb_debug)
- fprintf(stderr, "[%s] Text buffer allocated at 0x%x\n", rn, newBuff);
+ fprintf(stderr, "[%s] Text buffer allocated at %p\n", rn, newBuff);
blankLine = (char *)malloc(a_maxCharsPerEntry + 1);
if (blankLine == NULL) {
fprintf(stderr,
free(blankLine);
return ((struct gator_textcb_hdr *)0);
} else if (gator_textcb_debug)
- fprintf(stderr, "[%s] Text buffer entry array allocated at 0x%x\n",
+ fprintf(stderr, "[%s] Text buffer entry array allocated at %p\n",
rn, newEntries);
/*
return ((struct gator_textcb_hdr *)0);
} else if (gator_textcb_debug)
fprintf(stderr,
- "[%s] Text circular buffer header allocated at 0x%x\n", rn,
+ "[%s] Text circular buffer header allocated at %p\n", rn,
newHdr);
/*
* Now, just initialize all the pieces and plug them in.
*/
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Zeroing %d bytes in text buffer at 0x%x\n", rn,
+ fprintf(stderr, "[%s] Zeroing %d bytes in text buffer at %p\n", rn,
numBuffBytes, newBuff);
memset(newBuff, 0, numBuffBytes);
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Initializing blank line buffer at 0x%x\n", rn,
+ fprintf(stderr, "[%s] Initializing blank line buffer at %p\n", rn,
blankLine);
for (i = 0; i < a_maxCharsPerEntry; i++)
*(blankLine + i) = ' ';
curr_ent++, curr_ent_num++, curr_buff += (a_maxCharsPerEntry + 1)) {
if (gator_textcb_debug)
fprintf(stderr,
- "[%s] Initializing buffer entry %d; its text buffer address is 0x%x\n",
+ "[%s] Initializing buffer entry %d; its text buffer address is %p\n",
rn, curr_ent_num, curr_buff);
curr_ent->ID = 0;
curr_ent->highlight = 0;
} /*Init each buffer entry */
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Filling in circ buff header at 0x%x\n", rn,
+ fprintf(stderr, "[%s] Filling in circ buff header at %p\n", rn,
newHdr);
Lock_Init(&(newHdr->cbLock));
newHdr->maxEntriesStored = a_maxEntriesStored;
*------------------------------------------------------------------------*/
static struct gator_textcb_entry *
-bumpEntry(a_cbhdr)
- struct gator_textcb_hdr *a_cbhdr;
+bumpEntry(struct gator_textcb_hdr *a_cbhdr)
{ /*bumpEntry */
*/
if (gator_textcb_debug)
fprintf(stderr,
- "[%s]: Bumping entry for circular buffer at 0x%x; current values: currEnt=%d (idx %d), oldestEnt=%d (idx %d), maxEntriesStored=%d\n",
+ "[%s]: Bumping entry for circular buffer at %p; current values: currEnt=%d (idx %d), oldestEnt=%d (idx %d), maxEntriesStored=%d\n",
rn, a_cbhdr, a_cbhdr->currEnt, a_cbhdr->currEntIdx,
a_cbhdr->oldestEnt, a_cbhdr->oldestEntIdx,
a_cbhdr->maxEntriesStored);
curr_ent = a_cbhdr->entry + a_cbhdr->currEntIdx;
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Zeroing entry %d (idx %d) at 0x%x\n", rn,
+ fprintf(stderr, "[%s] Zeroing entry %d (idx %d) at %p\n", rn,
a_cbhdr->currEnt, a_cbhdr->currEntIdx, curr_ent);
curr_ent->ID = a_cbhdr->currEnt;
*------------------------------------------------------------------------*/
int
-gator_textcb_Write(a_cbhdr, a_textToWrite, a_numChars, a_highlight, a_skip)
- struct gator_textcb_hdr *a_cbhdr;
- char *a_textToWrite;
- int a_numChars;
- int a_highlight;
- int a_skip;
-
+gator_textcb_Write(struct gator_textcb_hdr *a_cbhdr, char *a_textToWrite,
+ int a_numChars, int a_highlight, int a_skip)
{ /*gator_textcb_Write */
static char rn[] = "gator_textcb_Write"; /*Routine name */
effective_highlight = (effective_highlight ? 0 : 1);
if (gator_textcb_debug)
fprintf(stderr,
- "[%s]: Current entry: %d (at index %d, keeping %d max), effective highlight: %d, located at 0x%x\n",
+ "[%s]: Current entry: %d (at index %d, keeping %d max), effective highlight: %d, located at %p\n",
rn, a_cbhdr->currEnt, curr_ent_idx, a_cbhdr->maxEntriesStored,
effective_highlight, curr_ent);
curr_ent_idx = a_cbhdr->currEntIdx;
if (gator_textcb_debug)
fprintf(stderr,
- "[%s] New CB entry info: currEnt=%d (idx %d), oldestEnt=%d (idx %d), curr entry ptr is 0x%x\n",
+ "[%s] New CB entry info: currEnt=%d (idx %d), oldestEnt=%d (idx %d), curr entry ptr is %p\n",
rn, a_cbhdr->currEnt, a_cbhdr->currEntIdx,
a_cbhdr->oldestEnt, a_cbhdr->oldestEntIdx, curr_ent);
}
dest = curr_ent->textp + curr_ent->charsUsed;
if (gator_textcb_debug)
fprintf(stderr,
- "[%s]: Copying %d char(s) into current entry at 0x%x (entry buffer starts at 0x%x)\n",
+ "[%s]: Copying %d char(s) into current entry at %p (entry buffer starts at %p)\n",
rn, chars_to_copy, dest, curr_ent->textp);
/*
*------------------------------------------------------------------------*/
int
-gator_textcb_BlankLine(a_cbhdr, a_numBlanks)
- struct gator_textcb_hdr *a_cbhdr;
- int a_numBlanks;
-
+gator_textcb_BlankLine(struct gator_textcb_hdr *a_cbhdr,
+ int a_numBlanks)
{ /*gator_textcb_BlankLine */
static char rn[] = "gator_textcb_BlankLine"; /*Routine name */
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Putting out %d blank lines to the CB at 0x%x\n",
+ fprintf(stderr, "[%s] Putting out %d blank lines to the CB at %p\n",
rn, a_numBlanks, a_cbhdr);
if (a_cbhdr == (struct gator_textcb_hdr *)0) {
*------------------------------------------------------------------------*/
int
-gator_textcb_Delete(a_cbhdr)
- struct gator_textcb_hdr *a_cbhdr;
-
+gator_textcb_Delete(struct gator_textcb_hdr *a_cbhdr)
{ /*gator_textcb_Delete */
static char rn[] = "gator_textcb_Delete"; /*Routine name */
if (gator_textcb_debug)
- fprintf(stderr, "[%s]: Deleting text circular buffer at 0x%x\n", rn,
+ fprintf(stderr, "[%s]: Deleting text circular buffer at %p\n", rn,
a_cbhdr);
ObtainWriteLock(&(a_cbhdr->cbLock));
*/
if (gator_textcb_debug)
fprintf(stderr,
- "[%s]: Freeing text buffer proper at 0x%x (%d bytes)\n", rn,
+ "[%s]: Freeing text buffer proper at %p (%d bytes)\n", rn,
a_cbhdr->entry[0].textp,
(a_cbhdr->maxEntriesStored * a_cbhdr->maxCharsPerEntry));
free(a_cbhdr->entry[0].textp);
a_cbhdr->entry[0].textp = NULL;
if (gator_textcb_debug)
- fprintf(stderr, "[%s]: Freeing text entry array at 0x%x (%d bytes)\n",
+ fprintf(stderr, "[%s]: Freeing text entry array at %p (%lu bytes)\n",
rn, a_cbhdr->entry,
(a_cbhdr->maxEntriesStored *
sizeof(struct gator_textcb_entry)));
*/
ReleaseWriteLock(&(a_cbhdr->cbLock));
if (gator_textcb_debug)
- fprintf(stderr, "[%s] Freeing cicular buffer header at 0x%x\n", rn,
+ fprintf(stderr, "[%s] Freeing cicular buffer header at %p\n", rn,
a_cbhdr);
free(a_cbhdr);
return (0);
*------------------------------------------------------------------------*/
int
-gator_text_create(text_onp, params)
- struct onode *text_onp;
- struct onode_createparams *params;
-
+gator_text_create(struct onode *text_onp, struct onode_createparams *params)
{ /*gator_text_create */
static char rn[] = "gator_text_create"; /*Routine name */
text_params = (struct gator_textobj_params *)params;
if (objects_debug) {
fprintf(stderr,
- "[%s:%s] Private data passed to text object at 0x%x:\n", mn,
+ "[%s:%s] Private data passed to text object at %p:\n", mn,
rn, text_onp);
fprintf(stderr, "\tmaxEntries: %d, maxCharsPerEntry: %d\n",
text_params->maxEntries, text_params->maxCharsPerEntry);
*/
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Allocating %d bytes for text object private data region\n",
+ "[%s:%s] Allocating %lu bytes for text object private data region\n",
mn, rn, sizeof(struct gator_textobj));
text_data = (struct gator_textobj *)malloc(sizeof(struct gator_textobj));
if (text_data == (struct gator_textobj *)0) {
fprintf(stderr,
- "[%s:%s] Can't allocate %d bytes for text object private data region, errno is %d\n",
+ "[%s:%s] Can't allocate %lu bytes for text object private data region, errno is %d\n",
mn, rn, sizeof(struct gator_textobj), errno);
return (errno);
}
*------------------------------------------------------------------------*/
int
-gator_text_destroy(onp)
- struct onode *onp;
-
+gator_text_destroy(struct onode *onp)
{ /*gator_text_destroy */
/*
*------------------------------------------------------------------------*/
int
-gator_text_display(onp)
- struct onode *onp;
-
+gator_text_display(struct onode *onp)
{ /*gator_text_display */
static char rn[] = "gator_text_display"; /*Routine name */
struct gator_textcb_entry *curr_ent; /*Ptr to current entry */
if (objects_debug)
- fprintf(stderr, "[%s:%s] Displaying text object at 0x%x\n", mn, rn,
+ fprintf(stderr, "[%s:%s] Displaying text object at %p\n", mn, rn,
onp);
text_data = (struct gator_textobj *)(onp->o_data);
cbHdr = text_data->cbHdr;
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Displaying text object at 0x%x, object-specific data at 0x%x\n",
+ "[%s:%s] Displaying text object at %p, object-specific data at %p\n",
mn, rn, onp, text_data);
/*
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Drawing %d populated lines, starting with entry %d (index %d) at 0x%x\n",
+ "[%s:%s] Drawing %d populated lines, starting with entry %d (index %d) at %p",
mn, rn, currLinesUsed, currEnt, currIdx, curr_ent);
strparams.x = onp->o_x;
*------------------------------------------------------------------------*/
int
-gator_text_release(onp)
- struct onode *onp;
-
+gator_text_release(struct onode *onp)
{ /*gator_text_release */
/*
*------------------------------------------------------------------------*/
int
-gator_text_Scroll(onp, nlines, direction)
- struct onode *onp;
- int nlines;
- int direction;
-
+gator_text_Scroll(struct onode *onp, int nlines, int direction)
{ /*gator_text_Scroll */
static char rn[] = "gator_text_Scroll"; /*Routine name */
*------------------------------------------------------------------------*/
int
-gator_text_Write(onp, strToWrite, numChars, highlight, skip)
- struct onode *onp;
- char *strToWrite;
- int numChars;
- int highlight;
- int skip;
-
+gator_text_Write(struct onode *onp, char *strToWrite, int numChars,
+ int highlight, int skip)
{ /*gator_text_Write */
static char rn[] = "gator_text_Write"; /*Routine name */
*/
if (objects_debug) {
fprintf(stderr,
- "[%s:%s] Writing %d chars to text object at 0x%x (highlight=%d, skip=%d: '",
+ "[%s:%s] Writing %d chars to text object at %p (highlight=%d, skip=%d: '",
mn, rn, numChars, onp, highlight, skip);
for (i = 0; i < numChars; i++)
fprintf(stderr, "%c", strToWrite + i);
*------------------------------------------------------------------------*/
int
-gator_text_BlankLine(onp, numBlanks)
- struct onode *onp;
- int numBlanks;
-
+gator_text_BlankLine(struct onode *onp, int numBlanks)
{ /*gator_text_BlankLine */
static char rn[] = "gator_text_BlankLine"; /*Routine name */
*/
if (objects_debug)
fprintf(stderr,
- "[%s:%s] Writing %d blank lines to text object at 0x%x\n", mn,
+ "[%s:%s] Writing %d blank lines to text object at %p\n", mn,
rn, numBlanks, onp);
text_data = (struct gator_textobj *)(onp->o_data);
code = gator_textcb_BlankLine(text_data->cbHdr, numBlanks);
if (code) {
fprintf(stderr,
- "[%s:%s] Can't write %d blank lines to text object at 0x%x\n",
+ "[%s:%s] Can't write %d blank lines to text object at %p\n",
mn, rn, numBlanks, onp);
return (code);
}
*--------------------------------------------------------------------------------*/
int
-gw_init(params)
- struct gwin_initparams *params;
-
+gw_init(struct gwin_initparams *params)
{ /*gw_init */
static char rn[] = "gw_init"; /*Routine name */
if (scout_gtx_initialized) {
gtxframe_exitValue = a_exitval;
- gtxframe_ExitCmd((char *)(>xframe_exitValue));
+ gtxframe_ExitCmd((void *)(>xframe_exitValue), NULL);
} else
exit(a_exitval);