From: Spaceman Spiff on
On May 19, 6:51 pm, ZB <zbTHIS...(a)ispid.THIS-NOcom.pl> wrote:
> Dnia 19.05.2010 Spaceman Spiff <michael.j.kenn...(a)gmail.com> napisa³/a:
>
> > I don't know Tcl but I'm interested in using SQLite for undo/redo as
> > demonstrated with Tcl code here: <http://www.sqlite.org/cvstrac/wiki?
> > p=UndoRedo>. But my program is in C/C++. I wish there was a C/C++
> > example, [..]
>
> ...so wouldn't be better idea to go directly to SQLite mailing list?
>
> If you'll try to use Google (search for "sqlite undo/redo"), you'll surely
> find find the message:
>
> http://osdir.com/ml/sqlite-users/2009-07/msg00113.html
>
> ...which will lead you to the resources, you're looking for:
>
> http://sourceforge.net/projects/sqlite-undo/
>
> --
> Zbigniew

I tried many Google searches and went through pages of results and
somehow never found that. Thanks.
From: nedbrek on
Hello,

"Spaceman Spiff" <michael.j.kennard(a)gmail.com> wrote in message
news:8d91fd93-ee44-402a-a956-fa97158fc750(a)40g2000pry.googlegroups.com...
>I don't know Tcl but I'm interested in using SQLite for undo/redo as
> demonstrated with Tcl code here: <http://www.sqlite.org/cvstrac/wiki?
> p=UndoRedo>. But my program is in C/C++. I wish there was a C/C++
> example, or a Tcl to C/C++ translator. Does anyone have any advice for
> a C/C++ programmer on what to do with this Tcl code?

Tcl was designed to be embedded in a C program. There is a fairly straight
forward mapping of every Tcl command to C.

I'm not too familiar with SQLite, but I know the creator intended it as a
Tcl extension, with an available C API (although many people use it only
through C, not realizing it is a Tcl extension).

You should be able to find the corresponding C API functions called from Tcl
in the SQLite manual. Failing that, the mapping is in C code, look for
Tcl_CreateCommand or Tcl_CreateObjCommand.

You can also embed a Tcl interpreter in your program, and run the given Tcl
code through it.

Hope that helps,
Ned