1 #include "ace/Get_Opt.h"
2 #include "ace/Log_Msg.h"
5 #include "ace/OS_NS_string.h"
9 Options::parse_args (int argc
, ACE_TCHAR
*argv
[])
11 //FUZZ: disable check_for_lack_ACE_OS
12 ACE_Get_Opt
getopt (argc
, argv
, ACE_TEXT ("df:h:i:l:rt:u:vo:p:"));
13 //FUZZ: enable check_for_lack_ACE_OS
15 ACE_LOG_MSG
->open (argv
[0]);
17 this->hostname_
= ACE_TEXT ("www.cs.wustl.edu");
18 this->uri_
= ACE_TEXT ("index.html");
21 this->timeout_
.sec (ACE_DEFAULT_TIMEOUT
);
22 this->url_filter_
= 0;
24 this->order_
= ACE_TEXT ("FIFO");
25 this->port_no_
= ACE_DEFAULT_HTTP_PORT
;
27 // The default is to make this limit as large as possible.
28 this->handle_limit_
= -1;
30 //FUZZ: disable check_for_lack_ACE_OS
32 (c
= getopt ()) != EOF
;
34 //FUZZ: enable check_for_lack_ACE_OS
41 this->url_filter_
= getopt
.opt_arg ();
44 this->hostname_
= getopt
.opt_arg ();
47 this->uri_
= getopt
.opt_arg ();
50 this->handle_limit_
= ACE_OS::atoi (getopt
.opt_arg ());
56 this->timeout_
.sec (ACE_OS::atoi (getopt
.opt_arg ()));
60 this->hostname_
= getopt
.opt_arg ();
61 ACE_TCHAR
*s
= ACE_OS::strchr (getopt
.opt_arg (), ACE_TEXT ('/'));
69 ACE_TEXT ("invalid URL %s\n"),
78 this->order_
= getopt
.opt_arg ();
82 this->port_no_
= ACE_OS::atoi (getopt
.opt_arg ());
86 ACE_TEXT ("usage: %n [-d] [-f filter] [-h hostname]")
87 ACE_TEXT (" [-l handle-limit] [-r] [-t timeout] [-u URI]")
88 ACE_TEXT (" [-v]\n%a"),
98 Options::port_no () const
100 return this->port_no_
;
104 Options::recurse () const
106 return this->recurse_
;
109 const ACE_Time_Value
*
110 Options::timeout () const
112 return &this->timeout_
;
116 Options::debug () const
122 Options::verbose () const
124 return this->verbose_
;
128 Options::order () const
133 Options::hostname () const
135 return this->hostname_
;
139 Options::path_name () const
145 Options::url_filter () const
147 return this->url_filter_
;
151 Options::command_processor () const
153 return this->command_processor_
;
157 Options::command_processor (Command_Processor
*cp
)
159 this->command_processor_
= cp
;
163 Options::visitor () const
165 return this->visitor_
;
169 Options::visitor (URL_Visitor
*v
)
175 Options::handle_limit ()
177 return this->handle_limit_
;