Explorar el Código

removed unusable code in favour of working python version

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48067 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler hace 13 años
padre
commit
71e7206e21
Se han modificado 3 ficheros con 0 adiciones y 139 borrados
  1. 0 12
      db/db.droptable/Makefile
  2. 0 39
      db/db.droptable/db.droptable.html
  3. 0 88
      db/db.droptable/main.c

+ 0 - 12
db/db.droptable/Makefile

@@ -1,12 +0,0 @@
-
-MODULE_TOPDIR = ../..
-
-LIBES = $(DBMILIB) $(GISLIB)
-DEPENDENCIES = $(DBMIDEP) $(GISDEP)
-
-PGM = db.droptable
-
-include $(MODULE_TOPDIR)/include/Make/Module.make
-
-default: cmd
-

+ 0 - 39
db/db.droptable/db.droptable.html

@@ -1,39 +0,0 @@
-<h2>DESCRIPTION</h2>
-
-<em>db.droptable</em> removes an existing database table. 
-
-<h2>NOTE</h2>
-
-If parameters for database connection are already set with 
-<a HREF="db.connect.html">db.connect</a>, they are taken as default values and
-do not need to be spcified each time.
-
-<h2>EXAMPLE</h2>
-
-<em>Remove an existing attribute table connected through odbc</em><br>
-<div class="code"><pre>
-db.droptable table=test driver=odbc database=g60test
-</pre></div>
-
-<p>
-
-<em>Remove attribute table with if database connection is set with db.connect</em><br>
-<div class="code"><pre>
-db.droptable table=test
-</pre></div>
-
-<h2>SEE ALSO</h2>
-
-<em>
-<a HREF="db.describe.html">db.describe</a>,
-<a HREF="db.droptable.html">db.droptable</a>,
-<a HREF="db.execute.html">db.execute</a>,
-<a HREF="db.login.html">db.login</a>,
-<a HREF="db.tables.html">db.tables</a>,
-<a HREF="sql.html">GRASS SQL interface</a></em>
-
-<h2>AUTHOR</h2>
-
-Radim Blazek, ITC-Irst, Trento, Italy
-
-<p><i>Last changed: $Date$</i>

+ 0 - 88
db/db.droptable/main.c

@@ -1,88 +0,0 @@
-
-/****************************************************************************
- *
- * MODULE:       db.droptable
- * AUTHOR(S):    Radim Blazek <radim.blazek gmail.com> (original contributor)
- *               Glynn Clements <glynn gclements.plus.com>, Markus Neteler <neteler itc.it>, Stephan Holl
- * PURPOSE:      removes an existing database table
- * COPYRIGHT:    (C) 2002-2006 by the GRASS Development Team
- *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
- *
- *****************************************************************************/
-
-#include <stdlib.h>
-#include <grass/dbmi.h>
-#include <grass/gis.h>
-#include <grass/codes.h>
-#include <grass/glocale.h>
-
-
-struct
-{
-    char *driver, *database, *table;
-} parms;
-
-
-/* function prototypes */
-static void parse_command_line(int, char **);
-
-
-int main(int argc, char **argv)
-{
-    dbDriver *driver;
-    dbHandle handle;
-    dbString table;
-    int stat;
-
-    parse_command_line(argc, argv);
-
-    driver = db_start_driver(parms.driver);
-    if (driver == NULL)
-	G_fatal_error(_("Unable to start driver <%s>"), parms.driver);
-
-    db_init_handle(&handle);
-    db_set_handle(&handle, parms.database, NULL);
-
-    db_init_string(&table);
-    db_set_string(&table, parms.table);
-    stat = db_open_database(driver, &handle);
-    if (stat == DB_OK)
-	stat = db_drop_table(driver, &table);
-    db_shutdown_driver(driver);
-
-    exit(stat == DB_OK ? EXIT_SUCCESS : EXIT_FAILURE);
-}
-
-
-static void parse_command_line(int argc, char **argv)
-{
-    struct Option *driver, *database, *table;
-    struct GModule *module;
-
-    /* Initialize the GIS calls */
-    G_gisinit(argv[0]);
-
-    table = G_define_standard_option(G_OPT_DB_TABLE);
-    table->required = YES;
-
-    driver = G_define_standard_option(G_OPT_DB_DRIVER);
-    driver->options = db_list_drivers();
-
-    database = G_define_standard_option(G_OPT_DB_DATABASE);
-
-    /* Set description */
-    module = G_define_module();
-    G_add_keyword(_("database"));
-    G_add_keyword(_("SQL"));
-    module->description = _("Removes a table from database.");
-
-    if (G_parser(argc, argv))
-	exit(EXIT_FAILURE);
-
-    parms.driver = driver->answer;
-    parms.database = database->answer;
-    parms.table = table->answer;
-}