windows works again and also alists working now
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
proc visualize_lisp_machine() -> void {
|
||||
|
||||
// save the current working directory
|
||||
char cwd[1024];
|
||||
getcwd(cwd, 1024);
|
||||
char* cwd = get_cwd();
|
||||
|
||||
// get the direction of the exe
|
||||
char* exe_path = exe_dir();
|
||||
// switch to the exe directory for loading pre.slime
|
||||
chdir(exe_path);
|
||||
change_cwd(exe_path);
|
||||
free(exe_path);
|
||||
|
||||
defer {
|
||||
// switch back to the users directory
|
||||
chdir(cwd);
|
||||
change_cwd(cwd);
|
||||
free(cwd);
|
||||
};
|
||||
|
||||
struct Drawn_Area {
|
||||
@@ -180,7 +181,7 @@ proc visualize_lisp_machine() -> void {
|
||||
case Lisp_Object_Type::T: return draw_text("t");
|
||||
case Lisp_Object_Type::Nil: return draw_text("()");
|
||||
case Lisp_Object_Type::Pair: return draw_pair(obj);
|
||||
case Lisp_Object_Type::Number: return draw_float(obj->value.number);
|
||||
case Lisp_Object_Type::Number: return draw_float((float)obj->value.number);
|
||||
case Lisp_Object_Type::Symbol: return draw_text(&obj->value.string->data);
|
||||
case Lisp_Object_Type::Keyword: {
|
||||
Drawn_Area colon = draw_text(":", "#c61b6e");
|
||||
@@ -303,7 +304,7 @@ proc visualize_lisp_machine() -> void {
|
||||
// -------------------
|
||||
draw_new_line();
|
||||
|
||||
int free_string_memory = Memory::next_free_spot_in_string_memory - Memory::string_memory;
|
||||
int free_string_memory = (int)(Memory::next_free_spot_in_string_memory - Memory::string_memory);
|
||||
for (int i = 0; i < Memory::free_spots_in_string_memory->next_index; ++i) {
|
||||
free_string_memory += ((String*)(Memory::free_spots_in_string_memory->data[i]))->length;
|
||||
}
|
||||
@@ -491,7 +492,7 @@ proc visualize_lisp_machine() -> void {
|
||||
draw_new_line();
|
||||
write_x = start_x + 600;
|
||||
|
||||
draw_float(numbers->data[i]->value.number);
|
||||
draw_float((float)(numbers->data[i]->value.number));
|
||||
}
|
||||
|
||||
write_x = start_x + 900;
|
||||
|
||||
Reference in New Issue
Block a user