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

Diff of /pengfork/src/checkopt.c

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

revision 1.7 by chupa, Sat Dec 7 14:01:24 2002 UTC revision 1.8 by chupa, Fri Dec 13 15:29:15 2002 UTC
# Line 166  check_debug_level (option, level) Line 166  check_debug_level (option, level)
166    if (level >= 0 && level <= DEBUG_MAX)    if (level >= 0 && level <= DEBUG_MAX)
167      return 1;      return 1;
168    
169    log (LOG_ERR, "%s must be between 0 and 10.\n", option);    log (LOG_ERR, gettext("%s must be between 0 and 10.\n"), option);
170    return 0;    return 0;
171  }  }
172    
# Line 178  check_natural (option, num) Line 178  check_natural (option, num)
178    if (num >= 0)    if (num >= 0)
179      return 1;      return 1;
180    
181    log (LOG_ERR, "%s must be >=0.\n", option);    log (LOG_ERR, gettext("%s must be >=0.\n"), option);
182    return 0;    return 0;
183  }  }
184    
185  #ifdef WITH_MODEM  #if ENABLE_MODEM
186  int  int
187  check_line_speed (option, speed)  check_line_speed (option, speed)
188       char *option;       char *option;
# Line 191  check_line_speed (option, speed) Line 191  check_line_speed (option, speed)
191    if (modem_valid_speed (speed))    if (modem_valid_speed (speed))
192      return 1;      return 1;
193    
194    log (LOG_ERR, "%s has an invalid line speed specicification.\n", option);    log (LOG_ERR, gettext("%s has an invalid line speed specicification.\n"), option);
195    return 0;    return 0;
196  }  }
197  #endif /* WITH_MODEM */  #endif /* ENABLE_MODEM */
198    
199  #ifdef WITH_TCPIP  #if ENABLE_TCPIP
200  int  int
201  check_port (option, port)  check_port (option, port)
202       char *option;       char *option;
# Line 205  check_port (option, port) Line 205  check_port (option, port)
205    if (port > 0 && port < 65536)    if (port > 0 && port < 65536)
206      return 1;      return 1;
207    
208    log (LOG_ERR, "%s must be a valid port (between 1 and 65535).\n", option);    log (LOG_ERR, gettext("%s must be a valid port (between 1 and 65535).\n"), option);
209    return 0;    return 0;
210  }  }
211    
212  int  #endif /* ENABLE_TCPIP */
 check_ip (option, ip)  
      char *option;  
      char *ip;  
 {  
   struct in_addr inp;  
   
   if (inet_aton (ip, &inp))  
     return 1;  
   
   log (LOG_ERR, "%s must be a valid IP address.\n", option);  
   return 0;  
 }  
 #endif /* WITH_TCPIP */  

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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