[GRASS-dev] sorting of db.tables -p output?

Hi,

I would like to get the output of
db.tables -p
sorted alphabetically. Looking at the code, I assume that it
might be best done in db_list_tables():

lib/db/dbmi_client/c_list_tabs.c

but I am getting lost there with the DB_RECV_STRING_ARRAY
macro.

thanks for helping,
Markus

Markus Neteler wrote:

I would like to get the output of
db.tables -p
sorted alphabetically. Looking at the code, I assume that it
might be best done in db_list_tables():

lib/db/dbmi_client/c_list_tabs.c

but I am getting lost there with the DB_RECV_STRING_ARRAY
macro.

Try the attached patch (untested).

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

c_list_tabs.diff (904 Bytes)

On Wed, May 09, 2007 at 04:19:08PM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> I would like to get the output of
> db.tables -p
> sorted alphabetically. Looking at the code, I assume that it
> might be best done in db_list_tables():
>
> lib/db/dbmi_client/c_list_tabs.c
>
> but I am getting lost there with the DB_RECV_STRING_ARRAY
> macro.

Try the attached patch (untested).

Content-Description: db_list_tables() sorting patch

Glynn: it works - please submit!

Thanks
Markus