vszakats wrote: > > + Added hbmk2_PathMakeRelative(). The opposite of PathProc(). > Current form is not optimized and only moderately tested: > hbmk2_PathMakeRelative( "", "" ) > hbmk2_PathMakeRelative( "", "hello.prg" ) > hbmk2_PathMakeRelative( "", "proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this", "C:\this\that\proj\" ) > hbmk2_PathMakeRelative( "C:\this", "C:\this\that\proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this", "C:\that\that\proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this", "C:\that\that\proj\hello.prg", > .T. ) > hbmk2_PathMakeRelative( "D:\this", "C:\that\that\proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this\test", > "C:\this\test\that\proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this\test", > "C:\that\that\proj\hello.prg" ) > hbmk2_PathMakeRelative( "C:\this\test", > "C:\that\that\proj\hello.prg", .T. ) > hbmk2_PathMakeRelative( "D:\this\test", > "C:\that\test\that\proj\hello.prg" ) >
I have started reorienting .hbi and if possible to embed .hbi specific info in .hbp. I am convinced that single project file is the right way to go. I may be asking more questions as I know nothing about *nix systems, hope you won't mind... 1) hbmk2_PathMakeRelative( "C:\dev_projects", "C:\dev_sources\vouch\myfile.prg", .f. ) => C:\dev_sources\vouch\myfile.prg => OK hbmk2_PathMakeRelative( "C:\dev_projects", "C:\dev_sources\vouch\myfile.prg", .t. ) => ..\dev_sources\vouch\myfile.prg => OK hbmk2_PathMakeRelative( "C:/dev_projects", "C:/dev_sources/vouch/myfile.prg", .t. ) => ..\C:/dev_sources/vouch/myfile.prg => Not OK => [ expected ] C:\dev_sources\vouch\myfile.prg hbmk2_PathMakeRelative( "C:\dev_projects", "C:/dev_sources/vouch/myfile.prg", .t. ) => C:/dev_sources/vouch/myfile.prg => Not OK => [ expected ] C:\dev_sources\vouch\myfile.prg The idea is to retain path information in .hbp file as relative and in normalized form (forward slash) as: ../dev_sources/vouch/myfile.prg, even on Windows machine, and converted to OS specif path. It will solve a lot of issues. 2) Can I have its reverse function hbmk2_PathMakeAbsolute( cRootPath, cTargetFile, lForce ) hbmk2_PathMakeAbsolute( "C:\dev_projects", "../dev_sources/vouch/myfile.prg", .t. ) => C:\dev_sources\vouch\myfile.prg RootPath will always be the absolute path ( os specific ) of .hbp file. 3) Is is normal if info in .hbp is sectionized ? I mean, switches and sources separation, as with you sent the function to parse .hbp. hbIDE needs information in sectioned way, free format cannot be manipulated. Once existing .hbp will be submitted to hbIDE, it will parse its contents, sectionize, and will overwrite the existing .hbp with added .hbi specific info constructed prefixed with #. More questions may follow... ----- enjoy hbIDEing... Pritpal Bedi _a_student_of_software_analysis_&_design_ -- View this message in context: http://n2.nabble.com/SF-net-SVN-harbour-project-13763-trunk-harbour-tp4513022p4548820.html Sent from the harbour-devel mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour