コード例 #1
0
ファイル: dbg.c プロジェクト: 0branch/frobtads
static void dbgdsdisp(void *ctx, const char *buf, int bufl)
{
    if (buf[0] == '\n')
        tioflush((tiocxdef *)ctx);
    else
        tioputslen((tiocxdef *)ctx, (char *)buf, bufl);
}
コード例 #2
0
ファイル: out.c プロジェクト: BPaden/garglk
/*
 *   write out a runtime length-prefixed string 
 */
void outfmt(tiocxdef *ctx, uchar *txt)
{
    uint len;

    VARUSED(ctx);

    /* read the length prefix */
    len = osrp2(txt) - 2;
    txt += 2;

    /* write out the string */
    tioputslen(ctx, (char *)txt, len);
}