-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Ajatt-Tools/refactor
Refactor
- Loading branch information
Showing
35 changed files
with
2,783 additions
and
3,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
BinPackArguments: true | ||
BreakStringLiterals: false | ||
ColumnLimit: 100 | ||
IndentCaseLabels: true | ||
IndentPPDirectives: BeforeHash | ||
IndentWidth: 4 | ||
PenaltyBreakComment: 0 | ||
SortIncludes: true | ||
SpaceBeforeParens: ControlStatementsExceptForEachMacros | ||
UseTab: Never | ||
AllowShortFunctionsOnASingleLine: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#include <stdbool.h> | ||
#include <lmdb.h> | ||
#include "util.h" | ||
#include <lmdb.h> | ||
#include <stdbool.h> | ||
|
||
typedef struct { | ||
stringbuilder_s lastval; | ||
MDB_env *env; | ||
MDB_dbi dbi1; | ||
MDB_dbi dbi2; | ||
MDB_txn *txn; | ||
bool readonly; | ||
stringbuilder_s lastval; | ||
MDB_env *env; | ||
MDB_dbi dbi1; | ||
MDB_dbi dbi2; | ||
MDB_txn *txn; | ||
bool readonly; | ||
} database; | ||
|
||
database opendb(const char* path, bool readonly); | ||
database opendb(const char *path, bool readonly); | ||
void closedb(database); | ||
/* | ||
* Add to database, allowing duplicates if they are added directly after another | ||
*/ | ||
void addtodb1(database db, s8 key, s8 val); | ||
void addtodb2(database db, s8 key, s8 val); | ||
|
||
s8* getfiles(database db, s8 key); | ||
s8 *getfiles(database db, s8 key); | ||
s8 getfromdb2(database db, s8 key); |
Oops, something went wrong.