[GRASS-SVN] r32589 - in grass/trunk/imagery: i.cca i.class i.cluster i.fft i.gensig i.group i.ifft i.maxlik i.ortho.photo/photo.rectify i.pca i.rectify i.smap/bouman i.smap/shapiro i.zc

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 6 18:07:55 EDT 2008


Author: neteler
Date: 2008-08-06 18:07:54 -0400 (Wed, 06 Aug 2008)
New Revision: 32589

Modified:
   grass/trunk/imagery/i.cca/main.c
   grass/trunk/imagery/i.class/add_point.c
   grass/trunk/imagery/i.class/complete_reg.c
   grass/trunk/imagery/i.class/readbands.c
   grass/trunk/imagery/i.class/signature.c
   grass/trunk/imagery/i.cluster/checkpt.c
   grass/trunk/imagery/i.cluster/main.c
   grass/trunk/imagery/i.fft/fftmain.c
   grass/trunk/imagery/i.gensig/get_train.c
   grass/trunk/imagery/i.gensig/openfiles.c
   grass/trunk/imagery/i.group/main.c
   grass/trunk/imagery/i.ifft/ifftmain.c
   grass/trunk/imagery/i.ifft/orig_wind.c
   grass/trunk/imagery/i.maxlik/invert.c
   grass/trunk/imagery/i.maxlik/open.c
   grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c
   grass/trunk/imagery/i.pca/main.c
   grass/trunk/imagery/i.rectify/main.c
   grass/trunk/imagery/i.smap/bouman/model.c
   grass/trunk/imagery/i.smap/shapiro/openfiles.c
   grass/trunk/imagery/i.smap/shapiro/read_sig.c
   grass/trunk/imagery/i.zc/main.c
Log:
fixed unlucky formatted messages (thanks to Glynn)

Modified: grass/trunk/imagery/i.cca/main.c
===================================================================
--- grass/trunk/imagery/i.cca/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.cca/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -142,8 +142,7 @@
     /* check the number of input bands */
     bands = refs.nfiles;
     if (bands > MX - 1)
-	G_fatal_error(_
-		      ("Subgroup too large.  Maximum number of bands is %d\n."),
+	G_fatal_error(_("Subgroup too large.  Maximum number of bands is %d\n."),
 		      MX - 1);
 
     /*

Modified: grass/trunk/imagery/i.class/add_point.c
===================================================================
--- grass/trunk/imagery/i.class/add_point.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.class/add_point.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -19,8 +19,7 @@
 	return (1);
 
     if (Region.npoints >= MAX_VERTEX) {
-	G_warning(_
-		  ("Can't mark another point.  Only %d points allowed.  Sorry."),
+	G_warning(_("Can't mark another point.  Only %d points allowed.  Sorry."),
 		  MAX_VERTEX);
 	return (0);
     }

Modified: grass/trunk/imagery/i.class/complete_reg.c
===================================================================
--- grass/trunk/imagery/i.class/complete_reg.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.class/complete_reg.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -9,8 +9,7 @@
 int complete_region(void)
 {
     if (Region.npoints < 3)
-	G_warning(_
-		  ("Too few points for region.  Must have at least 3 points."));
+	G_warning(_("Too few points for region.  Must have at least 3 points."));
     else if (Region.area.completed)
 	G_warning(_("Area already completed."));
     else {

Modified: grass/trunk/imagery/i.class/readbands.c
===================================================================
--- grass/trunk/imagery/i.class/readbands.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.class/readbands.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -9,8 +9,7 @@
 
     for (i = 0; i < nbands; i++)
 	if (G_get_map_row_nomask(Bandfd[i], Bandbuf[i], cur) < 0)
-	    G_fatal_error(_
-			  ("Error reading raster map in function readbands."));
+	    G_fatal_error(_("Error reading raster map in function readbands."));
 
     return 0;
 }

Modified: grass/trunk/imagery/i.class/signature.c
===================================================================
--- grass/trunk/imagery/i.class/signature.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.class/signature.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -47,14 +47,12 @@
 	(Band_sum = (float *)G_calloc(nbands, sizeof(float))) == NULL ||
 	(Band_product = (float **)G_calloc(nbands, sizeof(float *))) == NULL
 	|| (Band_histo = (int **)G_calloc(nbands, sizeof(int *))) == NULL)
-	G_fatal_error(_
-		      ("Unable to allocate space for signature statistics."));
+	G_fatal_error(_("Unable to allocate space for signature statistics."));
     for (i = 0; i < nbands; i++) {
 	if ((Band_product[i] =
 	     (float *)G_calloc(nbands, sizeof(float))) == NULL ||
 	    (Band_histo[i] = (int *)G_calloc(MAX_CATS, sizeof(int))) == NULL)
-	    G_fatal_error(_
-			  ("Unable to allocate space for signature statistics."));
+	    G_fatal_error(_("Unable to allocate space for signature statistics."));
     }
 
     return 0;
@@ -112,8 +110,7 @@
 
 	y = P[i].y;
 	if (y != P[i - 1].y) {
-	    G_warning(_
-		      ("prepare_signature: scan line %d has odd number of points."),
+	    G_warning(_("prepare_signature: scan line %d has odd number of points."),
 		      (i + 1) / 2);
 	    return (0);
 	}
@@ -278,8 +275,7 @@
 	if ((fd = G_open_cell_new(MASK)) < 0)
 	    G_fatal_error(_("Unable to open the cell map MASK."));
 	if ((buffer = G_allocate_cell_buf()) == NULL)
-	    G_fatal_error(_
-			  ("Unable to allocate the cell buffer in display_signature()."));
+	    G_fatal_error(_("Unable to allocate the cell buffer in display_signature()."));
 	nrows = G_window_rows();
 	ncols = G_window_cols();
 

Modified: grass/trunk/imagery/i.cluster/checkpt.c
===================================================================
--- grass/trunk/imagery/i.cluster/checkpt.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.cluster/checkpt.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -37,8 +37,7 @@
 	if (verbose) {
 	    cur_time = time(NULL);
 	    elapsed_time = cur_time - start_time;
-	    G_message(_
-		      ("Iteration %d: %% Convergence: %.2f (%s elapsed, %s left)"),
+	    G_message(_("Iteration %d: %% Convergence: %.2f (%s elapsed, %s left)"),
 		      X->iteration, (double)X->percent_stable,
 		      print_time(elapsed_time),
 		      print_time(iters * elapsed_time / (X->iteration + 1) -

Modified: grass/trunk/imagery/i.cluster/main.c
===================================================================
--- grass/trunk/imagery/i.cluster/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.cluster/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -310,8 +310,7 @@
 	    for (n = 0; n < ref.nfiles; n++)
 		x[n] = cell[n][col];
 	    if (I_cluster_point(&C, x) < 0)
-		G_fatal_error(_
-			      ("Out of Memory. Please run again and choose a smaller sample size"));
+		G_fatal_error(_("Out of Memory. Please run again and choose a smaller sample size"));
 	}
     }
     if (verbose)

Modified: grass/trunk/imagery/i.fft/fftmain.c
===================================================================
--- grass/trunk/imagery/i.fft/fftmain.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.fft/fftmain.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -160,8 +160,7 @@
     data[0] = (double *)G_malloc((rows * cols) * sizeof(double));
     data[1] = (double *)G_malloc((rows * cols) * sizeof(double));
     if (data[0] == NULL || data[1] == NULL)
-	G_fatal_error(_
-		      ("Insufficent memory for allocation of data structure"));
+	G_fatal_error(_("Insufficent memory for allocation of data structure"));
 
     /* Initialize real & complex components to zero */
     G_message(_("Initializing data...\n"));

Modified: grass/trunk/imagery/i.gensig/get_train.c
===================================================================
--- grass/trunk/imagery/i.gensig/get_train.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.gensig/get_train.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -50,8 +50,7 @@
 	    n++;
 	}
 	else
-	    G_warning(_
-		      ("Training class [%d] only has one cell - this class will be ignored."),
+	    G_warning(_("Training class [%d] only has one cell - this class will be ignored."),
 		      cat);
     }
 

Modified: grass/trunk/imagery/i.gensig/openfiles.c
===================================================================
--- grass/trunk/imagery/i.gensig/openfiles.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.gensig/openfiles.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -13,8 +13,7 @@
 
 
     if (!I_get_subgroup_ref(parms->group, parms->subgroup, &Ref))
-	G_fatal_error(_
-		      ("Unable to read REF file for subgroup [%s] in group [%s]."),
+	G_fatal_error(_("Unable to read REF file for subgroup [%s] in group [%s]."),
 		      parms->subgroup, parms->group);
 
     if (Ref.nfiles <= 0)

Modified: grass/trunk/imagery/i.group/main.c
===================================================================
--- grass/trunk/imagery/i.group/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.group/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -121,8 +121,7 @@
 	/* Remove files from Group */
 
 	if (I_find_group(group) == 0) {
-	    G_fatal_error(_
-			  ("Specified group does not exist in current mapset"));
+	    G_fatal_error(_("Specified group does not exist in current mapset"));
 	}
 
 	if (sgrp->answer) {
@@ -143,8 +142,7 @@
 	    struct Ref ref;
 
 	    if (I_find_group(group) == 0) {
-		G_fatal_error(_
-			      ("Specified group does not exist in current mapset"));
+		G_fatal_error(_("Specified group does not exist in current mapset"));
 	    }
 
 	    if (sgrp->answer) {
@@ -167,8 +165,7 @@
 	else {
 	    /* Create or update Group REF */
 	    if (I_find_group(group) == 0)
-		G_verbose_message(_
-				  ("Group <%s> does not yet exist. Creating..."),
+		G_verbose_message(_("Group <%s> does not yet exist. Creating..."),
 				  group);
 
 	    if (sgrp->answer) {
@@ -253,8 +250,7 @@
 	/* Go through existing files to check for duplicates */
 	for (n = 0; n < ref.nfiles; n++) {
 	    if (strcmp(rasters[m], ref.file[n].name) == 0) {
-		G_message(_
-			  ("Raster map <%s> exists in subgroup. Skipping..."),
+		G_message(_("Raster map <%s> exists in subgroup. Skipping..."),
 			  G_fully_qualified_name(rasters[m], mapset));
 		skip = 1;
 		continue;

Modified: grass/trunk/imagery/i.ifft/ifftmain.c
===================================================================
--- grass/trunk/imagery/i.ifft/ifftmain.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.ifft/ifftmain.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -94,8 +94,7 @@
     if ((realfp =
 	 G_fopen_old_misc("cell_misc", "fftreal", Cellmap_real,
 			  realmapset)) == NULL)
-	G_fatal_error(_
-		      ("Unable to open real-image in the cell_misc directory.\nInput map probably wasn't created by i.fft"));
+	G_fatal_error(_("Unable to open real-image in the cell_misc directory.\nInput map probably wasn't created by i.fft"));
 
     if ((imagmapset = G_find_cell(Cellmap_imag, "")) == NULL)
 	G_fatal_error(_("%s: %s - Unable to find the imaginary-image."),
@@ -104,8 +103,7 @@
     if ((imagfp =
 	 G_fopen_old_misc("cell_misc", "fftimag", Cellmap_imag,
 			  imagmapset)) == NULL)
-	G_fatal_error(_
-		      ("Unable to open imaginary-image in the cell_misc directory.\nInput map probably wasn't created by i.fft"));
+	G_fatal_error(_("Unable to open imaginary-image in the cell_misc directory.\nInput map probably wasn't created by i.fft"));
 
     /* check command line args for validity */
     if (G_legal_filename(Cellmap_orig) < 0)
@@ -135,8 +133,7 @@
     data[0] = (double *)G_malloc((rows * cols) * sizeof(double));
     data[1] = (double *)G_malloc((rows * cols) * sizeof(double));
     if (data[0] == NULL || data[1] == NULL)
-	G_fatal_error(_
-		      ("Insufficent memory for allocation of data structure"));
+	G_fatal_error(_("Insufficent memory for allocation of data structure"));
 
     /* Initialize real & complex components to zero */
     G_message(_("Reading the raster maps..."));

Modified: grass/trunk/imagery/i.ifft/orig_wind.c
===================================================================
--- grass/trunk/imagery/i.ifft/orig_wind.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.ifft/orig_wind.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -24,8 +24,7 @@
 	hd->east != tmphd.east ||
 	hd->west != tmphd.west ||
 	hd->ew_res != tmphd.ew_res || hd->ns_res != tmphd.ns_res)
-	G_fatal_error(_
-		      ("The real and imaginary original windows did not match."));
+	G_fatal_error(_("The real and imaginary original windows did not match."));
 
     return 0;
 }

Modified: grass/trunk/imagery/i.maxlik/invert.c
===================================================================
--- grass/trunk/imagery/i.maxlik/invert.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.maxlik/invert.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -25,12 +25,10 @@
 	stat = invert(s = &S.sig[c], S.nbands, ik, jk, &det);
 	if (stat != 1) {
 	    if (stat)
-		G_warning(_
-			  ("signature %d is not valid (ill-conditioned) - ignored."),
+		G_warning(_("signature %d is not valid (ill-conditioned) - ignored."),
 			  c + 1);
 	    else
-		G_warning(_
-			  ("signature %d is not valid (singular) - ignored."),
+		G_warning(_("signature %d is not valid (singular) - ignored."),
 			  c + 1);
 
 	    bad = 1;

Modified: grass/trunk/imagery/i.maxlik/open.c
===================================================================
--- grass/trunk/imagery/i.maxlik/open.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.maxlik/open.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -23,8 +23,7 @@
 
     if (Ref.nfiles <= 1) {
 	if (Ref.nfiles <= 0)
-	    G_fatal_error(_
-			  ("Subgroup [%s] of group [%s] doesn't have any files.\n"
+	    G_fatal_error(_("Subgroup [%s] of group [%s] doesn't have any files.\n"
 			   "The subgroup must have at least 2 files."));
 	else
 	    G_fatal_error(_("Subgroup [%s] of group [%s] only has 1 file.\n"

Modified: grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -63,8 +63,7 @@
 	    G_fatal_error(_("Unable to write row %d"), row);
 
 	if (G_put_raster_row(fd, rast, map_type) < 0) {
-	    G_fatal_error(_
-			  ("Unable to write raster map. You might want to check available disk space and write permissions."));
+	    G_fatal_error(_("Unable to write raster map. You might want to check available disk space and write permissions."));
 	    unlink(temp_name);
 	}
     }

Modified: grass/trunk/imagery/i.pca/main.c
===================================================================
--- grass/trunk/imagery/i.pca/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.pca/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -203,8 +203,7 @@
 	    if (*scale_min == 0)
 		*scale = 0;
 	    else {
-		G_warning(_
-			  ("Scale range length should be > 0. Using default values: 0,255"));
+		G_warning(_("Scale range length should be > 0. Using default values: 0,255"));
 		*scale_min = 0;
 		*scale_max = 255;
 	    }
@@ -422,8 +421,7 @@
 		    if (rowbuf)
 			G_free(rowbuf);
 		    if (!(rowbuf = G_allocate_raster_buf(maptype)))
-			G_fatal_error(_
-				      ("Cannot allocate memory for row buffer"));
+			G_fatal_error(_("Cannot allocate memory for row buffer"));
 
 		    if (G_get_raster_row(inp_fd[j], rowbuf, row, maptype) < 0)
 			G_fatal_error(_("Cannot read raster row [%d]"), row);

Modified: grass/trunk/imagery/i.rectify/main.c
===================================================================
--- grass/trunk/imagery/i.rectify/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.rectify/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -116,8 +116,7 @@
 	G_fatal_error(_("Group <%s> does not exist"), grp->answer);
 
     if (ref.nfiles <= 0) {
-	G_important_message(_
-			    ("Group <%s> contains no raster maps; run i.group"),
+	G_important_message(_("Group <%s> contains no raster maps; run i.group"),
 			    grp->answer);
 	exit(EXIT_SUCCESS);
     }

Modified: grass/trunk/imagery/i.smap/bouman/model.c
===================================================================
--- grass/trunk/imagery/i.smap/bouman/model.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.smap/bouman/model.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -35,8 +35,7 @@
 	    for (b1 = 0; b1 < nbands; b1++)
 		for (b2 = 0; b2 < nbands; b2++) {
 		    if (SubS->R[b1][b2] != SubS->R[b2][b1])
-			G_warning(_
-				  ("\nNonsymetric covariance for class [%d] subclass [%d]."),
+			G_warning(_("\nNonsymetric covariance for class [%d] subclass [%d]."),
 				  m + 1, i + 1);
 
 		    SubS->Rinv[b1][b2] = SubS->R[b1][b2];
@@ -46,8 +45,7 @@
 	    eigen(SubS->Rinv, lambda, nbands);
 	    for (b1 = 0; b1 < nbands; b1++) {
 		if (lambda[b1] <= 0.0)
-		    G_warning(_
-			      ("Nonpositive eigenvalues for class [%d] subclass [%d]."),
+		    G_warning(_("Nonpositive eigenvalues for class [%d] subclass [%d]."),
 			      m + 1, i + 1);
 	    }
 

Modified: grass/trunk/imagery/i.smap/shapiro/openfiles.c
===================================================================
--- grass/trunk/imagery/i.smap/shapiro/openfiles.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.smap/shapiro/openfiles.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -12,8 +12,7 @@
 
 
     if (!I_get_subgroup_ref(parms->group, parms->subgroup, &Ref))
-	G_fatal_error(_
-		      ("Unable to read REF file for subgroup [%s] in group [%s]."),
+	G_fatal_error(_("Unable to read REF file for subgroup [%s] in group [%s]."),
 		      parms->subgroup, parms->group);
 
     if (Ref.nfiles <= 0)

Modified: grass/trunk/imagery/i.smap/shapiro/read_sig.c
===================================================================
--- grass/trunk/imagery/i.smap/shapiro/read_sig.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.smap/shapiro/read_sig.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -10,8 +10,7 @@
     struct Ref Ref;
 
     if (!I_get_subgroup_ref(parms->group, parms->subgroup, &Ref))
-	G_fatal_error(_
-		      ("Unable to read REF file for subgroup [%s] in group [%s]."),
+	G_fatal_error(_("Unable to read REF file for subgroup [%s] in group [%s]."),
 		      parms->subgroup, parms->group);
 
     if (Ref.nfiles <= 0)

Modified: grass/trunk/imagery/i.zc/main.c
===================================================================
--- grass/trunk/imagery/i.zc/main.c	2008-08-06 22:06:47 UTC (rev 32588)
+++ grass/trunk/imagery/i.zc/main.c	2008-08-06 22:07:54 UTC (rev 32589)
@@ -153,8 +153,7 @@
     data[0] = (double *)G_malloc(totsize * sizeof(double));
     data[1] = (double *)G_malloc(totsize * sizeof(double));
     if (data[0] == NULL || data[1] == NULL)
-	G_fatal_error(_
-		      ("Insufficent memory for allocation of data structure"));
+	G_fatal_error(_("Insufficent memory for allocation of data structure"));
 
     /* Initialize real & complex components to zero */
     G_message(_("Initializing data..."));



More information about the grass-commit mailing list