这篇教程C++ FN函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FN函数的典型用法代码示例。如果您正苦于以下问题:C++ FN函数的具体用法?C++ FN怎么用?C++ FN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FN函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: Dis_FPU2op void Dis_FPU2op(MIPSOpcode op, char *out) { int fs = _FS; int fd = _FD; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %s",name,FN(fd),FN(fs)); }
开发者ID:Devil084,项目名称:ppsspp,代码行数:7,
示例2: Dis_FPUComp void Dis_FPUComp(MIPSOpcode op, char *out) { int fs = _FS; int ft = _FT; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %s",name,FN(fs),FN(ft)); }
开发者ID:Devil084,项目名称:ppsspp,代码行数:7,
示例3: setup_enginestatic bool setup_engine( struct i2c_engine *i2c_engine){ struct i2c_hw_engine_dce110 *hw_engine = FROM_I2C_ENGINE(i2c_engine); /* Program pin select */ REG_UPDATE_6( DC_I2C_CONTROL, DC_I2C_GO, 0, DC_I2C_SOFT_RESET, 0, DC_I2C_SEND_RESET, 0, DC_I2C_SW_STATUS_RESET, 1, DC_I2C_TRANSACTION_COUNT, 0, DC_I2C_DDC_SELECT, hw_engine->engine_id); /* Program time limit */ REG_UPDATE_N( SETUP, 2, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_TIME_LIMIT), I2C_SETUP_TIME_LIMIT, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_ENABLE), 1); /* Program HW priority * set to High - interrupt software I2C at any time * Enable restart of SW I2C that was interrupted by HW * disable queuing of software while I2C is in use by HW */ REG_UPDATE_2( DC_I2C_ARBITRATION, DC_I2C_NO_QUEUED_SW_GO, 0, DC_I2C_SW_PRIORITY, DC_I2C_ARBITRATION__DC_I2C_SW_PRIORITY_NORMAL); return true;}
开发者ID:CCNITSilchar,项目名称:linux,代码行数:32,
示例4: setup_enginestatic bool setup_engine( struct dce_i2c_hw *dce_i2c_hw){ uint32_t i2c_setup_limit = I2C_SETUP_TIME_LIMIT_DCE; if (dce_i2c_hw->setup_limit != 0) i2c_setup_limit = dce_i2c_hw->setup_limit; /* Program pin select */ REG_UPDATE_6(DC_I2C_CONTROL, DC_I2C_GO, 0, DC_I2C_SOFT_RESET, 0, DC_I2C_SEND_RESET, 0, DC_I2C_SW_STATUS_RESET, 1, DC_I2C_TRANSACTION_COUNT, 0, DC_I2C_DDC_SELECT, dce_i2c_hw->engine_id); /* Program time limit */ if (dce_i2c_hw->send_reset_length == 0) { /*pre-dcn*/ REG_UPDATE_N(SETUP, 2, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_TIME_LIMIT), i2c_setup_limit, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_ENABLE), 1); } /* Program HW priority * set to High - interrupt software I2C at any time * Enable restart of SW I2C that was interrupted by HW * disable queuing of software while I2C is in use by HW */ REG_UPDATE_2(DC_I2C_ARBITRATION, DC_I2C_NO_QUEUED_SW_GO, 0, DC_I2C_SW_PRIORITY, DC_I2C_ARBITRATION__DC_I2C_SW_PRIORITY_NORMAL); return true;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:34,
示例5: execute_transactionstatic void execute_transaction( struct dce_i2c_hw *dce_i2c_hw){ REG_UPDATE_N(SETUP, 5, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_DATA_DRIVE_EN), 0, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_CLK_DRIVE_EN), 0, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_DATA_DRIVE_SEL), 0, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_INTRA_TRANSACTION_DELAY), 0, FN(DC_I2C_DDC1_SETUP, DC_I2C_DDC1_INTRA_BYTE_DELAY), 0); REG_UPDATE_5(DC_I2C_CONTROL, DC_I2C_SOFT_RESET, 0, DC_I2C_SW_STATUS_RESET, 0, DC_I2C_SEND_RESET, 0, DC_I2C_GO, 0, DC_I2C_TRANSACTION_COUNT, dce_i2c_hw->transaction_count - 1); /* start I2C transfer */ REG_UPDATE(DC_I2C_CONTROL, DC_I2C_GO, 1); /* all transactions were executed and HW buffer became empty * (even though it actually happens when status becomes DONE) */ dce_i2c_hw->transaction_count = 0; dce_i2c_hw->buffer_used_bytes = 0;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:27,
示例6: Dis_FPU3opvoid Dis_FPU3op(u32 op, char *out){ int ft = _FT; int fs = _FS; int fd = _FD;; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %s, %s",name,FN(fd),FN(fs),FN(ft));}
开发者ID:HomerSp,项目名称:ppsspp,代码行数:8,
示例7: FNint FN(bscc_main)(){ int *arr; int i, j, t, sz; sz=1<<22; arr=malloc(sz*sizeof(int)); for(i=0; i<sz; i++)arr[i]=rand()*251+rand(); t=clock(); FN(hsortm)(arr, sz); printf("HSort %d/n", clock()-t); FN(sortchk)(arr, sz); for(i=0; i<sz; i++)arr[i]=rand()*251+rand(); t=clock(); FN(Sort0)(arr, 0, sz); printf("Sort0 %d/n", clock()-t); FN(sortchk)(arr, sz); for(i=0; i<sz; i++)arr[i]=rand()*251+rand(); t=clock(); FN(Sort1)(arr, 0, sz); printf("Sort1 %d/n", clock()-t); FN(sortchk)(arr, sz); for(i=0; i<sz; i++)arr[i]=rand()*251+rand(); t=clock(); FN(Sort2)(arr, 0, sz); printf("Sort2 %d/n", clock()-t); FN(sortchk)(arr, sz); for(i=0; i<sz; i++)arr[i]=rand()*251+rand(); t=clock(); qsort(arr, sz, 4, FN(qs_cmp_i)); printf("QSort %d/n", clock()-t); FN(sortchk)(arr, sz); return(0);}
开发者ID:cr88192,项目名称:bgbtech_engine,代码行数:48,
示例8: FN//---------------------------------------------------------------------------bool File::Exists(const Ztring &File_Name){ #ifdef ZENLIB_USEWX wxFileName FN(File_Name.c_str()); return FN.FileExists(); #else //ZENLIB_USEWX #ifdef ZENLIB_STANDARD if (File_Name.find(__T('*'))!=std::string::npos || File_Name.find(__T('?'))!=std::string::npos) return false; struct stat buffer; int status; #ifdef UNICODE status=stat(File_Name.To_Local().c_str(), &buffer); #else status=stat(File_Name.c_str(), &buffer); #endif //UNICODE return status==0 && S_ISREG(buffer.st_mode); #elif defined WINDOWS if (File_Name.find(__T('*'))!=std::string::npos || (File_Name.find(__T("////?//"))!=0 && File_Name.find(__T('?'))!=std::string::npos) || (File_Name.find(__T("////?//"))==0 && File_Name.find(__T('?'), 4)!=std::string::npos)) return false; #ifdef UNICODE DWORD FileAttributes=GetFileAttributesW(File_Name.c_str()); #else DWORD FileAttributes=GetFileAttributes(File_Name.c_str()); #endif //UNICODE return ((FileAttributes!=INVALID_FILE_ATTRIBUTES) && !(FileAttributes&FILE_ATTRIBUTE_DIRECTORY)); #endif #endif //ZENLIB_USEWX}
开发者ID:Armada651,项目名称:mpc-hc,代码行数:30,
示例9: FN//---------------------------------------------------------------------------Ztring& FileName::Extension_Set(const Ztring &Extension){ #ifdef ZENLIB_USEWX wxFileName FN(c_str()); FN.SetExt(Extension.c_str()); assign (FN.GetFullPath().c_str()); #else //ZENLIB_USEWX #ifdef WINDOWS //Path limit size_t Pos_Path=rfind(_T('//')); if (Pos_Path==Ztring::npos) Pos_Path=0; //Not found //Extension limit size_t Pos_Ext=rfind(_T('.')); if (Pos_Ext==Ztring::npos || Pos_Ext<Pos_Path) { append(1, _T('.')); //Not found Pos_Ext=size()-1; } replace(Pos_Ext+1, size()-Pos_Ext-1, Extension, 0, Ztring::npos); #else //Not supported #endif #endif //ZENLIB_USEWX return *this;}
开发者ID:Kyouju,项目名称:mpc-hc,代码行数:27,
示例10: FN//---------------------------------------------------------------------------bool Dir::Exists(const Ztring &File_Name){ #ifdef ZENLIB_USEWX wxFileName FN(File_Name.c_str()); return FN.DirExists(); #else //ZENLIB_USEWX #ifdef WINDOWS #ifdef UNICODE DWORD FileAttributes; #ifndef ZENLIB_NO_WIN9X_SUPPORT if (IsWin9X_Fast()) FileAttributes=GetFileAttributesA(File_Name.To_Local().c_str()); else #endif //ZENLIB_NO_WIN9X_SUPPORT FileAttributes=GetFileAttributesW(File_Name.c_str()); #else DWORD FileAttributes=GetFileAttributes(File_Name.c_str()); #endif //UNICODE return ((FileAttributes!=INVALID_FILE_ATTRIBUTES) && (FileAttributes&FILE_ATTRIBUTE_DIRECTORY)); #else //WINDOWS struct stat buffer; int status; #ifdef UNICODE status=stat(File_Name.To_Local().c_str(), &buffer); #else status=stat(File_Name.c_str(), &buffer); #endif //UNICODE return status==0 && S_ISDIR(buffer.st_mode); #endif #endif //ZENLIB_USEWX}
开发者ID:achiarifman,项目名称:mkm4v,代码行数:32,
示例11: FN//---------------------------------------------------------------------------bool File::Exists(const Ztring &File_Name){ #ifdef ZENLIB_USEWX wxFileName FN(File_Name.c_str()); return FN.FileExists(); #else //ZENLIB_USEWX #ifdef ZENLIB_STANDARD struct stat buffer; int status; #ifdef UNICODE status=stat(File_Name.To_Local().c_str(), &buffer); #else status=stat(File_Name.c_str(), &buffer); #endif //UNICODE return status==0 && S_ISREG(buffer.st_mode); #elif defined WINDOWS #ifdef UNICODE DWORD FileAttributes; if (IsWin9X()) FileAttributes=GetFileAttributesA(File_Name.To_Local().c_str()); else FileAttributes=GetFileAttributesW(File_Name.c_str()); #else DWORD FileAttributes=GetFileAttributes(File_Name.c_str()); #endif //UNICODE return ((FileAttributes!=INVALID_FILE_ATTRIBUTES) && !(FileAttributes&FILE_ATTRIBUTE_DIRECTORY)); #endif #endif //ZENLIB_USEWX}
开发者ID:asfdfdfd,项目名称:MediaInfoLib-Avdump2-Mac,代码行数:30,
示例12: _void wxWidgetsGUIConfigPanel::OnButton1Click(wxCommandEvent& event){ wxString FileName = ::wxFileSelector( _("Select resource file"), _T(""),_T(""),_T(""), _("XRC files (*.xrc)|*.xrc|" "Zipped files (*.zip)|*.zip|" "All files (*)|*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST | compatibility::wxHideReadonly); if ( !FileName.empty() ) { wxFileName FN(FileName); FN.MakeRelativeTo(m_GUI->GetProjectPath()); wxString Ext = FN.GetExt(); FileName = FN.GetFullPath(); if ( Ext == _T("zip") || Ext == _T("ZIP") ) { FileName.Append(_T("#zip:*.xrc")); } wxString CurrentContent = AutoLoad->GetValue(); if ( CurrentContent.Length() && ( CurrentContent[CurrentContent.Length()-1] != _T('/n') ) ) { AutoLoad->AppendText(_T("/n")); } AutoLoad->AppendText(FileName); AutoLoad->AppendText(_T("/n")); }}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:29,
示例13: release_enginestatic void release_engine( struct dce_i2c_hw *dce_i2c_hw){ bool safe_to_reset; /* Restore original HW engine speed */ set_speed(dce_i2c_hw, dce_i2c_hw->original_speed); /* Release I2C */ REG_UPDATE(DC_I2C_ARBITRATION, DC_I2C_SW_DONE_USING_I2C_REG, 1); /* Reset HW engine */ { uint32_t i2c_sw_status = 0; REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status); /* if used by SW, safe to reset */ safe_to_reset = (i2c_sw_status == 1); } if (safe_to_reset) REG_UPDATE_2(DC_I2C_CONTROL, DC_I2C_SOFT_RESET, 1, DC_I2C_SW_STATUS_RESET, 1); else REG_UPDATE(DC_I2C_CONTROL, DC_I2C_SW_STATUS_RESET, 1); /* HW I2c engine - clock gating feature */ if (!dce_i2c_hw->engine_keep_power_up_count) REG_UPDATE_N(SETUP, 1, FN(SETUP, DC_I2C_DDC1_ENABLE), 0);}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:32,
示例14: Dis_mxc1 void Dis_mxc1(MIPSOpcode op, char *out) { int fs = _FS; int rt = _RT; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %s",name,RN(rt),FN(fs)); }
开发者ID:Devil084,项目名称:ppsspp,代码行数:7,
示例15: mainint main(){ prepare_shuffling_dictionary(); prepare_shuffling_dictionary_avx(); const testcase tests[] = { { "equal lists", {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64}, // list1 {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64}, // list2 {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64}, // intersection result {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64}, // union result {} // difference result },{ "completely different lists", {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64}, {1,3,5,6, 10,12,27,31, 36,47,50,51, 52,66,77,88}, {}, {0,1,2,3,4,5,6,7, 10,11,12,13,23,27,31,32, 33,36,42,44,47,48,50,51, 52,53,55,60,64,66,77,88}, {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64} },{ "no match in first", {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64, 66,67,68,69, 77,78,79,80, 81,82,83,84, 87,88,89,99}, {1,3,5,6, 10,12,27,31, 36,47,50,51, 52,66,77,88}, {66,77,88}, {0,1,2,3,4,5,6,7, 10,11,12,13,23,27,31,32, 33,36,42,44,47,48,50,51, 52,53,55,60,64, 66,67,68,69, 77,78,79,80, 81,82,83,84, 87,88,89,99}, {0,2,4,7, 11,13,23,32, 33,42,44,48, 53,55,60,64, 67,68,69, 78,79,80, 81,82,83,84, 87,89,99} } }; constexpr int tests_size = sizeof(tests) / sizeof(testcase); #define FN(x) {#x, x} run( tests, tests_size, { FN(intersect_vector_sse), FN(intersect_vector_sse_asm), FN(intersect_vector_avx),#ifdef __AVX2__ FN(intersect_vector_avx2), FN(intersect_vector_avx2_asm)#endif }, { FN(union_vector_sse) }, { FN(difference_vector_sse),#ifdef __AVX2__ FN(difference_vector_avx2),#endif } ); free(shuffle_mask_avx); return 0;}
开发者ID:tetzank,项目名称:SIMDSetOperations,代码行数:56,
示例16: set_speedstatic void set_speed( struct dce_i2c_hw *dce_i2c_hw, uint32_t speed){ if (speed) { if (dce_i2c_hw->masks->DC_I2C_DDC1_START_STOP_TIMING_CNTL) REG_UPDATE_N(SPEED, 3, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_PRESCALE), dce_i2c_hw->reference_frequency / speed, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_THRESHOLD), 2, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_START_STOP_TIMING_CNTL), speed > 50 ? 2:1); else REG_UPDATE_N(SPEED, 2, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_PRESCALE), dce_i2c_hw->reference_frequency / speed, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_THRESHOLD), 2); }}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:17,
示例17: Dis_FPULSvoid Dis_FPULS(u32 op, char *out){ int offset = (signed short)(op&0xFFFF); int ft = _FT; int rs = _RS; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %d(%s)",name,FN(ft),offset,RN(rs));}
开发者ID:HomerSp,项目名称:ppsspp,代码行数:8,
示例18: Dis_FPULS void Dis_FPULS(MIPSOpcode op, char *out) { int offset = (signed short)(op&0xFFFF); int ft = _FT; int rs = _RS; const char *name = MIPSGetName(op); sprintf(out, "%s/t%s, %s(%s)",name,FN(ft),SignedHex(offset),RN(rs)); }
开发者ID:Devil084,项目名称:ppsspp,代码行数:8,
示例19: fill_array_icvoid fill_array_ic(aveq *A, function *G, function *S, int k, int l_or_not) { //intero per decidere se utilizzare onda quadra o gaussiana //l_or_not = 0 tutti, l_or_not = 1 Leapfrog int i; switch(l_or_not) { case 0: if( k == 1 ) { //condizione fissata per la gaussiana for(i = 0; i < A->dim; i++) { A->tsol[i] = FN(G,i*A->xstep); A->solution[i] = FN(G,i*A->xstep); A->tsol_1[i] = FN(G,i*A->xstep); } } else if ( k == 0 ) { //condizione fissata per l'onda quadra for(i = 0; i < A->dim; i++) { A->tsol[i] = FN(S,i*A->xstep); A->solution[i] = FN(S,i*A->xstep); A->tsol_1[i] = FN(S,i*A->xstep); } } else { //condizione a casaccio: errore printf("#Errore: inserire una condizione valida (0 o 1)./n"); exit(0); //blocca esecuzione del programma?? } case 1: if( k == 1 ) { //condizione fissata per la gaussiana for(i = 0; i < A->dim; i++) { A->tsol[i] = FN(G,i*A->xstep); A->tsol_1[i] = FN(G,i*A->xstep + A->tstep); } } else if ( k == 0 ) { //condizione fissata per l'onda quadra for(i = 0; i < A->dim; i++) { A->tsol[i] = FN(S,i*A->xstep); A->tsol_1[i] = FN(S,i*A->xstep + A->tstep); } } else { //condizione a casaccio: errore printf("#Errore: inserire una condizione valida (0 o 1)./n"); exit(0); //blocca esecuzione del programma?? } }}
开发者ID:SBolo,项目名称:GitComputationalPhysics,代码行数:43,
示例20: isl_point_get_ctx/* Evaluate "u" in the void point "pnt". * In particular, return the value NaN. */static __isl_give isl_val *FN(UNION,eval_void)(__isl_take UNION *u, __isl_take isl_point *pnt){ isl_ctx *ctx; ctx = isl_point_get_ctx(pnt); FN(UNION,free)(u); isl_point_free(pnt); return isl_val_nan(ctx);}
开发者ID:Meinersbur,项目名称:isl,代码行数:13,
示例21: mainint main(void) { uint8_t in[200]; for (size_t i = 0; i < 200; i++) { in[i] = Frama_C_interval(0, 255); } uint8_t out[BYTES]; // uint8_t out256[256 / 8]; // uint8_t out384[384 / 8]; // uint8_t out512[512 / 8]; uint8_t invalid; void* maybeout = Frama_C_nondet_ptr(&invalid, (void*)0); size_t outlen; void* maybein = Frama_C_nondet_ptr(&invalid, (void*)0); size_t inlen = Frama_C_interval(0, 4294967295); int err = 0; int fn = Frama_C_interval(0, 3); switch (fn) { case 0: FN(sha3_224); //@assert err < 0; break; case 1: FN(sha3_256); //@assert err < 0; break; case 2: FN(sha3_384); //@assert err < 0; break; case 3: FN(sha3_512); //@assert err < 0; break; } //@assert err < 0; // sha3_256(out256, 256 / 8, in, Frama_C_interval(0, 200)); // sha3_384(out384, 384 / 8, in, Frama_C_interval(0, 200)); // sha3_512(out512, 512 / 8, in, Frama_C_interval(0, 200));}
开发者ID:coruus,项目名称:keccakc,代码行数:43,
示例22: set_speedstatic void set_speed( struct i2c_engine *i2c_engine, uint32_t speed){ struct i2c_hw_engine_dce110 *hw_engine = FROM_I2C_ENGINE(i2c_engine); if (speed) { if (hw_engine->i2c_mask->DC_I2C_DDC1_START_STOP_TIMING_CNTL) REG_UPDATE_N( SPEED, 3, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_PRESCALE), hw_engine->reference_frequency / speed, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_THRESHOLD), 2, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_START_STOP_TIMING_CNTL), speed > 50 ? 2:1); else REG_UPDATE_N( SPEED, 2, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_PRESCALE), hw_engine->reference_frequency / speed, FN(DC_I2C_DDC1_SPEED, DC_I2C_DDC1_THRESHOLD), 2); }}
开发者ID:CCNITSilchar,项目名称:linux,代码行数:20,
示例23: PRIMLakeVal *apply(LakeCtx *ctx, LakeVal *fnVal, LakeList *args){ LakeVal *result = NULL; if (lake_is_type(TYPE_PRIM, fnVal)) { LakePrimitive *prim = PRIM(fnVal); int arity = prim->arity; if (arity == ARITY_VARARGS || LIST_N(args) == arity) { result = prim->fn(ctx, args); } else { ERR("%s expects %d params but got %zu", prim->name, arity, LIST_N(args)); result = NULL; } } else if (lake_is_type(TYPE_FN, fnVal)) { LakeFn *fn = FN(fnVal); /* Check # of params */ size_t nparams = LIST_N(fn->params); if (!fn->varargs && LIST_N(args) != nparams) { ERR("expected %zu params but got %zu", nparams, LIST_N(args)); return NULL; } else if (fn->varargs && LIST_N(args) < nparams) { ERR("expected at least %zu params but got %zu", nparams, LIST_N(args)); return NULL; } Env *env = env_make(fn->closure); /* bind each (param,arg) pair in env */ size_t i; for (i = 0; i < nparams; ++i) { env_define(env, SYM(LIST_VAL(fn->params, i)), LIST_VAL(args, i)); } /* bind varargs */ if (fn->varargs) { LakeList *remainingArgs = list_make_with_capacity(LIST_N(args) - nparams); for (; i < LIST_N(args); ++i) { list_append(remainingArgs, LIST_VAL(args, i)); } env_define(env, fn->varargs, VAL(remainingArgs)); } /* evaluate body */ result = eval_exprs1(ctx, env, fn->body); } else { ERR("not a function: %s", lake_repr(fnVal)); } return result;}
开发者ID:samsonjs,项目名称:lake,代码行数:53,
示例24: get_config_name/* determine the correct filename for the config file */static void get_config_name(fnchar *buf, nh_bool ui){ buf[0] = '/0';#if defined(UNIX) char *envval; if (!ui) { /* check for env override first */ envval = getenv("DYNAHACKOPTIONS"); if (envval) { strncpy(buf, envval, BUFSZ); return; } }#endif /* look in regular location */ if (!get_gamedir(CONFIG_DIR, buf)) return; fnncat(buf, ui ? FN("curses.conf") : FN("DynaHack.conf"), BUFSZ);}
开发者ID:ictxiangxin,项目名称:LoongHack,代码行数:23,
注:本文中的FN函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ FName函数代码示例 C++ FMargin函数代码示例 |