#! /bin/sh /usr/share/dpatch/dpatch-run ## fix_programming_issues.dpatch by Daniel Leidert (dale) <daniel.leidert@wgdd.de> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: The compiler throws a few warnings. This patch fixes the code ## DP: accordingly to information provided by upstream. ## DP: ## DP: - src/OpenGL/Contours.c (set_contour_point): Fixed variable declaration. ## DP: - src/OpenGL/ContoursPov.c (addOneContoursPovRay): Fixed array subscript. ## DP: - src/Utils/Utils.c (get_one_block_from_aux_mopac_file): Fixed test expression. @DPATCH@ diff -urNad gabedit~/src/OpenGL/Contours.c gabedit/src/OpenGL/Contours.c --- gabedit~/src/OpenGL/Contours.c 2008-07-03 09:41:14.000000000 +0200 +++ gabedit/src/OpenGL/Contours.c 2008-07-21 16:08:08.000000000 +0200 @@ -82,7 +82,7 @@ gint j; gint k; gint c; - Point t[4]; + Point5 t[4]; gfloat u1; gfloat u2; gfloat v1; diff -urNad gabedit~/src/OpenGL/ContoursPov.c gabedit/src/OpenGL/ContoursPov.c --- gabedit~/src/OpenGL/ContoursPov.c 2008-07-03 09:41:14.000000000 +0200 +++ gabedit/src/OpenGL/ContoursPov.c 2008-07-21 16:08:08.000000000 +0200 @@ -200,7 +200,7 @@ Gap = GetGapVector(plansgrid,i0,i1,numplan,gap); addPlanPovRay(file, plansgrid,i0,i1,numplan,Gap, Color); - Color[3] = 0.8; + Color[2] = 0.8; for(i=0;i<Ncontours;i++) { set_Color_From_colorMap(colorMap, Color, values[i]); diff -urNad gabedit~/src/OpenGL/RingsOrb.c gabedit/src/OpenGL/RingsOrb.c --- gabedit~/src/OpenGL/RingsOrb.c 2008-07-03 09:41:14.000000000 +0200 +++ gabedit/src/OpenGL/RingsOrb.c 2008-07-21 16:08:38.000000000 +0200 @@ -233,7 +233,7 @@ gint* num = NULL; gint n; - for(c=0;c<4;c++) C[c] = 0; + for(c=0;c<3;c++) C[c] = 0; n = 4; if(inRing(j, i, n-1, TRUE) ) num = getRing(); if(!num) diff -urNad gabedit~/src/Utils/Utils.c gabedit/src/Utils/Utils.c --- gabedit~/src/Utils/Utils.c 2008-07-03 09:41:15.000000000 +0200 +++ gabedit/src/Utils/Utils.c 2008-07-21 16:08:08.000000000 +0200 @@ -3653,7 +3653,7 @@ { long int geomposok = ftell(file); if(!fgets(t,BSIZE,file))break; - if(t && !strstr(t,"# ")) fseek(file, geomposok, SEEK_SET); + if(!strstr(t,"# ")) fseek(file, geomposok, SEEK_SET); } elements = g_malloc(nElements*sizeof(gchar*));