switch source tree from k&r to c99
This commit is contained in:
+18
-49
@@ -48,16 +48,12 @@ static const char rip_translations[] = "#override\n\
|
||||
<BtnDown>: rip_dismiss_text()\n\
|
||||
<Key>: rip_dismiss_text()";
|
||||
|
||||
static Widget FDECL(create_ripout_widget, (Widget));
|
||||
static Widget create_ripout_widget(Widget);
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
delete_text(w, event, params, num_params)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
delete_text(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
{
|
||||
struct xwindow *wp;
|
||||
struct text_info_t *text_info;
|
||||
@@ -85,11 +81,7 @@ Cardinal *num_params;
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
dismiss_text(w, event, params, num_params)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
dismiss_text(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
{
|
||||
struct xwindow *wp;
|
||||
struct text_info_t *text_info;
|
||||
@@ -112,11 +104,7 @@ Cardinal *num_params;
|
||||
|
||||
/* Dismiss when a non-modifier key pressed. */
|
||||
void
|
||||
key_dismiss_text(w, event, params, num_params)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
key_dismiss_text(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
{
|
||||
char ch = key_event_to_char((XKeyEvent *) event);
|
||||
if (ch)
|
||||
@@ -126,11 +114,7 @@ Cardinal *num_params;
|
||||
#ifdef GRAPHIC_TOMBSTONE
|
||||
/* Dismiss from clicking on rip image. */
|
||||
void
|
||||
rip_dismiss_text(w, event, params, num_params)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
String *params;
|
||||
Cardinal *num_params;
|
||||
rip_dismiss_text(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
||||
{
|
||||
dismiss_text(XtParent(w), event, params, num_params);
|
||||
}
|
||||
@@ -138,10 +122,8 @@ Cardinal *num_params;
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
add_to_text_window(wp, attr, str)
|
||||
struct xwindow *wp;
|
||||
int attr; /* currently unused */
|
||||
const char *str;
|
||||
add_to_text_window(struct xwindow *wp, int attr, /* currently unused */
|
||||
const char *str)
|
||||
{
|
||||
struct text_info_t *text_info = wp->text_information;
|
||||
int width;
|
||||
@@ -157,9 +139,7 @@ const char *str;
|
||||
}
|
||||
|
||||
void
|
||||
display_text_window(wp, blocking)
|
||||
struct xwindow *wp;
|
||||
boolean blocking;
|
||||
display_text_window(struct xwindow *wp, boolean blocking)
|
||||
{
|
||||
struct text_info_t *text_info;
|
||||
Arg args[8];
|
||||
@@ -258,8 +238,7 @@ boolean blocking;
|
||||
}
|
||||
|
||||
void
|
||||
create_text_window(wp)
|
||||
struct xwindow *wp;
|
||||
create_text_window(struct xwindow *wp)
|
||||
{
|
||||
struct text_info_t *text_info;
|
||||
Arg args[8];
|
||||
@@ -341,8 +320,7 @@ struct xwindow *wp;
|
||||
}
|
||||
|
||||
void
|
||||
destroy_text_window(wp)
|
||||
struct xwindow *wp;
|
||||
destroy_text_window(struct xwindow *wp)
|
||||
{
|
||||
/* Don't need to pop down, this only called from dismiss_text(). */
|
||||
|
||||
@@ -365,8 +343,7 @@ struct xwindow *wp;
|
||||
}
|
||||
|
||||
void
|
||||
clear_text_window(wp)
|
||||
struct xwindow *wp;
|
||||
clear_text_window(struct xwindow *wp)
|
||||
{
|
||||
clear_text_buffer(&wp->text_information->text);
|
||||
}
|
||||
@@ -376,10 +353,7 @@ struct xwindow *wp;
|
||||
|
||||
/* Append a line to the text buffer. */
|
||||
void
|
||||
append_text_buffer(tb, str, concat)
|
||||
struct text_buffer *tb;
|
||||
const char *str;
|
||||
boolean concat;
|
||||
append_text_buffer(struct text_buffer *tb, const char *str, boolean concat)
|
||||
{
|
||||
char *copy;
|
||||
int length;
|
||||
@@ -436,8 +410,7 @@ boolean concat;
|
||||
|
||||
/* Initialize text buffer. */
|
||||
void
|
||||
init_text_buffer(tb)
|
||||
struct text_buffer *tb;
|
||||
init_text_buffer(struct text_buffer *tb)
|
||||
{
|
||||
tb->text = (char *) alloc(START_SIZE);
|
||||
tb->text[0] = '\0';
|
||||
@@ -448,8 +421,7 @@ struct text_buffer *tb;
|
||||
|
||||
/* Empty the text buffer */
|
||||
void
|
||||
clear_text_buffer(tb)
|
||||
struct text_buffer *tb;
|
||||
clear_text_buffer(struct text_buffer *tb)
|
||||
{
|
||||
tb->text_last = 0;
|
||||
tb->text[0] = '\0';
|
||||
@@ -458,8 +430,7 @@ struct text_buffer *tb;
|
||||
|
||||
/* Free up allocated memory. */
|
||||
void
|
||||
free_text_buffer(tb)
|
||||
struct text_buffer *tb;
|
||||
free_text_buffer(struct text_buffer *tb)
|
||||
{
|
||||
free(tb->text);
|
||||
tb->text = (char *) 0;
|
||||
@@ -470,7 +441,7 @@ struct text_buffer *tb;
|
||||
|
||||
#ifdef GRAPHIC_TOMBSTONE
|
||||
|
||||
static void FDECL(rip_exposed, (Widget, XtPointer, XtPointer));
|
||||
static void rip_exposed(Widget, XtPointer, XtPointer);
|
||||
|
||||
static XImage *rip_image = 0;
|
||||
|
||||
@@ -538,10 +509,8 @@ calculate_rip_text(int how, time_t when)
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
rip_exposed(w, client_data, widget_data)
|
||||
Widget w;
|
||||
XtPointer client_data UNUSED;
|
||||
XtPointer widget_data; /* expose event from Window widget */
|
||||
rip_exposed(Widget w, XtPointer client_data UNUSED,
|
||||
XtPointer widget_data) /* expose event from Window widget */
|
||||
{
|
||||
XExposeEvent *event = (XExposeEvent *) widget_data;
|
||||
Display *dpy = XtDisplay(w);
|
||||
|
||||
Reference in New Issue
Block a user