Mercurial > repos > rhope
comparison interp.c @ 14:69dfca29565f
C backend close to being useable
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 26 May 2009 23:52:32 +0000 |
parents | 76568becd6d6 |
children | 20d40cb8abf3 |
comparison
equal
deleted
inserted
replaced
12:31f8182f3433 | 14:69dfca29565f |
---|---|
996 VIS_InitializeCriticalSection(data_lock); | 996 VIS_InitializeCriticalSection(data_lock); |
997 DEBUGPUTS("Initializing worker_queue_lock\n"); | 997 DEBUGPUTS("Initializing worker_queue_lock\n"); |
998 VIS_InitializeCriticalSection(worker_queue_lock); | 998 VIS_InitializeCriticalSection(worker_queue_lock); |
999 DEBUGPUTS("Initializing text_buf_lock\n"); | 999 DEBUGPUTS("Initializing text_buf_lock\n"); |
1000 VIS_InitializeCriticalSection(text_buf_lock); | 1000 VIS_InitializeCriticalSection(text_buf_lock); |
1001 #ifdef GUI_LIB | |
1001 #ifdef SYLLABLE | 1002 #ifdef SYLLABLE |
1002 DEBUGPUTS("vis_window_init\n"); | 1003 DEBUGPUTS("vis_window_init\n"); |
1003 vis_window_init(); | 1004 vis_window_init(); |
1004 #endif | 1005 #endif |
1006 #endif //GUI_LIB | |
1005 VIS_CreateEvent(queue_add_event);//No security parameter, auto reset, starts signaled, no name | 1007 VIS_CreateEvent(queue_add_event);//No security parameter, auto reset, starts signaled, no name |
1006 | 1008 |
1007 } | 1009 } |
1008 | 1010 |
1009 void close_sync_primitives() | 1011 void close_sync_primitives() |
2130 aworker = create_worker(prog, "New Blueprint@Program", 2, 2, WORKER_TYPE); | 2132 aworker = create_worker(prog, "New Blueprint@Program", 2, 2, WORKER_TYPE); |
2131 aworker->implement_func=(custom_worker *)vis_program_newblueprint; | 2133 aworker->implement_func=(custom_worker *)vis_program_newblueprint; |
2132 aworker->input_types[0] = BUILTIN_TYPE_PROGRAM; | 2134 aworker->input_types[0] = BUILTIN_TYPE_PROGRAM; |
2133 aworker->input_types[1] = BUILTIN_TYPE_STRING; | 2135 aworker->input_types[1] = BUILTIN_TYPE_STRING; |
2134 | 2136 |
2137 #ifdef GUI_LIB | |
2135 #ifdef SYLLABLE | 2138 #ifdef SYLLABLE |
2136 create_company(prog, "Checkbox", 2, 0, FALSE); | 2139 create_company(prog, "Checkbox", 2, 0, FALSE); |
2137 | 2140 |
2138 aworker = create_worker(prog, "New@Checkbox", 4, 1, WORKER_TYPE); | 2141 aworker = create_worker(prog, "New@Checkbox", 4, 1, WORKER_TYPE); |
2139 aworker->implement_func=(custom_worker *)vis_checkbox_new; | 2142 aworker->implement_func=(custom_worker *)vis_checkbox_new; |
2169 | 2172 |
2170 aworker = create_worker(prog, "Select@Dropdown", 2, 1, WORKER_TYPE); | 2173 aworker = create_worker(prog, "Select@Dropdown", 2, 1, WORKER_TYPE); |
2171 aworker->implement_func=(custom_worker *)vis_dropdown_select; | 2174 aworker->implement_func=(custom_worker *)vis_dropdown_select; |
2172 aworker->input_types[0] = BUILTIN_TYPE_DROPDOWN; | 2175 aworker->input_types[0] = BUILTIN_TYPE_DROPDOWN; |
2173 aworker->input_types[1] = BUILTIN_TYPE_WHOLE; | 2176 aworker->input_types[1] = BUILTIN_TYPE_WHOLE; |
2177 #endif | |
2174 #endif | 2178 #endif |
2175 | 2179 |
2176 /*if(current_def > num_defs) | 2180 /*if(current_def > num_defs) |
2177 num_defs = current_def; | 2181 num_defs = current_def; |
2178 if(current_company > num_companies) | 2182 if(current_company > num_companies) |
3083 converter = find_converter_method(process_def->input_types[i], params[i]->company->type_id, process_def->program); | 3087 converter = find_converter_method(process_def->input_types[i], params[i]->company->type_id, process_def->program); |
3084 if(!converter) | 3088 if(!converter) |
3085 { | 3089 { |
3086 if(worker_entry.instance) { | 3090 if(worker_entry.instance) { |
3087 ERRORPRINTF("Error: Needed conversion from %s to %s for input %d of %s in worker %s\n", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name, worker_entry.instance->def->name); | 3091 ERRORPRINTF("Error: Needed conversion from %s to %s for input %d of %s in worker %s\n", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name, worker_entry.instance->def->name); |
3092 print_stack_trace(worker_entry.instance); | |
3088 } else { | 3093 } else { |
3089 DEBUGPRINTF("Error: Needed conversion from %s to %s for input %d of %s\n", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name); | 3094 DEBUGPRINTF("Error: Needed conversion from %s to %s for input %d of %s\n", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name); |
3090 printf("Error: Needed conversion from %s to %s for input %d of %s", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name); | 3095 printf("Error: Needed conversion from %s to %s for input %d of %s", params[i]->company->name, process_def->program->companylist[process_def->input_types[i]].name, i, process_def->name); |
3091 } | 3096 } |
3092 execute_active = FALSE; | 3097 execute_active = FALSE; |