[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question on ftp_list - get *next 100?



Sender: "Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>


Scott,

> Sure it's possible...   There are two ways (that I can think of) to
> implement such a thing, and both of them have problems.
>
> Let's examine them, shall we?

ok, i see your point.

Sorry for the stupid question.  i only started looking at this stuff a
couple weeks ago, and I asked the question before fully examining and
understanding the function.   it won't happen again.

> It seems to me, that if your goal is to do it the way we're discussing as
> #1, it'd be just as easy to do that inside your code by using FTP_listraw
> and then just doing your own ALLOC/REALLOC/etc.
>
> And if you wanted to use method #2, why not just call FTP_list, get the
> size of the result, then call FTP_list again with a large enough array?

I've never done dynamic memory allocation, and based on my lack of
understanding of some of the questions asked and troubles found on
the rpg-l list, i guess I was just a little afraid of it...  heck,
varying length variables still give me fits.

I guess i'll have to bite the bullet, read the manuals, re-read those posts
and figure it out.

> Or, you could make everything easier by using FTP_listraw in conjunction
> with a file.  Simply write the entries to a file and not worry about it
> overflowing an array...   Make it so that you'll never run out of space.

the way i need to use it, that would get messy because of recursion
problems,
(re. the ftp2ifs directory copy programs you wrote a couple weeks back.)
it'd have to be a keyed file, or multiple files and/or members or something
to keep the recursion and nesting strait.  doable, but messy.

> That's the idea behind open-source, yes?   I give you my code for free,
> and you test it and expand it and improve it for me as well as everyone
> else...   as a community, we make all of our lives better :)

absolutely, as soon as i'm done, i'd be more than happy to let you or
anyone else in the group take a look at my ftp job control monstrosity, to
judge
it's worthyness, help test it (break it) and use it if they think it'd
useful to them.

it's written pretty generically, non-company or remote platform specific.
and your apis and help have saved me weeks of work already.
it's almost done, just needs to be prettied up a bit, and some
documentation
and instructions written.

thanks again,

rick

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------