vidir is surprisingly useful, and it would be nice to have. Maybe some weekend I'll whip one up, but I haven't started it and don't plan to soon. So I'm opening it up to anyone who would like to take a shot. Since this command is optional and low importance, acceptance is exacting, i.e. I can afford to be picky. "Must" means required and "should" means optional.
-
Must support Windows XP. (Note: This rules out a UTF-8 manifest.)
-
Must support wide (Unicode) and long (> MAX_PATH) paths. The editor gets UTF-8-encoded paths. It must refuse to operate if it sees a path that cannot be represented as UTF-8. (I don't expect editors to handle WTF-8.)
-
Must not link MSVCRT (e.g. cc -nostartfiles -o vidir vidir.c -lmemory).
-
Must be a single source file, like vidir.c. C++ is acceptable, but mind the previous item.
-
Must be dedicated to the public domain. Still put your name in it and take credit of course.
-
Error messages must print correctly on the console, i.e. messages indicating paths.
There's a question for how to handle $EDITOR. In the original vidir it's sort of treated like a shell script fragment, except it doesn't use a real shell, and instead naively splits on spaces — almost the least useful behavior possible. You could perhaps pass it to busybox.exe sh, or maybe just pass it through as a Win32 command string fragment and let the other side parse it. I don't think there's a right answer, so consider the trade-offs. Compatibility with the original isn't important here.
vidir is surprisingly useful, and it would be nice to have. Maybe some weekend I'll whip one up, but I haven't started it and don't plan to soon. So I'm opening it up to anyone who would like to take a shot. Since this command is optional and low importance, acceptance is exacting, i.e. I can afford to be picky. "Must" means required and "should" means optional.
Must support Windows XP. (Note: This rules out a UTF-8 manifest.)
Must support wide (Unicode) and long (
> MAX_PATH) paths. The editor gets UTF-8-encoded paths. It must refuse to operate if it sees a path that cannot be represented as UTF-8. (I don't expect editors to handle WTF-8.)Must not link MSVCRT (e.g.
cc -nostartfiles -o vidir vidir.c -lmemory).Must be a single source file, like
vidir.c. C++ is acceptable, but mind the previous item.Must be dedicated to the public domain. Still put your name in it and take credit of course.
Error messages must print correctly on the console, i.e. messages indicating paths.
There's a question for how to handle
$EDITOR. In the originalvidirit's sort of treated like a shell script fragment, except it doesn't use a real shell, and instead naively splits on spaces — almost the least useful behavior possible. You could perhaps pass it tobusybox.exe sh, or maybe just pass it through as a Win32 command string fragment and let the other side parse it. I don't think there's a right answer, so consider the trade-offs. Compatibility with the original isn't important here.