11 #include <sys/types.h>
17 #define BCTEXTLEN 1024
24 char *command_line = "ls -l -s -S -r";
25 char *arguments[MAX_ARGS];
31 char *ptr = command_line;
33 char argument[BCTEXTLEN];
37 while(*ptr != ' ' && *ptr != 0)
43 arguments[total_arguments] = new char[strlen(path) + 1];
44 strcpy(arguments[total_arguments], path);
45 printf("%s\n", arguments[total_arguments]);
47 arguments[total_arguments] = 0;
52 argument_ptr = argument;
53 while(*ptr != ' ' && *ptr != 0)
55 *argument_ptr++ = *ptr++;
58 printf("%s\n", argument);
60 arguments[total_arguments] = new char[strlen(argument) + 1];
61 strcpy(arguments[total_arguments], argument);
63 arguments[total_arguments] = 0;
67 stdin_fd = fdopen(filedes[1], "w");
73 dup2(filedes[0], fileno(stdin));
74 execvp(path, arguments);
81 if(waitpid(pid, &return_value, WUNTRACED) == -1)
88 printf("Finished.\n");
97 class TestWindow : public BC_Window
100 TestWindow() : BC_Window("test",
122 switch(get_keypress())
126 if(current_cursor >= XC_num_glyphs) current_cursor = 0;
131 if(current_cursor <= 0) current_cursor = XC_num_glyphs - 1;
134 printf("%d\n", current_cursor);
135 set_x_cursor(current_cursor);
141 int main(int argc, char *argv[])
145 int angles[] = { 180, 0 };
146 float values[] = { 1, 0 };
148 window.add_tool(new BC_Pan(10,
157 window.add_tool(new BC_TextBox(10, 10, 200, 5, _("Mary Egbert\nhad a little lamb.")));
159 window.add_tool(title = new BC_Title(10, 210, _("Hello world")));
160 title->update("xyz");
161 window.show_window();
164 title->update("abc");