oskit/oskit-20020317/x11/client/xc.diff

918 lines
24 KiB
Diff
Executable File

diff -crP xc.orig/config/cf/Imake.cf xc/config/cf/Imake.cf
*** xc.orig/config/cf/Imake.cf Tue Jul 15 16:05:52 1997
--- xc/config/cf/Imake.cf Fri Mar 13 15:19:48 1998
***************
*** 67,72 ****
--- 67,89 ----
# endif
#endif /* NetBSD */
+ #ifdef OSKIT
+ # define MacroIncludeFile <oskit.cf>
+ # define MacroFile oskit.cf
+ # undef OSKIT
+ # define OskitArchitecture
+ # if defined(i386) || defined(__i386__)
+ # define i386Architecture
+ # undef i386
+ # endif
+ # ifdef __FreeBSD__
+ # undef __FreeBSD__
+ # endif
+ # ifdef linux
+ # undef linux
+ # endif
+ #endif /* OSKIT */
+
#ifdef __FreeBSD__
# define MacroIncludeFile <FreeBSD.cf>
# define MacroFile FreeBSD.cf
diff -crP xc.orig/config/cf/oskit.cf xc/config/cf/oskit.cf
*** xc.orig/config/cf/oskit.cf Wed Dec 31 17:00:00 1969
--- xc/config/cf/oskit.cf Fri Mar 13 15:19:48 1998
***************
*** 0 ****
--- 1,213 ----
+ XCOMM oskit.cf
+
+ /*
+ * Configuration file for the oskit.
+ */
+
+ #ifndef OSName
+ #define OSName OSKit
+ #endif
+ XCOMM operating system: OSName
+ #ifndef OSMajorVersion
+ #define OSMajorVersion 1
+ #endif
+ #ifndef OSMinorVersion
+ #define OSMinorVersion 0
+ #endif
+ #ifndef OSTeenyVersion
+ #define OSTeenyVersion 0
+ #endif
+ #ifndef OSVendor
+ #define OSVendor University of Utah CSL
+ #endif
+
+ #define OSKitArchitecture YES
+
+ /* Configuration Defaults */
+
+
+ /* Set this to point to your oskit installation directory. */
+ #ifndef OskitTop
+ #define OskitTop /usr/flux
+ #endif
+
+ #define ProjectRoot OskitTop
+
+ /* Set this if you're building with ELF tools. */
+
+ #define ElfOskit YES
+
+ /* Set these depending on what you're using for cross compiling. */
+ #define ArCmdBase i486-linux-ar
+ #define AsCmd i486-linux-as
+ #define CcCmd i486-linux-gcc -fpcc-struct-return OskitIncludes OskitDefines DefaultGcc2i386Opt -g
+ #define CplusplusCmd i486-linux-g++ OskitIncludes OskitDefines -g
+ #define CplusplusFilt i486-linux-c++filt
+ #define CppCmd /usr/flux/lib/gcc-lib/i486-linux/2.7.2.2/cpp OskitIncludes OskitDefines
+ #define LdCmd i486-linux-ld OskitLoadFlags
+ #define RanlibCmd i486-linux-ranlib
+
+ /* Undefine the os-specific defines that might be lurking around. */
+ #define OskitUndefines -Ulinux -U__linux__ -U__linux
+
+
+ #define BuildFonts NO
+ #define BuildFontServer NO
+ #define BuildPexExt NO
+ #define BuildXIE NO
+
+ #define BuildLBX NO /* needs writev! */
+ #define BuildXprint NO
+
+ #define BuildServer NO
+ #define BuildFontServer NO
+ #define BuildFonts NO
+ #define BuildPhigs NO
+ #define BuildXKBlib NO
+
+ #define UseInternalMalloc YES
+ #define StripInstalledPrograms NO
+
+ #define ConnectionFlags -DTCPCONN
+
+ OTOP = OskitTop
+
+
+ /* XXX Need to figure out how to determine if we're ELF or not... */
+ #ifdef ElfOskit
+ #define StandardDefines -DX_LOCALE -D__ELF__
+ #else
+ #define StandardDefines -DX_LOCALE
+ #endif
+ #define StandardCppDefines StandardDefines
+ #define DefaultCDebugFlags
+ #define DefaultGcc2i386Opt -O
+
+
+ /* These would be `Standard', but the cross build stuff dosen't work very
+ * well. =(
+ */
+ #define OskitIncludes -I$(OTOP)/include \
+ -I$(OTOP)/include/oskit/freebsd
+ #define OskitDefines -DOSKIT OskitUndefines StandardDefines
+
+
+ /* These would be `Extra', but the cross build stuff dosen't work very
+ * well. =(
+ */
+ #define OskitLibraries -loskit_x11client -loskit_startup -loskit_bootp -loskit_freebsd_net -loskit_linux_dev -loskit_dev -loskit_kern -loskit_freebsd_c -loskit_kern -loskit_dev -loskit_lmm -loskit_com -loskit_freebsd_c
+ #define OskitLoadFlags -L$(OTOP)/lib
+ #define MathLibrary -loskit_freebsd_m
+
+ #define BootstrapCFlags -DOSKIT -DCROSS_COMPILE
+
+ /*
+ * Use the cross compilation rules!
+ */
+ #define CrossCompiling YES
+
+
+
+ /*
+ * LinkRule - link a program
+ */
+ /* #ifndef LinkRule */
+ #define LinkRule(program,options,objects,libraries) \
+ $(LD) -Ttext 100000 -o program options $(OTOP)/lib/oskit/multiboot.o objects libraries OskitLibraries $(OTOP)/lib/oskit/crtn.o $(EXTRA_LOAD_FLAGS)
+ /* #endif /* LinkRule */
+
+ /*
+ * HostLinkRule - link a utility to be used on the build host
+ * (differs from LinkRule if cross compiling)
+ */
+ #ifndef HostLinkRule
+ #define HostLinkRule(program,options,objects,libraries) \
+ cc -o program options objects libraries $(EXTRA_HOST_LOAD_FLAGS)
+ #endif /* HostLinkRule */
+
+
+ /* ComplexHostProgramTarget - Compile a program such that we can run
+ * it on this host, i.e., don't use the default cross compiler.
+ */
+ #ifndef ComplexHostProgramTarget
+ #define ComplexHostProgramTarget(program) @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) -DHOSTRULE @@\
+ EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+ AllTarget(program) @@\
+ @@\
+ program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+ DependTarget() @@\
+ @@\
+ LintTarget() @@\
+ @@\
+ clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+ #endif /* ComplexHostProgramTarget */
+
+
+ #ifndef SimpleHostProgramTarget
+ #define SimpleHostProgramTarget(program) @@\
+ OBJS = program.o @@\
+ SRCS = program.c @@\
+ @@\
+ ComplexHostProgramTarget(program)
+ #endif /* SimpleHostProgramTarget */
+
+ /*
+ * NormalProgramTarget - generate rules to compile and link the indicated
+ * program; since it does not use any default object files, it may be used for
+ * multiple programs in the same Imakefile.
+ */
+ #ifndef NormalHostProgramTarget
+ #define NormalHostProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
+ ProgramTargetName(program): objects deplibs @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS) syslibs) @@\
+ @@\
+ clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+ #endif /* NormalHostProgramTarget */
+
+
+ #define GccUsesGas YES
+ #define HasSnprintf YES
+ #define AvoidNullMakeCommand YES
+ #define CompressAllFonts YES
+ #define NeedConstPrototypes YES
+ #define NeedFunctionPrototypes YES
+ #define NeedNestedPrototypes YES
+ #define NeedVarargsPrototypes YES
+ #define NeedWidePrototypes NO
+
+
+
+ #ifdef i386Architecture
+
+ #define XFree86ServerOSDefines -DDDXOSINIT -DDDXOSFATALERROR
+ #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+
+ #define XF86SVGAServer YES
+ #define XF86VGA16Server NO
+ #define XF86VGA16DualServer NO
+ #define XF86MonoServer NO
+ #define XF86MonoDualServer NO
+ #define XF86S3Server YES
+ #define XF86S3VServer NO
+ #define XF86I8514Server NO
+ #define XF86Mach8Server NO
+ #define XF86Mach32Server NO
+ #define XF86Mach64Server YES
+ #define XF86P9000Server NO
+ #define XF86AGXServer NO
+ #define XF86W32Server NO
+ #define XF86I128Server NO
+
+ #include <xfree86.cf>
+ #endif
diff -crP xc.orig/config/cf/site.def xc/config/cf/site.def
*** xc.orig/config/cf/site.def Tue Jul 15 16:05:21 1997
--- xc/config/cf/site.def Fri Mar 13 15:19:48 1998
***************
*** 60,66 ****
--- 60,68 ----
#ifdef AfterVendorCF
+ #ifndef ProjectRoot
#define ProjectRoot /usr/X11R6.3
+ #endif
/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */
/* #define HasXdmAuth YES */
diff -crP xc.orig/config/imake/imakemdep.h xc/config/imake/imakemdep.h
*** xc.orig/config/imake/imakemdep.h Tue Jul 15 16:05:57 1997
--- xc/config/imake/imakemdep.h Fri Mar 13 15:19:48 1998
***************
*** 528,533 ****
--- 528,542 ----
"-traditional",
"-Demxos2",
#endif
+ #ifdef OSKIT
+ "-DOSKIT",
+ # ifdef CROSS_COMPILE
+ "-DCROSS_COMPILE",
+ # endif
+ # ifdef __i386__
+ "-D__i386__",
+ # endif
+ #endif
};
diff -crP xc.orig/config/util/Imakefile xc/config/util/Imakefile
*** xc.orig/config/util/Imakefile Wed Nov 13 12:47:17 1996
--- xc/config/util/Imakefile Fri Mar 13 15:19:48 1998
***************
*** 47,53 ****
--- 47,57 ----
SimpleProgramTarget(mkdirhier)
#endif
+ #if CrossCompiling
+ NormalHostProgramTarget(makestrs,makestrs.o,,,)
+ #else
NormalProgramTarget(makestrs,makestrs.o,,,)
+ #endif
InstallNamedProg(xmkmf,xmkmf,$(BINDIR))
InstallManPage(xmkmf,$(MANDIR))
diff -crP xc.orig/include/Xos.h xc/include/Xos.h
*** xc.orig/include/Xos.h Fri Nov 15 14:05:15 1996
--- xc/include/Xos.h Fri Mar 13 15:19:48 1998
***************
*** 203,208 ****
--- 203,220 ----
#endif /* SYSV */
+ #if defined(OSKIT) && !defined(HOSTRULE)
+
+ /* XXX Blatant but harmless lies. */
+ #ifndef OPEN_MAX
+ #define OPEN_MAX 256
+ #endif
+
+ #ifndef PATH_MAX
+ #define PATH_MAX 512
+ #endif
+ #endif /* OSKIT */
+
/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
#if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
diff -crP xc.orig/lib/FS/FSlibos.h xc/lib/FS/FSlibos.h
*** xc.orig/lib/FS/FSlibos.h Wed Nov 13 12:47:40 1996
--- xc/lib/FS/FSlibos.h Fri Mar 13 15:19:48 1998
***************
*** 77,83 ****
#endif
#endif
#ifndef OPEN_MAX
! #ifdef SVR4
#define OPEN_MAX 256
#else
#include <sys/param.h>
--- 77,83 ----
#endif
#endif
#ifndef OPEN_MAX
! #if defined(SVR4) || defined(OSKIT)
#define OPEN_MAX 256
#else
#include <sys/param.h>
diff -crP xc.orig/lib/X11/GetDflt.c xc/lib/X11/GetDflt.c
*** xc.orig/lib/X11/GetDflt.c Tue Jul 15 16:05:59 1997
--- xc/lib/X11/GetDflt.c Fri Mar 13 15:19:48 1998
***************
*** 62,68 ****
#endif
#endif
#ifndef PATH_MAX
! #ifdef WIN32
#define PATH_MAX 512
#else
#include <sys/param.h>
--- 62,68 ----
#endif
#endif
#ifndef PATH_MAX
! #if defined(WIN32) || defined(OSKIT)
#define PATH_MAX 512
#else
#include <sys/param.h>
***************
*** 79,85 ****
#ifdef XTHREADS
#include <X11/Xthreads.h>
#endif
! #ifndef WIN32
#define X_INCLUDE_PWD_H
#define XOS_USE_XLIB_LOCKING
#include <X11/Xos_r.h>
--- 79,85 ----
#ifdef XTHREADS
#include <X11/Xthreads.h>
#endif
! #if !defined(WIN32) && !defined(OSKIT)
#define X_INCLUDE_PWD_H
#define XOS_USE_XLIB_LOCKING
#include <X11/Xos_r.h>
***************
*** 96,102 ****
char *dest;
int len;
{
! #ifdef WIN32
register char *ptr;
char* users = "/users/";
--- 96,102 ----
char *dest;
int len;
{
! #if defined(WIN32) || defined(OSKIT)
register char *ptr;
char* users = "/users/";
diff -crP xc.orig/lib/X11/XKBGAlloc.c xc/lib/X11/XKBGAlloc.c
*** xc.orig/lib/X11/XKBGAlloc.c Fri Feb 2 12:39:49 1996
--- xc/lib/X11/XKBGAlloc.c Fri Mar 13 15:19:48 1998
***************
*** 48,54 ****
#endif /* XKB_IN_SERVER */
! #ifdef X_NOT_POSIX
#define Size_t unsigned int
#else
#define Size_t size_t
--- 48,54 ----
#endif /* XKB_IN_SERVER */
! #if defined(X_NOT_POSIX) || defined(OSKIT)
#define Size_t unsigned int
#else
#define Size_t size_t
diff -crP xc.orig/lib/X11/imConv.c xc/lib/X11/imConv.c
*** xc.orig/lib/X11/imConv.c Tue Jul 15 16:06:02 1997
--- xc/lib/X11/imConv.c Fri Mar 13 15:21:09 1998
***************
*** 39,44 ****
--- 39,50 ----
#include "Ximint.h"
#include "XlcPubI.h"
+ #ifdef __STDC__
+ #define Const const
+ #else
+ #define Const /**/
+ #endif
+
#ifdef XKB
#include "XKBlib.h"
#define XLOOKUPSTRING lookup_string
diff -crP xc.orig/lib/Xmu/LocBitmap.c xc/lib/Xmu/LocBitmap.c
*** xc.orig/lib/Xmu/LocBitmap.c Sun Apr 17 18:16:10 1994
--- xc/lib/Xmu/LocBitmap.c Fri Mar 13 15:19:48 1998
***************
*** 47,53 ****
#endif
#endif /* X_NOT_POSIX */
#ifndef PATH_MAX
! #ifdef WIN32
#define PATH_MAX 512
#else
#include <sys/param.h>
--- 47,53 ----
#endif
#endif /* X_NOT_POSIX */
#ifndef PATH_MAX
! #if defined(WIN32) || defined(OSKIT)
#define PATH_MAX 512
#else
#include <sys/param.h>
diff -crP xc.orig/lib/Xmu/StrToCurs.c xc/lib/Xmu/StrToCurs.c
*** xc.orig/lib/Xmu/StrToCurs.c Sun Apr 17 18:16:17 1994
--- xc/lib/Xmu/StrToCurs.c Fri Mar 13 15:19:48 1998
***************
*** 66,72 ****
#endif
#endif /* X_NOT_POSIX */
#ifndef PATH_MAX
! #ifdef WIN32
#define PATH_MAX 512
#else
#include <sys/param.h>
--- 66,72 ----
#endif
#endif /* X_NOT_POSIX */
#ifndef PATH_MAX
! #if defined(WIN32) || defined(OSKIT)
#define PATH_MAX 512
#else
#include <sys/param.h>
diff -crP xc.orig/lib/Xp/XpJob.c xc/lib/Xp/XpJob.c
*** xc.orig/lib/Xp/XpJob.c Wed Dec 4 08:27:29 1996
--- xc/lib/Xp/XpJob.c Fri Mar 13 15:19:48 1998
***************
*** 40,46 ****
#include "X11/Xos.h"
#include "extutil.h"
#include <limits.h>
! #ifndef WIN32
#define X_INCLUDE_PWD_H
#define XOS_USE_XLIB_LOCKING
#include <X11/Xos_r.h>
--- 40,46 ----
#include "X11/Xos.h"
#include "extutil.h"
#include <limits.h>
! #if !defined(WIN32) && !defined(OSKIT)
#define X_INCLUDE_PWD_H
#define XOS_USE_XLIB_LOCKING
#include <X11/Xos_r.h>
***************
*** 95,101 ****
{
char *joa; /* job owner attribute */
char *PwName;
! #ifndef WIN32
_Xgetpwparams pwparams;
struct passwd *pw;
pw = _XGetpwuid(getuid(),pwparams);
--- 95,101 ----
{
char *joa; /* job owner attribute */
char *PwName;
! #if !defined(WIN32) && !defined(OSKIT)
_Xgetpwparams pwparams;
struct passwd *pw;
pw = _XGetpwuid(getuid(),pwparams);
diff -crP xc.orig/lib/Xt/Initialize.c xc/lib/Xt/Initialize.c
*** xc.orig/lib/Xt/Initialize.c Tue Jul 15 16:06:11 1997
--- xc/lib/Xt/Initialize.c Fri Mar 13 15:19:48 1998
***************
*** 71,77 ****
#ifdef XTHREADS
#include <X11/Xthreads.h>
#endif
! #ifndef WIN32
#define X_INCLUDE_PWD_H
#define XOS_USE_XT_LOCKING
#include <X11/Xos_r.h>
--- 71,77 ----
#ifdef XTHREADS
#include <X11/Xthreads.h>
#endif
! #if !defined(WIN32) && !defined(OSKIT)
#define X_INCLUDE_PWD_H
#define XOS_USE_XT_LOCKING
#include <X11/Xos_r.h>
***************
*** 234,239 ****
--- 234,248 ----
dest[len-1] = '\0';
} else
*dest = '\0';
+ #elif defined(OSKIT)
+ String ptr = NULL;
+
+ if ((ptr = getenv("USER"))) {
+ (void) strncpy (dest, ptr, len);
+ dest[len-1] = '\0';
+ } else {
+ (void) strcpy (dest, "OskitUser");
+ }
#else
_Xgetpwparams pwparams;
struct passwd *pw;
***************
*** 257,263 ****
String dest;
int len;
{
! #ifdef WIN32
register char *ptr;
if (ptr = getenv("HOME")) {
--- 266,272 ----
String dest;
int len;
{
! #if defined(WIN32) || defined(OSKIT)
register char *ptr;
if (ptr = getenv("HOME")) {
diff -crP xc.orig/lib/font/util/fontxlfd.c xc/lib/font/util/fontxlfd.c
*** xc.orig/lib/font/util/fontxlfd.c Sat Sep 28 14:57:47 1996
--- xc/lib/font/util/fontxlfd.c Fri Mar 13 15:19:48 1998
***************
*** 42,48 ****
#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
#endif
! #if defined(X_NOT_STDC_ENV) || (defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV))
#define NO_LOCALE
#endif
#ifndef NO_LOCALE
--- 42,48 ----
#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
#endif
! #if defined(X_NOT_STDC_ENV) || (defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV)) || defined(OSKIT)
#define NO_LOCALE
#endif
#ifndef NO_LOCALE
diff -crP xc.orig/lib/lbxutil/lbx_zlib/lbx_zlib.c xc/lib/lbxutil/lbx_zlib/lbx_zlib.c
*** xc.orig/lib/lbxutil/lbx_zlib/lbx_zlib.c Sun Dec 8 12:39:02 1996
--- xc/lib/lbxutil/lbx_zlib/lbx_zlib.c Fri Mar 13 15:19:48 1998
***************
*** 65,71 ****
#endif
#include "lbxzlib.h"
#include <sys/types.h>
! #ifndef WIN32
#include <sys/param.h>
#endif
#include "lbxbufstr.h"
--- 65,71 ----
#endif
#include "lbxzlib.h"
#include <sys/types.h>
! #if !defined(WIN32) && !defined(OSKIT)
#include <sys/param.h>
#endif
#include "lbxbufstr.h"
diff -crP xc.orig/lib/lbxutil/lbx_zlib/lbx_zlib_io.c xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c
*** xc.orig/lib/lbxutil/lbx_zlib/lbx_zlib_io.c Wed Nov 13 12:49:15 1996
--- xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c Fri Mar 13 15:19:48 1998
***************
*** 32,38 ****
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif
! #ifndef WIN32
#include <sys/param.h>
#endif
#include "lbxbufstr.h"
--- 32,38 ----
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif
! #if !defined(WIN32) && !defined(OSKIT)
#include <sys/param.h>
#endif
#include "lbxbufstr.h"
diff -crP xc.orig/programs/Imakefile xc/programs/Imakefile
*** xc.orig/programs/Imakefile Wed Dec 18 14:31:52 1996
--- xc/programs/Imakefile Fri Mar 13 15:19:48 1998
***************
*** 38,43 ****
--- 38,46 ----
SCRIPTSDIR = scripts
#endif
+ #ifdef OSKitArchitecture
+ SUBDIRS = bitmap oclock
+ #else
SUBDIRS = \
appres bdftopcf bitmap editres fsinfo fslsfonts fstobdf \
iceauth mkfontdir oclock $(PROXYMGRSRCDIR) \
***************
*** 49,54 ****
--- 52,58 ----
xrdb xrefresh $(XRXSRCDIR) xset xsetroot $(XSMSRCDIR) xstdcmap \
$(XTERMSRCDIR) xwd xwininfo xwud $(XSSRCDIR) $(XASSRCDIR) \
$(LBXPROXYSRCDIR) $(SCRIPTSDIR)
+ #endif
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
diff -crP xc.orig/programs/bitmap/BitEdit.c xc/programs/bitmap/BitEdit.c
*** xc.orig/programs/bitmap/BitEdit.c Sun Apr 17 18:23:37 1994
--- xc/programs/bitmap/BitEdit.c Fri Mar 13 15:19:48 1998
***************
*** 52,57 ****
--- 52,65 ----
#include <X11/bitmaps/xlogo16>
+ #ifdef OSKIT
+ #include <oskit/dev/dev.h>
+ #include <oskit/dev/linux.h>
+ #include <oskit/dev/freebsd.h>
+ #include <oskit/net/freebsd.h>
+ #include <oskit/c/fd.h>
+ #endif
+
static char *usage = "[-options ...] filename\n\
\n\
where options include all standard toolkit options plus:\n\
***************
*** 810,815 ****
--- 818,824 ----
}
}
BWGetFilepath(bitmap_widget, &filename);
+
RetryLoad:
if (PopupDialog(input_dialog, "Load file:",
filename, &filename, XtGrabExclusive) == Okay) {
***************
*** 982,995 ****
--- 991,1016 ----
Arg wargs[2];
Widget w;
Widget radio_group; XtPointer radio_data;
+
+ #ifdef OSKIT
+ fd_set_console();
+ fs_mount("/", (oskit_file_t *)oskit_bmod_init());
+ oskit_linux_init_ethernet_tulip();
+ oskit_dev_probe();
+ oskit_dump_devices();
+ start_network();
+ start_clock();
+ #endif
top_widget = XtInitialize(NULL, "Bitmap",
options, XtNumber(options), &argc, argv);
+ #ifndef OSKIT
if (argc > 2) {
fprintf(stderr, usage);
exit (0);
}
+ #endif
check_mark = XCreateBitmapFromData(XtDisplay(top_widget),
RootWindowOfScreen(XtScreen(top_widget)),
***************
*** 997,1003 ****
--- 1018,1026 ----
xlogo16_width,
xlogo16_height);
+
XtAddActions(actions_table, XtNumber(actions_table));
+
XtOverrideTranslations
(top_widget,
XtParseTranslationTable("<Message>WM_PROTOCOLS: do-quit()"));
***************
*** 1011,1021 ****
fileMenu_widget = XtCreatePopupShell("fileMenu",
simpleMenuWidgetClass,
formy_widget, NULL, 0);
!
fileButton_widget = XtCreateManagedWidget("fileButton",
menuButtonWidgetClass,
formy_widget, NULL, 0);
for (i = 0; i < XtNumber(file_menu); i++) {
w = XtCreateManagedWidget(file_menu[i].name,
(file_menu[i].trap ?
smeBSBObjectClass : smeLineObjectClass),
--- 1034,1045 ----
fileMenu_widget = XtCreatePopupShell("fileMenu",
simpleMenuWidgetClass,
formy_widget, NULL, 0);
!
fileButton_widget = XtCreateManagedWidget("fileButton",
menuButtonWidgetClass,
formy_widget, NULL, 0);
for (i = 0; i < XtNumber(file_menu); i++) {
+
w = XtCreateManagedWidget(file_menu[i].name,
(file_menu[i].trap ?
smeBSBObjectClass : smeLineObjectClass),
***************
*** 1027,1033 ****
file_menu[i].widget = w;
}
!
editMenu_widget = XtCreatePopupShell("editMenu",
simpleMenuWidgetClass,
formy_widget, NULL, 0);
--- 1051,1057 ----
file_menu[i].widget = w;
}
!
editMenu_widget = XtCreatePopupShell("editMenu",
simpleMenuWidgetClass,
formy_widget, NULL, 0);
***************
*** 1055,1060 ****
--- 1079,1086 ----
pane_widget = XtCreateManagedWidget("pane", panedWidgetClass,
parent_widget, NULL, 0);
+
+
form_widget = XtCreateManagedWidget("form", formWidgetClass,
pane_widget, NULL, 0);
***************
*** 1106,1112 ****
XtSetArg(wargs[n], XtNbitmap, BWGetUnzoomedPixmap(bitmap_widget)); n++;
XtSetValues(normal_image_widget, wargs, n);
XtSetValues(inverted_image_widget, wargs, n);
!
XtRealizeWidget(image_shell);
BWNotify(bitmap_widget, FixUp);
--- 1132,1138 ----
XtSetArg(wargs[n], XtNbitmap, BWGetUnzoomedPixmap(bitmap_widget)); n++;
XtSetValues(normal_image_widget, wargs, n);
XtSetValues(inverted_image_widget, wargs, n);
!
XtRealizeWidget(image_shell);
BWNotify(bitmap_widget, FixUp);
***************
*** 1122,1124 ****
--- 1148,1151 ----
XtMainLoop();
}
+
diff -crP xc.orig/programs/oclock/oclock.c xc/programs/oclock/oclock.c
*** xc.orig/programs/oclock/oclock.c Sun Jan 14 14:51:06 1996
--- xc/programs/oclock/oclock.c Fri Mar 13 15:19:48 1998
***************
*** 40,45 ****
--- 40,54 ----
#include "oclock.bit"
#include "oclmask.bit"
+ #ifdef OSKIT
+ #include <oskit/dev/dev.h>
+ #include <oskit/dev/linux.h>
+ #include <oskit/dev/freebsd.h>
+ #include <oskit/net/freebsd.h>
+ #include <oskit/c/fd.h>
+ #endif
+
+
extern void exit();
static void quit();
***************
*** 107,117 ****
Widget clock;
Arg arg[2];
int i;
!
toplevel = XtOpenApplication(&xtcontext, "Clock",
options, XtNumber(options), &argc, argv, NULL,
sessionShellWidgetClass, NULL, 0);
if (argc != 1) usage();
XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
XtAddCallback(toplevel, XtNdieCallback, die, NULL);
--- 116,138 ----
Widget clock;
Arg arg[2];
int i;
!
! #ifdef OSKIT
! fd_set_console();
! fs_mount("/", (oskit_file_t *)oskit_bmod_init());
! oskit_linux_init_ethernet_tulip();
! oskit_dev_probe();
! oskit_dump_devices();
! start_network();
! start_clock();
! #endif
!
toplevel = XtOpenApplication(&xtcontext, "Clock",
options, XtNumber(options), &argc, argv, NULL,
sessionShellWidgetClass, NULL, 0);
+ #ifndef OSKIT
if (argc != 1) usage();
+ #endif
XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
XtAddCallback(toplevel, XtNdieCallback, die, NULL);
diff -crP xc.orig/programs/xlogo/xlogo.c xc/programs/xlogo/xlogo.c
*** xc.orig/programs/xlogo/xlogo.c Sun Jan 14 14:52:36 1996
--- xc/programs/xlogo/xlogo.c Fri Mar 13 15:19:48 1998
***************
*** 34,39 ****
--- 34,47 ----
#include <X11/extensions/XKBbells.h>
#endif
+ #ifdef OSKIT
+ #include <oskit/fdev/fdev.h>
+ #include <oskit/fdev/linux.h>
+ #include <oskit/fdev/freebsd.h>
+ #include <oskit/net/freebsd.h>
+ #include <oskit/c/fd.h>
+ #endif
+
extern void exit();
static void quit();
***************
*** 107,118 ****
--- 115,137 ----
Widget toplevel;
XtAppContext app_con;
+ #ifdef OSKIT
+ fd_set_console();
+ fdev_linux_init_ethernet_tulip();
+ fdev_probe();
+ fdev_dump_devices();
+ start_network();
+ start_clock();
+ #endif
+
toplevel = XtOpenApplication(&app_con, "XLogo",
options, XtNumber(options),
&argc, argv, fallback_resources,
sessionShellWidgetClass, NULL, ZERO);
+ #if 0
if (argc != 1)
Syntax(toplevel, argv[0]);
+ #endif
XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
XtAddCallback(toplevel, XtNdieCallback, die, NULL);
***************
*** 126,131 ****
--- 145,151 ----
False);
(void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
&wm_delete_window, 1);
+
XtAppMainLoop(app_con);
}