openModeller  Version 1.5.0
Utilities.cpp
Go to the documentation of this file.
1 /* **************************************
2  * GARP Modeling Package
3  *
4  * **************************************
5  *
6  * Copyright (c), The Center for Research, University of Kansas, 2385 Irving Hill Road, Lawrence, KS 66044-4755, USA.
7  * Copyright (C), David R.B. Stockwell of Symbiotik Pty. Ltd.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the license that is distributed with the software.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * license.txt file included with this software for more details.
16  */
17 
18 // Utilities.cpp
19 
20 unsigned long Seed; // seed for random number generator
21 unsigned long OrigSeed; // original value for random seed
22 
31 #include <string.h>
32 
33 #ifdef __GARPWIN
34 #include <io.h>
35 #else
36 #include <sys/stat.h>
37 #endif
38 
39 int getFileSize(char * strFilename)
40 {
41 #ifdef __GARPWIN
42 
43  _finddata_t fileInfo;
44  _findfirst(strFilename, &fileInfo);
45  return (int) fileInfo.size;
46 
47 #else
48 
49  struct stat stat_p;
50  stat (strFilename, &stat_p);
51  return stat_p.st_size;
52 
53 #endif
54 }
unsigned long OrigSeed
Definition: Utilities.cpp:21
int getFileSize(char *strFilename)
Definition: Utilities.cpp:39
unsigned long Seed
Definition: Utilities.cpp:20