Exemple #1
0
//-------------------------------------------------------------------------
static void LoadLocals(WATCHDATA *ptr)
{
    NAMELIST *names = FindEnclosedAutos(activeScope);
    WATCHINFO *p = ptr->watchinfo_list;
    int i;
    for (i=0; i < ptr->watchinfo_count; i++)
        if (!strcmp(ptr->watchinfo_list[i].info->membername, "this"))
        {
            WATCHINFO *x = &ptr->watchinfo_list[i];
            int j;
            FreeTree(x->info, ptr);
            FreeVarInfo(x->info);
            for (j = i; j < ptr->watchinfo_count - 1; j++)

            {
                ptr->watchinfo_list[j] = ptr->watchinfo_list[j + 1];
                RenumberDeleteItems(ptr->watchinfo_list[j].info);
            }
            ptr->watchinfo_count--;
            i--;
        }
        else
        {
            p[i].marked = TRUE;
        }
    while (names)
    {
        NAMELIST *next = names->next;
        DEBUG_INFO *dbg;
        VARINFO *var = EvalExpr(&dbg, activeScope, (char*) names->data+1, FALSE);
        if (var)
        {
            AddItem(dbg, var, activeScope->address, ptr);
        }
        free(names->data);
        free(names);
        names = next;
    }
    p = ptr->watchinfo_list;
    for (i=0; i < ptr->watchinfo_count; i++)
        if (p[i].marked)
        {
            WATCHINFO *x = &ptr->watchinfo_list[i];
            int j;
            FreeTree(x->info, ptr);
            FreeVarInfo(x->info);
            for (j = i; j < ptr->watchinfo_count - 1; j++)

            {
                ptr->watchinfo_list[j] = ptr->watchinfo_list[j + 1];
                RenumberDeleteItems(ptr->watchinfo_list[j].info);
            }
            ptr->watchinfo_count--;
            i--;
        }
}
Exemple #2
0
void DeleteItem(POINT *pt, int page)
{
    int i;
    WATCHINFO *x;
    TV_HITTESTINFO t;
    HTREEITEM titem;
    TV_ITEM item;
    VARINFO *v;

    ScreenToClient(hwndTree[page], pt);
    t.pt =  *pt;
    titem = TreeView_HitTest(hwndTree[page], &t);
    if (titem)
    {
        int c;
        item.mask = TVIF_PARAM;
        item.hItem = titem;
        TreeView_GetItem(hwndTree[page], &item);
        v = (VARINFO*)item.lParam;
        x = &watchinfo_list[page][c = v->watchindex];
        FreeTree(x->info, page);
        FreeVarInfo(x->info);
        for (i = c; i < watchinfo_count[page] - 1; i++)
        {
            watchinfo_list[page][i] = watchinfo_list[page][i + 1];
            RenumberDeleteItems(watchinfo_list[page][i].info);
        }
        watchinfo_count[page]--;
    }
}
Exemple #3
0
static void DeleteItem(POINT *pt, WATCHDATA *ptr)
{
    int i;
    WATCHINFO *x;
    TV_HITTESTINFO t;
    HTREEITEM titem;
    TV_ITEM item;
    VARINFO *v;

    ScreenToClient(ptr->hwndWatchTree, pt);
    t.pt =  *pt;
    titem = TreeView_HitTest(ptr->hwndWatchTree, &t);
    if (titem)
    {
        int c;
        item.mask = TVIF_PARAM;
        item.hItem = titem;
        TreeView_GetItem(ptr->hwndWatchTree, &item);
        v = (VARINFO*)item.lParam;
        x = &ptr->watchinfo_list[c = v->watchindex];
        FreeTree(x->info, ptr);
        FreeVarInfo(x->info);
        for (i = c; i < ptr->watchinfo_count - 1; i++)
        {
            ptr->watchinfo_list[i] = ptr->watchinfo_list[i + 1];
            RenumberDeleteItems(ptr->watchinfo_list[i].info);
        }
        ptr->watchinfo_count--;
    }
}
Exemple #4
0
void RenumberDeleteItems(VARINFO *v)
{
    while (v)
    {
        v->watchindex--;
        if (v->subtype)
            RenumberDeleteItems(v->subtype);
        v = v->link;
    }
}