mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
also, missing newlines in vi
This commit is contained in:
parent
b460a00c6d
commit
e842848027
1 changed files with 6 additions and 6 deletions
12
clite/vi.js
12
clite/vi.js
|
|
@ -39,13 +39,13 @@ Options:
|
|||
return 0;
|
||||
break;
|
||||
default:
|
||||
stdio.fprintf(io.stderr,'unknown argument: -%c',args[i][j]);
|
||||
stdio.fprintf(io.stderr,'unknown argument: -%c\n',args[i][j]);
|
||||
}
|
||||
}
|
||||
}else if (file == null) {
|
||||
file = clite.resolvePath(args[i],false);
|
||||
}else{
|
||||
stdio.fprintf(io.stderr,'unknown argument: %s',args[i]);
|
||||
stdio.fprintf(io.stderr,'unknown argument: %s\n',args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -129,13 +129,13 @@ Options:
|
|||
|
||||
function prepFile(fd) {
|
||||
if (!fd) {
|
||||
stdio.write(io.stderr,'could not open file: '+file);
|
||||
stdio.fprintf(io.stderr,'could not open file: %s\n',file);
|
||||
io.exit(1);
|
||||
return;
|
||||
}
|
||||
var st = stdio.fstatat(fd,0);
|
||||
if ( !st || (st.type != stdio.types.FT_TEXT && st.type != stdio.types.FT_SCRIPT)) {
|
||||
stdio.write(io.stderr,'can not read files of this type');
|
||||
stdio.write(io.stderr,'can not read files of this type\n');
|
||||
io.exit(1);
|
||||
return;
|
||||
}
|
||||
|
|
@ -264,13 +264,13 @@ Options:
|
|||
}
|
||||
|
||||
if (file == null) {
|
||||
stdio.write(io.stderr,'no file specified');
|
||||
stdio.write(io.stderr,'no file specified\n');
|
||||
return 1;
|
||||
}
|
||||
|
||||
var fd = stdio.open(file,stdio.flags.O_RDONLY|stdio.flags.O_CREAT,prepFile);
|
||||
if (!fd) {
|
||||
stdio.write(io.stderr,'could not open file: '+file);
|
||||
stdio.fprintf(io.stderr,'could not open file: %s\n',file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue