summaryrefslogtreecommitdiff
path: root/fluid/proj/mergeback.h
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/proj/mergeback.h')
-rw-r--r--fluid/proj/mergeback.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/fluid/proj/mergeback.h b/fluid/proj/mergeback.h
index 48cc4e400..04a9dc902 100644
--- a/fluid/proj/mergeback.h
+++ b/fluid/proj/mergeback.h
@@ -21,17 +21,11 @@
#include <stdint.h>
#include <stdio.h>
-#include <string>
-
-namespace fld {
-
-class Project;
-
-namespace proj {
+namespace fld { class Project; }
/** Class that implements the MergeBack functionality.
- \see merge_back(const std::string &s, int task)
+ \see merge_back(const char *s, int task)
*/
enum {
FLD_MERGEBACK_TAG_GENERIC = 0,
@@ -56,7 +50,7 @@ public:
enum Feedback { QUIET = 0, CHATTY = 1 };
protected:
/// Apply mergeback for this project.
- Project &proj_;
+ fld::Project &proj_;
/// Pointer to the C++ code file.
FILE *code;
/// Current line number in the C++ code file.
@@ -73,7 +67,7 @@ protected:
int num_possible_override;
void unindent(char *s);
- std::string read_and_unindent_block(long start, long end);
+ char *read_and_unindent_block(long start, long end);
void analyse_callback(unsigned long code_crc, unsigned long tag_crc, int uid);
void analyse_code(unsigned long code_crc, unsigned long tag_crc, int uid);
int apply_callback(long block_end, long block_start, unsigned long code_crc, int uid);
@@ -86,20 +80,15 @@ protected:
static bool read_tag(const char *tag, Tag *prev_type, uint16_t *uid, uint32_t *crc);
public:
- Mergeback(Project &proj);
+ Mergeback(fld::Project &proj);
~Mergeback();
- int merge_back(const std::string &s, const std::string &p, Task task);
- int ask_user_to_merge(const std::string &s, const std::string &p);
+ int merge_back(const char *s, const char *p, Task task);
+ int ask_user_to_merge(const char *s, const char *p);
int analyse();
int apply();
static void print_tag(FILE *out, Tag prev_type, Tag next_type, uint16_t uid, uint32_t crc);
};
-extern int merge_back(const std::string &s, const std::string &p, int task);
-
-} // namespace proj
-} // namespace fld
-
extern void start_auto_mergeback();
extern void mergeback_on_load();