Re: [AD] rename path functions?

[ Thread Index | Date Index | More Archives ]

On Sun, 2009-05-10 at 11:27 +1000, Peter Wang wrote:

>         * al_path_num_components al_get_path_num_components (*)

I just don't like abbreviating "number_of_" with "num_", arbitrary
things like that make the names hard to remember (I wouldn't know of any
other library which has this particular abbreviation in its API) - but
as we use it at other places this is indeed the most consistent name for

> al_path_create_dir() was always unclear to me, like it would call
> mkdir() or something.  Maybe one of these:
>         * al_path_create_dir al_create_path_for_dir
>         * al_path_create_dir al_create_path_no_filename
> The _tail functions might not be worth keeping.  Originally I imagined
> an ALLEGRO_PATH to be just an array of strings separated by the
> directory separator.  The tail of an ALLEGRO_PATH would be the last part
> before the final slash, i.e. the filename.  Thomas separated the
> filename from the directory components and introduced negative indices
> into the functions that take them, so I think the "tail" functions
> aren't as useful as they might have been.

What is the reason for having the filename separate? I always found it
confusing and it's the only reason the "_dir" version is required
(originally, you had to append a '/' to the path before passing it to
al_path_create, but that was a bit ridiculous as appending to a string
is all but trivial with C strings).

Elias Pschernig <elias@xxxxxxxxxx>

Mail converted by MHonArc 2.6.19+