#ifndef STATE_H
|
|
#define STATE_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
typedef struct state_t {
|
|
int pfd;
|
|
int ifd;
|
|
int ofd;
|
|
} state_t;
|
|
|
|
|
|
state_t * new_state(int pfd, int ifd, int ofd){
|
|
state_t * state = (state_t *)malloc(sizeof(state_t));
|
|
state->pfd = pfd;
|
|
state->ifd = ifd;
|
|
state->ofd = ofd;
|
|
return state;
|
|
|
|
}
|
|
|
|
#endif
|