2018-03-12 07:01:29 +00:00
|
|
|
|
#include "tvm.h"
|
|
|
|
|
#include "tmain.h"
|
|
|
|
|
|
|
|
|
|
#define TBL_USER_INFO 20
|
|
|
|
|
|
2018-06-08 08:58:44 +00:00
|
|
|
|
int main(int argc, char *argv[])
|
2018-03-12 07:01:29 +00:00
|
|
|
|
{
|
|
|
|
|
SATvm *pstSavm = (SATvm *)pGetSATvm();
|
|
|
|
|
|
|
|
|
|
/* 初始化TBL_USER_INFO表,每张表都需要初始化一次, 对于表重建后,需要重新初始化一次。*/
|
|
|
|
|
if(RC_SUCC != lInitSATvm(pstSavm, TBL_USER_INFO))
|
|
|
|
|
{
|
2018-06-08 08:58:44 +00:00
|
|
|
|
fprintf(stderr, "init failed, err:(%d)(%s)\n", pstSavm->m_lErrno,
|
|
|
|
|
sGetTError(pstSavm->m_lErrno));
|
2018-03-12 07:01:29 +00:00
|
|
|
|
return RC_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(RC_SUCC != lTruncate(pstSavm, TBL_USER_INFO))
|
|
|
|
|
{
|
2018-06-08 01:59:03 +00:00
|
|
|
|
fprintf(stderr, "Truncate error:(%u)(%s)\n", pstSavm->m_lErrno,
|
2018-03-12 07:01:29 +00:00
|
|
|
|
sGetTError(pstSavm->m_lErrno));
|
|
|
|
|
return RC_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return RC_SUCC;
|
|
|
|
|
}
|