aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llvfs
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/llvfs
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to 'linden/indra/llvfs')
-rw-r--r--linden/indra/llvfs/lldir_linux.cpp8
-rw-r--r--linden/indra/llvfs/lldir_mac.cpp4
-rw-r--r--linden/indra/llvfs/lldir_win32.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp
index 8557901..780fbdb 100644
--- a/linden/indra/llvfs/lldir_linux.cpp
+++ b/linden/indra/llvfs/lldir_linux.cpp
@@ -29,7 +29,7 @@
29 29
30#include "lldir_linux.h" 30#include "lldir_linux.h"
31#include "llerror.h" 31#include "llerror.h"
32#include "llrand.h" // for gLindenLabRandomNumber 32#include "llrand.h"
33#include <sys/types.h> 33#include <sys/types.h>
34#include <sys/stat.h> 34#include <sys/stat.h>
35#include <unistd.h> 35#include <unistd.h>
@@ -286,8 +286,8 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
286// automatically wrap if we've hit the end 286// automatically wrap if we've hit the end
287void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) 287void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
288{ 288{
289 U32 num_files; 289 S32 num_files;
290 U32 which_file; 290 S32 which_file;
291 DIR *dirp; 291 DIR *dirp;
292 dirent *entryp = NULL; 292 dirent *entryp = NULL;
293 293
@@ -299,7 +299,7 @@ void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::stri
299 return; 299 return;
300 } 300 }
301 301
302 which_file = gLindenLabRandomNumber.llrand() % num_files; 302 which_file = ll_rand(num_files);
303 303
304// llinfos << "Random select file #" << which_file << llendl; 304// llinfos << "Random select file #" << which_file << llendl;
305 305
diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp
index 683b961..7f1d2ce 100644
--- a/linden/indra/llvfs/lldir_mac.cpp
+++ b/linden/indra/llvfs/lldir_mac.cpp
@@ -287,7 +287,7 @@ BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &
287// get a random file in the directory 287// get a random file in the directory
288void LLDir_Mac::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) 288void LLDir_Mac::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
289{ 289{
290 U32 which_file; 290 S32 which_file;
291 glob_t g; 291 glob_t g;
292 fname = ""; 292 fname = "";
293 293
@@ -300,7 +300,7 @@ void LLDir_Mac::getRandomFileInDir(const std::string &dirname, const std::string
300 if(g.gl_pathc > 0) 300 if(g.gl_pathc > 0)
301 { 301 {
302 302
303 which_file = gLindenLabRandomNumber.llrand() % g.gl_pathc; 303 which_file = ll_rand(g.gl_pathc);
304 304
305// llinfos << "getRandomFileInDir: returning number " << which_file << ", path is " << g.gl_pathv[which_file] << llendl; 305// llinfos << "getRandomFileInDir: returning number " << which_file << ", path is " << g.gl_pathv[which_file] << llendl;
306 // The API wants just the filename, not the full path. 306 // The API wants just the filename, not the full path.
diff --git a/linden/indra/llvfs/lldir_win32.cpp b/linden/indra/llvfs/lldir_win32.cpp
index 8dcaa5c..ad72752 100644
--- a/linden/indra/llvfs/lldir_win32.cpp
+++ b/linden/indra/llvfs/lldir_win32.cpp
@@ -285,8 +285,8 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
285// automatically wrap if we've hit the end 285// automatically wrap if we've hit the end
286void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) 286void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
287{ 287{
288 U32 num_files; 288 S32 num_files;
289 U32 which_file; 289 S32 which_file;
290 HANDLE random_search_h; 290 HANDLE random_search_h;
291 291
292 fname = ""; 292 fname = "";
@@ -303,7 +303,7 @@ void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::stri
303 return; 303 return;
304 } 304 }
305 305
306 which_file = gLindenLabRandomNumber.llrand() % num_files; 306 which_file = ll_rand(num_files);
307 307
308// llinfos << "Random select mp3 #" << which_file << llendl; 308// llinfos << "Random select mp3 #" << which_file << llendl;
309 309