~ubuntu-branches/ubuntu/quantal/xscreensaver/quantal

« back to all changes in this revision

Viewing changes to hacks/ccurve.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould
  • Date: 2008-08-28 16:15:25 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080828161525-mxga521aoezxjq8h
Tags: 5.07-0ubuntu1
* Upgrade upstream version
* debian/control: Remove suggest xdaliclock as it is no longer
  included
* Remove 10_jwz-screensaver-randr-patch-3.patch as it has been merged
  upstream.
* Add 24_hacks_xsublim_enable.patch as it seems that xsublim was dropped
  from the build files.  There is nothing in the Changelog about it
  so I believe it was accidental.
* Updating the .desktop files from the XML files using gnome-screensaver's
  utility to do so.  Lots of text updates.  Also:
    * Added: abstractile.desktop
    * Added: cwaves.desktop
    * Added: m6502.desktop
    * Added: skytentacles.desktop
    * Removed: xteevee.desktop
* xscreensaver-gl-extra.files: Added skytentacles
* xscreensaver-data-extra.files: Added abstractile, cwaves and m6502
* xscreensaver-data.files: Remove partial abstractile, m6502 and cwaves

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
    }
179
179
}
180
180
 
181
 
static void
 
181
static Bool
182
182
self_similar_normalized (struct state *st,
183
183
                         int       iterations,
184
184
                         double    x1,
228
228
        assert (fabs ((replacement [segment_count - 1].x) - 1.0) < EPSILON);
229
229
        assert (fabs (replacement [segment_count - 1].y) < EPSILON);
230
230
        realign (x1, y1, x2, y2, segment_count, replacement);
231
 
        assert (fabs (x2 - (replacement [segment_count - 1].x)) < EPSILON);
232
 
        assert (fabs (y2 - (replacement [segment_count - 1].y)) < EPSILON);
 
231
        /* jwz: I don't understand what these assertions are supposed to
 
232
           be detecting, but let's just bail on the fractal instead of
 
233
           crashing. */
 
234
/*      assert (fabs (x2 - (replacement [segment_count - 1].x)) < EPSILON);
 
235
        assert (fabs (y2 - (replacement [segment_count - 1].y)) < EPSILON);*/
 
236
        if (fabs (x2 - (replacement [segment_count - 1].x)) >= EPSILON ||
 
237
            fabs (y2 - (replacement [segment_count - 1].y)) >= EPSILON) {
 
238
          free (replacement);
 
239
          return False;
 
240
        }
233
241
        x = x1;
234
242
        y = y1;
235
243
        for (index = 0; index < segment_count; ++index)
236
244
        {
237
245
            next_x = replacement [index].x;
238
246
            next_y = replacement [index].y;
239
 
            self_similar_normalized (st, 
 
247
            if (!self_similar_normalized (st, 
240
248
                                     iterations - 1, x, y, next_x, next_y,
241
249
                                     maximum_x, maximum_y,
242
250
                                     minimum_x, minimum_y,
243
 
                                     segment_count, points);
 
251
                                     segment_count, points)) {
 
252
              free(replacement);
 
253
              return False;
 
254
            }
244
255
            x = next_x;
245
256
            y = next_y;
246
257
        }
247
 
        free((void*)replacement);
 
258
        free(replacement);
248
259
    }
 
260
    return True;
249
261
}
250
262
 
251
263
static void