#ifndef XTANDARD_HEADER #define XTANDARD_HEADER #define signal_delete (0X7F) #define signal_arrow_up (0X415B1B) #define signal_arrow_down (0X425B1B) #define signal_arrow_right (0X435B1B) #define signal_arrow_left (0X445B1B) #define signal_control (0X1000000) #define signal_shift (0X2000000) #define signal_alternate (0X4000000) #define signal_system (0X8000000) #ifndef null #define null ((void *) 0) #endif enum { false, true }; enum { log_success, log_warning, log_failure, log_comment, log_count }; enum { file_type_text, file_type_common_assembly, file_type_flat_assembly, file_type_gnu_assembly, file_type_netwide_assembly, file_type_yet_another_assembly, file_type_c_source, file_type_c_header, file_type_ada_body, file_type_ada_specification, file_type_cpp_source, file_type_cpp_header, file_type_fortran_90, file_type_shell, file_type_cube_script, file_type_xolatile_script, file_type_count }; enum { effect_normal, effect_bold, effect_italic, effect_underline, effect_blink, effect_reverse, effect_count }; enum { colour_grey, colour_red, colour_green, colour_yellow, colour_blue, colour_pink, colour_cyan, colour_white, colour_count }; enum { character_null, character_start_header, character_start_text, character_end_text, character_end_transmission, character_enquiry, character_acknowledge, character_bell, character_backspace, character_tab_horizontal, character_line_feed, character_tab_vertical, character_form_feed, character_carriage_return, character_shift_out, character_shift_in, character_data_link_escape, character_device_control_1, character_device_control_2, character_device_control_3, character_device_control_4, character_not_acknowledge, character_synchronous_idle, character_end_transmission_block, character_cancel, character_end_medium, character_substitute, character_escape, character_file_separator, character_group_separator, character_record_separator, character_unit_separator }; enum { signal_none, signal_any, signal_a, signal_b, signal_c, signal_d, signal_e, signal_f, signal_g, signal_h, signal_i, signal_j, signal_k, signal_l, signal_m, signal_n, signal_o, signal_p, signal_q, signal_r, signal_s, signal_t, signal_u, signal_v, signal_w, signal_x, signal_y, signal_z, signal_0, signal_1, signal_2, signal_3, signal_4, signal_5, signal_6, signal_7, signal_8, signal_9, signal_escape, signal_tabulator, signal_return, signal_new_line, signal_slash, signal_backslash, signal_quote, signal_backquote, signal_space, signal_backspace, signal_dot, signal_comma, signal_cite, signal_caps_lock, signal_l_bracket, signal_r_bracket, signal_minus, signal_equal, signal_count }; extern void in (void * data, int size); extern void out (void * data, int size); extern void log_in (int type, int flag, char * data); extern void log_out (char * name); extern void echo (char * data); extern void dump (char * name, char * data); extern void echo_byte (int byte); extern void fatal_failure (int condition, char * message); extern int random (int minimum, int maximum); extern void limit (int * value, int minimum, int maximum); extern void * allocate (int size); extern void * reallocate (void * data, int size); extern void * deallocate (void * data); extern void * record (void); extern int file_open (char * name, int mode); extern int file_close (int file); extern void file_read (int file, void * data, int size); extern void file_write (int file, void * data, int size); extern int file_seek (int file, int whence); extern int file_size (char * name); extern int file_type (char * name); extern void * file_record (char * name); extern char * file_import (char * name); extern void file_export (char * name, void * data); extern void file_list_import (char * name); extern void file_list_export (char * name); extern void file_list_insert_character (char character, int position); extern void file_list_remove_character (int position); extern void file_list_delete (void); extern int character_is_uppercase (char character); extern int character_is_lowercase (char character); extern int character_is_digit (char character); extern int character_is_blank (char character); extern int character_is_alpha (char character); extern int character_is_symbol (char character); extern int character_is_visible (char character); extern int character_is_invisible (char character); extern int character_is_escape (char character); extern int character_is_underscore (char character); extern int character_is_hexadecimal (char character); extern int character_compare_array (char character, char * character_array); extern int character_count (char * string, char this, int from, int to, char stop); extern int string_length (char * string); extern char * string_reverse_limit (char * string, int limit); extern char * string_reverse (char * string); extern char * string_delete (char * string, int length); extern int string_compare (char * string_0, char * string_1); extern char * string_copy (char * string_0, char * string_1); extern char * string_concatenate (char * string_0, char * string_1); extern int string_compare_limit (char * string_0, char * string_1, int limit); extern char * string_copy_limit (char * string_0, char * string_1, int limit); extern char * string_concatenate_limit (char * string_0, char * string_1, int limit); extern int string_split_space (char * string); extern char * string_realign (char * string, int amount, char character); extern void memory_delete (void * memory, int length); extern int memory_compare (void * memory, void * source, int length); extern void memory_copy (void * memory, void * source, int length); extern void terminal_clear (void); extern void terminal_colour (int colour, int effect); extern void terminal_cancel (void); extern void terminal_show_cursor (int show); extern int encode_byte (char * byte); extern char * decode_byte (int byte); extern char * number_to_string (int number); extern char * format_to_string (int number, int sign, int base, int amount, char character); extern void print (char * format, ...); #endif