switch source tree from k&r to c99

This commit is contained in:
nhmall
2021-01-26 21:06:16 -05:00
parent a2a9cb7b4f
commit f963c5aca7
232 changed files with 12099 additions and 17782 deletions
+10 -25
View File
@@ -32,9 +32,7 @@
#define WVALUE "value"
Widget
create_value(parent, name_value)
Widget parent;
const char *name_value;
create_value(Widget parent, const char *name_value)
{
Widget form, name;
Arg args[8];
@@ -75,9 +73,7 @@ const char *name_value;
}
void
set_name(w, new_label)
Widget w;
const char *new_label;
set_name(Widget w, const char *new_label)
{
Arg args[1];
Widget name;
@@ -88,9 +84,7 @@ const char *new_label;
}
void
set_name_width(w, new_width)
Widget w;
int new_width;
set_name_width(Widget w, int new_width)
{
Arg args[1];
Widget name;
@@ -101,8 +95,7 @@ int new_width;
}
int
get_name_width(w)
Widget w;
get_name_width(Widget w)
{
Arg args[1];
Dimension width;
@@ -115,16 +108,13 @@ Widget w;
}
Widget
get_value_widget(w)
Widget w;
get_value_widget(Widget w)
{
return XtNameToWidget(w, WVALUE);
}
void
set_value(w, new_value)
Widget w;
const char *new_value;
set_value(Widget w, const char *new_value)
{
Arg args[1];
Widget val;
@@ -135,9 +125,7 @@ const char *new_value;
}
void
set_value_width(w, new_width)
Widget w;
int new_width;
set_value_width(Widget w, int new_width)
{
Arg args[1];
Widget val;
@@ -148,8 +136,7 @@ int new_width;
}
int
get_value_width(w)
Widget w;
get_value_width(Widget w)
{
Arg args[1];
Widget val;
@@ -164,16 +151,14 @@ Widget w;
/* Swap foreground and background colors (this is the best I can do with */
/* a label widget, unless I can get some init hook in there). */
void
hilight_value(w)
Widget w;
hilight_value(Widget w)
{
swap_fg_bg(get_value_widget(w));
}
/* Swap the foreground and background colors of the given widget */
void
swap_fg_bg(w)
Widget w;
swap_fg_bg(Widget w)
{
Arg args[2];
Pixel fg, bg;