12 #include <sys/types.h>
18 #define BCTEXTLEN 1024
25 char *command_line = "ls -l -s -S -r";
26 char *arguments[MAX_ARGS];
32 char *ptr = command_line;
34 char argument[BCTEXTLEN];
38 while(*ptr != ' ' && *ptr != 0)
44 arguments[total_arguments] = new char[strlen(path) + 1];
45 strcpy(arguments[total_arguments], path);
46 printf("%s\n", arguments[total_arguments]);
48 arguments[total_arguments] = 0;
53 argument_ptr = argument;
54 while(*ptr != ' ' && *ptr != 0)
56 *argument_ptr++ = *ptr++;
59 printf("%s\n", argument);
61 arguments[total_arguments] = new char[strlen(argument) + 1];
62 strcpy(arguments[total_arguments], argument);
64 arguments[total_arguments] = 0;
68 stdin_fd = fdopen(filedes[1], "w");
74 dup2(filedes[0], fileno(stdin));
75 execvp(path, arguments);
82 if(waitpid(pid, &return_value, WUNTRACED) == -1)
89 printf("Finished.\n");
98 class TestWindow : public BC_Window
101 TestWindow() : BC_Window("test",
124 switch(get_keypress())
128 if(current_cursor >= XC_num_glyphs) current_cursor = 0;
133 if(current_cursor <= 0) current_cursor = XC_num_glyphs - 1;
136 printf("%d\n", current_cursor);
137 // set_x_cursor(current_cursor);
138 set_cursor(TRANSPARENT_CURSOR);
144 int main(int argc, char *argv[])
148 int angles[] = { 180, 0 };
149 float values[] = { 1, 0 };
151 window.add_tool(new BC_Pan(10,
160 window.add_tool(new BC_TextBox(10, 10, 200, 5, _("Mary Egbert\nhad a little lamb.")));
162 window.add_tool(title = new BC_Title(10, 210, _("Hello world")));
163 title->update("xyz");
164 window.show_window();
167 title->update("abc");