Next: Flags and Hooks Up: Miscellaneous Utilities Previous: Miscellaneous Utilities

## Library Functions

```int scheme_eq(Scheme_Object *obj1, Scheme_Object *obj2)
```

Returns 1 if the Scheme values are eq?.

```int scheme_eqv(Scheme_Object *obj1, Scheme_Object *obj2)
```

Returns 1 if the Scheme values are eqv?.

```int scheme_equal(Scheme_Object *obj1, Scheme_Object *obj2)
```

Returns 1 if the Scheme values are equal?.

```Scheme_Object *scheme_build_list(int c, Scheme_Object **elems)
```

Creates and returns a list of length c with the elements elems.

```int scheme_list_length(Scheme_Object *list)
```

Returns the length of the list. If list is not a proper list, then the last cdr counts as an item. If there is a cycle in list (involvng only cdrs), this procedure will not terminate.

```int scheme_proper_list_length(Scheme_Object *list)
```

Returns the length of the list, or -1 if it is not a proper list. If there is a cycle in list (involvng only cdrs), this procedure returns -1.

```Scheme_Object *scheme_car(Scheme_Object *pair)
```

Returns the car of the pair.

```Scheme_Object *scheme_cdr(Scheme_Object *pair)
```

Returns the cdr of the pair.

```Scheme_Object *scheme_cadr(Scheme_Object *pair)
```

Returns the cadr of the pair.

```Scheme_Object *scheme_caddr(Scheme_Object *pair)
```

Returns the caddr of the pair.

```Scheme_Object *scheme_vector_to_list(Scheme_Object *vec)
```

Creates a list with the same elements as the given vector.

```Scheme_Object *scheme_list_to_vector(Scheme_Object *list)
```

Creates a vector with the same elements as the given list.

```Scheme_Object *scheme_append(Scheme_Object *lstx, Scheme_Object *lsty)
```

Non-destructively appends the given lists.

```Scheme_Object *scheme_unbox(Scheme_Object *obj)
```

Returns the contents of the given box.

```void scheme_set_box(Scheme_Object *b, Scheme_Object *v)
```

Sets the contents of the given box.

```Scheme_Object *scheme_load(char *file)
```

Loads the specified Scheme file, returning the value of the last expression loaded, or NULL if the load fails.

```Scheme_Object *scheme_load_extension(char *filename)
```

Loads the specified Scheme extension file, returning the value provided by the extension's initialization function.

```long scheme_double_to_int(char *where, double d)
```

Returns a fixnum value for the given floating-point number d. If d is not an integer or if it is too large, then an error message is reported; name is used for error-reporting.

```void scheme_secure_exceptions(Scheme_Env *env)
```

Secures the primitive exception types, just like secure-primitive-expcetion-types.

```long scheme_get_millseconds()
```

Returns the current ``time'' in millseconds, just like current-millseconds.

```long scheme_get_process_millseconds()
```

Returns the current process ``time'' in millseconds, just like current-process-millseconds.

```char *scheme_banner()
```

Returns the string that is used as the MzScheme startup banner.

```char *scheme_version()
```

Returns a string for the executing version of MzScheme.

Next: Flags and Hooks Up: Miscellaneous Utilities Previous: Miscellaneous Utilities

PLT