forked from I2P_Developers/i2p.i2p
2004-11-21 jrandom
* Allow end of line comments in the hosts.txt and other config files,
using '#' to begin the comments (thanks susi!)
* Add support to I2PTunnel's 'client' feature for picking between multiple
target destinations (e.g. 'client 6668 irc.duck.i2p,irc.baffled.i2p')
* Add a quick link on the left hand nav to reseed if there aren't enough
known peers, as well as link to the config page if there are no active
peers. Revised config page accordingly.
This commit is contained in:
@@ -154,6 +154,9 @@ public class DataHelper {
|
||||
while ( (line = in.readLine()) != null) {
|
||||
if (line.trim().length() <= 0) continue;
|
||||
if (line.charAt(0) == '#') continue;
|
||||
if (line.charAt(0) == ';') continue;
|
||||
if (line.indexOf('#') > 0) // trim off any end of line comment
|
||||
line = line.substring(0, line.indexOf('#')).trim();
|
||||
int split = line.indexOf('=');
|
||||
if (split <= 0) continue;
|
||||
String key = line.substring(0, split);
|
||||
@@ -311,7 +314,7 @@ public class DataHelper {
|
||||
throw new IllegalArgumentException("wtf, fromLong got a negative? " + rv + ": offset="+ offset +" numBytes="+numBytes);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String args[]) {
|
||||
for (int i = 0; i <= 0xFF; i++)
|
||||
testLong(1, i);
|
||||
|
||||
Reference in New Issue
Block a user