aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/libcurses/pdcclip.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/kconfig/libcurses/pdcclip.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/scripts/kconfig/libcurses/pdcclip.c b/scripts/kconfig/libcurses/pdcclip.c
index 740221280..6184ad2d9 100644
--- a/scripts/kconfig/libcurses/pdcclip.c
+++ b/scripts/kconfig/libcurses/pdcclip.c
@@ -24,26 +24,27 @@ clipboard
24 memory returned, via PDC_freeclipboard(). The length of the clipboard 24 memory returned, via PDC_freeclipboard(). The length of the clipboard
25 contents is returned in the length argument. 25 contents is returned in the length argument.
26 26
27 PDC_setclipboard copies the supplied text into the system's 27 PDC_setclipboard() copies the supplied text into the system's
28 clipboard, emptying the clipboard prior to the copy. 28 clipboard, emptying the clipboard prior to the copy.
29 29
30 PDC_clearclipboard() clears the internal clipboard. 30 PDC_clearclipboard() clears the internal clipboard.
31 31
32### Return Values 32### Return Values
33 33
34 indicator of success/failure of call. 34 PDC_CLIP_SUCCESS the call was successful
35 PDC_CLIP_SUCCESS the call was successful 35 PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for
36 PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for 36 the clipboard contents
37 the clipboard contents 37 PDC_CLIP_EMPTY the clipboard contains no text
38 PDC_CLIP_EMPTY the clipboard contains no text 38 PDC_CLIP_ACCESS_ERROR no clipboard support
39 PDC_CLIP_ACCESS_ERROR no clipboard support
40 39
41### Portability 40### Portability
42 X/Open ncurses NetBSD 41
43 PDC_getclipboard - - - 42 Function | X/Open | ncurses | NetBSD
44 PDC_setclipboard - - - 43 :---------------------|:------:|:-------:|:------:
45 PDC_freeclipboard - - - 44 PDC_getclipboard | - | - | -
46 PDC_clearclipboard - - - 45 PDC_setclipboard | - | - | -
46 PDC_freeclipboard | - | - | -
47 PDC_clearclipboard | - | - | -
47 48
48**man-end****************************************************************/ 49**man-end****************************************************************/
49 50
@@ -143,7 +144,12 @@ int PDC_clearclipboard(void)
143{ 144{
144 PDC_LOG(("PDC_clearclipboard() - called\n")); 145 PDC_LOG(("PDC_clearclipboard() - called\n"));
145 146
146 EmptyClipboard(); 147 if (OpenClipboard(NULL))
148 if (EmptyClipboard())
149 {
150 CloseClipboard();
151 return PDC_CLIP_SUCCESS;
152 }
147 153
148 return PDC_CLIP_SUCCESS; 154 return PDC_CLIP_ACCESS_ERROR;
149} 155}