diff options
| -rw-r--r-- | AUTHORS | 0 | ||||
| -rw-r--r-- | ChangeLog | 13 | ||||
| -rw-r--r-- | Makefile.am | 6 | ||||
| -rw-r--r-- | NEWS | 0 | ||||
| -rw-r--r-- | README | 0 | ||||
| -rw-r--r-- | configure.ac | 199 | ||||
| -rw-r--r-- | po/Makevars | 41 | ||||
| -rw-r--r-- | po/POTFILES.in | 1 | ||||
| -rw-r--r-- | src/Makefile.am | 18 | ||||
| -rw-r--r-- | src/editor.c | 662 | 
10 files changed, 940 insertions, 0 deletions
| diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..33af36e --- /dev/null +++ b/ChangeLog @@ -0,0 +1,13 @@ +2008-07-23  Cyrille Bagard <nocbos@gmail.com> + +	* AUTHORS: +	* ChangeLog: +	* configure.ac: +	* Makefile.am: +	* NEWS: +	* po/Makevars: +	* po/POTFILES.in: +	* README: +	* src/editor.c: +	* src/Makefile.am: +	Initial commit. State of the program submitted to Gna!. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..02f2409 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,6 @@ + +EXTRA_DIST = config.rpath  config.rpath  ChangeLog + +SUBDIRS = po src + +ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..a1d80af --- /dev/null +++ b/configure.ac @@ -0,0 +1,199 @@ +# Process this file with autoconf to produce a configure script. + +############################################################ +# Autoconf requirements +############################################################ + +AC_PREREQ(2.59) +AC_INIT([openida], [0.0.1], [nocbos@gmail.com]) + +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE + +AM_GNU_GETTEXT_VERSION([0.17]) +AM_GNU_GETTEXT([external]) + +AC_CONFIG_SRCDIR([src/editor.c]) + + +############################################################ +# Information on the package +############################################################ + +#--- Checks for programs + +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_MAKE_SET +AC_PROG_RANLIB + + +#--- Checks for libraries + +AC_CHECK_LIB([dl], [dlopen]) + + +#--- Checks for header files + +AC_HEADER_DIRENT +AC_HEADER_STDBOOL +AC_HEADER_STDC +AC_CHECK_HEADERS([malloc.h]) +AC_CHECK_HEADERS([netdb.h]) +AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([string.h]) +AC_CHECK_HEADERS([unistd.h]) + + +#--- Checks for types + +AC_TYPE_SIZE_T + + +#--- Checks for structures + +AC_STRUCT_TM + + +#--- Checks for compiler characteristics + +AC_C_CONST + + +#--- Checks for library functions + +AC_FUNC_CLOSEDIR_VOID +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_FUNC_STAT +AC_FUNC_STRFTIME +AC_FUNC_VPRINTF + +AC_CHECK_FUNCS([pow]) +AC_CHECK_FUNCS([regcomp]) +AC_CHECK_FUNCS([strdup]) +AC_CHECK_FUNCS([strerror]) +AC_CHECK_FUNCS([strndup]) +AC_CHECK_FUNCS([strrchr]) + + +#--- Checks for system services + + + +#--- Autoheader Macros + +AH_TEMPLATE([VERSION], [Define the version number of the program for the about box.]) +AH_TEMPLATE([PACKAGE_DATA_DIR], [Define the directory where the associated data will be installed.]) +AH_TEMPLATE([PACKAGE_SOURCE_DIR], [Define the directory where the code source is waiting for being compiled.]) +AH_TEMPLATE([LOCALE_DIR], [Define the directory where the message catalogs are installed.]) + + +AC_DEFINE_UNQUOTED(VERSION, AC_PACKAGE_VERSION) + +if test "x${datadir}" = 'x${prefix}/share'; then +   if test "x${prefix}" = "xNONE"; then +      AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") +   else +      AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") +   fi +elif test "x${datadir}" = 'x${datarootdir}'; then +   if test "x${datarootdir}" = 'x${prefix}/share'; then +      if test "x${prefix}" = "xNONE"; then +         AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") +      else +         AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") +      fi +   else +      AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}") +   fi  +else +   AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}") +fi + +packagesrcdir=`cd $srcdir && pwd` +AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") + +if test "x${prefix}" = "xNONE"; then +   AC_DEFINE_UNQUOTED(LOCALE_DIR, "${ac_default_prefix}/share/locale") +else +   AC_DEFINE_UNQUOTED(LOCALE_DIR, "${prefix}/share/locale") +fi + + +############################################################ +# Compilation options +############################################################ + +AC_ARG_ENABLE(debug,        [  --enable-debug          compile with debugging support [def=no]],            [enable_debug=yes],     [enable_debug=no]) + + +#--- Is debug mode needed ? + +if test "x$enable_debug" = "xyes"; then +   DEBUG_CFLAGS="$DEBUG_CFLAGS -ggdb -gdwarf-2 -DDEBUG" +fi + +AC_SUBST(DEBUG_CFLAGS) + +#-Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes + +WARNING_FLAGS="-Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes" + +#-Wcast-qual -Wconversion -Wsign-compare -Wdisabled-optimization + +AC_SUBST(WARNING_FLAGS) + +#--- Checks for GTK 2.0 + +PKG_CHECK_MODULES(LIBGTK,gtk+-2.0 >= 2.4.3,[libgtk_found=yes],[libgtk_found=no]) + +if test "$libgtk_found" = "yes"; then +   libgtk_version=`pkg-config gtk+-2.0 --modversion` +else +   libgtk_version='-' +fi + +AC_SUBST(LIBGTK_CFLAGS) +AC_SUBST(LIBGTK_LIBS) + + +#--- Checks for libxml2 + +PKG_CHECK_MODULES(LIBXML,libxml-2.0 >= 2.6.11,[libxml_found=yes],[libxml_found=no]) + +if test "$libxml_found" = "yes"; then +   libxml_version=`pkg-config libxml-2.0 --modversion` +else +   libxml_version='-' +fi + +AC_SUBST(LIBXML_CFLAGS) +AC_SUBST(LIBXML_LIBS) + + +############################################################ +# Outputting files +############################################################ + +AC_CONFIG_FILES([stamp-h po/Makefile.in], [echo timestamp > stamp-h]) + +AC_CONFIG_FILES([Makefile +                 src/Makefile]) + +AC_OUTPUT + + +echo +echo $PACKAGE $VERSION + +echo +echo The GNU Image Manipulation Program Toolkit... : $libgtk_version +echo The XML C parser and toolkit of Gnome........ : $libxml_version + +echo +echo Print debugging messages..................... : $enable_debug + +echo +echo configure complete, now type \'make\' +echo diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..52022d7 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding +# package.  (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.)  Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright.  The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Cyrille Bagard + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +#   in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +#   understood. +# - Strings which make invalid assumptions about notation of date, time or +#   money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used.  It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..667e27c --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +# List of source files which contain translatable strings. diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..07af7b5 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,18 @@ + +bin_PROGRAMS=openida + +openida_SOURCES = 						\ +	editor.c + + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/intl $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) `pkg-config --cflags gthread-2.0` + +AM_CPPFLAGS =  + +AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) + + +openida_LDFLAGS = $(LIBGTK_LIBS) -L/usr/X11R6/lib -ldl $(LIBXML_LIBS) `pkg-config --libs gthread-2.0` + + +openida_LDADD = $(LIBINTL) diff --git a/src/editor.c b/src/editor.c new file mode 100644 index 0000000..3614379 --- /dev/null +++ b/src/editor.c @@ -0,0 +1,662 @@ + +/* Firebox Tools - Outils de configurations pour le WM Firebox + * editor.c - fichier principal de l'éditeur de configuration + * + * Copyright (C) 2006-2007 Cyrille Bagard + * + *  This file is part of Firebox Tools. + * + *  Firebox Tools is free software; you can redistribute it and/or modify + *  it under the terms of the GNU General Public License as published by + *  the Free Software Foundation; either version 2 of the License, or + *  (at your option) any later version. + * + *  Firebox Tools is distributed in the hope that it will be useful, + *  but WITHOUT ANY WARRANTY; without even the implied warranty of + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *  GNU General Public License for more details. + * + *  You should have received a copy of the GNU General Public License + *  along with this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + */ + + +#include <locale.h>/* Fonction main() */ +#include <config.h> /* idem */ +#include <stdlib.h> /* ... */ + + +#include <gtk/gtk.h> + + +/** exemple GTK **/ +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <unistd.h> +/** exemple GTK **/ + +/** Partie ptrace() **/ +#include <sys/ptrace.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <unistd.h> +#include <linux/user.h> +#include <sys/syscall.h>   /* For SYS_write etc */ +/** Partie ptrace() **/ + + +#define _(str) str + + +void sigchld_handler(int num); + + + +/* Construit la fenêtre de l'éditeur. */ +GtkWidget *create_editor(void); + +/* Quitte le programme en sortie de la boucle de GTK. */ +void destroy_editor(GtkWidget *, gpointer); + + + + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : argc = nombre d'arguments dans la ligne de commande.         * +*                argv = arguments de la ligne de commande.                    * +*                                                                             * +*  Description : Point d'entrée du programme.                                 * +*                                                                             * +*  Retour      : EXIT_SUCCESS si le prgm s'est déroulé sans encombres.        * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +int main(int argc, char **argv) +{ +    GtkWidget *editor;                      /* Fenêtre graphique           */ + +    setlocale(LC_ALL, ""); +    /* +    bindtextdomain(PACKAGE, LOCALE_DIR); +    textdomain(PACKAGE); +    */ + +    /* init threads */ +    g_thread_init(NULL); +    gdk_threads_init(); + +    /* Initialisation de GTK */ +    gtk_set_locale(); +    gtk_init(&argc, &argv); + +    /* +     * this initialize the library and check potential ABI mismatches +     * between the version it was compiled for and the actual shared +     * library used. +     */ +    /*LIBXML_TEST_VERSION*/ + +    /* Initialisation du programme */ +    editor = create_editor(); +    gtk_widget_show(editor); + + +    gdk_threads_enter(); +    gtk_main(); +    gdk_threads_leave(); + +    return EXIT_SUCCESS; + +} + + + + + + + +GCond* data_cond = NULL;   /* Must be initialized somewhere */ +GMutex* data_mutex = NULL; /* Must be initialized somewhere */ +gboolean run_again = FALSE; + + + + +void +on_button1_clicked                     (GtkButton       *button, +                                        gpointer         user_data); + + + + +GtkLabel *lbl_eax; +GtkLabel *lbl_ebx; +GtkLabel *lbl_ecx; +GtkLabel *lbl_edx; + + + + +typedef struct _th_info +{ +    pid_t child; +    GtkTextBuffer *buffer; +     + + +} th_info; + + + +#include <asm/ptrace-abi.h> +#include <sys/reg.h> + +#include <error.h> +#include <errno.h> + +extern int errno; + + +void *argument_thread(void *args) +{ +    th_info *info; +    long orig_eax, eax; +    long params; +    int status; + +    char buffer[12]; + +    pid_t pid; + + + + +    pid = fork(); + + + +    if (pid > 0) +    { +        /*****/ + +    } +    else ptrace(PTRACE_TRACEME, 0, NULL, NULL); + +    sleep(1); + + +    if(pid == -1) +    { +        /* ouch, fork() failed */ +        perror("fork"); +        exit(-1); +    } +    else if(pid == 0) +    { +        // ptrace(PTRACE_TRACEME, 0, NULL, NULL); +        execlp("ls", "ls", "-CF", "/", NULL); +       +        /* if exec() returns, there is something wrong */ +        perror("execlp"); + +        /* exit child. note the use of _exit() instead of exit() */ +        _exit(-1); +    } +    else +    { +        info = (th_info *)args; +        info->child = pid; + +        /* parent */ +        gtk_text_buffer_insert_at_cursor (info->buffer, "#PARENT# Fork() succeed !\n", -1); + + +        while(1) +        { +            pid = waitpid(info->child, &status, 0/*WNOHANG*/); +            //wait(&status); + +            if(WIFEXITED(status)) +                break; + +            orig_eax = ptrace(PTRACE_PEEKUSER, +                              info->child, 4 * ORIG_EAX, NULL); +            if (orig_eax == -1) +            { +                printf("errno :: %d vs %d\n", errno, ESRCH); +                perror("ptrace()"); +            } + +            /* get GTK thread lock */ +            gdk_threads_enter(); + +            params = ptrace(PTRACE_PEEKUSER, info->child, 4 * EAX, NULL); +            snprintf(buffer, 11, "0x%08lx", params); +            gtk_label_set_text(lbl_eax, buffer); + +            params = ptrace(PTRACE_PEEKUSER, info->child, 4 * EBX, NULL); +            snprintf(buffer, 11, "0x%08lx", params); +            gtk_label_set_text(lbl_ebx, buffer); + +            params = ptrace(PTRACE_PEEKUSER, info->child, 4 * ECX, NULL); +            snprintf(buffer, 11, "0x%08lx", params); +            gtk_label_set_text(lbl_ecx, buffer); + +            params = ptrace(PTRACE_PEEKUSER, info->child, 4 * EDX, NULL); +            snprintf(buffer, 11, "0x%08lx", params); +            gtk_label_set_text(lbl_edx, buffer); +  +            gtk_text_buffer_insert_at_cursor (info->buffer, "Thread waiting for resume...\n", -1); + +            gdk_flush (); + +            /* release GTK thread lock */ +            gdk_threads_leave(); + +            g_mutex_lock (data_mutex); +            while (!run_again) +                g_cond_wait (data_cond, data_mutex); +            run_again = FALSE; +            g_mutex_unlock (data_mutex); + +            ptrace(PTRACE_SYSCALL, +                   info->child, NULL, NULL); +        } + + + +    } + + + +    return NULL; + +} + + + + +void +on_button1_clicked                     (GtkButton       *button, +                                        gpointer         data) +{ +  GtkTextBuffer *buffer; +  th_info *info; +  GError *error = NULL; + +  gtk_widget_set_state(GTK_WIDGET(button), GTK_STATE_INSENSITIVE); + +  buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (data)); +  gtk_text_buffer_insert_at_cursor (buffer, "Hello, this is some text\n", -1); + + +  info = (th_info *)calloc(1, sizeof(th_info)); +  info->child = 0/*pid*/; +  info->buffer = buffer; + +  data_cond = g_cond_new (); +  data_mutex = g_mutex_new (); + +  if (!g_thread_create(argument_thread, info, FALSE, &error)) +  { +      printf ("Failed to create YES thread: %s\n", error->message); +  } + + + + +} + + +void +on_button2_clicked                     (GtkButton       *button, +                                        gpointer         data) +{ + +  g_mutex_lock (data_mutex); +  run_again = TRUE; +  g_cond_signal (data_cond); +  g_mutex_unlock (data_mutex); + +} + + + + + + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : -                                                            * +*                                                                             * +*  Description : Construit la fenêtre de l'éditeur.                           * +*                                                                             * +*  Retour      : Adresse de la fenêtre mise en place.                         * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +GtkWidget *create_editor(void) +{ +    GtkWidget *result;                      /* Fenêtre à renvoyer          */ + +  GtkWidget *vbox1; +  GtkWidget *vpaned1; +  GtkWidget *hpaned1; +  GtkWidget *scrolledwindow2; +  GtkWidget *textview2; +  GtkWidget *fixed1; +  GtkWidget *label1; +  GtkWidget *button2; +  GtkWidget *image1; +  GtkWidget *button1; +  GtkWidget *table1; +  GtkWidget *label3; +  GtkWidget *label4; +  GtkWidget *label5; +  GtkWidget *label6; +  GtkWidget *label7; +  GtkWidget *label8; +  GtkWidget *label9; +  GtkWidget *label10; +  GtkWidget *label11; +  GtkWidget *label12; +  GtkWidget *label14; +  GtkWidget *label15; +  GtkWidget *label16; +  GtkWidget *label17; +  GtkWidget *label18; +  GtkWidget *label19; +  GtkWidget *label20; +  GtkWidget *label21; +  GtkWidget *scrolledwindow1; +  GtkWidget *textview1; +  GtkWidget *statusbar1; + + +#if 0 +    GtkWidget *vbox;                        /* Support à divisions vert.   */ +    GtkWidget *notebook;                    /* Support à onglets           */ +    GtkWidget *panel;                       /* Panneau de configuration    */ +    GtkWidget *label;                       /* Etiquette pour onglet       */ +    GtkWidget *hseparator;                  /* Barre de séparation         */ +    GtkWidget *hbuttonbox;                  /* Support horizontal de btns. */ +    GtkWidget *button;                      /* Btn. de commande inférieur  */ +#endif + + +    result = gtk_window_new(GTK_WINDOW_TOPLEVEL); +    gtk_widget_set_size_request(result, 600, 600); +    gtk_window_set_position(GTK_WINDOW(result), GTK_WIN_POS_CENTER); +    gtk_container_set_border_width(GTK_CONTAINER(result), 4); +    gtk_window_set_title(GTK_WINDOW(result), _("OpenIDA")); + +    g_signal_connect(G_OBJECT(result), "destroy", G_CALLBACK(destroy_editor), NULL); + + + + + +  vbox1 = gtk_vbox_new (FALSE, 0); +  gtk_widget_show (vbox1); +  gtk_container_add (GTK_CONTAINER (result), vbox1); + +  vpaned1 = gtk_vpaned_new (); +  gtk_widget_show (vpaned1); +  gtk_box_pack_start (GTK_BOX (vbox1), vpaned1, TRUE, TRUE, 0); +  gtk_paned_set_position (GTK_PANED (vpaned1), 400); + +  hpaned1 = gtk_hpaned_new (); +  gtk_widget_show (hpaned1); +  gtk_paned_pack1 (GTK_PANED (vpaned1), hpaned1, FALSE, TRUE); +  gtk_paned_set_position (GTK_PANED (hpaned1), 400); + +  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); +  gtk_widget_show (scrolledwindow2); +  gtk_paned_pack1 (GTK_PANED (hpaned1), scrolledwindow2, FALSE, TRUE); +  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN); + +  textview2 = gtk_text_view_new (); +  gtk_widget_show (textview2); +  gtk_container_add (GTK_CONTAINER (scrolledwindow2), textview2); + +  fixed1 = gtk_fixed_new (); +  gtk_widget_show (fixed1); +  gtk_paned_pack2 (GTK_PANED (hpaned1), fixed1, TRUE, TRUE); + +  label1 = gtk_label_new (_("Registres :")); +  gtk_widget_show (label1); +  gtk_fixed_put (GTK_FIXED (fixed1), label1, 16, 48); +  gtk_widget_set_size_request (label1, 128, 16); +  gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); + +  button2 = gtk_button_new (); +  gtk_widget_show (button2); +  gtk_fixed_put (GTK_FIXED (fixed1), button2, 80, 8); +  gtk_widget_set_size_request (button2, 62, 29); + +  image1 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON); +  gtk_widget_show (image1); +  gtk_container_add (GTK_CONTAINER (button2), image1); + +  button1 = gtk_button_new_with_mnemonic (_("Run")); +  gtk_widget_show (button1); +  gtk_fixed_put (GTK_FIXED (fixed1), button1, 8, 8); +  gtk_widget_set_size_request (button1, 62, 29); + +  table1 = gtk_table_new (9, 2, FALSE); +  gtk_widget_show (table1); +  gtk_fixed_put (GTK_FIXED (fixed1), table1, 8, 64); +  gtk_widget_set_size_request (table1, 160, 176); +  gtk_container_set_border_width (GTK_CONTAINER (table1), 8); + +  label3 = gtk_label_new (_("eax :")); +  gtk_widget_show (label3); +  gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 0, 1, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); + +  label4 = gtk_label_new (_("ebx :")); +  gtk_widget_show (label4); +  gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 1, 2, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); + +  label5 = gtk_label_new (_("ecx :")); +  gtk_widget_show (label5); +  gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 2, 3, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); + +  label6 = gtk_label_new (_("edx :")); +  gtk_widget_show (label6); +  gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 3, 4, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); + +  label7 = gtk_label_new (_("esp :")); +  gtk_widget_show (label7); +  gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 4, 5, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5); + +  label8 = gtk_label_new (_("ebp :")); +  gtk_widget_show (label8); +  gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 5, 6, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5); + +  label9 = gtk_label_new (_("esi :")); +  gtk_widget_show (label9); +  gtk_table_attach (GTK_TABLE (table1), label9, 0, 1, 6, 7, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5); + +  label10 = gtk_label_new (_("edi :")); +  gtk_widget_show (label10); +  gtk_table_attach (GTK_TABLE (table1), label10, 0, 1, 7, 8, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5); + +  label11 = gtk_label_new (_("eip :")); +  gtk_widget_show (label11); +  gtk_table_attach (GTK_TABLE (table1), label11, 0, 1, 8, 9, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5); + +  label12 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label12); +  gtk_table_attach (GTK_TABLE (table1), label12, 1, 2, 0, 1, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5); + +  lbl_eax = label12; + +  label14 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label14); +  gtk_table_attach (GTK_TABLE (table1), label14, 1, 2, 2, 3, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5); + +  lbl_ebx = label14; + +  label15 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label15); +  gtk_table_attach (GTK_TABLE (table1), label15, 1, 2, 3, 4, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5); + +  lbl_ecx = label15; + +  label16 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label16); +  gtk_table_attach (GTK_TABLE (table1), label16, 1, 2, 4, 5, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5); + +  lbl_edx = label16; + +  label17 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label17); +  gtk_table_attach (GTK_TABLE (table1), label17, 1, 2, 5, 6, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5); + +  label18 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label18); +  gtk_table_attach (GTK_TABLE (table1), label18, 1, 2, 6, 7, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5); + +  label19 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label19); +  gtk_table_attach (GTK_TABLE (table1), label19, 1, 2, 7, 8, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5); + +  label20 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label20); +  gtk_table_attach (GTK_TABLE (table1), label20, 1, 2, 8, 9, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label20), 0, 0.5); + +  label21 = gtk_label_new (_("0x00000000")); +  gtk_widget_show (label21); +  gtk_table_attach (GTK_TABLE (table1), label21, 1, 2, 1, 2, +                    (GtkAttachOptions) (GTK_FILL), +                    (GtkAttachOptions) (0), 0, 0); +  gtk_misc_set_alignment (GTK_MISC (label21), 0, 0.5); + +  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); +  gtk_widget_show (scrolledwindow1); +  gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow1, TRUE, TRUE); + +  textview1 = gtk_text_view_new (); +  gtk_widget_show (textview1); +  gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview1); + +  statusbar1 = gtk_statusbar_new (); +  gtk_widget_show (statusbar1); +  gtk_box_pack_start (GTK_BOX (vbox1), statusbar1, FALSE, FALSE, 0); + + + + + + + + +    g_signal_connect ((gpointer) button1, "clicked", +                      G_CALLBACK (on_button1_clicked), +                      textview1); + + + + + +    g_signal_connect ((gpointer) button2, "clicked", +                      G_CALLBACK (on_button2_clicked), +                      NULL); + + + + + +    return result; + +} + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : widget = fenêtre de l'éditeur de préférences.                * +*                data   = adresse non utilisée ici.                           * +*                                                                             * +*  Description : Quitte le programme en sortie de la boucle de GTK.           * +*                                                                             * +*  Retour      : -                                                            * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +void destroy_editor(GtkWidget *widget, gpointer data) +{ +    gtk_main_quit(); + +} + + + + + + + + | 
