summaryrefslogtreecommitdiffstats
path: root/tdescreensaver/kdesavers/vm.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:16:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:16:15 -0600
commit7e09b5c2efae58399621a938de26b9675b8ba621 (patch)
treede2c9535e1f4c48ae91910492d298eba1d593fd5 /tdescreensaver/kdesavers/vm.h
parent159f7e147ac33c924b3ce9050c8f03cbc54916ee (diff)
downloadtdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.tar.gz
tdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdescreensaver/kdesavers/vm.h')
-rw-r--r--tdescreensaver/kdesavers/vm.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/vm.h b/tdescreensaver/kdesavers/vm.h
new file mode 100644
index 00000000..dc64d241
--- /dev/null
+++ b/tdescreensaver/kdesavers/vm.h
@@ -0,0 +1,52 @@
+#ifndef __VM_H__
+#define __VM_H__
+
+#include <stdlib.h>
+#include <stdio.h> /* !!! */
+#include <limits.h>
+#include "vm_random.h"
+
+#define VM_OP_STOP 1
+#define VM_OP_COPY 2
+#define VM_OP_EXEC 3
+#define VM_OP_WAIT 4
+#define VM_OP_PUSH (INT_MAX/2)
+
+struct tvm_process {
+ int position;
+ int* stack;
+ int stack_top;
+ int age;
+ int reverse;
+ struct tvm_process* next;
+};
+
+struct tvm_pool {
+ int* area;
+ int area_size;
+ struct tvm_process* processes;
+ int max_stack_size;
+ int max_threads_num;
+ int reverse_enabled;
+ struct vm_random_data vm_random_data;
+};
+
+int vm_init_pool( struct tvm_pool** pool,
+ int area_size,
+ int max_stack_size,
+ int max_threads_num );
+void vm_modify( struct tvm_pool* pool,
+ int position,
+ int op );
+void vm_exec( struct tvm_pool* pool,
+ int position,
+ int age,
+ int reverse );
+void vm_enable_reverse( struct tvm_pool* pool,
+ const int enabled );
+int vm_get_reverse( struct tvm_pool* pool );
+void vm_iterate( struct tvm_pool* pool,
+ char* modified );
+void vm_done_pool( struct tvm_pool* pool );
+
+#endif /* !defined( __VM_H__ ) */