]> pd.if.org Git - pd_readline/blob - funcs.c
More work.
[pd_readline] / funcs.c
1
2
3 /*  funcs.c                                          */ 
4 /*  Functions to handle cursor movement for          */ 
5 /*  pd_readline.                                     */      
6 /*  This code is released to the public domain.      */ 
7 /*  "Share and enjoy...."  ;)                        */  
8 /*  See the UNLICENSE file for details.              */ 
9
10
11 #include <string.h>   
12 #include <stdio.h> 
13 #include <stdlib.h> 
14 #include "pd_readline.h"  
15
16 /* Note - make the up and down funcs return a buffer.     */ 
17 /* A line from the history file can be put into the       */ 
18 /* array member of the buffer.                            */ 
19 /* Also test for the top and bottom of the history file.  */     
20
21
22 /* Move up in history list. */ 
23 buf up(int i) 
24
25   
26
27
28
29
30
31 /* Move down in history list. */ 
32 buf down(int i) 
33
34
35
36
37
38
39 /* Move cursor to left. */ 
40 buf left(buf b) 
41 {
42
43
44
45
46
47 /* Move cursor to right. */ 
48 buf right(buf b) 
49
50
51
52
53
54
55 /* Delete a char. */ 
56 buf delch(buf b) 
57
58
59
60
61
62
63 /* Insert a char. */ 
64 buf insch(buf b) 
65
66
67
68
69
70
71 void enter(void) 
72
73         printf("Enter ");               
74 }       
75
76
77
78 /*  Function for special key combinations  */ 
79 /*  (Ctrl, Alt, function keys.             */ 
80 int spec(int i)
81
82         
83         
84
85 }       
86
87
88
89
90