diff --git a/clite/vi.js b/clite/vi.js index 9ff2e34..9571ea6 100644 --- a/clite/vi.js +++ b/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; }