[GRASS-SVN] r34416 - grass/trunk/general/manage/cmd
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 20 17:37:22 EST 2008
Author: glynn
Date: 2008-11-20 17:37:21 -0500 (Thu, 20 Nov 2008)
New Revision: 34416
Removed:
grass/trunk/general/manage/cmd/init.c
grass/trunk/general/manage/cmd/local_proto.h
Modified:
grass/trunk/general/manage/cmd/Makefile
grass/trunk/general/manage/cmd/copy.c
grass/trunk/general/manage/cmd/list.c
grass/trunk/general/manage/cmd/remove.c
grass/trunk/general/manage/cmd/rename.c
Log:
Clean up management utilities
Modified: grass/trunk/general/manage/cmd/Makefile
===================================================================
--- grass/trunk/general/manage/cmd/Makefile 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/Makefile 2008-11-20 22:37:21 UTC (rev 34416)
@@ -3,10 +3,10 @@
PROGRAMS = g.copy g.list g.remove g.rename
-g_copy_OBJS = copy.o init.o
-g_list_OBJS = list.o init.o
-g_remove_OBJS = remove.o init.o
-g_rename_OBJS = rename.o init.o
+g_copy_OBJS = copy.o
+g_list_OBJS = list.o
+g_remove_OBJS = remove.o
+g_rename_OBJS = rename.o
include $(MODULE_TOPDIR)/include/Make/Multi.make
Modified: grass/trunk/general/manage/cmd/copy.c
===================================================================
--- grass/trunk/general/manage/cmd/copy.c 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/copy.c 2008-11-20 22:37:21 UTC (rev 34416)
@@ -22,7 +22,6 @@
#include <string.h>
#include <grass/glocale.h>
#include <grass/list.h>
-#include "local_proto.h"
int main(int argc, char *argv[])
{
@@ -33,8 +32,10 @@
char *from, *to;
int result = EXIT_SUCCESS;
- init(argv[0]);
+ G_gisinit(argv[0]);
+ read_list(0);
+
module = G_define_module();
module->keywords = _("general, map management");
module->description =
Deleted: grass/trunk/general/manage/cmd/init.c
===================================================================
--- grass/trunk/general/manage/cmd/init.c 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/init.c 2008-11-20 22:37:21 UTC (rev 34416)
@@ -1,11 +0,0 @@
-#include <grass/list.h>
-#include "local_proto.h"
-
-int init(char *pgm)
-{
- G_gisinit(pgm);
-
- read_list(0);
-
- return 0;
-}
Modified: grass/trunk/general/manage/cmd/list.c
===================================================================
--- grass/trunk/general/manage/cmd/list.c 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/list.c 2008-11-20 22:37:21 UTC (rev 34416)
@@ -22,10 +22,11 @@
#include <unistd.h>
#include <grass/spawn.h>
#include <grass/list.h>
-#include "local_proto.h"
struct Option *element;
+int parse(const char *data_type);
+
int main(int argc, char *argv[])
{
int i, n, len;
@@ -34,8 +35,10 @@
struct Flag *full;
char *str;
- init(argv[0]);
+ G_gisinit(argv[0]);
+ read_list(0);
+
module = G_define_module();
module->keywords = _("general, map management");
module->description =
Deleted: grass/trunk/general/manage/cmd/local_proto.h
===================================================================
--- grass/trunk/general/manage/cmd/local_proto.h 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/local_proto.h 2008-11-20 22:37:21 UTC (rev 34416)
@@ -1,15 +0,0 @@
-/* copy.c */
-int main(int, char *[]);
-
-/* init.c */
-int init(char *);
-
-/* list.c */
-int main(int, char *[]);
-int parse(const char *);
-
-/* remove.c */
-int main(int, char *[]);
-
-/* rename.c */
-int main(int, char *[]);
Modified: grass/trunk/general/manage/cmd/remove.c
===================================================================
--- grass/trunk/general/manage/cmd/remove.c 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/remove.c 2008-11-20 22:37:21 UTC (rev 34416)
@@ -22,7 +22,6 @@
#include <string.h>
#include <grass/glocale.h>
#include <grass/list.h>
-#include "local_proto.h"
static int check_reclass(const char *name, const char *mapset, int force)
{
@@ -92,8 +91,10 @@
int result = EXIT_SUCCESS;
int force = 0;
- init(argv[0]);
+ G_gisinit(argv[0]);
+ read_list(0);
+
module = G_define_module();
module->keywords = _("general, map management");
module->description =
Modified: grass/trunk/general/manage/cmd/rename.c
===================================================================
--- grass/trunk/general/manage/cmd/rename.c 2008-11-20 22:31:12 UTC (rev 34415)
+++ grass/trunk/general/manage/cmd/rename.c 2008-11-20 22:37:21 UTC (rev 34416)
@@ -22,7 +22,6 @@
#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/list.h>
-#include "local_proto.h"
int main(int argc, char *argv[])
{
@@ -34,8 +33,10 @@
char *mapset, *location_path, **rmaps;
int result = EXIT_SUCCESS;
- init(argv[0]);
+ G_gisinit(argv[0]);
+ read_list(0);
+
module = G_define_module();
module->keywords = _("general, map management");
module->description =
More information about the grass-commit
mailing list