WIP editor
Can only read the password no safe for edit
This commit is contained in:
@@ -20,7 +20,8 @@ enum class Arg
|
||||
Username, // update username
|
||||
Name, // update label name
|
||||
File, // select save file
|
||||
Size // show size of file
|
||||
Size, // show size of file
|
||||
Editor // open editor, password as note
|
||||
};
|
||||
|
||||
Arg get_args(int argc, char **argv, char **label);
|
||||
@@ -47,4 +48,6 @@ void arg_file(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *la
|
||||
|
||||
void arg_size(Buffer &encrypted_buffer);
|
||||
|
||||
void arg_editor(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
||||
|
||||
#endif
|
6
include/editor.hpp
Normal file
6
include/editor.hpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef EDITOR_HPP
|
||||
#define EDITOR_HPP
|
||||
|
||||
int edit_file(const char *s);
|
||||
|
||||
#endif // EDITOR_HPP
|
@@ -8,4 +8,9 @@ bool put_data_on_clipboard(const char *text);
|
||||
std::string get_user_password();
|
||||
std::optional<std::string> get_save_path();
|
||||
|
||||
int getWindowSize(int *rows, int *cols);
|
||||
int enableRawMode(void);
|
||||
int writeTerm(const char *buf, int length);
|
||||
int readTerm(char *buf, int length);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user