这篇教程C++ ADD_DATA函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ADD_DATA函数的典型用法代码示例。如果您正苦于以下问题:C++ ADD_DATA函数的具体用法?C++ ADD_DATA怎么用?C++ ADD_DATA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ADD_DATA函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: data_cursor_all_bottom_leftstatic voiddata_cursor_all_bottom_left(void){ ADD_DATA("all - bottom left - bottom left", gcut_list_string_new( "(03,03)", "(03,04)", "(03,05)", "(03,06)", "(03,07)", "(03,08)", "(04,03)", "(04,04)", "(04,05)", "(04,06)", "(04,07)", "(04,08)", "(05,03)", "(05,04)", "(05,05)", "(05,06)", "(05,07)", "(05,08)", "(06,03)", "(06,04)", "(06,05)", "(06,06)", "(06,07)", "(06,08)", "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", NULL), 8, 3, 3, 8); ADD_DATA("all - bottom left - top left", gcut_list_string_new( "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", NULL), 8, 3, 7, 8); ADD_DATA("all - bottom left - bottom right", gcut_list_string_new("(03,07)", "(03,08)", "(04,07)", "(04,08)", "(05,07)", "(05,08)", "(06,07)", "(06,08)", "(07,07)", "(07,08)", "(08,07)", "(08,08)", NULL), 8, 7, 3, 8);}
开发者ID:zunda,项目名称:groonga,代码行数:34,
示例2: data_hash_table_createstatic voiddata_hash_table_create(void){ ADD_DATA("hash", "table_create Blog TABLE_HASH_KEY ShortText", "Blog", GRN_OBJ_TABLE_HASH_KEY, "ShortText", NULL); ADD_DATA("hash - without key", "table_create Blog TABLE_HASH_KEY", "Blog", GRN_OBJ_TABLE_HASH_KEY, NULL, NULL); ADD_DATA("hash - key normalize", "table_create Blog TABLE_HASH_KEY|KEY_NORMALIZE ShortText", "Blog", GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_KEY_NORMALIZE, "ShortText", NULL); ADD_DATA("hash - key normalize - value", "table_create Blog TABLE_HASH_KEY|KEY_NORMALIZE ShortText Int32", "Blog", GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_KEY_NORMALIZE, "ShortText", "Int32");}
开发者ID:bossato,项目名称:groonga,代码行数:28,
示例3: data_cursor_bottomstatic voiddata_cursor_bottom(void){ ADD_DATA("bottom - minimum", gcut_list_string_new("(03,07)", "(03,08)", "(04,07)", "(04,08)", NULL), 4, 7, 3, 8); ADD_DATA("bottom - left", gcut_list_string_new( "(03,03)", "(03,04)", "(03,05)", "(03,06)", "(03,07)", "(03,08)", "(04,03)", "(04,04)", "(04,05)", "(04,06)", "(04,07)", "(04,08)", NULL), 4, 3, 3, 8); ADD_DATA("bottom - right", gcut_list_string_new( "(03,07)", "(03,08)", "(03,09)", "(03,10)", "(03,11)", "(03,12)", "(04,07)", "(04,08)", "(04,09)", "(04,10)", "(04,11)", "(04,12)", NULL), 4, 7, 3, 12);}
开发者ID:zunda,项目名称:groonga,代码行数:26,
示例4: multi_respawn_broadcast// send a broadcast pack indicating a player has respawnedvoid multi_respawn_broadcast(net_player *np){ ubyte data[50],val; int packet_size = 0; ushort signature; vector pos; // broadcast the packet to all players Assert(Net_player->flags & NETINFO_FLAG_AM_MASTER); signature = Objects[np->player->objnum].net_signature; pos = Objects[np->player->objnum].pos; // build the header and add the opcode BUILD_HEADER(RESPAWN_NOTICE); val = RESPAWN_BROADCAST; ADD_DATA(val); // add the data for the respawn ADD_USHORT(signature); add_vector_data( data, &packet_size, pos ); ADD_SHORT(np->player_id); ADD_DATA(np->s_info.cur_primary_bank); ADD_DATA(np->s_info.cur_secondary_bank); ADD_DATA(np->s_info.cur_link_status); ADD_USHORT(np->s_info.ship_ets); ADD_STRING(np->p_info.p_objp->name); Assert( np->s_info.ship_ets != 0 ); // find dave or allender multi_io_send_to_all_reliable(data, packet_size);}
开发者ID:lubomyr,项目名称:freespace2,代码行数:33,
示例5: data_cursor_leftstatic voiddata_cursor_left(void){ ADD_DATA("left - minimum", gcut_list_string_new("(07,03)", "(07,04)", "(08,03)", "(08,04)", NULL), 8, 3, 7, 4); ADD_DATA("left - bottom", gcut_list_string_new("(03,03)", "(03,04)", "(04,03)", "(04,04)", "(05,03)", "(05,04)", "(06,03)", "(06,04)", "(07,03)", "(07,04)", "(08,03)", "(08,04)", NULL), 8, 3, 3, 4); ADD_DATA("left - top", gcut_list_string_new("(07,03)", "(07,04)", "(08,03)", "(08,04)", "(09,03)", "(09,04)", "(10,03)", "(10,04)", "(11,03)", "(11,04)", "(12,03)", "(12,04)", NULL), 12, 3, 7, 4);}
开发者ID:zunda,项目名称:groonga,代码行数:32,
示例6: data_cursor_topstatic voiddata_cursor_top(void){ ADD_DATA("top - minimum", gcut_list_string_new("(11,07)", "(11,08)", "(12,07)", "(12,08)", NULL), 12, 7, 11, 8); ADD_DATA("top - left", gcut_list_string_new( "(11,03)", "(11,04)", "(11,05)", "(11,06)", "(11,07)", "(11,08)", "(12,03)", "(12,04)", "(12,05)", "(12,06)", "(12,07)", "(12,08)", NULL), 12, 3, 11, 8); ADD_DATA("top - right", gcut_list_string_new( "(11,07)", "(11,08)", "(11,09)", "(11,10)", "(11,11)", "(11,12)", "(12,07)", "(12,08)", "(12,09)", "(12,10)", "(12,11)", "(12,12)", NULL), 12, 7, 11, 12);}
开发者ID:zunda,项目名称:groonga,代码行数:26,
示例7: data_near_uint32voiddata_near_uint32(void){#define ADD_DATA(label, expected, min_size, max, offset, limit, flags) / gcut_add_datum(label, / "expected", G_TYPE_POINTER, / expected, g_list_free, / "min-size", G_TYPE_INT, min_size, / "max", G_TYPE_UINT, max, / "offset", G_TYPE_INT, offset, / "limit", G_TYPE_INT, limit, / "flags", G_TYPE_INT, flags, / NULL) ADD_DATA("no limit", uint_list_new(5, 0x00000000U, 0x00000004U, 0x00000080U, 0xdeadbeefU, 0xffffffffU), 0, 0, 0, -1, 0); ADD_DATA("min limit", uint_list_new(3, 0x00000000U, 0x00000004U, 0x00000080U), 1, 0, 0, -1, 0);#undef ADD_DATA}
开发者ID:ryoqun,项目名称:groonga,代码行数:29,
示例8: data_cursor_rightstatic voiddata_cursor_right(void){ ADD_DATA("right - minimum", gcut_list_string_new("(07,11)", "(07,12)", "(08,11)", "(08,12)", NULL), 8, 11, 7, 12); ADD_DATA("right - bottom", gcut_list_string_new("(03,11)", "(03,12)", "(04,11)", "(04,12)", "(05,11)", "(05,12)", "(06,11)", "(06,12)", "(07,11)", "(07,12)", "(08,11)", "(08,12)", NULL), 8, 11, 3, 12); ADD_DATA("right - top", gcut_list_string_new("(07,11)", "(07,12)", "(08,11)", "(08,12)", "(09,11)", "(09,12)", "(10,11)", "(10,12)", "(11,11)", "(11,12)", "(12,11)", "(12,12)", NULL), 12, 11, 7, 12);}
开发者ID:zunda,项目名称:groonga,代码行数:32,
示例9: data_prefix_rk_offset_and_limitstatic voiddata_prefix_rk_offset_and_limit(void){ ADD_DATA("offset", gcut_list_string_new("キノウ", "キョウカ", "クミコミ", "クミコム", "ケンサクヨウキュウ", "コウセイド", "コウソク", "コンパクト", NULL), "k", 3, -1); ADD_DATA("limit", gcut_list_string_new("カネソナエタ", "カノウ", "ケンサク", NULL), "k", 0, 3); ADD_DATA("offset - limit", gcut_list_string_new("キノウ", "キョウカ", "ケンサクヨウキュウ", "コウセイド", "コウソク", NULL), "k", 3, 5);}
开发者ID:ryoqun,项目名称:groonga,代码行数:32,
示例10: data_prefix_errorvoiddata_prefix_error(void){#define ADD_DATA(label, rc, message, offset, limit) / gcut_add_datum(label, / "rc", G_TYPE_UINT, rc, / "message", G_TYPE_STRING, message, / "offset", G_TYPE_INT, offset, / "limit", G_TYPE_INT, limit, / NULL) ADD_DATA("negative offset", GRN_TOO_SMALL_OFFSET, "can't use negative offset with GRN_CURSOR_PREFIX: -1", -1, -1); ADD_DATA("large offset", GRN_TOO_LARGE_OFFSET, "offset is rather than table size: offset:100, table_size:8", 100, -1); ADD_DATA("negative limit", GRN_TOO_SMALL_LIMIT, "can't use small limit rather than -1 with GRN_CURSOR_PREFIX: -2", 0, -2);#undef ADD_DATA}
开发者ID:ryoqun,项目名称:groonga,代码行数:26,
示例11: test_socks_5_no_authenticate/** Perform SOCKS 5 authentication */static voidtest_socks_5_no_authenticate(void *ptr){ SOCKS_TEST_INIT(); /*SOCKS 5 No Authentication */ ADD_DATA(buf,"/x05/x01/x00"); tt_assert(!fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks)); tt_int_op(2,OP_EQ, socks->replylen); tt_int_op(5,OP_EQ, socks->reply[0]); tt_int_op(SOCKS_NO_AUTH,OP_EQ, socks->reply[1]); tt_int_op(0,OP_EQ, buf_datalen(buf)); /*SOCKS 5 Send username/password anyway - pretend to be broken */ ADD_DATA(buf,"/x01/x02/x01/x01/x02/x01/x01"); tt_assert(!fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks)); tt_int_op(5,OP_EQ, socks->socks_version); tt_int_op(2,OP_EQ, socks->replylen); tt_int_op(1,OP_EQ, socks->reply[0]); tt_int_op(0,OP_EQ, socks->reply[1]); tt_int_op(2,OP_EQ, socks->usernamelen); tt_int_op(2,OP_EQ, socks->passwordlen); tt_mem_op("/x01/x01",OP_EQ, socks->username, 2); tt_mem_op("/x01/x01",OP_EQ, socks->password, 2); done: ;}
开发者ID:1234max,项目名称:tor,代码行数:36,
示例12: multi_options_update_mission// update the standalone with the mission settings I have picked (mission filename, etc)void multi_options_update_mission(netgame_info *ng, int campaign_mode){ ubyte data[MAX_PACKET_SIZE],code; int packet_size = 0; // should be a host on a standalone Assert((Net_player->flags & NETINFO_FLAG_GAME_HOST) && !(Net_player->flags & NETINFO_FLAG_AM_MASTER)); // build the header BUILD_HEADER(OPTIONS_UPDATE); code = MULTI_OPTION_MISSION; ADD_DATA(code); // type (coop or team vs. team) ADD_INT(ng->type_flags); // respawns ADD_UINT(ng->respawn); // add the mission/campaign filename code = (ubyte)campaign_mode; ADD_DATA(code); if(campaign_mode){ ADD_STRING(ng->campaign_name); } else { ADD_STRING(ng->mission_name); } // send to the server multi_io_send_reliable(Net_player, data, packet_size);}
开发者ID:DahBlount,项目名称:fs2open.github.com,代码行数:32,
示例13: data_cursor_all_top_leftstatic voiddata_cursor_all_top_left(void){ ADD_DATA("all - top left - top left", gcut_list_string_new( "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", "(09,03)", "(09,04)", "(09,05)", "(09,06)", "(09,07)", "(09,08)", "(10,03)", "(10,04)", "(10,05)", "(10,06)", "(10,07)", "(10,08)", "(11,03)", "(11,04)", "(11,05)", "(11,06)", "(11,07)", "(11,08)", "(12,03)", "(12,04)", "(12,05)", "(12,06)", "(12,07)", "(12,08)", NULL), 12, 3, 7, 8); ADD_DATA("all - top left - top right", gcut_list_string_new("(07,07)", "(07,08)", "(08,07)", "(08,08)", "(09,07)", "(09,08)", "(10,07)", "(10,08)", "(11,07)", "(11,08)", "(12,07)", "(12,08)", NULL), 12, 7, 7, 8);}
开发者ID:zunda,项目名称:groonga,代码行数:26,
示例14: data_uvector_columnvoiddata_uvector_column(void){ ADD_DATA("int32", "[-322,7,9270]", "Int32", G_TYPE_INT, -322, 7, 9270); ADD_DATA("float", "[0.5,12.5,-1.0]", "Float", G_TYPE_DOUBLE, 0.5, 12.5, -1.0); ADD_DATA("bool", "[true,false,true]", "Bool", G_TYPE_BOOLEAN, TRUE, FALSE, TRUE);}
开发者ID:bossato,项目名称:groonga,代码行数:10,
示例15: data_near_geo_pointvoiddata_near_geo_point(void){#define ADD_DATA(label, expected, min_size, max, offset, limit, flags) / gcut_add_datum(label, / "expected", G_TYPE_POINTER, / expected, gcut_list_string_free, / "min-size", G_TYPE_INT, min_size, / "max", G_TYPE_STRING, max, / "offset", G_TYPE_INT, offset, / "limit", G_TYPE_INT, limit, / "flags", G_TYPE_INT, flags, / NULL) ADD_DATA("no limit", gcut_list_string_new(POINT(1, 2, 3, 4, 5, 6), POINT(1, 2, 3, 7, 8, 9), POINT(7, 8, 9, 4, 5, 6), POINT(88, 58, 58, 178, 58, 58), POINT(89, 59, 59, 179, -59, -59), POINT(89, 59, 59, 179, 59, 59), POINT(-89, -59, -59, 179, 59, 59), POINT(-89, -59, -59, -179, -59, -59), POINT(-88, -58, -58, -178, -58, -58), NULL), 0, TAKEN_POINT(0, 0, 0, 0, 0, 0), 0, -1, 0); ADD_DATA("min-size", gcut_list_string_new(POINT(1, 2, 3, 4, 5, 6), POINT(1, 2, 3, 7, 8, 9), POINT(7, 8, 9, 4, 5, 6), NULL), 1, TAKEN_POINT(0, 0, 0, 0, 0, 0), 0, -1, 0);#undef ADD_DATA}
开发者ID:ryoqun,项目名称:groonga,代码行数:55,
示例16: data_temporary_table_default_tokenizervoiddata_temporary_table_default_tokenizer(void){#define ADD_DATA(label, flags) / cut_add_data(label, GINT_TO_POINTER(flags), NULL, NULL) ADD_DATA("hash", GRN_OBJ_TABLE_HASH_KEY); ADD_DATA("patricia trie", GRN_OBJ_TABLE_PAT_KEY);#undef ADD_DATA}
开发者ID:cosmo0920,项目名称:groonga,代码行数:11,
示例17: data_tablevoiddata_table(void){#define ADD_DATA(label, flags) / cut_add_data(label, GINT_TO_POINTER(flags), NULL, NULL) ADD_DATA("no-key", GRN_OBJ_TABLE_NO_KEY); ADD_DATA("hash", GRN_OBJ_TABLE_HASH_KEY); ADD_DATA("patricia trie", GRN_OBJ_TABLE_PAT_KEY);#undef ADD_DATA}
开发者ID:darashi,项目名称:groonga,代码行数:12,
示例18: test_socks_4_supported_commands/** Perform supported SOCKS 4 commands */static voidtest_socks_4_supported_commands(void *ptr){ SOCKS_TEST_INIT(); tt_int_op(0,OP_EQ, buf_datalen(buf)); /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.2:4370 */ ADD_DATA(buf, "/x04/x01/x11/x12/x02/x02/x02/x03/x00"); tt_assert(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks) == 1); tt_int_op(4,OP_EQ, socks->socks_version); tt_int_op(0,OP_EQ, socks->replylen); /* XXX: shouldn't tor reply? */ tt_int_op(SOCKS_COMMAND_CONNECT,OP_EQ, socks->command); tt_str_op("2.2.2.3",OP_EQ, socks->address); tt_int_op(4370,OP_EQ, socks->port); tt_assert(socks->got_auth == 0); tt_assert(! socks->username); tt_int_op(0,OP_EQ, buf_datalen(buf)); socks_request_clear(socks); /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.2:4369 with userid*/ ADD_DATA(buf, "/x04/x01/x11/x12/x02/x02/x02/x04me/x00"); tt_assert(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks) == 1); tt_int_op(4,OP_EQ, socks->socks_version); tt_int_op(0,OP_EQ, socks->replylen); /* XXX: shouldn't tor reply? */ tt_int_op(SOCKS_COMMAND_CONNECT,OP_EQ, socks->command); tt_str_op("2.2.2.4",OP_EQ, socks->address); tt_int_op(4370,OP_EQ, socks->port); tt_assert(socks->got_auth == 1); tt_assert(socks->username); tt_int_op(2,OP_EQ, socks->usernamelen); tt_mem_op("me",OP_EQ, socks->username, 2); tt_int_op(0,OP_EQ, buf_datalen(buf)); socks_request_clear(socks); /* SOCKS 4a Send RESOLVE [F0] request for torproject.org */ ADD_DATA(buf, "/x04/xF0/x01/x01/x00/x00/x00/x02me/x00torproject.org/x00"); tt_assert(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks) == 1); tt_int_op(4,OP_EQ, socks->socks_version); tt_int_op(0,OP_EQ, socks->replylen); /* XXX: shouldn't tor reply? */ tt_str_op("torproject.org",OP_EQ, socks->address); tt_int_op(0,OP_EQ, buf_datalen(buf)); done: ;}
开发者ID:1234max,项目名称:tor,代码行数:53,
示例19: data_defaultvoiddata_default(void){#define ADD_DATA(label, use_index) / gcut_add_datum(label, / "use-index", G_TYPE_BOOLEAN, use_index, / NULL) ADD_DATA("use index", TRUE); ADD_DATA("no index", FALSE);#undef ADD_DATA}
开发者ID:ueno,项目名称:groonga,代码行数:13,
示例20: data_scalar_and_vectorstatic voiddata_scalar_and_vector(void){#define ADD_DATA(label, column_name) / gcut_add_datum(label, / "column-name", G_TYPE_STRING, column_name, / NULL) ADD_DATA("scalar", "words_scalar"); ADD_DATA("vector", "words_vector");#undef ADD_DATA}
开发者ID:mmmaru777,项目名称:groonga,代码行数:13,
示例21: data_truncate_namedvoiddata_truncate_named(void){#define ADD_DATA(label, flags) / gcut_add_datum(label, / "flags", G_TYPE_INT, flags, / NULL) ADD_DATA("array", GRN_OBJ_TABLE_NO_KEY); ADD_DATA("hash", GRN_OBJ_TABLE_HASH_KEY); ADD_DATA("patricia trie", GRN_OBJ_TABLE_PAT_KEY);#undef ADD_DATA}
开发者ID:cosmo0920,项目名称:groonga,代码行数:14,
示例22: test_socks_5_unsupported_commands/** Perform unsupported SOCKS 5 commands */static voidtest_socks_5_unsupported_commands(void *ptr){ SOCKS_TEST_INIT(); /* SOCKS 5 Send unsupported BIND [02] command */ ADD_DATA(buf, "/x05/x02/x00/x01"); tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks),OP_EQ, 0); tt_int_op(0,OP_EQ, buf_datalen(buf)); tt_int_op(5,OP_EQ, socks->socks_version); tt_int_op(2,OP_EQ, socks->replylen); tt_int_op(5,OP_EQ, socks->reply[0]); tt_int_op(0,OP_EQ, socks->reply[1]); ADD_DATA(buf, "/x05/x02/x00/x01/x02/x02/x02/x01/x01/x01"); tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks),OP_EQ, -1); tt_int_op(5,OP_EQ,socks->socks_version); tt_int_op(10,OP_EQ,socks->replylen); tt_int_op(5,OP_EQ,socks->reply[0]); tt_int_op(SOCKS5_COMMAND_NOT_SUPPORTED,OP_EQ,socks->reply[1]); tt_int_op(1,OP_EQ,socks->reply[3]); buf_clear(buf); socks_request_clear(socks); /* SOCKS 5 Send unsupported UDP_ASSOCIATE [03] command */ ADD_DATA(buf, "/x05/x02/x00/x01"); tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks),OP_EQ, 0); tt_int_op(5,OP_EQ, socks->socks_version); tt_int_op(2,OP_EQ, socks->replylen); tt_int_op(5,OP_EQ, socks->reply[0]); tt_int_op(0,OP_EQ, socks->reply[1]); ADD_DATA(buf, "/x05/x03/x00/x01/x02/x02/x02/x01/x01/x01"); tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, get_options()->SafeSocks),OP_EQ, -1); tt_int_op(5,OP_EQ,socks->socks_version); tt_int_op(10,OP_EQ,socks->replylen); tt_int_op(5,OP_EQ,socks->reply[0]); tt_int_op(SOCKS5_COMMAND_NOT_SUPPORTED,OP_EQ,socks->reply[1]); tt_int_op(1,OP_EQ,socks->reply[3]); done: ;}
开发者ID:1234max,项目名称:tor,代码行数:50,
示例23: data_uint64_to_boolvoiddata_uint64_to_bool(void){#define ADD_DATA(label, expected, number) / gcut_add_datum(label, / "expected", G_TYPE_UINT, expected, / "number", G_TYPE_UINT, number, / NULL) ADD_DATA("true", GRN_TRUE, 1); ADD_DATA("false", GRN_FALSE, 0); ADD_DATA("not zero", GRN_TRUE, 100);#undef ADD_DATA}
开发者ID:zunda,项目名称:groonga,代码行数:15,
示例24: data_text_to_tablevoiddata_text_to_table(void){#define ADD_DATA(label, expected, expected_size, text) / gcut_add_datum(label, / "expected", G_TYPE_UINT, expected, / "expected-size", GCUT_TYPE_SIZE, expected_size, / "text", G_TYPE_STRING, text, / NULL) ADD_DATA("existence", 1, sizeof(grn_id), "daijiro"); ADD_DATA("nonexistence", GRN_ID_NIL, 0, "yu"); ADD_DATA("empty key", GRN_ID_NIL, sizeof(grn_id), "");#undef ADD_DATA}
开发者ID:AkioKanno,项目名称:groonga,代码行数:16,
示例25: data_createvoiddata_create(void){#define ADD_DATA(label, name, path) / gcut_add_datum(label, / "name", G_TYPE_STRING, name, / "path", G_TYPE_STRING, path, / NULL) ADD_DATA("anonymous", NULL, NULL); ADD_DATA("named", "Entries", NULL); ADD_DATA("named - explicit path", "Entries", cut_build_path(tmp_directory, "view.db", NULL));#undef ADD_DATA}
开发者ID:bossato,项目名称:groonga,代码行数:16,
示例26: data_text_to_boolvoiddata_text_to_bool(void){#define ADD_DATA(label, expected, text) / gcut_add_datum(label, / "expected", G_TYPE_UINT, expected, / "text", G_TYPE_STRING, text, / NULL) ADD_DATA("empty", GRN_FALSE, ""); ADD_DATA("NULL", GRN_FALSE, NULL); ADD_DATA("true", GRN_TRUE, "true"); ADD_DATA("false", GRN_TRUE, "false");#undef ADD_DATA}
开发者ID:zunda,项目名称:groonga,代码行数:16,
示例27: multi_msg_send_squadmsg_packet// send a squadmsg packet to a playervoid multi_msg_send_squadmsg_packet(net_player *target,net_player *source,int command,ushort net_sig,int subsys_type){ ubyte data[100]; char s_val; int packet_size; Assert(source != NULL); Assert(target != NULL); if((source == NULL) || (target == NULL)){ return; } // build the header BUILD_HEADER(SQUADMSG_PLAYER); // add the command and targeting data ADD_INT(command); // add the id of the guy sending the order ADD_SHORT(source->player_id); // net signature ADD_USHORT(net_sig); // targeted subsytem (or -1 if none) s_val = (char)subsys_type; ADD_DATA(s_val); // send to the player multi_io_send_reliable(target, data, packet_size);}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:32,
示例28: data_ellipsoidvoiddata_ellipsoid(void){#define ADD_DATA(label, type, use_index) / gcut_add_datum(label, / "approximate-type", G_TYPE_STRING, type, / "use-index", G_TYPE_BOOLEAN, use_index, / NULL) ADD_DATA("full - use index", "ellipsoid", TRUE); ADD_DATA("full - no index", "ellipsoid", FALSE); ADD_DATA("abbreviation - use index", "ellip", TRUE); ADD_DATA("abbreviation - no index", "ellip", FALSE);#undef ADD_DATA}
开发者ID:ueno,项目名称:groonga,代码行数:16,
示例29: data_array_createstatic voiddata_array_create(void){ ADD_DATA("array", "table_create Blog TABLE_NO_KEY", "Blog", GRN_OBJ_TABLE_NO_KEY, NULL, NULL); ADD_DATA("array with value", "table_create Blog TABLE_NO_KEY --value_type Int32", "Blog", GRN_OBJ_TABLE_NO_KEY, NULL, "Int32");}
开发者ID:bossato,项目名称:groonga,代码行数:16,
示例30: multi_options_update_start_game// update the standalone with the settings I have picked at the "start game" screenvoid multi_options_update_start_game(netgame_info *ng){ ubyte data[MAX_PACKET_SIZE],code; int packet_size = 0; // should be a host on a standalone Assert((Net_player->flags & NETINFO_FLAG_GAME_HOST) && !(Net_player->flags & NETINFO_FLAG_AM_MASTER)); // build the header BUILD_HEADER(OPTIONS_UPDATE); code = MULTI_OPTION_START_GAME; ADD_DATA(code); // add the start game options ADD_STRING(ng->name); ADD_INT(ng->mode); ADD_INT(ng->security); // add mode-specific data switch(ng->mode){ case NG_MODE_PASSWORD: ADD_STRING(ng->passwd); break; case NG_MODE_RANK_ABOVE: case NG_MODE_RANK_BELOW: ADD_INT(ng->rank_base); break; } // send to the standalone server multi_io_send_reliable(Net_player, data, packet_size);}
开发者ID:DahBlount,项目名称:fs2open.github.com,代码行数:33,
注:本文中的ADD_DATA函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ADD_LATENT_AUTOMATION_COMMAND函数代码示例 C++ ADDWORD函数代码示例 |