edit-util: make EditFile take reference of EditFileContext
No functional change, just preparation for later commits.
This commit is contained in:
@@ -95,6 +95,7 @@ int edit_files_add(
|
||||
}
|
||||
|
||||
context->files[context->n_files] = (EditFile) {
|
||||
.context = context,
|
||||
.path = TAKE_PTR(new_path),
|
||||
.original_path = TAKE_PTR(new_original_path),
|
||||
.comment_paths = TAKE_PTR(new_comment_paths),
|
||||
|
||||
@@ -3,21 +3,25 @@
|
||||
|
||||
#include "path-lookup.h"
|
||||
|
||||
typedef struct EditFile {
|
||||
typedef struct EditFile EditFile;
|
||||
typedef struct EditFileContext EditFileContext;
|
||||
|
||||
struct EditFile {
|
||||
EditFileContext *context;
|
||||
char *path;
|
||||
char *original_path;
|
||||
char **comment_paths;
|
||||
char *temp;
|
||||
unsigned line;
|
||||
} EditFile;
|
||||
};
|
||||
|
||||
typedef struct EditFileContext {
|
||||
struct EditFileContext {
|
||||
EditFile *files;
|
||||
size_t n_files;
|
||||
const char *marker_start;
|
||||
const char *marker_end;
|
||||
bool remove_parent;
|
||||
} EditFileContext;
|
||||
};
|
||||
|
||||
void edit_file_context_done(EditFileContext *context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user