Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Müller
cherry
Commits
0fe0d9dc
Commit
0fe0d9dc
authored
Jul 07, 2013
by
Chris Müller
Browse files
fix some typos and add some pointer castings for suppressing warnings
parent
f50e061f
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/cherry/runtime.h
View file @
0fe0d9dc
...
...
@@ -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)
...
...
source/value.c
View file @
0fe0d9dc
...
...
@@ -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_symbol
table
,
value
);
return
org_cherry_symbollist_get
(
org_cherry_global_symbol
list
,
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:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment