/[pengfork]/pengfork/src/options.c
ViewVC logotype

Diff of /pengfork/src/options.c

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

revision 1.30 by chupa, Sat Dec 7 14:01:24 2002 UTC revision 1.31 by chupa, Fri Dec 13 15:29:15 2002 UTC
# Line 52  Line 52 
52  #if HAVE_UNISTD_H  #if HAVE_UNISTD_H
53  # include <unistd.h>  # include <unistd.h>
54  #endif  #endif
55  #ifdef WITH_MODEM  #if ENABLE_MODEM
56  # if HAVE_GUILE_GH_H  # if HAVE_GUILE_GH_H
57  #  include <guile/gh.h>  #  include <guile/gh.h>
58  # endif  # endif
# Line 67  Line 67 
67  #include "log.h"  #include "log.h"
68    
69  enum  enum
70  { __general, __auth, __modem, __cable, __tcpip, __netiface, __sect_end };  { __general, __auth, __modem, __dsl, __cable, __tcpip, __netiface, __sect_end };
71  char *section_name[__sect_end];  char *section_name[__sect_end];
72    
73  param_t param[PARAM_MAX];  param_t param[PARAM_MAX];
# Line 100  init_parameters (void) Line 100  init_parameters (void)
100      gettext ("General properties"),      gettext ("General properties"),
101      gettext ("User authentification"),      gettext ("User authentification"),
102      gettext ("Modem properties"),      gettext ("Modem properties"),
103        gettext ("DSL properties"),
104      gettext ("Cable properties"),      gettext ("Cable properties"),
105      gettext ("TCP/IP properties"),      gettext ("TCP/IP properties"),
106      gettext ("Network interface properties")      gettext ("Network interface properties")
# Line 114  init_parameters (void) Line 115  init_parameters (void)
115    
116    param_t params[PARAM_MAX] =  {    param_t params[PARAM_MAX] =  {
117      /* GENERAL CONFIGURATION */      /* GENERAL CONFIGURATION */
118      STR ('f', "config-file", NULL, CONFDIR "/" PACKAGE ".cfg",      STR ('f', "config-file", NULL, DEFAULT_CONFIG_FILE,
119           gettext ("read configuration file PATH."), "PATH",           gettext ("reads configuration file PATH."), "PATH",
120           __general, NULL),           __general, NULL),
121      STR (0, "access-method", "access_method", "modem",      STR (0, "access-method", "access_method", "modem",
122           gettext ("set the media used to access AOL."), "METHOD",           gettext ("sets the access method for connecting AOL."), "METHOD",
123           __general, check_access_method),           __general, check_access_method),
124      STR (0, "protocol", "protocol", "p3",      STR (0, "protocol", "protocol", "p3",
125           gettext ("set the protocol used for communication with AOL."), "PROT",           gettext ("sets the protocol used for communication with AOL."), "PROT",
126           __general, check_protocol),           __general, check_protocol),
127      STR ('t', "interface-type", "interface_type", "tun",      STR ('t', "interface-type", "interface_type", "tun",
128           gettext ("set the interface type."), "TYPE",           gettext ("sets the interface type."), "TYPE",
129           __netiface, check_iface_type),           __netiface, check_iface_type),
130      STR ('i', "interface", "interface_name", NULL,      STR ('i', "interface", "interface_name", NULL,
131           gettext ("set the interface name."), "NAME",           gettext ("sets the interface name."), "NAME",
132           __netiface, NULL),           __netiface, NULL),
133      STR (0, NULL, "secret_file", CONFDIR "/aol-secrets",      STR (0, NULL, "secret_file", DEFAULT_SECRET_FILE,
134           NULL, NULL,           NULL, NULL,
135           __auth, NULL),           __auth, NULL),
136      STR ('s', "screen-name", "screen_name", NULL,      STR ('s', "screen-name", "screen_name", NULL,
137           gettext ("set the screen-name to use."), "SN",           gettext ("sets the screen-name to use."), "SN",
138           __auth, check_screen_name),           __auth, check_screen_name),
139      BOOL ('r', "auto-reconnect", "auto_reconnect", false,      BOOL ('r', "auto-reconnect", "auto_reconnect", false,
140          gettext ("enable autoreconnection."), NULL,          gettext ("enables autoreconnection."), NULL,
141          __general, NULL),          __general, NULL),
142      INT (0, "reconnect-delay", "reconnect_delay", 0,      INT (0, "reconnect-delay", "reconnect_delay", 5,
143           gettext ("set the delay between reconnections."), "DELAY",           gettext ("sets the delay between reconnections."), "DELAY",
144           __general, check_natural),           __general, check_natural),
145      BOOL ('d', "daemon", "daemon", false,      BOOL ('d', "daemon", "daemon", false,
146          gettext ("enable daemon mode, run in background."), NULL,          gettext ("enables daemon mode, run in background."), NULL,
147          __general, NULL),          __general, NULL),
148      INT ('D', "debug-level", "debug_level", 0,      INT ('D', "debug-level", "debug_level", 0,
149           gettext ("set the verbosity level of the debug."), "LEVEL",           gettext ("sets the verbosity level of the debug."), "LEVEL",
150           __general, check_debug_level),           __general, check_debug_level),
151      BOOL (0, "dns", "set_dns", true,      BOOL (0, "dns", "set_dns", true,
152          gettext ("set the dns when connected."), NULL,          gettext ("sets the dns when connected."), NULL,
153          __netiface, NULL),          __netiface, NULL),
154      STR (0, "pid-file", "pid_file", "/var/run/" PACKAGE ".pid",      STR (0, "pid-file", "pid_file", DEFAULT_PID_FILE,
155           gettext ("set the PID file to create"), "PATH",           gettext ("sets the PID file to create"), "PATH",
156           __general, NULL),           __general, NULL),
157      STR (0, "ip-up", "ip-up_script", CONFDIR "/ip-up",      STR (0, "ip-up", "ip-up_script", DEFAULT_IPUP_FILE,
158           gettext ("set the script automaticly called when IP is up."), "PATH",           gettext ("sets the script automaticly called when IP is up."), "PATH",
159           __netiface, NULL),           __netiface, NULL),
160      STR (0, "ip-down", "ip-down_script", CONFDIR "/ip-down",      STR (0, "ip-down", "ip-down_script", DEFAULT_IPDOWN_FILE,
161           gettext ("set the script automaticly called when IP is down."), "PATH",           gettext ("sets the script automaticly called when IP is down."), "PATH",
162           __netiface, NULL)           __netiface, NULL)
163    
164  #ifdef WITH_MODEM  #if ENABLE_MODEM
165      /* MODEM SPECIFIC */      /* MODEM SPECIFIC */
166      , STR ('m', "modem", "modem_device", "/dev/modem",      , STR ('m', "modem", "modem_device", "/dev/modem",
167           gettext ("set the serial device to use for the modem."), "PATH",           gettext ("sets the serial device to use for the modem."), "PATH",
168           __modem, NULL),           __modem, NULL),
169        STR (0, NULL, "lock_path", DEFAULT_LOCK_PATH,
170             NULL, NULL,
171             __modem, NULL),
172      BOOL (0, "rtscts", "rtscts", true,      BOOL (0, "rtscts", "rtscts", true,
173          gettext ("enable hardware flow control"), NULL,          gettext ("enables hardware flow control"), NULL,
174          __modem, NULL),          __modem, NULL),
175      STR (0, "init-str", "initstr1", "ATZ",      STR (0, "init-str", "initstr1", "ATZ",
176           gettext ("set the primary initialization string sent to the modem."), "STRING",           gettext ("sets the primary initialization string sent to the modem."), "STRING",
177           __modem, NULL),           __modem, NULL),
178      STR (0, NULL, "initstr2", NULL,      STR (0, NULL, "initstr2", NULL,
179           NULL, NULL,           NULL, NULL,
# Line 196  init_parameters (void) Line 200  init_parameters (void)
200           NULL, NULL,           NULL, NULL,
201           __modem, NULL),           __modem, NULL),
202      STR (0, "dial-str", "dialstr", "ATDT",      STR (0, "dial-str", "dialstr", "ATDT",
203           gettext ("set the string used to dial."), "STRING",           gettext ("sets the string used to dial."), "STRING",
          __modem, NULL),  
     STR (0, NULL, "dial_prefix", NULL,  
          NULL, NULL,  
          __modem, NULL),  
     STR ('n', "phone", "phone", NULL,  
          gettext ("set the primary phone number to use."), "NUMBER",  
          __modem, NULL),  
     STR (0, NULL, "phone1", NULL,  
          NULL, NULL,  
          __modem, NULL),  
     STR (0, NULL, "phone2", NULL,  
          NULL, NULL,  
204           __modem, NULL),           __modem, NULL),
205      STR (0, NULL, "phone3", NULL,      STR (0, "prefix", "dial_prefix", NULL,
206           NULL, NULL,           NULL, NULL,
207           __modem, NULL),           __modem, NULL),
208      STR (0, NULL, "phone4", NULL,      STR ('p', "phonetab", "phonetab", DEFAULT_PHONETAB_FILE,
209           NULL, NULL,           gettext ("sets the file where phone numbers will be searched."), "PATH",
210           __modem, NULL),           __modem, NULL),
     STR (0, NULL, "phone5", NULL, NULL, NULL, __modem, NULL),  
211      INT ('s', "line-speed", "line_speed", 115200,      INT ('s', "line-speed", "line_speed", 115200,
212           gettext ("set the serial line speed."), "SPEED",           gettext ("sets the serial line speed."), "SPEED",
213           __modem, check_line_speed),           __modem, check_line_speed),
214      STR ('c', "chat-script", "chat_script", CHATDIR "/aolnet.scm",      STR (0, "chat-path", "chat_path", DEFAULT_CHAT_PATH,
215           gettext ("set the chat script used for logging into AOL."), "SCRIPT",           gettext ("sets the path where chat files will be searched."), "SCRIPT",
216           __modem, NULL),           __modem, NULL),
217      INT (0, NULL, "dial_retry", 3,      INT (0, NULL, "dial_retry", 3,
218           NULL, NULL,           NULL, NULL,
219           __modem, check_natural),           __modem, check_natural),
220      INT (0, NULL, "retry_delay", 0,      INT (0, NULL, "retry_delay", 2,
221           NULL, NULL,           NULL, NULL,
222           __modem, check_natural)           __modem, check_natural)
223  #endif /* WITH_MODEM */  #endif /* ENABLE_MODEM */
224    
225  #ifdef WITH_TCPIP  #if ENABLE_TCPIP
226      /* CABLE SPECIFIC */      /* TCPIP SPECIFIC */
227      , STR (0, NULL, "aol_host", "AmericaOnline.aol.com",      , STR (0, NULL, "aol_host", "AmericaOnline.aol.com",
228           NULL, NULL,           NULL, NULL,
229           __cable, NULL),           __tcpip, NULL),
230      INT (0, NULL, "aol_port", 5190,      INT (0, NULL, "aol_port", 5190,
231           NULL, NULL,           NULL, NULL,
232           __cable, check_port)           __tcpip, check_port)
233  #endif /* WITH_TCPIP */  #endif /* ENABLE_TCPIP */
234    };    };
235    
236  #undef STR  #undef STR
# Line 359  version (void) Line 350  version (void)
350           , PACKAGE);           , PACKAGE);
351                                    
352    printf (gettext ("Compilation options :\n"));    printf (gettext ("Compilation options :\n"));
353  #ifdef WITH_MODEM    printf (
354    printf ("WITH_MODEM ");  #if DEBUG
355            "DEBUG "
356  #endif  #endif
357  #ifdef WITH_CABLE  #if ENABLE_MODEM
358    printf ("WITH_CABLE ");          "ENABLE_MODEM "
359  #endif  #endif
360  #ifdef WITH_DSL  #if ENABLE_CABLE
361    printf ("WITH_DSL ");          "ENABLE_CABLE "
362  #endif  #endif
363  #ifdef WITH_TCPIP  #if ENABLE_DSL
364    printf ("WITH_TCPIP ");          "ENABLE_DSL "
365  #endif  #endif
366  #ifdef WITH_TUN  #if ENABLE_TCPIP
367    printf ("WITH_TUN ");          "ENABLE_TCPIP "
368  #endif  #endif
369    printf ("\n");  #if ENABLE_TUN
370            "ENABLE_TUN "
371    #endif
372    #if ENABLE_P3
373            "ENABLE_P3 "
374    #endif
375    #if ENABLE_L2TP
376            "ENABLE_L2TP "
377    #endif
378    #if WORDS_BIGENDIAN
379            "WORDS_BIGENDIAN "
380    #endif
381    #if ENABLE_NLS
382            "ENABLE_NLS "
383    #endif
384            "\n");
385      printf ("SYSCONFDIR=\"" SYSCONFDIR "\"\n");
386      printf ("PKGDATADIR=\"" PKGDATADIR "\"\n");
387      printf ("LOCALSTATEDIR=\"" LOCALSTATEDIR "\"\n");
388    exit (0);    exit (0);
389  }  }
390    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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