|
From: <Jaa...@fo...> - 2001-08-07 13:15:40
|
Hi!
In all versions of vis5d, the ifdefs in saving images into files are
incorrect, file formats are fixed and do not depend on endianess. The
patch below removes the ifdef.
In the current vis5d CVS, without gnome, compilation failed on my Linux
redhat 7.1, because USE_SYSTEM_FONTS was not set and there were some
missing ifdefs around hslice.labels which does not exist unless
USE_SYSTEM_FONTS is defined. The patch below fixes that.
Could you apply these to the CVS?
Jaakko
--- src/gl_to_ppm.c 2001/07/12 14:27:23 1.3
+++ src/gl_to_ppm.c 2001/08/07 12:31:41
@@ -339,19 +339,11 @@
/* tranfer data from dataR, dataG, dataB */
/* to file */
/*****************************************/
-#ifndef WORDS_BIGENDIAN
for (i=0; i<big_x * big_y; i++){
- fputc(dataB[i], f);
- fputc(dataG[i], f);
- fputc(dataR[i], f);
- }
-#else
- for (i=0; i<big_x * big_y; i++){
fputc(dataR[i], f);
fputc(dataG[i], f);
fputc(dataB[i], f);
}
-#endif
fputc(EOF, f);
if (fclose(f)==EOF){
printf("Could not close output ppm file\n");
--- src/work.c 2001/08/06 13:42:41 1.13
+++ src/work.c 2001/08/07 12:31:41
@@ -2037,9 +2037,11 @@
base = low;
/* call contouring routine */
+#ifdef USE_SYSTEM_FONTS
if(slice->labels)
free(slice->labels);
slice->labels = (char *) malloc(10*sizeof(char)*max_cont_verts/2);
+#endif
contour_ok =
contour( ctx, slicedata, dtx->Nr, dtx->Nc, interval, low, high, base,
@@ -2310,9 +2312,11 @@
else
base = low;
/* call contouring routine */
+#ifdef USE_SYSTEM_FONTS
if(ctx->VSliceTable[var][time].labels)
free(ctx->VSliceTable[var][time].labels);
ctx->VSliceTable[var][time].labels = (char *) malloc(10*sizeof(char)*max_cont_verts/2);
+#endif
contour_ok = contour( ctx, slice, rows, cols, interval, low, high, base,
vr1, vc1, max_cont_verts, &num1,
vr2, vc2, max_cont_verts/2, &num2,
--
Foreca Ltd Jaa...@fo...
Pursimiehenkatu 29-31 B, FIN-00150 Helsinki, Finland http://www.foreca.com
|