您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ tolstream函数代码示例

51自学网 2021-06-03 08:55:07
  C++
这篇教程C++ tolstream函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中tolstream函数的典型用法代码示例。如果您正苦于以下问题:C++ tolstream函数的具体用法?C++ tolstream怎么用?C++ tolstream使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了tolstream函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: f_tostring

static int f_tostring(lua_State *L) {	LStream *p = tolstream(L);	if (isclosed(p))		lua_pushliteral(L, "file (closed)");	else		lua_pushfstring(L, "file (%p)", p->f);	return 1;}
开发者ID:Allowed,项目名称:Protheus,代码行数:8,


示例2: f_gc

static int f_gc (lua_State *L) {#if !defined(USE_FATFS)  LStream *p = tolstream(L);  if (!isclosed(p) && p->f != NULL)    aux_close(L);  /* ignore closed and incompletely open files */#endif  return 0;}
开发者ID:RonDePrez,项目名称:opentx,代码行数:8,


示例3: aux_close

static int aux_close (lua_State *L) {#if !defined(USE_FATFS)  LStream *p = tolstream(L);  lua_CFunction cf = p->closef;  p->closef = NULL;  /* mark stream as closed */  return (*cf)(L);  /* close it */#else  return 0;#endif}
开发者ID:RonDePrez,项目名称:opentx,代码行数:10,


示例4: tolstream

static FILE *tofile (lua_State *L) {  LStream *p = tolstream(L);#if defined(USE_FATFS)  return &p->f;#else  if (isclosed(p))    luaL_error(L, "attempt to use a closed file");  lua_assert(p->f);  return p->f;#endif}
开发者ID:RonDePrez,项目名称:opentx,代码行数:11,


示例5: io_pclose

/*** function to close 'popen' files*/static int io_pclose(lua_State *L) {	LStream *p = tolstream(L);	return luaL_execresult(L, lua_pclose(L, p->f));}
开发者ID:Allowed,项目名称:Protheus,代码行数:7,


示例6: io_fclose

/*** function to close regular files*/static int io_fclose(lua_State *L) {	LStream *p = tolstream(L);	int res = fclose(p->f);	return luaL_fileresult(L, (res == 0), NULL);}
开发者ID:Allowed,项目名称:Protheus,代码行数:8,


示例7: f_gc

static int f_gc(lua_State *L) {	LStream *p = tolstream(L);	if (!isclosed(p) && p->f != NULL)		aux_close(L);  /* ignore closed and incompletely open files */	return 0;}
开发者ID:Allowed,项目名称:Protheus,代码行数:6,


示例8: aux_close

static int aux_close(lua_State *L) {	LStream *p = tolstream(L);	lua_CFunction cf = p->closef;	p->closef = NULL;  /* mark stream as closed */	return (*cf)(L);  /* close it */}
开发者ID:Allowed,项目名称:Protheus,代码行数:6,


示例9: io_read

static int io_read (lua_State *L) {  LStream *p = tolstream(L);  size_t l = (size_t)lua_tointeger(L, 2);  read_chars(L, &p->f, l);  return 1;}
开发者ID:RonDePrez,项目名称:opentx,代码行数:6,



注:本文中的tolstream函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ tolua_beginmodule函数代码示例
C++ tolower函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。