| [4d61ad0] | 1 | /*!#########################################################
|
|---|
| 2 | ! This file is part of OpenAD released under the LGPL. #
|
|---|
| 3 | ! The full COPYRIGHT notice can be found in the top #
|
|---|
| 4 | ! level directory of the OpenAD distribution #
|
|---|
| 5 | !#########################################################
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #include <stdio.h>
|
|---|
| 9 | #include "ad_tape.h"
|
|---|
| 10 |
|
|---|
| 11 | /* Globals */
|
|---|
| 12 | double __ADIC_double_tape[max_double_tape_size] = {0};
|
|---|
| 13 | int __ADIC_integer_tape[max_integer_tape_size] = {0};
|
|---|
| 14 | int __ADIC_logical_tape[max_logical_tape_size] = {0};
|
|---|
| 15 | char* __ADIC_character_tape[max_character_tape_size] = {0};
|
|---|
| 16 | int __ADIC_stringlength_tape[max_stringlength_tape_size] = {0};
|
|---|
| 17 |
|
|---|
| 18 | int __ADIC_double_tape_pointer= 0, __ADIC_integer_tape_pointer = 0 , __ADIC_logical_tape_pointer = 0, __ADIC_character_tape_pointer = 0, __ADIC_stringlength_tape_pointer =0;
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | void __ADIC_TapeInit()
|
|---|
| 22 | {
|
|---|
| 23 | __ADIC_double_tape_pointer = 0;
|
|---|
| 24 | __ADIC_integer_tape_pointer = 0;
|
|---|
| 25 | __ADIC_logical_tape_pointer = 0;
|
|---|
| 26 | __ADIC_character_tape_pointer = 0;
|
|---|
| 27 | __ADIC_stringlength_tape_pointer = 0;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | void __ADIC_TapeDump()
|
|---|
| 33 | {
|
|---|
| 34 | int i;
|
|---|
| 35 | printf("\n double tape");
|
|---|
| 36 | for (i=0; i < __ADIC_double_tape_pointer; i++)
|
|---|
| 37 | printf("\n %lf", __ADIC_double_tape[i]);
|
|---|
| 38 |
|
|---|
| 39 | printf("\n integer tape");
|
|---|
| 40 | for(i=0; i < __ADIC_integer_tape_pointer; i++)
|
|---|
| 41 | printf("\n %d", __ADIC_integer_tape[i]);
|
|---|
| 42 |
|
|---|
| 43 | printf("\n logical tape");
|
|---|
| 44 | for(i=0; i < __ADIC_logical_tape_pointer; i++)
|
|---|
| 45 | printf("\n %d", __ADIC_logical_tape[i]);
|
|---|
| 46 |
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|