eXtremeDB初步调试

2023年 8月 13日 18.3k 0

// Demo.cpp : Defines the entry point for the console application.//

#include "stdafx.h"

#include /*ctype.h*/#include /*stdlib.h*/#include /*stdio.h*/#include /*string.h*///#pragma comment(lib,"mcolib_shm.lib")#include "shmdb.h" /*用mcocomp生成的shmdb.h-文件*/#include #include

const char * dbname = "demoShmDb"; //DB名称const int SEGSZ = 1024 * 1024 * 10; //10M大小的数据库const uint2 PAGESIZE = 90; //页面大小

const int MAP_ADDRESS = 0x20000000; //内存地址

void SH(void) { char text[] = {"This sample demonstrates eXtremeDB shared memory interfaces"}; char text1[] = {"Copyright (c) 2001-2005 McObject LLC. All Right Reserved."};

printf("%s eXtremeDB runtime version %d.%d, build %d %s Press Enter to start",text, MCO_COMP_VER_MAJOR, MCO_COMP_VER_MINOR, MCO_COMP_BUILD_NUM,text1);

getchar();}

static int askNumber(const char *prompt) { char buf[300]; printf("%s", prompt); fgets(buf, sizeof (buf), stdin); if(isdigit(buf[0])) return atoi(buf); return -1;}

/*16进制转换成10进制*/static int hex2num(const char *s) { unsigned int a = 0;

while(*s) { int n; if( *s >= '0' && *s ='a' && *s ='A' && *s

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论