⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 undo.h.svn-base

📁 一个CUI编辑器
💻 SVN-BASE
字号:
#ifndef _UNDO_H#define _UNDO_H#include "buffer.h"#include "list.h"#define UNDO_OK 1#define UNDO_FAIL -1struct undo_cmd;typedef struct undo_cmd undo_cmd_t;typedef void (*action)(undo_cmd_t *);struct undo_cmd {    action exec;    buf_t *buf;    char *data;    int start;    int end;    int left;    struct list_head list;};extern const action BUF_APPENDS_ACTION;extern const action BUF_APPENDC_ACTION;extern const action BUF_INSERTS_ACTION;extern const action BUF_INSERTC_ACTION;extern const action BUF_DELETE_ACTION;extern const action BUF_REPLACE_ACTION;extern const action BUF_RESTORE_BUF_ACTION;extern const action BUF_DELETE_BUF_ACTION;extern const action BUF_REMOVE_BUF_ACTION;void undo_cmd_add(action act, buf_t *buf, char *data, 		  int start, int end, int left);int undo(void);int redo(void);void undo_cmd_clear_cmds(undo_cmd_t *cmd_head);#endif /* _UNDO_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -