Menu

[8dce06]: / joe / pw.h  Maximize  Restore  History

Download this file

61 lines (46 with data), 1.8 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Prompt windows
* Copyright
* (C) 1992 Joseph H. Allen
*
* This file is part of JOE (Joe's Own Editor)
*/
/* Prompt window (a BW) */
struct pw {
int (*pfunc) (W *w, char *s, void *object, int *notify); /* Func which gets called when RTN is hit */
int (*abrt) (W *w, void *object); /* Func which gets called when window is aborted */
int (*tab) (BW *bw, int k); /* Func which gets called when TAB is hit */
char *prompt; /* Prompt string */
ptrdiff_t promptlen; /* Width of prompt string */
ptrdiff_t promptofst; /* Prompt scroll offset */
B *hist; /* History buffer */
void *object; /* Object */
int file_prompt; /* Set if this is a file name prompt, so do ~ expansion */
};
/* BW *wmkpw(BW *bw,char *prompt,int (*func)(),char *huh,int (*abrt)(),
int (*tab)(),void *object,int *notify);
* Create a prompt window for the given window
* file_prompt flags:
* bit 0: ~ expansion
* bit 1: update directory
* bit 2: seed with directory
*/
BW *wmkpw(W *w, const char *prompt, B **history, int (*func) (W *w, char *s, void *object, int *notify),
const char *huh, int (*abrt)(W *w, void *object),
int (*tab)(BW *bw, int k),
void *object, int *notify, struct charmap *map, int file_prompt);
int ucmplt(W *w, int k);
/* Function for TAB completion */
char **regsub(char **z, ptrdiff_t len, char *s);
void cmplt_ins(BW *bw,char *line);
int cmplt_abrt(W *w,ptrdiff_t x,void *obj);
int cmplt_rtn(MENU *m,ptrdiff_t x,void *obj, int k);
int simple_cmplt(BW *bw,char **list);
void setup_history(B **history);
void append_history(B *hist,char *s,ptrdiff_t len);
void promote_history(B *hist, off_t line);
void set_current_dir(BW *bw, char *s,int simp);
extern int bg_prompt;
extern int nocurdir;
extern WATOM watompw;
char *get_cd(W *w);
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.