X11 missing prototypes
Add some prototypes and add a new include to a couple of files that use config.h instead of hack.h. So sys/unix/Makefile.src has been changed slightly.
This commit is contained in:
@@ -9,6 +9,13 @@
|
||||
#ifndef WINX_H
|
||||
#define WINX_H
|
||||
|
||||
#ifndef COLOR_H
|
||||
#include "color.h" /* CLR_MAX */
|
||||
#endif
|
||||
#ifndef WINTYPE_H
|
||||
#include "wintype.h" /* winid */
|
||||
#endif
|
||||
|
||||
#ifndef E
|
||||
#define E extern
|
||||
#endif
|
||||
@@ -300,9 +307,12 @@ extern struct window_procs X11_procs;
|
||||
window, __FILE__, __LINE__); \
|
||||
} while (0)
|
||||
|
||||
/* ### Window.c ### */
|
||||
E Font FDECL(WindowFont, (Widget));
|
||||
E XFontStruct *FDECL(WindowFontStruct, (Widget));
|
||||
|
||||
/* ### dialogs.c ### */
|
||||
E Widget
|
||||
FDECL(CreateDialog, (Widget, String, XtCallbackProc, XtCallbackProc));
|
||||
E Widget FDECL(CreateDialog, (Widget, String, XtCallbackProc, XtCallbackProc));
|
||||
E void FDECL(SetDialogPrompt, (Widget, String));
|
||||
E String FDECL(GetDialogResponse, (Widget));
|
||||
E void FDECL(SetDialogResponse, (Widget, String, unsigned));
|
||||
@@ -314,6 +324,10 @@ E XColor FDECL(get_nhcolor, (struct xwindow *, int));
|
||||
E void FDECL(init_menu_nhcolors, (struct xwindow *));
|
||||
E void FDECL(load_boldfont, (struct xwindow *, Widget));
|
||||
E Boolean FDECL(nhApproxColor, (Screen *, Colormap, char *, XColor *));
|
||||
E Boolean FDECL(nhCvtStringToPixel, (Display *, XrmValuePtr, Cardinal *,
|
||||
XrmValuePtr, XrmValuePtr, XtPointer *));
|
||||
E void FDECL(get_window_frame_extents, (Widget,
|
||||
long *, long *, long *, long *));
|
||||
E void FDECL(get_widget_window_geometry, (Widget, int *, int *, int *, int *));
|
||||
E char *FDECL(fontname_boldify, (const char *));
|
||||
E Dimension FDECL(nhFontHeight, (Widget));
|
||||
@@ -352,6 +366,8 @@ E void FDECL(create_menu_window, (struct xwindow *));
|
||||
E void FDECL(destroy_menu_window, (struct xwindow *));
|
||||
|
||||
/* ### winmisc.c ### */
|
||||
E XtPointer FDECL(i2xtp, (int));
|
||||
E int FDECL(xtp2i, (XtPointer));
|
||||
E void FDECL(ps_key, (Widget, XEvent *, String *,
|
||||
Cardinal *)); /* player selection action */
|
||||
E void FDECL(race_key, (Widget, XEvent *, String *,
|
||||
|
||||
@@ -817,9 +817,11 @@ cursinvt.o: ../win/curses/cursinvt.c $(HACK_H) ../include/wincurs.h \
|
||||
../win/curses/cursinvt.h
|
||||
$(CC) $(CFLAGS) -c -o $@ ../win/curses/cursinvt.c
|
||||
Window.o: ../win/X11/Window.c ../include/xwindowp.h ../include/xwindow.h \
|
||||
$(CONFIG_H) ../include/lint.h
|
||||
$(CONFIG_H) ../include/lint.h ../include/winX.h \
|
||||
../include/color.h ../include/wintype.h
|
||||
$(CC) $(CFLAGS) $(X11CFLAGS) -c -o $@ ../win/X11/Window.c
|
||||
dialogs.o: ../win/X11/dialogs.c $(CONFIG_H) ../include/lint.h
|
||||
dialogs.o: ../win/X11/dialogs.c $(CONFIG_H) ../include/lint.h \
|
||||
../include/winX.h ../include/color.h ../include/wintype.h
|
||||
$(CC) $(CFLAGS) $(X11CFLAGS) -c -o $@ ../win/X11/dialogs.c
|
||||
winX.o: ../win/X11/winX.c $(HACK_H) ../include/winX.h ../include/dlb.h \
|
||||
../include/xwindow.h ../win/X11/nh72icon ../win/X11/nh56icon \
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
|
||||
#include "xwindowp.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "lint.h"
|
||||
#include "config.h" /* #define for const for non __STDC__ compilers */
|
||||
#include "lint.h" /* for nethack's nhStr() macro */
|
||||
#include "winX.h" /* to make sure protoypes match corresponding functions */
|
||||
|
||||
static XtResource resources[] = {
|
||||
#define offset(field) XtOffset(WindowWidget, window.field)
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
#include "config.h" /* #define for const for non __STDC__ compilers */
|
||||
#include "lint.h" /* for nethack's nhStr() macro */
|
||||
#include "winX.h" /* to make sure protoypes match corresponding functions */
|
||||
|
||||
/* ":" added to both translations below to allow limited redefining of
|
||||
* keysyms before testing for keysym values -- dlc */
|
||||
|
||||
@@ -91,6 +91,21 @@ static const char popup_entry_translations[] = "#override\n\
|
||||
<Btn4Down>: scroll(8)\n\
|
||||
<Btn5Down>: scroll(2)";
|
||||
|
||||
static void NDECL(plsel_dialog_acceptvalues);
|
||||
static void FDECL(plsel_set_play_button, (BOOLEAN_P));
|
||||
static void FDECL(plsel_set_sensitivities, (BOOLEAN_P));
|
||||
static void NDECL(X11_player_selection_randomize);
|
||||
static void NDECL(X11_player_selection_setupOthers);
|
||||
static void FDECL(racetoggleCallback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(roletoggleCallback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(gendertoggleCallback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(aligntoggleCallback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(plsel_random_btn_callback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(plsel_play_btn_callback, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(plsel_quit_btn_callback, (Widget, XtPointer, XtPointer));
|
||||
static Widget FDECL(X11_create_player_selection_name, (Widget));
|
||||
static void NDECL(X11_player_selection_dialog);
|
||||
static void NDECL(X11_player_selection_prompts);
|
||||
static void FDECL(ps_quit, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(ps_random, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(ps_select, (Widget, XtPointer, XtPointer));
|
||||
@@ -106,9 +121,6 @@ static Widget FDECL(make_menu, (const char *, const char *, const char *,
|
||||
XtCallbackProc, int, const char **,
|
||||
Widget **, XtCallbackProc, Widget *));
|
||||
|
||||
void NDECL(X11_player_selection_setupOthers);
|
||||
void NDECL(X11_player_selection_randomize);
|
||||
|
||||
/* Bad Hack alert. Using integers instead of XtPointers */
|
||||
XtPointer
|
||||
i2xtp(i)
|
||||
@@ -348,7 +360,7 @@ Widget plsel_name_input;
|
||||
|
||||
Widget plsel_btn_play;
|
||||
|
||||
void
|
||||
static void
|
||||
plsel_dialog_acceptvalues()
|
||||
{
|
||||
Arg args[2];
|
||||
@@ -431,7 +443,7 @@ Cardinal *num_params;
|
||||
}
|
||||
|
||||
/* enable or disable the Play button */
|
||||
void
|
||||
static void
|
||||
plsel_set_play_button(state)
|
||||
boolean state;
|
||||
{
|
||||
@@ -441,7 +453,7 @@ boolean state;
|
||||
XtSetValues(plsel_btn_play, args, ONE);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
plsel_set_sensitivities(setcurr)
|
||||
boolean setcurr;
|
||||
{
|
||||
@@ -495,7 +507,7 @@ boolean setcurr;
|
||||
X11_player_selection_setupOthers();
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
X11_player_selection_randomize()
|
||||
{
|
||||
int nrole = plsel_n_roles;
|
||||
@@ -582,7 +594,7 @@ X11_player_selection_randomize()
|
||||
plsel_set_sensitivities(FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
X11_player_selection_setupOthers()
|
||||
{
|
||||
Arg args[2];
|
||||
@@ -789,7 +801,7 @@ XtPointer call;
|
||||
exit_x_event = TRUE; /* leave event loop */
|
||||
}
|
||||
|
||||
Widget
|
||||
static Widget
|
||||
X11_create_player_selection_name(form)
|
||||
Widget form;
|
||||
{
|
||||
@@ -852,7 +864,7 @@ Widget form;
|
||||
return name_vp;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
X11_player_selection_dialog()
|
||||
{
|
||||
Widget popup, popup_vp;
|
||||
@@ -1277,8 +1289,7 @@ X11_player_selection_dialog()
|
||||
}
|
||||
}
|
||||
|
||||
/* Global functions ======================================================== */
|
||||
void
|
||||
static void
|
||||
X11_player_selection_prompts()
|
||||
{
|
||||
int num_roles, num_races, num_gends, num_algns, i, availcount, availindex;
|
||||
@@ -1564,6 +1575,8 @@ X11_player_selection_prompts()
|
||||
}
|
||||
}
|
||||
|
||||
/* Global functions ======================================================== */
|
||||
|
||||
void
|
||||
X11_player_selection()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user