Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

random.cpp File Reference

#include <stdio.h>
#include <time.h>
#include "random.h"

Include dependency graph for random.cpp:

Go to the source code of this file.

Defines

#define MODULUS   2147483647
#define MULTIPLIER   48271
#define CHECK   399268537
#define STREAMS   256
#define A256   22925
#define DEFAULT   123456789

Functions

double Random (void)
void PlantSeeds (long x)
void PutSeed (long x)
void GetSeed (long *x)
void SelectStream (int index)
void TestRandom (void)

Variables

static long seed [STREAMS] = {DEFAULT}
static int stream = 0
static int initialized = 0


Define Documentation

#define A256   22925
 

Definition at line 43 of file random.cpp.

Referenced by PlantSeeds(), and TestRandom().

#define CHECK   399268537
 

Definition at line 41 of file random.cpp.

Referenced by TestRandom().

#define DEFAULT   123456789
 

Definition at line 44 of file random.cpp.

Referenced by Opie::OBackendFactory< T >::create(), Opie::OPimAccessFactory< T >::defaultAccess(), Opie::OBackendFactory< T >::defaultBackend(), and SelectStream().

#define MODULUS   2147483647
 

Definition at line 39 of file random.cpp.

Referenced by PlantSeeds(), PutSeed(), and Random().

#define MULTIPLIER   48271
 

Definition at line 40 of file random.cpp.

Referenced by Random().

#define STREAMS   256
 

Definition at line 42 of file random.cpp.

Referenced by PlantSeeds(), and SelectStream().


Function Documentation

void GetSeed long *  x  ) 
 

Definition at line 129 of file random.cpp.

Referenced by TestRandom().

void PlantSeeds long  x  ) 
 

Definition at line 71 of file random.cpp.

Referenced by SelectStream(), and TestRandom().

void PutSeed long  x  ) 
 

Definition at line 101 of file random.cpp.

Referenced by PlantSeeds(), SFCave::setSeed(), Game::setSeed(), and TestRandom().

double Random void   ) 
 

Definition at line 51 of file random.cpp.

Referenced by StarField::init(), StarField::newStar(), SFCave::nextInt(), nextInteger(), Dasher::CDasherModel::Tap_on_display(), and TestRandom().

void SelectStream int  index  ) 
 

Definition at line 140 of file random.cpp.

Referenced by PlantSeeds(), and TestRandom().

void TestRandom void   ) 
 

Definition at line 153 of file random.cpp.


Variable Documentation

int initialized = 0 [static]
 

Definition at line 48 of file random.cpp.

Referenced by PlantSeeds(), and SelectStream().

long seed[STREAMS] = {DEFAULT} [static]
 

Definition at line 46 of file random.cpp.

Referenced by _random(), GetSeed(), PlantSeeds(), PutSeed(), and Random().

int stream = 0 [static]
 

Definition at line 47 of file random.cpp.

Referenced by App::App(), OpieMail::appMessage(), OPimMainWindow::appMessage(), Opie::OPimMainWindow::appMessage(), MainWindow::appMessage(), DateBook::appMessage(), AddressbookWindow::appMessage(), WLANImp::changeAndSaveSettingFile(), MainWindowImp::changeProfile(), Today::channelReceived(), MailPluginWidget::channelReceived(), RotateApplet::channelReceived(), IrdaApplet::checkIrdaDiscoveryStatus(), Server::desktopMessage(), OpieObex::SendWidget::dispatchBt(), OpieObex::SendWidget::dispatchIrda(), MainWindow::documentOpen(), MainWindow::documentSave(), IRCServerTab::executeCommand(), TabManager::findInstalledApplication(), AbstractMail::gen_attachment_id(), Opie::Core::OGlobal::generateUuid(), BatteryStatus::getProcApmStatusIpaq(), Swapfile::getStatusPcmcia(), CardMonitor::getStatusPcmcia(), InputDialog::InputDialog(), KateDocument::insertFile(), KWBuffer::insertFile(), Interfaces::Interfaces(), IRCMessage::IRCMessage(), OpieObex::ObexHandler::irdaMessage(), ServerApplication::launcherMessage(), LauncherTabWidget::launcherMessage(), Opie::XMLElement::load(), OpieTooth::HciConfWrapper::load(), Opie::Core::XMLElement::load(), DingWidget::loadDict(), MainWindowImp::MainWindowImp(), FirstUse::message(), QuickLauncher::message(), Multikey::message(), QTReaderApp::msgHandler(), Ir::obexMessage(), Opie::Global::uuid(), IRCMessageParser::parseLiteralMode(), IRCMessageParser::parseNumericalNames(), QPEApplication::pidMessage(), QueuedRequestRunner::process(), PackageHandler::qcopMessage(), AdvancedFm::qcopReceive(), PlayListWidget::qcopReceive(), QSettingsHeading::read(), WLANModule::receive(), NetworkServer::receive(), DateBook::receive(), LoginWindowImpl::receive(), TaskBar::receive(), AppIcons::receive(), VMemo::receive(), RunningAppBar::received(), AppLauncher::received(), QCopWatcher::received(), KeyHelperWidget::receiveMessage(), Server::receiveTaskBar(), SlaveMaster::recieve(), LauncherThumbReceiver::recieve(), SlaveReciever::recieveAnswer(), Interface::refresh(), OpieTooth::HciConfWrapper::save(), KateDocument::saveFile(), Opietooth2::OTHCISocket::sendCommand(), QCopBridge::sendDesktopMessageOld(), Opie::Core::Internal::setCS3Bit(), ZkbWidget::signalReceived(), NetworkSettings::SLOT_QCopMessage(), DrawPad::slotAppMessage(), MainWindow::slotDesktopReceive(), TabManager::swapInstalledLocation(), QSettings::sync(), KeyHelperWidget::sysMessage(), ImageView::systemMessage(), QPEApplication::systemMessage(), CameraMainWindow::systemMessage(), ServerApplication::systemMessage(), Launcher::systemMessage(), Doc_DirLister::systemMsg(), Server::systemMsg(), OCOPPacket::toByteArray(), Opietooth2::OTHCISocket::updateStatus(), WLANImp::WLANImp(), Interfaces::write(), ProjectBuilderMakefileGenerator::writeMakeParts(), and QCopEnvelope::~QCopEnvelope().


Generated on Sat Nov 5 16:57:23 2005 for OPIE by  doxygen 1.4.2