error_buffer -> errors
This commit is contained in:
parent
3774c3a9d2
commit
6678a45c7d
@ -15,7 +15,7 @@ add_executable(Graph
|
|||||||
"parser.c"
|
"parser.c"
|
||||||
"tree.c"
|
"tree.c"
|
||||||
"ps_graph.c"
|
"ps_graph.c"
|
||||||
"error_buffer.c"
|
"errors.c"
|
||||||
"math_functions.c"
|
"math_functions.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -24,10 +24,12 @@ if (MSVC)
|
|||||||
target_compile_options(Graph PRIVATE /W4)
|
target_compile_options(Graph PRIVATE /W4)
|
||||||
else()
|
else()
|
||||||
target_compile_options(Graph PRIVATE -Wall -Wextra -pedantic)
|
target_compile_options(Graph PRIVATE -Wall -Wextra -pedantic)
|
||||||
|
target_link_libraries(Graph PRIVATE m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(Graph PRIVATE ENABLE_GRAPHVIZ_EXPORT)
|
||||||
|
|
||||||
# link math
|
# link math
|
||||||
target_link_libraries(Graph PRIVATE m)
|
|
||||||
|
|
||||||
# Optionally, set the output directory for the executable
|
# Optionally, set the output directory for the executable
|
||||||
# set_target_properties(Graph PROPERTIES
|
# set_target_properties(Graph PROPERTIES
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "error_buffer.h"
|
#include "errors.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef ERROR_CODE_H
|
#ifndef ERRORS_H
|
||||||
#define ERROR_CODE_H
|
#define ERRORS_H
|
||||||
|
|
||||||
#include <stdlib.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);
|
const char *error_get_text(const struct error_buffer *eb);
|
||||||
|
|
||||||
#endif /* ERROR_CODE_H */
|
#endif /* ERRORS_H */
|
||||||
2
lex.h
2
lex.h
@ -1,7 +1,7 @@
|
|||||||
#ifndef LEX_H
|
#ifndef LEX_H
|
||||||
#define LEX_H
|
#define LEX_H
|
||||||
|
|
||||||
#include "error_buffer.h"
|
#include "errors.h"
|
||||||
|
|
||||||
#define LEX_DEBUG
|
#define LEX_DEBUG
|
||||||
|
|
||||||
|
|||||||
2
main.c
2
main.c
@ -3,7 +3,7 @@
|
|||||||
#include "lex.h"
|
#include "lex.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "ps_graph.h"
|
#include "ps_graph.h"
|
||||||
#include "error_buffer.h"
|
#include "errors.h"
|
||||||
|
|
||||||
static void print_usage(FILE *f, const char *name) {
|
static void print_usage(FILE *f, const char *name) {
|
||||||
fprintf(f, "Usage: %s <function> <output file> [<range>]\n", name);
|
fprintf(f, "Usage: %s <function> <output file> [<range>]\n", name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user