mirror of
https://github.com/NishiOwO/fvwm1.git
synced 2025-04-21 16:54:44 +00:00
27 lines
568 B
C
27 lines
568 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
|
|
/***********************************************************************
|
|
*
|
|
* Procedure:
|
|
* SendInfo - send a command back to fvwm
|
|
*
|
|
***********************************************************************/
|
|
void SendInfo(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));
|
|
}
|
|
}
|
|
|