[GRASS-dev] Unused files

Glynn Clements glynn at gclements.plus.com
Tue Apr 17 12:00:06 EDT 2007


Moritz Lennert wrote:

> >>>  lib/db/dbmi_client/c_add_col.c    | db_add_column
> >>>  lib/db/dbmi_client/c_bindupdate.c | db_bind_update
> >>>  lib/db/dbmi_client/c_createdb.c   | db_create_database
> >>>  lib/db/dbmi_client/c_delete.c     | db_delete
> >>>  lib/db/dbmi_client/c_deletedb.c   | db_delete_database
> >>>  lib/db/dbmi_client/c_drop_col.c   | db_drop_column
> >>>  lib/db/dbmi_client/c_drop_index.c | db_drop_index
> >>>  lib/db/dbmi_client/c_drop_tab.c   | db_drop_table
> >>>  lib/db/dbmi_client/c_finddb.c     | db_find_database
> >>>  lib/db/dbmi_client/c_insert.c     | db_insert
> >>>  lib/db/dbmi_client/c_list_idx.c   | db_list_indexes
> >>>  lib/db/dbmi_client/c_listdb.c     | db_list_databases
> >>>  lib/db/dbmi_client/c_openinsert.c | db_open_insert_cursor
> >>>  lib/db/dbmi_client/c_openupdate.c | db_open_update_cursor
> >>>  lib/db/dbmi_client/c_update.c     | db_update
> >>>  lib/db/dbmi_client/c_version.c    | db_gversion
> >>>  lib/db/dbmi_client/printtab.c     | db_print_column_definition
> >>>  lib/db/dbmi_client/printtab.c     | db_print_table_definition
> >>>  lib/db/dbmi_driver/d_mkdir.c      | db_driver_mkdir
> >> Aren't these template functions and files to develop new drivers?
> > 
> > No; they are the actual client-side DBMI interface.
> > 
> > I was surprised to find so many of them unused.
> 
> On 16/04/07 23:19, Markus Neteler wrote:
>  > [ ... dbmi ...]
>  > I feel that DBMI was left in the middle of its development,
>  > in particular Radim was digging through and making it
>  > functional (the needed parts). I have no idea which parts
>  > can be savely abandoned.
> 
> If they have useful code in them and could be potentially
> used, why not keep them and hope than someone picks things up ? Unless 
> we decide either
> 
> - that implementing these functionalities as scripts as we are doing now 
> is better or at least just as good (e.g. the v.db.* scripts), or
> 
> - that database management should be done via relevant db client 
> programs (independent of GRASS) or db.execute.

FWIW, I wasn't looking to remove the DBMI functions; I just posted the
unabridged list of unused library functions.

BTW, I suspect that some of the unused dbmi_client functions are due
to this in db/base/Makefile:

	#not used: db.createdb db.dropdb db.databases db.droptable
	PROGRAMS = db.columns db.copy db.describe db.drivers db.execute db.select db.tables db.connect

Also, some of the dbmi_base functions might only be used by the MySQL
or SQLite drivers, which I haven't compiled.

However, I did remove the unused display and imagery functions.

The display functions would never have been used, and the imagery code
is in dire need of cleaning up.

Removing unused code from lib/imagery required 3 or 4 iterations;
every time I removed the unused functions, a new batch of functions
would become unused.

As to what's left, roughly half of the imagery library is the
I_cluster_* functions, which are only used by i.cluster. I'm wondering
whether they should be moved to their own library, or even into
i.cluster.



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




More information about the grass-dev mailing list