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 9 #include <stdio.h> 10 #include <math.h> 11 #include <grass/gis.h> 12 #include <grass/glocale.h> 13 #include "zufall.h" 14 normalrs(double * svbox)15int normalrs(double *svbox) 16 { 17 int i, k; 18 extern struct klotz1 klotz1_1; 19 20 /* 21 * restores common blocks klotz0, klotz1 containing buffers and 22 * pointers. IMPORTANT: svbox must be dimensioned at least 1634 in 23 * driver. The entire contents of klotz0 and klotz1 must be restored. 24 */ 25 26 /* restore zufall blocks klotz0 and klotz1 */ 27 28 zufallrs(svbox); 29 klotz1_1.first = (int)svbox[608]; 30 if (klotz1_1.first == 0) 31 G_warning(_("normalsv: restoration of uninitialized block")); 32 klotz1_1.xptr = (int)svbox[609]; 33 k = 609; 34 for (i = 0; i < 1024; ++i) 35 klotz1_1.xbuff[i] = svbox[i + k]; 36 37 return 0; 38 } /* normalrs */ 39