Subversion Repositories gelsvn

Rev

Rev 337 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 337 Rev 365
Line 33... Line 33...
33
 
33
 
34
#include <stdio.h>
34
#include <stdio.h>
35
#include <stdlib.h>
35
#include <stdlib.h>
36
#include <math.h>
36
#include <math.h>
37
#include <string.h>
37
#include <string.h>
38
#include <ply.h>
38
#include "ply.h"
39
 
39
 
40
char *type_names[] = {  /* names of scalar types */
40
char *type_names[] = {  /* names of scalar types */
41
"invalid",
41
"invalid",
42
"int8", "int16", "int32", "uint8", "uint16", "uint32", "float32", "float64",
42
"int8", "int16", "int32", "uint8", "uint16", "uint32", "float32", "float64",
43
};
43
};
Line 3135... Line 3135...
3135
    max_vals = rules->nprops;
3135
    max_vals = rules->nprops;
3136
    vals = (double *) realloc (vals, sizeof (double) * rules->nprops);
3136
    vals = (double *) realloc (vals, sizeof (double) * rules->nprops);
3137
  }
3137
  }
3138
 
3138
 
3139
  /* in case we need a random choice */
3139
  /* in case we need a random choice */
-
 
3140
#ifndef WIN32
3140
  random_pick = (int) floor (rules->nprops * drand48());
3141
  random_pick = (int) floor (rules->nprops * drand48());
-
 
3142
#else
-
 
3143
  random_pick = (int) floor (rules->nprops * rand()/(double)RAND_MAX);
-
 
3144
#endif
3141
 
3145
 
3142
  /* calculate the combination for each "other" property of the element */
3146
  /* calculate the combination for each "other" property of the element */
3143
 
3147
 
3144
  for (i = 0; i < elem->nprops; i++) {
3148
  for (i = 0; i < elem->nprops; i++) {
3145
 
3149