Skip to content

Commit beabe65

Browse files
committed
Contact fixed
1 parent 00bad83 commit beabe65

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ Please make sure to update tests as appropriate.
9797

9898
## License & copyright
9999
© Daniel Hajnal
100-
Licensed under the [MIT License](LICENSE).
100+
Licensed under the [MIT License](LICENSE).

inc/interpreter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Created on Tue June 18 2020
33
*
44
* Copyright (c) 2020 - Daniel Hajnal
5-
*/
5+
6+
*/
67

78

89
// Include Guard
@@ -65,4 +66,4 @@ void execute( char *cmd, int(*resp_fn)(const char*, ...) );
6566

6667
void teszt(void);
6768

68-
#endif
69+
#endif

src/interpreter.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Created on Tue June 18 2020
33
*
44
* Copyright (c) 2020 - Daniel Hajnal
5+
56
*/
67

78

@@ -142,8 +143,8 @@ void add_interpreter_instruction(const char **name, const char **desc, void (*fu
142143
API_tree[0].left = NULL; // because it is the first element of the tree,
143144
API_tree[0].right = NULL; // left and right branches has to be NULL
144145

145-
API_tree[0].place = 0; // default place = 0
146-
146+
API_tree[0].place = 0; // default place = 0
147+
147148
}
148149

149150
// if it is ot the first command we have to find it's place in the tree
@@ -164,7 +165,7 @@ void add_interpreter_instruction(const char **name, const char **desc, void (*fu
164165
}
165166

166167
// link the new item on the previous branch
167-
( comp_res > 0 ) ? ( ( prev->left ) = &API_tree[API_cntr] ) : ( ( prev->right ) = &API_tree[API_cntr] );
168+
( comp_res > 0 ) ? ( ( prev->left ) = &API_tree[API_cntr] ) : ( ( prev->right ) = &API_tree[API_cntr] );
168169

169170
// Fill the new item parameters
170171

@@ -175,7 +176,7 @@ void add_interpreter_instruction(const char **name, const char **desc, void (*fu
175176
API_tree[API_cntr].left = NULL; // close the branch
176177
API_tree[API_cntr].right = NULL;
177178

178-
API_tree[API_cntr].place = 0; // default place = 0
179+
API_tree[API_cntr].place = 0; // default place = 0
179180

180181
}
181182

@@ -194,7 +195,7 @@ void index_apis_in_order(API_t *head){
194195
#ifdef INTERPRETER_DBG
195196
INTERPRETER_DBG( "Indexer finished...\r\n" );
196197
#endif
197-
198+
198199

199200
}
200201

@@ -213,13 +214,13 @@ void recursive_indexer(API_t *head){
213214
head -> place = API_place_cntr;
214215
API_place_cntr++;
215216

216-
recursive_indexer( head -> right );
217+
recursive_indexer( head -> right );
217218

218219
}
219220

220221
// This function is used to print out the API to the console
221222
void print_apis_in_order(API_t *head){
222-
223+
223224
// End of recursive algorythm
224225
if( head == 0 ){
225226
return;
@@ -239,7 +240,7 @@ uint16_t find_api_index_by_place( uint16_t place ){
239240
for( i = 0; i < NUM_OF_API_FUNCS; i++ ){
240241

241242
if( API_tree[i].place == place ){
242-
243+
243244
return i;
244245

245246
}
@@ -331,7 +332,7 @@ void recursive_optimiser( int32_t start_index, int32_t stop_index ){
331332
}
332333

333334
void execute( char *cmd, int(*resp_fn)(const char*, ...) ){
334-
335+
335336
API_t *next;
336337
API_t *prev;
337338
int8_t comp_res;
@@ -358,7 +359,7 @@ void execute( char *cmd, int(*resp_fn)(const char*, ...) ){
358359
*arg = '\0';
359360
arg++;
360361

361-
}
362+
}
362363

363364

364365
prev = &API_tree[0];

src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Created on Tue June 18 2020
33
*
44
* Copyright (c) 2020 - Daniel Hajnal
5+
56
*/
67

78

@@ -50,4 +51,4 @@ int main(){
5051
printf( "Program end..." );
5152

5253
return 0;
53-
}
54+
}

0 commit comments

Comments
 (0)