public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: guile-gtk@sources.redhat.com
Subject: Re: gdk-string-to-compound
Date: Mon, 07 Jul 2003 22:30:00 -0000	[thread overview]
Message-ID: <87llvam0lo.fsf@zip.com.au> (raw)
In-Reply-To: <87llw5ocps.fsf@zip.com.au>

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

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.


[-- Attachment #2: gdk-1.2.defs.compound.diff --]
[-- Type: text/plain, Size: 749 bytes --]

--- 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

[-- Attachment #3: gdk-support.c.compound.diff --]
[-- Type: text/plain, Size: 928 bytes --]

--- 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

[-- Attachment #4: guile-gtk.h.compound.diff --]
[-- Type: text/plain, Size: 635 bytes --]

--- 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,

  reply	other threads:[~2003-07-07 22:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12  1:21 texinfo documentation Kevin Ryde
2003-05-12  1:52 ` Marko Rauhamaa
2003-05-23 22:01   ` Kevin Ryde
2003-05-23 23:36     ` Marko Rauhamaa
2003-05-23 23:57       ` Kevin Ryde
2003-05-24  0:05         ` Marko Rauhamaa
2003-05-24  2:19           ` Kevin Ryde
     [not found]             ` <m3llwwdhjf.fsf@lumo.pacujo.net>
2003-05-25 22:48               ` Kevin Ryde
2003-05-25 23:28                 ` Marko Rauhamaa
2003-05-26  0:06                   ` Kevin Ryde
2003-05-26  2:42                     ` Marko Rauhamaa
2003-05-29 23:37                       ` Kevin Ryde
2003-05-30  1:06                         ` Marko Rauhamaa
2003-06-13 22:05                           ` gdk-string-to-compound (was: texinfo documentation) Kevin Ryde
2003-07-07 22:30                             ` Kevin Ryde [this message]
2003-05-29 23:43                       ` texinfo documentation Kevin Ryde
2003-06-01  4:31                         ` Marko Rauhamaa
2003-06-02 23:51                           ` gdk-window-get-origin (was: texinfo documentation) Kevin Ryde
2003-07-07 22:29                         ` gdk-window-get-geometry " Kevin Ryde
2003-05-26  0:07                   ` gdk-rectangle-new " Kevin Ryde
2003-05-26  1:20                     ` Marko Rauhamaa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87llvam0lo.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-gtk@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).