OSDN Git Service

2001-01-31 Fernando Nasser <fnasser@redhat.com>
[pf3gnuchains/pf3gnuchains4x.git] / gdb / gdbtk / library / plugins / rhabout / rhabout.c
1 /* Sample command procedure library for a plug-in. */
2
3 /* You have to include the Tcl headers, of course. */
4 #include <tcl.h>
5
6 /* Define the functions that implement your commands as required by Tcl */
7
8 int extra_text (ClientData clientData,
9                 Tcl_Interp *interp,
10                 int argc, char *argv[]);
11
12 /* Here you actually do whatever you want, like calling your target 
13    libraries etc.  Here we just return a string. */
14
15 int
16 extra_text (ClientData clientData,
17                 Tcl_Interp *interp,
18                 int argc, char *argv[])
19 {
20   interp->result = "\nThis is a sample plug-in\n";
21   return TCL_OK;
22 }
23
24 /* Initialization function required in Tcl libraries. */
25
26 int
27 Rhabout_Init (Tcl_Interp *interp)
28 {
29   /* Register your command as a Tcl command with this interpreter. */
30   Tcl_CreateCommand (interp, "rhabout_extra_text", extra_text,
31                      (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
32
33   return TCL_OK;
34 }