1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-11-09 14:51:30 +01:00
libcproject/lib/terminal.h

110 lines
1.9 KiB
C
Raw Normal View History

#ifndef __LIBCPROJECT_TERMINAL__
#define __LIBCPROJECT_TERMINAL__
2023-01-05 19:28:05 +01:00
2023-01-07 19:38:01 +01:00
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
2023-01-05 19:28:05 +01:00
#include <stdlib.h>
2023-01-07 19:38:01 +01:00
#include "character.h"
2023-01-05 19:28:05 +01:00
#include "dictionary.h"
#include "linked_list.h"
#include "queue.h"
#include "stack.h"
2023-06-25 15:07:34 +02:00
#include "types.h"
2023-01-05 19:28:05 +01:00
/**
* @brief Read a line from stdin.
* @since v1.0.0
2023-01-05 19:28:05 +01:00
*/
string_t terminal_input();
2023-01-05 19:28:05 +01:00
/**
* @brief Print an array.
*
* @param array
* @param array_size
* @param element_size
* @param print_element
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_array(void* array, size_t array_size, size_t element_size, void (*print_element)(void*));
/**
* @brief Print a int.
*
* @param value
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_int(void* value);
/**
* @brief Print a long.
*
* @param value
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_long(void* value);
/**
* @brief Print a unsigned long.
*
* @param value
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_unsigned_long(void* value);
/**
* @brief Print a char.
*
* @param value
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_char(void* value);
/**
* @brief Print a string.
*
* @param value
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_string(void* value);
/**
* @brief Print a stack.
*
* @param stack
* @param print_element
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_stack(struct stack* stack, void (*print_element)(void*));
/**
* @brief Print a queue.
*
* @param queue
* @param print_element
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_queue(struct queue* queue, void (*print_element)(void*));
/**
* @brief Print a linked list.
*
* @param linked_list
* @param print_element
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_linked_list(struct linked_list* linked_list, void (*print_element)(void*));
/**
* @brief Print a dictionary.
*
* @param dictionary
* @param print_element
* @since v1.0.0
*/
2023-01-05 19:28:05 +01:00
void terminal_print_dictionary(struct dictionary* dictionary, void (*print_element)(void*));
#endif