+void
+init_gacela (char *path)
+{
+ scm_with_guile (&init_scheme, NULL);
+ load_scheme_files (path);
+ scm_c_eval_string ("(init-video-mode)");
+}
+
+void
+start_server (int port)
+{
+ char *start_server;
+
+ asprintf (&start_server, "(start-server #:port %d)", port);
+ scm_c_eval_string (start_server);
+}
+
+void
+start_local_server (SCM pipes)
+{
+ char start_server[100];
+
+ scm_c_define ("pipes", pipes);
+ scm_c_eval_string ("(start-server #:pipes pipes)");
+}
+
+void
+start_remote_client (char *hostname, int port)
+{
+ SCM client_socket;
+ char *connect_to_server;
+
+ asprintf (&connect_to_server, "(let ((s (socket PF_INET SOCK_STREAM 0))) (connect s AF_INET (car (hostent:addr-list (gethost \"%s\"))) %d) s)", hostname, port);
+ client_socket = scm_c_eval_string (connect_to_server);
+ gacela_client (client_socket, client_socket);
+}
+