Esempio n. 1
0
/*
 * Pack the arguments contained in ap into a string according to the vstrpack interface in utils.h
 * and send it via <dis> to <fd>.
 */
void disVaPack(Dispatcher *dis, int fd, va_list ap)
{
    char *str;

    int n = vastrpack(&str, ap);

    disWrite(dis, fd, str, n);

    free(str);
}
Esempio n. 2
0
/*
 * Pack the arguments contained in <ap> according to the strpack interface from utils.h and send the
 * resulting string to <fd> via <ns>.
 */
void nsVaPack(NS *ns, int fd, va_list ap)
{
    char *str;

    int n = vastrpack(&str, ap);

    nsWrite(ns, fd, str, n);

    free(str);
}