Commit 0fe0d9dc authored by Chris Müller's avatar Chris Müller
Browse files

fix some typos and add some pointer castings for suppressing warnings

parent f50e061f
......@@ -19,6 +19,7 @@
#pragma once
#include <stdint.h>
#include <stdio.h>
#define TRUE 1
#define FALSE 0
......@@ -71,7 +72,7 @@ struct org_cherry_value {
};
};
#define IS_NULL(value) (value->meta.type == CY_EMPTYLIST);
#define IS_NULL(value) (value->meta.type == CY_EMPTYLIST)
#define IS_BOOLEAN(value) (value->meta.type == CY_BOOLEAN)
#define IS_FIXNUM(value) (value->meta.type == CY_FIXNUM)
#define IS_STRING(value) (value->meta.type == CY_STRING)
......
......@@ -17,7 +17,6 @@
*/
#include "cherry/runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include <gc.h>
......@@ -98,7 +97,7 @@ org_cherry_char(cy_unicode_t value)
struct org_cherry_value*
org_cherry_symbol(cy_byte_t* value)
{
return org_cherry_symbollist_get(org_cherry_global_symboltable, value);
return org_cherry_symbollist_get(org_cherry_global_symbollist, value);
}
// ----------------------------------------------------------------------------
......@@ -185,14 +184,14 @@ org_cherry_initialize(struct org_cherry_pair* arguments)
static void
print_pair(FILE* out, struct org_cherry_pair* value)
{
org_cherry_value* head = HEAD(value);
org_cherry_value* tail = TAIL(value);
struct org_cherry_value* head = HEAD(value);
struct org_cherry_value* tail = TAIL(value);
org_cherry_print(out, head);
if(IS_PAIR(tail)) {
fprintf(out, " ");
print_pair(out, tail);
print_pair(out, (struct org_cherry_pair*) tail);
} else if(IS_NULL(tail)) {
return;
} else {
......@@ -202,7 +201,7 @@ print_pair(FILE* out, struct org_cherry_pair* value)
}
void
org_cherry_print(FILE* out, struct org_cherry_pair* value)
org_cherry_print(FILE* out, struct org_cherry_value* value)
{
cy_byte_t* p;
......@@ -227,7 +226,7 @@ org_cherry_print(FILE* out, struct org_cherry_pair* value)
switch(value->char_value) {
case '\n':
fprintf(out, "newline");
break
break;
case ' ':
fprintf(out, "space");
break;
......@@ -259,7 +258,7 @@ org_cherry_print(FILE* out, struct org_cherry_pair* value)
break;
case CY_PAIR:
fprintf(out, "(");
print_pair(value);
print_pair(out, (struct org_cherry_pair*) value);
fprintf(out, ")");
break;
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment