summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/term/acs_chars.c2
-rw-r--r--src/term/alt_scancode_esc.c2
-rw-r--r--src/term/auto_left_margin.c2
-rw-r--r--src/term/auto_right_margin.c2
-rw-r--r--src/term/back_color_erase.c2
-rw-r--r--src/term/back_tab.c2
-rw-r--r--src/term/bell.c2
-rw-r--r--src/term/bit_image_carriage_return.c2
-rw-r--r--src/term/bit_image_entwining.c2
-rw-r--r--src/term/bit_image_newline.c2
-rw-r--r--src/term/bit_image_repeat.c2
-rw-r--r--src/term/bit_image_type.c2
-rw-r--r--src/term/buffer_capacity.c2
-rw-r--r--src/term/buttons.c2
-rw-r--r--src/term/can_change.c2
-rw-r--r--src/term/carriage_return.c2
-rw-r--r--src/term/ceol_standout_glitch.c2
-rw-r--r--src/term/change_char_pitch.c2
-rw-r--r--src/term/change_line_pitch.c2
-rw-r--r--src/term/change_res_horz.c2
-rw-r--r--src/term/change_res_vert.c2
-rw-r--r--src/term/change_scroll_region.c2
-rw-r--r--src/term/char_padding.c2
-rw-r--r--src/term/char_set_names.c2
-rw-r--r--src/term/clear_all_tabs.c2
-rw-r--r--src/term/clear_margins.c2
-rw-r--r--src/term/clear_screen.c2
-rw-r--r--src/term/clr_bol.c2
-rw-r--r--src/term/clr_eol.c2
-rw-r--r--src/term/clr_eos.c2
-rw-r--r--src/term/code_set_init.c2
-rw-r--r--src/term/col_addr_glitch.c2
-rw-r--r--src/term/color_names.c2
-rw-r--r--src/term/column_address.c2
-rw-r--r--src/term/columns.c2
-rw-r--r--src/term/command_character.c2
-rw-r--r--src/term/cpi_change_res.c2
-rw-r--r--src/term/cr_cancles_micro_mode.c2
-rw-r--r--src/term/create_window.c2
-rw-r--r--src/term/cursor_address.c2
-rw-r--r--src/term/cursor_down.c2
-rw-r--r--src/term/cursor_home.c2
-rw-r--r--src/term/cursor_invisible.c2
-rw-r--r--src/term/cursor_left.c2
-rw-r--r--src/term/cursor_mem_address.c2
-rw-r--r--src/term/cursor_normal.c2
-rw-r--r--src/term/cursor_right.c2
-rw-r--r--src/term/cursor_to_ll.c2
-rw-r--r--src/term/cursor_up.c2
-rw-r--r--src/term/cursor_visible.c2
-rw-r--r--src/term/define_bit_image_region.c2
-rw-r--r--src/term/define_char.c2
-rw-r--r--src/term/delete_character.c2
-rw-r--r--src/term/delete_line.c2
-rw-r--r--src/term/dest_tabs_magic_smso.c2
-rw-r--r--src/term/device_type.c2
-rw-r--r--src/term/dial_phone.c2
-rw-r--r--src/term/dis_status_line.c2
-rw-r--r--src/term/display_clock.c2
-rw-r--r--src/term/display_pc_char.c2
-rw-r--r--src/term/dot_horz_spacing.c2
-rw-r--r--src/term/dot_vert_spacing.c2
-rw-r--r--src/term/down_half_line.c2
-rw-r--r--src/term/eat_newline_glitch.c2
-rw-r--r--src/term/ena_acs.c2
-rw-r--r--src/term/end_bit_image_region.c2
-rw-r--r--src/term/enter_alt_charset_mode.c2
-rw-r--r--src/term/enter_am_mode.c2
-rw-r--r--src/term/enter_blink_mode.c2
-rw-r--r--src/term/enter_bold_mode.c2
-rw-r--r--src/term/enter_ca_mode.c2
-rw-r--r--src/term/enter_delete_mode.c2
-rw-r--r--src/term/enter_dim_mode.c2
-rw-r--r--src/term/enter_doublewide_mode.c2
-rw-r--r--src/term/enter_draft_quality.c2
-rw-r--r--src/term/enter_horizontal_hl_mode.c2
-rw-r--r--src/term/enter_insert_mode.c2
-rw-r--r--src/term/enter_italics_mode.c2
-rw-r--r--src/term/enter_left_hl_mode.c2
-rw-r--r--src/term/enter_leftward_mode.c2
-rw-r--r--src/term/enter_low_hl_mode.c2
-rw-r--r--src/term/enter_micro_code.c2
-rw-r--r--src/term/enter_near_letter_quality.c2
-rw-r--r--src/term/enter_normal_quality.c2
-rw-r--r--src/term/enter_pc_charset_mode.c2
-rw-r--r--src/term/enter_protected_mode.c2
-rw-r--r--src/term/enter_reverse_mode.c2
-rw-r--r--src/term/enter_right_hl_mode.c2
-rw-r--r--src/term/enter_scancode_mode.c2
-rw-r--r--src/term/enter_secure_mode.c2
-rw-r--r--src/term/enter_shadow_mode.c2
-rw-r--r--src/term/enter_standout_mode.c2
-rw-r--r--src/term/enter_subscript_mode.c2
-rw-r--r--src/term/enter_superscript_mode.c2
-rw-r--r--src/term/enter_top_hl_mode.c2
-rw-r--r--src/term/enter_underline_mode.c2
-rw-r--r--src/term/enter_upward_mode.c2
-rw-r--r--src/term/enter_vertical_hl_mode.c2
-rw-r--r--src/term/enter_xon_mode.c2
-rw-r--r--src/term/erase_chars.c2
-rw-r--r--src/term/erase_overstrick.c2
-rw-r--r--src/term/exit_alt_charset_mode.c2
-rw-r--r--src/term/exit_am_mode.c2
-rw-r--r--src/term/exit_attribute_mode.c2
-rw-r--r--src/term/exit_ca_mode.c2
-rw-r--r--src/term/exit_delete_mode.c2
-rw-r--r--src/term/exit_doublewide_mode.c2
-rw-r--r--src/term/exit_insert_mode.c2
-rw-r--r--src/term/exit_italics_mode.c2
-rw-r--r--src/term/exit_leftword_mode.c2
-rw-r--r--src/term/exit_micro_mode.c2
-rw-r--r--src/term/exit_pc_charset_mode.c2
-rw-r--r--src/term/exit_scancode_mode.c2
-rw-r--r--src/term/exit_shadow_mode.c2
-rw-r--r--src/term/exit_standout_mode.c2
-rw-r--r--src/term/exit_subscript_mode.c2
-rw-r--r--src/term/exit_superscript_mode.c2
-rw-r--r--src/term/exit_underline_mode.c2
-rw-r--r--src/term/exit_upward_mode.c2
-rw-r--r--src/term/exit_xon_mode.c2
-rw-r--r--src/term/fixed_pause.c2
-rw-r--r--src/term/flash_hook.c2
-rw-r--r--src/term/flash_screen.c2
-rw-r--r--src/term/form_feed.c2
-rw-r--r--src/term/from_status_line.c2
-rw-r--r--src/term/generic_type.c2
-rw-r--r--src/term/get_mouse.c2
-rw-r--r--src/term/goto_window.c2
-rw-r--r--src/term/hangup.c2
-rw-r--r--src/term/hard_copy.c2
-rw-r--r--src/term/hard_cursor.c2
-rw-r--r--src/term/has_meta_key.c2
-rw-r--r--src/term/has_print_wheel.c2
-rw-r--r--src/term/has_status_line.c2
-rw-r--r--src/term/hue_lightness_saturation.c2
-rw-r--r--src/term/init_1string.c2
-rw-r--r--src/term/init_2string.c2
-rw-r--r--src/term/init_3string.c2
-rw-r--r--src/term/init_file.c2
-rw-r--r--src/term/init_prog.c2
-rw-r--r--src/term/init_tabs.c2
-rw-r--r--src/term/initialize_color.c2
-rw-r--r--src/term/initialize_pair.c2
-rw-r--r--src/term/insert_character.c2
-rw-r--r--src/term/insert_line.c2
-rw-r--r--src/term/insert_null_glitch.c2
-rw-r--r--src/term/insert_padding.c2
-rw-r--r--src/term/key_a1.c2
-rw-r--r--src/term/key_a3.c2
-rw-r--r--src/term/key_b2.c2
-rw-r--r--src/term/key_backspace.c2
-rw-r--r--src/term/key_beg.c2
-rw-r--r--src/term/key_btab.c2
-rw-r--r--src/term/key_c1.c2
-rw-r--r--src/term/key_c3.c2
-rw-r--r--src/term/key_cancel.c2
-rw-r--r--src/term/key_catab.c2
-rw-r--r--src/term/key_clear.c2
-rw-r--r--src/term/key_close.c2
-rw-r--r--src/term/key_command.c2
-rw-r--r--src/term/key_copy.c2
-rw-r--r--src/term/key_create.c2
-rw-r--r--src/term/key_ctab.c2
-rw-r--r--src/term/key_dc.c2
-rw-r--r--src/term/key_dl.c2
-rw-r--r--src/term/key_down.c2
-rw-r--r--src/term/key_eic.c2
-rw-r--r--src/term/key_end.c2
-rw-r--r--src/term/key_enter.c2
-rw-r--r--src/term/key_eol.c2
-rw-r--r--src/term/key_eos.c2
-rw-r--r--src/term/key_exit.c2
-rw-r--r--src/term/key_f0.c2
-rw-r--r--src/term/key_f1.c2
-rw-r--r--src/term/key_f10.c2
-rw-r--r--src/term/key_f11.c2
-rw-r--r--src/term/key_f12.c2
-rw-r--r--src/term/key_f13.c2
-rw-r--r--src/term/key_f14.c2
-rw-r--r--src/term/key_f15.c2
-rw-r--r--src/term/key_f16.c2
-rw-r--r--src/term/key_f17.c2
-rw-r--r--src/term/key_f18.c2
-rw-r--r--src/term/key_f19.c2
-rw-r--r--src/term/key_f2.c2
-rw-r--r--src/term/key_f20.c2
-rw-r--r--src/term/key_f21.c2
-rw-r--r--src/term/key_f22.c2
-rw-r--r--src/term/key_f23.c2
-rw-r--r--src/term/key_f24.c2
-rw-r--r--src/term/key_f25.c2
-rw-r--r--src/term/key_f26.c2
-rw-r--r--src/term/key_f27.c2
-rw-r--r--src/term/key_f28.c2
-rw-r--r--src/term/key_f29.c2
-rw-r--r--src/term/key_f3.c2
-rw-r--r--src/term/key_f30.c2
-rw-r--r--src/term/key_f31.c2
-rw-r--r--src/term/key_f32.c2
-rw-r--r--src/term/key_f33.c2
-rw-r--r--src/term/key_f34.c2
-rw-r--r--src/term/key_f35.c2
-rw-r--r--src/term/key_f36.c2
-rw-r--r--src/term/key_f37.c2
-rw-r--r--src/term/key_f38.c2
-rw-r--r--src/term/key_f39.c2
-rw-r--r--src/term/key_f4.c2
-rw-r--r--src/term/key_f40.c2
-rw-r--r--src/term/key_f41.c2
-rw-r--r--src/term/key_f42.c2
-rw-r--r--src/term/key_f43.c2
-rw-r--r--src/term/key_f44.c2
-rw-r--r--src/term/key_f45.c2
-rw-r--r--src/term/key_f46.c2
-rw-r--r--src/term/key_f47.c2
-rw-r--r--src/term/key_f48.c2
-rw-r--r--src/term/key_f49.c2
-rw-r--r--src/term/key_f5.c2
-rw-r--r--src/term/key_f50.c2
-rw-r--r--src/term/key_f51.c2
-rw-r--r--src/term/key_f52.c2
-rw-r--r--src/term/key_f53.c2
-rw-r--r--src/term/key_f54.c2
-rw-r--r--src/term/key_f55.c2
-rw-r--r--src/term/key_f56.c2
-rw-r--r--src/term/key_f57.c2
-rw-r--r--src/term/key_f58.c2
-rw-r--r--src/term/key_f59.c2
-rw-r--r--src/term/key_f6.c2
-rw-r--r--src/term/key_f60.c2
-rw-r--r--src/term/key_f61.c2
-rw-r--r--src/term/key_f62.c2
-rw-r--r--src/term/key_f63.c2
-rw-r--r--src/term/key_f7.c2
-rw-r--r--src/term/key_f8.c2
-rw-r--r--src/term/key_f9.c2
-rw-r--r--src/term/key_find.c2
-rw-r--r--src/term/key_help.c2
-rw-r--r--src/term/key_home.c2
-rw-r--r--src/term/key_ic.c2
-rw-r--r--src/term/key_il.c2
-rw-r--r--src/term/key_left.c2
-rw-r--r--src/term/key_ll.c2
-rw-r--r--src/term/key_mark.c2
-rw-r--r--src/term/key_message.c2
-rw-r--r--src/term/key_mouse.c2
-rw-r--r--src/term/key_move.c2
-rw-r--r--src/term/key_next.c2
-rw-r--r--src/term/key_npage.c2
-rw-r--r--src/term/key_open.c2
-rw-r--r--src/term/key_options.c2
-rw-r--r--src/term/key_ppage.c2
-rw-r--r--src/term/key_previous.c2
-rw-r--r--src/term/key_print.c2
-rw-r--r--src/term/key_redo.c2
-rw-r--r--src/term/key_reference.c2
-rw-r--r--src/term/key_refresh.c2
-rw-r--r--src/term/key_replace.c2
-rw-r--r--src/term/key_restart.c2
-rw-r--r--src/term/key_resume.c2
-rw-r--r--src/term/key_right.c2
-rw-r--r--src/term/key_save.c2
-rw-r--r--src/term/key_sbeg.c2
-rw-r--r--src/term/key_scancel.c2
-rw-r--r--src/term/key_scommand.c2
-rw-r--r--src/term/key_scopy.c2
-rw-r--r--src/term/key_screate.c2
-rw-r--r--src/term/key_sdc.c2
-rw-r--r--src/term/key_sdl.c2
-rw-r--r--src/term/key_select.c2
-rw-r--r--src/term/key_send.c2
-rw-r--r--src/term/key_seol.c2
-rw-r--r--src/term/key_sexit.c2
-rw-r--r--src/term/key_sf.c2
-rw-r--r--src/term/key_sfind.c2
-rw-r--r--src/term/key_shelp.c2
-rw-r--r--src/term/key_shome.c2
-rw-r--r--src/term/key_sic.c2
-rw-r--r--src/term/key_sleft.c2
-rw-r--r--src/term/key_smessage.c2
-rw-r--r--src/term/key_smove.c2
-rw-r--r--src/term/key_snext.c2
-rw-r--r--src/term/key_soptions.c2
-rw-r--r--src/term/key_sprevious.c2
-rw-r--r--src/term/key_sprint.c2
-rw-r--r--src/term/key_sr.c2
-rw-r--r--src/term/key_sredo.c2
-rw-r--r--src/term/key_sreplace.c2
-rw-r--r--src/term/key_sright.c2
-rw-r--r--src/term/key_srsume.c2
-rw-r--r--src/term/key_ssave.c2
-rw-r--r--src/term/key_ssuspend.c2
-rw-r--r--src/term/key_stab.c2
-rw-r--r--src/term/key_sundo.c2
-rw-r--r--src/term/key_suspend.c2
-rw-r--r--src/term/key_undo.c2
-rw-r--r--src/term/key_up.c2
-rw-r--r--src/term/keypad_local.c2
-rw-r--r--src/term/keypad_xmit.c2
-rw-r--r--src/term/lab_f0.c2
-rw-r--r--src/term/lab_f1.c2
-rw-r--r--src/term/lab_f10.c2
-rw-r--r--src/term/lab_f2.c2
-rw-r--r--src/term/lab_f3.c2
-rw-r--r--src/term/lab_f4.c2
-rw-r--r--src/term/lab_f5.c2
-rw-r--r--src/term/lab_f6.c2
-rw-r--r--src/term/lab_f7.c2
-rw-r--r--src/term/lab_f8.c2
-rw-r--r--src/term/lab_f9.c2
-rw-r--r--src/term/label_format.c2
-rw-r--r--src/term/label_height.c2
-rw-r--r--src/term/label_off.c2
-rw-r--r--src/term/label_on.c2
-rw-r--r--src/term/label_width.c2
-rw-r--r--src/term/lines.c2
-rw-r--r--src/term/lines_of_memory.c2
-rw-r--r--src/term/lpi_changes_res.c2
-rw-r--r--src/term/magic_cookie_glitch.c2
-rw-r--r--src/term/max_attributes.c2
-rw-r--r--src/term/max_colors.c2
-rw-r--r--src/term/max_micro_address.c2
-rw-r--r--src/term/max_micro_jump.c2
-rw-r--r--src/term/max_pairs.c2
-rw-r--r--src/term/maximum_windows.c2
-rw-r--r--src/term/memory_above.c2
-rw-r--r--src/term/memory_below.c2
-rw-r--r--src/term/meta_off.c2
-rw-r--r--src/term/meta_on.c2
-rw-r--r--src/term/micro_col_size.c2
-rw-r--r--src/term/micro_colum_address.c2
-rw-r--r--src/term/micro_down.c2
-rw-r--r--src/term/micro_left.c2
-rw-r--r--src/term/micro_line_size.c2
-rw-r--r--src/term/micro_right.c2
-rw-r--r--src/term/micro_row_address.c2
-rw-r--r--src/term/micro_up.c2
-rw-r--r--src/term/mouse_info.c2
-rw-r--r--src/term/move_insert_mode.c2
-rw-r--r--src/term/move_standout_mode.c2
-rw-r--r--src/term/needs_xon_xoff.c2
-rw-r--r--src/term/newline.c2
-rw-r--r--src/term/no_color_video.c2
-rw-r--r--src/term/no_esc_ctlc.c2
-rw-r--r--src/term/no_pad_char.c2
-rw-r--r--src/term/non_dest_scroll_region.c2
-rw-r--r--src/term/non_rev_rmcup.c2
-rw-r--r--src/term/num_labels.c2
-rw-r--r--src/term/number_of_pins.c2
-rw-r--r--src/term/order_of_pins.c2
-rw-r--r--src/term/orig_colors.c2
-rw-r--r--src/term/orig_pair.c2
-rw-r--r--src/term/output_res_char.c2
-rw-r--r--src/term/output_res_horz_inch.c2
-rw-r--r--src/term/output_res_line.c2
-rw-r--r--src/term/output_res_vert_inch.c2
-rw-r--r--src/term/over_strike.c2
-rw-r--r--src/term/pad_char.c2
-rw-r--r--src/term/padding_baud_rate.c2
-rw-r--r--src/term/parm_dch.c2
-rw-r--r--src/term/parm_delete_line.c2
-rw-r--r--src/term/parm_down_cursor.c2
-rw-r--r--src/term/parm_down_micro.c2
-rw-r--r--src/term/parm_ich.c2
-rw-r--r--src/term/parm_index.c2
-rw-r--r--src/term/parm_insert_line.c2
-rw-r--r--src/term/parm_left_cursor.c2
-rw-r--r--src/term/parm_left_micro.c2
-rw-r--r--src/term/parm_right_cursor.c2
-rw-r--r--src/term/parm_right_micro.c2
-rw-r--r--src/term/parm_rindex.c2
-rw-r--r--src/term/parm_up_cursor.c2
-rw-r--r--src/term/parm_up_micro.c2
-rw-r--r--src/term/pc_term_options.c2
-rw-r--r--src/term/pkey_key.c2
-rw-r--r--src/term/pkey_local.c2
-rw-r--r--src/term/pkey_plab.c2
-rw-r--r--src/term/pkey_xmit.c2
-rw-r--r--src/term/plab_norm.c2
-rw-r--r--src/term/print_rate.c2
-rw-r--r--src/term/print_screen.c2
-rw-r--r--src/term/prtr_non.c2
-rw-r--r--src/term/prtr_off.c2
-rw-r--r--src/term/prtr_on.c2
-rw-r--r--src/term/prtr_silent.c2
-rw-r--r--src/term/pulse.c2
-rw-r--r--src/term/quick_dial.c2
-rw-r--r--src/term/remove_clock.c2
-rw-r--r--src/term/repeat_char.c2
-rw-r--r--src/term/req_for_input.c2
-rw-r--r--src/term/req_mouse_pos.c2
-rw-r--r--src/term/reset_1string.c2
-rw-r--r--src/term/reset_2string.c2
-rw-r--r--src/term/reset_3string.c2
-rw-r--r--src/term/reset_file.c2
-rw-r--r--src/term/restore_cursor.c2
-rw-r--r--src/term/row_addr_glitch.c2
-rw-r--r--src/term/row_address.c2
-rw-r--r--src/term/save_cursor.c2
-rw-r--r--src/term/scancode_escape.c2
-rw-r--r--src/term/scroll_forward.c2
-rw-r--r--src/term/scroll_reverse.c2
-rw-r--r--src/term/seT_top_margin.c2
-rw-r--r--src/term/select_char_set.c2
-rw-r--r--src/term/semi_auto_right_margin.c2
-rw-r--r--src/term/set0_des_seq.c2
-rw-r--r--src/term/set1_des_seq.c2
-rw-r--r--src/term/set2_des_seq.c2
-rw-r--r--src/term/set3_des_seq.c2
-rw-r--r--src/term/set_a_attributes.c2
-rw-r--r--src/term/set_a_background.c2
-rw-r--r--src/term/set_a_foreground.c2
-rw-r--r--src/term/set_attributes.c2
-rw-r--r--src/term/set_background.c2
-rw-r--r--src/term/set_bottom_margin.c2
-rw-r--r--src/term/set_bottom_margin_parm.c2
-rw-r--r--src/term/set_clock.c2
-rw-r--r--src/term/set_color_band.c2
-rw-r--r--src/term/set_color_pair.c2
-rw-r--r--src/term/set_foreground.c2
-rw-r--r--src/term/set_left_margin.c2
-rw-r--r--src/term/set_left_margin_parm.c2
-rw-r--r--src/term/set_lr_margin.c2
-rw-r--r--src/term/set_page_length.c2
-rw-r--r--src/term/set_pglen_inch.c2
-rw-r--r--src/term/set_right_margin.c2
-rw-r--r--src/term/set_right_margin_parm.c2
-rw-r--r--src/term/set_tab.c2
-rw-r--r--src/term/set_tb_margin.c2
-rw-r--r--src/term/set_top_margin_parm.c2
-rw-r--r--src/term/set_window.c2
-rw-r--r--src/term/start_bit_image.c2
-rw-r--r--src/term/start_char_set_def.c2
-rw-r--r--src/term/status_line_esc_ok.c2
-rw-r--r--src/term/stop_bit_image.c2
-rw-r--r--src/term/stop_char_set_def.c2
-rw-r--r--src/term/subscript_characters.c2
-rw-r--r--src/term/superscript_characters.c2
-rw-r--r--src/term/tab.c2
-rw-r--r--src/term/these_cause_cr.c2
-rw-r--r--src/term/tilde_glitch.c2
-rw-r--r--src/term/to_status_line.c2
-rw-r--r--src/term/tone.c2
-rw-r--r--src/term/transparent_underline.c2
-rw-r--r--src/term/underline_char.c2
-rw-r--r--src/term/up_half_line.c2
-rw-r--r--src/term/user0.c2
-rw-r--r--src/term/user1.c2
-rw-r--r--src/term/user2.c2
-rw-r--r--src/term/user3.c2
-rw-r--r--src/term/user4.c2
-rw-r--r--src/term/user5.c2
-rw-r--r--src/term/user6.c2
-rw-r--r--src/term/user7.c2
-rw-r--r--src/term/user8.c2
-rw-r--r--src/term/user9.c2
-rw-r--r--src/term/virtual_terminal.c2
-rw-r--r--src/term/wait_tone.c2
-rw-r--r--src/term/wide_char_size.c2
-rw-r--r--src/term/width_status_line.c2
-rw-r--r--src/term/xoff_character.c2
-rw-r--r--src/term/xon_character.c2
-rw-r--r--src/term/xon_xoff.c2
-rw-r--r--src/term/zero_motion.c2
464 files changed, 464 insertions, 464 deletions
diff --git a/src/term/acs_chars.c b/src/term/acs_chars.c
index eef761aa..7d5d91a1 100644
--- a/src/term/acs_chars.c
+++ b/src/term/acs_chars.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define acs_chars tigetstr("acsc")
diff --git a/src/term/alt_scancode_esc.c b/src/term/alt_scancode_esc.c
index b0c0f48f..e81d5906 100644
--- a/src/term/alt_scancode_esc.c
+++ b/src/term/alt_scancode_esc.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define alt_scancode_esc tigetstr("scesa")
diff --git a/src/term/auto_left_margin.c b/src/term/auto_left_margin.c
index dcfcfcd1..028de1bc 100644
--- a/src/term/auto_left_margin.c
+++ b/src/term/auto_left_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define auto_left_margin tigetflag("bw")
diff --git a/src/term/auto_right_margin.c b/src/term/auto_right_margin.c
index 3014c87d..0d746bfd 100644
--- a/src/term/auto_right_margin.c
+++ b/src/term/auto_right_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define auto_right_margin tigetflag("am")
diff --git a/src/term/back_color_erase.c b/src/term/back_color_erase.c
index 62540d1b..722daac6 100644
--- a/src/term/back_color_erase.c
+++ b/src/term/back_color_erase.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define back_color_erase tigetflag("bce")
diff --git a/src/term/back_tab.c b/src/term/back_tab.c
index 33eaa59a..a877a7ca 100644
--- a/src/term/back_tab.c
+++ b/src/term/back_tab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define back_tab tigetstr("cbt")
diff --git a/src/term/bell.c b/src/term/bell.c
index d64564dc..31bc1b5f 100644
--- a/src/term/bell.c
+++ b/src/term/bell.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bell tigetstr("bel")
diff --git a/src/term/bit_image_carriage_return.c b/src/term/bit_image_carriage_return.c
index d72d9291..7488672d 100644
--- a/src/term/bit_image_carriage_return.c
+++ b/src/term/bit_image_carriage_return.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bit_image_carriage_return tigetstr("bicr")
diff --git a/src/term/bit_image_entwining.c b/src/term/bit_image_entwining.c
index ee83ad5a..ac460949 100644
--- a/src/term/bit_image_entwining.c
+++ b/src/term/bit_image_entwining.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bit_image_entwining tigetnum("bitwin")
diff --git a/src/term/bit_image_newline.c b/src/term/bit_image_newline.c
index c0a71297..6536f4dc 100644
--- a/src/term/bit_image_newline.c
+++ b/src/term/bit_image_newline.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bit_image_newline tigetstr("binel")
diff --git a/src/term/bit_image_repeat.c b/src/term/bit_image_repeat.c
index 9ca9f93f..b5526702 100644
--- a/src/term/bit_image_repeat.c
+++ b/src/term/bit_image_repeat.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bit_image_repeat tigetstr("birep")
diff --git a/src/term/bit_image_type.c b/src/term/bit_image_type.c
index f3377c3f..6c03a4c0 100644
--- a/src/term/bit_image_type.c
+++ b/src/term/bit_image_type.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define bit_image_type tigetnum("bitype")
diff --git a/src/term/buffer_capacity.c b/src/term/buffer_capacity.c
index b1427037..10f6cf67 100644
--- a/src/term/buffer_capacity.c
+++ b/src/term/buffer_capacity.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define buffer_capacity tigetnum("bufsz")
diff --git a/src/term/buttons.c b/src/term/buttons.c
index 4827170a..46bb4cd8 100644
--- a/src/term/buttons.c
+++ b/src/term/buttons.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define buttons tigetnum("btns")
diff --git a/src/term/can_change.c b/src/term/can_change.c
index e8121119..d4d1c6cf 100644
--- a/src/term/can_change.c
+++ b/src/term/can_change.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define can_change tigetflag("ccc")
diff --git a/src/term/carriage_return.c b/src/term/carriage_return.c
index a5fb1157..408141f4 100644
--- a/src/term/carriage_return.c
+++ b/src/term/carriage_return.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define carriage_return tigetstr("cr")
diff --git a/src/term/ceol_standout_glitch.c b/src/term/ceol_standout_glitch.c
index d2e09236..2d24fccf 100644
--- a/src/term/ceol_standout_glitch.c
+++ b/src/term/ceol_standout_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define ceol_standout_glitch tigetflag("xhp")
diff --git a/src/term/change_char_pitch.c b/src/term/change_char_pitch.c
index 006291c4..20659e09 100644
--- a/src/term/change_char_pitch.c
+++ b/src/term/change_char_pitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define change_char_pitch tigetstr("cpi")
diff --git a/src/term/change_line_pitch.c b/src/term/change_line_pitch.c
index c2c85383..654b67a2 100644
--- a/src/term/change_line_pitch.c
+++ b/src/term/change_line_pitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define change_line_pitch tigetstr("lpi")
diff --git a/src/term/change_res_horz.c b/src/term/change_res_horz.c
index 41852e77..f19a0a1e 100644
--- a/src/term/change_res_horz.c
+++ b/src/term/change_res_horz.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define change_res_horz tigetstr("chr")
diff --git a/src/term/change_res_vert.c b/src/term/change_res_vert.c
index 4d41b575..6be62dd7 100644
--- a/src/term/change_res_vert.c
+++ b/src/term/change_res_vert.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define change_res_vert tigetstr("cvr")
diff --git a/src/term/change_scroll_region.c b/src/term/change_scroll_region.c
index 900f9aab..126c01f0 100644
--- a/src/term/change_scroll_region.c
+++ b/src/term/change_scroll_region.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define change_scroll_region tigetstr("csr")
diff --git a/src/term/char_padding.c b/src/term/char_padding.c
index 269bf777..d3274d95 100644
--- a/src/term/char_padding.c
+++ b/src/term/char_padding.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define char_padding tigetstr("rmp")
diff --git a/src/term/char_set_names.c b/src/term/char_set_names.c
index b385f3d3..da6579b7 100644
--- a/src/term/char_set_names.c
+++ b/src/term/char_set_names.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define char_set_names tigetstr("csnm")
diff --git a/src/term/clear_all_tabs.c b/src/term/clear_all_tabs.c
index e12ebe40..cc4730ff 100644
--- a/src/term/clear_all_tabs.c
+++ b/src/term/clear_all_tabs.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clear_all_tabs tigetstr("tbc")
diff --git a/src/term/clear_margins.c b/src/term/clear_margins.c
index 9edc2ac1..de547fa0 100644
--- a/src/term/clear_margins.c
+++ b/src/term/clear_margins.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clear_margins tigetstr("mgc")
diff --git a/src/term/clear_screen.c b/src/term/clear_screen.c
index 02233683..73d86062 100644
--- a/src/term/clear_screen.c
+++ b/src/term/clear_screen.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clear_screen tigetstr("clear")
diff --git a/src/term/clr_bol.c b/src/term/clr_bol.c
index e9fd9f6c..4993e077 100644
--- a/src/term/clr_bol.c
+++ b/src/term/clr_bol.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clr_bol tigetstr("el1")
diff --git a/src/term/clr_eol.c b/src/term/clr_eol.c
index 7494958b..e94964dc 100644
--- a/src/term/clr_eol.c
+++ b/src/term/clr_eol.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clr_eol tigetstr("el")
diff --git a/src/term/clr_eos.c b/src/term/clr_eos.c
index 71c7b420..cb7f8393 100644
--- a/src/term/clr_eos.c
+++ b/src/term/clr_eos.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define clr_eos tigetstr("el")
diff --git a/src/term/code_set_init.c b/src/term/code_set_init.c
index 019deffa..c7f4bd97 100644
--- a/src/term/code_set_init.c
+++ b/src/term/code_set_init.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define code_set_init tigetstr("csin")
diff --git a/src/term/col_addr_glitch.c b/src/term/col_addr_glitch.c
index 8fc153c4..84bb840a 100644
--- a/src/term/col_addr_glitch.c
+++ b/src/term/col_addr_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define col_addr_glitch tigetflag("xhpa")
diff --git a/src/term/color_names.c b/src/term/color_names.c
index 3c1df59c..c0c896b0 100644
--- a/src/term/color_names.c
+++ b/src/term/color_names.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define color_names tigetstr("colornm")
diff --git a/src/term/column_address.c b/src/term/column_address.c
index d1012ede..cfc22b92 100644
--- a/src/term/column_address.c
+++ b/src/term/column_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define column_address tigetstr("hpa")
diff --git a/src/term/columns.c b/src/term/columns.c
index c45d958f..f693eb46 100644
--- a/src/term/columns.c
+++ b/src/term/columns.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define columns tigetnum("cols")
diff --git a/src/term/command_character.c b/src/term/command_character.c
index 4968d143..7114ef81 100644
--- a/src/term/command_character.c
+++ b/src/term/command_character.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define command_character tigetstr("cmdch")
diff --git a/src/term/cpi_change_res.c b/src/term/cpi_change_res.c
index 5f782469..b949f136 100644
--- a/src/term/cpi_change_res.c
+++ b/src/term/cpi_change_res.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cpi_change_res tigetflag("cpix")
diff --git a/src/term/cr_cancles_micro_mode.c b/src/term/cr_cancles_micro_mode.c
index 5ed4e390..1bc2d6aa 100644
--- a/src/term/cr_cancles_micro_mode.c
+++ b/src/term/cr_cancles_micro_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cr_cancles_micro_mode tigetflag("crxm")
diff --git a/src/term/create_window.c b/src/term/create_window.c
index d11c71d6..b02653fb 100644
--- a/src/term/create_window.c
+++ b/src/term/create_window.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define create_window tigetstr("cwin")
diff --git a/src/term/cursor_address.c b/src/term/cursor_address.c
index 62c0f37f..e48005be 100644
--- a/src/term/cursor_address.c
+++ b/src/term/cursor_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_address tigetstr("cup")
diff --git a/src/term/cursor_down.c b/src/term/cursor_down.c
index f24e375a..220c3898 100644
--- a/src/term/cursor_down.c
+++ b/src/term/cursor_down.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_down tigetstr("cudl")
diff --git a/src/term/cursor_home.c b/src/term/cursor_home.c
index bf4d9623..02271d19 100644
--- a/src/term/cursor_home.c
+++ b/src/term/cursor_home.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_home tigetstr("home")
diff --git a/src/term/cursor_invisible.c b/src/term/cursor_invisible.c
index 6b4e9d1d..29879275 100644
--- a/src/term/cursor_invisible.c
+++ b/src/term/cursor_invisible.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_invisible tigetstr("civis")
diff --git a/src/term/cursor_left.c b/src/term/cursor_left.c
index 6e6fd0fc..fc436f8b 100644
--- a/src/term/cursor_left.c
+++ b/src/term/cursor_left.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_left tigetstr("cubl")
diff --git a/src/term/cursor_mem_address.c b/src/term/cursor_mem_address.c
index e8cb52db..f59b6974 100644
--- a/src/term/cursor_mem_address.c
+++ b/src/term/cursor_mem_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_mem_address tigetstr("mrcup")
diff --git a/src/term/cursor_normal.c b/src/term/cursor_normal.c
index 74af9784..f8414cf6 100644
--- a/src/term/cursor_normal.c
+++ b/src/term/cursor_normal.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_normal tigetstr("cnorm")
diff --git a/src/term/cursor_right.c b/src/term/cursor_right.c
index 46fca333..3ec62938 100644
--- a/src/term/cursor_right.c
+++ b/src/term/cursor_right.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_right tigetstr("cufl")
diff --git a/src/term/cursor_to_ll.c b/src/term/cursor_to_ll.c
index 441892e3..d0230864 100644
--- a/src/term/cursor_to_ll.c
+++ b/src/term/cursor_to_ll.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_to_ll tigetstr("ll")
diff --git a/src/term/cursor_up.c b/src/term/cursor_up.c
index 04ad1a16..7ade9c06 100644
--- a/src/term/cursor_up.c
+++ b/src/term/cursor_up.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_up tigetstr("cuul")
diff --git a/src/term/cursor_visible.c b/src/term/cursor_visible.c
index d7b417d7..6fef376c 100644
--- a/src/term/cursor_visible.c
+++ b/src/term/cursor_visible.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define cursor_visible tigetstr("cvvis")
diff --git a/src/term/define_bit_image_region.c b/src/term/define_bit_image_region.c
index 2c8614fb..034167a4 100644
--- a/src/term/define_bit_image_region.c
+++ b/src/term/define_bit_image_region.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define define_bit_image_region tigetstr("defbi")
diff --git a/src/term/define_char.c b/src/term/define_char.c
index 6703b3d9..78b7ea19 100644
--- a/src/term/define_char.c
+++ b/src/term/define_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define define_char tigetstr("defc")
diff --git a/src/term/delete_character.c b/src/term/delete_character.c
index 9d8d1779..09da62b9 100644
--- a/src/term/delete_character.c
+++ b/src/term/delete_character.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define delete_character tigetstr("dchl")
diff --git a/src/term/delete_line.c b/src/term/delete_line.c
index bd309686..9b20e7b9 100644
--- a/src/term/delete_line.c
+++ b/src/term/delete_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define delete_line tigetstr("dll")
diff --git a/src/term/dest_tabs_magic_smso.c b/src/term/dest_tabs_magic_smso.c
index 4e05ae00..73943782 100644
--- a/src/term/dest_tabs_magic_smso.c
+++ b/src/term/dest_tabs_magic_smso.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define dest_tabs_magic_smso tigetflag("xt")
diff --git a/src/term/device_type.c b/src/term/device_type.c
index de08d84f..19a097ec 100644
--- a/src/term/device_type.c
+++ b/src/term/device_type.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define device_type tigetstr("devt")
diff --git a/src/term/dial_phone.c b/src/term/dial_phone.c
index 6278a1ea..edbf37e8 100644
--- a/src/term/dial_phone.c
+++ b/src/term/dial_phone.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define dial_phone tigetstr("dial")
diff --git a/src/term/dis_status_line.c b/src/term/dis_status_line.c
index d957e09e..e340188f 100644
--- a/src/term/dis_status_line.c
+++ b/src/term/dis_status_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define dis_status_line tigetstr("dsl")
diff --git a/src/term/display_clock.c b/src/term/display_clock.c
index cf00df74..39a31472 100644
--- a/src/term/display_clock.c
+++ b/src/term/display_clock.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define display_clock tigetstr("dclk")
diff --git a/src/term/display_pc_char.c b/src/term/display_pc_char.c
index 54b8ac76..6cffb421 100644
--- a/src/term/display_pc_char.c
+++ b/src/term/display_pc_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define display_pc_char tigetstr("dispc")
diff --git a/src/term/dot_horz_spacing.c b/src/term/dot_horz_spacing.c
index f4ffb083..91e1b4e8 100644
--- a/src/term/dot_horz_spacing.c
+++ b/src/term/dot_horz_spacing.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define dot_horz_spacing tigetnum("spinh")
diff --git a/src/term/dot_vert_spacing.c b/src/term/dot_vert_spacing.c
index 7cd7c4ec..01a5f42b 100644
--- a/src/term/dot_vert_spacing.c
+++ b/src/term/dot_vert_spacing.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define dot_vert_spacing tigetnum("spinv")
diff --git a/src/term/down_half_line.c b/src/term/down_half_line.c
index 151883ee..d0a2f241 100644
--- a/src/term/down_half_line.c
+++ b/src/term/down_half_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define down_half_line tigetstr("hd")
diff --git a/src/term/eat_newline_glitch.c b/src/term/eat_newline_glitch.c
index 796e1e19..df519d94 100644
--- a/src/term/eat_newline_glitch.c
+++ b/src/term/eat_newline_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define eat_newline_glitch tigetflag("xenl")
diff --git a/src/term/ena_acs.c b/src/term/ena_acs.c
index 5d254005..e9b320b6 100644
--- a/src/term/ena_acs.c
+++ b/src/term/ena_acs.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define ena_acs tigetstr("enacs")
diff --git a/src/term/end_bit_image_region.c b/src/term/end_bit_image_region.c
index c19cb6df..ba8ba966 100644
--- a/src/term/end_bit_image_region.c
+++ b/src/term/end_bit_image_region.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define end_bit_image_region tigetstr("endbi")
diff --git a/src/term/enter_alt_charset_mode.c b/src/term/enter_alt_charset_mode.c
index 9bfb9f0e..ed088071 100644
--- a/src/term/enter_alt_charset_mode.c
+++ b/src/term/enter_alt_charset_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_alt_charset_mode tigetstr("smacs")
diff --git a/src/term/enter_am_mode.c b/src/term/enter_am_mode.c
index 7e878137..557d9870 100644
--- a/src/term/enter_am_mode.c
+++ b/src/term/enter_am_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_am_mode tigetstr("smam")
diff --git a/src/term/enter_blink_mode.c b/src/term/enter_blink_mode.c
index c41bb6ca..4a339037 100644
--- a/src/term/enter_blink_mode.c
+++ b/src/term/enter_blink_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_blink_mode tigetstr("blink")
diff --git a/src/term/enter_bold_mode.c b/src/term/enter_bold_mode.c
index a6de614c..de3ce76c 100644
--- a/src/term/enter_bold_mode.c
+++ b/src/term/enter_bold_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_bold_mode tigetstr("bold")
diff --git a/src/term/enter_ca_mode.c b/src/term/enter_ca_mode.c
index dfe34e29..78e91a19 100644
--- a/src/term/enter_ca_mode.c
+++ b/src/term/enter_ca_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_ca_mode tigetstr("smcup")
diff --git a/src/term/enter_delete_mode.c b/src/term/enter_delete_mode.c
index c16f2002..42f313ce 100644
--- a/src/term/enter_delete_mode.c
+++ b/src/term/enter_delete_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_delete_mode tigetstr("smdc")
diff --git a/src/term/enter_dim_mode.c b/src/term/enter_dim_mode.c
index 4977ff56..8b97a880 100644
--- a/src/term/enter_dim_mode.c
+++ b/src/term/enter_dim_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_dim_mode tigetstr("dim")
diff --git a/src/term/enter_doublewide_mode.c b/src/term/enter_doublewide_mode.c
index bced61c0..bd3cb67a 100644
--- a/src/term/enter_doublewide_mode.c
+++ b/src/term/enter_doublewide_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_doublewide_mode tigetstr("swidm")
diff --git a/src/term/enter_draft_quality.c b/src/term/enter_draft_quality.c
index 7b8b0844..f9902ebe 100644
--- a/src/term/enter_draft_quality.c
+++ b/src/term/enter_draft_quality.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_draft_quality tigetstr("sdrfq")
diff --git a/src/term/enter_horizontal_hl_mode.c b/src/term/enter_horizontal_hl_mode.c
index 02e1bedd..d24ad723 100644
--- a/src/term/enter_horizontal_hl_mode.c
+++ b/src/term/enter_horizontal_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_horizontal_hl_mode tigetstr("ehhlm")
diff --git a/src/term/enter_insert_mode.c b/src/term/enter_insert_mode.c
index dad409e7..f35fcc79 100644
--- a/src/term/enter_insert_mode.c
+++ b/src/term/enter_insert_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_insert_mode tigetstr("smir")
diff --git a/src/term/enter_italics_mode.c b/src/term/enter_italics_mode.c
index 9829f171..0c11abc6 100644
--- a/src/term/enter_italics_mode.c
+++ b/src/term/enter_italics_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_italics_mode tigetstr("sitm")
diff --git a/src/term/enter_left_hl_mode.c b/src/term/enter_left_hl_mode.c
index 21511095..7ab99731 100644
--- a/src/term/enter_left_hl_mode.c
+++ b/src/term/enter_left_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_left_hl_mode tigetstr("elhlm")
diff --git a/src/term/enter_leftward_mode.c b/src/term/enter_leftward_mode.c
index 746962ab..8303101a 100644
--- a/src/term/enter_leftward_mode.c
+++ b/src/term/enter_leftward_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_leftward_mode tigetstr("slm")
diff --git a/src/term/enter_low_hl_mode.c b/src/term/enter_low_hl_mode.c
index a4ceee15..d8df62c1 100644
--- a/src/term/enter_low_hl_mode.c
+++ b/src/term/enter_low_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_low_hl_mode tigetstr("elohlm")
diff --git a/src/term/enter_micro_code.c b/src/term/enter_micro_code.c
index 86aaef3c..34b419af 100644
--- a/src/term/enter_micro_code.c
+++ b/src/term/enter_micro_code.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_micro_code tigetstr("smicm")
diff --git a/src/term/enter_near_letter_quality.c b/src/term/enter_near_letter_quality.c
index 61488d9a..21d0f844 100644
--- a/src/term/enter_near_letter_quality.c
+++ b/src/term/enter_near_letter_quality.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_near_letter_quality tigetstr("snlq")
diff --git a/src/term/enter_normal_quality.c b/src/term/enter_normal_quality.c
index 7547a928..fe1b1aae 100644
--- a/src/term/enter_normal_quality.c
+++ b/src/term/enter_normal_quality.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_normal_quality tigetstr("snrmq")
diff --git a/src/term/enter_pc_charset_mode.c b/src/term/enter_pc_charset_mode.c
index 8ff483da..8939acca 100644
--- a/src/term/enter_pc_charset_mode.c
+++ b/src/term/enter_pc_charset_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_pc_charset_mode tigetstr("smpch")
diff --git a/src/term/enter_protected_mode.c b/src/term/enter_protected_mode.c
index ef0ba3d8..da304630 100644
--- a/src/term/enter_protected_mode.c
+++ b/src/term/enter_protected_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_protected_mode tigetstr("prot")
diff --git a/src/term/enter_reverse_mode.c b/src/term/enter_reverse_mode.c
index 4856698a..8fca9b15 100644
--- a/src/term/enter_reverse_mode.c
+++ b/src/term/enter_reverse_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_reverse_mode tigetstr("rev")
diff --git a/src/term/enter_right_hl_mode.c b/src/term/enter_right_hl_mode.c
index 20f18a28..f8655d65 100644
--- a/src/term/enter_right_hl_mode.c
+++ b/src/term/enter_right_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_right_hl_mode tigetstr("erhlm")
diff --git a/src/term/enter_scancode_mode.c b/src/term/enter_scancode_mode.c
index c9a341a8..34ec3c74 100644
--- a/src/term/enter_scancode_mode.c
+++ b/src/term/enter_scancode_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_scancode_mode tigetstr("smsc")
diff --git a/src/term/enter_secure_mode.c b/src/term/enter_secure_mode.c
index f0d2f7c2..61e432e4 100644
--- a/src/term/enter_secure_mode.c
+++ b/src/term/enter_secure_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_secure_mode tigetstr("invis")
diff --git a/src/term/enter_shadow_mode.c b/src/term/enter_shadow_mode.c
index f001764f..9607d03f 100644
--- a/src/term/enter_shadow_mode.c
+++ b/src/term/enter_shadow_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_shadow_mode tigetstr("sshm")
diff --git a/src/term/enter_standout_mode.c b/src/term/enter_standout_mode.c
index 936aa37b..74d6f477 100644
--- a/src/term/enter_standout_mode.c
+++ b/src/term/enter_standout_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_standout_mode tigetstr("smso")
diff --git a/src/term/enter_subscript_mode.c b/src/term/enter_subscript_mode.c
index 95b267ef..cfb05378 100644
--- a/src/term/enter_subscript_mode.c
+++ b/src/term/enter_subscript_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_subscript_mode tigetstr("ssubm")
diff --git a/src/term/enter_superscript_mode.c b/src/term/enter_superscript_mode.c
index 366717cd..71a87d44 100644
--- a/src/term/enter_superscript_mode.c
+++ b/src/term/enter_superscript_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_superscript_mode tigetstr("ssupm")
diff --git a/src/term/enter_top_hl_mode.c b/src/term/enter_top_hl_mode.c
index 48c69a46..d0fade89 100644
--- a/src/term/enter_top_hl_mode.c
+++ b/src/term/enter_top_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_top_hl_mode tigetstr("ethlm")
diff --git a/src/term/enter_underline_mode.c b/src/term/enter_underline_mode.c
index b9ba631c..c72503b4 100644
--- a/src/term/enter_underline_mode.c
+++ b/src/term/enter_underline_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_underline_mode tigetstr("smul")
diff --git a/src/term/enter_upward_mode.c b/src/term/enter_upward_mode.c
index 82aa757d..bcda154e 100644
--- a/src/term/enter_upward_mode.c
+++ b/src/term/enter_upward_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_upward_mode tigetstr("sum")
diff --git a/src/term/enter_vertical_hl_mode.c b/src/term/enter_vertical_hl_mode.c
index 64ce1d8f..e0d4804e 100644
--- a/src/term/enter_vertical_hl_mode.c
+++ b/src/term/enter_vertical_hl_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_vertical_hl_mode tigetstr("evhlm")
diff --git a/src/term/enter_xon_mode.c b/src/term/enter_xon_mode.c
index a55d592b..0d0ccaf9 100644
--- a/src/term/enter_xon_mode.c
+++ b/src/term/enter_xon_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define enter_xon_mode tigetstr("smxon")
diff --git a/src/term/erase_chars.c b/src/term/erase_chars.c
index b38a4d7f..873bea33 100644
--- a/src/term/erase_chars.c
+++ b/src/term/erase_chars.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define erase_chars tigetstr("ech")
diff --git a/src/term/erase_overstrick.c b/src/term/erase_overstrick.c
index 8808e265..6317cd9d 100644
--- a/src/term/erase_overstrick.c
+++ b/src/term/erase_overstrick.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define erase_overstrick tigetflag("eo")
diff --git a/src/term/exit_alt_charset_mode.c b/src/term/exit_alt_charset_mode.c
index 541a2a6a..74cdfa3b 100644
--- a/src/term/exit_alt_charset_mode.c
+++ b/src/term/exit_alt_charset_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_alt_charset_mode tigetstr("rmacs")
diff --git a/src/term/exit_am_mode.c b/src/term/exit_am_mode.c
index feb44588..dc3d4cfa 100644
--- a/src/term/exit_am_mode.c
+++ b/src/term/exit_am_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_am_mode tigetstr("rmam")
diff --git a/src/term/exit_attribute_mode.c b/src/term/exit_attribute_mode.c
index 307d4b1b..43d2eda6 100644
--- a/src/term/exit_attribute_mode.c
+++ b/src/term/exit_attribute_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_attribute_mode tigetstr("sgr0")
diff --git a/src/term/exit_ca_mode.c b/src/term/exit_ca_mode.c
index 203a9943..4a32dcf4 100644
--- a/src/term/exit_ca_mode.c
+++ b/src/term/exit_ca_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_ca_mode tigetstr("rmcup")
diff --git a/src/term/exit_delete_mode.c b/src/term/exit_delete_mode.c
index 7ece6c5b..cc54202f 100644
--- a/src/term/exit_delete_mode.c
+++ b/src/term/exit_delete_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_delete_mode tigetstr("rmdc")
diff --git a/src/term/exit_doublewide_mode.c b/src/term/exit_doublewide_mode.c
index 9b7544ef..8ac2d472 100644
--- a/src/term/exit_doublewide_mode.c
+++ b/src/term/exit_doublewide_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_doublewide_mode tigetstr("rwidm")
diff --git a/src/term/exit_insert_mode.c b/src/term/exit_insert_mode.c
index 43f3fdfe..0a9d8b3f 100644
--- a/src/term/exit_insert_mode.c
+++ b/src/term/exit_insert_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_insert_mode tigetstr("rmir")
diff --git a/src/term/exit_italics_mode.c b/src/term/exit_italics_mode.c
index f751e83e..c83fb919 100644
--- a/src/term/exit_italics_mode.c
+++ b/src/term/exit_italics_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_italics_mode tigetstr("ritm")
diff --git a/src/term/exit_leftword_mode.c b/src/term/exit_leftword_mode.c
index c185c69a..15f3e752 100644
--- a/src/term/exit_leftword_mode.c
+++ b/src/term/exit_leftword_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_leftword_mode tigetstr("rlim")
diff --git a/src/term/exit_micro_mode.c b/src/term/exit_micro_mode.c
index 5e1a8643..4400f0b0 100644
--- a/src/term/exit_micro_mode.c
+++ b/src/term/exit_micro_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_micro_mode tigetstr("rmicm")
diff --git a/src/term/exit_pc_charset_mode.c b/src/term/exit_pc_charset_mode.c
index 6be0e65a..ca4db770 100644
--- a/src/term/exit_pc_charset_mode.c
+++ b/src/term/exit_pc_charset_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_pc_charset_mode tigetstr("rmpch")
diff --git a/src/term/exit_scancode_mode.c b/src/term/exit_scancode_mode.c
index 9f0e385d..3662fcc9 100644
--- a/src/term/exit_scancode_mode.c
+++ b/src/term/exit_scancode_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_scancode_mode tigetstr("rmcs")
diff --git a/src/term/exit_shadow_mode.c b/src/term/exit_shadow_mode.c
index 1fc63af1..6c18ba40 100644
--- a/src/term/exit_shadow_mode.c
+++ b/src/term/exit_shadow_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_shadow_mode tigetstr("rshm")
diff --git a/src/term/exit_standout_mode.c b/src/term/exit_standout_mode.c
index e935811b..625b4a7d 100644
--- a/src/term/exit_standout_mode.c
+++ b/src/term/exit_standout_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_standout_mode tigetstr("rmso")
diff --git a/src/term/exit_subscript_mode.c b/src/term/exit_subscript_mode.c
index f04a9dfd..6916c1e7 100644
--- a/src/term/exit_subscript_mode.c
+++ b/src/term/exit_subscript_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_subscript_mode tigetstr("rsubm")
diff --git a/src/term/exit_superscript_mode.c b/src/term/exit_superscript_mode.c
index f97a5d87..ffaa6f9d 100644
--- a/src/term/exit_superscript_mode.c
+++ b/src/term/exit_superscript_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_superscript_mode tigetstr("rsupm")
diff --git a/src/term/exit_underline_mode.c b/src/term/exit_underline_mode.c
index 3d587d6b..88a22fb6 100644
--- a/src/term/exit_underline_mode.c
+++ b/src/term/exit_underline_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_underline_mode tigetstr("rmul")
diff --git a/src/term/exit_upward_mode.c b/src/term/exit_upward_mode.c
index 57f4c2f1..fda525c8 100644
--- a/src/term/exit_upward_mode.c
+++ b/src/term/exit_upward_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_upward_mode tigetstr("rum")
diff --git a/src/term/exit_xon_mode.c b/src/term/exit_xon_mode.c
index 18b3611c..08994201 100644
--- a/src/term/exit_xon_mode.c
+++ b/src/term/exit_xon_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define exit_xon_mode tigetstr("rmxon")
diff --git a/src/term/fixed_pause.c b/src/term/fixed_pause.c
index 00c038df..f5549f84 100644
--- a/src/term/fixed_pause.c
+++ b/src/term/fixed_pause.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define fixed_pause tigetstr("pause")
diff --git a/src/term/flash_hook.c b/src/term/flash_hook.c
index a43d46ef..ed479579 100644
--- a/src/term/flash_hook.c
+++ b/src/term/flash_hook.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define flash_hook tigetstr("hook")
diff --git a/src/term/flash_screen.c b/src/term/flash_screen.c
index 7bd3e38c..00cbf84f 100644
--- a/src/term/flash_screen.c
+++ b/src/term/flash_screen.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define flash_screen tigetstr("flash")
diff --git a/src/term/form_feed.c b/src/term/form_feed.c
index 91f65390..443a0a3b 100644
--- a/src/term/form_feed.c
+++ b/src/term/form_feed.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define form_feed tigetstr("ff")
diff --git a/src/term/from_status_line.c b/src/term/from_status_line.c
index 48aebd1c..dc871ffc 100644
--- a/src/term/from_status_line.c
+++ b/src/term/from_status_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define from_status_line tigetstr("fsl")
diff --git a/src/term/generic_type.c b/src/term/generic_type.c
index 24878690..d6424525 100644
--- a/src/term/generic_type.c
+++ b/src/term/generic_type.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define generic_type tigetflag("gn")
diff --git a/src/term/get_mouse.c b/src/term/get_mouse.c
index 18e74527..c9b22efb 100644
--- a/src/term/get_mouse.c
+++ b/src/term/get_mouse.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define get_mouse tigetstr("getm")
diff --git a/src/term/goto_window.c b/src/term/goto_window.c
index efdf1354..b564bb84 100644
--- a/src/term/goto_window.c
+++ b/src/term/goto_window.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define goto_window tigetstr("wingo")
diff --git a/src/term/hangup.c b/src/term/hangup.c
index bd688a15..4282f4ac 100644
--- a/src/term/hangup.c
+++ b/src/term/hangup.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define hangup tigetstr("hup")
diff --git a/src/term/hard_copy.c b/src/term/hard_copy.c
index 0f1abc65..9b339772 100644
--- a/src/term/hard_copy.c
+++ b/src/term/hard_copy.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define hard_copy tigetflag("hc")
diff --git a/src/term/hard_cursor.c b/src/term/hard_cursor.c
index 9494de2a..a3e8c1cc 100644
--- a/src/term/hard_cursor.c
+++ b/src/term/hard_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define hard_cursor tigetflag("chts")
diff --git a/src/term/has_meta_key.c b/src/term/has_meta_key.c
index f745af39..8a0e511b 100644
--- a/src/term/has_meta_key.c
+++ b/src/term/has_meta_key.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define has_meta_key tigetflag("km")
diff --git a/src/term/has_print_wheel.c b/src/term/has_print_wheel.c
index a9be039c..4b936dbf 100644
--- a/src/term/has_print_wheel.c
+++ b/src/term/has_print_wheel.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define has_print_wheel tigetflag("daisy")
diff --git a/src/term/has_status_line.c b/src/term/has_status_line.c
index 0f0f9204..eed68b6a 100644
--- a/src/term/has_status_line.c
+++ b/src/term/has_status_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define has_status_line tigetflag("hs")
diff --git a/src/term/hue_lightness_saturation.c b/src/term/hue_lightness_saturation.c
index fc0e2fe1..4954ef63 100644
--- a/src/term/hue_lightness_saturation.c
+++ b/src/term/hue_lightness_saturation.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define hue_lightness_saturation tigetflag("hls")
diff --git a/src/term/init_1string.c b/src/term/init_1string.c
index 258a49ba..8e79ec5f 100644
--- a/src/term/init_1string.c
+++ b/src/term/init_1string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_1string tigetstr("is1")
diff --git a/src/term/init_2string.c b/src/term/init_2string.c
index 54c37810..c655cb12 100644
--- a/src/term/init_2string.c
+++ b/src/term/init_2string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_2string tigetstr("is2")
diff --git a/src/term/init_3string.c b/src/term/init_3string.c
index 481727a5..34dd7a6d 100644
--- a/src/term/init_3string.c
+++ b/src/term/init_3string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_3string tigetstr("is3")
diff --git a/src/term/init_file.c b/src/term/init_file.c
index 4b57c5f0..c0d7a9fc 100644
--- a/src/term/init_file.c
+++ b/src/term/init_file.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_file tigetstr("if")
diff --git a/src/term/init_prog.c b/src/term/init_prog.c
index 63c2c34f..bf39cdb9 100644
--- a/src/term/init_prog.c
+++ b/src/term/init_prog.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_prog tigetstr("iprog")
diff --git a/src/term/init_tabs.c b/src/term/init_tabs.c
index 2bb53427..7594b2b1 100644
--- a/src/term/init_tabs.c
+++ b/src/term/init_tabs.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define init_tabs tigetnum("it")
diff --git a/src/term/initialize_color.c b/src/term/initialize_color.c
index 81a851ce..a089b1d5 100644
--- a/src/term/initialize_color.c
+++ b/src/term/initialize_color.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define initialize_color tigetstr("initc")
diff --git a/src/term/initialize_pair.c b/src/term/initialize_pair.c
index 222e7833..8fa24653 100644
--- a/src/term/initialize_pair.c
+++ b/src/term/initialize_pair.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define initialize_pair tigetstr("initp")
diff --git a/src/term/insert_character.c b/src/term/insert_character.c
index 6b29e27a..50738618 100644
--- a/src/term/insert_character.c
+++ b/src/term/insert_character.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define insert_character tigetstr("ichl")
diff --git a/src/term/insert_line.c b/src/term/insert_line.c
index 54c508ad..283937b3 100644
--- a/src/term/insert_line.c
+++ b/src/term/insert_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define insert_line tigetstr("ill")
diff --git a/src/term/insert_null_glitch.c b/src/term/insert_null_glitch.c
index 5fee030d..3f97d2bd 100644
--- a/src/term/insert_null_glitch.c
+++ b/src/term/insert_null_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define insert_null_glitch tigetflag("in")
diff --git a/src/term/insert_padding.c b/src/term/insert_padding.c
index 6001659f..59e9daed 100644
--- a/src/term/insert_padding.c
+++ b/src/term/insert_padding.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define insert_padding tigetstr("ip")
diff --git a/src/term/key_a1.c b/src/term/key_a1.c
index b76e8d61..e5ec286d 100644
--- a/src/term/key_a1.c
+++ b/src/term/key_a1.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_a1 tigetstr("ka1")
diff --git a/src/term/key_a3.c b/src/term/key_a3.c
index d963d2af..6eefb6ca 100644
--- a/src/term/key_a3.c
+++ b/src/term/key_a3.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_a3 tigetstr("ka3")
diff --git a/src/term/key_b2.c b/src/term/key_b2.c
index 39ae26f5..9afa01a9 100644
--- a/src/term/key_b2.c
+++ b/src/term/key_b2.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_b2 tigetstr("kb2")
diff --git a/src/term/key_backspace.c b/src/term/key_backspace.c
index b32a1805..b68e500c 100644
--- a/src/term/key_backspace.c
+++ b/src/term/key_backspace.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_backspace tigetstr("kbs")
diff --git a/src/term/key_beg.c b/src/term/key_beg.c
index c226270a..01cd30bc 100644
--- a/src/term/key_beg.c
+++ b/src/term/key_beg.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_beg tigetstr("kbeg")
diff --git a/src/term/key_btab.c b/src/term/key_btab.c
index 21c74230..59c19d41 100644
--- a/src/term/key_btab.c
+++ b/src/term/key_btab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_btab tigetstr("kcbt")
diff --git a/src/term/key_c1.c b/src/term/key_c1.c
index e4663726..35fb8094 100644
--- a/src/term/key_c1.c
+++ b/src/term/key_c1.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_c1 tigetstr("kc1")
diff --git a/src/term/key_c3.c b/src/term/key_c3.c
index 035edea6..a7cd77c8 100644
--- a/src/term/key_c3.c
+++ b/src/term/key_c3.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_c3 tigetstr("kc3")
diff --git a/src/term/key_cancel.c b/src/term/key_cancel.c
index 0675bf3e..4de60f35 100644
--- a/src/term/key_cancel.c
+++ b/src/term/key_cancel.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_cancel tigetstr("kcan")
diff --git a/src/term/key_catab.c b/src/term/key_catab.c
index 602d6c5b..cc0d03f1 100644
--- a/src/term/key_catab.c
+++ b/src/term/key_catab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_catab tigetstr("ktbc")
diff --git a/src/term/key_clear.c b/src/term/key_clear.c
index 6497f2bf..7c02314d 100644
--- a/src/term/key_clear.c
+++ b/src/term/key_clear.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_clear tigetstr("kclr")
diff --git a/src/term/key_close.c b/src/term/key_close.c
index 5d4affc4..f0c36ccf 100644
--- a/src/term/key_close.c
+++ b/src/term/key_close.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_close tigetstr("kclo")
diff --git a/src/term/key_command.c b/src/term/key_command.c
index d8b8fb0b..b8a95d71 100644
--- a/src/term/key_command.c
+++ b/src/term/key_command.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_command tigetstr("kcmd")
diff --git a/src/term/key_copy.c b/src/term/key_copy.c
index 37812181..940ba394 100644
--- a/src/term/key_copy.c
+++ b/src/term/key_copy.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_copy tigetstr("kcpy")
diff --git a/src/term/key_create.c b/src/term/key_create.c
index 1cc73a76..e02577fd 100644
--- a/src/term/key_create.c
+++ b/src/term/key_create.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_create tigetstr("kcrt")
diff --git a/src/term/key_ctab.c b/src/term/key_ctab.c
index c24b8262..448cd3d4 100644
--- a/src/term/key_ctab.c
+++ b/src/term/key_ctab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ctab tigetstr("kctab")
diff --git a/src/term/key_dc.c b/src/term/key_dc.c
index 27343af2..0d8bdfc8 100644
--- a/src/term/key_dc.c
+++ b/src/term/key_dc.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_dc tigetstr("kdchl")
diff --git a/src/term/key_dl.c b/src/term/key_dl.c
index e2dbca4b..219bf1da 100644
--- a/src/term/key_dl.c
+++ b/src/term/key_dl.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_dl tigetstr("kdll")
diff --git a/src/term/key_down.c b/src/term/key_down.c
index 7143d3ad..504af66a 100644
--- a/src/term/key_down.c
+++ b/src/term/key_down.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_down tigetstr("kcudl")
diff --git a/src/term/key_eic.c b/src/term/key_eic.c
index a9ab7a01..cb9d8989 100644
--- a/src/term/key_eic.c
+++ b/src/term/key_eic.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_eic tigetstr("krmir")
diff --git a/src/term/key_end.c b/src/term/key_end.c
index 6d3b0c2c..ee406a06 100644
--- a/src/term/key_end.c
+++ b/src/term/key_end.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_end tigetstr("kend")
diff --git a/src/term/key_enter.c b/src/term/key_enter.c
index 3444ca3d..0dd405d2 100644
--- a/src/term/key_enter.c
+++ b/src/term/key_enter.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_enter tigetstr("kent")
diff --git a/src/term/key_eol.c b/src/term/key_eol.c
index 68b619a3..1509a974 100644
--- a/src/term/key_eol.c
+++ b/src/term/key_eol.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_eol tigetstr("kel")
diff --git a/src/term/key_eos.c b/src/term/key_eos.c
index 60a304ce..0346c84d 100644
--- a/src/term/key_eos.c
+++ b/src/term/key_eos.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_eos tigetstr("ked")
diff --git a/src/term/key_exit.c b/src/term/key_exit.c
index edd2b490..4bb8792e 100644
--- a/src/term/key_exit.c
+++ b/src/term/key_exit.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_exit tigetstr("kext")
diff --git a/src/term/key_f0.c b/src/term/key_f0.c
index bf18bbc3..3f81e57d 100644
--- a/src/term/key_f0.c
+++ b/src/term/key_f0.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f0 tigetstr("kf0")
diff --git a/src/term/key_f1.c b/src/term/key_f1.c
index 6b70b74f..9c77db34 100644
--- a/src/term/key_f1.c
+++ b/src/term/key_f1.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f1 tigetstr("kf1")
diff --git a/src/term/key_f10.c b/src/term/key_f10.c
index 41cdd7c3..8762d65d 100644
--- a/src/term/key_f10.c
+++ b/src/term/key_f10.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f10 tigetstr("kf10")
diff --git a/src/term/key_f11.c b/src/term/key_f11.c
index 319a4f77..c57efd3f 100644
--- a/src/term/key_f11.c
+++ b/src/term/key_f11.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f11 tigetstr("kf11")
diff --git a/src/term/key_f12.c b/src/term/key_f12.c
index 57223c56..0a2ea5ac 100644
--- a/src/term/key_f12.c
+++ b/src/term/key_f12.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f12 tigetstr("kf12")
diff --git a/src/term/key_f13.c b/src/term/key_f13.c
index d4c2d6d7..87de21fb 100644
--- a/src/term/key_f13.c
+++ b/src/term/key_f13.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f13 tigetstr("kf13")
diff --git a/src/term/key_f14.c b/src/term/key_f14.c
index c718780d..cf726014 100644
--- a/src/term/key_f14.c
+++ b/src/term/key_f14.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f14 tigetstr("kf14")
diff --git a/src/term/key_f15.c b/src/term/key_f15.c
index 62936a0b..fd4ec08d 100644
--- a/src/term/key_f15.c
+++ b/src/term/key_f15.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f15 tigetstr("kf15")
diff --git a/src/term/key_f16.c b/src/term/key_f16.c
index 5664a8b2..9d3001b6 100644
--- a/src/term/key_f16.c
+++ b/src/term/key_f16.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f16 tigetstr("kf16")
diff --git a/src/term/key_f17.c b/src/term/key_f17.c
index 2414227f..b41c1e38 100644
--- a/src/term/key_f17.c
+++ b/src/term/key_f17.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f17 tigetstr("kf17")
diff --git a/src/term/key_f18.c b/src/term/key_f18.c
index ae432e01..6022b183 100644
--- a/src/term/key_f18.c
+++ b/src/term/key_f18.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f18 tigetstr("kf18")
diff --git a/src/term/key_f19.c b/src/term/key_f19.c
index 11b36476..e12826e5 100644
--- a/src/term/key_f19.c
+++ b/src/term/key_f19.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f19 tigetstr("kf19")
diff --git a/src/term/key_f2.c b/src/term/key_f2.c
index 6977141f..0f4f5969 100644
--- a/src/term/key_f2.c
+++ b/src/term/key_f2.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f2 tigetstr("kf2")
diff --git a/src/term/key_f20.c b/src/term/key_f20.c
index 49a05dfd..ecc218bd 100644
--- a/src/term/key_f20.c
+++ b/src/term/key_f20.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f20 tigetstr("kf20")
diff --git a/src/term/key_f21.c b/src/term/key_f21.c
index a7cb5173..40dd6244 100644
--- a/src/term/key_f21.c
+++ b/src/term/key_f21.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f21 tigetstr("kf21")
diff --git a/src/term/key_f22.c b/src/term/key_f22.c
index e8ee6315..718136bd 100644
--- a/src/term/key_f22.c
+++ b/src/term/key_f22.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f22 tigetstr("kf22")
diff --git a/src/term/key_f23.c b/src/term/key_f23.c
index 82efbb94..e9b5be63 100644
--- a/src/term/key_f23.c
+++ b/src/term/key_f23.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f23 tigetstr("kf23")
diff --git a/src/term/key_f24.c b/src/term/key_f24.c
index 629efeeb..47e8b69a 100644
--- a/src/term/key_f24.c
+++ b/src/term/key_f24.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f24 tigetstr("kf24")
diff --git a/src/term/key_f25.c b/src/term/key_f25.c
index f40242e2..b0d03a71 100644
--- a/src/term/key_f25.c
+++ b/src/term/key_f25.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f25 tigetstr("kf25")
diff --git a/src/term/key_f26.c b/src/term/key_f26.c
index cc14c485..9bca205d 100644
--- a/src/term/key_f26.c
+++ b/src/term/key_f26.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f26 tigetstr("kf26")
diff --git a/src/term/key_f27.c b/src/term/key_f27.c
index 1c2c664a..ce42668f 100644
--- a/src/term/key_f27.c
+++ b/src/term/key_f27.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f27 tigetstr("kf27")
diff --git a/src/term/key_f28.c b/src/term/key_f28.c
index fa1baca1..0f1f3790 100644
--- a/src/term/key_f28.c
+++ b/src/term/key_f28.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f28 tigetstr("kf28")
diff --git a/src/term/key_f29.c b/src/term/key_f29.c
index c8a508b2..c121025c 100644
--- a/src/term/key_f29.c
+++ b/src/term/key_f29.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f29 tigetstr("kf29")
diff --git a/src/term/key_f3.c b/src/term/key_f3.c
index e5e69380..b11364ce 100644
--- a/src/term/key_f3.c
+++ b/src/term/key_f3.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f3 tigetstr("kf3")
diff --git a/src/term/key_f30.c b/src/term/key_f30.c
index aa1f50b4..4367790a 100644
--- a/src/term/key_f30.c
+++ b/src/term/key_f30.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f30 tigetstr("kf30")
diff --git a/src/term/key_f31.c b/src/term/key_f31.c
index 4f774bfd..a981398e 100644
--- a/src/term/key_f31.c
+++ b/src/term/key_f31.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f31 tigetstr("kf31")
diff --git a/src/term/key_f32.c b/src/term/key_f32.c
index c87ad3c5..2af1d9b1 100644
--- a/src/term/key_f32.c
+++ b/src/term/key_f32.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f32 tigetstr("kf32")
diff --git a/src/term/key_f33.c b/src/term/key_f33.c
index 664eacfb..4267a538 100644
--- a/src/term/key_f33.c
+++ b/src/term/key_f33.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f33 tigetstr("kf33")
diff --git a/src/term/key_f34.c b/src/term/key_f34.c
index 7f215b4f..61b2a58b 100644
--- a/src/term/key_f34.c
+++ b/src/term/key_f34.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f34 tigetstr("kf34")
diff --git a/src/term/key_f35.c b/src/term/key_f35.c
index 27fd1c58..8a7be71e 100644
--- a/src/term/key_f35.c
+++ b/src/term/key_f35.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f35 tigetstr("kf35")
diff --git a/src/term/key_f36.c b/src/term/key_f36.c
index 33edd193..2b54cbcb 100644
--- a/src/term/key_f36.c
+++ b/src/term/key_f36.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f36 tigetstr("kf36")
diff --git a/src/term/key_f37.c b/src/term/key_f37.c
index 6a1cee3e..3375755e 100644
--- a/src/term/key_f37.c
+++ b/src/term/key_f37.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f37 tigetstr("kf37")
diff --git a/src/term/key_f38.c b/src/term/key_f38.c
index f7c7847c..d5394fb0 100644
--- a/src/term/key_f38.c
+++ b/src/term/key_f38.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f38 tigetstr("kf38")
diff --git a/src/term/key_f39.c b/src/term/key_f39.c
index 3ed5d781..845e3820 100644
--- a/src/term/key_f39.c
+++ b/src/term/key_f39.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f39 tigetstr("kf39")
diff --git a/src/term/key_f4.c b/src/term/key_f4.c
index e388876b..6551a2d2 100644
--- a/src/term/key_f4.c
+++ b/src/term/key_f4.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f4 tigetstr("kf4")
diff --git a/src/term/key_f40.c b/src/term/key_f40.c
index 2af91e68..bffdc45d 100644
--- a/src/term/key_f40.c
+++ b/src/term/key_f40.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f40 tigetstr("kf40")
diff --git a/src/term/key_f41.c b/src/term/key_f41.c
index 38fb70f8..436c22aa 100644
--- a/src/term/key_f41.c
+++ b/src/term/key_f41.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f41 tigetstr("kf41")
diff --git a/src/term/key_f42.c b/src/term/key_f42.c
index 2be7abec..979bfb83 100644
--- a/src/term/key_f42.c
+++ b/src/term/key_f42.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f42 tigetstr("kf42")
diff --git a/src/term/key_f43.c b/src/term/key_f43.c
index 4ee1d047..b912a204 100644
--- a/src/term/key_f43.c
+++ b/src/term/key_f43.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f43 tigetstr("kf43")
diff --git a/src/term/key_f44.c b/src/term/key_f44.c
index bda77fd8..5dd31271 100644
--- a/src/term/key_f44.c
+++ b/src/term/key_f44.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f44 tigetstr("kf44")
diff --git a/src/term/key_f45.c b/src/term/key_f45.c
index f9c19737..1c634bd4 100644
--- a/src/term/key_f45.c
+++ b/src/term/key_f45.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f45 tigetstr("kf45")
diff --git a/src/term/key_f46.c b/src/term/key_f46.c
index 2776c8f1..da35f1ef 100644
--- a/src/term/key_f46.c
+++ b/src/term/key_f46.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f46 tigetstr("kf46")
diff --git a/src/term/key_f47.c b/src/term/key_f47.c
index bf54b276..99a8719b 100644
--- a/src/term/key_f47.c
+++ b/src/term/key_f47.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f47 tigetstr("kf47")
diff --git a/src/term/key_f48.c b/src/term/key_f48.c
index b30643b9..5b476c14 100644
--- a/src/term/key_f48.c
+++ b/src/term/key_f48.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f48 tigetstr("kf48")
diff --git a/src/term/key_f49.c b/src/term/key_f49.c
index b37180df..113a041e 100644
--- a/src/term/key_f49.c
+++ b/src/term/key_f49.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f49 tigetstr("kf49")
diff --git a/src/term/key_f5.c b/src/term/key_f5.c
index 899871d4..c79ee7dd 100644
--- a/src/term/key_f5.c
+++ b/src/term/key_f5.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f5 tigetstr("kf5")
diff --git a/src/term/key_f50.c b/src/term/key_f50.c
index c70fc300..c0d99af7 100644
--- a/src/term/key_f50.c
+++ b/src/term/key_f50.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f50 tigetstr("kf50")
diff --git a/src/term/key_f51.c b/src/term/key_f51.c
index 43eae810..8d8c76b9 100644
--- a/src/term/key_f51.c
+++ b/src/term/key_f51.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f51 tigetstr("kf51")
diff --git a/src/term/key_f52.c b/src/term/key_f52.c
index cb453cd0..ceded019 100644
--- a/src/term/key_f52.c
+++ b/src/term/key_f52.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f52 tigetstr("kf52")
diff --git a/src/term/key_f53.c b/src/term/key_f53.c
index ce472ae3..395a7253 100644
--- a/src/term/key_f53.c
+++ b/src/term/key_f53.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f53 tigetstr("kf53")
diff --git a/src/term/key_f54.c b/src/term/key_f54.c
index 0dc7d8e0..c38990df 100644
--- a/src/term/key_f54.c
+++ b/src/term/key_f54.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f54 tigetstr("kf54")
diff --git a/src/term/key_f55.c b/src/term/key_f55.c
index 70103c96..5a267c12 100644
--- a/src/term/key_f55.c
+++ b/src/term/key_f55.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f55 tigetstr("kf55")
diff --git a/src/term/key_f56.c b/src/term/key_f56.c
index 6f850589..6fdf509e 100644
--- a/src/term/key_f56.c
+++ b/src/term/key_f56.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f56 tigetstr("kf56")
diff --git a/src/term/key_f57.c b/src/term/key_f57.c
index 858267e7..337424b5 100644
--- a/src/term/key_f57.c
+++ b/src/term/key_f57.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f57 tigetstr("kf57")
diff --git a/src/term/key_f58.c b/src/term/key_f58.c
index 62c207e9..eb716655 100644
--- a/src/term/key_f58.c
+++ b/src/term/key_f58.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f58 tigetstr("kf58")
diff --git a/src/term/key_f59.c b/src/term/key_f59.c
index 8be21d18..dbf96fb7 100644
--- a/src/term/key_f59.c
+++ b/src/term/key_f59.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f59 tigetstr("kf59")
diff --git a/src/term/key_f6.c b/src/term/key_f6.c
index 3e31f719..e67c79be 100644
--- a/src/term/key_f6.c
+++ b/src/term/key_f6.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f6 tigetstr("kf6")
diff --git a/src/term/key_f60.c b/src/term/key_f60.c
index b9a24c04..825ca26e 100644
--- a/src/term/key_f60.c
+++ b/src/term/key_f60.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f60 tigetstr("kf60")
diff --git a/src/term/key_f61.c b/src/term/key_f61.c
index 626860df..04a8f830 100644
--- a/src/term/key_f61.c
+++ b/src/term/key_f61.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f61 tigetstr("kf61")
diff --git a/src/term/key_f62.c b/src/term/key_f62.c
index 57635bda..f96f2551 100644
--- a/src/term/key_f62.c
+++ b/src/term/key_f62.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f62 tigetstr("kf62")
diff --git a/src/term/key_f63.c b/src/term/key_f63.c
index 438aa049..b67e43a4 100644
--- a/src/term/key_f63.c
+++ b/src/term/key_f63.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f63 tigetstr("kf63")
diff --git a/src/term/key_f7.c b/src/term/key_f7.c
index 45e79ea5..673bd1f6 100644
--- a/src/term/key_f7.c
+++ b/src/term/key_f7.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f7 tigetstr("kf7")
diff --git a/src/term/key_f8.c b/src/term/key_f8.c
index 6349c109..16fa3e75 100644
--- a/src/term/key_f8.c
+++ b/src/term/key_f8.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f8 tigetstr("kf8")
diff --git a/src/term/key_f9.c b/src/term/key_f9.c
index ec6ba70b..20834e77 100644
--- a/src/term/key_f9.c
+++ b/src/term/key_f9.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_f9 tigetstr("kf9")
diff --git a/src/term/key_find.c b/src/term/key_find.c
index 914a8d09..1d3770c8 100644
--- a/src/term/key_find.c
+++ b/src/term/key_find.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_find tigetstr("kfnd")
diff --git a/src/term/key_help.c b/src/term/key_help.c
index 50e4f88e..8bcb33b7 100644
--- a/src/term/key_help.c
+++ b/src/term/key_help.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_help tigetstr("khlp")
diff --git a/src/term/key_home.c b/src/term/key_home.c
index 0d027315..dabf3ed7 100644
--- a/src/term/key_home.c
+++ b/src/term/key_home.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_home tigetstr("khome")
diff --git a/src/term/key_ic.c b/src/term/key_ic.c
index 15eb61e0..6e75a909 100644
--- a/src/term/key_ic.c
+++ b/src/term/key_ic.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ic tigetstr("kichl")
diff --git a/src/term/key_il.c b/src/term/key_il.c
index 173046e5..1fe93b61 100644
--- a/src/term/key_il.c
+++ b/src/term/key_il.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_il tigetstr("kill")
diff --git a/src/term/key_left.c b/src/term/key_left.c
index 74250ee5..9d7ab4f3 100644
--- a/src/term/key_left.c
+++ b/src/term/key_left.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_left tigetstr("kcubl")
diff --git a/src/term/key_ll.c b/src/term/key_ll.c
index 29eeb74c..0f7b297f 100644
--- a/src/term/key_ll.c
+++ b/src/term/key_ll.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ll tigetstr("kll")
diff --git a/src/term/key_mark.c b/src/term/key_mark.c
index 98208eb5..54f08bbf 100644
--- a/src/term/key_mark.c
+++ b/src/term/key_mark.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_mark tigetstr("kmrk")
diff --git a/src/term/key_message.c b/src/term/key_message.c
index 401a91ad..a85a1f7d 100644
--- a/src/term/key_message.c
+++ b/src/term/key_message.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_message tigetstr("kmsg")
diff --git a/src/term/key_mouse.c b/src/term/key_mouse.c
index c09db525..55dc027e 100644
--- a/src/term/key_mouse.c
+++ b/src/term/key_mouse.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_mouse tigetstr("kmous")
diff --git a/src/term/key_move.c b/src/term/key_move.c
index 2bf646e0..d4730ceb 100644
--- a/src/term/key_move.c
+++ b/src/term/key_move.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_move tigetstr("kmov")
diff --git a/src/term/key_next.c b/src/term/key_next.c
index 529bbdfd..01b71572 100644
--- a/src/term/key_next.c
+++ b/src/term/key_next.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_next tigetstr("knxt")
diff --git a/src/term/key_npage.c b/src/term/key_npage.c
index 40cc6d53..ca983026 100644
--- a/src/term/key_npage.c
+++ b/src/term/key_npage.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_npage tigetstr("knp")
diff --git a/src/term/key_open.c b/src/term/key_open.c
index 806f9d7d..ed2b1c8e 100644
--- a/src/term/key_open.c
+++ b/src/term/key_open.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_open tigetstr("kopn")
diff --git a/src/term/key_options.c b/src/term/key_options.c
index ffbe9784..33d7119a 100644
--- a/src/term/key_options.c
+++ b/src/term/key_options.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_options tigetstr("kopt")
diff --git a/src/term/key_ppage.c b/src/term/key_ppage.c
index 4fac2d60..5f02a9d2 100644
--- a/src/term/key_ppage.c
+++ b/src/term/key_ppage.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ppage tigetstr("kpp")
diff --git a/src/term/key_previous.c b/src/term/key_previous.c
index 3bc060b0..6cf3903b 100644
--- a/src/term/key_previous.c
+++ b/src/term/key_previous.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_previous tigetstr("kprv")
diff --git a/src/term/key_print.c b/src/term/key_print.c
index 7b799bd1..ac7743fa 100644
--- a/src/term/key_print.c
+++ b/src/term/key_print.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_print tigetstr("kprt")
diff --git a/src/term/key_redo.c b/src/term/key_redo.c
index e8afa350..83dd68a9 100644
--- a/src/term/key_redo.c
+++ b/src/term/key_redo.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_redo tigetstr("krdo")
diff --git a/src/term/key_reference.c b/src/term/key_reference.c
index b94e05e3..6c1bee2a 100644
--- a/src/term/key_reference.c
+++ b/src/term/key_reference.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_reference tigetstr("kref")
diff --git a/src/term/key_refresh.c b/src/term/key_refresh.c
index af8754ce..d13b2ab7 100644
--- a/src/term/key_refresh.c
+++ b/src/term/key_refresh.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_refresh tigetstr("krfr")
diff --git a/src/term/key_replace.c b/src/term/key_replace.c
index 6474e871..c8cbad3c 100644
--- a/src/term/key_replace.c
+++ b/src/term/key_replace.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_replace tigetstr("krpl")
diff --git a/src/term/key_restart.c b/src/term/key_restart.c
index f6711811..a9f6d82a 100644
--- a/src/term/key_restart.c
+++ b/src/term/key_restart.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_restart tigetstr("krst")
diff --git a/src/term/key_resume.c b/src/term/key_resume.c
index a6835570..79b373dc 100644
--- a/src/term/key_resume.c
+++ b/src/term/key_resume.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_resume tigetstr("kres")
diff --git a/src/term/key_right.c b/src/term/key_right.c
index ecd196ea..32a96dad 100644
--- a/src/term/key_right.c
+++ b/src/term/key_right.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_right tigetstr("kcufl")
diff --git a/src/term/key_save.c b/src/term/key_save.c
index d5f72441..70fa7a5a 100644
--- a/src/term/key_save.c
+++ b/src/term/key_save.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_save tigetstr("ksav")
diff --git a/src/term/key_sbeg.c b/src/term/key_sbeg.c
index 17d097d2..fe23751d 100644
--- a/src/term/key_sbeg.c
+++ b/src/term/key_sbeg.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sbeg tigetstr("kBEG")
diff --git a/src/term/key_scancel.c b/src/term/key_scancel.c
index d528cb5f..136f8364 100644
--- a/src/term/key_scancel.c
+++ b/src/term/key_scancel.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_scancel tigetstr("kCAN")
diff --git a/src/term/key_scommand.c b/src/term/key_scommand.c
index efde6bfc..99a00289 100644
--- a/src/term/key_scommand.c
+++ b/src/term/key_scommand.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_scommand tigetstr("kCMD")
diff --git a/src/term/key_scopy.c b/src/term/key_scopy.c
index 3bf227ed..08574482 100644
--- a/src/term/key_scopy.c
+++ b/src/term/key_scopy.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_scopy tigetstr("kCPY")
diff --git a/src/term/key_screate.c b/src/term/key_screate.c
index 530187b4..4f52ca46 100644
--- a/src/term/key_screate.c
+++ b/src/term/key_screate.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_screate tigetstr("kCRT")
diff --git a/src/term/key_sdc.c b/src/term/key_sdc.c
index 973da87f..77c8689a 100644
--- a/src/term/key_sdc.c
+++ b/src/term/key_sdc.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sdc tigetstr("kDC")
diff --git a/src/term/key_sdl.c b/src/term/key_sdl.c
index 1ebe6137..ffa453b5 100644
--- a/src/term/key_sdl.c
+++ b/src/term/key_sdl.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sdl tigetstr("kDL")
diff --git a/src/term/key_select.c b/src/term/key_select.c
index 7ce6fba5..ecda4961 100644
--- a/src/term/key_select.c
+++ b/src/term/key_select.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_select tigetstr("kslt")
diff --git a/src/term/key_send.c b/src/term/key_send.c
index bc0a845e..e2163487 100644
--- a/src/term/key_send.c
+++ b/src/term/key_send.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_send tigetstr("kEND")
diff --git a/src/term/key_seol.c b/src/term/key_seol.c
index 7ab0d2e8..f03cb0cb 100644
--- a/src/term/key_seol.c
+++ b/src/term/key_seol.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_seol tigetstr("kEOL")
diff --git a/src/term/key_sexit.c b/src/term/key_sexit.c
index 93d22152..bb4ee971 100644
--- a/src/term/key_sexit.c
+++ b/src/term/key_sexit.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sexit tigetstr("kEXT")
diff --git a/src/term/key_sf.c b/src/term/key_sf.c
index 6bcdda67..9f989510 100644
--- a/src/term/key_sf.c
+++ b/src/term/key_sf.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sf tigetstr("kind")
diff --git a/src/term/key_sfind.c b/src/term/key_sfind.c
index fae8d345..d213b4d7 100644
--- a/src/term/key_sfind.c
+++ b/src/term/key_sfind.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sfind tigetstr("kFND")
diff --git a/src/term/key_shelp.c b/src/term/key_shelp.c
index 03aedae5..f1e54ebe 100644
--- a/src/term/key_shelp.c
+++ b/src/term/key_shelp.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_shelp tigetstr("kHLP")
diff --git a/src/term/key_shome.c b/src/term/key_shome.c
index 74729014..1bc3d11b 100644
--- a/src/term/key_shome.c
+++ b/src/term/key_shome.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_shome tigetstr("kHOM")
diff --git a/src/term/key_sic.c b/src/term/key_sic.c
index 0d201b23..19b9ef61 100644
--- a/src/term/key_sic.c
+++ b/src/term/key_sic.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sic tigetstr("iIC")
diff --git a/src/term/key_sleft.c b/src/term/key_sleft.c
index 333d6103..0c9d609f 100644
--- a/src/term/key_sleft.c
+++ b/src/term/key_sleft.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sleft tigetstr("kLFT")
diff --git a/src/term/key_smessage.c b/src/term/key_smessage.c
index 09a4f770..48e6975d 100644
--- a/src/term/key_smessage.c
+++ b/src/term/key_smessage.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_smessage tigetstr("kMSG")
diff --git a/src/term/key_smove.c b/src/term/key_smove.c
index 3c2decdd..896d22b4 100644
--- a/src/term/key_smove.c
+++ b/src/term/key_smove.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_smove tigetstr("kMOV")
diff --git a/src/term/key_snext.c b/src/term/key_snext.c
index bcf32e14..48b2ee6c 100644
--- a/src/term/key_snext.c
+++ b/src/term/key_snext.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_snext tigetstr("kNXT")
diff --git a/src/term/key_soptions.c b/src/term/key_soptions.c
index 7d87754c..d248e187 100644
--- a/src/term/key_soptions.c
+++ b/src/term/key_soptions.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_soptions tigetstr("kOPT")
diff --git a/src/term/key_sprevious.c b/src/term/key_sprevious.c
index fe427b12..27a40b80 100644
--- a/src/term/key_sprevious.c
+++ b/src/term/key_sprevious.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sprevious tigetstr("kPRV")
diff --git a/src/term/key_sprint.c b/src/term/key_sprint.c
index ca8201ef..781c250a 100644
--- a/src/term/key_sprint.c
+++ b/src/term/key_sprint.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sprint tigetstr("kPRT")
diff --git a/src/term/key_sr.c b/src/term/key_sr.c
index 54d140c2..315c70a9 100644
--- a/src/term/key_sr.c
+++ b/src/term/key_sr.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sr tigetstr("kri")
diff --git a/src/term/key_sredo.c b/src/term/key_sredo.c
index b33d56c6..6c37fd88 100644
--- a/src/term/key_sredo.c
+++ b/src/term/key_sredo.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sredo tigetstr("kRDO")
diff --git a/src/term/key_sreplace.c b/src/term/key_sreplace.c
index 39c524e0..ede3b495 100644
--- a/src/term/key_sreplace.c
+++ b/src/term/key_sreplace.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sreplace tigetstr("kRPL")
diff --git a/src/term/key_sright.c b/src/term/key_sright.c
index ee355bb6..bf6c1edf 100644
--- a/src/term/key_sright.c
+++ b/src/term/key_sright.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sright tigetstr("kRIT")
diff --git a/src/term/key_srsume.c b/src/term/key_srsume.c
index 74af3eb9..9cd42671 100644
--- a/src/term/key_srsume.c
+++ b/src/term/key_srsume.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_srsume tigetstr("kRES")
diff --git a/src/term/key_ssave.c b/src/term/key_ssave.c
index f3a0c979..b3f2346b 100644
--- a/src/term/key_ssave.c
+++ b/src/term/key_ssave.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ssave tigetstr("kSAV")
diff --git a/src/term/key_ssuspend.c b/src/term/key_ssuspend.c
index a0ebd319..2eba9a99 100644
--- a/src/term/key_ssuspend.c
+++ b/src/term/key_ssuspend.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_ssuspend tigetstr("kSPD")
diff --git a/src/term/key_stab.c b/src/term/key_stab.c
index 4f36e0a4..68c93d43 100644
--- a/src/term/key_stab.c
+++ b/src/term/key_stab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_stab tigetstr("khts")
diff --git a/src/term/key_sundo.c b/src/term/key_sundo.c
index 994ad1a6..08e8555a 100644
--- a/src/term/key_sundo.c
+++ b/src/term/key_sundo.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_sundo tigetstr("sUND")
diff --git a/src/term/key_suspend.c b/src/term/key_suspend.c
index 0562ec9f..fadaa60f 100644
--- a/src/term/key_suspend.c
+++ b/src/term/key_suspend.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_suspend tigetstr("kspd")
diff --git a/src/term/key_undo.c b/src/term/key_undo.c
index 1e7a863a..7d362a8f 100644
--- a/src/term/key_undo.c
+++ b/src/term/key_undo.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_undo tigetstr("kund")
diff --git a/src/term/key_up.c b/src/term/key_up.c
index ca9a1582..bf2aba3a 100644
--- a/src/term/key_up.c
+++ b/src/term/key_up.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define key_up tigetstr("kcuul")
diff --git a/src/term/keypad_local.c b/src/term/keypad_local.c
index ad2a926f..a2367587 100644
--- a/src/term/keypad_local.c
+++ b/src/term/keypad_local.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define keypad_local tigetstr("rmkx")
diff --git a/src/term/keypad_xmit.c b/src/term/keypad_xmit.c
index 5130d2b8..c56944a8 100644
--- a/src/term/keypad_xmit.c
+++ b/src/term/keypad_xmit.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define keypad_xmit tigetstr("smkx")
diff --git a/src/term/lab_f0.c b/src/term/lab_f0.c
index 79971cb8..f7729487 100644
--- a/src/term/lab_f0.c
+++ b/src/term/lab_f0.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f0 tigetstr("lf0")
diff --git a/src/term/lab_f1.c b/src/term/lab_f1.c
index c44ffb07..260c3b77 100644
--- a/src/term/lab_f1.c
+++ b/src/term/lab_f1.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f1 tigetstr("lf1")
diff --git a/src/term/lab_f10.c b/src/term/lab_f10.c
index 0276028b..1309b055 100644
--- a/src/term/lab_f10.c
+++ b/src/term/lab_f10.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f10 tigetstr("lf10")
diff --git a/src/term/lab_f2.c b/src/term/lab_f2.c
index 773db556..6fe7b9b0 100644
--- a/src/term/lab_f2.c
+++ b/src/term/lab_f2.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f2 tigetstr("lf2")
diff --git a/src/term/lab_f3.c b/src/term/lab_f3.c
index d1923cbd..a78fe9dc 100644
--- a/src/term/lab_f3.c
+++ b/src/term/lab_f3.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f3 tigetstr("lf3")
diff --git a/src/term/lab_f4.c b/src/term/lab_f4.c
index 68865ab8..cf6a6795 100644
--- a/src/term/lab_f4.c
+++ b/src/term/lab_f4.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f4 tigetstr("lf4")
diff --git a/src/term/lab_f5.c b/src/term/lab_f5.c
index 617e134e..23ad50bd 100644
--- a/src/term/lab_f5.c
+++ b/src/term/lab_f5.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f5 tigetstr("lf5")
diff --git a/src/term/lab_f6.c b/src/term/lab_f6.c
index 8a751a2e..f76c6b2e 100644
--- a/src/term/lab_f6.c
+++ b/src/term/lab_f6.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f6 tigetstr("lf6")
diff --git a/src/term/lab_f7.c b/src/term/lab_f7.c
index 9be9199a..f7a6b777 100644
--- a/src/term/lab_f7.c
+++ b/src/term/lab_f7.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f7 tigetstr("lf7")
diff --git a/src/term/lab_f8.c b/src/term/lab_f8.c
index 990c7e85..01ab422f 100644
--- a/src/term/lab_f8.c
+++ b/src/term/lab_f8.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f8 tigetstr("lf8")
diff --git a/src/term/lab_f9.c b/src/term/lab_f9.c
index 95b5a649..50656985 100644
--- a/src/term/lab_f9.c
+++ b/src/term/lab_f9.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lab_f9 tigetstr("lf9")
diff --git a/src/term/label_format.c b/src/term/label_format.c
index 5cd680ea..07178143 100644
--- a/src/term/label_format.c
+++ b/src/term/label_format.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define label_format tigetstr("fln")
diff --git a/src/term/label_height.c b/src/term/label_height.c
index dde201e9..77357bb5 100644
--- a/src/term/label_height.c
+++ b/src/term/label_height.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define label_height tigetnum("lh")
diff --git a/src/term/label_off.c b/src/term/label_off.c
index f2a42ba0..fabdec3e 100644
--- a/src/term/label_off.c
+++ b/src/term/label_off.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define label_off tigetstr("rmln")
diff --git a/src/term/label_on.c b/src/term/label_on.c
index 8aff657e..ff2deb0a 100644
--- a/src/term/label_on.c
+++ b/src/term/label_on.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define label_on tigetstr("smln")
diff --git a/src/term/label_width.c b/src/term/label_width.c
index cf73b5d8..768d7406 100644
--- a/src/term/label_width.c
+++ b/src/term/label_width.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define label_width tigetnum("lw")
diff --git a/src/term/lines.c b/src/term/lines.c
index 8b435fc3..cb596283 100644
--- a/src/term/lines.c
+++ b/src/term/lines.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lines tigetnum("lines")
diff --git a/src/term/lines_of_memory.c b/src/term/lines_of_memory.c
index c06cd316..36d62003 100644
--- a/src/term/lines_of_memory.c
+++ b/src/term/lines_of_memory.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lines_of_memory tigetnum("lm")
diff --git a/src/term/lpi_changes_res.c b/src/term/lpi_changes_res.c
index 812f1136..91e60b3b 100644
--- a/src/term/lpi_changes_res.c
+++ b/src/term/lpi_changes_res.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define lpi_changes_res tigetflag("lpix")
diff --git a/src/term/magic_cookie_glitch.c b/src/term/magic_cookie_glitch.c
index 4fe9a4f0..413b475c 100644
--- a/src/term/magic_cookie_glitch.c
+++ b/src/term/magic_cookie_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define magic_cookie_glitch tigetnum("xmc")
diff --git a/src/term/max_attributes.c b/src/term/max_attributes.c
index 0bbb621b..33208b02 100644
--- a/src/term/max_attributes.c
+++ b/src/term/max_attributes.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define max_attributes tigetnum("ma")
diff --git a/src/term/max_colors.c b/src/term/max_colors.c
index 6739f6ed..b2c5a74f 100644
--- a/src/term/max_colors.c
+++ b/src/term/max_colors.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define max_colors tigetnum("colors")
diff --git a/src/term/max_micro_address.c b/src/term/max_micro_address.c
index 5f32b6e8..4d78821a 100644
--- a/src/term/max_micro_address.c
+++ b/src/term/max_micro_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define max_micro_address tigetnum("maddr")
diff --git a/src/term/max_micro_jump.c b/src/term/max_micro_jump.c
index a091623b..5817514d 100644
--- a/src/term/max_micro_jump.c
+++ b/src/term/max_micro_jump.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define max_micro_jump tigetnum("mjump")
diff --git a/src/term/max_pairs.c b/src/term/max_pairs.c
index 45f4bff3..8dea9995 100644
--- a/src/term/max_pairs.c
+++ b/src/term/max_pairs.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define max_pairs tigetnum("pairs")
diff --git a/src/term/maximum_windows.c b/src/term/maximum_windows.c
index 58ac9f42..1a6a7ab6 100644
--- a/src/term/maximum_windows.c
+++ b/src/term/maximum_windows.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define maximum_windows tigetnum("wnum")
diff --git a/src/term/memory_above.c b/src/term/memory_above.c
index 5a209cbb..4f629836 100644
--- a/src/term/memory_above.c
+++ b/src/term/memory_above.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define memory_above tigetflag("da")
diff --git a/src/term/memory_below.c b/src/term/memory_below.c
index 7f0eb8dd..a7964802 100644
--- a/src/term/memory_below.c
+++ b/src/term/memory_below.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define memory_below tigetflag("db")
diff --git a/src/term/meta_off.c b/src/term/meta_off.c
index 8dd5bbc9..37acf836 100644
--- a/src/term/meta_off.c
+++ b/src/term/meta_off.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define meta_off tigetstr("rmm")
diff --git a/src/term/meta_on.c b/src/term/meta_on.c
index 57f81ac5..c513368a 100644
--- a/src/term/meta_on.c
+++ b/src/term/meta_on.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define meta_on tigetstr("smm")
diff --git a/src/term/micro_col_size.c b/src/term/micro_col_size.c
index bb319842..84ec895d 100644
--- a/src/term/micro_col_size.c
+++ b/src/term/micro_col_size.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_col_size tigetnum("mcs")
diff --git a/src/term/micro_colum_address.c b/src/term/micro_colum_address.c
index 468cec72..77ee71fe 100644
--- a/src/term/micro_colum_address.c
+++ b/src/term/micro_colum_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_colum_address tigetstr("mhpa")
diff --git a/src/term/micro_down.c b/src/term/micro_down.c
index 60062fa5..b859687e 100644
--- a/src/term/micro_down.c
+++ b/src/term/micro_down.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_down tigetstr("mcudl")
diff --git a/src/term/micro_left.c b/src/term/micro_left.c
index 8d5e1138..4c30e343 100644
--- a/src/term/micro_left.c
+++ b/src/term/micro_left.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_left tigetstr("mcubl")
diff --git a/src/term/micro_line_size.c b/src/term/micro_line_size.c
index 51392970..e32c62f5 100644
--- a/src/term/micro_line_size.c
+++ b/src/term/micro_line_size.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_line_size tigetnum("mls")
diff --git a/src/term/micro_right.c b/src/term/micro_right.c
index 02637dbc..683eccaa 100644
--- a/src/term/micro_right.c
+++ b/src/term/micro_right.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_right tigetstr("mcufl")
diff --git a/src/term/micro_row_address.c b/src/term/micro_row_address.c
index 09224467..73473d8b 100644
--- a/src/term/micro_row_address.c
+++ b/src/term/micro_row_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_row_address tigetstr("mvpa")
diff --git a/src/term/micro_up.c b/src/term/micro_up.c
index 139eed7c..f2c45306 100644
--- a/src/term/micro_up.c
+++ b/src/term/micro_up.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define micro_up tigetstr("mcuul")
diff --git a/src/term/mouse_info.c b/src/term/mouse_info.c
index 7fe0c280..c5242d89 100644
--- a/src/term/mouse_info.c
+++ b/src/term/mouse_info.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define mouse_info tigetstr("minfo")
diff --git a/src/term/move_insert_mode.c b/src/term/move_insert_mode.c
index 7a436d68..159524b7 100644
--- a/src/term/move_insert_mode.c
+++ b/src/term/move_insert_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define move_insert_mode tigetflag("mir")
diff --git a/src/term/move_standout_mode.c b/src/term/move_standout_mode.c
index 05bb0902..c7699a16 100644
--- a/src/term/move_standout_mode.c
+++ b/src/term/move_standout_mode.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define move_standout_mode tigetflag("msgr")
diff --git a/src/term/needs_xon_xoff.c b/src/term/needs_xon_xoff.c
index e9d44785..24367b96 100644
--- a/src/term/needs_xon_xoff.c
+++ b/src/term/needs_xon_xoff.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define needs_xon_xoff tigetflag("nxon")
diff --git a/src/term/newline.c b/src/term/newline.c
index 2987aa32..c530ba36 100644
--- a/src/term/newline.c
+++ b/src/term/newline.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define newline tigetstr("nel")
diff --git a/src/term/no_color_video.c b/src/term/no_color_video.c
index 242c34b2..6b825716 100644
--- a/src/term/no_color_video.c
+++ b/src/term/no_color_video.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define no_color_video tigetnum("ncv")
diff --git a/src/term/no_esc_ctlc.c b/src/term/no_esc_ctlc.c
index b50aa08b..572031fe 100644
--- a/src/term/no_esc_ctlc.c
+++ b/src/term/no_esc_ctlc.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define no_esc_ctlc tigetflag("xsb")
diff --git a/src/term/no_pad_char.c b/src/term/no_pad_char.c
index 0b3b00ed..d09987ae 100644
--- a/src/term/no_pad_char.c
+++ b/src/term/no_pad_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define no_pad_char tigetflag("npc")
diff --git a/src/term/non_dest_scroll_region.c b/src/term/non_dest_scroll_region.c
index 0ebe36ff..b099bbce 100644
--- a/src/term/non_dest_scroll_region.c
+++ b/src/term/non_dest_scroll_region.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define non_dest_scroll_region tigetflag("ndscr")
diff --git a/src/term/non_rev_rmcup.c b/src/term/non_rev_rmcup.c
index 3b2b95f6..7fdecf09 100644
--- a/src/term/non_rev_rmcup.c
+++ b/src/term/non_rev_rmcup.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define non_rev_rmcup tigetflag("nrrmc")
diff --git a/src/term/num_labels.c b/src/term/num_labels.c
index 6acc33f3..5452b223 100644
--- a/src/term/num_labels.c
+++ b/src/term/num_labels.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define num_labels tigetnum("nlab")
diff --git a/src/term/number_of_pins.c b/src/term/number_of_pins.c
index 38c345fb..7123b43b 100644
--- a/src/term/number_of_pins.c
+++ b/src/term/number_of_pins.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define number_of_pins tigetnum("npins")
diff --git a/src/term/order_of_pins.c b/src/term/order_of_pins.c
index 49cda87d..db38614a 100644
--- a/src/term/order_of_pins.c
+++ b/src/term/order_of_pins.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define order_of_pins tigetstr("porder")
diff --git a/src/term/orig_colors.c b/src/term/orig_colors.c
index 63a4a91d..24f862c3 100644
--- a/src/term/orig_colors.c
+++ b/src/term/orig_colors.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define orig_colors tigetstr("oc")
diff --git a/src/term/orig_pair.c b/src/term/orig_pair.c
index 5772fc55..5a77cb5b 100644
--- a/src/term/orig_pair.c
+++ b/src/term/orig_pair.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define orig_pair tigetstr("op")
diff --git a/src/term/output_res_char.c b/src/term/output_res_char.c
index a03426c0..0d82498a 100644
--- a/src/term/output_res_char.c
+++ b/src/term/output_res_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define output_res_char tigetnum("orc")
diff --git a/src/term/output_res_horz_inch.c b/src/term/output_res_horz_inch.c
index 5a9867ae..a96fbb99 100644
--- a/src/term/output_res_horz_inch.c
+++ b/src/term/output_res_horz_inch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define output_res_horz_inch tigetnum("orhi")
diff --git a/src/term/output_res_line.c b/src/term/output_res_line.c
index 31cec23a..d8898230 100644
--- a/src/term/output_res_line.c
+++ b/src/term/output_res_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define output_res_line tigetnum("orl")
diff --git a/src/term/output_res_vert_inch.c b/src/term/output_res_vert_inch.c
index 6d263ec7..9b3b606d 100644
--- a/src/term/output_res_vert_inch.c
+++ b/src/term/output_res_vert_inch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define output_res_vert_inch tigetnum("orvi")
diff --git a/src/term/over_strike.c b/src/term/over_strike.c
index 8cd1efbb..a10da9fa 100644
--- a/src/term/over_strike.c
+++ b/src/term/over_strike.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define over_strike tigetflag("os")
diff --git a/src/term/pad_char.c b/src/term/pad_char.c
index 1501b08a..831e3d78 100644
--- a/src/term/pad_char.c
+++ b/src/term/pad_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pad_char tigetstr("pad")
diff --git a/src/term/padding_baud_rate.c b/src/term/padding_baud_rate.c
index 4f129eba..24fbd5e9 100644
--- a/src/term/padding_baud_rate.c
+++ b/src/term/padding_baud_rate.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define padding_baud_rate tigetnum("pb")
diff --git a/src/term/parm_dch.c b/src/term/parm_dch.c
index 587f09ae..705569f3 100644
--- a/src/term/parm_dch.c
+++ b/src/term/parm_dch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_dch tigetstr("dch")
diff --git a/src/term/parm_delete_line.c b/src/term/parm_delete_line.c
index d57d5c99..7c43e819 100644
--- a/src/term/parm_delete_line.c
+++ b/src/term/parm_delete_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_delete_line tigetstr("dl")
diff --git a/src/term/parm_down_cursor.c b/src/term/parm_down_cursor.c
index 22dcdbeb..97acc102 100644
--- a/src/term/parm_down_cursor.c
+++ b/src/term/parm_down_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_down_cursor tigetstr("cud")
diff --git a/src/term/parm_down_micro.c b/src/term/parm_down_micro.c
index 10e7e2cf..80a77c21 100644
--- a/src/term/parm_down_micro.c
+++ b/src/term/parm_down_micro.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_down_micro tigetstr("mcud")
diff --git a/src/term/parm_ich.c b/src/term/parm_ich.c
index c010f187..1121bfb0 100644
--- a/src/term/parm_ich.c
+++ b/src/term/parm_ich.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_ich tigetstr("ich")
diff --git a/src/term/parm_index.c b/src/term/parm_index.c
index daae837e..0aa8d181 100644
--- a/src/term/parm_index.c
+++ b/src/term/parm_index.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_index tigetstr("indn")
diff --git a/src/term/parm_insert_line.c b/src/term/parm_insert_line.c
index 4614352d..3219fefe 100644
--- a/src/term/parm_insert_line.c
+++ b/src/term/parm_insert_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_insert_line tigetstr("il")
diff --git a/src/term/parm_left_cursor.c b/src/term/parm_left_cursor.c
index dfef4f0a..7b1488e0 100644
--- a/src/term/parm_left_cursor.c
+++ b/src/term/parm_left_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_left_cursor tigetstr("cub")
diff --git a/src/term/parm_left_micro.c b/src/term/parm_left_micro.c
index fe8bce59..b4273df7 100644
--- a/src/term/parm_left_micro.c
+++ b/src/term/parm_left_micro.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_left_micro tigetstr("mcub")
diff --git a/src/term/parm_right_cursor.c b/src/term/parm_right_cursor.c
index a635f5cf..955f5eb7 100644
--- a/src/term/parm_right_cursor.c
+++ b/src/term/parm_right_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_right_cursor tigetstr("cuf")
diff --git a/src/term/parm_right_micro.c b/src/term/parm_right_micro.c
index 7774e515..8a2e2b0c 100644
--- a/src/term/parm_right_micro.c
+++ b/src/term/parm_right_micro.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_right_micro tigetstr("mcuf")
diff --git a/src/term/parm_rindex.c b/src/term/parm_rindex.c
index a79ee6b2..8daaab54 100644
--- a/src/term/parm_rindex.c
+++ b/src/term/parm_rindex.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_rindex tigetstr("rin")
diff --git a/src/term/parm_up_cursor.c b/src/term/parm_up_cursor.c
index c237c482..3187642b 100644
--- a/src/term/parm_up_cursor.c
+++ b/src/term/parm_up_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_up_cursor tigetstr("cuu")
diff --git a/src/term/parm_up_micro.c b/src/term/parm_up_micro.c
index 65bde4a5..8468ac71 100644
--- a/src/term/parm_up_micro.c
+++ b/src/term/parm_up_micro.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define parm_up_micro tigetstr("mcuu")
diff --git a/src/term/pc_term_options.c b/src/term/pc_term_options.c
index 259340a9..3f6a89c6 100644
--- a/src/term/pc_term_options.c
+++ b/src/term/pc_term_options.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pc_term_options tigetstr("pctrm")
diff --git a/src/term/pkey_key.c b/src/term/pkey_key.c
index 835bc575..a3c78998 100644
--- a/src/term/pkey_key.c
+++ b/src/term/pkey_key.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pkey_key tigetstr("pfkey")
diff --git a/src/term/pkey_local.c b/src/term/pkey_local.c
index d3aecca4..f5f63d6a 100644
--- a/src/term/pkey_local.c
+++ b/src/term/pkey_local.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pkey_local tigetstr("pfloc")
diff --git a/src/term/pkey_plab.c b/src/term/pkey_plab.c
index 0f068266..88fc73c1 100644
--- a/src/term/pkey_plab.c
+++ b/src/term/pkey_plab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pkey_plab tigetstr("pfxl")
diff --git a/src/term/pkey_xmit.c b/src/term/pkey_xmit.c
index 7c73f597..ad57ad3f 100644
--- a/src/term/pkey_xmit.c
+++ b/src/term/pkey_xmit.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pkey_xmit tigetstr("pfx")
diff --git a/src/term/plab_norm.c b/src/term/plab_norm.c
index b14e2f22..15bc6884 100644
--- a/src/term/plab_norm.c
+++ b/src/term/plab_norm.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define plab_norm tigetstr("pln")
diff --git a/src/term/print_rate.c b/src/term/print_rate.c
index b6cd916f..dce8027f 100644
--- a/src/term/print_rate.c
+++ b/src/term/print_rate.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define print_rate tigetnum("cps")
diff --git a/src/term/print_screen.c b/src/term/print_screen.c
index 0e80c782..1f5b2362 100644
--- a/src/term/print_screen.c
+++ b/src/term/print_screen.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define print_screen tigetstr("mc0")
diff --git a/src/term/prtr_non.c b/src/term/prtr_non.c
index bf1e8f65..4db3f44c 100644
--- a/src/term/prtr_non.c
+++ b/src/term/prtr_non.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define prtr_non tigetstr("mc5p")
diff --git a/src/term/prtr_off.c b/src/term/prtr_off.c
index a96eca11..41b20968 100644
--- a/src/term/prtr_off.c
+++ b/src/term/prtr_off.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define prtr_off tigetstr("mc4")
diff --git a/src/term/prtr_on.c b/src/term/prtr_on.c
index e78ba253..18cc67d5 100644
--- a/src/term/prtr_on.c
+++ b/src/term/prtr_on.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define prtr_on tigetstr("mc5")
diff --git a/src/term/prtr_silent.c b/src/term/prtr_silent.c
index 7ce0a4a6..c9d735dd 100644
--- a/src/term/prtr_silent.c
+++ b/src/term/prtr_silent.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define prtr_silent tigetflag("mc5i")
diff --git a/src/term/pulse.c b/src/term/pulse.c
index ae5a517d..f86a439b 100644
--- a/src/term/pulse.c
+++ b/src/term/pulse.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define pulse tigetstr("pulse")
diff --git a/src/term/quick_dial.c b/src/term/quick_dial.c
index 3ee98d35..653963f0 100644
--- a/src/term/quick_dial.c
+++ b/src/term/quick_dial.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define quick_dial tigetstr("qdial")
diff --git a/src/term/remove_clock.c b/src/term/remove_clock.c
index 7f15825f..5ee7df3e 100644
--- a/src/term/remove_clock.c
+++ b/src/term/remove_clock.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define remove_clock tigetstr("rmclk")
diff --git a/src/term/repeat_char.c b/src/term/repeat_char.c
index ff5c6747..689832c9 100644
--- a/src/term/repeat_char.c
+++ b/src/term/repeat_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define repeat_char tigetstr("rep")
diff --git a/src/term/req_for_input.c b/src/term/req_for_input.c
index 3875d0c0..db3d0a9a 100644
--- a/src/term/req_for_input.c
+++ b/src/term/req_for_input.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define req_for_input tigetstr("rfi")
diff --git a/src/term/req_mouse_pos.c b/src/term/req_mouse_pos.c
index e649ec02..b751bc24 100644
--- a/src/term/req_mouse_pos.c
+++ b/src/term/req_mouse_pos.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define req_mouse_pos tigetstr("reqmp")
diff --git a/src/term/reset_1string.c b/src/term/reset_1string.c
index f6289a11..92f3cb7e 100644
--- a/src/term/reset_1string.c
+++ b/src/term/reset_1string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define reset_1string tigetstr("rs1")
diff --git a/src/term/reset_2string.c b/src/term/reset_2string.c
index 9b8d5f33..36501d3e 100644
--- a/src/term/reset_2string.c
+++ b/src/term/reset_2string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define reset_2string tigetstr("rs2")
diff --git a/src/term/reset_3string.c b/src/term/reset_3string.c
index 35004bc7..17c42a83 100644
--- a/src/term/reset_3string.c
+++ b/src/term/reset_3string.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define reset_3string tigetstr("rs3")
diff --git a/src/term/reset_file.c b/src/term/reset_file.c
index 5f4bfd26..ce05ef27 100644
--- a/src/term/reset_file.c
+++ b/src/term/reset_file.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define reset_file tigetstr("rf")
diff --git a/src/term/restore_cursor.c b/src/term/restore_cursor.c
index bf3b4731..caa52f1c 100644
--- a/src/term/restore_cursor.c
+++ b/src/term/restore_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define restore_cursor tigetstr("rc")
diff --git a/src/term/row_addr_glitch.c b/src/term/row_addr_glitch.c
index 84634aaf..010d4401 100644
--- a/src/term/row_addr_glitch.c
+++ b/src/term/row_addr_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define row_addr_glitch tigetflag("xvpa")
diff --git a/src/term/row_address.c b/src/term/row_address.c
index 26754554..b8e2e63b 100644
--- a/src/term/row_address.c
+++ b/src/term/row_address.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define row_address tigetstr("vpa")
diff --git a/src/term/save_cursor.c b/src/term/save_cursor.c
index 8f0cea8f..c1d19b99 100644
--- a/src/term/save_cursor.c
+++ b/src/term/save_cursor.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define save_cursor tigetstr("sc")
diff --git a/src/term/scancode_escape.c b/src/term/scancode_escape.c
index 138716ad..878476f0 100644
--- a/src/term/scancode_escape.c
+++ b/src/term/scancode_escape.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define scancode_escape tigetstr("scesc")
diff --git a/src/term/scroll_forward.c b/src/term/scroll_forward.c
index 61f6dfe5..9f9f7081 100644
--- a/src/term/scroll_forward.c
+++ b/src/term/scroll_forward.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define scroll_forward tigetstr("ind")
diff --git a/src/term/scroll_reverse.c b/src/term/scroll_reverse.c
index f904abbb..be1442ad 100644
--- a/src/term/scroll_reverse.c
+++ b/src/term/scroll_reverse.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define scroll_reverse tigetstr("ri")
diff --git a/src/term/seT_top_margin.c b/src/term/seT_top_margin.c
index e0d76b11..84a6a234 100644
--- a/src/term/seT_top_margin.c
+++ b/src/term/seT_top_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define seT_top_margin tigetstr("smgt")
diff --git a/src/term/select_char_set.c b/src/term/select_char_set.c
index 5c1766dc..18308f67 100644
--- a/src/term/select_char_set.c
+++ b/src/term/select_char_set.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define select_char_set tigetstr("scs")
diff --git a/src/term/semi_auto_right_margin.c b/src/term/semi_auto_right_margin.c
index 3569aafb..13a9e4f0 100644
--- a/src/term/semi_auto_right_margin.c
+++ b/src/term/semi_auto_right_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define semi_auto_right_margin tigetflag("sam")
diff --git a/src/term/set0_des_seq.c b/src/term/set0_des_seq.c
index 478c2958..c3a01a7e 100644
--- a/src/term/set0_des_seq.c
+++ b/src/term/set0_des_seq.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set0_des_seq tigetstr("s0ds")
diff --git a/src/term/set1_des_seq.c b/src/term/set1_des_seq.c
index 25711abc..20c30b77 100644
--- a/src/term/set1_des_seq.c
+++ b/src/term/set1_des_seq.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set1_des_seq tigetstr("s1ds")
diff --git a/src/term/set2_des_seq.c b/src/term/set2_des_seq.c
index 5a75adb0..d9ecb9f9 100644
--- a/src/term/set2_des_seq.c
+++ b/src/term/set2_des_seq.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set2_des_seq tigetstr("s2ds")
diff --git a/src/term/set3_des_seq.c b/src/term/set3_des_seq.c
index a7e15473..a3425eb9 100644
--- a/src/term/set3_des_seq.c
+++ b/src/term/set3_des_seq.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set3_des_seq tigetstr("s3ds")
diff --git a/src/term/set_a_attributes.c b/src/term/set_a_attributes.c
index ed93a68f..2592c63a 100644
--- a/src/term/set_a_attributes.c
+++ b/src/term/set_a_attributes.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_a_attributes tigetstr("sgrl")
diff --git a/src/term/set_a_background.c b/src/term/set_a_background.c
index 045d31f0..b9ea96cd 100644
--- a/src/term/set_a_background.c
+++ b/src/term/set_a_background.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_a_background tigetstr("setab")
diff --git a/src/term/set_a_foreground.c b/src/term/set_a_foreground.c
index 1ef486f5..b1a879ca 100644
--- a/src/term/set_a_foreground.c
+++ b/src/term/set_a_foreground.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_a_foreground tigetstr("setaf")
diff --git a/src/term/set_attributes.c b/src/term/set_attributes.c
index 760ad56d..98ecb57f 100644
--- a/src/term/set_attributes.c
+++ b/src/term/set_attributes.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_attributes tigetstr("sgr")
diff --git a/src/term/set_background.c b/src/term/set_background.c
index 3a7639da..4bd684c8 100644
--- a/src/term/set_background.c
+++ b/src/term/set_background.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_background tigetstr("setb")
diff --git a/src/term/set_bottom_margin.c b/src/term/set_bottom_margin.c
index 2eee21a3..928de83b 100644
--- a/src/term/set_bottom_margin.c
+++ b/src/term/set_bottom_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_bottom_margin tigetstr("smgb")
diff --git a/src/term/set_bottom_margin_parm.c b/src/term/set_bottom_margin_parm.c
index f72acbea..8c8f0c64 100644
--- a/src/term/set_bottom_margin_parm.c
+++ b/src/term/set_bottom_margin_parm.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_bottom_margin_parm tigetstr("smgbp")
diff --git a/src/term/set_clock.c b/src/term/set_clock.c
index 82429a8c..83dfbcc7 100644
--- a/src/term/set_clock.c
+++ b/src/term/set_clock.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_clock tigetstr("sclk")
diff --git a/src/term/set_color_band.c b/src/term/set_color_band.c
index c9f192d6..9e34d8f7 100644
--- a/src/term/set_color_band.c
+++ b/src/term/set_color_band.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_color_band tigetstr("setcolor")
diff --git a/src/term/set_color_pair.c b/src/term/set_color_pair.c
index 60c3e585..483e3968 100644
--- a/src/term/set_color_pair.c
+++ b/src/term/set_color_pair.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_color_pair tigetstr("scp")
diff --git a/src/term/set_foreground.c b/src/term/set_foreground.c
index 2bbcb67a..9eda9e54 100644
--- a/src/term/set_foreground.c
+++ b/src/term/set_foreground.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_foreground tigetstr("setf")
diff --git a/src/term/set_left_margin.c b/src/term/set_left_margin.c
index 3f28e5e6..67803ba9 100644
--- a/src/term/set_left_margin.c
+++ b/src/term/set_left_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_left_margin tigetstr("smgl")
diff --git a/src/term/set_left_margin_parm.c b/src/term/set_left_margin_parm.c
index cb62f7d6..35c8428b 100644
--- a/src/term/set_left_margin_parm.c
+++ b/src/term/set_left_margin_parm.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_left_margin_parm tigetstr("smglp")
diff --git a/src/term/set_lr_margin.c b/src/term/set_lr_margin.c
index dbc287b2..4e917205 100644
--- a/src/term/set_lr_margin.c
+++ b/src/term/set_lr_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_lr_margin tigetstr("smglr")
diff --git a/src/term/set_page_length.c b/src/term/set_page_length.c
index 46d39852..5887fcbd 100644
--- a/src/term/set_page_length.c
+++ b/src/term/set_page_length.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_page_length tigetstr("slines")
diff --git a/src/term/set_pglen_inch.c b/src/term/set_pglen_inch.c
index f43e9bec..f1853322 100644
--- a/src/term/set_pglen_inch.c
+++ b/src/term/set_pglen_inch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_pglen_inch tigetstr("slength")
diff --git a/src/term/set_right_margin.c b/src/term/set_right_margin.c
index c6e18ad9..982162b5 100644
--- a/src/term/set_right_margin.c
+++ b/src/term/set_right_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_right_margin tigetstr("smgr")
diff --git a/src/term/set_right_margin_parm.c b/src/term/set_right_margin_parm.c
index 37fae0ac..247713a0 100644
--- a/src/term/set_right_margin_parm.c
+++ b/src/term/set_right_margin_parm.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_right_margin_parm tigetstr("smgrp")
diff --git a/src/term/set_tab.c b/src/term/set_tab.c
index 6e0515cf..bf2bfb32 100644
--- a/src/term/set_tab.c
+++ b/src/term/set_tab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_tab tigetstr("hts")
diff --git a/src/term/set_tb_margin.c b/src/term/set_tb_margin.c
index ee6aeb01..40b8ff56 100644
--- a/src/term/set_tb_margin.c
+++ b/src/term/set_tb_margin.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_tb_margin tigetstr("smgtb")
diff --git a/src/term/set_top_margin_parm.c b/src/term/set_top_margin_parm.c
index 2a994cfe..1bbf6e5a 100644
--- a/src/term/set_top_margin_parm.c
+++ b/src/term/set_top_margin_parm.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_top_margin_parm tigetstr("smgtp")
diff --git a/src/term/set_window.c b/src/term/set_window.c
index eb1e1a44..955023c3 100644
--- a/src/term/set_window.c
+++ b/src/term/set_window.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define set_window tigetstr("wind")
diff --git a/src/term/start_bit_image.c b/src/term/start_bit_image.c
index 233af083..4bb284eb 100644
--- a/src/term/start_bit_image.c
+++ b/src/term/start_bit_image.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define start_bit_image tigetstr("sbim")
diff --git a/src/term/start_char_set_def.c b/src/term/start_char_set_def.c
index bb95da8b..3289ee37 100644
--- a/src/term/start_char_set_def.c
+++ b/src/term/start_char_set_def.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define start_char_set_def tigetstr("scsd")
diff --git a/src/term/status_line_esc_ok.c b/src/term/status_line_esc_ok.c
index bab11646..d438aaa0 100644
--- a/src/term/status_line_esc_ok.c
+++ b/src/term/status_line_esc_ok.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define status_line_esc_ok tigetflag("eslok")
diff --git a/src/term/stop_bit_image.c b/src/term/stop_bit_image.c
index 8bab6f8a..611c2b4a 100644
--- a/src/term/stop_bit_image.c
+++ b/src/term/stop_bit_image.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define stop_bit_image tigetstr("rbim")
diff --git a/src/term/stop_char_set_def.c b/src/term/stop_char_set_def.c
index 20e7e60d..3c3e2714 100644
--- a/src/term/stop_char_set_def.c
+++ b/src/term/stop_char_set_def.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define stop_char_set_def tigetstr("rcsd")
diff --git a/src/term/subscript_characters.c b/src/term/subscript_characters.c
index 1e1a7487..d0fa34fb 100644
--- a/src/term/subscript_characters.c
+++ b/src/term/subscript_characters.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define subscript_characters tigetstr("subcs")
diff --git a/src/term/superscript_characters.c b/src/term/superscript_characters.c
index 50faf5a9..c06cf377 100644
--- a/src/term/superscript_characters.c
+++ b/src/term/superscript_characters.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define superscript_characters tigetstr("supcs")
diff --git a/src/term/tab.c b/src/term/tab.c
index f1b63cbe..4f29da4a 100644
--- a/src/term/tab.c
+++ b/src/term/tab.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define tab tigetstr("ht")
diff --git a/src/term/these_cause_cr.c b/src/term/these_cause_cr.c
index e7632e06..b73b288d 100644
--- a/src/term/these_cause_cr.c
+++ b/src/term/these_cause_cr.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define these_cause_cr tigetstr("docr")
diff --git a/src/term/tilde_glitch.c b/src/term/tilde_glitch.c
index 8e76475f..77c16f30 100644
--- a/src/term/tilde_glitch.c
+++ b/src/term/tilde_glitch.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define tilde_glitch tigetflag("hz")
diff --git a/src/term/to_status_line.c b/src/term/to_status_line.c
index e2d8e355..25daecec 100644
--- a/src/term/to_status_line.c
+++ b/src/term/to_status_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define to_status_line tigetstr("tsl")
diff --git a/src/term/tone.c b/src/term/tone.c
index 3f59e80c..27826cf4 100644
--- a/src/term/tone.c
+++ b/src/term/tone.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define tone tigetstr("tone")
diff --git a/src/term/transparent_underline.c b/src/term/transparent_underline.c
index 94700bd9..a3c27a39 100644
--- a/src/term/transparent_underline.c
+++ b/src/term/transparent_underline.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define transparent_underline tigetflag("ul")
diff --git a/src/term/underline_char.c b/src/term/underline_char.c
index f21a55a5..ebc56b09 100644
--- a/src/term/underline_char.c
+++ b/src/term/underline_char.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define underline_char tigetstr("uc")
diff --git a/src/term/up_half_line.c b/src/term/up_half_line.c
index 17b7fae4..24284bae 100644
--- a/src/term/up_half_line.c
+++ b/src/term/up_half_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define up_half_line tigetstr("hu")
diff --git a/src/term/user0.c b/src/term/user0.c
index 9eb6d0a9..7c670941 100644
--- a/src/term/user0.c
+++ b/src/term/user0.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user0 tigetstr("u0")
diff --git a/src/term/user1.c b/src/term/user1.c
index 6e91c80a..2a9aa863 100644
--- a/src/term/user1.c
+++ b/src/term/user1.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user1 tigetstr("u1")
diff --git a/src/term/user2.c b/src/term/user2.c
index c32b1a44..22265dec 100644
--- a/src/term/user2.c
+++ b/src/term/user2.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user2 tigetstr("u2")
diff --git a/src/term/user3.c b/src/term/user3.c
index 8f275a8f..c60f7658 100644
--- a/src/term/user3.c
+++ b/src/term/user3.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user3 tigetstr("u3")
diff --git a/src/term/user4.c b/src/term/user4.c
index a31a12e4..7d2d4f97 100644
--- a/src/term/user4.c
+++ b/src/term/user4.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user4 tigetstr("u4")
diff --git a/src/term/user5.c b/src/term/user5.c
index cb20f48b..6bd1bdc9 100644
--- a/src/term/user5.c
+++ b/src/term/user5.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user5 tigetstr("u5")
diff --git a/src/term/user6.c b/src/term/user6.c
index 52bc513c..d51b2ea5 100644
--- a/src/term/user6.c
+++ b/src/term/user6.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user6 tigetstr("u6")
diff --git a/src/term/user7.c b/src/term/user7.c
index 61ef91f7..4992f897 100644
--- a/src/term/user7.c
+++ b/src/term/user7.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user7 tigetstr("u7")
diff --git a/src/term/user8.c b/src/term/user8.c
index dff55403..2ba3ccd9 100644
--- a/src/term/user8.c
+++ b/src/term/user8.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user8 tigetstr("u8")
diff --git a/src/term/user9.c b/src/term/user9.c
index d7cc273c..6d4ee9b6 100644
--- a/src/term/user9.c
+++ b/src/term/user9.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define user9 tigetstr("u9")
diff --git a/src/term/virtual_terminal.c b/src/term/virtual_terminal.c
index aac79647..272173f7 100644
--- a/src/term/virtual_terminal.c
+++ b/src/term/virtual_terminal.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define virtual_terminal tigetnum("vt")
diff --git a/src/term/wait_tone.c b/src/term/wait_tone.c
index c976c563..4818564e 100644
--- a/src/term/wait_tone.c
+++ b/src/term/wait_tone.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define wait_tone tigetstr("wait")
diff --git a/src/term/wide_char_size.c b/src/term/wide_char_size.c
index 06b15c7e..dc3850d5 100644
--- a/src/term/wide_char_size.c
+++ b/src/term/wide_char_size.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define wide_char_size tigetnum("widcs")
diff --git a/src/term/width_status_line.c b/src/term/width_status_line.c
index 7247b7e7..b6ecdf68 100644
--- a/src/term/width_status_line.c
+++ b/src/term/width_status_line.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define width_status_line tigetnum("wsl")
diff --git a/src/term/xoff_character.c b/src/term/xoff_character.c
index 92072666..6c894673 100644
--- a/src/term/xoff_character.c
+++ b/src/term/xoff_character.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define xoff_character tigetstr("xoffc")
diff --git a/src/term/xon_character.c b/src/term/xon_character.c
index 6db26572..54429e65 100644
--- a/src/term/xon_character.c
+++ b/src/term/xon_character.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define xon_character tigetstr("xonc")
diff --git a/src/term/xon_xoff.c b/src/term/xon_xoff.c
index 8742c50a..c2b3e35e 100644
--- a/src/term/xon_xoff.c
+++ b/src/term/xon_xoff.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define xon_xoff tigetflag("xon")
diff --git a/src/term/zero_motion.c b/src/term/zero_motion.c
index 1e653d4a..5e7aca0e 100644
--- a/src/term/zero_motion.c
+++ b/src/term/zero_motion.c
@@ -1,4 +1,4 @@
-#include <curses.h>
+#include <term.h>
#define zero_motion tigetstr("zerom")