本文整理汇总了C++中encode_ok_reply函数的典型用法代码示例。如果您正苦于以下问题:C++ encode_ok_reply函数的具体用法?C++ encode_ok_reply怎么用?C++ encode_ok_reply使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了encode_ok_reply函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_initscr
void do_initscr(state *st) {
st->win[0] = (WINDOW *)initscr();
driver_select(st->drv_port, (ErlDrvEvent)(size_t)fileno(stdin), DO_READ, 1);
if (st->win[0] == NULL) {
encode_ok_reply(st, -1);
} else {
encode_ok_reply(st, 0);
}
}
示例2: do_wattroff
void do_wattroff(state *st) {
int arity;
long slot, attrs;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &attrs);
encode_ok_reply(st, wattroff(st->win[slot], (int)attrs));
}
示例3: do_keypad
void do_keypad(state *st) {
int arity, bf;
long slot;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_boolean(st->args, &(st->index), &bf);
encode_ok_reply(st, keypad(st->win[slot], bf));
}
示例4: do_move
void do_move(state *st) {
int arity;
long y, x;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &y);
ei_decode_long(st->args, &(st->index), &x);
encode_ok_reply(st, move((int)y, (int)x));
}
示例5: do_box
void do_box(state *st) {
int arity;
long slot, verch, horch;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &verch);
ei_decode_long(st->args, &(st->index), &horch);
encode_ok_reply(st, box(st->win[slot], (chtype)verch, (chtype)horch));
}
示例6: do_init_pair
void do_init_pair(state *st) {
int arity;
long pairnum, fcolor, bcolor;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &pairnum);
ei_decode_long(st->args, &(st->index), &fcolor);
ei_decode_long(st->args, &(st->index), &bcolor);
encode_ok_reply(st, init_pair((int)pairnum, (int)fcolor, (int)bcolor));
}
示例7: do_wmove
void do_wmove(state *st) {
int arity;
long slot, y, x;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &y);
ei_decode_long(st->args, &(st->index), &x);
encode_ok_reply(st, wmove(st->win[slot], (int)y, (int)x));
}
示例8: do_addstr
void do_addstr(state *st) {
int arity;
long strlen;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &strlen);
char str[strlen];
ei_decode_string(st->args, &(st->index), str);
encode_ok_reply(st, addnstr(str, strlen));
}
示例9: do_waddch
void do_waddch(state *st) {
int arity;
long slot;
char ch = 0;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_char(st->args, &(st->index), &ch);
encode_ok_reply(st, waddch(st->win[slot], ch));
}
示例10: do_wvline
void do_wvline(state *st) {
int arity;
long slot, ch, max;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &ch);
ei_decode_long(st->args, &(st->index), &max);
encode_ok_reply(st, wvline(st->win[slot], (chtype)ch, (int)max));
}
示例11: do_mvaddch
void do_mvaddch(state *st) {
int arity;
long y, x, ch;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &y);
ei_decode_long(st->args, &(st->index), &x);
ei_decode_long(st->args, &(st->index), &ch);
encode_ok_reply(st, mvaddch((int)y, (int)x, (chtype)ch));
}
示例12: do_mvaddstr
void do_mvaddstr(state *st) {
int arity;
long strlen, y, x;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &y);
ei_decode_long(st->args, &(st->index), &x);
ei_decode_long(st->args, &(st->index), &strlen);
char str[strlen];
ei_decode_string(st->args, &(st->index), str);
encode_ok_reply(st, mvaddnstr((int)y, (int)x, str, (int)strlen));
}
示例13: do_mvwaddch
void do_mvwaddch(state *st) {
int arity;
long slot, y, x;
char ch = 0;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &y);
ei_decode_long(st->args, &(st->index), &x);
ei_decode_char(st->args, &(st->index), &ch);
encode_ok_reply(st, mvwaddch(st->win[slot], (int)y, (int)x, ch));
}
示例14: do_getch
static void do_getch(ErlDrvData drvstate, ErlDrvEvent event) {
state *st = (state *)drvstate;
ei_x_buff eixb;
int keycode;
ei_x_new_with_version(&eixb);
keycode = getch();
if(keycode == KEY_RESIZE) {
encode_ok_reply(st, OK);
} else {
tuple(&eixb, 2);
atom(&eixb, "getch", 5);
integer(&eixb, keycode);
driver_output(st->drv_port, eixb.buff, eixb.index);
}
}
示例15: do_wborder
void do_wborder(state *st) {
int arity;
long slot, ls, rs, ts, bs, tl, tr, bl, br;
ei_decode_tuple_header(st->args, &(st->index), &arity);
ei_decode_long(st->args, &(st->index), &slot);
ei_decode_long(st->args, &(st->index), &ls);
ei_decode_long(st->args, &(st->index), &rs);
ei_decode_long(st->args, &(st->index), &ts);
ei_decode_long(st->args, &(st->index), &bs);
ei_decode_long(st->args, &(st->index), &tl);
ei_decode_long(st->args, &(st->index), &tr);
ei_decode_long(st->args, &(st->index), &bl);
ei_decode_long(st->args, &(st->index), &br);
encode_ok_reply(st, wborder(st->win[slot], (chtype)ls, (chtype)rs, (chtype)ts,
(chtype)bs, (chtype)tl, (chtype)tr, (chtype)bl,
(chtype)br));
}