[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/src/arshell interface_file.c
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/src/arshell interface_file.c |
Date: |
Sun, 31 Jul 2005 12:18:57 -0400 |
CVSROOT: /cvsroot/antiright
Module name: antiright
Branch:
Changes by: Jeffrey Bedard <address@hidden> 05/07/31 16:18:57
Modified files:
src/arshell : interface_file.c
Log message:
Reindented. Removed requirement for HAVE_YACLIB definition, as it is
included with antiright.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/arshell/interface_file.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: antiright/src/arshell/interface_file.c
diff -u antiright/src/arshell/interface_file.c:1.9
antiright/src/arshell/interface_file.c:1.10
--- antiright/src/arshell/interface_file.c:1.9 Sat Jul 23 17:10:09 2005
+++ antiright/src/arshell/interface_file.c Sun Jul 31 16:18:57 2005
@@ -21,184 +21,193 @@
*/
#include "arshell.h"
-#ifdef HAVE_YACLIB
#include "../../yaclib/yaclib.h"
void
-arshell_interface_system_cb(Widget widget, XtPointer client_data,
- XtPointer call_data)
+arshell_interface_system_cb (Widget widget, XtPointer client_data,
+ XtPointer call_data)
{
char *name;
- call_data=NULL;
- client_data=NULL;
+ call_data = NULL;
+ client_data = NULL;
ARCLARG;
- antiright_set(XtNname, (XtArgVal)&name);
- antiright_get_values(widget);
- antiright_system(name);
- XtFree(name);
-
+ antiright_set (XtNname, (XtArgVal) & name);
+ antiright_get_values (widget);
+ antiright_system (name);
+ XtFree (name);
+
}
int
-arshell_interface_button_cb(yacl_list *call_data)
+arshell_interface_button_cb (yacl_list * call_data)
{
Widget button;
- arshell_row_layout();
- button=antiright_button(arshell.gui.layout.row_widget, call_data->data,
- arshell_interface_system_cb, call_data->data);
- antiright_set_tooltip(button, call_data->data);
- arshell_beautify_label(button, call_data->data);
- return(0);
+ arshell_row_layout ();
+ button = antiright_button (arshell.gui.layout.row_widget, call_data->data,
+ arshell_interface_system_cb, call_data->data);
+ antiright_set_tooltip (button, call_data->data);
+ arshell_beautify_label (button, call_data->data);
+ return (0);
}
+
int
-arshell_interface_obutton_cb(yacl_list *call_data)
+arshell_interface_obutton_cb (yacl_list * call_data)
{
Widget button;
char *command;
- arshell_row_layout();
- asprintf(&command, "%s %s",
- (char*)call_data->data, (char*)call_data->next->data);
- button=antiright_button(arshell.gui.layout.row_widget, command,
- arshell_interface_system_cb, command);
- antiright_set_tooltip(button, command);
- arshell_beautify_label(button, command);
- free(command);
- return(0);
+ arshell_row_layout ();
+ asprintf (&command, "%s %s",
+ (char *) call_data->data, (char *) call_data->next->data);
+ button = antiright_button (arshell.gui.layout.row_widget, command,
+ arshell_interface_system_cb, command);
+ antiright_set_tooltip (button, command);
+ arshell_beautify_label (button, command);
+ free (command);
+ return (0);
}
+
int
-arshell_interface_status_cb(yacl_list *call_data)
+arshell_interface_status_cb (yacl_list * call_data)
{
- call_data=NULL;
- puts("status");
- antiright_create_status_bar(arshell.gui.widgets.mainwindow);
- return(0);
+ call_data = NULL;
+ puts ("status");
+ antiright_create_status_bar (arshell.gui.widgets.mainwindow);
+ return (0);
}
+
int
-arshell_interface_menubar_cb(yacl_list *call_data)
+arshell_interface_menubar_cb (yacl_list * call_data)
{
- call_data=NULL;
- arshell_default_menubar_action();
- return(0);
+ call_data = NULL;
+ arshell_default_menubar_action ();
+ return (0);
}
+
int
-arshell_interface_label_cb(yacl_list *call_data)
+arshell_interface_label_cb (yacl_list * call_data)
{
- antiright_label(arshell.gui.widgets.row, call_data->data);
- return(0);
+ antiright_label (arshell.gui.widgets.row, call_data->data);
+ return (0);
}
+
int
-arshell_interface_field_cb(yacl_list *call_data)
+arshell_interface_field_cb (yacl_list * call_data)
{
- int counter_int=0;
- char **argv=NULL;
- argv[0]=call_data->data;
- arshell_create_default_text_entry(arshell.gui.widgets.row,
- &counter_int, argv);
- return(0);
+ int counter_int = 0;
+ char **argv = NULL;
+ argv[0] = call_data->data;
+ arshell_create_default_text_entry (arshell.gui.widgets.row,
+ &counter_int, argv);
+ return (0);
}
+
int
-arshell_interface_icon_cb(yacl_list *call_data)
+arshell_interface_icon_cb (yacl_list * call_data)
{
Widget button;
- arshell_transparency_hack();
- arshell_row_layout();
- button=antiright_button(arshell.gui.layout.row_widget, call_data->data,
- arshell_interface_system_cb, call_data->data);
- antiright_set_bitmap_from_file(button, call_data->next->data);
- return(0);
+ arshell_transparency_hack ();
+ arshell_row_layout ();
+ button = antiright_button (arshell.gui.layout.row_widget, call_data->data,
+ arshell_interface_system_cb, call_data->data);
+ antiright_set_bitmap_from_file (button, call_data->next->data);
+ return (0);
}
+
int
-arshell_interface_oicon_cb(yacl_list *call_data)
+arshell_interface_oicon_cb (yacl_list * call_data)
{
Widget button;
char *command;
- asprintf(&command, "%s %s",
- (char*)call_data->data, (char*)call_data->next->data);
- arshell_transparency_hack();
- arshell_row_layout();
- button=antiright_button(arshell.gui.layout.row_widget, command,
- arshell_interface_system_cb, command);
- free(command);
- antiright_set_bitmap_from_file(button, call_data->next->next->data);
- return(0);
+ asprintf (&command, "%s %s",
+ (char *) call_data->data, (char *) call_data->next->data);
+ arshell_transparency_hack ();
+ arshell_row_layout ();
+ button = antiright_button (arshell.gui.layout.row_widget, command,
+ arshell_interface_system_cb, command);
+ free (command);
+ antiright_set_bitmap_from_file (button, call_data->next->next->data);
+ return (0);
}
+
int
-arshell_interface_color_cb(yacl_list *call_data)
+arshell_interface_color_cb (yacl_list * call_data)
{
- call_data=NULL;
- arshell_color_widget(arshell.gui.widgets.row);
- return(0);
+ call_data = NULL;
+ arshell_color_widget (arshell.gui.widgets.row);
+ return (0);
}
+
int
-arshell_interface_work_cb(yacl_list *call_data)
+arshell_interface_work_cb (yacl_list * call_data)
{
- call_data=NULL;
- arshell_create_text_work_area();
- return(0);
+ call_data = NULL;
+ arshell_create_text_work_area ();
+ return (0);
}
+
void
-arshell_parse_interface_file(char *filename)
+arshell_parse_interface_file (char *filename)
{
- /* char *a="one", *b="two", *c="three";*/
- yacl_list *grammar=(yacl_list *)xmalloc(sizeof(yacl_list));
+ /* char *a="one", *b="two", *c="three"; */
+ yacl_list *grammar = (yacl_list *) xmalloc (sizeof (yacl_list));
struct yaclib_parse_rule rule;
- L_INIT_PTR(grammar);
+ L_INIT_PTR (grammar);
- rule.identifier="button";
- rule.parameters=1;
- rule.callback=&arshell_interface_button_cb;
- yaclib_add_rule(grammar, &rule);
+ rule.identifier = "button";
+ rule.parameters = 1;
+ rule.callback = &arshell_interface_button_cb;
+ yaclib_add_rule (grammar, &rule);
/* This creates an optioned button. */
- rule.identifier="obutton";
- rule.parameters=2;
- rule.callback=&arshell_interface_button_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="label";
- rule.parameters=1;
- rule.callback=&arshell_interface_label_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="menubar";
- rule.parameters=0;
- rule.callback=&arshell_interface_menubar_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="color_selector";
- rule.parameters=0;
- rule.callback=&arshell_interface_color_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="work";
- rule.parameters=0;
- rule.callback=&arshell_interface_work_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="status";
- rule.parameters=0;
- rule.callback=&arshell_interface_status_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="field";
- rule.parameters=1;
- rule.callback=&arshell_interface_field_cb;
- yaclib_add_rule(grammar, &rule);
-
- rule.identifier="icon";
- rule.parameters=2;
- rule.callback=&arshell_interface_icon_cb;
- yaclib_add_rule(grammar, &rule);
+ rule.identifier = "obutton";
+ rule.parameters = 2;
+ rule.callback = &arshell_interface_button_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "label";
+ rule.parameters = 1;
+ rule.callback = &arshell_interface_label_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "menubar";
+ rule.parameters = 0;
+ rule.callback = &arshell_interface_menubar_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "color_selector";
+ rule.parameters = 0;
+ rule.callback = &arshell_interface_color_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "work";
+ rule.parameters = 0;
+ rule.callback = &arshell_interface_work_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "status";
+ rule.parameters = 0;
+ rule.callback = &arshell_interface_status_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "field";
+ rule.parameters = 1;
+ rule.callback = &arshell_interface_field_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ rule.identifier = "icon";
+ rule.parameters = 2;
+ rule.callback = &arshell_interface_icon_cb;
+ yaclib_add_rule (grammar, &rule);
/* This creates an optioned icon button. */
- rule.identifier="oicon";
- rule.parameters=3;
- rule.callback=&arshell_interface_oicon_cb;
- yaclib_add_rule(grammar, &rule);
-
- yaclib_end_grammar(&grammar);
- yaclib_print_grammar(grammar);
- yaclib_parse_file(filename, grammar);
- l_free(&grammar);
+ rule.identifier = "oicon";
+ rule.parameters = 3;
+ rule.callback = &arshell_interface_oicon_cb;
+ yaclib_add_rule (grammar, &rule);
+
+ yaclib_end_grammar (&grammar);
+ yaclib_print_grammar (grammar);
+ yaclib_parse_file (filename, grammar);
+ l_free (&grammar);
}
-#endif /* HAVE_YACLIB */
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright/src/arshell interface_file.c,
Jeffrey Bedard <=