~ubuntu-branches/ubuntu/lucid/mesa/lucid

« back to all changes in this revision

Viewing changes to src/glu/sgi/libnurbs/nurbtess/directedLine.cc

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen, Timo Aaltonen, Robert Hooker
  • Date: 2010-02-19 15:52:12 UTC
  • mfrom: (3.1.10 experimental)
  • Revision ID: james.westby@ubuntu.com-20100219155212-blqov938av7m6exj
Tags: 7.7-3ubuntu1
[ Timo Aaltonen ]
* Merge from Debian experimental.

[ Robert Hooker ]
* Add 100_no_abi_tag.patch: Removes the ABI tag in /usr/lib/libGL.so.1
  which prevented ldconfig from using a libGL from another directory
  at a higher priority than the one in /usr/lib.
* Install libGL alternatives with libgl1-mesa-swx11 as well. (LP: #522048)

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
  nextPolygon = NULL;
310
310
  rootBit = 0;/*important to initilzae to 0 meaning not root yet*/
311
311
  rootLink = NULL;
 
312
  direction = INCREASING;
 
313
  sline = NULL;
312
314
}
313
315
 
314
316
directedLine::~directedLine()
791
793
{
792
794
  Int i,j;
793
795
  FILE* fp = fopen(filename, "r");
794
 
  assert(fp);
795
796
  Int nPolygons;
796
 
  fscanf(fp, "%i", &nPolygons);
 
797
  int result;
 
798
 
 
799
  assert(fp);
 
800
  result = fscanf(fp, "%i", &nPolygons);
 
801
  assert(result != EOF);
797
802
  directedLine *ret = NULL;
798
803
 
799
804
  for(i=0; i<nPolygons; i++)
800
805
    {
801
806
      Int nEdges;
802
 
      fscanf(fp, "%i", &nEdges);
803
 
      Real vert[2][2];
 
807
      result = fscanf(fp, "%i", &nEdges);
 
808
      assert(result != EOF);
 
809
      Real vert[2][2] = { { 0 } };
804
810
      Real VV[2][2];
805
811
      /*the first two vertices*/
806
 
      fscanf(fp, "%f", &(vert[0][0]));
807
 
      fscanf(fp, "%f", &(vert[0][1]));
808
 
      fscanf(fp, "%f", &(vert[1][0]));
809
 
      fscanf(fp, "%f", &(vert[1][1]));
 
812
      result = fscanf(fp, "%f", &(vert[0][0]));
 
813
      assert(result != EOF);
 
814
      result = fscanf(fp, "%f", &(vert[0][1]));
 
815
      assert(result != EOF);
 
816
      result = fscanf(fp, "%f", &(vert[1][0]));
 
817
      assert(result != EOF);
 
818
      result = fscanf(fp, "%f", &(vert[1][1]));
 
819
      assert(result != EOF);
810
820
      VV[1][0] = vert[0][0];
811
821
      VV[1][1] = vert[0][1];
812
822
      sampledLine *sLine = new sampledLine(2, vert);
818
828
        {
819
829
          vert[0][0]=vert[1][0];
820
830
          vert[0][1]=vert[1][1];
821
 
          fscanf(fp, "%f", &(vert[1][0]));
822
 
          fscanf(fp, "%f", &(vert[1][1]));
 
831
          result = fscanf(fp, "%f", &(vert[1][0]));
 
832
          assert(result != EOF);
 
833
          result = fscanf(fp, "%f", &(vert[1][1]));
 
834
          assert(result != EOF);
823
835
          sLine = new sampledLine(2,vert);
824
836
          dLine = new directedLine(INCREASING, sLine);
825
837
dLine->rootLinkSet(thisPoly);