Tesseract  3.02
tesseract-ocr/ccutil/serialis.cpp File Reference
#include "mfcpch.h"
#include "serialis.h"
#include "scanutils.h"

Go to the source code of this file.

Functions

DLLSYM uinT64 reverse64 (uinT64 num)
DLLSYM uinT32 reverse32 (uinT32 num)
DLLSYM uinT16 reverse16 (uinT16 num)

Function Documentation

DLLSYM uinT16 reverse16 ( uinT16  num)

Definition at line 50 of file serialis.cpp.

                         {
  return ((num & 0xff) << 8) | ((num >> 8) & 0xff);
}
DLLSYM uinT32 reverse32 ( uinT32  num)

Definition at line 36 of file serialis.cpp.

                         {
  return (reverse16 ((uinT16) (num & 0xffff)) << 16)
    | reverse16 ((uinT16) ((num >> 16) & 0xffff));
}
DLLSYM uinT64 reverse64 ( uinT64  num)

Definition at line 25 of file serialis.cpp.

                                    {
  return ((uinT64)reverse32((uinT32)(num & 0xffffffff)) << 32)
    | reverse32((uinT32)((num >> 32) & 0xffffffff));
}