summaryrefslogtreecommitdiff
path: root/makeform.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:15 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:15 +0000
commit9ba02b5d7b34eba8356dfcb83694698dbc550073 (patch)
tree9df4cb951aa1ca966fc79a550d73bbc2637f65f5 /makeform.c
parent6dcad3b7ba5983633e4303c22446c3de8922c003 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330
Diffstat (limited to 'makeform.c')
-rw-r--r--makeform.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/makeform.c b/makeform.c
index 3820ebb..41b6707 100644
--- a/makeform.c
+++ b/makeform.c
@@ -28,7 +28,7 @@ other dealings in this Software without prior written authorization
from the X Consortium.
*/
-/* $XFree86: xc/programs/xmessage/makeform.c,v 1.6 2002/11/22 03:56:39 paulo Exp $ */
+/* $XFree86: xc/programs/xmessage/makeform.c,v 1.7 2003/04/14 23:03:13 herrb Exp $ */
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
@@ -42,8 +42,7 @@ from the X Consortium.
#include <X11/Xaw/Label.h>
#include <X11/Xaw/Scrollbar.h>
-extern const char *ProgramName;
-extern int default_exitstatus;
+#include "xmessage.h"
typedef struct _ButtonRecord {
char *name;
@@ -52,15 +51,14 @@ typedef struct _ButtonRecord {
Widget widget;
} ButtonRecord;
-static void unquote_pairs (br, n)
- register ButtonRecord *br;
- int n;
+static void
+unquote_pairs (ButtonRecord *br, int n)
{
int i;
for (i = 0; i < n; i++) {
- register char *dst, *src;
- register int quoted = 0;
+ char *dst, *src;
+ int quoted = 0;
for (src = dst = br->name; *src; src++) {
if (quoted) {
@@ -82,11 +80,10 @@ static void unquote_pairs (br, n)
* sets brptr to point to parsed table
* returns 0 if successful, -1 if not
*/
-static int parse_name_and_exit_code_list (buttonlist, brptr)
- char *buttonlist;
- ButtonRecord **brptr;
+static int
+parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr)
{
- register char *cp;
+ char *cp;
int shouldfind = 0, npairs = 0;
int default_exitcode = 100;
int quoted = 0;
@@ -199,10 +196,8 @@ static int parse_name_and_exit_code_list (buttonlist, brptr)
}
/* ARGSUSED */
-static void handle_button (w, closure, client_data)
- Widget w;
- XtPointer closure;
- XtPointer client_data;
+static void
+handle_button (Widget w, XtPointer closure, XtPointer client_data)
{
ButtonRecord *br = (ButtonRecord *) closure;
@@ -211,17 +206,15 @@ static void handle_button (w, closure, client_data)
exit (br->exitstatus);
}
-Widget make_queryform(parent, msgstr, msglen,
- button_list, print_value, default_button,
- max_width, max_height)
- Widget parent; /* into whom widget should be placed */
- char *msgstr; /* message string */
- int msglen; /* characters in msgstr */
- char *button_list; /* list of button title:status */
- Boolean print_value; /* print button string on stdout? */
- char *default_button; /* button activated by Return */
- Dimension max_width;
- Dimension max_height;
+Widget
+make_queryform(Widget parent, /* into whom widget should be placed */
+ char *msgstr, /* message string */
+ int msglen, /* characters in msgstr */
+ char *button_list, /* list of button title:status */
+ Boolean print_value, /* print button string on stdout? */
+ char *default_button, /* button activated by Return */
+ Dimension max_width,
+ Dimension max_height)
{
ButtonRecord *br;
int npairs, i;