diff options
Diffstat (limited to 'imp.ha')
| -rw-r--r-- | imp.ha | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4,7 +4,7 @@ use os; use os::exec; use io; use strings; -use bufio; +use memio; use format::ini; let verbose: bool = false; @@ -74,6 +74,7 @@ export fn main() void = { accfilter.notes = opt.1; case 'f' => file = opt.1; + case => abort(); }; }; @@ -230,7 +231,7 @@ fn account_free(acc: account) void = { }; fn parse(data: []u8) ([]account | format::ini::error) = { - let scanner = format::ini::scan(&bufio::fixed(data, io::mode::READ)); + let scanner = format::ini::scan(&memio::fixed(data)); defer format::ini::finish(&scanner); //let entries: []format::ini::entry = []; @@ -273,7 +274,7 @@ fn setfieldaccount(acc: *account, key: str, val: str) void = { //defer free(val); // Handle quoted values - let valrunes = strings::runes(val); + let valrunes = strings::torunes(val); defer free(valrunes); if (valrunes[0] == '"' && valrunes[len(valrunes)-1] == '"') { val = strings::trim(val, '"'); |
