Browse Source

Reorganized the project to move headers in their own directory

main
Ludovic 'Archivist' Lagouardette 6 months ago
parent
commit
98793377ed
4 changed files with 5 additions and 3 deletions
  1. +2
    -1
      CMakeLists.txt
  2. +1
    -1
      bench.c
  3. +0
    -0
      include/ink.h
  4. +2
    -1
      lib.c

+ 2
- 1
CMakeLists.txt View File

@ -3,7 +3,7 @@ project(ink C)
set(CMAKE_C_STANDARD 90)
add_library(ink lib.c ink.h)
add_library(ink lib.c include/ink.h)
# Uncomment to disable the redundant arithmetic
# add_definitions(-DNOEXTRAARITHMETIC)
@ -16,6 +16,7 @@ add_library(ink lib.c ink.h)
add_executable(ink_exe main.c)
target_link_libraries(ink_exe PUBLIC ink)
target_include_directories(ink PUBLIC include)
# Benchmark is broken since the addition to coroutines
# add_executable(ink_bench bench.c)

+ 1
- 1
bench.c View File

@ -1,4 +1,4 @@
#include "ink.h"
#include "include/ink.h"
#include <stdio.h>
#include <string.h>
#include <malloc.h>

ink.h → include/ink.h View File


+ 2
- 1
lib.c View File

@ -1,4 +1,4 @@
#include "ink.h"
#include "include/ink.h"
#ifndef NOSTDLIB
#include <stdio.h>
#include <stdlib.h>
@ -594,6 +594,7 @@ static int ink_parse(struct context* pContext, struct elem* executable_buffer, i
#define FUNCTION_BUFFER 256
struct label labels[LABEL_BUFFER];
struct elem function_buffer[FUNCTION_BUFFER];
/* TODO: add checks for overflows in these arrays */
currentRoutine = pContext->routines + pContext->routine_current;
function_buffer_top = 0;
function_name = -1;

Loading…
Cancel
Save