Mercurial > baum
comparison actions.c @ 10:0e15841ae111
s/list/stack/g because thats what it is
author | meillo@marmaro.de |
---|---|
date | Sat, 09 Feb 2008 16:49:29 +0100 |
parents | c202ccccedb5 |
children | 8a8da74530dd |
comparison
equal
deleted
inserted
replaced
9:c020b0d1cfca | 10:0e15841ae111 |
---|---|
72 | 72 |
73 | 73 |
74 unsigned char action_input(struct Node* node) { | 74 unsigned char action_input(struct Node* node) { |
75 /* | 75 /* |
76 unsigned char input = (unsigned char) getchar(); | 76 unsigned char input = (unsigned char) getchar(); |
77 getchar(); /* catches the newline */ | 77 getchar(); |
78 */ | |
78 | 79 |
79 /* reads a number which is treated as ASCII value */ | 80 /* reads a number which is treated as ASCII value */ |
80 int input; | 81 int input; |
81 scanf("%d", &input); | 82 scanf("%d", &input); |
82 input = input % 256; | 83 input = input % 256; |
88 | 89 |
89 unsigned char action_times(struct Node* node) { | 90 unsigned char action_times(struct Node* node) { |
90 struct Node* tp; | 91 struct Node* tp; |
91 unsigned char i; | 92 unsigned char i; |
92 tp = node->down; | 93 tp = node->down; |
93 for (i; i < node->value; i++) { | 94 for (i = 0; i < node->value; i++) { |
94 /* deep copy */ | 95 /* deep copy */ |
95 } | 96 } |
96 return 0; | 97 return 0; |
97 } | 98 } |
98 | 99 |