error_buffer -> errors

This commit is contained in:
det-fys 2024-12-28 14:31:05 +01:00
parent 3774c3a9d2
commit 6678a45c7d
5 changed files with 118 additions and 116 deletions

View File

@ -15,7 +15,7 @@ add_executable(Graph
"parser.c"
"tree.c"
"ps_graph.c"
"error_buffer.c"
"errors.c"
"math_functions.c"
)
@ -24,10 +24,12 @@ if (MSVC)
target_compile_options(Graph PRIVATE /W4)
else()
target_compile_options(Graph PRIVATE -Wall -Wextra -pedantic)
target_link_libraries(Graph PRIVATE m)
endif()
target_compile_definitions(Graph PRIVATE ENABLE_GRAPHVIZ_EXPORT)
# link math
target_link_libraries(Graph PRIVATE m)
# Optionally, set the output directory for the executable
# set_target_properties(Graph PROPERTIES

View File

@ -1,4 +1,4 @@
#include "error_buffer.h"
#include "errors.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>

View File

@ -1,5 +1,5 @@
#ifndef ERROR_CODE_H
#define ERROR_CODE_H
#ifndef ERRORS_H
#define ERRORS_H
#include <stdlib.h>
@ -64,4 +64,4 @@ enum error_code error_get(const struct error_buffer *eb);
*/
const char *error_get_text(const struct error_buffer *eb);
#endif /* ERROR_CODE_H */
#endif /* ERRORS_H */

2
lex.h
View File

@ -1,7 +1,7 @@
#ifndef LEX_H
#define LEX_H
#include "error_buffer.h"
#include "errors.h"
#define LEX_DEBUG

2
main.c
View File

@ -3,7 +3,7 @@
#include "lex.h"
#include "parser.h"
#include "ps_graph.h"
#include "error_buffer.h"
#include "errors.h"
static void print_usage(FILE *f, const char *name) {
fprintf(f, "Usage: %s <function> <output file> [<range>]\n", name);