Reorganised source files to make navigation easier

All tests still pass (slightly to my surprise)
This commit is contained in:
Simon Brooke 2018-12-24 19:27:04 +00:00
parent f6ff403249
commit a5e1d3ccd8
24 changed files with 73 additions and 72 deletions

26
src/arith/real.c Normal file
View file

@ -0,0 +1,26 @@
/*
* real.c
*
* functions for real number cells.
*
* (c) 2017 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#include "conspage.h"
#include "consspaceobject.h"
#include "read.h"
/**
* Allocate a real number cell representing this value and return a cons
* pointer to it.
* @param value the value to wrap;
* @return a real number cell wrapping this value.
*/
struct cons_pointer make_real( long double value ) {
struct cons_pointer result = allocate_cell( REALTAG );
struct cons_space_object *cell = &pointer2cell( result );
cell->payload.real.value = value;
return result;
}