File: edline.h

package info (click to toggle)
alevt 1%3A1.6.1-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 840 kB
  • ctags: 662
  • sloc: sh: 6,411; ansic: 6,256; makefile: 112; perl: 104
file content (28 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (9)
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
#ifndef EDLINE_H
#define EDLINE_H

#include "misc.h"
#include "xio.h"

#define EDLEN 128

struct edline
{
    struct xio_win *xw;
    u8 *prompt;
    void (*exit_func)();
    void *exit_data;
    void (*old_handler)();
    void *old_data;

    u8 buf[EDLEN];
    int plen;		// prompt len
    int len;		// current len (excl prompt)
    int offs;		// current scroll offset
};

struct edline *edline_new(struct xio_win *xw, u8 *prompt, u8 *preset,
						void *exit_func, void *data);
void edline_abort(struct edline *el);

#endif