Added a way to print out instead of stdout but to a file (everything about the process but errors (those still go to stderr) and made it so now someone can actually use echo -e "" | ./bin/stergios (prior this was impossible to do due to readline quirks)
Stergios Upload Compile Checker / Explore-Gitea-Actions (push) Successful in 7s

This commit is contained in:
metallaxis committed 2026-07-05 05:31:32 +03:00
1 parent 030b73597f
commit 49467332de
10 files changed
+191 -63

No files matched your search

+14
View File
@@ -6,6 +6,13 @@
#include <stdio.h>
#include <stdlib.h>
/**
* @brief Prompts the user for a line of input, handling both interactive and non-interactive modes.
* @param prompt The message to display to the user before reading input
* @return A dynamically allocated string containing the user's input. The caller is responsible for freeing this.
*/
char* prompt_line(const char* prompt);
/**
* @brief Reads a line from the given stream, dynamically allocating memory for the line.
* The line is terminated by a newline character or EOF. If a '#' character is encountered, the rest of the line is ignored (treated as a comment).
@@ -33,6 +40,13 @@ int read_int128_triplet(const char* prompt, int128_t* a, int128_t* b, int128_t*
*/
int128_t str_to_int128(const char* s);
/**
* @brief Prints a 128 bit integer
* @param output The file pointer to print to (e.g., stdout or a file)
* @param n The integer to print
*/
void fprint_int128(FILE* output, int128_t n);
/**
* @brief Prints a 128 bit integer
* @param n The integer to print