summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/vm_random.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/vm_random.h
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/vm_random.h')
-rw-r--r--kscreensaver/kdesavers/vm_random.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/vm_random.h b/kscreensaver/kdesavers/vm_random.h
new file mode 100644
index 00000000..1aa5e937
--- /dev/null
+++ b/kscreensaver/kdesavers/vm_random.h
@@ -0,0 +1,31 @@
+#ifndef __VM_RANDOM_H__
+#define __VM_RANDOM_H__
+
+#define VM_RAND_MAX 2147483647
+
+#define int32_t int
+
+struct vm_random_data
+{
+ int32_t *fptr; /* Front pointer. */
+ int32_t *rptr; /* Rear pointer. */
+ int32_t *state; /* Array of state values. */
+ int vm_rand_type; /* Type of random number generator. */
+ int vm_rand_deg; /* Degree of random number generator. */
+ int vm_rand_sep; /* Distance between front and rear. */
+ int32_t *end_ptr; /* Pointer behind state table. */
+};
+
+int vm_initstate (unsigned int seed,
+ void* arg_state,
+ size_t n,
+ struct vm_random_data* buf);
+int vm_setstate (void* arg_state,
+ struct vm_random_data* buf);
+void vm_default_initstate( int seed,
+ struct vm_random_data* buf );
+int vm_srandom (unsigned int seed,
+ struct vm_random_data* buf);
+int32_t vm_random (struct vm_random_data* buf);
+
+#endif /* !defined( __VM_RANDOM_H__ ) */