Fix buffer stomping; retool Makefile.

The Makefile is now useful for building ke(1) to aid in more rapid
development. This works because ke doesn't (yet) need any special
non-system libraries.
This commit is contained in:
2023-10-12 15:15:09 -07:00
parent ba27e132e3
commit 7cec414e3d
7 changed files with 161 additions and 27 deletions

View File

@@ -56,11 +56,11 @@ main(int argc, char *argv[])
for (int i = 1; i < argc; i++) {
std::filesystem::path path(argv[i]);
std::cout << "[+] target: " << path << "\n ";
std::cout << "[+] target: " << path << "\n";
auto buffer = Buffer(path);
std::cout << "\t[+] created buffer " << buffer.Name() << "\n";
auto status = buffer.Refresh();
/*
if (!Buffer::StatusOK(status)) {
std::cerr << "[!] failed to read buffer ";
std::cerr << buffer.Name() << "\n";
@@ -69,6 +69,7 @@ main(int argc, char *argv[])
std::cerr << "\n";
continue;
}
*/
std::cout << "\t[+] loaded buffer " << buffer.Name()
<< " of " << buffer.Size() << " bytes.\n";