Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3b6c3dd2
Commit
3b6c3dd2
authored
Apr 07, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
escaping all molty-statement macro
parent
1a0b6a7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
78 deletions
+79
-78
include/my_global.h
include/my_global.h
+79
-78
No files found.
include/my_global.h
View file @
3b6c3dd2
...
...
@@ -938,15 +938,15 @@ typedef char bool; /* Ordinary boolean values 0 1 */
#define uint8korr(A) (*((ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A)))
#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
#define int3store(T,A)
{ *(T)= (uchar) ((A));\
#define int3store(T,A)
do
{ *(T)= (uchar) ((A));\
*(T+1)=(uchar) (((uint) (A) >> 8));\
*(T+2)=(uchar) (((A) >> 16)); }
*(T+2)=(uchar) (((A) >> 16)); } while (0)
#define int4store(T,A) *((long *) (T))= (long) (A)
#define int5store(T,A)
{ *(T)= (uchar)((A));\
#define int5store(T,A)
do
{ *(T)= (uchar)((A));\
*((T)+1)=(uchar) (((A) >> 8));\
*((T)+2)=(uchar) (((A) >> 16));\
*((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); }
*((T)+4)=(uchar) (((A) >> 32)); } while(0)
#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
typedef
union
{
...
...
@@ -954,13 +954,14 @@ typedef union {
long
m
[
2
];
}
doubleget_union
;
#define doubleget(V,M) \
{ doubleget_union _tmp; \
do
{ doubleget_union _tmp; \
_tmp.m[0] = *((long*)(M)); \
_tmp.m[1] = *(((long*) (M))+1); \
(V) = _tmp.v; }
#define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
*(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; }
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
(V) = _tmp.v; } while(0)
#define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
*(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; \
} while (0)
#define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0)
#define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
#define float8store(V,M) doublestore((V),(M))
...
...
@@ -1005,49 +1006,49 @@ typedef union {
(((uint32) ((uchar) (A)[6])) << 16) +\
(((uint32) ((uchar) (A)[7])) << 24))) <<\
32))
#define int2store(T,A)
{ uint def_temp= (uint) (A) ;\
#define int2store(T,A)
do
{ uint def_temp= (uint) (A) ;\
*((uchar*) (T))= (uchar)(def_temp); \
*((uchar*) (T+1))=(uchar)((def_temp >> 8)); }
#define int3store(T,A) {
/*lint -save -e734 */
\
*((uchar*) (T+1))=(uchar)((def_temp >> 8)); \
} while(0)
#define int3store(T,A) do {
/*lint -save -e734 */
\
*((uchar*)(T))=(uchar) ((A));\
*((uchar*) (T)+1)=(uchar) (((A) >> 8));\
*((uchar*)(T)+2)=(uchar) (((A) >> 16)); \
/*lint -restore */
}
#define int4store(T,A)
{ *(T)=(char) ((A));\
/*lint -restore */
} while(0)
#define int4store(T,A)
do
{ *(T)=(char) ((A));\
*((T)+1)=(char) (((A) >> 8));\
*((T)+2)=(char) (((A) >> 16));\
*((T)+3)=(char) (((A) >> 24)); }
#define int5store(T,A)
{ *(T)=((A));\
*((T)+3)=(char) (((A) >> 24)); } while(0)
#define int5store(T,A)
do
{ *(T)=((A));\
*((T)+1)=(((A) >> 8));\
*((T)+2)=(((A) >> 16));\
*((T)+3)=(((A) >> 24)); \
*((T)+4)=(((A) >> 32)); }
#define int8store(T,A)
{ uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
*((T)+4)=(((A) >> 32)); } while(0)
#define int8store(T,A)
do
{ uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
int4store((T),def_temp); \
int4store((T+4),def_temp2); \
}
int4store((T+4),def_temp2); } while(0)
#ifdef WORDS_BIGENDIAN
#define float4store(T,A)
{ *(T)= ((byte *) &A)[3];\
#define float4store(T,A)
do
{ *(T)= ((byte *) &A)[3];\
*((T)+1)=(char) ((byte *) &A)[2];\
*((T)+2)=(char) ((byte *) &A)[1];\
*((T)+3)=(char) ((byte *) &A)[0]; }
*((T)+3)=(char) ((byte *) &A)[0]; }
while(0)
#define float4get(V,M)
{ float def_temp;\
#define float4get(V,M)
do
{ float def_temp;\
((byte*) &def_temp)[0]=(M)[3];\
((byte*) &def_temp)[1]=(M)[2];\
((byte*) &def_temp)[2]=(M)[1];\
((byte*) &def_temp)[3]=(M)[0];\
(V)=def_temp; }
#define float8store(T,V)
{ *(T)= ((byte *) &V)[7];\
(V)=def_temp; }
while(0)
#define float8store(T,V)
do
{ *(T)= ((byte *) &V)[7];\
*((T)+1)=(char) ((byte *) &V)[6];\
*((T)+2)=(char) ((byte *) &V)[5];\
*((T)+3)=(char) ((byte *) &V)[4];\
*((T)+4)=(char) ((byte *) &V)[3];\
*((T)+5)=(char) ((byte *) &V)[2];\
*((T)+6)=(char) ((byte *) &V)[1];\
*((T)+7)=(char) ((byte *) &V)[0]; }
*((T)+7)=(char) ((byte *) &V)[0]; }
while(0)
#define float8get(V,M)
{ double def_temp;\
#define float8get(V,M)
do
{ double def_temp;\
((byte*) &def_temp)[0]=(M)[7];\
((byte*) &def_temp)[1]=(M)[6];\
((byte*) &def_temp)[2]=(M)[5];\
...
...
@@ -1056,21 +1057,21 @@ typedef union {
((byte*) &def_temp)[5]=(M)[2];\
((byte*) &def_temp)[6]=(M)[1];\
((byte*) &def_temp)[7]=(M)[0];\
(V) = def_temp; }
(V) = def_temp; } while(0)
#else
#define float4get(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define doublestore(T,V)
{ *(T)= ((byte *) &V)[4];\
#define doublestore(T,V)
do
{ *(T)= ((byte *) &V)[4];\
*((T)+1)=(char) ((byte *) &V)[5];\
*((T)+2)=(char) ((byte *) &V)[6];\
*((T)+3)=(char) ((byte *) &V)[7];\
*((T)+4)=(char) ((byte *) &V)[0];\
*((T)+5)=(char) ((byte *) &V)[1];\
*((T)+6)=(char) ((byte *) &V)[2];\
*((T)+7)=(char) ((byte *) &V)[3]; }
#define doubleget(V,M) { double def_temp;\
*((T)+7)=(char) ((byte *) &V)[3]; }
while(0)
#define doubleget(V,M)
do
{ double def_temp;\
((byte*) &def_temp)[0]=(M)[4];\
((byte*) &def_temp)[1]=(M)[5];\
((byte*) &def_temp)[2]=(M)[6];\
...
...
@@ -1079,7 +1080,7 @@ typedef union {
((byte*) &def_temp)[5]=(M)[1];\
((byte*) &def_temp)[6]=(M)[2];\
((byte*) &def_temp)[7]=(M)[3];\
(V) = def_temp; }
(V) = def_temp; } while(0)
#endif
/* __FLOAT_WORD_ORDER */
#define float8get(V,M) doubleget((V),(M))
...
...
@@ -1096,29 +1097,29 @@ typedef union {
#ifdef WORDS_BIGENDIAN
#define ushortget(V,M)
{ V = (uint16) (((uint16) ((uchar) (M)[1]))+\
((uint16) ((uint16) (M)[0]) << 8)); }
#define shortget(V,M)
{ V = (short) (((short) ((uchar) (M)[1]))+\
((short) ((short) (M)[0]) << 8)); }
#define longget(V,M)
{ int32 def_temp;\
#define ushortget(V,M)
do
{ V = (uint16) (((uint16) ((uchar) (M)[1]))+\
((uint16) ((uint16) (M)[0]) << 8)); } while(0)
#define shortget(V,M)
do
{ V = (short) (((short) ((uchar) (M)[1]))+\
((short) ((short) (M)[0]) << 8)); } while(0)
#define longget(V,M)
do
{ int32 def_temp;\
((byte*) &def_temp)[0]=(M)[0];\
((byte*) &def_temp)[1]=(M)[1];\
((byte*) &def_temp)[2]=(M)[2];\
((byte*) &def_temp)[3]=(M)[3];\
(V)=def_temp; }
#define ulongget(V,M)
{ uint32 def_temp;\
(V)=def_temp; } while(0)
#define ulongget(V,M)
do
{ uint32 def_temp;\
((byte*) &def_temp)[0]=(M)[0];\
((byte*) &def_temp)[1]=(M)[1];\
((byte*) &def_temp)[2]=(M)[2];\
((byte*) &def_temp)[3]=(M)[3];\
(V)=def_temp; }
#define shortstore(T,A) { uint def_temp=(uint) (A) ;\
(V)=def_temp; } while(0)
#define shortstore(T,A)
do
{ uint def_temp=(uint) (A) ;\
*(T+1)=(char)(def_temp); \
*(T+0)=(char)(def_temp >> 8); }
#define longstore(T,A)
{ *((T)+3)=((A));\
*(T+0)=(char)(def_temp >> 8); } while(0)
#define longstore(T,A)
do
{ *((T)+3)=((A));\
*((T)+2)=(((A) >> 8));\
*((T)+1)=(((A) >> 16));\
*((T)+0)=(((A) >> 24)); }
*((T)+0)=(((A) >> 24)); } while(0)
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
...
...
@@ -1127,10 +1128,10 @@ typedef union {
#else
#define ushortget(V,M)
{ V = uint2korr(M); }
#define shortget(V,M)
{ V = sint2korr(M); }
#define longget(V,M)
{ V = sint4korr(M); }
#define ulongget(V,M)
{ V = uint4korr(M); }
#define ushortget(V,M)
do { V = uint2korr(M); } while(0)
#define shortget(V,M)
do { V = sint2korr(M); } while(0)
#define longget(V,M)
do { V = sint4korr(M); } while(0)
#define ulongget(V,M)
do { V = uint4korr(M); } while(0)
#define shortstore(T,V) int2store(T,V)
#define longstore(T,V) int4store(T,V)
#ifndef doubleget
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment