From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11786 invoked by alias); 7 Jul 2003 22:30:22 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 11774 invoked from network); 7 Jul 2003 22:30:21 -0000 Received: from unknown (HELO snoopy.pacific.net.au) (61.8.0.36) by sources.redhat.com with SMTP; 7 Jul 2003 22:30:21 -0000 Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h67MUKZY010983 for ; Tue, 8 Jul 2003 08:30:20 +1000 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h67MUKQg019340 for ; Tue, 8 Jul 2003 08:30:20 +1000 (EST) Received: from localhost (ppp112.dyn228.pacific.net.au [203.143.228.112]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h67MUInh004663 for ; Tue, 8 Jul 2003 08:30:19 +1000 (EST) Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19ZeUt-0000eZ-00; Tue, 08 Jul 2003 08:30:11 +1000 To: guile-gtk@sources.redhat.com Subject: Re: gdk-string-to-compound References: <87llxd2c59.fsf@zip.com.au> <874r3lmifw.fsf@zip.com.au> <87of1tjjwy.fsf@zip.com.au> <87znldi1wl.fsf@zip.com.au> <87el2mmymo.fsf@zip.com.au> <87smr2lgge.fsf@zip.com.au> <877k89nx2w.fsf@zip.com.au> <87llw5ocps.fsf@zip.com.au> From: Kevin Ryde Mail-Copies-To: never Date: Mon, 07 Jul 2003 22:30:00 -0000 Message-ID: <87llvam0lo.fsf@zip.com.au> User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-q3/txt/msg00004.txt.bz2 --=-=-= Content-length: 208 As threatened, * gdk-1.2.defs, gdk-support.c, guile-gtk.h (gdk_string_to_compound_text_interp): Return the status code, put text return in same position in values as the C function. --=-=-= Content-Disposition: attachment; filename=gdk-1.2.defs.compound.diff Content-length: 749 --- gdk-1.2.defs.~1.37.~ 2003-07-03 11:01:30.000000000 +1000 +++ gdk-1.2.defs 2003-07-07 17:15:54.000000000 +1000 @@ -1928,12 +1928,17 @@ (int format) (SCM text))) ; string +;; The return value is only documented as zero for success or non-zero for +;; failure, but a negative is an Xlib error code or positive is a count of +;; failed characters. Not sure if applications will find a use for this, +;; but we may as well return it. +;; (define-func gdk_string_to_compound_text_interp - (SCM ; string or #f - (values (encoding format))) + (int (values (encoding format ctext))) ((string str) (atom encoding) - (int format))) + (int format) + (SCM ctext))) ;; string or #f (define-func gdk_atom_intern atom --=-=-= Content-Disposition: attachment; filename=gdk-support.c.compound.diff Content-length: 928 --- gdk-support.c.~1.24.~ 2003-06-19 11:03:47.000000000 +1000 +++ gdk-support.c 2003-07-07 17:17:28.000000000 +1000 @@ -1501,17 +1501,21 @@ } #undef FUNCNAME -SCM -gdk_string_to_compound_text_interp (char *str, GdkAtom *encoding, gint *format) +gint +gdk_string_to_compound_text_interp (char *str, GdkAtom *encoding, gint *format, + SCM *textp) { guchar *ctext; - gint length; - SCM text; - if (gdk_string_to_compound_text (str, encoding, format, &ctext, &length)) - return SCM_BOOL_F; - text = scm_mem2string ((char *) ctext, length); - gdk_free_compound_text (ctext); - return text; + gint ret, length; + ret = gdk_string_to_compound_text (str, encoding, format, &ctext, &length); + if (ctext != NULL) + { + *textp = scm_mem2string ((char *) ctext, length); + gdk_free_compound_text (ctext); + } + else + *textp = SCM_BOOL_F; + return ret; } SCM --=-=-= Content-Disposition: attachment; filename=guile-gtk.h.compound.diff Content-length: 635 --- guile-gtk.h.~1.28.~ 2003-07-03 11:08:31.000000000 +1000 +++ guile-gtk.h 2003-07-07 17:10:52.000000000 +1000 @@ -468,8 +468,8 @@ SCM gdk_text_property_to_text_list_interp (GdkAtom encoding, gint format, SCM text); -SCM gdk_string_to_compound_text_interp (char *str, GdkAtom *encoding, - gint *format); +gint gdk_string_to_compound_text_interp (char *str, GdkAtom *encoding, + gint *format, SCM *textp); SCM gdk_property_get_interp (GdkWindow *window, GdkAtom property, GdkAtom type, gulong offset, gulong length, int pdelete, GdkAtom *actual_property_type, --=-=-=--