Skip to content

Commit a5007a1

Browse files
committed
switch to binary mode stdout so it can be used in FOR loop
1 parent 939bb67 commit a5007a1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

minbin/pclip.exe

0 Bytes
Binary file not shown.

pclip.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <stdio.h>
2+
#include <windows.h>
3+
int main()
4+
{
5+
char *lpData;
6+
setmode (fileno (stdout), 0x8000);
7+
if (!OpenClipboard(NULL))
8+
return 1;
9+
lpData = (char*)GetClipboardData(CF_OEMTEXT);
10+
if (lpData == NULL)
11+
return 1;
12+
fputs(lpData, stdout);
13+
return 0;
14+
}

0 commit comments

Comments
 (0)