Mail Archives: djgpp/2007/05/16/11:30:50
Michelle Konzack escreveu:
> Am 2007-05-12 12:00:42, schrieb Cesar Rabak:
>> Michelle,
>>
>> Let's see what we have so far: you need a way of finding the dot
>> character in about 1000 strings, you said IIRC.
>>
>> What exactly do you mean by "split the Courier-imap folder hierarchie"?
> ------------------------- END OF REPLIED MESSAGE -------------------------
>
> In Courier-Imap, you have no real folders like
>
> ~/Maildir/
> .ML_devel/
> .djgpp/
>
> instead, each level has a full path like
>
> ~/INBOX/
> ~/INBOX.ML_devel/
> ~/INBOX.ML_devel.djgpp/
>
> So if you have a Mailprogram, you need to split the FullPath,
> where the "." DOT is the separator...
>
> My program is using under Linux GTK+ 2.8 but can run on the console
> with GtkPixbuff (framebuffer) or as fallback with ncurses.
>
> Since I have the need to run the program under DOS too, the solution
> I am searching for must work on Linux AND Dos. I think, no big deal.
>
> The problem is the routine, which create the directory tree, which
> then can be used in a GtkTreeView and in the ncurses interface.
>
> I need something like
>
> 0 /INBOX/
> 1 /INBOX.ML_devel/
> 2 /INBOX.ML_devel.djgpp/
>
OK Michelle,
I think I'm _almost_ understood what you need (or perhaps not ;-) let's see:
It seems obvious at this time that just counting the number of dots in
the strings is not what you need/want, as this is trivial in C.
So would you like to build a function in C that receiving as argument a
string like:
~/INBOX/ returns ~/INBOX/
/INBOX.ML_devel/ returns .ML_devel/
/INBOX.ML_devel.djgpp/ returns .djgpp/
Is it there near of your needs?
--
Cesar Rabak
- Raw text -