mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Expose lineptr and unlineptr outside terminal.c.
This will allow test programs to look more easily at the terminal's data structures.
This commit is contained in:
parent
1b8fb1d436
commit
c890449d76
@ -90,7 +90,6 @@ static void term_userpass_state_free(struct term_userpass_state *s);
|
|||||||
*/
|
*/
|
||||||
static void resizeline(Terminal *, termline *, int);
|
static void resizeline(Terminal *, termline *, int);
|
||||||
static termline *lineptr(Terminal *, int, int);
|
static termline *lineptr(Terminal *, int, int);
|
||||||
static void unlineptr(termline *);
|
|
||||||
static void check_line_size(Terminal *, termline *);
|
static void check_line_size(Terminal *, termline *);
|
||||||
static void do_paint(Terminal *);
|
static void do_paint(Terminal *);
|
||||||
static void erase_lots(Terminal *, bool, bool, bool);
|
static void erase_lots(Terminal *, bool, bool, bool);
|
||||||
@ -131,7 +130,7 @@ static void freetermline(termline *line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unlineptr(termline *line)
|
void term_release_line(termline *line)
|
||||||
{
|
{
|
||||||
if (line->temporary)
|
if (line->temporary)
|
||||||
freetermline(line);
|
freetermline(line);
|
||||||
@ -1264,6 +1263,10 @@ static termline *lineptr(Terminal *term, int y, int lineno)
|
|||||||
*/
|
*/
|
||||||
#define lineptr(x) (lineptr)(term,x,__LINE__)
|
#define lineptr(x) (lineptr)(term,x,__LINE__)
|
||||||
#define scrlineptr(x) (lineptr)(term,checkscr(x,__LINE__),__LINE__)
|
#define scrlineptr(x) (lineptr)(term,checkscr(x,__LINE__),__LINE__)
|
||||||
|
#define unlineptr(line) term_release_line(line)
|
||||||
|
|
||||||
|
/* Wrapper for external use (e.g. tests), without the __LINE__ parameter */
|
||||||
|
termline *term_get_line(Terminal *term, int y) { return lineptr(y); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Coerce a termline to the terminal's current width. Unlike the
|
* Coerce a termline to the terminal's current width. Unlike the
|
||||||
|
@ -613,4 +613,7 @@ enum {
|
|||||||
#undef DEFINE_FLAG_BIT
|
#undef DEFINE_FLAG_BIT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
termline *term_get_line(Terminal *term, int y);
|
||||||
|
void term_release_line(termline *line);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user