[GRASS-SVN] r32577 - grass/trunk/vector/v.transform

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 6 13:06:40 EDT 2008


Author: glynn
Date: 2008-08-06 13:06:40 -0400 (Wed, 06 Aug 2008)
New Revision: 32577

Modified:
   grass/trunk/vector/v.transform/creat_trans.c
   grass/trunk/vector/v.transform/local_proto.h
Log:
Remove interactive usage


Modified: grass/trunk/vector/v.transform/creat_trans.c
===================================================================
--- grass/trunk/vector/v.transform/creat_trans.c	2008-08-06 17:01:08 UTC (rev 32576)
+++ grass/trunk/vector/v.transform/creat_trans.c	2008-08-06 17:06:40 UTC (rev 32577)
@@ -18,8 +18,6 @@
  *  create_transform_conversion () - main driver routine to prepare
  *    the transformation equation.
  *
- *  yes_no_quest(s)  -  ask the user a yes, no question.
- *     returns:   1 for yes, 0 for no
  *  Written by the GRASS Team, 02/16/90, -mh.
  */
 
@@ -31,80 +29,6 @@
 #include "trans.h"
 #include "local_proto.h"
 
-int create_transform_conversion(struct file_info *Coord, int quiet)
-{
-    if (Coord->name[0] != '\0')
-	create_transform_from_file(Coord, quiet);
-    else
-	create_transform_from_user();
-
-    return 0;
-}
-
-int create_transform_from_user(void)
-{
-    int status;
-    int n_points;
-    int ok;
-
-    init_transform_arrays();
-
-    n_points = 0;
-    ok = 0;
-    while (!ok) {
-#ifdef __MINGW32__
-	G_fatal_error("Points cannot be entered interactively on Windows");
-#else
-	/*  go to Vask page to enter the coordinates  */
-	if ((n_points = ask_transform_coor(n_points)) < 0)
-	    exit(-1);
-#endif
-
-	G_clear_screen();
-
-	status = setup_transform(n_points);
-
-
-	if (status != ALL_OK) {
-	    G_message(_(" Number of points that have been entered: %d\n"),
-		      n_points);
-	    print_transform_error(status);
-	    continue;
-	}
-
-	print_transform_resids(n_points);
-	ok = yes_no_quest
-	    ("\n\n\nIf satisfied with the residuals, enter 'y', else 'n' and <Return>:  ");
-
-    }				/*  while (!ok)   */
-
-
-    return (0);
-
-}				/*  create_transform_conversion()  */
-
-int yes_no_quest(char *s)
-{
-    char buff[200];
-
-    while (1) {
-	G_message("%s", s);
-	if (NULL == fgets(buff, 200, stdin))
-	    exit(-1);
-	switch (*buff) {
-	case 'Y':
-	case 'y':
-	    return (1);
-	case 'N':
-	case 'n':
-	    return (0);
-	default:
-	    G_message(_("Please answer yes or no"));
-	}
-    }
-}
-
-
 int create_transform_from_file(struct file_info *Coord, int quiet)
 {
     int status;

Modified: grass/trunk/vector/v.transform/local_proto.h
===================================================================
--- grass/trunk/vector/v.transform/local_proto.h	2008-08-06 17:01:08 UTC (rev 32576)
+++ grass/trunk/vector/v.transform/local_proto.h	2008-08-06 17:06:40 UTC (rev 32577)
@@ -1,13 +1,8 @@
-/* ask_trans.c */
-int ask_transform_coor(int);
 
 /* command.c */
 int set_default_options(struct file_info *, struct file_info *,
 			struct file_info *, struct command_flags *);
 /* creat_trans.c */
-int create_transform_conversion(struct file_info *, int);
-int create_transform_from_user(void);
-int yes_no_quest(char *);
 int create_transform_from_file(struct file_info *, int);
 
 /* get_coor.c */



More information about the grass-commit mailing list