Rearrange project files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "vase/buffer/append.h"
|
||||
#include "internal/vase/buffer/append.h"
|
||||
|
||||
AppendBuffer::AppendBuffer(std::filesystem::path base_dir) {
|
||||
base_dir /= "tapp.XXXXXX";
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "vase/buffer/original.h"
|
||||
#include "io/file.h"
|
||||
#include "internal/vase/buffer/original.h"
|
||||
|
||||
OriginalBuffer::OriginalBuffer(std::filesystem::path base_dir) {
|
||||
if (!std::filesystem::exists(base_dir) || !std::filesystem::is_directory(base_dir))
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "vase/iterators/line.h"
|
||||
#include "internal/vase/iterators/line.h"
|
||||
|
||||
LineIterator::LineIterator(Shard *root, uint64_t line_num, Direction dir)
|
||||
: it(root, dir), dir(dir) {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "vase/iterators/petal.h"
|
||||
#include "internal/vase/iterators/petal.h"
|
||||
|
||||
PetalIterator::PetalIterator(Shard *r, Direction dir)
|
||||
: dir(dir), root(r) {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "vase/vase.h"
|
||||
#include "internal/vase/vase.h"
|
||||
|
||||
std::vector<ReplacePart> Vase::parse_replace(std::string_view s) {
|
||||
std::vector<ReplacePart> parts;
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "vase/iterators/petal.h"
|
||||
#include "vase/vase.h"
|
||||
#include "internal/vase/iterators/petal.h"
|
||||
#include "internal/vase/vase.h"
|
||||
|
||||
std::vector<RegexMatch> Vase::_regex_search(
|
||||
std::string_view pattern, Range range, std::string_view options
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "vase/shard.h"
|
||||
#include "internal/vase/shard.h"
|
||||
|
||||
void Shard::retain(Shard *n) {
|
||||
if (n)
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "vase/vase.h"
|
||||
#include "utils/utils.h"
|
||||
#include "vase/iterators/line.h"
|
||||
#include "vase/iterators/petal.h"
|
||||
#include "internal/vase/vase.h"
|
||||
#include "internal/vase/iterators/line.h"
|
||||
#include "internal/vase/iterators/petal.h"
|
||||
|
||||
Vase::Vase(std::filesystem::path path, std::filesystem::path swapdir)
|
||||
: path(path), swapdir(swapdir) {
|
||||
+1
-17
@@ -1,23 +1,7 @@
|
||||
#include "cli/cli.h"
|
||||
#include "pch.h"
|
||||
#include "vase/iterators/line.h"
|
||||
#include "vase/vase.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 2)
|
||||
throw std::runtime_error("Please give filename.");
|
||||
|
||||
Vase vase = Vase(argv[1], "/tmp");
|
||||
|
||||
Point p = {UINT64_MAX, UINT64_MAX};
|
||||
vase.insert(&p, 'c');
|
||||
|
||||
printf("%s\n\n", vase.to_string().c_str());
|
||||
|
||||
printf("%lu bytes\n"
|
||||
"%lu lines\n"
|
||||
"\n",
|
||||
vase.length(),
|
||||
vase.root->lines);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user