File: termcap.h

package info (click to toggle)
utalk 1.0.1.beta-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 340 kB
  • ctags: 667
  • sloc: ansic: 5,581; makefile: 68; sh: 1
file content (55 lines) | stat: -rw-r--r-- 1,554 bytes parent folder | download | duplicates (2)
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
/* utalk, a UDP-based "talk" replacement, using srdp
   Copyright (C) 1995 Roger Espel Llima

   termcap.h

   Started: 19 Oct 95 by <roger.espel.llima@pobox.com>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation. See the file LICENSE for details.
*/

#ifndef TERMCAP_H
#define TERMCAP_H

#define ATTR_BOLD 1
#define ATTR_UNDERLINED 2
#define ATTR_INVERSE 4

extern int tgetent(char *bp, char *name);
extern char *tgetstr(char *id, char **area);
extern int tgetnum(char *id);
extern char *tgoto(char *cap, int col, int row);
extern int tputs(char *str, int affcnt, int (*putc)(int));

extern char *t_ce, *t_me, *t_mr, *t_md, *t_us;
extern int xcursor, ycursor;	/* absolute; -1, -1 = unknown */

extern void putcap(char *s);
extern void init_termcap(void);
extern void flush_term(void);
extern void alloc_termcap_screen(void);
extern void clearscreen(void);
extern void cleareol(void);
extern void beep(void);
extern void gotoxy(int x, int y);
extern void putscreen(char *s, int n, char attr);
extern void redraw(void);
extern void redrawlines(int y1, int y2);
extern void scrollup(int y1, int y2);
extern void scrolldown(int y1, int y2);
extern void backspace(void);
extern void resize_termcap_screen(int oldlines);

#define ATTR_BOLD 1
#define ATTR_UNDERLINED 2
#define ATTR_INVERSE 4

#define setinv() (putcap(t_mr))
#define setunder() (putcap(t_us))
#define setbold() (putcap(t_md))
#define normal() (putcap(t_me))

#endif