mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 15:27:36 +02:00
Bugfixes
This commit is contained in:
parent
ff6b2f2eeb
commit
1615794d99
1 changed files with 10 additions and 3 deletions
13
runtime.c
13
runtime.c
|
@ -272,8 +272,6 @@ object Cyc_set_cvar(object var, object value) {
|
||||||
|
|
||||||
object Cyc_has_cycle(object lst) {
|
object Cyc_has_cycle(object lst) {
|
||||||
object slow_lst, fast_lst;
|
object slow_lst, fast_lst;
|
||||||
int is_obj = is_object_type(lst);
|
|
||||||
int type = type_of(lst);
|
|
||||||
if (nullp(lst) || is_value_type(lst) ||
|
if (nullp(lst) || is_value_type(lst) ||
|
||||||
(is_object_type(lst) && type_of(lst) != cons_tag)) {
|
(is_object_type(lst) && type_of(lst) != cons_tag)) {
|
||||||
return (boolean_f);
|
return (boolean_f);
|
||||||
|
@ -893,10 +891,19 @@ string_type Cyc_substring(object str, object start, object end) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform same role as the CHICKEN function:
|
||||||
|
*
|
||||||
|
* Contains the list of arguments passed to this program, with the name
|
||||||
|
* of the program and any runtime options (all options starting with -:)
|
||||||
|
* removed.
|
||||||
|
*
|
||||||
|
* For now, runtime options are not removed.
|
||||||
|
*/
|
||||||
object Cyc_command_line_arguments(object cont) {
|
object Cyc_command_line_arguments(object cont) {
|
||||||
int i;
|
int i;
|
||||||
object lis = nil;
|
object lis = nil;
|
||||||
for (i = _cyc_argc; i > 0; i--) {
|
for (i = _cyc_argc; i > 1; i--) { // skip program name
|
||||||
object ps = alloca(sizeof(string_type));
|
object ps = alloca(sizeof(string_type));
|
||||||
object pl = alloca(sizeof(cons_type));
|
object pl = alloca(sizeof(cons_type));
|
||||||
make_string(s, _cyc_argv[i - 1]);
|
make_string(s, _cyc_argv[i - 1]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue