mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Removed redundant functions
This commit is contained in:
parent
735bd910b6
commit
739831ebe6
3 changed files with 10 additions and 28 deletions
|
@ -126,7 +126,6 @@ object Cyc_set_cvar(object var, object value);
|
|||
object apply(void *data, object cont, object func, object args);
|
||||
void Cyc_apply(void *data, int argc, closure cont, object prim, ...);
|
||||
object Cyc_string_cmp(void *data, object str1, object str2);
|
||||
object Cyc_string_cmp2(void *data, object str1, object str2);
|
||||
void dispatch_string_91append(void *data, int argc, object clo, object cont, object str1, ...);
|
||||
list mcons(object,object);
|
||||
cvar_type *mcvar(object *var);
|
||||
|
@ -151,7 +150,6 @@ object Cyc_set_car(void *, object l, object val) ;
|
|||
object Cyc_set_cdr(void *, object l, object val) ;
|
||||
integer_type Cyc_length(void *d, object l);
|
||||
object Cyc_vector_length(void *data, object v);
|
||||
object Cyc_vector_length2(void *data, object v);
|
||||
object Cyc_length2(void *d, object l);
|
||||
object Cyc_vector_ref(void *d, object v, object k);
|
||||
object Cyc_vector_set(void *d, object v, object k, object obj);
|
||||
|
@ -168,16 +166,13 @@ int octstr2int(const char *str);
|
|||
int hexstr2int(const char *str);
|
||||
object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
|
||||
object Cyc_string_length(void *data, object str);
|
||||
object Cyc_string_length2(void *data, object str);
|
||||
object Cyc_substring(void *data, object cont, object str, object start, object end);
|
||||
object Cyc_string_ref(void *data, object str, object k);
|
||||
object Cyc_string_set(void *data, object str, object k, object chr);
|
||||
object Cyc_installation_dir(void *data, object cont, object type);
|
||||
object Cyc_command_line_arguments(void *data, object cont);
|
||||
object Cyc_system(object cmd);
|
||||
object Cyc_system2(object cmd);
|
||||
object Cyc_char2integer(object chr);
|
||||
object Cyc_char2integer2(object chr);
|
||||
object Cyc_integer2char(void *data, object n);
|
||||
void Cyc_halt(closure);
|
||||
object __halt(object obj);
|
||||
|
|
23
runtime.c
23
runtime.c
|
@ -995,8 +995,6 @@ object Cyc_vector_length(void *data, object v) {
|
|||
}
|
||||
Cyc_rt_raise_msg(data, "vector-length - invalid parameter, expected vector\n"); }
|
||||
|
||||
object Cyc_vector_length2(void *data, object v) {
|
||||
return Cyc_vector_length(data, v); }
|
||||
|
||||
object Cyc_length2(void *data, object l){
|
||||
int len = 0;
|
||||
|
@ -1160,8 +1158,6 @@ object Cyc_string_cmp(void *data, object str1, object str2) {
|
|||
((string_type *)str2)->str) );
|
||||
}
|
||||
|
||||
object Cyc_string_cmp2(void *data, object str1, object str2) {
|
||||
return Cyc_string_cmp(data, str1, str2); }
|
||||
|
||||
#define Cyc_string_append_va_list(data, argc) { \
|
||||
int i = 0, total_len = 1; \
|
||||
|
@ -1209,9 +1205,6 @@ object Cyc_string_length(void *data, object str) {
|
|||
Cyc_check_str(data, str);
|
||||
return obj_int2obj(strlen(string_str(str))); }
|
||||
|
||||
object Cyc_string_length2(void *data, object str) {
|
||||
return Cyc_string_length(data, str); }
|
||||
|
||||
object Cyc_string_set(void *data, object str, object k, object chr) {
|
||||
char *raw;
|
||||
int idx, len;
|
||||
|
@ -1386,16 +1379,10 @@ object Cyc_system(object cmd) {
|
|||
return obj_int2obj(system(((string_type *)cmd)->str));
|
||||
}
|
||||
|
||||
object Cyc_system2(object cmd) {
|
||||
return Cyc_system(cmd); }
|
||||
|
||||
object Cyc_char2integer(object chr){
|
||||
return obj_int2obj(obj_obj2char(chr));
|
||||
}
|
||||
|
||||
object Cyc_char2integer2(object chr){
|
||||
return Cyc_char2integer(chr); }
|
||||
|
||||
object Cyc_integer2char(void *data, object n){
|
||||
int val = 0;
|
||||
|
||||
|
@ -1814,7 +1801,7 @@ void _length(void *data, object cont, object args){
|
|||
return_closcall1(data, cont, obj); }}
|
||||
void _vector_91length(void *data, object cont, object args){
|
||||
Cyc_check_num_args(data, "vector_91length", 1, args);
|
||||
{ object obj = Cyc_vector_length2(data, car(args));
|
||||
{ object obj = Cyc_vector_length(data, car(args));
|
||||
return_closcall1(data, cont, obj); }}
|
||||
void _null_127(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "null?", 1, args);
|
||||
|
@ -1952,7 +1939,7 @@ void _memv(void *data, object cont, object args) {
|
|||
return_closcall1(data, cont, memqp(data, car(args), cadr(args)));}
|
||||
void _char_91_125integer(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "char->integer", 1, args);
|
||||
{ object obj = Cyc_char2integer2(car(args));
|
||||
{ object obj = Cyc_char2integer(car(args));
|
||||
return_closcall1(data, cont, obj);}}
|
||||
void _integer_91_125char(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "integer->char", 1, args);
|
||||
|
@ -1966,7 +1953,7 @@ void _string_91_125number(void *data, object cont, object args) {
|
|||
Cyc_string2number_(data, cont, car(args)); }}}
|
||||
void _string_91length(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "string-length", 1, args);
|
||||
{ object obj = Cyc_string_length2(data, car(args));
|
||||
{ object obj = Cyc_string_length(data, car(args));
|
||||
return_closcall1(data, cont, obj);}}
|
||||
void _cyc_substring(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "substring", 3, args);
|
||||
|
@ -1987,7 +1974,7 @@ void _command_91line_91arguments(void *data, object cont, object args) {
|
|||
return_closcall1(data, cont, cmdline); }
|
||||
void _cyc_system(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "system", 1, args);
|
||||
{ object obj = Cyc_system2(car(args));
|
||||
{ object obj = Cyc_system(car(args));
|
||||
return_closcall1(data, cont, obj);}}
|
||||
//void _error(void *data, object cont, object args) {
|
||||
// integer_type argc = Cyc_length(args);
|
||||
|
@ -2001,7 +1988,7 @@ void _Cyc_91default_91exception_91handler(void *data, object cont, object args)
|
|||
}
|
||||
void _string_91cmp(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "string-cmp", 2, args);
|
||||
{ object obj = Cyc_string_cmp2(data, car(args), cadr(args));
|
||||
{ object obj = Cyc_string_cmp(data, car(args), cadr(args));
|
||||
return_closcall1(data, cont, obj);}}
|
||||
void _string_91append(void *data, object cont, object args) {
|
||||
object argc = Cyc_length2(data, args);
|
||||
|
|
|
@ -520,27 +520,27 @@
|
|||
((eq? p 'cddadr) "cddadr")
|
||||
((eq? p 'cdddar) "cdddar")
|
||||
((eq? p 'cddddr) "cddddr")
|
||||
((eq? p 'char->integer) "Cyc_char2integer2")
|
||||
((eq? p 'char->integer) "Cyc_char2integer")
|
||||
((eq? p 'integer->char) "Cyc_integer2char")
|
||||
((eq? p 'string->number)"Cyc_string2number2_")
|
||||
((eq? p 'list->string) "Cyc_list2string")
|
||||
((eq? p 'make-vector) "Cyc_make_vector")
|
||||
((eq? p 'list->vector) "Cyc_list2vector")
|
||||
((eq? p 'vector-length) "Cyc_vector_length2")
|
||||
((eq? p 'vector-length) "Cyc_vector_length")
|
||||
((eq? p 'vector-ref) "Cyc_vector_ref")
|
||||
((eq? p 'vector-set!) "Cyc_vector_set")
|
||||
((eq? p 'string-append) "Cyc_string_append")
|
||||
((eq? p 'string-cmp) "Cyc_string_cmp2")
|
||||
((eq? p 'string-cmp) "Cyc_string_cmp")
|
||||
((eq? p 'string->symbol) "Cyc_string2symbol")
|
||||
((eq? p 'symbol->string) "Cyc_symbol2string")
|
||||
((eq? p 'number->string) "Cyc_number2string")
|
||||
((eq? p 'string-length) "Cyc_string_length2")
|
||||
((eq? p 'string-length) "Cyc_string_length")
|
||||
((eq? p 'string-ref) "Cyc_string_ref")
|
||||
((eq? p 'string-set!) "Cyc_string_set")
|
||||
((eq? p 'substring) "Cyc_substring")
|
||||
((eq? p 'Cyc-installation-dir) "Cyc_installation_dir")
|
||||
((eq? p 'command-line-arguments) "Cyc_command_line_arguments")
|
||||
((eq? p 'system) "Cyc_system2")
|
||||
((eq? p 'system) "Cyc_system")
|
||||
((eq? p 'assq) "assq")
|
||||
((eq? p 'assv) "assq")
|
||||
((eq? p 'assoc) "assoc")
|
||||
|
|
Loading…
Add table
Reference in a new issue