浏览代码

Milena Nowotarska: msg cleanup; HTML cleanup

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47810 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 13 年之前
父节点
当前提交
590883963d

+ 3 - 3
raster3d/r3.showdspf/get_color_ogl.c

@@ -35,7 +35,7 @@ int get_color_table(file, ctable)
 
     fp = fopen(file, "r");
     if (!fp) {
-	fprintf(stderr, "Could not open color file for reading\n");
+	fprintf(stderr, "Unable to open color file for reading\n");
 	return (-1);
     }
 
@@ -46,7 +46,7 @@ int get_color_table(file, ctable)
 		     &(ctable[i].color[1]), &(ctable[i].color[2]));
 	if (tmp != EOF && tmp != 4) {
 	    fclose(fp);
-	    fprintf(stderr, "Can't read colortable file %s\n", file);
+	    fprintf(stderr, "Unable to read colortable file <%s>\n", file);
 	    return (-1);
 	}
 
@@ -148,7 +148,7 @@ int new_color_file(file, cfile, D_spec)
 	fclose(D_spec->cfile);
     D_spec->cfile = fopen(file, "r");
     if (D_spec->cfile == NULL) {
-	fprintf(stderr, "Unable to open %s\n", file);
+	fprintf(stderr, "Unable to open <%s>\n", file);
 	return (-1);
     }
     else if (0 > get_color_table(cfile, D_spec->ctable)) {

+ 9 - 8
raster3d/r3.showdspf/main_ogl.c

@@ -16,6 +16,7 @@
  *
  *****************************************************************************/
 
+#include <stdlib.h>
 #include <grass/raster3d.h>
 #include <grass/config.h>
 
@@ -120,7 +121,7 @@ int main(int argc, char **argv)
     g3->type = TYPE_STRING;
     g3->required = YES;
     g3->gisprompt = "old,grid3,3dcell";
-    g3->description = "Name of an existing 3d raster map";
+    g3->description = "Name of an existing 3D raster map";
 
     dspf = G_define_option();
     dspf->key = "dspf";
@@ -139,7 +140,7 @@ int main(int argc, char **argv)
 
     /* set-up for select() */
     if (pipe(fdes))
-	G_fatal_error("Couldn't open pipe");
+	G_fatal_error("Unable to open pipe");
     pid = fork();
     if (pid == (pid_t) 0) {	/* child */
 	close(fdes[1]);
@@ -167,7 +168,7 @@ int main(int argc, char **argv)
 
 	/* open g3 file for reading */
 	if (NULL == (mapset = G_find_file2("grid3", g3->answer, ""))) {
-	    sprintf(buff, "Not able to find grid3 file for [%s]", g3->answer);
+	    sprintf(buff, "Unable to find 3D raster map for <%s>", g3->answer);
 	    G_fatal_error(buff);
 	}
 
@@ -175,12 +176,12 @@ int main(int argc, char **argv)
 				RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 	if (NULL == g3map) {
-	    sprintf(buff, "Error opening grid3 file [%s]", g3->answer);
+	    sprintf(buff, "Unable to open 3D raster map <%s>", g3->answer);
 	    G_fatal_error(buff);
 	}
 
 	if (0 == Rast3d_range_load(g3map)) {
-	    sprintf(buff, "Error reading range for [%s]", g3->answer);
+	    sprintf(buff, "Unable to read range of 3D raster map <%s>", g3->answer);
 	    G_fatal_error(buff);
 	}
 	Rast3d_range_min_max(g3map, &dmin, &dmax);
@@ -200,18 +201,18 @@ int main(int argc, char **argv)
 	    wname[i] = (char)NULL;
 	sprintf(buff, "grid3/%s/dsp", wname);
 	if (NULL == (mapset = G_find_file2(buff, dsp, mapset))) {
-	    sprintf(buff, "Not able to find display file for [%s]", dsp);
+	    sprintf(buff, "Unable to find display file for <%s>", dsp);
 	    G_fatal_error(buff);
 	}
 	if ((Headfax.dspfinfp = G_fopen_old(buff, dsp, mapset)) == NULL) {
-	    fprintf(stderr, "ERROR: unable to open %s for reading\n",
+	    fprintf(stderr, "Unable to open <%s> for reading\n",
 		    Headfax.dspfinfp);
 	    exit(EXIT_FAILURE);
 	}
 
 	/* read header info from dspf file into GLOBAL variable Headfax */
 	if (dfread_header(&Headfax) < 0) {
-	    fprintf(stderr, "ERROR:  while reading dspf file header\n");
+	    fprintf(stderr, "Unable to read display file header\n");
 	    exit(EXIT_FAILURE);
 	}
 

+ 5 - 5
raster3d/r3.showdspf/new_init_graphics.c

@@ -222,7 +222,7 @@ int loadrect(char *name)
     winset_main();
     fp = fopen(name, "r");
     if (!fp) {
-	fprintf(stderr, " Error: Could not open file %s for reading\n", name);
+	fprintf(stderr, "Unable to open file <%s>\n", name);
 	G_free(buffer);
 	return 0;
     }
@@ -235,7 +235,7 @@ int loadrect(char *name)
     }
 
     if (ysiz != fread(buffer, xsiz * sizeof(long), ysiz, fp))
-	fprintf(stderr, "Write failed file '%s'\n", name);
+	fprintf(stderr, "Unable to write file <%s>\n", name);
 
     clear_screen();
     glMatrixMode(GL_PROJECTION);
@@ -305,7 +305,7 @@ int dumprect(char *name)
 
     fp = fopen(name, "w");
     if (!fp) {
-	fprintf(stderr, " Error: Could not open file %s for writing\n", name);
+	fprintf(stderr, "Unable to open file <%s>\n", name);
 	G_free(buffer);
 	return 0;
     }
@@ -318,7 +318,7 @@ int dumprect(char *name)
 
     glReadPixels(0, 0, xsiz, ysiz, GL_RGBA, GL_BYTE, buffer);
     if (ysiz != fwrite(buffer, xsiz * sizeof(long), ysiz, fp))
-	fprintf(stderr, "Write failed file '%s'\n", name);
+	fprintf(stderr, "Unable to write file <%s>\n", name);
 
     fclose(fp);
     G_free(buffer);
@@ -369,7 +369,7 @@ int dumpgif(char *name)
 
     fp = fopen(name, "wb");
     if (!fp) {
-	fprintf(stderr, " Error: Could not open file %s for writing\n", name);
+	fprintf(stderr, "Unable to open file <%s>\n", name);
 	G_free(pixels);
 	return 0;
     }

+ 85 - 77
raster3d/r3.showdspf/r3.showdspf.html

@@ -1,19 +1,19 @@
-<H2>DESCRIPTION</H2>
-
+<h2>DESCRIPTION</h2>
 
 Visualization program which loads the isosurfaces previously calculated
-using r3.mkdspf and displays them according to commands given at the prompt.
-r3.mkdspf creates a dspf file from the 3D raster and r3.showdspf uses this
+using <em>r3.mkdspf</em> and displays them according to commands given at the prompt.
+<em>r3.mkdspf</em> creates a dspf file from the 3D raster and <em>r3.showdspf</em> uses this
 dspf file to draw isosurfaces and 3D raster map to draw planes and everything
-related (boxes, etc).<br>
+related (boxes, etc).
 
+<p>
 Upon initialization of the program, two graphics windows are
-opened, one for the color table and the other for data display.  The
-display window initially contains a red bounding box.  Command options
+opened, one for the color table and the other for data display. The
+display window initially contains a red bounding box. Command options
 are then printed to the terminal and user is prompted for drawing 
 instructions:
 
-<BR>
+<p>
 <pre>
 THE INTERACTIVE OPTIONS ARE:
 
@@ -23,45 +23,45 @@ THE INTERACTIVE OPTIONS ARE:
 
  USAGE AND MEANING:
 
- <B>?</B>         lists available thresholds
- <B>l index# [index#...]</B>  add threshold to display list 
- <B>L</B>         Draw current display list
- <B>t index#</B>  reset so only this threshold is displayed
- <B>T index# index#</B>   show thresholds between hi &amp; lo 
- <B>I</B>         toggle thresholds INSIDE hi/lo or OUTSIDE hi/lo
- <B>+(+++)</B>    display thresholds with consecutively increasing index#
- <B>-(---)</B>    display thresholds with consecutively decreasing index#
-
- <B>x int#</B>  absolute rotation around x-axis in degrees(int) 
- <B>y int#</B>  absolute rotation around y-axis in degrees(int) 
- <B>z int#</B>  absolute rotation around z-axis in degrees(int) 
- <B>r</B>       rotate_model
- <B>X int#</B>  scale model in x
- <B>Y int#</B>  scale model in y
- <B>Z int#</B>  scale model in z
-
- <B>B(x,y,z)int#</B>  begin display along (x,y,z) axis at #
- <B>E(x,y,z)int#</B>  end display along (x,y,z)axis #
- <B>S int#</B>        specular highlight control
- <B>R</B>   resets display along axis to show all data
- <B>F <I>grid3name colortablename</I></B> load new color file
-
- <B>C</B>   toggles the clear flag
- <B>c</B>   clears the display (no thresholds)
- <B>s</B>   swap buffers
- <B>b</B>   toggles draw a box
- <B>g</B>   toggles grid
- <B>n</B>   toggle surface normal direction
-
- <B>p</B>   draw all walls
- <B>p#</B>  draw a wall: 1-top, 2-bottom, 3-east, 4-west, 5-north, 6-south
-
- <B>d</B>   draw (implement the option)
- <B>D</B>   draw a solid defined by T(isosurface + parts of walls)
-
- <B>w</B>   dump image to a file
- <B>Q</B>   QUIT
- <B>h</B>   help
+ <b>?</b>         lists available thresholds
+ <b>l index# [index#...]</b>  add threshold to display list 
+ <b>L</b>         draw current display list
+ <b>t index#</b>  reset so only this threshold is displayed
+ <b>T index# index#</b>   show thresholds between hi &amp; lo 
+ <b>I</b>         toggle thresholds INSIDE hi/lo or OUTSIDE hi/lo
+ <b>+(+++)</b>    display thresholds with consecutively increasing index#
+ <b>-(---)</b>    display thresholds with consecutively decreasing index#
+
+ <b>x int#</b>  absolute rotation around x-axis in degrees(int) 
+ <b>y int#</b>  absolute rotation around y-axis in degrees(int) 
+ <b>z int#</b>  absolute rotation around z-axis in degrees(int) 
+ <b>r</b>       rotate_model
+ <b>X int#</b>  scale model in x
+ <b>Y int#</b>  scale model in y
+ <b>Z int#</b>  scale model in z
+
+ <b>B(x,y,z)int#</b>  begin display along (x,y,z) axis at #
+ <b>E(x,y,z)int#</b>  end display along (x,y,z)axis #
+ <b>S int#</b>        specular highlight control
+ <b>R</b>   resets display along axis to show all data
+ <b>F <I>grid3name colortablename</I></b> load new color file
+
+ <b>C</b>   toggles the clear flag
+ <b>c</b>   clears the display (no thresholds)
+ <b>s</b>   swaps buffers
+ <b>b</b>   toggles draw a box
+ <b>g</b>   toggles grid
+ <b>n</b>   toggles surface normal direction
+
+ <b>p</b>   draw all walls
+ <b>p#</b>  draw a wall: 1-top, 2-bottom, 3-east, 4-west, 5-north, 6-south
+
+ <b>d</b>   draw (implement the option)
+ <b>D</b>   draw a solid defined by T(isosurface + parts of walls)
+
+ <b>w</b>   dump image to a file
+ <b>Q</b>   QUIT
+ <b>h</b>   help
 
  enter desired manipulations then press return
  &gt;&gt;
@@ -69,56 +69,64 @@ THE INTERACTIVE OPTIONS ARE:
 </pre>
 <p>
 
-<H3>Hints:</H3>
-<UL>
-<LI>To navigate around the data, use the <B>r</B> command, then place
+<h3>Hints:</h3>
+<ul>
+<li>To navigate around the data, use the <em>r</em> command, then place
 the mouse pointer in the graphics window and drag with the left mouse 
 to rotate the bounding box.  To zoom in and out, drag right or left
 with the middle mouse. When satisfied with the new viewing
 position, click with the right mouse.
 
-<LI>To quickly view a series of isosurfaces, enter a series of + or -
-characters, i.e. <B>+++++++</B>
+<li>To quickly view a series of isosurfaces, enter a series of <em>+</em> or <em>-</em>
+characters, i.e. <em>+++++++</em>
 
-<LI>Scripts using above commands on separate lines may be 
-directed to r3.showdspf as standard input. 
-Use the <B>#</B> sign as the first character on a line to indicate a comment.
-</UL>
+<li>Scripts using above commands on separate lines may be 
+directed to <em>r3.showdspf</em> as standard input. 
+Use the <em>#</em> sign as the first character on a line to indicate a comment.
+</ul>
 
-<H2>EXAMPLE</H2>
+<h2>EXAMPLE</h2>
 
 After generating a "dspf" control file with <em>r3.mkdspf</em> start
-<em>r3.showdspf</em>. Display/add the layers using "+".<br>
+<em>r3.showdspf</em>. Display/add the layers using <em>+</em>.
 
-List available thresholds with "?". Use "l" to select isosurfaces (available
-number can be adjusted with <em>r3.mkdspf</em>) and "L" to display:<br>
-<tt>l 1 2 3 4 5<br> L </tt> <p>
+<p>
+List available thresholds with <em>?</em>. Use <em>l</em> to select isosurfaces (available
+number can be adjusted with <em>r3.mkdspf</em>) and <em>L</em> to display:
+<br>
+<tt>l 1 2 3 4 5<br> L </tt> 
 
+<p>
 To select and display a single threshold (here: 2), use:<br>
-<tt>t 2</tt> <p>
+<tt>t 2</tt>
 
+<p>
 To select and display a range of thresholds (here: 3-5), use:<br>
 <tt>T 3 5<br>
-D</tt> <p>
+D</tt>
 
+<p>
 To draw a box, enter<br>
 <tt>p</tt><br>
 the p# to plot a selected wall (here top wall):<br>
-<tt>p1</tt><p>
+<tt>p1</tt>
 
+<p>
 Tp draw a cut-off box, define it's position<br>
 <tt>Ex20</tt><br>
 <tt>p</tt><br>
-Here Ex20 defines the x coordinate of the end of the box.<p>
+Here Ex20 defines the x coordinate of the end of the box.
 
-In general - p draws a side of a box, E, B, define where that box starts or
+<p>
+In general - <em>p</em> draws a side of a box, <em>E</em>, <em>B</em>, define where that box starts or
 ends, so to make a fence diagram, the user draws sides of a series of boxes
 which have their starting (or ending) side shifting by a given interval.
 (this way the user can draw even more complex fence diagrams which have
-perpendicular fences, by using Ey or By). It is sufficient to use only E or
-B depending whether fence are drawn by using the end side or front side of a
-box).<br>
+perpendicular fences, by using Ey or By). It is sufficient to use only <em>E</em> or
+<em>B</em> depending whether fence are drawn by using the end side or front side of a
+box).
 
+<p>
 To draw a fence, a sequence like this would be needed<br>
 <tt>Ex10<br>
 p5<br>
@@ -129,7 +137,7 @@ p5<br>
 Ex25<br>
 p5<br>
 </tt>
-                                                                                
+
 or the same would be<br>
 <tt>Bx10<br>
 p6<br>
@@ -137,15 +145,15 @@ Bx15<br>
 p6<br>
 Bx20<br>
 p6</tt> 
-<p>
 
+<p>
 The <em>p</em> is needed for the fence diagram, solids and boxes.
 
-<H2>SEE ALSO</H2>
-<EM><A HREF="r3.mkdspf.html">r3.mkdspf</A></EM>
-<H2>AUTHORS</H2>
-<SIGNATURE>Bill Brown,
-<A HREF="mailto:brown@gis.uiuc.edu">brown@gis.uiuc.edu</A>
-</SIGNATURE>
+<h2>SEE ALSO</h2>
+<em><a href="r3.mkdspf.html">r3.mkdspf</a></em>
+<h2>AUTHORS</h2>
+<signature>Bill Brown,
+<a href="mailto:brown@gis.uiuc.edu">brown@gis.uiuc.edu</a>
+</signature>
 
 <p><i>Last changed: $Date$</i>

+ 56 - 54
raster3d/r3.showdspf/r3.showdspf_opengl_mods.html

@@ -1,61 +1,63 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
- <TITLE>modifications made to r3.showdspf</TITLE>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>modifications made to <em>r3.showdspf</em></title>
  <link rel="stylesheet" href="grassdocs.css" type="text/css">
-</HEAD>
+</head>
 
-<BODY BGCOLOR="#FFFFFF">
+<body bgcolor="#ffffff">
 
-<P><FONT SIZE="4"><B>Description of modifications made to r3.showdspf directory during conversion of code from
-IrisGL (running only on SGI workstations) to OpenGL (running on any OpenGL-capable UNIX workstation)<BR>
-</B><BR>
-The following files were changed (and perhaps renamed during conversion)<BR>
-</FONT><TT>do_color.c -&gt; do_color_ogl.c<BR>
-draw_cap.c -&gt; draw_cap_ogl.c<BR>
-draw_polys.c -&gt; draw_polys_ogl.c<BR>
-draw_cappolys.c -&gt; draw_cappolys_ogl.c<BR>
-main.c -&gt; main_ogl.c<BR>
-init_caps.c -&gt; init_caps.c<BR>
-vizual.h -&gt; vizual.h<BR>
-Gmakefile -&gt; Gmakefile<BR>
-</TT><BR>
-<FONT SIZE="4">The following files are new files<BR>
-</FONT><TT>new_init_graphics.c<BR>
-kns_defines.h<BR>
-kns_globals.h<BR>
-togif.c<BR>
-togif.h<BR>
-</TT><BR>
-<FONT SIZE="4">The following files are unchanged:<BR>
-</FONT><TT>cap_data.c<BR>
-init_caps.c<BR>
-debugf.c<BR>
-thresh_array.c<BR>
-make_header.c<BR>
-r3_data.c<BR>
-r3_find.c<BR>
-</TT><BR>
-<FONT SIZE="4">The following files removed since they were made unnecessary<BR>
-</FONT><TT>init_graphics.c<BR>
-dump_rect.c -&gt; functions moved to new_init_graphics.c<BR>
-</TT>axes2.c<BR>
-<BR>
-<FONT SIZE="4" COLOR="#FF0000"><B>*** Disclaimer ***</B></FONT><FONT SIZE="4"><BR>
-</FONT>The porting effort from IrisGL to OpenGL was performed with the goal of just getting things to run with
-OpenGL with some user-interface improvements.  Only a small attempt was made to correct for sloppy/dangerous coding
-practices found in the <B>original</B> code.  Sloppy/dangerous coding practices were modified only when they resulted
-in serious code errors (causing core dumps).  Certain files, such as new_init_graphics.c, which were totally new
-files, were coded to higher standards.  In general, this effort was only a porting effort, <B>not</B> a re-architecting
-effort.<BR>
-<BR>
-<FONT SIZE="4">Above modifications made by:<BR>
-</FONT>Ken Sakai<BR>
-Lockheed Martin Space Systems<BR>
-Sunnyale, California<BR>
+<p>
+<font size="4"><b>Description of modifications made to r3.showdspf directory during conversion of code from
+IrisGL (running only on SGI workstations) to OpenGL (running on any OpenGL-capable UNIX workstation)</b>
+
+<p>
+The following files were changed (and perhaps renamed during conversion)<br>
+</font><tt>do_color.c -&gt; do_color_ogl.c<br>
+draw_cap.c -&gt; draw_cap_ogl.c<br>
+draw_polys.c -&gt; draw_polys_ogl.c<br>
+draw_cappolys.c -&gt; draw_cappolys_ogl.c<br>
+main.c -&gt; main_ogl.c<br>
+init_caps.c -&gt; init_caps.c<br>
+vizual.h -&gt; vizual.h<br>
+Gmakefile -&gt; Gmakefile<br>
+</tt><br>
+<font size="4">The following files are new files<br>
+</font><tt>new_init_graphics.c<br>
+kns_defines.h<br>
+kns_globals.h<br>
+togif.c<br>
+togif.h<br>
+</tt><br>
+<font size="4">The following files are unchanged:<br>
+</font><tt>cap_data.c<br>
+init_caps.c<br>
+debugf.c<br>
+thresh_array.c<br>
+make_header.c<br>
+r3_data.c<br>
+r3_find.c<br>
+</tt><br>
+<font size="4">The following files removed since they were made unnecessary<br>
+</font><tt>init_graphics.c<br>
+dump_rect.c -&gt; functions moved to new_init_graphics.c<br>
+</tt>axes2.c<br>
+<br>
+<font size="4" color="#ff0000"><b>*** Disclaimer ***</b></font><font size="4"><br>
+</font>The porting effort from IrisGL to OpenGL was performed with the goal of just getting things to run with
+OpenGL with some user-interface improvements. Only a small attempt was made to correct for sloppy/dangerous coding
+practices found in the <b>original</b> code. Sloppy/dangerous coding practices were modified only when they resulted
+in serious code errors (causing core dumps). Certain files, such as new_init_graphics.c, which were totally new
+files, were coded to higher standards. In general, this effort was only a porting effort, <b>not</b> a re-architecting
+effort.<br>
+<br>
+<font size="4">Above modifications made by:<br>
+</font>Ken Sakai<br>
+Lockheed Martin Space Systems<br>
+Sunnyale, California<br>
 Modification date: March 2000
 
-</BODY>
+</body>
 
-</HTML>
+</html>