File: undo.h

package info (click to toggle)
joe 2.8-15.2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,184 kB
  • ctags: 1,764
  • sloc: ansic: 18,821; asm: 224; makefile: 122; sh: 9
file content (54 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _Iundo
#define _Iundo 1

#include "config.h"
#include "queue.h"
#include "b.h"

#define UNDOKEEP 100

typedef struct undo UNDO;
typedef struct undorec UNDOREC;

struct undorec
 {
 LINK(UNDOREC) link;
 UNDOREC *unit;
 int min;
 int changed;		/* Status of modified flag before this record */
 long where;		/* Buffer address of this record */
 long len;		/* Length of insert or delete */
 int del;		/* Set if this is a delete */
 B *big;		/* Set to buffer containing a large amount of deleted data */
 char *small;		/* Set to malloc block containg a small amount of deleted data */
 };

struct undo
 {
 LINK(UNDO) link;
 B *b;
 int nrecs;
 UNDOREC recs;
 UNDOREC *ptr;
 UNDOREC *first;
 UNDOREC *last;
 };

extern int inundo;
extern int justkilled;

UNDO *undomk();
void undorm();
int uundo();
int uredo();
void umclear();
void undomark();
void undoins();
void undodel();
int uyank();
int uyankpop();
int uyapp();
int unotmod();
int ucopy();

#endif