normalrs.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 1994. James Darrell McCauley. (darrell@mccauley-usa.com)
  3. * http://mccauley-usa.com/
  4. *
  5. * This program is free software under the GPL (>=v2)
  6. * Read the file GPL.TXT coming with GRASS for details.
  7. */
  8. #include <stdio.h>
  9. #include <math.h>
  10. #include <grass/gis.h>
  11. #include <grass/glocale.h>
  12. #include "zufall.h"
  13. int normalrs(double *svbox)
  14. {
  15. int i, k;
  16. extern struct klotz1 klotz1_1;
  17. /*
  18. * restores common blocks klotz0, klotz1 containing buffers and
  19. * pointers. IMPORTANT: svbox must be dimensioned at least 1634 in
  20. * driver. The entire contents of klotz0 and klotz1 must be restored.
  21. */
  22. /* restore zufall blocks klotz0 and klotz1 */
  23. zufallrs(svbox);
  24. klotz1_1.first = (int)svbox[608];
  25. if (klotz1_1.first == 0)
  26. G_warning(_("normalsv: restoration of uninitialized block"));
  27. klotz1_1.xptr = (int)svbox[609];
  28. k = 609;
  29. for (i = 0; i < 1024; ++i)
  30. klotz1_1.xbuff[i] = svbox[i + k];
  31. return 0;
  32. } /* normalrs */