* découpage

This commit is contained in:
glenux 2004-02-21 13:00:33 +00:00 committed by Glenn Y. Rolland
parent 66f6999b12
commit b6c68da039

47
src/nzg_ids.c Normal file
View file

@ -0,0 +1,47 @@
#ifndef _NZG_IDS
#define _NZG_IDS 1
#include "libnazgul.h"
#include "nzg_ids.h"
int msgSpaceIdIntern(msgSpaceId dest,const msgSpaceId src ){
if (strlen(src)>MSGSPACE_ID_LEN){
return -1;
}
/* sprintf(resNzgId,"/tmp/.nzg-%s",(char *)spaceId); */
#ifdef _NZG_REALFILEID
sprintf(dest,"/tmp/nzgSpace%s",(char *)src);
#else
sprintf(dest,"/nzgSpace%s",(char *)src);
#endif
return 0;
}
int msgPoolDataIdIntern(msgSpaceId dest,const msgSpaceId src ){
if (strlen(src)>MSGSPACE_ID_LEN){
return -1;
}
/* sprintf(resNzgId,"/tmp/.nzg-%s",(char *)spaceId); */
#ifdef _NZG_REALFILEID
sprintf(dest,"/tmp/nzgSpacePoolData%s",(char *)src);
#else
sprintf(dest,"/nzgSpacePoolData%s",(char *)src);
#endif
return 0;
}
int msgSpacePoolId2nzgPoolId(msgSpacePoolId dest,msgSpacePoolId src, int num){
if (strlen(src)>MSGSPACE_ID_LEN){
return -1;
}
#ifdef _NZG_REALFILEID
sprintf(dest,"/tmp/nzgSpacePool%s%d",(char *)src,num);
#else
sprintf(dest,"/nzgSpacePool%s%d",(char *)src,num);
#endif
return 0;
}
#endif