struct qelem {
    struct qelem *q_forw;
    struct qelem *q_back;
};

insque(elem,pred)
struct qelem *elem,*pred;
{
    elem->q_forw = pred->q_forw;
    elem->q_back = pred;
    (pred->q_forw)->q_back = elem;
    pred->q_forw = elem;
}

remque(elem)
struct qelem *elem;
{
    (elem->q_back) -> q_forw = elem->q_forw;
    (elem->q_forw) -> q_back = elem->q_back;
    
}
