Major fixes:
- ChunkIterator is now bidirectional - LineIterator is now also bidirectional - Undo/redo history operations - Replace operation - Range based api functions - And more minor bug fixes
This commit is contained in:
+5
-27
@@ -1,39 +1,17 @@
|
||||
#include "io/file.h"
|
||||
#include "pch.h"
|
||||
#include "vase/iterators/chunk.h"
|
||||
#include "vase/iterators/line.h"
|
||||
#include "vase/shard.h"
|
||||
#include "vase/vase.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
const char *text_o =
|
||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz1\n"
|
||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz2\n"
|
||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz3\n"
|
||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz4";
|
||||
|
||||
uint32_t len = strlen(text_o);
|
||||
char *text = strdup(text_o);
|
||||
|
||||
#else
|
||||
|
||||
const char *path;
|
||||
|
||||
if (argc >= 2)
|
||||
path = argv[1];
|
||||
else
|
||||
if (argc < 2)
|
||||
throw std::runtime_error("Please give filename.");
|
||||
|
||||
uint32_t len;
|
||||
char *text;
|
||||
read_file(path, &text, &len);
|
||||
Vase vase = Vase(std::string(argv[1]));
|
||||
|
||||
#endif
|
||||
|
||||
Vase vase = Vase(text, len);
|
||||
std::cout << "\n"
|
||||
<< vase.to_string()
|
||||
<< "\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user