本文整理汇总了C++中LLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ LLOG函数的具体用法?C++ LLOG怎么用?C++ LLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LLOG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LLOG
void MenuBar::CloseMenu()
{
LLOG("CloseMenu");
MenuBar *q = GetLastSubmenu();
while(q && q->IsPopUp()) {
if(q->IsOpen()) {
q->doeffect = true;
q->Close();
if(q->parentmenu)
q->parentmenu->WhenSubMenuClose();
}
MenuBar *w = q;
q = q->parentmenu;
w->submenu = w->parentmenu = NULL;
}
if(q)
q->submenu = NULL;
while(q) {
q->SyncState();
q->doeffect = true;
q = q->parentmenu;
}
}
开发者ID:koz4k,项目名称:soccer,代码行数:23,代码来源:MenuBar.cpp
示例2: MakeDragImage
int Ctrl::DoDragAndDrop(const char *fmts, const Image& sample, dword actions,
const VectorMap<String, ClipData>& data)
{
GuiLock __;
DnDLoop d;
d.actions = (byte)actions;
d.reject = actions & DND_EXACTIMAGE ? CtrlCoreImg::DndNone() : MakeDragImage(CtrlCoreImg::DndNone(), sample);
if(actions & DND_COPY)
d.copy = actions & DND_EXACTIMAGE ? sample : MakeDragImage(CtrlCoreImg::DndCopy(), sample);
if(actions & DND_MOVE)
d.move = actions & DND_EXACTIMAGE ? sample : MakeDragImage(CtrlCoreImg::DndMoveX11(), sample);
d.SetMaster(*this);
d.data = &data;
d.action = DND_NONE;
d.fmts = Split(fmts, ';');
dndloop = &d;
sDnDSource = this;
d.Run();
sDnDSource = NULL;
SyncCaret();
LLOG("DoDragAndDrop finished");
return d.action;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:23,代码来源:DnD.cpp
示例3: LLOG
bool Pdb::SingleStep()
{
LLOG("SINGLE STEP 0");
#if CPU_64
if(win64)
context.context64.EFlags |= 0x100;
else
#endif
context.context32.EFlags |= 0x100;
WriteContext();
running = true;
ContinueDebugEvent(event.dwProcessId, event.dwThreadId, DBG_CONTINUE);
if(!RunToException())
return false;
#if CPU_64
if(win64)
context.context64.EFlags &= ~0x100;
else
#endif
context.context32.EFlags &= ~0x100;
WriteContext();
return true;
}
开发者ID:Sly14,项目名称:upp-mirror,代码行数:23,代码来源:Debug.cpp
示例4: LLOG
void Ctrl::SetMouseCursor(const Image& image)
{
LLOG("SetMouseCursor");
GuiLock __;
int64 id = image.GetSerialId();
Ctrl *topctrl = NULL;
Top *top = NULL;
if(mouseCtrl)
topctrl = mouseCtrl->GetTopCtrl();
else
topctrl = GetActiveCtrl();
if(topctrl)
top = topctrl->top;
if(top && id != top->cursor_id) {
top->cursor_id = id;
int64 aux = image.GetAuxData();
GdkCursor *c = NULL;
if(aux)
c = gdk_cursor_new((GdkCursorType)(aux - 1));
else
if(IsNull(image))
c = gdk_cursor_new(GDK_BLANK_CURSOR);
else {
Point p = image.GetHotSpot();
ImageGdk m;
m.Set(image);
GdkPixbuf *pb = m;
if(pb)
c = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pb, p.x, p.y);
}
if(c && topctrl->IsOpen()) {
gdk_window_set_cursor(topctrl->gdk(), c);
gdk_cursor_unref(c);
gdk_flush(); // Make it visible immediately
}
}
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:37,代码来源:GtkWnd.cpp
示例5: LLOG
void BlockStream::_Put(const void *data, dword size) {
if(IsError() || !IsOpen()) return;
LLOG("Put " << size);
if(!size)
return;
const byte *s = (const byte *)data;
if(!SyncPos())
return;
int64 pos0 = GetPos();
int64 pg0 = pos0 & pagemask;
int64 pos1 = pos0 + size;
int64 pg1 = pos1 & pagemask;
wrlim = buffer + pagesize;
pagedirty = true;
if(pg0 == pg1) {
memcpy(buffer + pos0 - pos, data, size);
ptr = buffer + pos1 - pos;
}
else {
int n = int(pos + pagesize - pos0);
memcpy(buffer + pos0 - pos, s, n);
s += n;
n = dword(pg1 - pg0) - pagesize;
streamsize = max(pos + pagesize + n, streamsize);
int64 wpos = pos + pagesize;
SetPos(pos0 + size);
SyncPage();
if(n)
Write(wpos, s, n);
s += n;
if(pos1 > pg1) {
wrlim = buffer + pagesize;
pagedirty = true;
memcpy(buffer, s, int(pos1 - pg1));
}
}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:37,代码来源:BlockStream.cpp
示例6: USRLOG
bool Ctrl::SetFocus0(bool activate)
{
GuiLock __;
USRLOG(" SETFOCUS " << Desc(this));
LLOG("Ctrl::SetFocus " << Desc(this));
LLOG("focusCtrlWnd " << UPP::Name(focusCtrlWnd));
LLOG("Ctrl::SetFocus0 -> deferredSetFocus = NULL; was: " << UPP::Name(defferedSetFocus));
defferedSetFocus = NULL;
if(focusCtrl == this) return true;
if(!IsOpen() || !IsEnabled() || !IsVisible()) return false;
Ptr<Ctrl> pfocusCtrl = focusCtrl;
Ptr<Ctrl> topwindow = GetTopWindow();
Ptr<Ctrl> topctrl = GetTopCtrl();
Ptr<Ctrl> _this = this;
if(!topwindow) topwindow = topctrl;
LLOG("SetFocus -> SetWndFocus: topwindow = " << UPP::Name(topwindow) << ", focusCtrlWnd = " << UPP::Name(focusCtrlWnd));
if(!topwindow->HasWndFocus() && !topwindow->SetWndFocus()) return false;// cxl 31.1.2004
#ifdef PLATFORM_OSX11 // ugly temporary hack - popups not behaving right in MacOS
// before 2012-9-2 was #ifdef GUI_X11, but that caused issues in most linux distros (cxl)
// as parent window of popup always manages focus/keyboard for popup in X11
if(activate) // Dolik/fudadmin 2011-5-1
topctrl->SetWndForeground();
#else
topwindow->SetWndForeground(); // cxl 2007-4-27
#endif
LLOG("SetFocus -> focusCtrl = this: " << FormatIntHex(this) << ", _this = " << FormatIntHex(~_this) << ", " << UPP::Name(_this));
focusCtrl = _this;
focusCtrlWnd = topwindow;
DoKillFocus(pfocusCtrl, _this);
LLOG("SetFocus 2");
DoDeactivate(pfocusCtrl, _this);
DoSetFocus(pfocusCtrl, _this, activate);
if(topwindow)
lastActiveWnd = topwindow;
return true;
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:36,代码来源:CtrlKbd.cpp
示例7: list_start
dsEnqError list_start()
{
struct ds_search_arg search_arg;
struct ds_search_result result;
struct DSError error;
dsEnqError return_error;
return_error = Okay;
if (get_default_service (&search_arg.sra_common) != 0) {
return localdsaerror;
}
search_arg.sra_common.ca_servicecontrol.svc_options = SVC_OPT_PREFERCHAIN;
search_arg.sra_baseobject = (*base_path != 'T'?
str2dn (base_path):
NULLDN);
search_arg.sra_eis.eis_allattributes = FALSE;
search_arg.sra_eis.eis_infotypes = EIS_ATTRIBUTETYPESONLY;
search_arg.sra_eis.eis_select = 0;
search_arg.sra_searchaliases = TRUE;
search_arg.sra_subset = SRA_ONELEVEL;
search_arg.sra_filter = filter_alloc();
search_arg.sra_filter->flt_type = FILTER_NOT;
search_arg.sra_filter->flt_next = NULLFILTER;
search_arg.sra_filter->flt_un.flt_un_filter = filter_alloc();
search_arg.sra_filter->flt_un.flt_un_filter->flt_type = FILTER_ITEM;
search_arg.sra_filter->flt_un.flt_un_filter->flt_next = NULLFILTER;
search_arg.sra_filter->flt_un.flt_un_filter->flt_un.flt_un_item.fi_type
= FILTERITEM_EQUALITY;
search_arg.sra_filter->flt_un.flt_un_filter->flt_un.flt_un_item.fi_un.
fi_un_ava.ava_type = AttrT_new("2.5.4.0");
search_arg.sra_filter->flt_un.flt_un_filter->flt_un.flt_un_item.fi_un.
fi_un_ava.ava_value =
str2AttrV("dsa", search_arg.sra_filter->flt_un.flt_un_filter->
flt_un.flt_un_item.fi_un.fi_un_ava.ava_type->
oa_syntax);
#ifndef NO_STATS
LLOG (log_stat,LLOG_NOTICE,("search +%s,extent %d, val objectClass != dsa",
base_path,search_arg.sra_subset));
#endif
if (search_arg.sra_filter->flt_un.flt_un_filter->flt_un.flt_un_item.
fi_un.fi_un_ava.ava_value == NULLAttrV) {
return_error = localdsaerror;
} else if (ds_search (&search_arg, &error, &result) != DS_OK) {
free_seq(dnseq);
dnseq = NULLDS;
dn_number = 0;
log_ds_error(&error);
ds_error_free(&error);
switch (error.dse_type) {
case DSE_LOCALERROR:
return_error = duaerror;
break;
case DSE_REMOTEERROR:
return_error = localdsaerror;
break;
case DSE_ATTRIBUTEERROR:
return_error = attributerror;
break;
case DSE_REFERRAL:
case DSE_DSAREFERRAL:
return_error = remotedsaerror;
break;
case DSE_SECURITYERROR:
return_error = security;
break;
case DSE_NAMEERROR:
return_error = namerror;
break;
case DSE_SERVICEERROR:
return_error = serviceerror;
break;
default:
return_error = localdsaerror;
break;
}
} else {
dn_number = 0;
if (result.CSR_entries != NULLENTRYINFO) {
register EntryInfo *ptr;
free_seq(dnseq);
dnseq = NULLDS;
dn_number = 0;
for (ptr = result.CSR_entries; ptr != NULLENTRYINFO;
ptr = ptr->ent_next) {
dn_number++;
dn2buf ((caddr_t)ptr->ent_dn, goto_path);
add_seq (&dnseq, goto_path);
}
//.........这里部分代码省略.........
开发者ID:dank101,项目名称:net-2,代码行数:101,代码来源:list.c
示例8: LLOG
void Ctrl::GtkDragDelete(GtkWidget *widget, GdkDragContext *context, gpointer user_data)
{
LLOG("GtkDragDelete");
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:4,代码来源:GtkDnD.cpp
示例9: LLOG
void StdDisplayClass::Paint(Draw& w, const Rect& r, const Value& q,
Color ink, Color paper, dword s) const {
LLOG("StdDisplay::Paint: " << q << " ink:" << ink << " paper:" << paper);
PaintBackground(w, r, q, ink, paper, s);
Paint0(w, r, q, ink, paper, s);
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:6,代码来源:Display.cpp
示例10: LLOG
void Ctrl::RefreshFrame() {
LLOG("RefreshFrame " << Name());
RefreshFrame(Rect(GetRect().Size()).Inflated(overpaint));
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:4,代码来源:CtrlDraw.cpp
示例11: GetSize
void Ctrl::ScrollView(const Rect& _r, int dx, int dy)
{
GuiLock __;
if(IsFullRefresh() || !IsVisible())
return;
Size vsz = GetSize();
dx = sgn(dx) * min(abs(dx), vsz.cx);
dy = sgn(dy) * min(abs(dy), vsz.cy);
Rect r = _r & vsz;
Ctrl *w;
for(w = this; w->parent; w = w->parent)
if(w->InFrame()) {
Refresh();
return;
}
if(!w || !w->top) return;
Rect view = InFrame() ? GetView() : GetClippedView();
Rect sr = (r + view.TopLeft()) & view;
sr += GetScreenRect().TopLeft() - w->GetScreenRect().TopLeft();
if(w->AddScroll(sr, dx, dy))
Refresh();
else {
LTIMING("ScrollCtrls1");
Top *top = GetTopCtrl()->top;
for(Ctrl *q = GetFirstChild(); q; q = q->GetNext())
if(q->InView()) {
Rect cr = q->GetRect();
if(top && r.Intersects(cr)) { // Uno: Contains -> Intersetcs
Rect to = cr;
GetTopRect(to, false);
if(r.Intersects(cr.Offseted(-dx, -dy))) { // Uno's suggestion 06/11/26 Contains -> Intersetcs
Rect from = cr.Offseted(-dx, -dy);
GetTopRect(from, false);
MoveCtrl *m = FindMoveCtrlPtr(top->move, q);
if(m && m->from == from && m->to == to) {
LLOG("ScrollView Matched " << from << " -> " << to);
m->ctrl = NULL;
goto done;
}
}
if(r.Intersects(cr.Offseted(dx, dy))) { // Uno's suggestion 06/11/26 Contains -> Intersetcs
Rect from = to;
to = cr.Offseted(dx, dy);
GetTopRect(to, false);
MoveCtrl& m = top->scroll_move.Add(q);
m.from = from;
m.to = to;
m.ctrl = q;
LLOG("ScrollView Add " << UPP::Name(q) << from << " -> " << to);
goto done;
}
cr &= r;
if(!cr.IsEmpty()) {
Refresh(cr);
Refresh(cr + Point(dx, dy));
}
done:;
}
}
}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:62,代码来源:CtrlDraw.cpp
示例12: GetSelection
void LineEdit::Paint0(Draw& w) {
int sell, selh;
GetSelection(sell, selh);
if(!IsEnabled())
sell = selh = 0;
Size sz = GetSize();
Size fsz = GetFontSize();
Point sc = sb;
int ll = min(line.GetCount(), sz.cy / fsz.cy + sc.y + 1);
int y = 0;
cpos = GetPos(sc.y);
cline = sc.y;
sell -= cpos;
selh -= cpos;
int pos = cpos;
Vector<int> dx, dx2;
int fascent = font.Info().GetAscent();
for(int i = sc.y; i < ll; i++) {
WString tx = line[i];
int len = tx.GetLength();
if(w.IsPainting(0, y, sz.cx, fsz.cy)) {
Highlight ih;
ih.ink = color[IsShowEnabled() ? INK_NORMAL : INK_DISABLED];
ih.paper = color[IsReadOnly() || !IsShowEnabled() ? PAPER_READONLY : PAPER_NORMAL];
if(nobg)
ih.paper = Null;
ih.font = font;
ih.chr = 0;
Vector<Highlight> hl;
hl.SetCount(len + 1, ih);
for(int q = 0; q < tx.GetCount(); q++)
hl[q].chr = tx[q];
HighlightLine(i, hl, pos);
int ln = hl.GetCount() - 1;
int l = max(sell, 0);
int h = selh > len ? len : selh;
if(l < h)
for(int i = l; i < h; i++) {
hl[i].paper = color[PAPER_SELECTED];
hl[i].ink = color[INK_SELECTED];
}
if(sell <= len && selh > len)
for(int i = len; i < hl.GetCount(); i++) {
hl[i].paper = color[PAPER_SELECTED];
hl[i].ink = color[INK_SELECTED];
}
Buffer<wchar> txt(ln);
for(int i = 0; i < ln; i++)
txt[i] = hl[i].chr;
for(int pass = 0; pass < 2; pass++) {
int gp = 0;
int scx = fsz.cx * sc.x;
if(ln >= 0) {
int q = 0;
while(q < ln) {
Highlight& h = hl[q];
if(txt[q] == '\t') {
int ngp = (gp + tabsize) / tabsize * tabsize;
int l = ngp - gp;
LLOG("Highlight -> tab[" << q << "] paper = " << h.paper);
if(pass == 0) {
w.DrawRect(gp * fsz.cx - scx, y, fsz.cx * l, fsz.cy, h.paper);
if(showtabs && h.paper != SColorHighlight && q < tx.GetLength()) {
Color c = Blend(SColorLight, SColorHighlight);
w.DrawRect(gp * fsz.cx - scx + 2, y + fsz.cy / 2,
l * fsz.cx - 4, 1, c);
w.DrawRect(ngp * fsz.cx - scx - 3, y + 3,
1, fsz.cy - 6, c);
}
if(bordercolumn > 0 && bordercolumn >= gp && bordercolumn < gp + l)
w.DrawRect((bordercolumn - sc.x) * fsz.cx, y, 1, fsz.cy, bordercolor);
}
q++;
gp = ngp;
}
else
if(txt[q] == ' ') {
LLOG("Highlight -> space[" << q << "] paper = " << h.paper);
if(pass == 0) {
w.DrawRect(gp * fsz.cx - scx, y, fsz.cx, fsz.cy, h.paper);
if(showspaces && h.paper != SColorHighlight && q < tx.GetLength()) {
Color c = Blend(SColorLight, SColorHighlight);
w.DrawRect(gp * fsz.cx - scx + fsz.cx / 2, y + fsz.cy / 2,
2, 2, c);
}
if(bordercolumn > 0 && bordercolumn >= gp && bordercolumn < gp + 1)
w.DrawRect((bordercolumn - sc.x) * fsz.cx, y, 1, fsz.cy, bordercolor);
}
q++;
gp++;
}
else {
bool cjk = IsCJKIdeograph(txt[q]);
int p = q + 1;
while(p < len && h == hl[p] && txt[p] != '\t' && txt[p] != ' ' && IsCJKIdeograph(txt[p]) == cjk && p - q < 128)
p++;
int l = p - q;
int ll = cjk ? 2 * l : l;
LLOG("Highlight -> paper[" << q << "] = " << h.paper);
int x = gp * fsz.cx - scx;
//.........这里部分代码省略.........
开发者ID:pedia,项目名称:raidget,代码行数:101,代码来源:LineEdit.cpp
示例13: LLOG
void Ctrl::AddUpdate(const Rect& rect)
{
LLOG("@AddUpdate " << rect);
AddRefreshRect(update, rect);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:5,代码来源:Wnd.cpp
示例14: LLOG
void DnDLoop::MouseMove(Point p, dword)
{
GuiLock __;
LLOG("DnDLoop::MouseMove");
Sync();
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:6,代码来源:DnD.cpp
示例15: tsmf_ffmpeg_decode_audio
static int
tsmf_ffmpeg_decode_audio(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions)
{
TSMFFFmpegDecoder * mdecoder = (TSMFFFmpegDecoder *) decoder;
int len;
int frame_size;
uint32 src_size;
const uint8 * src;
uint8 * dst;
#if 0
LLOGLN(0, ("tsmf_ffmpeg_decode_audio: data_size %d", data_size));
int i;
for (i = 0; i < data_size; i++)
{
LLOG(0, ("%02X ", data[i]));
if (i % 16 == 15)
LLOG(0, ("\n"));
}
LLOG(0, ("\n"));
#endif
if (mdecoder->decoded_size_max == 0)
mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE;
mdecoder->decoded_data = malloc(mdecoder->decoded_size_max);
dst = mdecoder->decoded_data;
src = data;
src_size = data_size;
while (src_size > 0)
{
/* Ensure enough space for decoding */
if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE)
{
mdecoder->decoded_size_max *= 2;
mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
dst = mdecoder->decoded_data + mdecoder->decoded_size;
}
frame_size = mdecoder->decoded_size_max - mdecoder->decoded_size;
#if LIBAVCODEC_VERSION_MAJOR < 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR <= 20)
len = avcodec_decode_audio2(mdecoder->codec_context,
(int16_t *) dst, &frame_size,
src, src_size);
#else
{
AVPacket pkt;
av_init_packet(&pkt);
pkt.data = (uint8 *) src;
pkt.size = src_size;
len = avcodec_decode_audio3(mdecoder->codec_context,
(int16_t *) dst, &frame_size, &pkt);
}
#endif
if (len <= 0 || frame_size <= 0)
{
LLOGLN(0, ("tsmf_ffmpeg_decode_audio: erro decoding"));
break;
}
src += len;
src_size -= len;
mdecoder->decoded_size += frame_size;
dst += frame_size;
}
if (mdecoder->decoded_size == 0)
{
free(mdecoder->decoded_data);
mdecoder->decoded_data = NULL;
}
LLOGLN(10, ("tsmf_ffmpeg_decode_audio: data_size %d decoded_size %d",
data_size, mdecoder->decoded_size));
return 0;
}
开发者ID:FreeRDP,项目名称:FreeRDP-old,代码行数:75,代码来源:tsmf_ffmpeg.c
示例16: DR_LOG
bool Pdb::RunToException()
{
DR_LOG("RunToException");
LLOG("RUN TO EXCEPTION");
TimeStop ts;
bool disasfocus = disas.HasFocus();
bool locked = false;
bool frestored = false;
invalidpage.Clear();
mempage.Clear();
int opn = 0;
for(;;) {
if(terminated) {
if(locked)
Unlock();
return false;
}
opn++;
DR_LOG("WaitForDebugEvent");
if(WaitForDebugEvent(&event, 0)) {
DR_LOG("WaitForDebugEvent ended");
debug_threadid = event.dwThreadId;
opn = 0;
running = false;
switch(event.dwDebugEventCode) {
case EXCEPTION_DEBUG_EVENT: {
DR_LOG("EXCEPTION_DEBUG_EVENT");
LLOG("Exception: " << FormatIntHex(event.u.Exception.ExceptionRecord.ExceptionCode) <<
" at: " << FormatIntHex(event.u.Exception.ExceptionRecord.ExceptionAddress) <<
" first: " << event.u.Exception.dwFirstChance);
SaveForeground();
const EXCEPTION_RECORD& x = event.u.Exception.ExceptionRecord;
if(findarg(x.ExceptionCode, EXCEPTION_BREAKPOINT, EXCEPTION_SINGLE_STEP,
STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP) < 0)
{
LLOG("Non-debug EXCEPTION");
if(event.u.Exception.dwFirstChance) {
LLOG("First chance " << FormatIntHex(x.ExceptionCode));
break;
}
String desc = Format("Exception: [* %lX] at [* %16llX]&",
(int64)x.ExceptionCode, (int64)x.ExceptionAddress);
for(int i = 0; i < __countof(ex_desc); i++)
if(ex_desc[i].code == x.ExceptionCode)
desc << "[* " << DeQtf(ex_desc[i].text) << "]&";
if(x.ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
desc << (x.ExceptionInformation[0] ? "[*@3 writing]" : "[*@4 reading]");
desc << Format(" at [* %08llX]", (int64)x.ExceptionInformation[1]);
}
ToForeground();
PromptOK(desc);
}
#ifdef CPU_64
if(!win64 && x.ExceptionCode == EXCEPTION_BREAKPOINT && !break_running) // Ignore x64 breakpoint in wow64
break;
#endif
if(break_running)
debug_threadid = mainThreadId;
break_running = false;
ToForeground();
if(disasfocus)
disas.SetFocus();
if(locked)
Unlock();
if(refreshmodules)
LoadModuleInfo();
LLOG("event.dwThreadId = " << event.dwThreadId);
bool isbreakpoint = findarg(x.ExceptionCode, EXCEPTION_BREAKPOINT, STATUS_WX86_BREAKPOINT) >= 0;
for(int i = 0; i < threads.GetCount(); i++) {
Thread& t = threads[i];
(Context&)t = ReadContext(threads[i].hThread);
if(event.dwThreadId == threads.GetKey(i)) {
LLOG("Setting current context");
if(isbreakpoint
#ifdef CPU_64
&& bp_set.Find((win64 ? t.context64.Rip : t.context32.Eip) - 1) >= 0
#else
&& bp_set.Find(t.context32.Eip - 1) >= 0
#endif
) // We have stopped at breakpoint, need to move address back
#ifdef CPU_64
if(win64)
t.context64.Rip--;
else
#endif
t.context32.Eip--;
context = t;
}
}
RemoveBp();
return true;
}
case CREATE_THREAD_DEBUG_EVENT:
DR_LOG("CREATE_THREAD_DEBUG_EVENT");
LLOG("Create thread: " << event.dwThreadId);
AddThread(event.dwThreadId, event.u.CreateThread.hThread);
break;
case EXIT_THREAD_DEBUG_EVENT:
DR_LOG("EXIT_THREAD_DEBUG_EVENT");
LLOG("Exit thread: " << event.dwThreadId);
//.........这里部分代码省略.........
开发者ID:Sly14,项目名称:upp-mirror,代码行数:101,代码来源:Debug.cpp
示例17: FBInit
void FBInit(const String& fbdevice)
{
Ctrl::InitFB();
fbfd = open(fbdevice, O_RDWR);
if (!fbfd) {
fprintf(stderr, "Error: cannot open framebuffer device.\n");
exit(-1);
}
LLOG("The framebuffer device was opened successfully.\n");
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
fprintf(stderr, "Error reading fixed information.\n");
exit(-2);
}
if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
fprintf(stderr, "Error reading variable information.\n");
exit(-3);
}
RLOG("Framebuffer opened: " << fbdevice << ": " << vinfo.xres << "x" << vinfo.yres << " @ " << vinfo.bits_per_pixel);
screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8; //bytes
fbp = (char*)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
if((intptr_t)fbp == -1) {
fprintf(stderr, "Error: failed to map framebuffer device to memory.\n");
exit(-4);
}
LLOG("The framebuffer device was mapped to memory successfully.\n");
Size fbsz(vinfo.xres, vinfo.yres);
Ctrl::SetFramebufferSize(fbsz);
//mouse
//mousep = fbsz / 2;
mousep.Clear();
static const char *mice[] = {
"/dev/input/mice"
, "/dev/usbmouse"
, "/dev/psaux"
, NULL
};
for(int i=0; (mouse_fd < 0) && mice[i]; ++i) {
mouse_fd = open(mice[i], O_RDWR, 0);
if(mouse_fd < 0) mouse_fd = open(mice[i], O_RDONLY, 0);
if(mouse_fd >= 0) {
set_imps2(mouse_fd, 1);
if(mouse_imps2 = has_imps2(mouse_fd)) {
LLOG("IMPS2 mouse enabled: " << mice[i]);
}
else
RLOG("no IMPS2 mouse present");
}
else
fprintf(stderr, "Error: failed to open %s.\n", mice[i]);
}
//keyb
static const char* const tty0[] = {
"/dev/tty0"
, "/dev/vc/0"
, NULL
};
static const char* const vcs[] = {
"/dev/vc/"
, "/dev/tty"
, NULL
};
int tfd = -1;
for(int i=0; tty0[i] && (tfd < 0); ++i)
tfd = open(tty0[i], O_WRONLY, 0);
if(tfd < 0)
tfd = dup(0);
ASSERT(tfd>=0);
ioctl(tfd, VT_OPENQRY, &cvt);
close(tfd);
LLOG("probable new VT: " << cvt);
if(geteuid() != 0)
{
fprintf(stderr, "Error: not running as ROOT, mouse handling pobably unavailable\n");
}
else if(cvt > 0) {
LLOG("try to open the NEW assigned VT: " << cvt);
for(int i=0; vcs[i] && (keyb_fd < 0); ++i) {
char path[32];
snprintf(path, 32, "%s%d", vcs[i], cvt);
keyb_fd = open(path, O_RDWR, 0);
if(keyb_fd < 0)
continue;
LLOG("TTY path opened: " << path);
//.........这里部分代码省略.........
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:101,代码来源:Win.cpp
示例18: tsmf_codec_parse_media_type
int
tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE * mediatype, const uint8 * pMediaType)
{
uint32 cbFormat;
const uint8 * pFormat;
int i;
int ret = 0;
memset(mediatype, 0, sizeof(TS_AM_MEDIA_TYPE));
LLOG(0, ("MajorType: "));
tsmf_print_guid(pMediaType);
for (i = 0; tsmf_major_type_map[i].type != TSMF_MAJOR_TYPE_UNKNOWN; i++)
{
if (memcmp(tsmf_major_type_map[i].guid, pMediaType, 16) == 0)
break;
}
mediatype->MajorType = tsmf_major_type_map[i].type;
if (mediatype->MajorType == TSMF_MAJOR_TYPE_UNKNOWN)
ret = 1;
LLOGLN(0, (" (%s)", tsmf_major_type_map[i].name));
LLOG(0, ("SubType: "));
tsmf_print_guid(pMediaType + 16);
for (i = 0; tsmf_sub_type_map[i].type != TSMF_SUB_TYPE_UNKNOWN; i++)
{
if (memcmp(tsmf_sub_type_map[i].guid, pMediaType + 16, 16) == 0)
break;
}
mediatype->SubType = tsmf_sub_type_map[i].type;
if (mediatype->SubType == TSMF_SUB_TYPE_UNKNOWN)
ret = 1;
LLOGLN(0, (" (%s)", tsmf_sub_type_map[i].name));
LLOG(0, ("FormatType: "));
tsmf_print_guid(pMediaType + 44);
for (i = 0; tsmf_format_type_map[i].type != TSMF_FORMAT_TYPE_UNKNOWN; i++)
{
if (memcmp(tsmf_format_type_map[i].guid, pMediaType + 44, 16) == 0)
break;
}
mediatype->FormatType = tsmf_format_type_map[i].type;
if (mediatype->FormatType == TSMF_FORMAT_TYPE_UNKNOWN)
ret = 1;
LLOGLN(0, (" (%s)", tsmf_format_type_map[i].name));
cbFormat = GET_UINT32(pMediaType, 60);
LLOGLN(0, ("tsmf_stream_set_format: cbFormat %d", cbFormat));
pFormat = pMediaType + 64;
for (i = 0; i < cbFormat; i++)
{
LLOG(0, ("%02X ", pFormat[i]));
if (i % 16 == 15)
LLOG(0, ("\n"));
}
LLOG(0, ("\n"));
switch (mediatype->FormatType)
{
case TSMF_FORMAT_TYPE_MFVIDEOFORMAT:
/* http://msdn.microsoft.com/en-us/library/aa473808.aspx */
/* MFVIDEOFORMAT.videoInfo.dwWidth */
mediatype->Width = GET_UINT32(pFormat, 8);
/* MFVIDEOFORMAT.videoInfo.dwHeight */
mediatype->Height = GET_UINT32(pFormat, 12);
/* MFVIDEOFORMAT.compressedInfo.AvgBitrate */
mediatype->BitRate = GET_UINT32(pFormat, 136);
/* MFVIDEOFORMAT.videoInfo.FramesPerSecond */
mediatype->SamplesPerSecond.Numerator = GET_UINT32(pFormat, 48);
mediatype->SamplesPerSecond.Denominator = GET_UINT32(pFormat, 52);
if (cbFormat > 176)
{
mediatype->ExtraDataSize = cbFormat - 176;
mediatype->ExtraData = pFormat + 176;
}
break;
case TSMF_FORMAT_TYPE_WAVEFORMATEX:
/* http://msdn.microsoft.com/en-us/library/dd757720.aspx */
mediatype->Channels = GET_UINT16(pFormat, 2);
mediatype->SamplesPerSecond.Numerator = GET_UINT32(pFormat, 4);
mediatype->SamplesPerSecond.Denominator = 1;
mediatype->BitRate = GET_UINT32(pFormat, 8) * 8;
mediatype->BlockAlign = GET_UINT16(pFormat, 12);
mediatype->BitsPerSample = GET_UINT16(pFormat, 14);
mediatype->ExtraDataSize = GET_UINT16(pFormat, 16);
if (mediatype->ExtraDataSize > 0)
mediatype->ExtraData = pFormat + 18;
break;
case TSMF_FORMAT_TYPE_MPEG2VIDEOINFO:
/* http://msdn.microsoft.com/en-us/library/dd390707.aspx */
i = tsmf_codec_parse_VIDEOINFOHEADER2(mediatype, pFormat);
i += tsmf_codec_parse_BITMAPINFOHEADER(mediatype, pFormat + i);
//.........这里部分代码省略.........
开发者ID:LawrenceK,项目名称:FreeRDP,代码行数:101,代码来源:tsmf_codec.c
示例19: dsa_control
int
dsa_control (Attr_Sequence as, struct DSError *error, DN dn)
{
char * str;
DN dn2;
Entry theentry;
extern Entry database_root;
SFD attempt_restart();
if ( ! manager(dn) ) {
error->dse_type = DSE_SECURITYERROR;
error->ERR_SECURITY.DSE_sc_problem = DSE_SC_ACCESSRIGHTS;
return (DS_ERROR_REMOTE);
}
str = (char *) as->attr_value->avseq_av.av_struct;
#ifndef NO_STATS
LLOG (log_stat,LLOG_NOTICE,("DSA control: %s",str));
#endif
switch (*str) {
case 'd': /* -dump <directory> */
str = SkipSpace (++str);
/*
directory_dump (str, database_root);
*/
return (DS_OK);
case 't': /* -tailor <string> */
str = SkipSpace (++str);
if (dsa_tai_string (str) == OK) {
isodexport (NULLCP);
return (DS_OK);
}
break;
case 'a': /* -abort */
LLOG (log_dsap,LLOG_FATAL,("*** abort signal ***"));
dsa_abort(-1);
exit(0);
case 'b': /* -restart */
LLOG (log_dsap,LLOG_FATAL,("*** restart signal ***"));
attempt_restart (NOTOK);
exit(0); /* should not be reached */
case 'r': /* -refresh <entry> */
str = SkipSpace (++str);
if (lexequ (str,"root") == 0)
dn2= NULLDN;
else if ((dn2 = str2dn (str)) == NULLDN)
break;
if (refresh_from_disk (dn2) == OK)
return (DS_OK);
break;
case 'f': /* -resync <entry> */
str = SkipSpace (++str);
if (lexequ (str,"root") == 0)
dn2= NULLDN;
else if ((dn2 = str2dn (str)) == NULLDN)
break;
if ((theentry = local_find_entry (dn2,FALSE)) != NULLENTRY)
#ifdef TURBO_DISK
{
Entry akid = (Entry) avl_getone(theentry->e_children);
if (turbo_writeall (akid) == OK)
return (DS_OK);
}
#else
{
Entry akid = (Entry) avl_getone(theentry->e_children);
if (journal (akid) == OK)
return (DS_OK);
}
#endif
break;
case 'l': /* -lock <entry> */
str = SkipSpace (++str);
if (lexequ (str,"root") == 0)
dn2 = NULLDN;
else if ((dn2 = str2dn (str)) == NULLDN)
break;
if ((theentry = local_find_entry (dn2,FALSE)) != NULLENTRY) {
theentry->e_lock = TRUE;
return (DS_OK);
}
break;
case 'u': /* -unlock <entry> */
str = SkipSpace (++str);
if (lexequ (str,"root") == 0)
dn2 = NULLDN;
else if ((dn2 = str2dn (str)) == NULLDN)
break;
if ((theentry = local_find_entry (dn2,FALSE)) != NULLENTRY) {
theentry->e_lock = FALSE;
return (DS_OK);
}
break;
case 's': /* -slave */
//.........这里部分代码省略.........
开发者ID:Kampbell,项目名称:isode-8.0,代码行数:101,代码来源:control.c
示例20: DefWindowProc
LRESULT CALLBACK Ctrl::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
GuiLock __;
if(sFinished)
return DefWindowProc(hWnd, message, wParam, lParam);
#ifdef PLATFORM_WINCE
if(message == WM_CREATE)
#else
if(message == WM_NCCREATE)
#endif
{
Ctrl *w = (Ctrl *)((LPCREATESTRUCT) lParam)->lpCreateParams;
if(w) {
w->NcCreate(hWnd);
int i = Windows().Find(NULL);
if(i >= 0) {
Windows().SetKey(i, hWnd);
Windows()[i] = w;
}
else
Windows().Add(hWnd) = w;
}
}
Ctrl *w = Windows().Get(hWnd, NULL);
#ifdef PLATFORM_WINCE
if(message == WM_DESTROY)
#else
if(message == WM_NCDESTROY)
#endif
{
if(w) w->NcDestroy();
int i = Windows().Find(hWnd);
if(i >= 0)
Windows().SetKey(i, NULL);
}
#if LOGMESSAGES
bool logblk = false;
if(message != WM_SETCURSOR && message != WM_CTLCOLORBTN && message != WM_TIMER &&
#ifndef PLATFORM_WINCE
message != WM_NCHITTEST && message != WM_ENTERIDLE &&
#endif
message != WM_CTLCOLORDLG && message != WM_CTLCOLOREDIT && message != WM_CTLCOLORLISTBOX &&
message != WM_CTLCOLORMSGBOX && message != WM_CTLCOLORSCROLLBAR &&
message != WM_CTLCOLORSTATIC && message != WM_CANCELMODE &&
message != 0x0118)
for(WinMsg *m = sWinMsg; m->ID; m++)
if(m->ID == message) {
RLOG(m->name << ' ' << UPP::Name(w) <<
Sprintf(", wParam = %d (0x%x), lParam = %d (0x%x)",
wParam, wParam, lParam, lParam));
VppLog() << LOG_BEGIN;
logblk = true;
break;
}
#endif
LRESULT l = 0;
if(w) {
#if defined(_DEBUG) && LOGTIMING
int ticks = msecs();
String wname = w->Name();
#endif
Ptr<Ctrl> pw = w;
l = w->WindowProc(message, wParam, lParam);
if(pw)
pw->SyncMoves();
#if defined(_DEBUG) && LOGTIMING
String msgname;
for(WinMsg *m = sWinMsg; m->ID; m++)
if(m->ID == message) {
msgname = m->name;
break;
}
if(IsNull(msgname))
msgname = NFormat("0x%04x", (int)message);
LLOG(NFormat("T+%d %s 0x%08x 0x%08x -> %s", msecs(ticks), msgname, (int)wParam, (int)lParam, wname));
#endif
}
else
l = DefWindowProc(hWnd, message, wParam, lParam);
#if LOGMESSAGES
if(logblk)
VppLog() << LOG_END;
#endif
return l;
}
开发者ID:koz4k,项目名称:soccer,代码行数:85,代码来源:Win32Wnd.cpp
注:本文中的LLOG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论