--- /dev/null
+#include <stdio.h>
+
+#include "printarray.h"
+
+void printarray_init(DOLProcess *p) {
+ p->local->index = 0;
+}
+
+int printarray_fire(DOLProcess *p) {
+
+ int len;
+ int * array;
+ DOL_read((void*)PORT_IN1, &len, sizeof(int), p);
+ DOL_read((void*)PORT_IN2, array, sizeof(int)*len, p);
+
+ printf("sorted output\n");
+ for(i=0;i<LENGTH;i++)
+ printf("%d ", array[i]);
+ printf("\n");
+
+ free(array);
+ DOL_detach(p);
+ return -1;
+}
+