D:/opendownloadmanager/ODM-1.x/OpNetCatcher/jri_md.h File Reference

#include <assert.h>

Go to the source code of this file.

Classes

struct  jlong
union  JRI_JDK_stack_item
union  JRI_JDK_Java8Str

Defines

#define JRI_PUBLIC_API(ResultType)   ResultType
#define JRI_CALLBACK
#define JRI_BIT(n)   ((juint)1 << (n))
#define JRI_BITMASK(n)   (JRI_BIT(n) - 1)
#define jlong_IS_ZERO(a)   (((a).hi == 0) && ((a).lo == 0))
#define jlong_EQ(a, b)   (((a).hi == (b).hi) && ((a).lo == (b).lo))
#define jlong_NE(a, b)   (((a).hi != (b).hi) || ((a).lo != (b).lo))
#define jlong_GE_ZERO(a)   (((a).hi >> 31) == 0)
#define jlong_CMP(a, op, b)
#define jlong_UCMP(a, op, b)
#define jlong_AND(r, a, b)
#define jlong_OR(r, a, b)
#define jlong_XOR(r, a, b)
#define jlong_OR2(r, a)
#define jlong_NOT(r, a)
#define jlong_NEG(r, a)
#define jlong_ADD(r, a, b)
#define jlong_SUB(r, a, b)
#define jlong_MUL(r, a, b)
#define _jlong_lo16(a)   ((a) & JRI_BITMASK(16))
#define _jlong_hi16(a)   ((a) >> 16)
#define jlong_MUL32(r, a, b)
#define jlong_UDIVMOD(qp, rp, a, b)   jlong_udivmod(qp, rp, a, b)
#define jlong_DIV(r, a, b)
#define jlong_MOD(r, a, b)
#define jlong_SHL(r, a, b)
#define jlong_ISHL(r, a, b)
#define jlong_SHR(r, a, b)
#define jlong_USHR(r, a, b)
#define jlong_L2I(i, l)   ((i) = (l).lo)
#define jlong_L2UI(ui, l)   ((ui) = (l).lo)
#define jlong_L2F(f, l)   { double _d; jlong_L2D(_d, l); (f) = (float) _d; }
#define jlong_L2D(d, l)
#define jlong_I2L(l, i)   ((l).hi = (i) >> 31, (l).lo = (i))
#define jlong_UI2L(l, ui)   ((l).hi = 0, (l).lo = (ui))
#define jlong_F2L(l, f)   { double _d = (double) f; jlong_D2L(l, _d); }
#define jlong_D2L(l, d)
#define JRI_GET_INT64(_t, _addr)   (*(jlong*)(_addr))
#define JRI_SET_INT64(_t, _addr, _v)   (*(jlong*)(_addr) = (_v))
#define JRI_GET_DOUBLE(_t, _addr)   (*(jdouble*)(_addr))
#define JRI_SET_DOUBLE(_t, _addr, _v)   (*(jdouble*)(_addr) = (_v))

Typedefs

typedef unsigned char jbool
typedef char jbyte
typedef short jchar
typedef short jshort
typedef unsigned long juint
typedef long jint
typedef float jfloat
typedef double jdouble
typedef juint jsize
typedef jlong julong
typedef union JRI_JDK_Java8Str JRI_JDK_Java8

Functions

 JRI_PUBLIC_API (void) jlong_udivmod(julong *qp

Variables

jlong jlong_MAXINT
jlong jlong_MININT
jlong jlong_ZERO
julongrp
julong julong a
julong julong julong b


Define Documentation

#define _jlong_hi16 ( a   )     ((a) >> 16)

Definition at line 210 of file jri_md.h.

#define _jlong_lo16 ( a   )     ((a) & JRI_BITMASK(16))

Definition at line 209 of file jri_md.h.

#define jlong_ADD ( r,
a,
b   ) 

Value:

{                                              \
    jlong _a, _b;                                                         \
    _a = a; _b = b;                                                       \
    (r).lo = _a.lo + _b.lo;                                               \
    (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo);                            \
}

Definition at line 188 of file jri_md.h.

#define jlong_AND ( r,
a,
b   ) 

Value:

((r).lo = (a).lo & (b).lo,                    \
                                 (r).hi = (a).hi & (b).hi)

Definition at line 175 of file jri_md.h.

#define jlong_CMP ( a,
op,
b   ) 

Value:

(((int32)(a).hi op (int32)(b).hi) ||          \
                                 (((a).hi == (b).hi) && ((a).lo op (b).lo)))

Definition at line 170 of file jri_md.h.

#define jlong_D2L ( l,
 ) 

Value:

{                                                 \
    int _negative;                                                        \
    double _absval, _d_hi;                                                \
    jlong _lo_d;                                                          \
                                                                          \
    _negative = ((d) < 0);                                                \
    _absval = _negative ? -(d) : (d);                                     \
                                                                          \
    (l).hi = (juint)(_absval / 4.294967296e9);                            \
    (l).lo = 0;                                                           \
    jlong_L2D(_d_hi, l);                                                  \
    _absval -= _d_hi;                                                     \
    _lo_d.hi = 0;                                                         \
    if (_absval < 0) {                                                    \
        _lo_d.lo = (juint) -_absval;                                          \
        jlong_SUB(l, l, _lo_d);                                               \
    } else {                                                              \
        _lo_d.lo = (juint) _absval;                                           \
        jlong_ADD(l, l, _lo_d);                                               \
    }                                                                     \
                                                                          \
    if (_negative)                                                        \
        jlong_NEG(l, l);                                                      \
}

Definition at line 358 of file jri_md.h.

#define jlong_DIV ( r,
a,
b   ) 

Value:

{                                              \
    jlong _a, _b;                                                         \
    juint _negative = (int32)(a).hi < 0;                                  \
    if (_negative) {                                                      \
        jlong_NEG(_a, a);                                                     \
    } else {                                                              \
        _a = a;                                                               \
    }                                                                     \
    if ((int32)(b).hi < 0) {                                              \
        _negative ^= 1;                                                       \
        jlong_NEG(_b, b);                                                     \
    } else {                                                              \
        _b = b;                                                               \
    }                                                                     \
    jlong_UDIVMOD(&(r), 0, _a, _b);                                       \
    if (_negative)                                                        \
        jlong_NEG(r, r);                                                      \
}

Definition at line 232 of file jri_md.h.

#define jlong_EQ ( a,
b   )     (((a).hi == (b).hi) && ((a).lo == (b).lo))

Definition at line 166 of file jri_md.h.

#define jlong_F2L ( l,
 )     { double _d = (double) f; jlong_D2L(l, _d); }

Definition at line 356 of file jri_md.h.

#define jlong_GE_ZERO ( a   )     (((a).hi >> 31) == 0)

Definition at line 168 of file jri_md.h.

#define jlong_I2L ( l,
 )     ((l).hi = (i) >> 31, (l).lo = (i))

Definition at line 354 of file jri_md.h.

#define jlong_IS_ZERO ( a   )     (((a).hi == 0) && ((a).lo == 0))

Definition at line 165 of file jri_md.h.

#define jlong_ISHL ( r,
a,
b   ) 

Value:

{                                             \
    if (b) {                                                              \
        jlong _a;                                                             \
        _a.lo = (a);                                                          \
        _a.hi = 0;                                                            \
        if ((b) < 32) {                                                   \
            (r).lo = (a) << (b);                                              \
            (r).hi = ((a) >> (32 - (b)));                                     \
        } else {                                                              \
            (r).lo = 0;                                                       \
            (r).hi = (a) << ((b) & 31);                                       \
        }                                                                     \
    } else {                                                              \
        (r).lo = (a);                                                         \
        (r).hi = 0;                                                           \
    }                                                                     \
}

Definition at line 285 of file jri_md.h.

#define jlong_L2D ( d,
l   ) 

Value:

{                                                 \
    int32 _negative;                                                      \
    jlong _absval;                                                        \
                                                                          \
    _negative = (l).hi >> 31;                                             \
    if (_negative) {                                                      \
        jlong_NEG(_absval, l);                                                \
    } else {                                                              \
        _absval = l;                                                          \
    }                                                                     \
    (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo;                \
    if (_negative)                                                        \
        (d) = -(d);                                                           \
}

Definition at line 339 of file jri_md.h.

#define jlong_L2F ( f,
l   )     { double _d; jlong_L2D(_d, l); (f) = (float) _d; }

Definition at line 337 of file jri_md.h.

#define jlong_L2I ( i,
l   )     ((i) = (l).lo)

Definition at line 335 of file jri_md.h.

#define jlong_L2UI ( ui,
l   )     ((ui) = (l).lo)

Definition at line 336 of file jri_md.h.

#define jlong_MOD ( r,
a,
b   ) 

Value:

{                                              \
    jlong _a, _b;                                                         \
    juint _negative = (int32)(a).hi < 0;                                  \
    if (_negative) {                                                      \
        jlong_NEG(_a, a);                                                     \
    } else {                                                              \
        _a = a;                                                               \
    }                                                                     \
    if ((int32)(b).hi < 0) {                                              \
        jlong_NEG(_b, b);                                                     \
    } else {                                                              \
        _b = b;                                                               \
    }                                                                     \
    jlong_UDIVMOD(0, &(r), _a, _b);                                       \
    if (_negative)                                                        \
        jlong_NEG(r, r);                                                      \
}

Definition at line 251 of file jri_md.h.

#define jlong_MUL ( r,
a,
b   ) 

Value:

{                                              \
    jlong _a, _b;                                                         \
    _a = a; _b = b;                                                       \
    jlong_MUL32(r, _a.lo, _b.lo);                                         \
    (r).hi += _a.hi * _b.lo + _a.lo * _b.hi;                              \
}

Definition at line 202 of file jri_md.h.

#define jlong_MUL32 ( r,
a,
b   ) 

Value:

{                                            \
     juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3;                        \
     _a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a);                          \
     _b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b);                          \
     _y0 = _a0 * _b0;                                                     \
     _y1 = _a0 * _b1;                                                     \
     _y2 = _a1 * _b0;                                                     \
     _y3 = _a1 * _b1;                                                     \
     _y1 += _jlong_hi16(_y0);                            \
     _y1 += _y2;                                         \
     if (_y1 < _y2) _y3 += 1 << 16;                        \
     (r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0);                \
     (r).hi = _y3 + _jlong_hi16(_y1);                                     \
}

Definition at line 212 of file jri_md.h.

#define jlong_NE ( a,
b   )     (((a).hi != (b).hi) || ((a).lo != (b).lo))

Definition at line 167 of file jri_md.h.

#define jlong_NEG ( r,
a   ) 

Value:

((r).lo = -(int32)(a).lo,                     \
                                 (r).hi = -(int32)(a).hi - ((r).lo != 0))

Definition at line 186 of file jri_md.h.

#define jlong_NOT ( r,
a   ) 

Value:

((r).lo = ~(a).lo,                                \
                                 (r).hi = ~(a).hi)

Definition at line 183 of file jri_md.h.

#define jlong_OR ( r,
a,
b   ) 

Value:

((r).lo = (a).lo | (b).lo,                    \
                                 (r).hi = (a).hi | (b).hi)

Definition at line 177 of file jri_md.h.

#define jlong_OR2 ( r,
a   ) 

Value:

((r).lo = (r).lo | (a).lo,                    \
                                 (r).hi = (r).hi | (a).hi)

Definition at line 181 of file jri_md.h.

#define jlong_SHL ( r,
a,
b   ) 

Value:

{                                              \
    if (b) {                                                              \
        jlong _a;                                                             \
        _a = a;                                                           \
        if ((b) < 32) {                                                   \
            (r).lo = _a.lo << (b);                                            \
            (r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b)));                  \
        } else {                                                              \
            (r).lo = 0;                                                       \
            (r).hi = _a.lo << ((b) & 31);                                     \
        }                                                                     \
    } else {                                                              \
        (r) = (a);                                                            \
    }                                                                     \
}

Definition at line 269 of file jri_md.h.

#define jlong_SHR ( r,
a,
b   ) 

Value:

{                                              \
    if (b) {                                                              \
        jlong _a;                                                             \
        _a = a;                                                           \
        if ((b) < 32) {                                                       \
            (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \
            (r).hi = (int32)_a.hi >> (b);                                     \
        } else {                                                              \
            (r).lo = (int32)_a.hi >> ((b) & 31);                              \
            (r).hi = (int32)_a.hi >> 31;                                      \
        }                                                                     \
    } else {                                                              \
        (r) = (a);                                                            \
    }                                                                     \
}

Definition at line 303 of file jri_md.h.

#define jlong_SUB ( r,
a,
b   ) 

Value:

{                                              \
    jlong _a, _b;                                                         \
    _a = a; _b = b;                                                       \
    (r).lo = _a.lo - _b.lo;                                               \
    (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo);                             \
}                                                                         \

Definition at line 195 of file jri_md.h.

#define jlong_UCMP ( a,
op,
b   ) 

Value:

(((a).hi op (b).hi) ||                    \
                                 (((a).hi == (b).hi) && ((a).lo op (b).lo)))

Definition at line 172 of file jri_md.h.

#define jlong_UDIVMOD ( qp,
rp,
a,
b   )     jlong_udivmod(qp, rp, a, b)

Definition at line 227 of file jri_md.h.

#define jlong_UI2L ( l,
ui   )     ((l).hi = 0, (l).lo = (ui))

Definition at line 355 of file jri_md.h.

#define jlong_USHR ( r,
a,
b   ) 

Value:

{                                             \
    if (b) {                                                              \
        jlong _a;                                                             \
        _a = a;                                                           \
        if ((b) < 32) {                                                       \
            (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \
            (r).hi = _a.hi >> (b);                                            \
        } else {                                                              \
            (r).lo = _a.hi >> ((b) & 31);                                     \
            (r).hi = 0;                                                       \
        }                                                                     \
    } else {                                                              \
        (r) = (a);                                                            \
    }                                                                     \
}

Definition at line 319 of file jri_md.h.

#define jlong_XOR ( r,
a,
b   ) 

Value:

((r).lo = (a).lo ^ (b).lo,                    \
                                 (r).hi = (a).hi ^ (b).hi)

Definition at line 179 of file jri_md.h.

#define JRI_BIT ( n   )     ((juint)1 << (n))

Definition at line 90 of file jri_md.h.

#define JRI_BITMASK ( n   )     (JRI_BIT(n) - 1)

Definition at line 91 of file jri_md.h.

#define JRI_CALLBACK

Definition at line 67 of file jri_md.h.

#define JRI_GET_DOUBLE ( _t,
_addr   )     (*(jdouble*)(_addr))

Definition at line 428 of file jri_md.h.

#define JRI_GET_INT64 ( _t,
_addr   )     (*(jlong*)(_addr))

Definition at line 416 of file jri_md.h.

#define JRI_PUBLIC_API ( ResultType   )     ResultType

Definition at line 66 of file jri_md.h.

#define JRI_SET_DOUBLE ( _t,
_addr,
_v   )     (*(jdouble*)(_addr) = (_v))

Definition at line 429 of file jri_md.h.

#define JRI_SET_INT64 ( _t,
_addr,
_v   )     (*(jlong*)(_addr) = (_v))

Definition at line 417 of file jri_md.h.


Typedef Documentation

typedef unsigned char jbool

Definition at line 74 of file jri_md.h.

typedef char jbyte

Definition at line 75 of file jri_md.h.

typedef short jchar

Definition at line 76 of file jri_md.h.

typedef double jdouble

Definition at line 86 of file jri_md.h.

typedef float jfloat

Definition at line 85 of file jri_md.h.

typedef long jint

Definition at line 83 of file jri_md.h.

typedef short jshort

Definition at line 77 of file jri_md.h.

typedef juint jsize

Definition at line 88 of file jri_md.h.

typedef unsigned long juint

Definition at line 82 of file jri_md.h.

typedef jlong julong

Definition at line 161 of file jri_md.h.


Function Documentation

JRI_PUBLIC_API ( void   ) 


Variable Documentation

Definition at line 230 of file jri_md.h.

Referenced by fsDownloadMgr::_threadReserveDiskSpace(), asio::basic_socket< Protocol, StreamSocketService >::at_mark(), libtorrent::buffer::check_invariant(), CCreateDownloadsDlg::CreateDownloads(), Curl_nonblock(), libtorrent::dht::distance_exp(), fsProgramLogMgr::EraseLog(), vms7zipArchive::Extract(), libtorrent::dht::routing_table::find_node(), fsUrlToFdm(), vmsBtDownloadManager::get_NextAnnounceInterval(), vms7zipArchiveExtractCallback::GetStream(), vmsBtDownloadManager::GetUploadSpeed(), gzgets(), libtorrent::peer_connection::incoming_piece(), CFdmApp::InitInstance(), asio::detail::socket_select_interrupter::interrupt(), vmsBtDownloadManager::IsBtDownloadRunning(), vmsBtDownloadManager::IsDownloading(), vmsBtDownloadManager::IsDownloadStatCanBeRead(), fsDldTasksFilter::IsSatisfies(), fsWebPageDownloader::Load(), vmsBtFileImpl::LoadFromFile(), main(), MD5_Transform(), MD5Transform(), libtorrent::dht::routing_table::need_node(), libtorrent::dht::routing_table::node_failed(), libtorrent::dht::routing_table::node_seen(), CPrg_GeneralPage::OnApply(), CHFE_ProtocolPage::OnApply(), CDownloadProperties_MiscPage::OnApply(), CDownloaderProperties_MonitorPage::OnApply(), CDownloaderProperties_MirrorsPage::OnApply(), CDownloaderProperties_CommunityPage::OnApply(), fsDownloadsMgr::OnArchiveDetected(), fsDownloadsMgr::OnDldDone_CheckDownloadIsHtmlPageWithVideo(), CFVDownloads_Tasks::OnFvdldAutostart(), CMainFrame::OnMonitorclipboard(), fsDownloadsMgr::OnQueryNewSection(), asio::detail::socket_select_interrupter::reset(), fsWebPageDownloader::Save(), fsDownloadsMgr::Save(), fsDownloadMgr::SaveState(), CDownloads_Log::SetActiveDownload(), sha1_compile(), SHA1Transform(), test_main(), CCreateDownloadDlg::Update_User_Password(), CCreateBatchDownload::Update_User_Password(), CWPDS_ImagesPages::UpdateEnabled(), CWPDS_FilesPage::UpdateEnabled(), CWebInterfaceDlg::UpdateEnabled(), CUrlWithLoginDlg::UpdateEnabled(), CSpiderAddPageDlg::UpdateEnabled(), CSites_GeneralPage::UpdateEnabled(), CSiteManager_PasswordsPage::UpdateEnabled(), CSchedule_WTSPage::UpdateEnabled(), CSchedule_HTSPage::UpdateEnabled(), CSchedule_AdvancedPage::UpdateEnabled(), CPrg_UpdatePage::UpdateEnabled(), CPrg_HistoryPage::UpdateEnabled(), CPrg_GeneralPage_FWDlg::UpdateEnabled(), CPrg_Data::UpdateEnabled(), CDownloadProperties_ProxyPage::UpdateEnabled(), CDownloadProperties_ConnectionPage::UpdateEnabled(), CDownloaderProperties_NotificationsPage::UpdateEnabled(), CDownloaderProperties_NetworkPage::UpdateEnabled(), CDownloaderProperties_MonitorPage::UpdateEnabled(), CDownloaderProperties_MirrorsPage::UpdateEnabled(), CDownloaderProperties_ListPage::UpdateEnabled(), CDownloaderProperties_CommunityPage::UpdateEnabled(), CDownloaderProperties_BtPage::UpdateEnabled(), CDlgFindAdvanced::UpdateEnabled(), CDlgDownloadsHistory::UpdateEnabled(), CDlgDeletedProperties::UpdateEnabled(), CDlg_SetBatchNumbers::UpdateEnabled(), CCreateDownloadsDlg::UpdateEnabled(), CCreateDownloadListDlg::UpdateEnabled(), CCreateDownloadDlg::UpdateEnabled(), CCreateBatchDownload::UpdateEnabled(), and vmsAnimatedGIF::WriteDataOnDisk().

Definition at line 230 of file jri_md.h.


Generated on Sun May 25 00:20:15 2008 by  doxygen 1.5.6