unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "A. Soare" <alinsoar@voila.fr>
To: "Emacs   Dev  [emacs-devel]" <emacs-devel@gnu.org>
Subject: C-code : printing into a buffer
Date: Fri, 29 May 2009 08:43:08 +0200 (CEST)	[thread overview]
Message-ID: <22137596.3171251243579388560.JavaMail.www@wwinf4630> (raw)

Hi,

I have the following problem:

Supposing that

1. I call dlsym for the funtion X="printf" from emacs. No need for dlopen, because I suppose that X always belongs to libc.
2. I get the ADDRESS of X ( for ex. printf ).
3. I call printf from that address using a pointer of the form
   (* (some_cast to a pointer to that function) (ADDRESS)) (str, ...);


My problem is to define a buffer in emacs such that in the moment when I call this function via a pointer, all its output to be discarged in that buffer, not in the terminal of emacs.

Is that possible? Any ideas of how to solve it?


Thanks in advance.

Alin.





____________________________________________________

Découvrez le nouveau Voila.fr et apprenez à maîtriser le web 2.0 sur http://voila.fr






             reply	other threads:[~2009-05-29  6:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29  6:43 A. Soare [this message]
2009-05-29  7:16 ` C-code : printing into a buffer Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2009-05-29  7:49 A. Soare
2009-05-29  9:13 A. Soare
2009-06-01  1:57 ` Stephen J. Turnbull
2009-06-01 14:31 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=22137596.3171251243579388560.JavaMail.www@wwinf4630 \
    --to=alinsoar@voila.fr \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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