extensions can now be built for multiple engines, and will autoload from auto.X.Y folders
3 * =============================================================================
5 * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #include "sourcemod.h"
33 #include "sourcemm_api.h"
34 #include "sm_stringutil.h"
35 #include "HandleSys.h"
36 #include <KeyValues.h>
38 HandleType_t g_KeyValueType;
43 CStack<KeyValues *> pCurRoot;
46 class KeyValueNatives :
48 public IHandleTypeDispatch
51 void OnSourceModAllInitialized()
53 g_KeyValueType = g_HandleSys.CreateType("KeyValues", this, 0, NULL, NULL, g_pCoreIdent, NULL);
55 void OnSourceModShutdown()
57 g_HandleSys.RemoveType(g_KeyValueType, g_pCoreIdent);
60 void OnHandleDestroy(HandleType_t type, void *object)
62 KeyValueStack *pStk = reinterpret_cast<KeyValueStack *>(object);
63 pStk->pBase->deleteThis();
68 KeyValues *SourceModBase::ReadKeyValuesHandle(Handle_t hndl, HandleError *err, bool root)
75 sec.pIdentity = g_pCoreIdent;
77 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
89 *err = HandleError_None;
92 return (root) ? pStk->pBase : pStk->pCurRoot.front();
95 static cell_t smn_KvSetString(IPluginContext *pCtx, const cell_t *params)
97 Handle_t hndl = static_cast<Handle_t>(params[1]);
103 sec.pIdentity = g_pCoreIdent;
105 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
108 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
112 pCtx->LocalToStringNULL(params[2], &key);
113 pCtx->LocalToString(params[3], &value);
115 pStk->pCurRoot.front()->SetString(key, value);
120 static cell_t smn_KvSetNum(IPluginContext *pCtx, const cell_t *params)
122 Handle_t hndl = static_cast<Handle_t>(params[1]);
128 sec.pIdentity = g_pCoreIdent;
130 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
133 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
137 pCtx->LocalToStringNULL(params[2], &key);
139 pStk->pCurRoot.front()->SetInt(key, params[3]);
144 static cell_t smn_KvSetUInt64(IPluginContext *pCtx, const cell_t *params)
146 Handle_t hndl = static_cast<Handle_t>(params[1]);
152 sec.pIdentity = g_pCoreIdent;
154 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
157 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
163 pCtx->LocalToStringNULL(params[2], &key);
164 pCtx->LocalToPhysAddr(params[3], &addr);
166 value = static_cast<uint64>(*addr);
167 pStk->pCurRoot.front()->SetUint64(key, value);
172 static cell_t smn_KvSetFloat(IPluginContext *pCtx, const cell_t *params)
174 Handle_t hndl = static_cast<Handle_t>(params[1]);
180 sec.pIdentity = g_pCoreIdent;
182 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
185 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
189 pCtx->LocalToStringNULL(params[2], &key);
191 pStk->pCurRoot.front()->SetFloat(key, sp_ctof(params[3]));
196 static cell_t smn_KvSetColor(IPluginContext *pCtx, const cell_t *params)
198 Handle_t hndl = static_cast<Handle_t>(params[1]);
204 sec.pIdentity = g_pCoreIdent;
206 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
209 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
213 pCtx->LocalToStringNULL(params[2], &key);
215 Color color(params[3], params[4], params[5], params[6]);
216 pStk->pCurRoot.front()->SetColor(key, color);
221 static cell_t smn_KvGetString(IPluginContext *pCtx, const cell_t *params)
223 Handle_t hndl = static_cast<Handle_t>(params[1]);
229 sec.pIdentity = g_pCoreIdent;
231 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
234 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
238 char *key, *defvalue;
239 pCtx->LocalToStringNULL(params[2], &key);
240 pCtx->LocalToString(params[5], &defvalue);
242 value = pStk->pCurRoot.front()->GetString(key, defvalue);
243 pCtx->StringToLocalUTF8(params[3], params[4], value, NULL);
248 static cell_t smn_KvGetNum(IPluginContext *pCtx, const cell_t *params)
250 Handle_t hndl = static_cast<Handle_t>(params[1]);
256 sec.pIdentity = g_pCoreIdent;
258 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
261 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
266 pCtx->LocalToStringNULL(params[2], &key);
268 value = pStk->pCurRoot.front()->GetInt(key, params[3]);
273 static cell_t smn_KvGetFloat(IPluginContext *pCtx, const cell_t *params)
275 Handle_t hndl = static_cast<Handle_t>(params[1]);
281 sec.pIdentity = g_pCoreIdent;
283 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
286 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
291 pCtx->LocalToStringNULL(params[2], &key);
293 value = pStk->pCurRoot.front()->GetFloat(key, sp_ctof(params[3]));
295 return sp_ftoc(value);
298 static cell_t smn_KvGetColor(IPluginContext *pCtx, const cell_t *params)
300 Handle_t hndl = static_cast<Handle_t>(params[1]);
306 sec.pIdentity = g_pCoreIdent;
308 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
311 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
316 cell_t *r, *g, *b, *a;
317 pCtx->LocalToStringNULL(params[2], &key);
318 pCtx->LocalToPhysAddr(params[3], &r);
319 pCtx->LocalToPhysAddr(params[4], &g);
320 pCtx->LocalToPhysAddr(params[5], &b);
321 pCtx->LocalToPhysAddr(params[6], &a);
323 color = pStk->pCurRoot.front()->GetColor(key);
332 static cell_t smn_KvGetUInt64(IPluginContext *pCtx, const cell_t *params)
334 Handle_t hndl = static_cast<Handle_t>(params[1]);
340 sec.pIdentity = g_pCoreIdent;
342 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
345 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
349 cell_t *addr, *defvalue;
351 pCtx->LocalToStringNULL(params[2], &key);
352 pCtx->LocalToPhysAddr(params[3], &addr);
353 pCtx->LocalToPhysAddr(params[4], &defvalue);
355 value = pStk->pCurRoot.front()->GetUint64(key, static_cast<uint64>(*defvalue));
356 *reinterpret_cast<uint64 *>(addr) = value;
361 static cell_t smn_CreateKeyValues(IPluginContext *pCtx, const cell_t *params)
364 char *name, *firstkey, *firstvalue;
367 pCtx->LocalToString(params[1], &name);
368 pCtx->LocalToString(params[2], &firstkey);
369 pCtx->LocalToString(params[3], &firstvalue);
371 is_empty = (firstkey[0] == '\0');
372 pStk = new KeyValueStack;
373 pStk->pBase = new KeyValues(name, is_empty ? NULL : firstkey, (is_empty||(firstvalue[0]=='\0')) ? NULL : firstvalue);
374 pStk->pCurRoot.push(pStk->pBase);
376 return g_HandleSys.CreateHandle(g_KeyValueType, pStk, pCtx->GetIdentity(), g_pCoreIdent, NULL);
379 static cell_t smn_KvJumpToKey(IPluginContext *pCtx, const cell_t *params)
381 Handle_t hndl = static_cast<Handle_t>(params[1]);
388 sec.pIdentity = g_pCoreIdent;
390 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
393 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
396 pCtx->LocalToString(params[2], &name);
398 KeyValues *pSubKey = pStk->pCurRoot.front();
399 pSubKey = pSubKey->FindKey(name, (params[3]) ? true : false);
404 pStk->pCurRoot.push(pSubKey);
409 static cell_t smn_KvGotoFirstSubKey(IPluginContext *pCtx, const cell_t *params)
411 Handle_t hndl = static_cast<Handle_t>(params[1]);
417 sec.pIdentity = g_pCoreIdent;
419 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
422 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
425 KeyValues *pSubKey = pStk->pCurRoot.front();
426 KeyValues *pFirstSubKey;
429 pFirstSubKey = pSubKey->GetFirstTrueSubKey();
431 pFirstSubKey = pSubKey->GetFirstSubKey();
438 pStk->pCurRoot.push(pFirstSubKey);
443 static cell_t smn_KvGotoNextKey(IPluginContext *pCtx, const cell_t *params)
445 Handle_t hndl = static_cast<Handle_t>(params[1]);
451 sec.pIdentity = g_pCoreIdent;
453 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
456 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
459 KeyValues *pSubKey = pStk->pCurRoot.front();
462 pSubKey = pSubKey->GetNextTrueSubKey();
464 pSubKey = pSubKey->GetNextKey();
470 pStk->pCurRoot.pop();
471 pStk->pCurRoot.push(pSubKey);
476 static cell_t smn_KvJumpNextSubKey(IPluginContext *pCtx, const cell_t *params)
478 Handle_t hndl = static_cast<Handle_t>(params[1]);
484 sec.pIdentity = g_pCoreIdent;
486 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
489 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
492 KeyValues *pSubKey = pStk->pCurRoot.front();
493 KeyValues *pNextKey = pSubKey->GetNextKey();
498 pStk->pCurRoot.push(pNextKey);
503 static cell_t smn_KvGoBack(IPluginContext *pCtx, const cell_t *params)
505 Handle_t hndl = static_cast<Handle_t>(params[1]);
511 sec.pIdentity = g_pCoreIdent;
513 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
516 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
519 if (pStk->pCurRoot.size() == 1)
523 pStk->pCurRoot.pop();
528 static cell_t smn_KvRewind(IPluginContext *pCtx, const cell_t *params)
530 Handle_t hndl = static_cast<Handle_t>(params[1]);
536 sec.pIdentity = g_pCoreIdent;
538 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
541 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
544 while (pStk->pCurRoot.size() > 1)
546 pStk->pCurRoot.pop();
552 static cell_t smn_KvGetSectionName(IPluginContext *pCtx, const cell_t *params)
554 Handle_t hndl = static_cast<Handle_t>(params[1]);
560 sec.pIdentity = g_pCoreIdent;
562 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
565 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
568 KeyValues *pSection = pStk->pCurRoot.front();
569 const char *name = pSection->GetName();
574 pCtx->StringToLocalUTF8(params[2], params[3], name, NULL);
579 static cell_t smn_KvSetSectionName(IPluginContext *pCtx, const cell_t *params)
581 Handle_t hndl = static_cast<Handle_t>(params[1]);
588 sec.pIdentity = g_pCoreIdent;
590 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
593 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
596 pCtx->LocalToString(params[2], &name);
598 KeyValues *pSection = pStk->pCurRoot.front();
599 pSection->SetName(name);
604 static cell_t smn_KvGetDataType(IPluginContext *pCtx, const cell_t *params)
606 Handle_t hndl = static_cast<Handle_t>(params[1]);
613 sec.pIdentity = g_pCoreIdent;
615 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
618 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
621 pCtx->LocalToString(params[2], &name);
623 return pStk->pCurRoot.front()->GetDataType(name);
626 static cell_t smn_KeyValuesToFile(IPluginContext *pCtx, const cell_t *params)
628 Handle_t hndl = static_cast<Handle_t>(params[1]);
635 sec.pIdentity = g_pCoreIdent;
637 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
640 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
643 pCtx->LocalToString(params[2], &path);
645 char realpath[PLATFORM_MAX_PATH];
646 g_SourceMod.BuildPath(Path_Game, realpath, sizeof(realpath), "%s", path);
648 return pStk->pCurRoot.front()->SaveToFile(basefilesystem, realpath);
651 static cell_t smn_FileToKeyValues(IPluginContext *pCtx, const cell_t *params)
653 Handle_t hndl = static_cast<Handle_t>(params[1]);
660 sec.pIdentity = g_pCoreIdent;
662 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
665 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
668 pCtx->LocalToString(params[2], &path);
670 char realpath[PLATFORM_MAX_PATH];
671 g_SourceMod.BuildPath(Path_Game, realpath, sizeof(realpath), "%s", path);
673 return pStk->pCurRoot.front()->LoadFromFile(basefilesystem, realpath);
676 static cell_t smn_KvSetEscapeSequences(IPluginContext *pCtx, const cell_t *params)
678 Handle_t hndl = static_cast<Handle_t>(params[1]);
684 sec.pIdentity = g_pCoreIdent;
686 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
689 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
692 pStk->pCurRoot.front()->UsesEscapeSequences(params[2] ? true : false);
697 static cell_t smn_KvNodesInStack(IPluginContext *pCtx, const cell_t *params)
699 Handle_t hndl = static_cast<Handle_t>(params[1]);
705 sec.pIdentity = g_pCoreIdent;
707 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
710 return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
713 return pStk->pCurRoot.size() - 1;
716 static cell_t smn_KvDeleteThis(IPluginContext *pContext, const cell_t *params)
718 Handle_t hndl = static_cast<Handle_t>(params[1]);
724 sec.pIdentity = g_pCoreIdent;
726 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
729 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
732 if (pStk->pCurRoot.size() < 2)
737 KeyValues *pValues = pStk->pCurRoot.front();
738 pStk->pCurRoot.pop();
739 KeyValues *pRoot = pStk->pCurRoot.front();
741 /* We have to manually verify this since Valve sucks
742 * :TODO: make our own KeyValues.h file and make
743 * the sub stuff private so we can do this ourselves!
745 KeyValues *sub = pRoot->GetFirstSubKey();
750 KeyValues *pNext = pValues->GetNextKey();
751 pRoot->RemoveSubKey(pValues);
752 pValues->deleteThis();
755 pStk->pCurRoot.push(pNext);
761 sub = sub->GetNextKey();
764 /* Push this back on :( */
765 pStk->pCurRoot.push(pValues);
770 static cell_t smn_KvDeleteKey(IPluginContext *pContext, const cell_t *params)
772 Handle_t hndl = static_cast<Handle_t>(params[1]);
778 sec.pIdentity = g_pCoreIdent;
780 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
783 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
786 if (pStk->pCurRoot.size() < 2)
792 pContext->LocalToString(params[2], &keyName);
794 KeyValues *pRoot = pStk->pCurRoot.front();
795 KeyValues *pValues = pRoot->FindKey(keyName);
801 pRoot->RemoveSubKey(pValues);
802 pValues->deleteThis();
807 static cell_t smn_KvSavePosition(IPluginContext *pContext, const cell_t *params)
809 Handle_t hndl = static_cast<Handle_t>(params[1]);
815 sec.pIdentity = g_pCoreIdent;
817 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
820 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
823 if (pStk->pCurRoot.size() < 2)
828 KeyValues *pValues = pStk->pCurRoot.front();
829 pStk->pCurRoot.push(pValues);
834 static cell_t smn_CopySubkeys(IPluginContext *pContext, const cell_t *params)
836 Handle_t hndl_copied = static_cast<Handle_t>(params[1]);
837 Handle_t hndl_parent = static_cast<Handle_t>(params[2]);
840 KeyValueStack *pStk_copied, *pStk_parent;
843 sec.pIdentity = g_pCoreIdent;
845 if ((herr=g_HandleSys.ReadHandle(hndl_copied, g_KeyValueType, &sec, (void **)&pStk_copied))
848 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl_copied, herr);
850 if ((herr=g_HandleSys.ReadHandle(hndl_parent, g_KeyValueType, &sec, (void **)&pStk_parent))
853 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl_parent, herr);
856 pStk_copied->pCurRoot.front()->CopySubkeys(pStk_parent->pCurRoot.front());
861 static cell_t smn_GetNameSymbol(IPluginContext *pContext, const cell_t *params)
863 Handle_t hndl = static_cast<Handle_t>(params[1]);
871 sec.pIdentity = g_pCoreIdent;
873 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
876 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
879 if (pStk->pCurRoot.size() < 2)
884 pContext->LocalToString(params[2], &key);
886 KeyValues *pKv = pStk->pCurRoot.front()->FindKey(key);
891 pContext->LocalToPhysAddr(params[3], &val);
892 *val = pKv->GetNameSymbol();
897 static cell_t smn_FindKeyById(IPluginContext *pContext, const cell_t *params)
899 Handle_t hndl = static_cast<Handle_t>(params[1]);
905 sec.pIdentity = g_pCoreIdent;
907 if ((herr=g_HandleSys.ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk))
910 return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
913 KeyValues *pKv = pStk->pCurRoot.front()->FindKey(params[2]);
919 pContext->StringToLocalUTF8(params[3], params[4], pKv->GetName(), NULL);
924 static KeyValueNatives s_KeyValueNatives;
926 REGISTER_NATIVES(keyvaluenatives)
928 {"KvSetString", smn_KvSetString},
929 {"KvSetNum", smn_KvSetNum},
930 {"KvSetUInt64", smn_KvSetUInt64},
931 {"KvSetFloat", smn_KvSetFloat},
932 {"KvSetColor", smn_KvSetColor},
933 {"KvGetString", smn_KvGetString},
934 {"KvGetNum", smn_KvGetNum},
935 {"KvGetFloat", smn_KvGetFloat},
936 {"KvGetColor", smn_KvGetColor},
937 {"KvGetUInt64", smn_KvGetUInt64},
938 {"CreateKeyValues", smn_CreateKeyValues},
939 {"KvJumpToKey", smn_KvJumpToKey},
940 {"KvGotoNextKey", smn_KvGotoNextKey},
941 {"KvJumpFirstSubKey", smn_KvGotoFirstSubKey}, /* BACKWARDS COMPAT SHIM */
942 {"KvGotoFirstSubKey", smn_KvGotoFirstSubKey},
943 {"KvJumpNextSubKey", smn_KvJumpNextSubKey}, /* BACKWARDS COMPAT SHIM */
944 {"KvGoBack", smn_KvGoBack},
945 {"KvRewind", smn_KvRewind},
946 {"KvGetSectionName", smn_KvGetSectionName},
947 {"KvSetSectionName", smn_KvSetSectionName},
948 {"KvGetDataType", smn_KvGetDataType},
949 {"KeyValuesToFile", smn_KeyValuesToFile},
950 {"FileToKeyValues", smn_FileToKeyValues},
951 {"KvSetEscapeSequences", smn_KvSetEscapeSequences},
952 {"KvDeleteThis", smn_KvDeleteThis},
953 {"KvDeleteKey", smn_KvDeleteKey},
954 {"KvNodesInStack", smn_KvNodesInStack},
955 {"KvSavePosition", smn_KvSavePosition},
956 {"KvCopySubkeys", smn_CopySubkeys},
957 {"KvFindKeyById", smn_FindKeyById},
958 {"KvGetNameSymbol", smn_GetNameSymbol},