| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) | 
Pointer to a file-descriptor function
typedef int PtFdProcF_t( int fd, void *data, unsigned mode ); typedef PtFdProcF_t *PtFdProc_t;
These data types define pointers to file-descriptor functions. The PtFdProcF_t type is the function type that the PtFdProc_t type points to. This allows you to do something like this:
PtFdProcF_t my_fd_proc;
int my_fd_proc( int fd, void *data unsigned mode) {
    ...
    }
The compiler should detect any inconsistencies between the two declarations of my_fd_proc() and give you an error (which is better than a "pointer mismatch" warning on the call to PtAppAddFd()).
Photon
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) |