这篇教程C++ topfile函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中topfile函数的典型用法代码示例。如果您正苦于以下问题:C++ topfile函数的具体用法?C++ topfile怎么用?C++ topfile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了topfile函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: topfilestatic FILE *tofile(lua_State * L){ FILE **f = topfile(L); if (*f == NULL) luaL_error(L, "attempt to use a closed file"); return *f;}
开发者ID:luigiScarso,项目名称:luatexjit,代码行数:7,
示例2: io_fclosestatic int io_fclose(lua_State * L){ FILE **p = topfile(L); int ok = (fclose(*p) == 0); *p = NULL; return pushresult(L, ok, NULL);}
开发者ID:luigiScarso,项目名称:luatexjit,代码行数:7,
示例3: io_pclose/*** this function has a separated environment, which defines the** correct __close for 'popen' files*/static int io_pclose(lua_State * L){ FILE **p = topfile(L); int ok = lua_pclose(L, *p); *p = NULL; return pushresult(L, ok, NULL);}
开发者ID:luigiScarso,项目名称:luatexjit,代码行数:11,
示例4: io_gcstatic int io_gc (lua_State *L) { FILE *f = *topfile(L); /* ignore closed files and standard files */ if (f != NULL && f != stdin && f != stdout && f != stderr) aux_close(L); return 0;}
开发者ID:dirsors,项目名称:ps2sdk-ports,代码行数:7,
示例5: io_tostringstatic int io_tostring (lua_State *L) { FILE *f = *topfile(L); if (f == NULL) lua_pushstring(L, "file (closed)"); else lua_pushfstring(L, "file (%p)", f); return 1;}
开发者ID:dirsors,项目名称:ps2sdk-ports,代码行数:8,
示例6: zip_tostringstatic int zip_tostring (lua_State *L) { char buff[32]; ZZIP_DIR** f = topfile(L, 1); if (*f == NULL) strcpy(buff, "closed"); else sprintf(buff, "%p", lua_touserdata(L, 1)); lua_pushfstring(L, "zip file (%s)", buff); return 1;}
开发者ID:msva,项目名称:luazip,代码行数:10,
示例7: io_tostringstatic int io_tostring (lua_State *L) { char buff[128]; FILE **f = topfile(L, 1); if (*f == NULL) strcpy(buff, "closed"); else sprintf(buff, "%p", lua_touserdata(L, 1)); lua_pushfstring(L, "file (%s)", buff); return 1;}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:10,
示例8: io_pclose/*** this function has a separated environment, which defines the** correct __close for 'popen' files*/static int io_pclose (lua_State *L) {#if !USE_POPEN luaL_error(L, "`popen' not supported"); return 0;#else FILE **p = topfile(L); int ok = lua_pclose(L, *p); *p = NULL; return pushresult(L, ok, NULL);#endif}
开发者ID:dirsors,项目名称:ps2sdk-ports,代码行数:15,
示例9: quickvoid quick( unsigned int *x, unsigned int *y ) { register int key; dispkey( CNTRL_Q ); waitkbd( 3, 2 ); key = ebioskey( 0 ) & 0xff; prchar( key, 0, 3, 2 ); if ( !isalpha( key ) && !iscntrl( key ) ) { return; } switch ( key & 0x1f ) { case 'r' - 'a' + 1: topfile( x ); break; case 'c' - 'a' + 1: endfile( x ); break; case 'f' - 'a' + 1: searching( x, y ); break; case 'a' - 'a' + 1: replacing( x, y ); break; case 'y' - 'a' + 1: deltoendline( *x, *y ); break; case 'l' - 'a' + 1: loadtoline( curline->text ); refreshline( 0, *y ); break; case 'b' - 'a' + 1: gobeginblk( x ); break; case 'k' - 'a' + 1: goendblk( x ); break; case 'd' - 'a' + 1: endline( x ); break; case 's' - 'a' + 1: home( x ); break; case 'x' - 'a' + 1: bottom_of_page( ); break; case 'e' - 'a' + 1: top_of_page( ); break; }}
开发者ID:MegaGod,项目名称:TW,代码行数:50,
示例10: searchingvoid searching( unsigned int *p_xCursorPos, unsigned int *y_CursorPos ) { storeline( curline ); if ( searchonlyinfo( ) == YES ) { showpageall( ); replaceflag = NO; if ( optionword( ) ) { addblank( ); } if ( optionupper( ) ) { strupr( source ); } if ( optionglobal( ) ) { topfile( p_xCursorPos ); showpageall( ); } if ( !searchfwd( p_xCursorPos, y_CursorPos ) ) { wordnotfound( ); } }}
开发者ID:kytulendu,项目名称:TW,代码行数:22,
示例11: topfilestatic FileHandle *tofileh (lua_State *L, int findex) { FileHandle *fh = topfile(L, findex); if (fh->f == NULL) luaL_error(L, "attempt to use a closed file"); return fh;}
开发者ID:lorichen,项目名称:xgame,代码行数:6,
示例12: io_gcstatic int io_gc (lua_State *L) { FILE **f = topfile(L, 1); if (*f != NULL) /* ignore closed files */ aux_close(L); return 0;}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:6,
示例13: tofilestatic ZZIP_DIR* tofile (lua_State *L, int findex) { ZZIP_DIR** f = topfile(L, findex); if (*f == NULL) luaL_error(L, "attempt to use a closed zip file"); return *f;}
开发者ID:msva,项目名称:luazip,代码行数:6,
示例14: zip_gcstatic int zip_gc (lua_State *L) { ZZIP_DIR**f = topfile(L, 1); if (*f != NULL) /* ignore closed files */ zip_close(L); return 0;}
开发者ID:msva,项目名称:luazip,代码行数:6,
示例15: io_gcstatic int io_gc (lua_State *L) { FileHandle *fh = topfile(L, 1); if (fh->f != NULL) /* ignore closed files */ aux_close(L); return 0;}
开发者ID:lorichen,项目名称:xgame,代码行数:6,
示例16: main//.........这里部分代码省略......... break; case LEKEY: case CNTRL_S: cursor_left( &xCursorPos ); break; case 0x2301: gobeginblk( &xCursorPos ); break; case 0x2401: goendblk( &xCursorPos ); break; case RIKEY: case CNTRL_D: cursor_right( &xCursorPos, yCursorPos ); break; case CNTRL_W: scroll_up( ); break; case CNTRL_Z: scroll_down( ); break; case CHOMEKEY: top_of_page( ); break; case CPGUPKEY: topfile( &xCursorPos ); break; case CENDKEY: bottom_of_page( ); break; case CPGDNKEY: endfile( &xCursorPos ); break; case DELKEY: case CNTRL_G: delete_char( xCursorPos ); refreshline( xCursorPos, yCursorPos ); changeflag = YES; break; case CNTRL_T: delete_word( xCursorPos ); refreshline( xCursorPos, yCursorPos ); changeflag = YES; break; case CNTRL_Y: delete_line( ); changeflag = YES; break; case CNTRL_M: case RETKEY: if ( insertmode == NO ) { returnkey( &xCursorPos, yCursorPos );
开发者ID:kytulendu,项目名称:TW,代码行数:67,
示例17: checkfilehstatic void checkfileh (lua_State *L, int findex) { if (topfile(L, findex)->f == NULL) luaL_error(L, "attempt to use a closed file");}
开发者ID:Supermanu,项目名称:xoreos,代码行数:4,
示例18: searchreplaceint searchreplace( unsigned int *p_xCursorPos, unsigned int *y_CursorPos ) { int ok = 0; int i; int ask = YES; int global = NO; int found = NO; if ( optionnoask( ) ) { ok = 'y'; ask = NO; } if ( optionglobal( ) ) { topfile( p_xCursorPos ); showpageall( ); global = YES; } do { if ( searchfwd( p_xCursorPos, y_CursorPos ) ) { found = YES; if ( ask ) { dispstrhgc( "á C++ toplevel函数代码示例 C++ top_level_interpreter_data函数代码示例
|