mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-14 02:50:23 +00:00
git subrepo pull --force tools/ZAPD (#718)
subrepo: subdir: "tools/ZAPD" merged: "4bf6600a3" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "4bf6600a3" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
This commit is contained in:
parent
8a730123b6
commit
42af56b231
35 changed files with 1854 additions and 445 deletions
38
tools/ZAPD/ZAPD/OutputFormatter.h
Normal file
38
tools/ZAPD/ZAPD/OutputFormatter.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class OutputFormatter
|
||||
{
|
||||
private:
|
||||
const int tab_size;
|
||||
const int default_indent;
|
||||
const int line_limit;
|
||||
|
||||
int col;
|
||||
int nest;
|
||||
int nest_indent[8];
|
||||
int current_indent;
|
||||
|
||||
char word[128];
|
||||
char space[128];
|
||||
char *word_p;
|
||||
char *space_p;
|
||||
|
||||
std::string str;
|
||||
|
||||
int write(const char *buf, int count);
|
||||
|
||||
static OutputFormatter *static_instance;
|
||||
static int write_static(const char *buf, int count);
|
||||
|
||||
public:
|
||||
OutputFormatter(int tab_size = 4, int default_indent = 4,
|
||||
int line_limit = 120);
|
||||
|
||||
int (*static_writer())(const char *buf, int count);
|
||||
|
||||
std::string get_output();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue