mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
Internal clipboard support
This commit is contained in:
parent
173e68ccfa
commit
f18de1d3f3
@ -344,11 +344,11 @@ exe(unsigned char *path)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned char *
|
static unsigned char *clipboard;
|
||||||
get_clipboard_text(void) /* !!! FIXME */
|
|
||||||
{
|
|
||||||
unsigned char *ret;
|
|
||||||
|
|
||||||
|
unsigned char *
|
||||||
|
get_clipboard_text(void)
|
||||||
|
{
|
||||||
/* GNU Screen's clipboard */
|
/* GNU Screen's clipboard */
|
||||||
if (is_gnuscreen()) {
|
if (is_gnuscreen()) {
|
||||||
struct string str;
|
struct string str;
|
||||||
@ -360,9 +360,7 @@ get_clipboard_text(void) /* !!! FIXME */
|
|||||||
if (str.source) done_string(&str);
|
if (str.source) done_string(&str);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = mem_alloc(1);
|
return stracpy(clipboard ? clipboard : "");
|
||||||
if (ret) ret[0] = 0;
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -381,7 +379,8 @@ set_clipboard_text(unsigned char *data)
|
|||||||
if (str.source) done_string(&str);
|
if (str.source) done_string(&str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: internal clipboard */
|
if (clipboard) mem_free(clipboard);
|
||||||
|
clipboard = stracpy(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set xterm-like term window's title. */
|
/* Set xterm-like term window's title. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user