yc_function.h

来自「一个类STL的多平台可移植的算法容器库,主要用于嵌入式系统编程时的内存管理等方面」· C头文件 代码 · 共 91 行

H
91
字号
/*
 * The young Library
 * Copyright (c) 2005 by Yang Huan(杨桓)

 * Permission to use, copy, modify, distribute and sell this software for any
 * purpose is hereby granted without fee, provided that the above copyright
 * notice appear in all copies and that both that copyright notice and this
 * permission notice appear in supporting documentation.
 * The author make no representations about the suitability of this software
 * for any purpose. It is provided "as is" without express or implied warranty.
 */

/******************************************************************************/
/******************************************************************************/
#ifndef __MACRO_C_YOUNG_LIBRARY_FUNCTION_HEADER_FILE__
#define __MACRO_C_YOUNG_LIBRARY_FUNCTION_HEADER_FILE__
/******************************************************************************/
#include "yc_definition.h"

#ifdef __cplusplus
    namespace youngc {  extern "C" {
#endif
/******************************************************************************/
/******************************************************************************/

size_t hash_char( const void* x );  /* char, unsigned char */

size_t hash_short( const void* x );  /* short, unsigned short */

size_t hash_int( const void* x );  /* int, unsigned int */

size_t hash_long( const void* x );  /* long, unsigned long */

#ifdef __MACRO_C_YOUNG_LIBRARY_COMPILER_SUPPORT_LONG_LONG_TYPE__
    size_t hash_llong( const void* x );  /* long long, unsigned long long */
#endif

size_t hash_float( const void* x );

size_t hash_double( const void* x );

size_t hash_ldouble( const void* x );  /* long double */

size_t hash_str( const void* str );  /* char* */

size_t hash_wstr( const void* wstr );  /* wchar_t* */

/******************************************************************************/

int cmp_char( const void* left, const void* right );

int cmp_uchar( const void* left, const void* right );

int cmp_short( const void* left, const void* right );

int cmp_ushort( const void* left, const void* right );

int cmp_int( const void* left, const void* right );

int cmp_uint( const void* left, const void* right );

int cmp_long( const void* left, const void* right );

int cmp_ulong( const void* left, const void* right );

#ifdef __MACRO_C_YOUNG_LIBRARY_COMPILER_SUPPORT_LONG_LONG_TYPE__
    int cmp_llong( const void* left, const void* right );

    int cmp_ullong( const void* left, const void* right );
#endif

int cmp_float( const void* left, const void* right );

int cmp_double( const void* left, const void* right );

int cmp_ldouble( const void* left, const void* right );  /* long double */

int cmp_str( const void* left, const void* right );  /* char* */

int cmp_wstr( const void* left, const void* right );  /* wchar_t* */

/******************************************************************************/
/******************************************************************************/
#ifdef __cplusplus
    }  }
#endif
#endif
/******************************************************************************/
/******************************************************************************/

⌨️ 快捷键说明

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