xpa.h   xpa.h 
skipping to change at line 14 skipping to change at line 14
/* /*
* *
* xpa.h - include file for the X Public Access mechanism * xpa.h - include file for the X Public Access mechanism
* *
*/ */
#ifndef __xpa_h #ifndef __xpa_h
#define __xpa_h #define __xpa_h
#if HAVE_CONFIG_H
#include <conf.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <prsetup.h> #include <prsetup.h>
#if HAVE_MINGW32
#include <winsock2.h>
#endif
#define XPA_MAJOR_VERSION 2 #define XPA_MAJOR_VERSION 2
#define XPA_MINOR_VERSION 1 #define XPA_MINOR_VERSION 1
#define XPA_PATCH_LEVEL 14 #define XPA_PATCH_LEVEL 15
#define XPA_VERSION "2.1.14" #define XPA_VERSION "2.1.15"
/* #define XPA_DEBUG 1 */ /* #define XPA_DEBUG 1 */
#ifdef XPA_DEBUG #ifdef XPA_DEBUG
#define FPRINTF(x) fprintf x #define FPRINTF(x) fprintf x
#define PERROR(x) perror x #define PERROR(x) perror x
#else #else
#define FPRINTF(x) #define FPRINTF(x)
#define PERROR(x) #define PERROR(x)
#endif #endif
skipping to change at line 65 skipping to change at line 72
/* at least 2 of these should fit into SZ_LINE with lots of room to spare * / /* at least 2 of these should fit into SZ_LINE with lots of room to spare * /
#define XPA_NAMELEN 1024 #define XPA_NAMELEN 1024
/* defines the types of callback procedure we use */ /* defines the types of callback procedure we use */
typedef int (*SendCb)( typedef int (*SendCb)(
#ifdef ANSI_FUNC #ifdef ANSI_FUNC
void *client_data, void *client_data,
void *call_data, void *call_data,
char *paramlist, char *paramlist,
char **buf, char **buf,
int *len size_t *len
#endif #endif
); );
typedef int (*ReceiveCb)( typedef int (*ReceiveCb)(
#ifdef ANSI_FUNC #ifdef ANSI_FUNC
void *client_data, void *client_data,
void *call_data, void *call_data,
char *paramlist, char *paramlist,
char *buf, char *buf,
int len size_t len
#endif #endif
); );
typedef int (*InfoCb)( typedef int (*InfoCb)(
#ifdef ANSI_FUNC #ifdef ANSI_FUNC
void *client_data, void *client_data,
void *call_data, void *call_data,
char *paramlist char *paramlist
#endif #endif
); );
skipping to change at line 200 skipping to change at line 207
char *id; char *id;
char *info; char *info;
char *target; char *target;
char *paramlist; char *paramlist;
int cmdfd; int cmdfd;
int datafd; int datafd;
char *cendian; char *cendian;
int ack; int ack;
/* buf and len passed to callbacks */ /* buf and len passed to callbacks */
char *buf; char *buf;
int len; size_t len;
/* for AF_INET */ /* for AF_INET */
unsigned int cmdip; unsigned int cmdip;
int cmdport; int cmdport;
int dataport; int dataport;
/* for AF_UNIX */ /* for AF_UNIX */
char *cmdname; char *cmdname;
char *dataname; char *dataname;
int acl[XPA_CMDS+1]; int acl[XPA_CMDS+1];
/* for handling fd's in non-select event loops */ /* for handling fd's in non-select event loops */
void *selcptr; /* cmdfd struct for seldel */ void *selcptr; /* cmdfd struct for seldel */
skipping to change at line 239 skipping to change at line 246
char *value; char *value;
} *XPAClip, XPAClipRec; } *XPAClip, XPAClipRec;
/* /*
* *
* record struct for receiving data from stdin * record struct for receiving data from stdin
* *
*/ */
typedef struct xpainputrec{ typedef struct xpainputrec{
struct xpainputrec *next; struct xpainputrec *next;
int start; size_t start;
int end; size_t end;
int bytes; size_t bytes;
char *buf; char *buf;
} *XPAInput, XPAInputRec; } *XPAInput, XPAInputRec;
/* /*
* *
* *
* xpa command record structure * xpa command record structure
* *
*/ */
typedef struct xpacmdrec{ typedef struct xpacmdrec{
skipping to change at line 291 skipping to change at line 298
char *method; char *method;
char *info; char *info;
char *dataname; char *dataname;
unsigned int ip; unsigned int ip;
int cmdfd; int cmdfd;
int datafd; int datafd;
int mode; int mode;
int nsproxy; int nsproxy;
/* xpaget parameters */ /* xpaget parameters */
char **bufptr; char **bufptr;
int *lenptr; size_t *lenptr;
int bufsize; size_t bufsize;
int fd; int fd;
/* xpaset parameters */ /* xpaset parameters */
char *buf; char *buf;
int len; size_t len;
int bytes; size_t bytes;
/* fork parameters */ /* fork parameters */
pid_t pid; pid_t pid;
/* common parameters */ /* common parameters */
char **nameptr; char **nameptr;
char **errptr; char **errptr;
} *XPAClient, XPAClientRec; } *XPAClient, XPAClientRec;
/* /*
* *
* *
skipping to change at line 374 skipping to change at line 381
SelOff seloff; /* routine to disable xpa command sockets */ SelOff seloff; /* routine to disable xpa command sockets */
void *selptr; /* additional info for seldelete() */ void *selptr; /* additional info for seldelete() */
/* /*
* THE CLIENT SIDE * THE CLIENT SIDE
*/ */
int persist; /* flag whether this is a persistent client */ int persist; /* flag whether this is a persistent client */
int nclient; /* number of clients -- used in processing headers * / int nclient; /* number of clients -- used in processing headers * /
int client_mode; /* global client mode */ int client_mode; /* global client mode */
XPAClient clienthead; /* linked list of active clients */ XPAClient clienthead; /* linked list of active clients */
int ifd; /* input fd for XPASetFd() */ int ifd; /* input fd for XPASetFd() */
int inpbytes; /* total number of bytes in input lists */ size_t inpbytes; /* total number of bytes in input lists */
XPAInput inphead; /* linked list of input structs */ XPAInput inphead; /* linked list of input structs */
} *XPA, XPARec; } *XPA, XPARec;
/* macros to access the xpa struct */ /* macros to access the xpa struct */
#define xpa_name(xpa) ((xpa)->name) #define xpa_name(xpa) ((xpa)->name)
#define xpa_class(xpa) ((xpa)->xclass) #define xpa_class(xpa) ((xpa)->xclass)
#define xpa_method(xpa) ((xpa)->method) #define xpa_method(xpa) ((xpa)->method)
#define xpa_sendian(xpa) ((xpa)->sendian) #define xpa_sendian(xpa) ((xpa)->sendian)
#define xpa_comm(xpa) (xpa&&(xpa)->comm?(xpa)->comm:NULL) #define xpa_comm(xpa) (xpa&&(xpa)->comm?(xpa)->comm:NULL)
#define xpa_cendian(xpa) (((xpa)->comm&&(xpa)->comm->cendian)?(xpa)->comm-> cendian:"?") #define xpa_cendian(xpa) (((xpa)->comm&&(xpa)->comm->cendian)?(xpa)->comm-> cendian:"?")
skipping to change at line 408 skipping to change at line 415
int XPAActive _PRx((XPA xpa, XPAComm comm, int flag)); int XPAActive _PRx((XPA xpa, XPAComm comm, int flag));
int XPAActiveFd _PRx((int fd)); int XPAActiveFd _PRx((int fd));
int XPAAddSelect _PRx((XPA xpa, fd_set *readfdsptr)); int XPAAddSelect _PRx((XPA xpa, fd_set *readfdsptr));
int XPAProcessSelect _PRx((fd_set *readfdsptr, int maxreq)); int XPAProcessSelect _PRx((fd_set *readfdsptr, int maxreq));
void XPACloseData _PRx((XPA xpa, XPAComm comm)); void XPACloseData _PRx((XPA xpa, XPAComm comm));
int XPAHandler _PRx((XPA xpa, int fd)); int XPAHandler _PRx((XPA xpa, int fd));
void XPAMode _PRx((char *mode, int *flag, char *name, int mask, int def)); void XPAMode _PRx((char *mode, int *flag, char *name, int mask, int def));
int XPAEndian _PRx((void)); int XPAEndian _PRx((void));
char *XPATmpdir _PRx((void)); char *XPATmpdir _PRx((void));
void XPACleanup _PRx((void)); void XPACleanup _PRx((void));
int XPASetBuf _PRx((XPA xpa, char *buf, int len, int xcopy)); int XPASetBuf _PRx((XPA xpa, char *buf, size_t len, int xcopy));
int XPASetFree _PRx((XPA xpa, MyFree myfree, void *myfree_ptr)); int XPASetFree _PRx((XPA xpa, MyFree myfree, void *myfree_ptr));
int XPAShortTimeout _PRx((void)); int XPAShortTimeout _PRx((void));
int XPALongTimeout _PRx((void)); int XPALongTimeout _PRx((void));
int XPASendLTimeout _PRx((void *client_data, void *call_data, int XPASendLTimeout _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
int XPAReceiveLTimeout _PRx((void *client_data, void *call_data, int XPAReceiveLTimeout _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPASendSTimeout _PRx((void *client_data, void *call_data, int XPASendSTimeout _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
int XPAReceiveSTimeout _PRx((void *client_data, void *call_data, int XPAReceiveSTimeout _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPADebug _PRx((void)); int XPADebug _PRx((void));
int XPASigusr1 _PRx((void)); int XPASigusr1 _PRx((void));
int XPAVerbosity _PRx((void)); int XPAVerbosity _PRx((void));
void XPAInitEnv _PRx((void)); void XPAInitEnv _PRx((void));
void XPAParseName _PRx((char *xpaname, char *xclass, char *name, int len)); void XPAParseName _PRx((char *xpaname, char *xclass, char *name, int len));
int XPAParseIpPort _PRx((char *host, unsigned int *ip, unsigned short *port )); int XPAParseIpPort _PRx((char *host, unsigned int *ip, unsigned short *port ));
int XPAParseUnixSocket _PRx((char *host)); int XPAParseUnixSocket _PRx((char *host));
int _XPAValid _PRx((XPA head, XPA xpa, char *type)); int _XPAValid _PRx((XPA head, XPA xpa, char *type));
int XPAValid _PRx((XPA xpa)); int XPAValid _PRx((XPA xpa));
char *XPATimestamp _PRx((void)); char *XPATimestamp _PRx((void));
skipping to change at line 463 skipping to change at line 470
int XPAPoll _PRx((int msec, int maxreq)); int XPAPoll _PRx((int msec, int maxreq));
int XPAMainLoop _PRx((void)); int XPAMainLoop _PRx((void));
void XPASleep _PRx((int msec)); void XPASleep _PRx((int msec));
void XPAAtExit _PRx((void)); void XPAAtExit _PRx((void));
/* command.c */ /* command.c */
void XPAInitReserved _PRx((void)); void XPAInitReserved _PRx((void));
void XPAFreeReserved _PRx((void)); void XPAFreeReserved _PRx((void));
XPACmd XPACmdLookupReserved _PRx((XPA xpa, char *lbuf, int *lp)); XPACmd XPACmdLookupReserved _PRx((XPA xpa, char *lbuf, int *lp));
XPACmd XPACmdLookup _PRx((XPA xpa, char *lbuf, int *lp)); XPACmd XPACmdLookup _PRx((XPA xpa, char *lbuf, int *lp));
int XPAReceiveCommands _PRx((void *client_data, void *call_data, int XPAReceiveCommands _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPASendCommands _PRx((void *client_data, void *call_data, int XPASendCommands _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
XPA XPACmdNew _PRx((char *xclass, char *name)); XPA XPACmdNew _PRx((char *xclass, char *name));
XPACmd XPACmdAdd _PRx((XPA xpa, char *name, char *help, XPACmd XPACmdAdd _PRx((XPA xpa, char *name, char *help,
SendCb send_callback, void *send_data, char *send_mode , SendCb send_callback, void *send_data, char *send_mode ,
ReceiveCb rec_callback, void *rec_data, char *rec_mode )); ReceiveCb rec_callback, void *rec_data, char *rec_mode ));
int XPACmdDel _PRx((XPA xpa, XPACmd cmd)); int XPACmdDel _PRx((XPA xpa, XPACmd cmd));
int XPACmdInternalReceive _PRx((void *client_data, void *call_data, int XPACmdInternalReceive _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPACmdInternalSend _PRx((void *client_data, void *call_data, int XPACmdInternalSend _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
XPA XPAGetReserved _PRx((void)); XPA XPAGetReserved _PRx((void));
int XPAMtype _PRx((void)); int XPAMtype _PRx((void));
/* client.c */ /* client.c */
int XPAClientAddSelect _PRx((XPA xpa, int XPAClientAddSelect _PRx((XPA xpa,
fd_set *readfdsptr, fd_set *writefdsptr)); fd_set *readfdsptr, fd_set *writefdsptr));
int XPAClientProcessSelect _PRx((XPA xpa, int XPAClientProcessSelect _PRx((XPA xpa,
fd_set *readfdsptr, fd_set *writefdsptr, fd_set *readfdsptr, fd_set *writefdsptr,
int maxreq)); int maxreq));
XPA XPAOpen _PRx((char *mode)); XPA XPAOpen _PRx((char *mode));
void XPAClose _PRx((XPA xpa)); void XPAClose _PRx((XPA xpa));
int XPAGet _PRx((XPA xpa, char *xtemplate, int XPAGet _PRx((XPA xpa, char *xtemplate,
char *paramlist, char *mode, char *paramlist, char *mode,
char **bufs, int *lens, char **names, char **errs, int n)); char **bufs, size_t *lens, char **names, char **errs, int n ));
int XPAGetFd _PRx((XPA xpa, char *xtemplate, int XPAGetFd _PRx((XPA xpa, char *xtemplate,
char *paramlist, char *mode, char *paramlist, char *mode,
int *fds, char **names, char **errs, int n)); int *fds, char **names, char **errs, int n));
int XPASet _PRx((XPA xpa, char *xtemplate, int XPASet _PRx((XPA xpa, char *xtemplate,
char *paramlist, char *mode, char *paramlist, char *mode,
char *buf, int len, char **names, char **errs, int n)); char *buf, size_t len, char **names, char **errs, int n));
int XPASetFd _PRx((XPA xpa, char *xtemplate, int XPASetFd _PRx((XPA xpa, char *xtemplate,
char *paramlist, char *mode, char *paramlist, char *mode,
int fd, char **names, char **errs, int n)); int fd, char **names, char **errs, int n));
int XPAInfo _PRx((XPA xpa, char *xtemplate, int XPAInfo _PRx((XPA xpa, char *xtemplate,
char *paramlist, char *mode, char *paramlist, char *mode,
char **names, char **errs, int n)); char **names, char **errs, int n));
int XPAClientValid _PRx((XPA xpa)); int XPAClientValid _PRx((XPA xpa));
void XPASaveJmp _PRx((void *env)); void XPASaveJmp _PRx((void *env));
/* acl.c */ /* acl.c */
int XPAReceiveAcl _PRx((void *client_data, void *call_data, int XPAReceiveAcl _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPASendAcl _PRx((void *client_data, void *call_data, int XPASendAcl _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
int XPAAclEdit _PRx((char *lbuf)); int XPAAclEdit _PRx((char *lbuf));
int XPAAclAdd _PRx((char *lbuf)); int XPAAclAdd _PRx((char *lbuf));
int XPAAclDel _PRx((XACL acl)); int XPAAclDel _PRx((XACL acl));
void XPAAclFree _PRx((void)); void XPAAclFree _PRx((void));
int XPAAclNew _PRx((char *aname, int flag)); int XPAAclNew _PRx((char *aname, int flag));
int XPAAclCheck _PRx((XPA xpa, unsigned int ip, char *acl)); int XPAAclCheck _PRx((XPA xpa, unsigned int ip, char *acl));
/* port.c */ /* port.c */
int XPAPortEdit _PRx((char *lbuf)); int XPAPortEdit _PRx((char *lbuf));
int XPAPortAdd _PRx((char *lbuf)); int XPAPortAdd _PRx((char *lbuf));
int XPAPortDel _PRx((PORT port)); int XPAPortDel _PRx((PORT port));
void XPAPortFree _PRx((void)); void XPAPortFree _PRx((void));
int XPAPortNew _PRx((char *aname, int flag)); int XPAPortNew _PRx((char *aname, int flag));
int XPAPort _PRx((XPA xpa)); int XPAPort _PRx((XPA xpa));
/* remote.c */ /* remote.c */
int XPAReceiveRemote _PRx((void *client_data, void *call_data, int XPAReceiveRemote _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPASendRemote _PRx((void *client_data, void *call_data, int XPASendRemote _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
int XPARemote _PRx((XPA xpa, char *host, char *acl, char *mode)); int XPARemote _PRx((XPA xpa, char *host, char *acl, char *mode));
/* clipboard.c */ /* clipboard.c */
int XPAReceiveClipboard _PRx((void *client_data, void *call_data, int XPAReceiveClipboard _PRx((void *client_data, void *call_data,
char *paramlist, char *buf, int len)); char *paramlist, char *buf, size_t len));
int XPASendClipboard _PRx((void *client_data, void *call_data, int XPASendClipboard _PRx((void *client_data, void *call_data,
char *paramlist, char **buf, int *len)); char *paramlist, char **buf, size_t *len));
int ClipBoardFree _PRx((XPA xpa, XPAClip clip)); int ClipBoardFree _PRx((XPA xpa, XPAClip clip));
/* xt.c */ /* xt.c */
int XPAXtAddInput _PRx((void *app, XPA xpa)); int XPAXtAddInput _PRx((void *app, XPA xpa));
/* tcl.c */ /* tcl.c */
int XPATclAddInput _PRx((XPA xpa)); int XPATclAddInput _PRx((XPA xpa));
int Tclxpa_Init _PRx((void *vinterp)); int Tclxpa_Init _PRx((void *vinterp));
/* gtkloop.c */ /* gtkloop.c */
int XPAGtkAddInput _PRx((XPA xpa)); int XPAGtkAddInput _PRx((XPA xpa));
/* xpaio.c */ /* xpaio.c */
int XPAGets _PRx((XPA xpa, int fd, char *buf, int len, int timeout)); int XPAGets _PRx((XPA xpa, int fd, char *buf, int len, int timeout));
int XPAPuts _PRx((XPA xpa, int fd, char *buf, int timeout)); int XPAPuts _PRx((XPA xpa, int fd, char *buf, int timeout));
int XPAGetBuf _PRx((XPA xpa, int fd, char **buf, int *len, int timeout)); int XPAGetBuf _PRx((XPA xpa, int fd, char **buf, size_t *len, int timeout))
int XPAPutBuf _PRx((XPA xpa, int fd, char *buf, int len, int timeout)); ;
int XPAPutBuf _PRx((XPA xpa, int fd, char *buf, size_t len, int timeout));
int XPAIOCallsXPA _PRx((int flag)); int XPAIOCallsXPA _PRx((int flag));
char *XPALevelSpaces _PRx((void)); char *XPALevelSpaces _PRx((void));
void XPALevelSet _PRx((int lev)); void XPALevelSet _PRx((int lev));
int XPALevelGet _PRx((void)); int XPALevelGet _PRx((void));
_PRend _PRend
#endif /* __xpa.h */ #endif /* __xpa.h */
 End of changes. 28 change blocks. 
32 lines changed or deleted 40 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/