diff vm.h @ 120:66ca475e2a5a src

- provide the means to make copies of the VM to try certain operations on a copy and merge the changes back on success - do not trigger an assertion when falling off a program chain, but stop the VM
author mroi
date Wed, 12 Mar 2003 11:38:11 +0000
parents b6834e6359cf
children d09a81cf65ce
line wrap: on
line diff
--- a/vm.h	Sat Mar 08 14:04:20 2003 +0000
+++ b/vm.h	Wed Mar 12 11:38:11 2003 +0000
@@ -113,7 +113,7 @@
 #define PTL_REG      registers.SPRM[13]
 
 /* Initialisation & destruction */
-vm_t* vm_new_vm();
+vm_t *vm_new_vm();
 void  vm_free_vm(vm_t *vm);
 
 /* IFO access */
@@ -128,6 +128,11 @@
 void vm_stop(vm_t *vm);
 int  vm_reset(vm_t *vm, const char *dvdroot);
 
+/* copying and merging  - useful for try-running an operation */
+vm_t *vm_new_copy(vm_t *vm);
+void  vm_merge(vm_t *target, vm_t *source);
+void  vm_free_copy(vm_t *vm);
+
 /* regular playback */
 void vm_position_get(vm_t *vm, vm_position_t *position);
 void vm_get_next_cell(vm_t *vm);