-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor_func.h
More file actions
38 lines (26 loc) · 1 KB
/
editor_func.h
File metadata and controls
38 lines (26 loc) · 1 KB
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
#ifndef EDITOR_FUNC_H
#define EDITOR_FUNC_H
#include <stdio.h>
#include <stdlib.h>
#include "editor_structs.h"
#include "line.h"
#include "gap_buffer.h"
#include "trie.h"
#include "features.h"
#define LOC_X 35
#define LOC_Y 120
// Function to insert character at position
// NOTE: line_size should be modified by caller of this function it is not modified in this fun
void insert_at_pos(line *subline, int position, char data);
char del_from_pos(win *w, int *lne_no, int *col_no, FILE *fd_store_prev, FILE *fd_store_next, FILE *fd_main);
// NOTE:- first line is 0th line
void insert_new_line_at_pos(win *w, int *lne_no, int *col_no, FILE *fd_prev, FILE *fd_nxt, FILE *fd_main);
void print_loc(int x, int y);
void print_debug(int x, int y);
/*use to print contents of ADT - for testing*/
void print_page(win w, TrieNode *keyword);
// use to print given line on screen
void print_line(win w, int line_no, TrieNode *keyword);
// for print output on terminal, for debugging
void print(win w);
#endif