00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <errno.h>
00027 #include <stdlib.h>
00028 #include <limits.h>
00029
00030 #ifdef _MSC_VER
00031 # define strtoll _strtoi64
00032 # define strtoull _strtoui64
00033 #endif
00034
00035
00036
00037
00038 #undef STRING_TO_TYPE
00039 #undef STRING_TO_NAME
00040 #undef STRING_TO_METHOD
00041 #undef STRING_TO_MAX
00042 #undef STRING_TO_MIN
00043 #define STRING_TO_TYPE unsigned char
00044 #define STRING_TO_NAME StringToUnsignedChar
00045 #define STRING_TO_METHOD strtoul
00046 #define STRING_TO_MAX 255
00047 #include "string2_template.h"
00048
00049
00050
00051
00052 #undef STRING_TO_TYPE
00053 #undef STRING_TO_NAME
00054 #undef STRING_TO_METHOD
00055 #undef STRING_TO_MAX
00056 #undef STRING_TO_MIN
00057 #define STRING_TO_TYPE long int
00058 #define STRING_TO_NAME StringToLong
00059 #define STRING_TO_METHOD strtol
00060 #define STRING_TO_MIN LONG_MIN
00061 #define STRING_TO_MAX LONG_MAX
00062 #include "string2_template.h"
00063
00064
00065
00066
00067 #undef STRING_TO_TYPE
00068 #undef STRING_TO_NAME
00069 #undef STRING_TO_METHOD
00070 #undef STRING_TO_MAX
00071 #undef STRING_TO_MIN
00072 #define STRING_TO_TYPE unsigned long int
00073 #define STRING_TO_NAME StringToUnsignedLong
00074 #define STRING_TO_METHOD strtoul
00075 #define STRING_TO_MAX ULONG_MAX
00076 #include "string2_template.h"
00077
00078
00079
00080
00081 #undef STRING_TO_TYPE
00082 #undef STRING_TO_NAME
00083 #undef STRING_TO_METHOD
00084 #undef STRING_TO_MAX
00085 #undef STRING_TO_MIN
00086 #define STRING_TO_TYPE long long
00087 #define STRING_TO_NAME StringToLongLong
00088 #define STRING_TO_METHOD strtoll
00089 #define STRING_TO_MIN LLONG_MIN
00090 #define STRING_TO_MAX LLONG_MAX
00091 #include "string2_template.h"
00092
00093
00094
00095
00096 #undef STRING_TO_TYPE
00097 #undef STRING_TO_NAME
00098 #undef STRING_TO_METHOD
00099 #undef STRING_TO_MAX
00100 #undef STRING_TO_MIN
00101 #define STRING_TO_TYPE unsigned long long
00102 #define STRING_TO_NAME StringToUnsignedLongLong
00103 #define STRING_TO_METHOD strtoull
00104 #define STRING_TO_MAX ULLONG_MAX
00105 #include "string2_template.h"
00106