Quellcode durchsuchen

main() should be in a file named main.c
Remove unused files


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32810 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements vor 16 Jahren
Ursprung
Commit
140eda37f4

display/d.linegraph/linegraph.c → display/d.linegraph/main.c


display/d.rast.arrow/arrow.c → display/d.rast.arrow/main.c


display/d.rast.num/number.c → display/d.rast.num/main.c


+ 0 - 6
general/g.mapsets/Makefile

@@ -7,12 +7,6 @@ GUI = $(GISBASE)/etc/g.mapsets.tcl
 LIBES     = $(GISLIB)
 DEPENDENCIES= $(GISDEP)
 
-CMD_OBJS = \
-	main_cmd.o \
-	dsply_path.o \
-	dsply_maps.o \
-	get_maps.o
-
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
 default: cmd $(GUI)

+ 0 - 118
general/g.mapsets/get_path.c

@@ -1,118 +0,0 @@
-#include <string.h>
-#include "local_proto.h"
-#include <stdio.h>
-#include "externs.h"
-#include <grass/gis.h>
-int get_mapset_path(void)
-{
-    static int first = 1;
-    char buf[4096];
-    char *b;
-    char name[GMAPSET_MAX];
-    int n;
-    int action;			/* defines action to be taken in set_path function */
-
-    fprintf(stdout, "Hit RETURN to keep current list, or ");
-    fprintf(stdout, "enter a new list of mapsets\n");
-    if (first) {
-	fprintf(stdout, "(enter the numbers before the mapset name, ");
-	fprintf(stdout, "or the names themselves)\n");
-	fprintf(stdout, "    (to ADD to end of list, use + . . .)\n");
-	fprintf(stdout, "    (to DELETE from list, use - . . .)\n");
-	first = 0;
-    }
-
-    nchoices = 0;
-
-    fprintf(stdout, "\nnew list> ");
-    if (!fgets(b = buf, 4096, stdin))
-	goto same;
-    while (isspace(*b))
-	b++;
-
-    switch (*b) {
-    case '+':			/* preload existing path into choice array */
-	action = ADD;
-	for (n = 0; n < ncurr_mapsets;
-	     choice[nchoices++] = curr_mapset[n++]) ;
-	b++;
-	break;
-    case '-':
-	action = DELETE;
-	b++;
-	break;
-    default:
-	action = REPLACE;
-    }
-
-    while (1) {
-	if (sscanf(b, "%s", name) != 1) {
-	    if (action == DELETE)
-		return delete_choices();
-	    return 1;
-	}
-
-	for (n = 0; n < nmapsets; n++)
-	    if (strcmp(name, mapset_name[n]) == 0) {
-		choice[nchoices++] = n;
-		goto next;
-	    }
-
-	if (scan_int(name, &n)) {
-	    if (n > 0 && n <= nmapsets) {
-		choice[nchoices++] = n - 1;
-		goto next;
-	    }
-	}
-
-	fprintf(stdout, "\n<%s> not found\n\n", name);
-	return -1;
-
-      next:
-	while (*b == ' ' || *b == '\t')
-	    b++;
-	while (*b && *b != ' ' && *b != '\t')
-	    b++;
-    }
-  same:
-    for (n = 0; b = G__mapset_name(n); n++) {
-	int i;
-
-	for (i = 0; i < nmapsets; i++)
-	    if (strcmp(b, mapset_name[i]) == 0) {
-		choice[nchoices++] = i;
-		break;
-	    }
-    }
-    return 1;
-}
-
-
-int delete_choices(void)
-{
-    int i, n;
-    int deletion;		/* map number to be deleted */
-
-    /* action is delete:  modify previous mapset list and write to choice array */
-
-    for (i = 0; i < nchoices; i++) {
-	deletion = choice[i];
-	for (n = 0; n < ncurr_mapsets; n++)
-	    if (curr_mapset[n] == deletion) {	/* delete mapset from path */
-		curr_mapset[n] = -1;
-		break;
-	    }
-	if (n == ncurr_mapsets) {
-	    fprintf(stdout, "\n<%s> not found in search list\n\n",
-		    mapset_name[deletion]);
-	    return -1;
-	}
-    }
-
-    /* prepare choice array list for final processing */
-    nchoices = 0;
-    for (n = 0; n < ncurr_mapsets; n++)
-	if (curr_mapset[n] >= 0)	/* i.e., not deleted */
-	    choice[nchoices++] = curr_mapset[n];
-    return 1;
-}

general/g.mapsets/main_cmd.c → general/g.mapsets/main.c


+ 0 - 40
general/g.mapsets/main_inter.c

@@ -1,40 +0,0 @@
-
-/****************************************************************************
- *
- * MODULE:       g.mapsets
- * AUTHOR(S):    Michael Shapiro (CERL), Greg Koerper (ManTech Environmental
- *                    Technology) (original contributors), 
- *               Markus Neteler <neteler itc.it>
- *               Glynn Clements <glynn gclements.plus.com>
- * PURPOSE:      Allow user to select new mapset path
- * COPYRIGHT:    (C) 1994-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 "externs.h"
-#include "local_proto.h"
-#include <grass/gis.h>
-int main(int argc, char **argv)
-{
-    G_gisinit(argv[0]);
-    G_clear_screen();
-    fprintf(stdout, "MAPSET SEARCH LIST UTILITY");
-    fprintf(stdout, "     LOCATION: %s    MAPSET: %s\n\n", G_location(),
-	    G_mapset());
-
-    get_available_mapsets();
-
-    do {
-	display_mapset_path(1);
-	display_available_mapsets(1);
-    }
-    while (get_mapset_path() < 0);
-
-    set_mapset_path();
-
-    return 0;
-}

+ 0 - 12
general/g.mapsets/scan_int.c

@@ -1,12 +0,0 @@
-#include "local_proto.h"
-#include <stdio.h>
-int scan_int(char *buf, int *n)
-{
-    char dummy[2];
-
-    *dummy = 0;
-    if (sscanf(buf, "%d%1s", n, dummy) != 1)
-	return 0;
-
-    return (*dummy == 0 ? 1 : 0);
-}

+ 0 - 67
general/g.mapsets/set_path.c

@@ -1,67 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-#include "externs.h"
-#include <grass/gis.h>
-
-int set_mapset_path(void)
-{
-    char command[4096];
-    int n;
-    int i;
-    int skip;
-    int any;
-    char *cur_mapset;
-
-    if (nchoices == 0)		/* they didn't choose any, exit w/out change */
-	return 0;
-
-    cur_mapset = G_mapset();
-
-    /* build first part of command string */
-    strcpy(command, "g.mapsets -p mapset=");
-    any = 0;
-
-    /*
-     * make sure current mapset is specified in the list
-     * if not add it to the head of the list
-     */
-
-    skip = 0;
-    for (n = 0; n < nchoices; n++)
-	if (strcmp(cur_mapset, mapset_name[choice[n]]) == 0) {
-	    skip = 1;
-	    break;
-	}
-    if (!skip) {
-	if (any++)
-	    strcat(command, ",");
-	strcat(command, cur_mapset);
-    }
-
-    /*
-     * output the list, removing duplicates
-     */
-    for (n = 0; n < nchoices; n++) {
-	skip = 0;
-	for (i = 0; i < n; i++)
-	    if (strcmp(mapset_name[choice[i]], mapset_name[choice[n]]) == 0) {
-		skip = 1;
-		break;
-	    }
-	if (!skip) {
-	    if (any++)
-		strcat(command, ",");
-	    strcat(command, mapset_name[choice[n]]);
-	}
-    }
-
-    fprintf(stdout, "\nMapset search list set to\n ");
-    fflush(stdout);
-    if (system(command) == 0) {
-	return (0);
-    }
-    else {
-	G_warning("call to g.mapsets failed");
-	return (-1);
-    }
-}

imagery/i.fft/fftmain.c → imagery/i.fft/main.c


imagery/i.his.rgb/h2rmain.c → imagery/i.his.rgb/main.c


imagery/i.ifft/ifftmain.c → imagery/i.ifft/main.c


imagery/i.ortho.photo/menu/menu.c → imagery/i.ortho.photo/menu/main.c


imagery/i.rgb.his/r2hmain.c → imagery/i.rgb.his/main.c


raster/r.circle/dist.c → raster/r.circle/main.c


raster/r.flow/calc.c → raster/r.flow/main.c


raster/r.null/null.c → raster/r.null/main.c


raster/r.out.png/r.out.png.c → raster/r.out.png/main.c


raster/r.out.tiff/r.out.tiff.c → raster/r.out.tiff/main.c


raster/r.support/front.c → raster/r.support/main.c


vector/v.in.ascii/in.c → vector/v.in.ascii/main.c


vector/v.out.ascii/out.c → vector/v.out.ascii/main.c