/[antiright]/antiright/src/arshell/arguments.c
ViewVC logotype

Diff of /antiright/src/arshell/arguments.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by jefbed, Sat Feb 12 17:57:42 2005 UTC revision 1.18 by jefbed, Sat Jun 4 01:02:10 2005 UTC
# Line 33  arshell_add_lower_button() Line 33  arshell_add_lower_button()
33    antiright_set_tooltip(button, "Lower the panel.");    antiright_set_tooltip(button, "Lower the panel.");
34  }  }
35  void  void
36    arshell_handle_graph_arguments(int *counter_int, char **argv)
37    {
38      switch(argv[(*counter_int)][3])
39        {
40        case 'e': /* Graph an equation, using the output of the passed
41                     program.  */
42          (*counter_int)++;
43          antiright_graph_equation(argv[(*counter_int)]);
44          break;
45        case 's': /* Display a number system output by the passed
46                     program.  */
47          (*counter_int)++;
48          antiright_graph_system(argv[(*counter_int)]);
49          break;
50        case 'l': /* Draw a line.  */
51          (*counter_int)++;
52          antiright_graph_line(atoi(argv[(*counter_int)]),
53                               atoi(argv[(*counter_int)+1]),
54                               atoi(argv[(*counter_int)+2]),
55                               atoi(argv[(*counter_int)+3]));
56          (*counter_int)+=3;
57          break;
58        case 'p': /* Plot a point.  */
59          (*counter_int)++;
60          antiright_graph_point(atoi(argv[(*counter_int)]),
61                                atoi(argv[(*counter_int)+1]));
62          (*counter_int)++;
63          ARBUG;
64          break;
65        case 'r': /* Graph a rectangle.  */
66          (*counter_int)++;
67          antiright_graph_rect(atoi(argv[(*counter_int)]),
68                               atoi(argv[(*counter_int)+1]),
69                               atoi(argv[(*counter_int)+2]),
70                               atoi(argv[(*counter_int)+3]));
71          (*counter_int)+=3;
72          break;
73        }
74    }
75    
76    void
77  arshell_handle_construction_arguments(int *counter_int, char **argv)  arshell_handle_construction_arguments(int *counter_int, char **argv)
78  {  {
79    switch(argv[(*counter_int)][2])    switch(argv[(*counter_int)][2])
# Line 49  arshell_handle_construction_arguments(in Line 90  arshell_handle_construction_arguments(in
90      case 'D': /* Add a dialog.  */      case 'D': /* Add a dialog.  */
91        arshell_handle_dialog_arguments(counter_int, argv);        arshell_handle_dialog_arguments(counter_int, argv);
92        break;        break;
93        case 'g': /* Add a graphing widget.  */
94          arshell_handle_graph_arguments(counter_int, argv);
95          arshell.use_graph=True;
96          break;
97      case 'i': /* Add an icon without a label.  */      case 'i': /* Add an icon without a label.  */
98        arshell_add_icon_button(counter_int, argv);        arshell_add_icon_button(counter_int, argv);
99        break;        break;
# Line 121  arshell_process_options(int *counter_int Line 166  arshell_process_options(int *counter_int
166      {      {
167      case 'A': /* This section adds a widget.  */      case 'A': /* This section adds a widget.  */
168        arshell_handle_construction_arguments(counter_int, argv);        arshell_handle_construction_arguments(counter_int, argv);
169          ARBUG;
170        break;        break;
171      case 'E': /* Exit when a button is pressed.  */      case 'E': /* Exit when a button is pressed.  */
172        arshell.flags.exit_on_action=True;        arshell.flags.exit_on_action=True;
# Line 176  arshell_handle_command_line_arguments(in Line 222  arshell_handle_command_line_arguments(in
222    for(counter_int=1; counter_int < (*argc); counter_int++)    for(counter_int=1; counter_int < (*argc); counter_int++)
223    {    {
224      if(argv[counter_int][0] == '-')      if(argv[counter_int][0] == '-')
225        arshell_process_options(&counter_int, argv);        {
226            arshell_process_options(&counter_int, argv);
227          }
228      else      else
229        arshell_process_non_option_arguments(&counter_int, argv);        {
230    }            arshell_process_non_option_arguments(&counter_int, argv);
231          }
232        ARBUG;
233        printf("counter_int: %d\n", counter_int);
234        fflush(stdout);
235      }  
236      ARBUG;
237  }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26