[VSDK] File extensions problems!

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jan 22 08:51:53 CST 2004


on 1/22/04 3:05 AM, Eric Forget at forgete at cafederic.com wrote:

> Hi Ruslan,
> 
> When using file path to create/open the database on Mac OS X, we must set
> the extensions that way:
> 
>   gFBL_DescriptionExt         // C version for the structure file
> 
>   gFBL_MainDataFileExtStr     // Pascal version for the 3 others!!!
>   gFBL_BlobsDataFileExtStr
>   gFBL_TmpDataFileExtStr
> 
> It took me some time to figuring out what was going on. I can imagine the
> error you've made... ;-) I've been able to make it work, but wanted to let
> you know about the problem.

Hi Eric,

Wait a little.

In the file FBL_Globals.cpp I have

#pragma mark === COMMON ====

char     gFBL_DescriptionExt[32]      = ".vdb";
char     gFBL_MainDataFileExt[32]     = ".dat";
char     gFBL_TmpDataFileExt[32]      = ".ind";
char     gFBL_BlobsDataFileExt[32]    = ".blb";


#pragma mark === MacOS ====

#ifdef FBL_MAC

uchar    gFBL_DescriptionExtStr[32]      = "\p.vdb";
uchar    gFBL_MainDataFileExtStr[32]     = "\p.dat";
uchar    gFBL_TmpDataFileExtStr[32]      = "\p.ind";
uchar    gFBL_BlobsDataFileExtStr[32]    = "\p.blb";

#endif



As you see xxxxExt is the C string
           xxxxExtStr is the Pascal string


You should provide the full set.

For example in V4RB I have next code

void ValentinaSetExtensions( REALstring Desc, REALstring Dat, REALstring
Blb, REALstring Ind )
{
    V4RB_FUNC_START( "ValentinaSetExtensions" );

    strcpy( gFBL_DescriptionExt + 1        , Desc->CString() );
    strcpy( gFBL_MainDataFileExt + 1    , Dat->CString() );
    strcpy( gFBL_BlobsDataFileExt + 1    , Blb->CString() );
    strcpy( gFBL_TmpDataFileExt + 1         , Ind->CString() );

#ifdef FBL_MAC
    FBL_c2pstrcpy( gFBL_DescriptionExt, gFBL_DescriptionExtStr );
    FBL_c2pstrcpy( gFBL_MainDataFileExt, gFBL_MainDataFileExtStr );
    FBL_c2pstrcpy( gFBL_BlobsDataFileExt, gFBL_BlobsDataFileExtStr );
    FBL_c2pstrcpy( gFBL_TmpDataFileExt, gFBL_TmpDataFileExtStr );
#endif
    
    V4RB_FUNC_DONE;
}




-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list