/* ----------------------------------------------------------------------------1Copyright (c) 2021, Daan Leijen2This is free software; you can redistribute it and/or modify it3under the terms of the MIT License. A copy of the license can be4found in the "LICENSE" file at the root of this distribution.5-----------------------------------------------------------------------------*/6#pragma once7#ifndef IC_UNDO_H8#define IC_UNDO_H910#include "common.h"1112//-------------------------------------------------------------13// Edit state14//-------------------------------------------------------------15struct editstate_s;16typedef struct editstate_s editstate_t;1718ic_private void editstate_init( editstate_t** es );19ic_private void editstate_done( alloc_t* mem, editstate_t** es );20ic_private void editstate_capture( alloc_t* mem, editstate_t** es, const char* input, ssize_t pos);21ic_private bool editstate_restore( alloc_t* mem, editstate_t** es, const char** input, ssize_t* pos ); // caller needs to free input2223#endif // IC_UNDO_H242526