153 lines
4.1 KiB
C
153 lines
4.1 KiB
C
/*
|
|
* Copyright (c) 2023 : Ognjen 'xolatile' Milan Robovic
|
|
*
|
|
* Xtandard is free software! You will redistribute it or modify it under the terms of the GNU General Public License by Free Software Foundation.
|
|
* And when you do redistribute it or modify it, it will use either version 3 of the License, or (at yours truly opinion) any later version.
|
|
* It is distributed in the hope that it will be useful or harmful, it really depends... But no warranty what so ever, seriously. See GNU/GPLv3.
|
|
*/
|
|
|
|
#ifndef XTANDARD_HEADER
|
|
#define XTANDARD_HEADER
|
|
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
enum {
|
|
EFFECT_NORMAL,
|
|
EFFECT_BOLD,
|
|
EFFECT_DARK,
|
|
EFFECT_ITALIC,
|
|
EFFECT_UNDERLINE,
|
|
EFFECT_BLINK,
|
|
EFFECT_UNDEFINED,
|
|
EFFECT_REVERSE,
|
|
EFFECT_COUNT
|
|
};
|
|
|
|
enum {
|
|
COLOUR_GREY,
|
|
COLOUR_RED,
|
|
COLOUR_GREEN,
|
|
COLOUR_YELLOW,
|
|
COLOUR_BLUE,
|
|
COLOUR_PINK,
|
|
COLOUR_CYAN,
|
|
COLOUR_WHITE,
|
|
COLOUR_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_COUNT
|
|
};
|
|
|
|
extern char * program_name;
|
|
extern char * program_mode;
|
|
extern char * program_license;
|
|
|
|
extern int argument_count;
|
|
extern char * * argument_nick;
|
|
extern char * * argument_name;
|
|
extern char * argument_input;
|
|
extern char * argument_output;
|
|
extern void (* * argument_function) (void);
|
|
|
|
extern int file_list_active;
|
|
extern int file_list_count;
|
|
extern int * file_list_mark;
|
|
extern int * file_list_size;
|
|
extern char * * file_list_name;
|
|
extern char * * file_list_data;
|
|
|
|
extern void in (void *, int);
|
|
extern void out (void *, int);
|
|
|
|
extern void echo (char *);
|
|
extern void echo_new_line (void);
|
|
extern void echo_byte (int);
|
|
|
|
extern void fatal_failure (int, char *);
|
|
|
|
extern void limit (int *, int, int);
|
|
|
|
extern void * allocate (int);
|
|
extern void * reallocate (void *, int);
|
|
extern void * deallocate (void *);
|
|
extern void * memorize (int);
|
|
|
|
extern void * record (void);
|
|
|
|
extern void argument_define (char *, char *, void (*) (void));
|
|
extern void argument_select (int, char * *);
|
|
extern void argument_delete (void);
|
|
|
|
extern int file_open (char *, int);
|
|
extern int file_close (int);
|
|
extern void file_read (int, void *, int);
|
|
extern void file_write (int, void *, int);
|
|
extern int file_seek (int, int);
|
|
extern int file_size (int);
|
|
extern int file_type (char *);
|
|
extern char * file_import (char *);
|
|
extern void file_export (char *, void *);
|
|
|
|
extern void file_list_import (char *);
|
|
extern void file_list_export (char *);
|
|
extern void file_list_delete (void);
|
|
|
|
extern int character_is_uppercase (char);
|
|
extern int character_is_lowercase (char);
|
|
extern int character_is_digit (char);
|
|
extern int character_is_blank (char);
|
|
extern int character_is_alpha (char);
|
|
extern int character_is_symbol (char);
|
|
extern int character_is_visible (char);
|
|
extern int character_is_invisible (char);
|
|
extern int character_is_escape (char);
|
|
extern int character_is_underscore (char);
|
|
extern int character_is_hexadecimal (char);
|
|
|
|
extern int character_compare_array (char, char *, int);
|
|
|
|
extern int string_length (char *);
|
|
extern void string_reverse (char *);
|
|
|
|
extern void string_delete (char *, int);
|
|
|
|
extern int string_compare (char *, char *);
|
|
extern void string_copy (char *, char *);
|
|
extern void string_concatenate (char *, char *);
|
|
|
|
extern int string_compare_limit (char *, char *, int);
|
|
extern void string_copy_limit (char *, char *, int);
|
|
extern void string_concatenate_limit (char *, char *, int);
|
|
|
|
extern int string_split_space (char *);
|
|
|
|
extern void memory_delete (void *, int);
|
|
|
|
extern int memory_compare (void *, void *, int);
|
|
extern void memory_copy (void *, void *, int);
|
|
|
|
extern void terminal_clear (void);
|
|
extern void terminal_colour (int, int);
|
|
extern void terminal_cancel (void);
|
|
extern void terminal_show_cursor (int);
|
|
|
|
extern int encode_byte (char *);
|
|
extern char * decode_byte (int);
|
|
|
|
#endif
|