Mona/アプリ質問所/過去ログ/1


Mona/アプリ質問所

過去ログ1

src/servers/pe/main.cpp

#include <sys/HashMap.h>
//#include <string>
//#include <map>

static HashMap<monapi_cmemoryinfo*>* cache;
//static std::map<std::string, monapi_cmemoryinfo*> cache;

	ret->Data = (monapi_cmemoryinfo*)cache->get((char *)(const char*)path);
	//ret->Data = cache[(const char*)path];

		cache->put((char*)(const char*)path, ret->Data);
		//cache[(const char*)path] = ret->Data;

int MonaMain(List<char*>* pekoe)
{
	if (Message::send(Message::lookupMainThread("MONITOR.BIN"), MSG_SERVER_START_OK) != 0)
	{
		printf("%s: MONITOR error\n", SVR);
		exit(1);
	}
	cache = new HashMap<monapi_cmemoryinfo*>(10);
	MessageLoop();
	delete(cache);
	return 0;
}
//sscanfテスト
int MonaMain(List<char*>* pekoe)
{
       int ai;
       int bi;
       int ci;
       int di;

       sscanf("192.168.0.1","%d.%d.%d.%d",&ai,&bi,&ci,&di);
        
       printf("1's time\n");
       printf("a=%d\n",ai);
       printf("b=%d\n",bi);
       printf("c=%d\n",ci);
       printf("d=%d\n",di);

       sscanf("192.168.000.001","%d.%d.%d.%d",&ai,&bi,&ci,&di);
       
       printf("2's time\n");
       printf("a=%d\n",ai);
       printf("b=%d\n",bi);
       printf("c=%d\n",ci);
       printf("d=%d\n",di); 
}

MENU

now: 2

リンク


最新の20件
2018-05-03 2017-09-29 2017-04-25 2017-01-10 2016-12-11 2016-10-04 2016-08-14 2016-06-05 2016-05-29 2016-04-15 2015-12-28 2013-02-25 2013-02-21 2013-02-20 2013-02-12 2013-02-11 2013-02-10
最新の20件
2010-02-01 2010-01-31 2010-01-30 2010-01-29 2010-01-16

Counter: 2764, today: 1, yesterday: 1

リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Last-modified: 2008-03-28 (金) 15:47:55 (3763d);  Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.045 sec.