MCPcopy Create free account
hub / github.com/WheretIB/nullc / FillAutoInfo

Function FillAutoInfo

SuperCalc.cpp:1149–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1147}
1148
1149void FillAutoInfo(char* ptr, HTREEITEM parent)
1150{
1151 TVINSERTSTRUCT helpInsert;
1152 helpInsert.hParent = parent;
1153 helpInsert.hInsertAfter = TVI_LAST;
1154 helpInsert.item.mask = TVIF_TEXT;
1155 helpInsert.item.cchTextMax = 0;
1156 char name[256];
1157
1158 safeprintf(name, 256, "typeid type = %d (%s)", *(int*)ptr, codeSymbols + codeTypes[*(int*)(ptr)].offsetToName);
1159 helpInsert.item.pszText = name;
1160 TreeView_InsertItem(hVars, &helpInsert);
1161
1162 safeprintf(name, 256, "%s ref ptr = 0x%x", codeSymbols + codeTypes[*(int*)(ptr)].offsetToName, *(int*)(ptr + 4));
1163
1164 // Find parent type
1165 ExternTypeInfo *parentType = NULL;
1166 for(unsigned int i = 0; i < codeTypeCount && !parentType; i++)
1167 if(codeTypes[i].subCat == ExternTypeInfo::CAT_POINTER && codeTypes[i].subType == *(unsigned int*)(ptr))
1168 parentType = &codeTypes[i];
1169
1170 helpInsert.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_PARAM;
1171 helpInsert.item.pszText = name;
1172 helpInsert.item.cChildren = I_CHILDRENCALLBACK;
1173 helpInsert.item.lParam = tiExtra.size();
1174 tiExtra.push_back(TreeItemExtra());
1175 HTREEITEM lastItem = TreeView_InsertItem(hVars, &helpInsert);
1176 tiExtra.back() = TreeItemExtra((void*)(ptr + 4), parentType, lastItem, true);
1177}
1178
1179void FillAutoArrayInfo(char* ptr, HTREEITEM parent)
1180{

Callers 1

FillVariableInfoFunction · 0.85

Calls 4

safeprintfFunction · 0.85
TreeItemExtraClass · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected