atosfix16.c

来自「cygwin, 著名的在win32下模拟unix操作系统的东东」· C语言 代码 · 共 103 行

C
103
字号
/*FUNCTION   <<atosfix16>>, <<atosfix32>>, <<atosfix64>>---string to signed fixed-pointINDEX	atosfix16INDEX	atosfix32INDEX	atosfix64INDEX	_atosfix16_rINDEX	_atosfix32_rINDEX	_atosfix64_rANSI_SYNOPSIS	#include <stdlib.h>        __int16_t atosfix16(const char *<[s]>);	__int32_t atosfix32(const char *<[s]>);	__int64_t atosfix32(const char *<[s]>);        __int16_t _atosfix16_r(struct __reent *, const char *<[s]>);	__int32_t _atosfix32_r(struct __reent *, const char *<[s]>);	__int64_t _atosfix32_r(struct __reent *, const char *<[s]>);TRAD_SYNOPSIS	#include <stdlib.h>	__int16_t atosfix16(<[s]>)	const char *<[s]>;		__int32_t atosfix32(<[s]>)	const char *<[s]>;	__int64_t atosfix64(<[s]>)	const char *<[s]>;	__int16_t _atosfix16_r(<reent>, <[s]>)	struct _reent *<[reent]>;	const char *<[s]>;		__int32_t _atosfix32_r(<reent>, <[s]>)	struct _reent *<[reent]>;	const char *<[s]>;		__int64_t _atosfix64_r(<reent>, <[s]>)	struct _reent *<[reent]>;	const char *<[s]>;	DESCRIPTION	<<atosfix16>> converts the initial portion of a string to a sign	+ 15-bit fraction fixed point value.	<<atosfix32>> converts the initial portion of a string to a sign	+ 31-bit fraction fixed point value.	<<atosfix64>> converts the initial portion of a string to a sign	+ 63-bit fraction fixed point value.	<<atosfix16(s)>> is implemented as <<strtosfix16(s, NULL).>>	<<atosfix32(s)>> is implemented as <<strtosfix32(s, NULL).>>	<<atosfix64(s)>> is implemented as <<strtosfix64(s, NULL).>>	The alternate functions <<_atosfix16_r>>, <<_atosfix32_r>>,	and <<_atosfix64_r>> are reentrant versions.	The extra argument <[reent]> is a pointer to a reentrancy structure.RETURNS	The functions return the converted value, if any. If no conversion was	made, <<0>> is returned.  If saturation occurs, <<ERANGE>> is stored	in errno.PORTABILITY	<<atosfix16>>, <<atosfix32>>, and <<atosfix64>> are non-standard.	No supporting OS subroutines are directly required.  The	OS subroutines required by <<strtod>> are used.*//* * Jeff Johnston - 02/13/2002 */#include <stdlib.h>#include <_ansi.h>__int16_t_DEFUN (_atosfix16_r, (reent, s),	struct _reent *reent _AND	_CONST char *s){  return _strtosfix16_r (reent, s, NULL);}#ifndef _REENT_ONLY__int16_t_DEFUN (atosfix16, (s),	_CONST char *s){  return strtosfix16 (s, NULL);}#endif /* !_REENT_ONLY */

⌨️ 快捷键说明

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