Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef OFF_H
00015 #define OFF_H
00016
00017 #include "storage/itemid.h"
00018
00019
00020
00021
00022
00023
00024 typedef uint16 OffsetNumber;
00025
00026 #define InvalidOffsetNumber ((OffsetNumber) 0)
00027 #define FirstOffsetNumber ((OffsetNumber) 1)
00028 #define MaxOffsetNumber ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData)))
00029 #define OffsetNumberMask (0xffff)
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #define OffsetNumberIsValid(offsetNumber) \
00041 ((bool) ((offsetNumber != InvalidOffsetNumber) && \
00042 (offsetNumber <= MaxOffsetNumber)))
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #define OffsetNumberNext(offsetNumber) \
00054 ((OffsetNumber) (1 + (offsetNumber)))
00055 #define OffsetNumberPrev(offsetNumber) \
00056 ((OffsetNumber) (-1 + (offsetNumber)))
00057
00058 #endif