diff -r 873a5b60a7ea -r 8998c8b24b60 stage4/generate_cc/generate_cc_sfc.cc --- a/stage4/generate_cc/generate_cc_sfc.cc Thu Jul 12 11:24:32 2007 +0200 +++ b/stage4/generate_cc/generate_cc_sfc.cc Fri Jul 13 19:20:26 2007 +0200 @@ -783,7 +783,7 @@ s4o.indent_right(); s4o.print(s4o.indent_spaces); print_variable_prefix(); - s4o.print("step_list[i].elapsed_time = __add_timespec("); + s4o.print("step_list[i].elapsed_time = __time_add("); print_variable_prefix(); s4o.print("step_list[i].elapsed_time, PERIOD);\n"); s4o.indent_left(); @@ -808,16 +808,16 @@ s4o.print("action_list[i].reset = 0;\n"); s4o.print(s4o.indent_spaces + "if ("); print_variable_prefix(); - s4o.print("__compare_timespec(>, action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); - s4o.indent_right(); - s4o.print(s4o.indent_spaces); - print_variable_prefix(); - s4o.print("action_list[i].set_remaining_time = __sub_timespec("); + s4o.print("__gt_TIME(action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); + s4o.indent_right(); + s4o.print(s4o.indent_spaces); + print_variable_prefix(); + s4o.print("action_list[i].set_remaining_time = __time_sub("); print_variable_prefix(); s4o.print("action_list[i].set_remaining_time, PERIOD);\n"); s4o.print(s4o.indent_spaces + "if ("); print_variable_prefix(); - s4o.print("__compare_timespec(<=, action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); + s4o.print("__le_TIME(action_list[i].set_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); s4o.indent_right(); s4o.print(s4o.indent_spaces); print_variable_prefix(); @@ -831,16 +831,16 @@ s4o.print(s4o.indent_spaces + "}\n"); s4o.print(s4o.indent_spaces + "if ("); print_variable_prefix(); - s4o.print("__compare_timespec(>, action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); - s4o.indent_right(); - s4o.print(s4o.indent_spaces); - print_variable_prefix(); - s4o.print("action_list[i].reset_remaining_time = __sub_timespec("); + s4o.print("__gt_TIME(action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); + s4o.indent_right(); + s4o.print(s4o.indent_spaces); + print_variable_prefix(); + s4o.print("action_list[i].reset_remaining_time = __time_sub("); print_variable_prefix(); s4o.print("action_list[i].reset_remaining_time, PERIOD);\n"); s4o.print(s4o.indent_spaces + "if ("); print_variable_prefix(); - s4o.print("__compare_timespec(<=, action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); + s4o.print("__le_TIME(action_list[i].reset_remaining_time, __time_to_timespec(1, 0, 0, 0, 0, 0)) {\n"); s4o.indent_right(); s4o.print(s4o.indent_spaces); print_variable_prefix();