rv64ascii.h
来自「基于h323协议的软phone」· C头文件 代码 · 共 155 行
H
155 行
/***********************************************************************
Filename : rv64ascii.h
Description: rv64ascii header file
************************************************************************
Copyright (c) 2001,2002 RADVISION Inc. and RADVISION Ltd.
************************************************************************
NOTICE:
This document contains information that is confidential and proprietary
to RADVISION Inc. and RADVISION Ltd.. No part of this document may be
reproduced in any form whatsoever without written prior approval by
RADVISION Inc. or RADVISION Ltd..
RADVISION Inc. and RADVISION Ltd. reserve the right to revise this
publication and make changes without obligation to notify any person of
such revisions or changes.
***********************************************************************/
/*$
{package:
{name: 64Ascii}
{superpackage: CCore}
{include: rv64ascii.h}
{description:
{p: This module provides functions for converting 64 bit numbers
to strings.}
}
}
$*/
#ifndef RV_64ASCII_H
#define RV_64ASCII_H
#include "rvccore.h"
#include "rvstdio.h"
#if !defined(RV_64TOASCII_TYPE) || ((RV_64TOASCII_TYPE != RV_64TOASCII_STANDARD) && \
(RV_64TOASCII_TYPE != RV_64TOASCII_WIN32) && (RV_64TOASCII_TYPE != RV_64TOASCII_MANUAL))
#error RV_64TOASCII_TYPE not set properly
#endif
/* Minimum buffer size required for ASCII strings of 64 bit numbers */
#define RV_64TOASCII_BUFSIZE 22
/* Minimum buffer size required for HEX strings of 64 bit numbers */
#define RV_64TOHEX_BUFSIZE 18
#if defined(__cplusplus)
extern "C" {
#endif
/* Prototypes: See documentation blocks below for details. */
RvStatus Rv64AsciiInit(void);
RvStatus Rv64AsciiEnd(void);
RvChar *Rv64UtoA(RvChar *buf, RvUint64 num64);
RVCOREAPI RvChar * RVCALLCONV Rv64toA(RvChar *buf, RvInt64 num64);
RvChar *Rv64UtoHex(RvChar *buf, RvUint64 num64);
#if defined(RV_TEST_CODE)
void Rv64AsciiTest(void);
#endif
#if defined(__cplusplus)
}
#endif
/* Function Documentation */
/*$
{function scope="protected":
{name: Rv64AsciiInit}
{superpackage: 64Ascii}
{include: rv64ascii.h}
{description:
{p: Initializes the rv64ascii module. Must be called once (and
only once) before any other functions in the module are called.}
}
{proto: RvStatus Rv64AsciiInit(void);}
{returns: RV_OK if successful otherwise an error code.}
}
$*/
/*$
{function scope="protected":
{name: Rv64AsciiEnd}
{superpackage: 64Ascii}
{include: rv64ascii.h}
{description:
{p: Shuts down the rv64ascii module. Must be called once (and
only once) when no further calls to this module will be made.}
}
{proto: RvStatus Rv64AsciiInit(void);}
{returns: RV_OK if successful otherwise an error code.}
}
$*/
/*$
{function:
{name: Rv64UtoA}
{superpackage: 64Ascii}
{include: rv64ascii.h}
{description:
{p: Converts an unsigned 64 bit integer (RvUint64) to a decimal string.}
}
{proto: RvChar *Rv64UtoA(RvChar *buf, RvUint64 num64);}
{params:
{param: {n: buf} {d: The buffer where resulting string will be placed}}
{param: {n: num64} {d: The unsigned 64 bit number to be converted.}}
}
{returns: A pointer to buf if successful otherwise NULL.}
{notes:
{note: The buffer (buf) should be at least RV_64TOASCII_BUFSIZE bytes long
or the end of the buffer may be overwritten.}
}
}
$*/
/*$
{function:
{name: Rv64toA}
{superpackage: 64Ascii}
{include: rv64ascii.h}
{description:
{p: Converts an signed 64 bit integer (RvInt64) to a decimal string.}
}
{proto: RvChar *Rv64toA(RvChar *buf, RvInt64 num64);}
{params:
{param: {n: buf} {d: The buffer where resulting string will be placed}}
{param: {n: num64} {d: The signed 64 bit number to be converted.}}
}
{returns: A pointer to buf if successful, otherwise NULL.}
{notes:
{note: The buffer (buf) should be at least RV_64TOASCII_BUFSIZE bytes long
or the end of the buffer may be overwritten.}
}
}
$*/
/*$
{function:
{name: Rv64UtoHex}
{superpackage: 64Ascii}
{include: rv64ascii.h}
{description:
{p: Converts an unsigned 64 bit integer (RvUint64) to a hexadecimal string.}
}
{proto: RvChar *Rv64UtoA(RvChar *buf, RvUint64 num64);}
{params:
{param: {n: buf} {d: The buffer where resulting string will be placed}}
{param: {n: num64} {d: The unsigned 64 bit number to be converted.}}
}
{returns: A pointer to buf if successful otherwise NULL.}
{notes:
{note: The buffer (buf) should be at least RV_64TOHEX_BUFSIZE bytes long
or the end of the buffer may be overwritten.}
}
}
$*/
#endif /* RV_64ASCII_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?