ftell.c

来自「su 的源代码库」· C语言 代码 · 共 56 行

C
56
字号
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       */#include	"sfstdio.h"/*	Tell current IO position pointer**	Written by Kiem-Phong Vo*/#ifndef lcloff_t#define lcloff_t	long#endif#if __STD_Clcloff_t ftell(reg FILE* f)#elselcloff_t ftell(f)reg FILE*	f;#endif{	reg Sfio_t*	sf;	if(!(sf = _sfstream(f)))		return (lcloff_t)(-1);	return (lcloff_t)sfseek(sf, (Sfoff_t)0, SEEK_CUR|SF_SHARE);}#if _lib_ftello && !_done_ftello && !defined(ftell)#define _done_ftello	1#undef lcloff_t#define lcloff_t	stdoff_t#define ftell		ftello#include		"ftell.c"#undef ftell#endif#if _lib___ftello64 && !_done___ftello64 && !defined(ftell)#define _done___ftello64	1#undef lcloff_t#define lcloff_t	stdoff_t#define ftell			__ftello64#include			"ftell.c"#undef ftell#endif#if _lib___ftello64 && !_done_ftello64 && !defined(ftell)#define _done_ftello64	1#undef lcloff_t#define lcloff_t	stdoff_t#define ftell		ftello64#include		"ftell.c"#undef ftell#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?