本文整理匯總了C++中EIF_TEST函數的典型用法代碼示例。如果您正苦於以下問題:C++ EIF_TEST函數的具體用法?C++ EIF_TEST怎麽用?C++ EIF_TEST使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EIF_TEST函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: eif_path_name_compare
EIF_BOOLEAN eif_path_name_compare(EIF_CHARACTER_8* s, EIF_CHARACTER_8* t, EIF_INTEGER length) {
#ifdef EIF_WINDOWS
return EIF_TEST(!strnicmp((char*)s, (char*)t, length));
#else /* Unix */
return EIF_TEST(!strncmp((char*)s, (char*)t, length));
#endif
}
示例2: eequal
rt_public EIF_BOOLEAN eequal(register EIF_REFERENCE target, register EIF_REFERENCE source)
{
/* Eiffel standard equality: it assumes that dynamic type of Eiffel
* object refered by `source' conforms to dynamic type of Eiffel
* object refered by `target'. `source' and `target' cannot be NULL
* or special objects here.
* If both `source' and `target' have the same dynamic type and this
* type is not composite, then perform a block comparison; otherwise
* perform a field by field comparison.
* It is the feature `standard_is_equal' of class ANY.
* Return a boolean.
*/
REQUIRE ("source_not_null", source);
REQUIRE ("target_not_null", target);
if (source == target) {
/* Minor optimization, if references are equal then it is the same object. */
return EIF_TRUE;
}
if (Dftype(source) == Dftype(target)) {
/* Dynamic type are the same: because of the intra-expanded
* references, we can perform only a block comparison if
* the target (or the source) is a composite object (i.e: it has
* expanded attributes): since an attribute keeps expanded or
* not expanded all the time, we can test either the source or
* the target.
*/
if (HEADER(source)->ov_flags & EO_SPEC) {
/* Works for both SPECIAL and TUPLE object */
/* Eiffel standard equality on special objects: type check assumes
* the comparison is on areas of the same type (containing the same
* thing). Called by the redefinition of feature `equal' of special
* class. `source' and/or `target' cannot be NULL.
* Return a boolean.
*/
/* First condition: same count */
if
((RT_SPECIAL_COUNT(source) != RT_SPECIAL_COUNT(target)) ||
(RT_SPECIAL_ELEM_SIZE(source) != RT_SPECIAL_ELEM_SIZE(target)))
{
return EIF_FALSE;
} else {
/* Second condition: block equality */
return EIF_TEST(!memcmp (source, target, RT_SPECIAL_VISIBLE_SIZE(source)));
}
} else {
if (!(HEADER(source)->ov_flags & EO_COMP)) /* Perform a block comparison */
return EIF_TEST(!memcmp (source, target, EIF_Size(Dtype(source))));
else
return e_field_equal(target, source);
}
}
/* Field by field comparison */
return EIF_FALSE;
}
示例3: F1179_16587
/* {EV_TOOL_BAR_BUTTON_I}.update_for_pick_and_drop */
void F1179_16587 (EIF_REFERENCE Current, EIF_BOOLEAN arg1)
{
GTCX
EIF_REFERENCE loc1 = (EIF_REFERENCE) 0;
EIF_REFERENCE loc2 = (EIF_REFERENCE) 0;
EIF_REFERENCE tr1 = NULL;
EIF_REFERENCE tr2 = NULL;
EIF_BOOLEAN tb1;
EIF_BOOLEAN tb2;
EIF_BOOLEAN tb3;
RTCDT;
RTLD;
RTLI(5);
RTLR(0,Current);
RTLR(1,loc1);
RTLR(2,tr1);
RTLR(3,loc2);
RTLR(4,tr2);
RTGC;
if (arg1) {
tb1 = '\0';
tb2 = '\0';
tb3 = '\0';
if (F1181_16614(Current)) {
tr1 = F1049_13622(RTCV(F1093_14440(Current)));
loc1 = tr1;
tb3 = EIF_TEST(loc1);
}
if (tb3) {
tr1 = *(EIF_REFERENCE *)(RTCV(loc1) + O11165[Dtype(loc1)-1092]);
loc2 = RTCCL(tr1);
tb2 = EIF_TEST(loc2);
}
if (tb2) {
tr1 = F70_2603(RTCV(F1029_13066(Current)));
tr2 = RTCCL(loc2);
tb2 = F733_6803(RTCV(tr1), tr2);
tb1 = (EIF_BOOLEAN) !tb2;
}
if (tb1) {
*(EIF_BOOLEAN *)(Current + O12423[dtype-1178]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 1;
F1181_16613(Current);
}
} else {
if (*(EIF_BOOLEAN *)(Current + O12423[dtype-1178])) {
*(EIF_BOOLEAN *)(Current + O12423[dtype-1178]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 0;
F1181_16612(Current);
}
}
RTLE;
}
示例4: F96_3056
/* {ISE_EXCEPTION_MANAGER}.raise */
void F96_3056 (EIF_REFERENCE Current, EIF_REFERENCE arg1)
{
GTCX
EIF_POINTER loc1 = (EIF_POINTER) 0;
EIF_POINTER loc2 = (EIF_POINTER) 0;
EIF_REFERENCE loc3 = (EIF_REFERENCE) 0;
EIF_POINTER tp1;
EIF_REFERENCE tr1 = NULL;
EIF_INTEGER_32 ti4_1;
EIF_BOOLEAN tb1;
RTLD;
RTLI(4);
RTLR(0,arg1);
RTLR(1,Current);
RTLR(2,tr1);
RTLR(3,loc3);
RTGC;
tb1 = F117_3324(RTCV(arg1));
if ((EIF_BOOLEAN) !tb1) {
if ((EIF_BOOLEAN) EIF_TEST(eif_is_in_rescue())) {
tr1 = F96_3055(Current);
F117_3328(RTCV(arg1), tr1);
}
F96_3067(Current, arg1);
{
/* INLINED CODE (default_pointer) */
tp1 = (EIF_POINTER) 0;
/* END INLINED CODE */
}
loc1 = tp1;
tr1 = *(EIF_REFERENCE *)(RTCV(arg1) + _REFACS_3_);
loc3 = tr1;
if (EIF_TEST(loc3)) {
loc2 = F212_4145(RTCV(loc3));
} else {
{
/* INLINED CODE (default_pointer) */
tp1 = (EIF_POINTER) 0;
/* END INLINED CODE */
}
loc2 = tp1;
}
ti4_1 = (FUNCTION_CAST(EIF_INTEGER_32, (EIF_REFERENCE)) R3177[Dtype(arg1)-116])(RTCV(arg1));
eif_builtin_ISE_EXCEPTION_MANAGER_developer_raise (Current, ti4_1, loc1, loc2);
}
RTLE;
}
示例5: en_ipv6_supported
EIF_BOOLEAN en_ipv6_supported() {
static int res = -1;
EIF_NET_INITIALIZE;
if (res == -1) {
HMODULE lib;
SOCKET fd = socket(AF_INET6, SOCK_STREAM, 0);
if (fd == INVALID_SOCKET) {
res = 0;
} else {
closesocket (fd);
if ((lib = LoadLibrary ("ws2_32.dll")) == 0) {
res = 0;
} else if (GetProcAddress (lib, "getaddrinfo") == 0) {
FreeLibrary (lib);
res = 0;
} else if (GetProcAddress (lib, "freeaddrinfo") == 0) {
FreeLibrary (lib);
res = 0;
} else if (GetProcAddress (lib, "getnameinfo") == 0) {
FreeLibrary (lib);
res = 0;
} else {
FreeLibrary(lib);
res = 1;
}
}
}
return EIF_TEST(res);
}
示例6: F862_6939
/* {INET_PROPERTIES}.is_ipv6_available */
EIF_TYPED_VALUE F862_6939 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "is_ipv6_available";
RTEX;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 861, Current, 0, 0, 12477);
RTSA(Dtype(Current));
RTSC;
RTME(Dtype(Current), 1);
RTDBGEAA(861, Current, 12477);
RTIV(Current, RTAL);Result = (EIF_BOOLEAN) EIF_TEST(en_ipv6_available());
RTVI(Current, RTAL);
RTRS;
RTHOOK(1);
RTDBGLE;
RTMD(1);
RTLE;
RTLO(2);
RTEE;
{ EIF_TYPED_VALUE r; r.type = SK_BOOL; r.it_b = Result; return r; }
}
示例7: F11_318
/* {OPERATING_ENVIRONMENT}.root_directory_supported */
EIF_TYPED_VALUE F11_318 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "root_directory_supported";
RTEX;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 10, Current, 0, 0, 398);
RTSA(Dtype(Current));
RTSC;
RTME(Dtype(Current), 1);
RTDBGEAA(10, Current, 398);
RTIV(Current, RTAL);Result = (EIF_BOOLEAN) EIF_TEST(eif_root_dir_supported());
RTVI(Current, RTAL);
RTRS;
RTHOOK(1);
RTDBGLE;
RTMD(1);
RTLE;
RTLO(2);
RTEE;
{ EIF_TYPED_VALUE r; r.type = SK_BOOL; r.it_b = Result; return r; }
}
示例8: F1081_14166
/* {EV_GTK_WIDGET_IMP}.make */
void F1081_14166 (EIF_REFERENCE Current)
{
GTCX
EIF_POINTER loc1 = (EIF_POINTER) 0;
EIF_POINTER loc2 = (EIF_POINTER) 0;
EIF_INTEGER_32 ti4_1;
RTCDT;
RTLD;
RTLI(1);
RTLR(0,Current);
RTGC;
loc1 = (FUNCTION_CAST(EIF_POINTER, (EIF_REFERENCE)) R10990[dtype-1078])(Current);
loc2 = *(EIF_POINTER *)(Current + O10979[dtype-1078]);
ti4_1 = RTOSCF(14165,F1081_14165,(Current));
gtk_widget_add_events((GtkWidget*) loc1, (gint) ti4_1);
if ((EIF_BOOLEAN)(loc1 != loc2)) {
ti4_1 = RTOSCF(14165,F1081_14165,(Current));
gtk_widget_add_events((GtkWidget*) loc2, (gint) ti4_1);
}
if ((EIF_BOOLEAN) EIF_TEST(GTK_IS_WINDOW((loc2)))) {
gtk_widget_realize((GtkWidget*) loc2);
} else {
gtk_widget_show((GtkWidget*) loc2);
}
F1029_13080(Current, (EIF_BOOLEAN) 1);
RTLE;
}
示例9: eif_is_in_rescue
/*
* Is current execution during rescue?
*/
EIF_BOOLEAN eif_is_in_rescue(void)
{
GE_context* context;
context = GE_current_context();
return (EIF_TEST(context->in_rescue > 0));
}
示例10: F648_6062
/* {LINKED_STACK}.item */
EIF_REFERENCE F648_6062 (EIF_REFERENCE Current)
{
GTCX
EIF_REFERENCE loc1 = (EIF_REFERENCE) 0;
EIF_REFERENCE tr1 = NULL;
EIF_REFERENCE Result = ((EIF_REFERENCE) 0);
RTCFDT;
RTLD;
RTLI(4);
RTLR(0,loc1);
RTLR(1,Current);
RTLR(2,tr1);
RTLR(3,Result);
RTGC;
RTCT0(NULL, EX_CHECK);
tr1 = *(EIF_REFERENCE *)(Current + O5147[Dtype(Current)-644]);
loc1 = tr1;
if (EIF_TEST(loc1)) {
RTCK0;
} else {
RTCF0;
}
Result = (FUNCTION_CAST(EIF_REFERENCE, (EIF_REFERENCE)) R3869[Dtype(loc1)-233])(RTCV(loc1));
RTLE;
return Result;
}
示例11: F139_1936
/* {DISPOSABLE}.is_in_final_collect */
EIF_TYPED_VALUE F139_1936 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "is_in_final_collect";
RTEX;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 138, Current, 0, 0, 2472);
RTSA(Dtype(Current));
RTSC;
RTME(Dtype(Current), 1);
RTDBGEAA(138, Current, 2472);
RTIV(Current, RTAL);
Result = EIF_TEST(inline_F139_1936 ());
RTVI(Current, RTAL);
RTRS;
RTHOOK(1);
RTDBGLE;
RTMD(1);
RTLE;
RTLO(2);
RTEE;
{ EIF_TYPED_VALUE r; r.type = SK_BOOL; r.it_b = Result; return r; }
}
示例12: F157_8695
/* {INET_PROPERTIES}.is_ipv4_stack_preferred */
EIF_TYPED_VALUE F157_8695 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "is_ipv4_stack_preferred";
RTEX;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 156, Current, 0, 0, 2265);
RTSA(Dtype(Current));
RTSC;
RTME(Dtype(Current), 1);
RTDBGEAA(156, Current, 2265);
RTIV(Current, RTAL);Result = (EIF_BOOLEAN) EIF_TEST(en_get_prefer_ipv4());
RTVI(Current, RTAL);
RTRS;
RTHOOK(1);
RTDBGLE;
RTMD(1);
RTLE;
RTLO(2);
RTEE;
{ EIF_TYPED_VALUE r; r.type = SK_BOOL; r.it_b = Result; return r; }
}
示例13: F1053_13755
/* {EV_PIXEL_BUFFER_IMP}.height */
EIF_INTEGER_32 F1053_13755 (EIF_REFERENCE Current)
{
GTCX
EIF_REFERENCE loc1 = (EIF_REFERENCE) 0;
EIF_POINTER tp1;
EIF_REFERENCE tr1 = NULL;
EIF_INTEGER_32 ti4_1;
RTLD;
RTLI(3);
RTLR(0,Current);
RTLR(1,loc1);
RTLR(2,tr1);
RTGC;
if ((EIF_BOOLEAN) ((EIF_INTEGER_32) gtk_major_version > ((EIF_INTEGER_32) 1L))) {
tp1 = *(EIF_POINTER *)(Current+ _PTROFF_4_2_0_0_0_0_);
RTLE;
return (EIF_INTEGER_32) inline_F24_253(tp1);
} else {
tr1 = *(EIF_REFERENCE *)(Current + _REFACS_3_);
loc1 = tr1;
if (EIF_TEST(loc1)) {
ti4_1 = F950_11092(RTCV(loc1));
RTLE;
return (EIF_INTEGER_32) ti4_1;
}
}
RTLE;
return (EIF_INTEGER_32) 0;
}
示例14: F11_319
/* {OPERATING_ENVIRONMENT}.case_sensitive_path_names */
EIF_TYPED_VALUE F11_319 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "case_sensitive_path_names";
RTEX;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 10, Current, 0, 0, 399);
RTSA(Dtype(Current));
RTSC;
RTME(Dtype(Current), 1);
RTDBGEAA(10, Current, 399);
RTIV(Current, RTAL);Result = (EIF_BOOLEAN) EIF_TEST(eif_case_sensitive_path_names());
RTVI(Current, RTAL);
RTRS;
RTHOOK(1);
RTDBGLE;
RTMD(1);
RTLE;
RTLO(2);
RTEE;
{ EIF_TYPED_VALUE r; r.type = SK_BOOL; r.it_b = Result; return r; }
}
示例15: F533_5658
/* {INDEXABLE_ITERATION_CURSOR}.make */
void F533_5658 (EIF_REFERENCE Current, EIF_REFERENCE arg1)
{
GTCX
EIF_REFERENCE loc1 = (EIF_REFERENCE) 0;
EIF_NATURAL_32 tu4_1;
RTLD;
RTLI(3);
RTLR(0,Current);
RTLR(1,arg1);
RTLR(2,loc1);
RTGC;
RTAR(Current, arg1);
*(EIF_REFERENCE *)(Current) = (EIF_REFERENCE) arg1;
loc1 = arg1;
loc1 = RTRV(eif_non_attached_type(29),loc1);
if (EIF_TEST(loc1)) {
tu4_1 = *(EIF_NATURAL_32 *)(RTCV(loc1)+ _LNGOFF_0_0_0_0_);
*(EIF_NATURAL_32 *)(Current+ _LNGOFF_1_1_0_0_) = (EIF_NATURAL_32) tu4_1;
} else {
tu4_1 = (EIF_NATURAL_32) ((EIF_INTEGER_32) 0L);
*(EIF_NATURAL_32 *)(Current+ _LNGOFF_1_1_0_0_) = (EIF_NATURAL_32) tu4_1;
}
*(EIF_INTEGER_32 *)(Current+ _LNGOFF_1_1_0_4_) = (EIF_INTEGER_32) ((EIF_INTEGER_32) 1L);
*(EIF_BOOLEAN *)(Current+ _CHROFF_1_0_) = (EIF_BOOLEAN) (EIF_BOOLEAN) 0;
RTLE;
}