Author SHA1 Message Date
lassik 0648b5d060 Add ./configure --with flags for X11
--with-x11
--with-xt
--with-xaw

All disabled by default, since the code has probably bitrotted.
2023-02-13 15:43:46 +02:00
lassik 4011143b81 Add <string.h>
Fixes missing strlen()
2023-02-13 15:43:20 +02:00
lassik 8046a10a7a No _POSIX_SOURCE on Mac
_POSIX_SOURCE hides wait3() and wait4()
2023-02-13 15:42:21 +02:00
lassik e3efc5b46e Fix more autotools crap 2023-02-13 15:41:59 +02:00
lassik c81aeacfb8 Update some autoconf macros manually 2023-02-13 14:01:10 +02:00
lassik 6aa254bd6e Run autoupdate
autoupdate (GNU Autoconf) 2.71
2023-02-13 13:50:10 +02:00
20 changed files with 80 additions and 608 deletions
+2
View File
@@ -7,6 +7,7 @@
.auto
.libs
.deps
INSTALL
Makefile
Makefile.in
aclocal.m4
@@ -17,6 +18,7 @@ config.log
config.status
configure
libtool
m4
stamp-*
*-stamp
# Configure-generated files
+3 -2
View File
@@ -1,4 +1,4 @@
NULL =
NULL =
SUBDIRS = include src lib scm doc examples test
DIST_SUBDIRS = $(SUBDIRS)
@@ -12,5 +12,6 @@ EXTRA_DIST = \
MIGRATE \
$(NULL)
AUTOMAKE_OPTIONS = dist-bzip2
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2
+70 -68
View File
@@ -1,21 +1,23 @@
# $Id$
AC_INIT(src/main.c)
AC_INIT([elk],[3.99.8])
AC_CONFIG_SRCDIR([src/main.c])
AC_PREREQ(2.50)
AC_PREREQ([2.71])
AC_CONFIG_AUX_DIR(.auto)
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIRS([m4])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(elk, 3.99.8)
AM_INIT_AUTOMAKE
dnl AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_CONFIG_HEADERS(config.h)
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_STDC_HEADERS
LT_INIT([win32-dll])
AC_C_CONST
AC_C_INLINE
@@ -24,6 +26,24 @@ AC_TYPE_SIZE_T
# Check whether we are doing a native build
AM_CONDITIONAL(NATIVE_BUILD, test "${cross_compiling}" = "no")
AC_ARG_WITH([x11],
[AS_HELP_STRING([--with-x11],
[enable support for libx11])],
[],
[with_x11=no])
AC_ARG_WITH([xt],
[AS_HELP_STRING([--with-xt],
[enable support for libxt])],
[],
[with_xt=no])
AC_ARG_WITH([xaw],
[AS_HELP_STRING([--with-xaw],
[enable support for libxaw])],
[],
[with_xaw=no])
AC_CHECK_HEADERS(inttypes.h,
[STDINT_HEADER="<inttypes.h>"],
[AC_CHECK_HEADERS(sys/inttypes.h,
@@ -320,13 +340,9 @@ AC_CHECK_FUNCS(fpurge)
AC_CACHE_CHECK([for BSD-style flushing],
[ac_cv_have_bsd_flush],
[AC_TRY_COMPILE(
[#include <stdio.h>],
[FILE *f;
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *f;
f->_cnt = 0;
f->_ptr = f->_base;],
ac_cv_have_bsd_flush=yes,
ac_cv_have_bsd_flush=no)])
f->_ptr = f->_base;]])],[ac_cv_have_bsd_flush=yes],[ac_cv_have_bsd_flush=no])])
if test "${ac_cv_have_bsd_flush}" = "yes"; then
AC_DEFINE(HAVE_BSD_FLUSH, 1, [Define if you have BSD-style flushing])
fi
@@ -339,8 +355,7 @@ AC_CHECK_HEADERS(termio.h termios.h)
AC_CHECK_FUNCS(getrlimit)
AC_CACHE_CHECK([for struct rlimit],
[ac_cv_have_struct_rlimit],
[AC_TRY_COMPILE(
[#ifdef HAVE_SYS_TIME_H
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
@@ -348,10 +363,7 @@ AC_CACHE_CHECK([for struct rlimit],
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif],
[struct rlimit rl;],
ac_cv_have_struct_rlimit=yes,
ac_cv_have_struct_rlimit=no)])
#endif]], [[struct rlimit rl;]])],[ac_cv_have_struct_rlimit=yes],[ac_cv_have_struct_rlimit=no])])
if test "${ac_cv_have_struct_rlimit}" = "yes"; then
AC_DEFINE(HAVE_STRUCT_RLIMIT, 1, [Define if you have struct rlimit])
fi
@@ -453,14 +465,14 @@ LDFLAGS_save="${LDFLAGS}"
AC_CACHE_CHECK([if \$CXX really works],
[ac_cv_my_have_cxx],
[AC_LANG_PUSH(C++)
AC_TRY_COMPILE([],,ac_cv_my_have_cxx=yes, ac_cv_my_have_cxx=no)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_my_have_cxx=yes],[ac_cv_my_have_cxx=no])
AC_LANG_POP(C++)])
AM_CONDITIONAL(HAVE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
AC_CACHE_CHECK([if \$CC accepts -Wall],
[ac_cv_c_Wall],
[CFLAGS="-Wall ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wall=yes],[ac_cv_c_Wall=no])])
if test "x${ac_cv_c_Wall}" != "xno"; then
CFLAGS_save="-Wall ${CFLAGS_save}"
fi
@@ -470,7 +482,7 @@ CFLAGS_warn="-Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wmissing-prototy
AC_CACHE_CHECK([if \$CC accepts ${CFLAGS_warn}],
[ac_cv_c_Wwarn],
[CFLAGS="${CFLAGS_warn} ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wwarn=yes, ac_cv_c_Wwarn=no)])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wwarn=yes],[ac_cv_c_Wwarn=no])])
if test "x${ac_cv_c_Wwarn}" != "xno"; then
CFLAGS_save="${CFLAGS_warn} ${CFLAGS_save}"
fi
@@ -490,48 +502,51 @@ AC_PATH_X
if test -n "${x_includes}"; then x_cflags="-I${x_includes}"; fi
if test -n "${x_libraries}"; then x_libs="-I${x_libraries}"; fi
AC_CHECK_LIB(X11, XOpenDisplay,
[ac_cv_my_have_x11=yes
X_CFLAGS="${x_cflags}"
X_LIBS="${x_libs} -lX11"],
[ac_cv_my_have_x11=no],
[[${x_libs}]])
ac_cv_my_have_x11=no
AS_IF([test "x$with_x11" != xno],
[AC_CHECK_LIB(X11, XOpenDisplay,
[ac_cv_my_have_x11=yes
X_CFLAGS="${x_cflags}"
X_LIBS="${x_libs} -lX11"],
[ac_cv_my_have_x11=no],
[[${x_libs}]])])
AM_CONDITIONAL(HAVE_X11, test "${ac_cv_my_have_x11}" = "yes")
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
if test "${cross_compiling}" = "no"; then
AC_CHECK_LIB(Xt, XtFree,
[ac_cv_my_have_xt=yes
AC_CHECK_LIB(Xmu, XmuDrawLogo,
[XT_CFLAGS="${x_cflags}"
XT_LIBS="${x_libs} -lXmu -lXt -lSM -lICE -lXext -lX11"],
[XT_CFLAGS="${x_cflags}"
XT_LIBS="${x_libs} -lXt -lSM -lICE -lXext -lX11"],
[[-lXt -lSM -lICE -lXext -lX11 ${x_libs}]])],
[ac_cv_my_have_xt=no],
[[-lSM -lICE -lXext -lX11 ${x_libs}]])
else
ac_cv_my_have_xt=no
fi
ac_cv_my_have_xt=no
AS_IF([test "x$with_xt" != xno],
[AC_CHECK_LIB(Xt, XtFree,
if test "${cross_compiling}" = "no"; then
[ac_cv_my_have_xt=yes
AC_CHECK_LIB(Xmu, XmuDrawLogo,
[XT_CFLAGS="${x_cflags}"
XT_LIBS="${x_libs} -lXmu -lXt -lSM -lICE -lXext -lX11"],
[XT_CFLAGS="${x_cflags}"
XT_LIBS="${x_libs} -lXt -lSM -lICE -lXext -lX11"],
[[-lXt -lSM -lICE -lXext -lX11 ${x_libs}]])],
[ac_cv_my_have_xt=no],
[[-lSM -lICE -lXext -lX11 ${x_libs}]])
fi])
AM_CONDITIONAL(HAVE_XT, test "${ac_cv_my_have_xt}" = "yes")
AC_SUBST(XT_CFLAGS)
AC_SUBST(XT_LIBS)
if test "${cross_compiling}" = "no"; then
AC_CHECK_LIB(Xaw, XawTextSearch,
[ac_cv_my_have_xaw=yes
XAW_CFLAGS="${x_cflags}"
XAW_LIBS="${x_libs} -lXaw ${XT_LIBS}"],
[ac_cv_my_have_xaw=no],
[[${XT_LIBS}]])
else
ac_cv_my_have_xaw="no (cross-compiling)"
fi
ac_cv_my_have_xaw=no
AS_IF([test "x$with_xaw" != xno],
[if test "${cross_compiling}" = "no"; then
AC_CHECK_LIB(Xaw, XawTextSearch,
[ac_cv_my_have_xaw=yes
XAW_CFLAGS="${x_cflags}"
XAW_LIBS="${x_libs} -lXaw ${XT_LIBS}"],
[ac_cv_my_have_xaw=no],
[[${XT_LIBS}]])
fi])
AM_CONDITIONAL(HAVE_XAW, test "${ac_cv_my_have_xaw}" = "yes")
AC_SUBST(XAW_CFLAGS)
AC_SUBST(XAW_LIBS)
ac_cv_my_have_motif=no
if test "${cross_compiling}" = "no"; then
AC_CHECK_LIB(Xm, XmStringConcat,
[ac_cv_my_have_motif=yes
@@ -539,15 +554,13 @@ if test "${cross_compiling}" = "no"; then
MOTIF_LIBS="${x_libs} -lXm ${XT_LIBS}"],
[ac_cv_my_have_motif=no],
[[${XT_LIBS}]])
else
ac_cv_my_have_motif="no (cross-compiling)"
fi
AM_CONDITIONAL(HAVE_MOTIF, test "${ac_cv_my_have_motif}" = "yes")
AC_SUBST(MOTIF_CFLAGS)
AC_SUBST(MOTIF_LIBS)
INCLUDES="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include"
AC_SUBST(INCLUDES)
AM_CPPFLAGS="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include"
AC_SUBST(AM_CPPFLAGS)
dnl Export variables
AC_SUBST(ELK_CFLAGS)
@@ -567,13 +580,6 @@ fi
AC_MSG_RESULT([${ac_cv_my_have_groff}])
AM_CONDITIONAL(HAVE_GROFF, test "${ac_cv_my_have_groff}" = "yes")
PKG_CHECK_MODULES(GTK, gtk+-2.0, ac_cv_my_have_gtk=yes, ac_cv_my_have_gtk=no)
AM_CONDITIONAL(HAVE_GTK, test "${ac_cv_my_have_gtk}" = "yes")
if test "${ac_cv_my_have_gtk}" = "yes"; then
PKG_CHECK_MODULES(GOBJECT, gobject-2.0, ac_cv_my_have_gobject=yes, ac_cv_my_have_gobject=no)
AM_CONDITIONAL(HAVE_GOBJECT, test "${ac_cv_my_have_gobject}" = "yes")
fi
dnl
dnl Finished!
@@ -596,8 +602,6 @@ AC_CONFIG_FILES([
examples/Makefile
include/Makefile
lib/Makefile
lib/gobject/Makefile
lib/gtk/Makefile
lib/misc/Makefile
lib/unix/Makefile
lib/xlib/Makefile
@@ -627,7 +631,5 @@ libgdbm support: ${ac_cv_my_have_gdbm}
X11 support: ${ac_cv_my_have_x11}
Xaw support: ${ac_cv_my_have_xaw}
Motif support: ${ac_cv_my_have_motif}
GTK+ support: ${ac_cv_my_have_gtk}
build documentation: ${ac_cv_my_have_groff}
EOF
-5
View File
@@ -102,8 +102,3 @@ motif_DATA = \
motif/selection-box.scm \
$(NULL)
gtkdir = $(examplesdir)/gtk
gtk_DATA = \
gtk/hello-world.scm \
$(NULL)
-11
View File
@@ -1,11 +0,0 @@
;;; -*-Scheme-*-
(require 'gtk.la)
(gtk-init (command-line-args))
(define window (gtk-window-new 'gtk-window-toplevel))
(gtk-window-set-title window "Hello, World!")
(define callback (lambda args (gtk-main-quit)))
(g-signal-connect window "destroy" callback)
(gtk-widget-show-all window)
(gtk-main)
+2 -1
View File
@@ -31,8 +31,9 @@
#ifndef KERNEL_H
#define KERNEL_H
#include <stdio.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include "site.h"
#include "funcproto.h"
+1 -1
View File
@@ -1 +1 @@
SUBDIRS = gobject gtk misc unix xlib xwidgets
SUBDIRS = misc unix xlib xwidgets
-22
View File
@@ -1,22 +0,0 @@
NULL =
lib_LTLIBRARIES = $(libelk_gobject_la)
pkglib_LTLIBRARIES = $(gobject_la)
if HAVE_GOBJECT
libelk_gobject_la = libelk-gobject.la
gobject_la = gobject.la
endif
libelk_gobject_la_SOURCES = \
closure.c \
signal.c \
$(NULL)
libelk_gobject_la_CFLAGS = @GOBJECT_CFLAGS@
libelk_gobject_la_LDFLAGS = -no-undefined
libelk_gobject_la_LIBADD = $(top_builddir)/src/libelk.la @GOBJECT_LIBS@
gobject_la_SOURCES = init.c
gobject_la_CFLAGS = @GOBJECT_CFLAGS@
gobject_la_LDFLAGS = -module -avoid-version -no-undefined
gobject_la_LIBADD = $(top_builddir)/src/libelk.la libelk-gobject.la @GOBJECT_LIBS@
-60
View File
@@ -1,60 +0,0 @@
/* closure.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gobject.h"
typedef struct _ElkClosure ElkClosure;
struct _ElkClosure {
GClosure closure;
Object callback;
};
static void elk_closure_finalize (gpointer notify_data, GClosure *closure)
{
}
static void elk_closure_marshal (GClosure *closure, GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data) {
Funcall (((ElkClosure *)closure)->callback, Null, 0);
if (return_value)
g_value_init (return_value, G_TYPE_NONE);
}
GClosure *elk_closure_new (Object callback) {
GClosure *closure = g_closure_new_simple (sizeof (ElkClosure), NULL);
((ElkClosure *)closure)->callback = callback;
g_closure_add_finalize_notifier (closure, NULL, elk_closure_finalize);
g_closure_set_marshal (closure, elk_closure_marshal);
return closure;
}
-41
View File
@@ -1,41 +0,0 @@
/* gobject.h
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include <scheme.h>
#include <glib-object.h>
#include "config.h"
C_LINKAGE_BEGIN
GClosure *elk_closure_new (Object callback);
void elk_init_gobject_signal (void);
C_LINKAGE_END
-36
View File
@@ -1,36 +0,0 @@
/* init.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gobject.h"
void elk_init_gobject_init () {
elk_init_gobject_signal ();
P_Provide (Intern ("gobject.la"));
}
-44
View File
@@ -1,44 +0,0 @@
/* signal.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gobject.h"
static Object P_G_Signal_Connect (Object instance, Object detailed_signal, Object handler) {
GClosure *closure;
closure = elk_closure_new (handler);
g_signal_connect_closure ((gpointer)Get_GtkWidget (instance),
Get_String (detailed_signal), closure, FALSE);
return Void;
}
void elk_init_gobject_signal () {
Define_Primitive (P_G_Signal_Connect, "g-signal-connect", 3, 3, EVAL);
}
-23
View File
@@ -1,23 +0,0 @@
NULL =
lib_LTLIBRARIES = $(libelk_gtk_la)
pkglib_LTLIBRARIES = $(gtk_la)
if HAVE_GTK
libelk_gtk_la = libelk-gtk.la
gtk_la = gtk.la
endif
libelk_gtk_la_SOURCES = \
gtkmain.c \
gtkwidget.c \
gtkwindow.c \
$(NULL)
libelk_gtk_la_CFLAGS = @GTK_CFLAGS@
libelk_gtk_la_LDFLAGS = -no-undefined
libelk_gtk_la_LIBADD = $(top_builddir)/src/libelk.la @GTK_LIBS@
gtk_la_SOURCES = init.c
gtk_la_CFLAGS = @GTK_CFLAGS@
gtk_la_LDFLAGS = -module -avoid-version -no-undefined
gtk_la_LIBADD = $(top_builddir)/src/libelk.la libelk-gtk.la @GTK_LIBS@
-53
View File
@@ -1,53 +0,0 @@
/* gtk.h
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include <scheme.h>
#include <gtk/gtk.h>
#include "config.h"
extern int T_GtkWidget;
#define GTKWIDGET(x) ((struct S_GtkWidget *)POINTER(x))
struct S_GtkWidget {
Object tag;
GtkWidget *widget;
};
C_LINKAGE_BEGIN
extern GtkWidget *Get_GtkWidget (Object w);
extern Object Make_GtkWidget (GtkWidget *w);
extern void elk_init_gtk_gtkmain (void);
extern void elk_init_gtk_gtkwidget (void);
extern void elk_init_gtk_gtkwindow (void);
C_LINKAGE_END
-68
View File
@@ -1,68 +0,0 @@
/* gtkmain.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gtk.h"
#include "intern.h"
static Object P_Gtk_Init (Object args) {
int argc;
char **argv;
int i;
Check_List (args);
argc = Fast_Length (args) + 1;
argv = (char **)Safe_Malloc (sizeof (char *) * argc);
argv[0] = appname ? appname : "elk";
for (i = 1; i < argc; i++) {
Object arg = Car (args);
Check_Type (arg, T_String);
argv[i] = Get_String (arg);
args = Cdr (args);
}
gtk_init (&argc, &argv);
free (argv);
return Void;
}
static Object P_Gtk_Main () {
gtk_main ();
return Void;
}
static Object P_Gtk_Main_Quit () {
gtk_main_quit ();
return Void;
}
void elk_init_gtk_gtkmain () {
Define_Primitive (P_Gtk_Init, "gtk-init", 1, 1, EVAL);
Define_Primitive (P_Gtk_Main, "gtk-main", 0, 0, EVAL);
Define_Primitive (P_Gtk_Main_Quit, "gtk-main-quit", 0, 0, EVAL);
}
-73
View File
@@ -1,73 +0,0 @@
/* gtkwidget.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gtk.h"
int T_GtkWidget;
GtkWidget *Get_GtkWidget (Object w) {
Check_Type (w, T_GtkWidget);
return GTKWIDGET(w)->widget;
}
Object Make_GtkWidget (GtkWidget *w) {
Object yield;
yield = Alloc_Object (sizeof (struct S_GtkWidget), T_GtkWidget, 0);
GTKWIDGET(yield)->widget = w;
return yield;
}
static int GtkWidget_Equal (Object x, Object y) {
return GTKWIDGET(x)->widget == GTKWIDGET(y)->widget;
}
static int GtkWidget_Print (Object x, Object port, int raw, int depth,
int len) {
Printf (port, "#[gtk-widget %lu]", (unsigned long)GTKWIDGET(x)->widget);
return 0;
}
static Object GtkWidgetp (Object x) {
return TYPE(x) == T_GtkWidget ? True : False;
}
static Object P_Gtk_Widget_Show_All (Object w) {
gtk_widget_show_all (Get_GtkWidget(w));
return Void;
}
void elk_init_gtk_gtkwidget () {
T_GtkWidget = Define_Type (0, "gtk-widget", NOFUNC,
sizeof (struct S_GtkWidget), GtkWidget_Equal, GtkWidget_Equal,
GtkWidget_Print, NOFUNC);
Define_Primitive (GtkWidgetp, "gtk-widget?", 1, 1, EVAL);
Define_Primitive (P_Gtk_Widget_Show_All, "gtk-widget-show-all", 1, 1, EVAL);
}
-52
View File
@@ -1,52 +0,0 @@
/* gtkwindow.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include <string.h>
#include "gtk.h"
static Object P_Gtk_Window_New (Object sym) {
SYMDESCR syms[] = {
{ "gtk-window-toplevel", GTK_WINDOW_TOPLEVEL },
{ "gtk-window-popup", GTK_WINDOW_POPUP },
{ 0, 0 }
};
return Make_GtkWidget (gtk_window_new (Symbols_To_Bits (sym, 0, syms)));
}
static Object P_Gtk_Window_Set_Title (Object w, Object title) {
gtk_window_set_title (GTK_WINDOW(Get_GtkWidget(w)), Get_String(title));
return Void;
}
void elk_init_gtk_gtkwindow () {
Define_Primitive (P_Gtk_Window_New, "gtk-window-new", 1, 1, EVAL);
Define_Primitive (P_Gtk_Window_Set_Title, "gtk-window-set-title", 2, 2, EVAL);
}
-41
View File
@@ -1,41 +0,0 @@
/* init.c
*
* $Id$
*
* Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
* Copyright 2002, 2003 Sam Hocevar <sam@hocevar.net>, Paris
*
* This software was derived from Elk 1.2, which was Copyright 1987, 1988,
* 1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
* by Oliver Laumann for TELES Telematic Services, Berlin, in a joint project
* between TELES and Nixdorf Microprocessor Engineering, Berlin).
*
* Oliver Laumann, TELES GmbH, Nixdorf Computer AG and Sam Hocevar, as co-
* owners or individual owners of copyright in this software, grant to any
* person or company a worldwide, royalty free, license to
*
* i) copy this software,
* ii) prepare derivative works based on this software,
* iii) distribute copies of this software or derivative works,
* iv) perform this software, or
* v) display this software,
*
* provided that this notice is not removed and that neither Oliver Laumann
* nor Teles nor Nixdorf are deemed to have made any representations as to
* the suitability of this software for any purpose nor are held responsible
* for any defects of this software.
*
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#include "gtk.h"
void elk_init_gtk_init () {
Object sym = Intern ("gobject.la");
P_Require (1, &sym);
elk_init_gtk_gtkmain ();
elk_init_gtk_gtkwidget ();
elk_init_gtk_gtkwindow ();
P_Provide (Intern ("gtk.la"));
}
-4
View File
@@ -28,10 +28,6 @@
* THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
#ifdef __MACH__
# define _POSIX_SOURCE
#endif
#include "unix.h"
#include <string.h>
+2 -3
View File
@@ -1,4 +1,4 @@
NULL =
NULL =
lib_LTLIBRARIES = libelk.la
libelk_la_CFLAGS = @ELK_CFLAGS@ -I/usr/include/libelf
@@ -66,7 +66,7 @@ EXTRA_DIST = \
$(NULL)
bin_PROGRAMS = elk
elk_LDADD = $(top_builddir)/src/libelk.la
elk_LDADD = libelk.la
elk_SOURCES = main.c
install-exec-hook:
@@ -74,4 +74,3 @@ install-exec-hook:
ln -s elk "$(DESTDIR)$(bindir)/scheme-elk"
echo-sources: ; echo $(SOURCES)