pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:241: Inside #if defined(__NT__)
   string raw;   #ifdef __NT__    raw=get_tcpip_param("DataBasePath")+"\\hosts";   #else    raw="/etc/hosts";   #endif    raw = Stdio.read_file(raw);       etc_hosts = ([ "localhost":"127.0.0.1" ]);    -  if (raw) { -  foreach(raw/"\n", string line) { +  if (raw && sizeof(raw)) { +  foreach(raw/"\n"-({""}), string line) {    // Handle comments, and split the line on white-space    line = lower_case(replace((line/"#")[0], "\t", " "));    array arr = (line/" ") - ({ "" });       if (sizeof(arr) > 1) {    if (is_ip(arr[0])) {    foreach(arr[1..], string name) {    etc_hosts[name] = arr[0];    }    } else {