File: edline.h

package info (click to toggle)
alevt 1:1.6.2-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 662
  • sloc: ansic: 6,284; makefile: 119; perl: 104; sh: 15
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