-
Notifications
You must be signed in to change notification settings - Fork 0
/
editbuffer.h
47 lines (40 loc) · 2.21 KB
/
editbuffer.h
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
/***********************************************************************/
/* */
/* OCamlTopWin */
/* */
/* Developed by Jacob Navia and Chris Watford. */
/* */
/* Copyright 2001 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU General Public License version 2 */
/* or (at your option) any later version. */
/* */
/***********************************************************************/
/***********************************************************************/
/* Changes made by Chris Watford to enhance the source editor */
/* Began 14 Sept 2003 - watford@uiuc.edu */
/***********************************************************************/
#ifndef _EDITBUFFER_H_
#define _EDITBUFFER_H_
// All the below was added by Chris Watford watford@uiuc.edu
typedef struct tagLineList {
struct tagLineList *Next;
struct tagLineList *Prev;
char *Text;
} LineList;
typedef struct tagEditBuffer {
int LineCount;
struct tagLineList *Lines;
BOOL isCorrect;
} EditBuffer;
BOOL editbuffer_addline (EditBuffer* edBuf, char* line);
BOOL editbuffer_updateline (EditBuffer* edBuf, int idx, char* line);
BOOL editbuffer_updateoraddline (EditBuffer* edBuf, int idx, char* line);
BOOL editbuffer_removeline (EditBuffer* edBuf, int idx);
char* editbuffer_getasline (EditBuffer* edBuf);
char* editbuffer_getasbuffer (EditBuffer* edBuf);
char* editbuffer_lastline (EditBuffer* edBuf);
EditBuffer* editbuffer_copy (EditBuffer* edBuf);
void editbuffer_destroy (EditBuffer* edBuf);
EditBuffer* editbuffer_new (void);
#endif