| |
| Posted by Matthew in reply to J C Calvarese | PermalinkReply |
|
Matthew
Posted in reply to J C Calvarese
| It seems that STLport for DMC++ uses one of my most hated C/C++ "extensions", the
# pragma comment(lib,"stlp45dm_static.lib")
These things "make life easier", or so we're told by vendors seeking user lock-in.
I've just rebuilt my recls lib with _STLP_NO_OWN_IOSTREAMS, since it is specifically written without any use/need of the IOStreams, and it seems to work fine.
If Walter can do this for the next release, I'm pretty sure it'll solve the problem.
btw, the next version of recls, with which I intend to update phobos as soon as STLSoft 1.7.1 is done, will contain some more features. Already it can take multi-part patterns, e.g. you can ask it to search for "*.d;makefile*.*;*.c??"
I am currently working on adding FTP search functionality, using the recently beta'd InetSTL components, for the September instalment of "Positive Integration", and expect to have that rolled in as well. That'll only be available on Windows for the moment, as it uses the WinInet API. If anyone's got code/links/information for FTP UNIX, please let me know.
Future functionality may also include Win32 registry searches.
As well as the additional search contexts, I've also added functionality to the API, for getting the file-system root(s) - i.e. "/" on UNIX and, e.g., "C:\", "H:\" ... on Win32 - and for getting the path name separator, the path separator and the wildcards symbol.
public char[][] getRoots()
public char[] getPathNameSeparator()
public char[] getPathSeparator()
public char[] wildcardsAll()
The wildcards one is important as I intend to enhance the wildcard pattern matching and cease the reliance on the underlying operating system's wildcard matching at some point in the future.
There are also some utility functions for working with directories
public boolean isDirectoryEmpty(char[] dir)
public boolean isDirectoryEmpty(Entry dir)
public recls_filesize_t calcDirectorySize(char[] dir, boolean bRecurse)
public recls_filesize_t calcDirectorySize(Entry dir, boolean bRecurse)
Finally, the MethodCase() has been adjusted in line with the D methodCase().
I can't say whether these changes will get into the next release of Phobos, but they'll be ready to be incorporated very soon, and then it'll just be the case of me and Walter trying to get the other to update the makefiles.
Cheers
Matthew
"J C Calvarese" <jcc7@cox.net> wrote in message news:c8of5f$20qo$2@digitaldaemon.com...
> J C Calvarese wrote:
> > It's probably not a big deal, but I received a warning from the linker when I use std.recls (DMD 0.90 on Windows XP):
> >
> > stlp45dm_static.lib
> > Warning 2: File Not Found stlp45dm_static.lib
>
> I suspose I should mention that the program seems to execute properly. The only observed symptom is the warning message.
>
> >
> >
> > Here's some code I used:
> >
> > import std.recls; /* for Search */
> > import std.file; /* for getcwd */
> >
> > void main()
> > {
> > /* Test the current directory from std.recls against std.file's
> > getcwd. */
> >
> > Search searchBase = new Search(".", ".",
> > RECLS_FLAG.RECLS_F_DIRECTORIES);
> > foreach(Entry entry; searchBase)
> > {
> > /* I'm only expecting one entry, but I don't know a way to
> > access it without a foreach. */
> > assert(entry.DirectoryPath() == getcwd ~ "\\");
> > }
> > assert(getcwd != "");
> > printf("Test successful.\n");
> > }
> >
> >
>
>
> --
> Justin (a/k/a jcc7)
> http://jcc_7.tripod.com/d/
|