patch-shuffle_c 945 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. $OpenBSD: patch-shuffle_c,v 1.3 2010/05/17 08:31:12 espie Exp $
  2. --- shuffle.c.orig Tue Jan 12 19:59:38 1993
  3. +++ shuffle.c Mon May 17 10:25:14 2010
  4. @@ -15,9 +15,13 @@
  5. # include <X11/Intrinsic.h>
  6. # include <stdio.h>
  7. +# include <stdlib.h>
  8. # include "debug.h"
  9. # include "cdrom_globs.h"
  10. +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
  11. +# include "cdrom_freebsd.h"
  12. +#endif
  13. #ifdef sun
  14. # include "cdrom_sun.h"
  15. #endif
  16. @@ -29,10 +33,11 @@
  17. static unsigned char *random_tracks;
  18. +extern AppData app_data;
  19. +
  20. void
  21. shuffle_setup() {
  22. - extern char *malloc();
  23. -#ifdef sgi
  24. +#if defined sgi || defined __OpenBSD__
  25. extern time_t time(time_t *);
  26. #else
  27. extern long time();
  28. @@ -97,7 +102,7 @@ shuffle_setup() {
  29. random_tracks[i] = try;
  30. }
  31. - if (debug == True) {
  32. + if (app_data.debug == True) {
  33. debug_printf(1, "shuffle_setup: ");
  34. for (i = 0; i < cdi.ntracks; i++)
  35. debug_printf(1, "%d ", random_tracks[i]);