-
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 #9 from Ajatt-Tools/dev
Merge new changes into master
- Loading branch information
Showing
55 changed files
with
19,198 additions
and
2,535 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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
\*.o | ||
dictpopup | ||
dictpopup-create | ||
dictpopup-cli | ||
cmake-build-debug/ | ||
cmake-build-release/ | ||
cmake-build-release-coverage/ | ||
.cmake | ||
.idea | ||
CMakeFiles | ||
.gdb_history | ||
misc/ | ||
misc/ | ||
build/ |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef AUDIO_INDEX_PARSER_H | ||
#define AUDIO_INDEX_PARSER_H | ||
|
||
#include "util.h" | ||
|
||
typedef struct { | ||
s8 origin; | ||
s8 hira_reading; | ||
s8 pitch_number; | ||
s8 pitch_pattern; | ||
} fileinfo; | ||
|
||
void parse_audio_index_from_file(s8 curdir, const char *index_filepath, | ||
void (*foreach_headword)(void *, s8, s8), void *userdata_hw, | ||
void (*foreach_file)(void *, s8, fileinfo), void *userdata_f); | ||
|
||
#endif // AUDIO_INDEX_PARSER_H |
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,25 @@ | ||
#ifndef DATABASE_H | ||
#define DATABASE_H | ||
|
||
#include "ajt_audio_index_parser.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; | ||
} database; | ||
typedef struct database_s database; | ||
|
||
database opendb(const char *path, bool readonly); | ||
void closedb(database); | ||
database *jdb_open(char *path, bool readonly); | ||
void jdb_close(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); | ||
void jdb_add_headword_with_file(database *db, s8 headword, s8 filepath); | ||
void jdb_add_file_with_fileinfo(database *db, s8 filepath, fileinfo fi); | ||
|
||
_deallocator_(frees8buffer) s8 *jdb_get_files(database *db, s8 key); | ||
fileinfo jdb_get_fileinfo(database *db, s8 fullpath); | ||
|
||
i32 jdb_check_exists(s8 dbpath); | ||
|
||
DEFINE_DROP_FUNC(database *, jdb_close) | ||
|
||
s8 *getfiles(database db, s8 key); | ||
s8 getfromdb2(database db, s8 key); | ||
#endif // DATABASE_H |
Oops, something went wrong.