mirror of
https://github.com/NishiOwO/fvwm1.git
synced 2025-04-21 08:44:39 +00:00
25 lines
558 B
C
25 lines
558 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
/************************************************************************
|
|
*
|
|
* Sends arbitrary text to fvwm
|
|
*
|
|
***********************************************************************/
|
|
void SendText(int *fd,char *message,unsigned long window)
|
|
{
|
|
int w;
|
|
|
|
if(message != NULL)
|
|
{
|
|
write(fd[0],&window, sizeof(unsigned long));
|
|
|
|
w=strlen(message);
|
|
write(fd[0],&w,sizeof(int));
|
|
write(fd[0],message,w);
|
|
|
|
/* keep going */
|
|
w = 1;
|
|
write(fd[0],&w,sizeof(int));
|
|
}
|
|
}
|