MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / markGroup

Method markGroup

Engine/source/console/consoleInternal.cpp:1342–1364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1340}
1341
1342void Namespace::markGroup(const char* name, const char* usage)
1343{
1344 static U32 uid = 0;
1345 char buffer[1024];
1346 char lilBuffer[32];
1347 dStrcpy(buffer, name, 1024);
1348 dSprintf(lilBuffer, 32, "_%d", uid++);
1349 dStrcat(buffer, lilBuffer, 1024);
1350
1351 Entry *ent = createLocalEntry(StringTable->insert(buffer));
1352 trashCache();
1353
1354 if (usage != NULL)
1355 lastUsage = (char*)(ent->mUsage = usage);
1356 else
1357 ent->mUsage = lastUsage;
1358
1359 ent->mMinArgs = -1; // Make sure it explodes if somehow we run this entry.
1360 ent->mMaxArgs = -2;
1361
1362 ent->mType = Entry::GroupMarker;
1363 ent->cb.mGroupName = name;
1364}
1365
1366extern S32 executeBlock(StmtNode *block, ExprEvalState *state);
1367

Callers 1

markCommandGroupFunction · 0.80

Calls 4

dStrcpyFunction · 0.85
dSprintfFunction · 0.85
dStrcatFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected