Cygwinでscreenを使っているが、Windowsのクリップボードとscreenのコピペが同期したら便利かも…と思ったので少しいじってみた。 クリップボードの操作 まず、クリップボードを操作する関数を書く。 (see http://nienie.com/~masapico/api_GetClipboardData.html) clip.h #ifndef __CLIP_H__ #define __CLIP_H__ char *getclip(int *lenp); void putclip(char *buf, int len); #endif clip.c #include <windows.h> #include <stdlib.h> #include <string.h> char *getclip(int *lenp) { HANDLE hText; char *pText,