JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
common.h File Reference

汎用共通ヘッダ More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#include <direct.h>
#include <windows.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Parameter32
 
struct  Parameter64
 

Macros

#define _INCLUDE_POSIX_SOURCE
 
#define __EXTENSIONS__
 
#define _CRT_SECURE_NO_WARNINGS
 
#define _WINSOCKAPI_
 
#define Intel
 
#define scanf   scanf_s
 
#define unlink   _unlink
 
#define snprintf   _snprintf
 
#define vsnprintf   _vsnprintf
 
#define strcasecmp   _stricmp
 
#define strncasecmp   _strnicmp
 
#define mkdir(d, m)   _mkdir(d)
 
#define rmdir(d)   _rmdir(d)
 
#define mode_t   int
 
#define bzero(p, n)   ZeroMemory((p), (n))
 
#define bcopy(f, t, n)   CopyMemory((t), (f), (n))
 
#define _ttof   atof
 
#define tcscmp   _tcscmp
 Unicode用 strcmp.
 
#define tcsncmp   _tcsncmp
 Unicode用 strncmp.
 
#define tcsncpy   _tcsncpy
 Unicode用 strncpy.
 
#define tcslen   _tcslen
 Unicode用 strlen.
 
#define tunlink   _tunlink
 Unicode用 unlink.
 
#define tfopen   _tfopen
 Unicode用 fopen.
 
#define sntprintf   _sntprintf_s
 Unicode用 snprintf.
 
#define ttoi   _ttoi
 Unicode用 atoi.
 
#define ttof   _ttof
 Unicode用 atof.
 
#define tprintf   _tprintf
 Unicode用 printf.
 
#define ftprintf   _ftprintf
 Unicode用 fprintf.
 
#define WIN_DD_NULL   (void*)0xdddddddddddddddd
 
#define DllExport
 
#define DllImport
 
#define LOG_PERROR   0
 
#define MAXBUFSZ   4194304
 4M
 
#define BUFSZ2M   2087152
 2M
 
#define HHHBUFSZ   2087152
 2M
 
#define BUFSZ1M   1048576
 1M
 
#define HHBUFSZ   1048576
 1M
 
#define HBUFSZ   524288
 512K
 
#define RECVBUFSZ   262144
 256K
 
#define LLLBUFSZ   131072
 128K
 
#define LLBUFSZ   65536
 64K
 
#define LBUFSZ   32768
 32K
 
#define BUFSZ   16384
 16K
 
#define MBUFSZ   8192
 8K
 
#define SBUFSZ   4096
 4K
 
#define L_4096   4096
 
#define L_2048   2048
 
#define LFRAME   2048
 
#define L_1024   1024
 
#define LBUF   1024
 
#define L_512   512
 
#define LMESG   512
 
#define L_256   256
 
#define LPATH   256
 
#define LDATA   256
 
#define L_128   128
 
#define LNAME   128
 
#define LMDATA   128
 
#define LPASS   128
 $6$ -> 98文字
 
#define L_64   64
 
#define LMNAME   64
 
#define LSDATA   64
 
#define LGUID   40
 16*2 + 4(-) + 1('\0') = 37 以上の 4の倍数
 
#define LUUID   36
 16*2 + 1('\0') = 33 以上の 4の倍数
 
#define L_32   32
 
#define LADDR   32
 
#define LADDR6   128
 
#define LSNAME   32
 
#define L_16   16
 
#define L_ID   16
 
#define L_8   8
 
#define L_OCT   8
 
#define LEN_REAL   32
 15*2 + '\0' + 1(予備)
 
#define LEN_INT   22
 log 2^64 + '\0' + 1(予備)
 
#define LEN_IPADDR   17
 strlen("AAA.BBB.CCC.DDD") + '\0' + 1(予備)
 
#define LEN_IPADDR6   41
 strlen("1111:2222:333:4444:5555:6666:7777:8888") + '\0' + 1(予備)
 
#define LEN_PORT   7
 strlen("65536") + '\0' + 1(予備)
 
#define LEN_IPPORT   23
 strlen("AAA.BBB.CCC.DDD:65536") + '\0' + 1(予備)
 
#define STRLEN_GUID   36
 GUID の長さ
 
#define WORK_FILENAME_LEN   16
 
#define PI   3.1415926535897932385
 
#define PI15   4.7123889803846898577
 
#define PI2   6.2831853071795864769
 
#define PI_DIV2   1.5707963267948966192
 
#define PI_DIV2_3   4.7123889803846898577
 
#define PI_DIV3   1.0471975511965977462
 
#define PI_DIV3_2   2.0943951023931954923
 
#define PI_DIV4   0.78539816339744830962
 
#define PI_DIV6   0.52359877559829887308
 
#define LN_10   2.3025850929940456840
 
#define EXP_1   2.71828182845904523536
 
#define DEGREE2RAD   0.0174532925199432957692
 
#define RAD2DEGREE   57.2957795130823208768
 
#define SQROOT_05   0.707106781186547524401
 
#define SQROOT_2   1.4142135623730950488
 
#define SQROOT_3   1.7320508075688772935
 
#define SQROOT_5   2.2360679774997896964
 
#define SQROOT_7   2.6457513110645905905
 
#define SINTMAX   2147483647
 
#define SINTMIN   -2147483647
 
#define UINTMAX   4294967295
 
#define SWORDMAX   32767
 
#define SWORDMIN   -32768
 
#define UWORDMAX   65535
 
#define RAND_MAX   32767
 
#define FALSE   0
 
#define TRUE   1
 
#define ON   1
 
#define OFF   0
 
#define OK   1
 
#define NG   0
 
#define YES   1
 
#define NO   0
 
#define CRLF   "\n"
 
#define Max(x, y)   (((x)<(y)) ? (y):(x))
 
#define Min(x, y)   (((x)>(y)) ? (y):(x))
 
#define Sign(x)   (((x)>=0) ? (1):(-1))
 
#define Loop   while(1)
 
#define Xabs(x)   (((x)>=0) ? (x):(-(x)))
 
#define getBit(x, n)   ((sByte)((*(x+(n)/8)>>(7+(n)/8*8-(n)))&0x01))
 
#define setBit(x, n, i)   ((i)?(*(x+(n)/8)|=(0x80>>((n)-(n)/8*8))):(*((x)+(n)/8)&=~(0x80>>((n)-(n)/8*8))))
 
#define checkBit(dat, bit)   (((dat)&(bit))==(bit))
 
#define maskBit(dat, bit)   ((dat)&(0xff>>(8-(bit))))
 
#define UNUSED(x)   (void)((x))
 
#define Frand()   (rand()/((double)RAND_MAX+1.0))
 
#define Drand(x)   ((int)(rand()/((double)RAND_MAX+1.0)*((x)+1)))
 
#define LDrand(x)   ((long int)(rand()/((double)RAND_MAX+1.0)*((x)+1)))
 
#define JBXL_ON   1
 
#define JBXL_OFF   0
 
#define JBXL_OK   1
 
#define JBXL_NG   0
 
#define JBXL_YES   1
 
#define JBXL_NO   0
 
#define JBXL_TRUE   1
 
#define JBXL_FALSE   0
 
#define JBXL_Max(x, y)   (((x)<(y)) ? (y):(x))
 
#define JBXL_Min(x, y)   (((x)>(y)) ? (y):(x))
 
#define JBXL_Sign(x)   (((x)>=0) ? (1):(-1))
 
#define JBXL_EPS   1.0e-6
 
#define JBXL_3D_FORMAT_NONE   0
 
#define JBXL_3D_FORMAT_DAE   1
 
#define JBXL_3D_FORMAT_OBJ   2
 
#define JBXL_3D_FORMAT_FBX   3
 
#define JBXL_3D_FORMAT_GLTF   4
 
#define JBXL_3D_FORMAT_GLB   5
 
#define JBXL_3D_FORMAT_STL   8
 
#define JBXL_3D_FORMAT_STL_A   8
 ASCII.
 
#define JBXL_3D_FORMAT_STL_B   9
 Binary.
 
#define JBXL_3D_ENGINE_NONE   0
 
#define JBXL_3D_ENGINE_UNITY   1
 
#define JBXL_3D_ENGINE_UE   2
 
#define JBXL_TEXTURE_UN_KNOWN   0
 
#define JBXL_TEXTURE_MOON   3
 
#define JBXL_TEXTURE_DICOM   4
 
#define JBXL_TEXTURE_USERSET   5
 
#define JBXL_TEXTURE_CT   16
 0x0010 CT (Moon)
 
#define JBXL_TEXTURE_JPEG   32
 0x0020
 
#define JBXL_TEXTURE_JPG   32
 
#define JBXL_TEXTURE_TIFF   48
 0x0030
 
#define JBXL_TEXTURE_PNG   64
 0x0040
 
#define JBXL_TEXTURE_TGA   80
 0x0050
 
#define JBXL_TEXTURE_JP2K   96
 0x0060
 
#define JBXL_TEXTURE_RAS   112
 0x0070 SUN RASTER 8bit
 

Typedefs

typedef unsigned char uByte
 1Byte
 
typedef char sByte
 1Byte
 
typedef unsigned short uWord
 2Byte
 
typedef short sWord
 2Byte
 
typedef unsigned int uDWord
 4Byte
 
typedef int sDWord
 4Byte
 

Detailed Description

Version
5.2
Author
Fumi.Iseki (C)
Date
2020 11/22

Definition in file common.h.

Macro Definition Documentation

◆ __EXTENSIONS__

#define __EXTENSIONS__

Definition at line 18 of file common.h.

◆ _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS

Definition at line 22 of file common.h.

◆ _INCLUDE_POSIX_SOURCE

#define _INCLUDE_POSIX_SOURCE

Definition at line 17 of file common.h.

◆ _ttof

#define _ttof   atof

Definition at line 74 of file common.h.

◆ _WINSOCKAPI_

#define _WINSOCKAPI_

Definition at line 49 of file common.h.

◆ bcopy

#define bcopy ( f,
t,
n )   CopyMemory((t), (f), (n))

Definition at line 65 of file common.h.

◆ BUFSZ

#define BUFSZ   16384

Definition at line 138 of file common.h.

Referenced by gz_decode_data(), gz_decode_fp(), and restore_protocol_contents().

◆ BUFSZ1M

#define BUFSZ1M   1048576

Definition at line 131 of file common.h.

◆ BUFSZ2M

#define BUFSZ2M   2087152

Definition at line 129 of file common.h.

◆ bzero

#define bzero ( p,
n )   ZeroMemory((p), (n))

Definition at line 64 of file common.h.

◆ checkBit

#define checkBit ( dat,
bit )   (((dat)&(bit))==(bit))

◆ CRLF

#define CRLF   "\n"

Definition at line 239 of file common.h.

Referenced by json_inverse_parse(), xml_close_node_Buffer(), and xml_open_node_Buffer().

◆ DEGREE2RAD

#define DEGREE2RAD   0.0174532925199432957692

Definition at line 194 of file common.h.

◆ DllExport

#define DllExport

Definition at line 105 of file common.h.

◆ DllImport

#define DllImport

Definition at line 106 of file common.h.

◆ Drand

#define Drand ( x)    ((int)(rand()/((double)RAND_MAX+1.0)*((x)+1)))

Definition at line 269 of file common.h.

◆ EXP_1

#define EXP_1   2.71828182845904523536

Definition at line 192 of file common.h.

◆ FALSE

#define FALSE   0

Definition at line 223 of file common.h.

Referenced by _search_key_json_obj(), _tcp_server_bind(), _tcp_server_bind_setopt(), _tcp_server_socket(), _tcp_server_socket_setopt(), _udp_server_socket(), _udp_server_socket_setopt(), add_xml_content_area(), GLTFData::addMaterials(), ColladaXML::addWeightSource(), bvh_parse_hierarchy(), check_match_tTree(), check_match_xml(), check_passwd(), GLTFData::convertJson_gltf2glb(), GLTFData::convertJson_TexturePath(), CVTextDocument::CVTextDocument(), decomp_hostport(), decomp_url(), dump_http_header(), ex_strncasecmp(), ex_strncaservscmp(), ex_strncmp(), ex_strnrvscmp(), extract_tTar(), file_exist(), find_match_tTree(), find_match_xml(), get_protocol_header_list_seq(), get_xml_content_bystr(), get_xml_node(), get_xml_node_bystr(), GLTFData::getGLBTextureInfo(), CBVHTool::getPosData(), CBVHTool::getQuaternion(), http_proxy_header_analyze(), CRingBuffer::init(), CRingBuffer::init_data(), GLTFData::initGLTF(), is_big_endian(), is_gz_data(), is_header_continue(), is_host_in_list(), is_http_header_field(), is_ipaddr_num_in_list(), is_little_endian(), is_same_network(), is_same_network_num(), is_same_sockaddr(), isnot_xml_name(), isNull(), isText_Buffer(), llsd_xml_contain_key(), print_errfile(), print_logfile(), CBVHTool::printBVH(), read_Buffer2_format_fp(), CBVHTool::readBVH(), CBVHTool::readFile(), jbxl::readTGAData(), rebuild_http_Buffer(), recv_http_Buffer(), recv_http_chunked(), recv_http_content(), recv_http_file(), recv_http_header(), replace_item_tList_node(), replace_sBuffer_file(), replace_tTree_node(), replace_value_tList_node(), replace_xml_content(), replace_xml_content_bystr(), return_exist_node(), save_Buffer2_format_fp(), save_Buffer_file(), save_Buffer_format_fp(), save_Buffer_tList_file(), save_Buffer_tList_fp(), save_tagged_Buffer(), search_key_json_obj(), seek_ringBuffer(), set_item_tList_node(), set_value_tList_node(), set_xml_attr(), set_xml_attr_bystr(), set_xml_content(), set_xml_content_bystr(), set_xml_end_node(), set_xml_end_node_bystr(), set_xml_node(), set_xml_node_bystr(), tcp_recv_Buffer_tosize(), tcp_recv_Buffer_tosize_wait(), CVTextDocument::unlock(), CBVHTool::writeFile(), CBVHTool::writeMultiFile(), xml_parse_seq(), and xml_parse_start_node().

◆ Frand

#define Frand ( )    (rand()/((double)RAND_MAX+1.0))

Definition at line 268 of file common.h.

◆ ftprintf

#define ftprintf   _ftprintf

Definition at line 88 of file common.h.

◆ getBit

#define getBit ( x,
n )   ((sByte)((*(x+(n)/8)>>(7+(n)/8*8-(n)))&0x01))

Definition at line 258 of file common.h.

Referenced by encode_base64(), and to_bin64().

◆ HBUFSZ

#define HBUFSZ   524288

Definition at line 133 of file common.h.

◆ HHBUFSZ

#define HHBUFSZ   1048576

Definition at line 132 of file common.h.

◆ HHHBUFSZ

#define HHHBUFSZ   2087152

Definition at line 130 of file common.h.

◆ Intel

#define Intel

Definition at line 53 of file common.h.

◆ JBXL_3D_ENGINE_NONE

#define JBXL_3D_ENGINE_NONE   0

Definition at line 309 of file common.h.

◆ JBXL_3D_ENGINE_UE

◆ JBXL_3D_ENGINE_UNITY

#define JBXL_3D_ENGINE_UNITY   1

◆ JBXL_3D_FORMAT_DAE

#define JBXL_3D_FORMAT_DAE   1

Definition at line 300 of file common.h.

◆ JBXL_3D_FORMAT_FBX

#define JBXL_3D_FORMAT_FBX   3

Definition at line 302 of file common.h.

◆ JBXL_3D_FORMAT_GLB

#define JBXL_3D_FORMAT_GLB   5

Definition at line 304 of file common.h.

◆ JBXL_3D_FORMAT_GLTF

#define JBXL_3D_FORMAT_GLTF   4

Definition at line 303 of file common.h.

◆ JBXL_3D_FORMAT_NONE

#define JBXL_3D_FORMAT_NONE   0

Definition at line 299 of file common.h.

◆ JBXL_3D_FORMAT_OBJ

#define JBXL_3D_FORMAT_OBJ   2

Definition at line 301 of file common.h.

◆ JBXL_3D_FORMAT_STL

#define JBXL_3D_FORMAT_STL   8

Definition at line 305 of file common.h.

◆ JBXL_3D_FORMAT_STL_A

#define JBXL_3D_FORMAT_STL_A   8

Definition at line 306 of file common.h.

◆ JBXL_3D_FORMAT_STL_B

#define JBXL_3D_FORMAT_STL_B   9

Definition at line 307 of file common.h.

◆ JBXL_EPS

#define JBXL_EPS   1.0e-6

Definition at line 295 of file common.h.

Referenced by AffineTrans< T >::isNormal().

◆ JBXL_FALSE

#define JBXL_FALSE   0

Definition at line 289 of file common.h.

◆ JBXL_Max

#define JBXL_Max ( x,
y )   (((x)<(y)) ? (y):(x))

Definition at line 291 of file common.h.

◆ JBXL_Min

#define JBXL_Min ( x,
y )   (((x)>(y)) ? (y):(x))

Definition at line 292 of file common.h.

◆ JBXL_NG

#define JBXL_NG   0

Definition at line 285 of file common.h.

◆ JBXL_NO

#define JBXL_NO   0

Definition at line 287 of file common.h.

◆ JBXL_OFF

#define JBXL_OFF   0

Definition at line 283 of file common.h.

◆ JBXL_OK

#define JBXL_OK   1

Definition at line 284 of file common.h.

◆ JBXL_ON

#define JBXL_ON   1

Definition at line 282 of file common.h.

◆ JBXL_Sign

#define JBXL_Sign ( x)    (((x)>=0) ? (1):(-1))

Definition at line 293 of file common.h.

◆ JBXL_TEXTURE_CT

#define JBXL_TEXTURE_CT   16

Definition at line 320 of file common.h.

◆ JBXL_TEXTURE_DICOM

#define JBXL_TEXTURE_DICOM   4

Definition at line 317 of file common.h.

◆ JBXL_TEXTURE_JP2K

#define JBXL_TEXTURE_JP2K   96

Definition at line 326 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_JPEG

#define JBXL_TEXTURE_JPEG   32

Definition at line 321 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_JPG

#define JBXL_TEXTURE_JPG   32

Definition at line 322 of file common.h.

◆ JBXL_TEXTURE_MOON

#define JBXL_TEXTURE_MOON   3

Definition at line 316 of file common.h.

◆ JBXL_TEXTURE_PNG

#define JBXL_TEXTURE_PNG   64

Definition at line 324 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_RAS

#define JBXL_TEXTURE_RAS   112

Definition at line 327 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_TGA

#define JBXL_TEXTURE_TGA   80

Definition at line 325 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_TIFF

#define JBXL_TEXTURE_TIFF   48

Definition at line 323 of file common.h.

Referenced by get_graphic_extension().

◆ JBXL_TEXTURE_UN_KNOWN

#define JBXL_TEXTURE_UN_KNOWN   0

Definition at line 315 of file common.h.

◆ JBXL_TEXTURE_USERSET

#define JBXL_TEXTURE_USERSET   5

Definition at line 318 of file common.h.

◆ JBXL_TRUE

#define JBXL_TRUE   1

Definition at line 288 of file common.h.

◆ JBXL_YES

#define JBXL_YES   1

Definition at line 286 of file common.h.

◆ L_1024

#define L_1024   1024

Definition at line 145 of file common.h.

◆ L_128

#define L_128   128

Definition at line 152 of file common.h.

◆ L_16

#define L_16   16

Definition at line 165 of file common.h.

◆ L_2048

#define L_2048   2048

Definition at line 143 of file common.h.

◆ L_256

#define L_256   256

Definition at line 149 of file common.h.

◆ L_32

#define L_32   32

Definition at line 161 of file common.h.

Referenced by get_chunked_size().

◆ L_4096

#define L_4096   4096

Definition at line 142 of file common.h.

◆ L_512

#define L_512   512

Definition at line 147 of file common.h.

◆ L_64

#define L_64   64

Definition at line 156 of file common.h.

◆ L_8

#define L_8   8

Definition at line 167 of file common.h.

◆ L_ID

#define L_ID   16

Definition at line 166 of file common.h.

◆ L_OCT

#define L_OCT   8

Definition at line 168 of file common.h.

Referenced by get_graphic_extension().

◆ LADDR

#define LADDR   32

Definition at line 162 of file common.h.

Referenced by make_Buffer_bychar().

◆ LADDR6

#define LADDR6   128

Definition at line 163 of file common.h.

◆ LBUF

◆ LBUFSZ

#define LBUFSZ   32768

Definition at line 137 of file common.h.

◆ LDATA

◆ LDrand

#define LDrand ( x)    ((long int)(rand()/((double)RAND_MAX+1.0)*((x)+1)))

Definition at line 270 of file common.h.

◆ LEN_INT

◆ LEN_IPADDR

#define LEN_IPADDR   17

◆ LEN_IPADDR6

#define LEN_IPADDR6   41

◆ LEN_IPPORT

#define LEN_IPPORT   23

Definition at line 175 of file common.h.

◆ LEN_PORT

#define LEN_PORT   7

Definition at line 174 of file common.h.

◆ LEN_REAL

#define LEN_REAL   32

◆ LFRAME

#define LFRAME   2048

Definition at line 144 of file common.h.

◆ LGUID

#define LGUID   40

Definition at line 159 of file common.h.

Referenced by uuid2guid().

◆ LLBUFSZ

#define LLBUFSZ   65536

Definition at line 136 of file common.h.

◆ LLLBUFSZ

#define LLLBUFSZ   131072

Definition at line 135 of file common.h.

◆ LMDATA

#define LMDATA   128

Definition at line 154 of file common.h.

Referenced by xml_inverse_parse().

◆ LMESG

#define LMESG   512

Definition at line 148 of file common.h.

◆ LMNAME

#define LMNAME   64

Definition at line 157 of file common.h.

◆ LN_10

#define LN_10   2.3025850929940456840

Definition at line 191 of file common.h.

◆ LNAME

◆ LOG_PERROR

#define LOG_PERROR   0

Definition at line 114 of file common.h.

◆ Loop

#define Loop   while(1)

Definition at line 256 of file common.h.

Referenced by recv_http_header().

◆ LPASS

#define LPASS   128

Definition at line 155 of file common.h.

Referenced by get_passwd().

◆ LPATH

#define LPATH   256

Definition at line 150 of file common.h.

◆ LSDATA

#define LSDATA   64

Definition at line 158 of file common.h.

Referenced by json_inverse_parse(), json_inverse_parse_opt(), and llsd_bin_get_length().

◆ LSNAME

#define LSNAME   32

Definition at line 164 of file common.h.

◆ LUUID

#define LUUID   36

Definition at line 160 of file common.h.

◆ maskBit

#define maskBit ( dat,
bit )   ((dat)&(0xff>>(8-(bit))))

Definition at line 261 of file common.h.

◆ Max

◆ MAXBUFSZ

#define MAXBUFSZ   4194304

Definition at line 128 of file common.h.

◆ MBUFSZ

#define MBUFSZ   8192

Definition at line 139 of file common.h.

◆ Min

◆ mkdir

#define mkdir ( d,
m )   _mkdir(d)

Definition at line 61 of file common.h.

Referenced by mkdirp().

◆ mode_t

#define mode_t   int

Definition at line 63 of file common.h.

◆ NG

#define NG   0

Definition at line 233 of file common.h.

◆ NO

#define NO   0

Definition at line 235 of file common.h.

◆ OFF

◆ OK

#define OK   1

Definition at line 232 of file common.h.

◆ ON

◆ PI

◆ PI15

#define PI15   4.7123889803846898577

Definition at line 183 of file common.h.

◆ PI2

#define PI2   6.2831853071795864769

◆ PI_DIV2

◆ PI_DIV2_3

#define PI_DIV2_3   4.7123889803846898577

Definition at line 186 of file common.h.

◆ PI_DIV3

#define PI_DIV3   1.0471975511965977462

Definition at line 187 of file common.h.

◆ PI_DIV3_2

#define PI_DIV3_2   2.0943951023931954923

Definition at line 188 of file common.h.

◆ PI_DIV4

#define PI_DIV4   0.78539816339744830962

Definition at line 189 of file common.h.

◆ PI_DIV6

#define PI_DIV6   0.52359877559829887308

Definition at line 190 of file common.h.

◆ RAD2DEGREE

#define RAD2DEGREE   57.2957795130823208768

Definition at line 195 of file common.h.

◆ RAND_MAX

#define RAND_MAX   32767

Definition at line 213 of file common.h.

◆ RECVBUFSZ

◆ rmdir

#define rmdir ( d)    _rmdir(d)

Definition at line 62 of file common.h.

Referenced by rm_dir_rcsv().

◆ SBUFSZ

#define SBUFSZ   4096

Definition at line 140 of file common.h.

◆ scanf

#define scanf   scanf_s

Definition at line 54 of file common.h.

◆ setBit

#define setBit ( x,
n,
i )   ((i)?(*(x+(n)/8)|=(0x80>>((n)-(n)/8*8))):(*((x)+(n)/8)&=~(0x80>>((n)-(n)/8*8))))

Definition at line 259 of file common.h.

Referenced by decode_base64(), encode_base64(), from_bin64(), randbit(), and randbit_Buffer().

◆ Sign

#define Sign ( x)    (((x)>=0) ? (1):(-1))

Definition at line 253 of file common.h.

Referenced by jbxl::readGraphicSlices(), and jbxl::ToPola().

◆ SINTMAX

#define SINTMAX   2147483647

Definition at line 204 of file common.h.

Referenced by jbxl::centerLine().

◆ SINTMIN

#define SINTMIN   -2147483647

Definition at line 205 of file common.h.

◆ snprintf

◆ sntprintf

#define sntprintf   _sntprintf_s

Definition at line 84 of file common.h.

◆ SQROOT_05

#define SQROOT_05   0.707106781186547524401

Definition at line 197 of file common.h.

◆ SQROOT_2

#define SQROOT_2   1.4142135623730950488

Definition at line 198 of file common.h.

◆ SQROOT_3

#define SQROOT_3   1.7320508075688772935

Definition at line 199 of file common.h.

◆ SQROOT_5

#define SQROOT_5   2.2360679774997896964

Definition at line 200 of file common.h.

◆ SQROOT_7

#define SQROOT_7   2.6457513110645905905

Definition at line 201 of file common.h.

◆ strcasecmp

◆ STRLEN_GUID

#define STRLEN_GUID   36

Definition at line 177 of file common.h.

◆ strncasecmp

◆ SWORDMAX

#define SWORDMAX   32767

Definition at line 207 of file common.h.

◆ SWORDMIN

#define SWORDMIN   -32768

Definition at line 208 of file common.h.

◆ tcscmp

#define tcscmp   _tcscmp

Definition at line 78 of file common.h.

◆ tcslen

#define tcslen   _tcslen

Definition at line 81 of file common.h.

◆ tcsncmp

#define tcsncmp   _tcsncmp

Definition at line 79 of file common.h.

◆ tcsncpy

#define tcsncpy   _tcsncpy

Definition at line 80 of file common.h.

◆ tfopen

#define tfopen   _tfopen

Definition at line 83 of file common.h.

◆ tprintf

#define tprintf   _tprintf

Definition at line 87 of file common.h.

◆ TRUE

#define TRUE   1

Definition at line 226 of file common.h.

Referenced by _tcp_server_bind(), _tcp_server_bind_setopt(), _tcp_server_socket(), _tcp_server_socket_setopt(), _udp_server_socket(), _udp_server_socket_setopt(), add_xml_content_area(), ColladaXML::addController(), ColladaXML::addImage(), GLTFData::addMaterials(), GLTFData::addTextures(), ColladaXML::addWeightSource(), bvh_parse_hierarchy(), check_match_tTree(), check_match_xml(), check_passwd(), decomp_hostport(), decomp_url(), dump_http_header(), ex_strncasecmp(), ex_strncaservscmp(), ex_strncmp(), ex_strnrvscmp(), extract_tTar(), file_exist(), find_match_tTree(), find_match_xml(), get_double_key_json_val(), get_key_json_val(), get_key_sister_json_val(), get_protocol_header_list_seq(), get_tiff_ifd(), CBVHTool::getPosData(), CBVHTool::getQuaternion(), http_proxy_header_analyze(), MeshObjectData::init(), CRingBuffer::init(), is_big_endian(), is_gz_data(), is_header_continue(), is_host_in_list(), is_http_header_field(), is_ipaddr_num_in_list(), is_little_endian(), is_same_network_num(), is_same_sockaddr(), isnot_xml_name(), isNull(), llsd_xml_contain_key(), CVTextDocument::lock(), FBXData::outputFile(), GLTFData::outputFile(), OBJData::outputFile(), BrepSolidList::outputFile(), ColladaXML::outputFile(), print_errfile(), print_logfile(), CBVHTool::printBVH(), read_Buffer2_format_fp(), CBVHTool::readBVH(), jbxl::readTGAData(), rebuild_http_Buffer(), recv_http_Buffer(), recv_http_chunked(), recv_http_content(), recv_http_file(), recv_http_header(), replace_item_tList_node(), replace_value_tList_node(), replace_xml_content(), return_exist_node(), save_Buffer2_format_fp(), save_Buffer_file(), save_Buffer_format_fp(), save_Buffer_tList_fp(), save_tagged_Buffer(), seek_ringBuffer(), set_item_tList_node(), set_value_tList_node(), set_xml_attr(), set_xml_content(), set_xml_node(), MeshObjectData::setAltName(), MeshFacetNode::setMaterialID(), MeshObjectData::setName(), OBJFacetMtlNode::setup_params(), simple_web_proxy(), tcp_recv_Buffer_tosize(), tcp_recv_Buffer_tosize_wait(), CBVHTool::writeFile(), CBVHTool::writeMultiFile(), xml_parse(), xml_parse_seq(), and xml_parse_start_node().

◆ ttof

#define ttof   _ttof

Definition at line 86 of file common.h.

◆ ttoi

#define ttoi   _ttoi

Definition at line 85 of file common.h.

◆ tunlink

#define tunlink   _tunlink

Definition at line 82 of file common.h.

◆ UINTMAX

#define UINTMAX   4294967295

Definition at line 206 of file common.h.

◆ unlink

#define unlink   _unlink

Definition at line 55 of file common.h.

Referenced by gz_decode_file_replace(), and rm_dir_rcsv().

◆ UNUSED

◆ UWORDMAX

#define UWORDMAX   65535

Definition at line 209 of file common.h.

◆ vsnprintf

#define vsnprintf   _vsnprintf

Definition at line 57 of file common.h.

Referenced by CLogRingBuffer::putRingFormat(), and CLogRingBuffer::putRingFormat().

◆ WIN_DD_NULL

#define WIN_DD_NULL   (void*)0xdddddddddddddddd

◆ WORK_FILENAME_LEN

#define WORK_FILENAME_LEN   16

Definition at line 179 of file common.h.

Referenced by save_http_xml().

◆ Xabs

◆ YES

#define YES   1

Definition at line 234 of file common.h.

Typedef Documentation

◆ sByte

typedef char sByte

Definition at line 333 of file common.h.

◆ sDWord

typedef int sDWord

Definition at line 337 of file common.h.

◆ sWord

typedef short sWord

Definition at line 335 of file common.h.

◆ uByte

typedef unsigned char uByte

Definition at line 332 of file common.h.

◆ uDWord

typedef unsigned int uDWord

Definition at line 336 of file common.h.

◆ uWord

typedef unsigned short uWord

Definition at line 334 of file common.h.