This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

guile-server and guile-1.3.[23]


Here's a patch to make guile-server work with guile-1.3.[23].  The patch 
is against the guile-server module out of the gnome repository just a
couple hours ago.

Thanks,
Greg

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/guile-server/ChangeLog,v
retrieving revision 1.5
diff -u -p -r1.5 ChangeLog
--- ChangeLog	1999/02/18 00:59:16	1.5
+++ ChangeLog	1999/09/06 18:25:53
@@ -1,3 +1,9 @@
+1999-09-05  Greg J. Badros <gjb@cs.washington.edu>
+
+	* test-server.c, configure.in, acconfig.h:  Updated for
+	guile-1.3.[234].  Use scm_strport_to_string if it exists, use
+	empty initial string in make_output_strport.
+
 1999-02-17  Havoc Pennington  <hp@pobox.com>
 
 	* gnome-guile-repl.c (main): Paranoid check for prompt == NULL;
Index: acconfig.h
===================================================================
RCS file: /cvs/gnome/guile-server/acconfig.h,v
retrieving revision 1.3
diff -u -p -r1.3 acconfig.h
--- acconfig.h	1999/02/01 22:21:08	1.3
+++ acconfig.h	1999/09/06 18:25:53
@@ -9,3 +9,4 @@
 #undef HAVE_GUILE
 #undef HAVE_READLINE
 #undef HAVE_HISTORY
+#undef HAVE_SCM_STRPORT_TO_STRING
Index: configure.in
===================================================================
RCS file: /cvs/gnome/guile-server/configure.in,v
retrieving revision 1.2
diff -u -p -r1.2 configure.in
--- configure.in	1999/02/01 22:21:09	1.2
+++ configure.in	1999/09/06 18:25:53
@@ -54,6 +54,7 @@ AC_CHECK_LIB(termcap, tgoto, [
 	], READLINE_LIB="", "-lncurses")
 ], READLINE_LIB=""))
 
+AC_CHECK_LIB(guile, scm_strport_to_string, AC_DEFINE(HAVE_SCM_STRPORT_TO_STRING), ,$GUILE_LIBS)
 
 AC_SUBST(READLINE_LIB)
 
Index: test-server.c
===================================================================
RCS file: /cvs/gnome/guile-server/test-server.c,v
retrieving revision 1.7
diff -u -p -r1.7 test-server.c
--- test-server.c	1999/02/17 04:35:19	1.7
+++ test-server.c	1999/09/06 18:25:53
@@ -113,7 +113,6 @@ real_main (void* closure, int argc, char
 {
   PortableServer_ObjectId objid = {0, sizeof("gnome_guile_interface"), "gnome_guile_interface"};
   PortableServer_POA poa;
-  CORBA_Object *server;
 
   CORBA_exception_init (&ev);
   orb = gnome_CORBA_init (PACKAGE, VERSION, &argc, argv, 
@@ -170,24 +169,26 @@ main(int argc, char * argv[])
 
 static SCM make_output_strport(char *fname)
 {
-  return scm_mkstrport(SCM_INUM0, scm_make_string(SCM_MAKINUM(30), 
+  return scm_mkstrport(SCM_INUM0, scm_make_string(SCM_INUM0, 
                                                   SCM_UNDEFINED),
                        SCM_OPN | SCM_WRTNG,
                        fname);
 }
 
-static SCM get_strport_string(SCM port)
+#ifndef HAVE_SCM_STRPORT_TO_STRING
+SCM scm_strport_to_string(SCM port)
 {
   SCM answer;
-  {
+  { /* scope */
     gh_defer_ints();
     answer = scm_makfromstr (SCM_CHARS (gh_cdr (SCM_STREAM (port))),
-                             SCM_INUM (gh_car (SCM_STREAM (port))),
-                             0);
+			     SCM_INUM (gh_car (SCM_STREAM (port))),
+			     0);
     gh_allow_ints();
   }
   return answer;
 }
+#endif
 
 /* Well it isn't safe, but if this was a real server it would be made
    so. */
@@ -260,9 +261,9 @@ guile_eval (PortableServer_Servant serva
   scm_def_errp = saved_def_e_port;
 
   /* Retrieve output and errors */
-  out = (unsigned char *) gh_scm2newstr(get_strport_string(o_port),
+  out = (unsigned char *) gh_scm2newstr(scm_strport_to_string(o_port),
                                         &pending.olen);
-  err = (unsigned char *) gh_scm2newstr(get_strport_string(e_port),
+  err = (unsigned char *) gh_scm2newstr(scm_strport_to_string(e_port),
                                         &pending.elen);
         
   pending.result = ret;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]