30 lines
507 B
C
30 lines
507 B
C
#ifndef ACTION_LIST_H
|
|
#define ACTION_LIST_H
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
typedef enum {
|
|
INSERT,
|
|
DELETE
|
|
} ActionType;
|
|
|
|
typedef struct {
|
|
ActionType type;
|
|
uint64_t line_original;
|
|
uint64_t line_changed;
|
|
} Action;
|
|
|
|
typedef struct {
|
|
Action* actions;
|
|
uint64_t capacity;
|
|
uint64_t len;
|
|
} ActionList;
|
|
|
|
ActionList* new_list();
|
|
void add_action(ActionList*, Action);
|
|
void append_list(ActionList*, ActionList*);
|
|
|
|
#endif // ACTION_LIST_H
|