From 5d893be6e5c61765aa90a9af9f4b5fdc9e97a9e7 Mon Sep 17 00:00:00 2001 From: bostic Date: Wed, 11 Dec 1996 20:56:42 +0000 Subject: [PATCH] break Motif code up into motif and motif_l --- ipc/ip_run.c | 11 ++++++----- ipc/ip_send.c | 4 ++-- ipc/ip_trans.c | 4 ++-- motif/m_cde.c | 10 ++++++---- motif/m_main.c | 33 +++++++++++---------------------- 5 files changed, 27 insertions(+), 35 deletions(-) diff --git a/ipc/ip_run.c b/ipc/ip_run.c index 03a1999e..19f028b5 100644 --- a/ipc/ip_run.c +++ b/ipc/ip_run.c @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: ip_run.c,v 8.6 1996/12/11 15:46:04 bostic Exp $ (Berkeley) $Date: 1996/12/11 15:46:04 $"; +static const char sccsid[] = "$Id: ip_run.c,v 8.7 1996/12/11 20:57:03 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:57:03 $"; #endif /* not lint */ #include @@ -26,7 +26,7 @@ static const char sccsid[] = "$Id: ip_run.c,v 8.6 1996/12/11 15:46:04 bostic Exp #include #include "../common/common.h" -#include "../ip_vi/ip.h" +#include "../ip/ip.h" #include "ipc_extern.h" #include "pathnames.h" @@ -36,7 +36,8 @@ static void fatal __P((void)); static void attach __P((void)); #endif -char *vi_progname = "vi"; /* Default program name. */ +int vi_ofd = -1; /* Global: output fd. */ +char *vi_progname = "vi"; /* Global: program name. */ /* * vi_run -- @@ -138,8 +139,8 @@ vi_run(argc, argv, ip, op, pidp) * (debugging) nvi, run it, otherwise run the user's path, * if specified, else run the compiled in path. */ - if (!pflag && stat("nvi", &sb) == 0) - execv("nvi", argv); + if (!pflag && stat("vi", &sb) == 0) + execv("vi", argv); execv(execp, argv); (void)fprintf(stderr, "%s: %s %s\n", vi_progname, execp, strerror(errno)); diff --git a/ipc/ip_send.c b/ipc/ip_send.c index 29bac5d9..77e8b4a0 100644 --- a/ipc/ip_send.c +++ b/ipc/ip_send.c @@ -8,7 +8,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: ip_send.c,v 8.3 1996/12/10 21:03:45 bostic Exp $ (Berkeley) $Date: 1996/12/10 21:03:45 $"; +static const char sccsid[] = "$Id: ip_send.c,v 8.4 1996/12/11 20:57:03 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:57:03 $"; #endif /* not lint */ #include @@ -21,7 +21,7 @@ static const char sccsid[] = "$Id: ip_send.c,v 8.3 1996/12/10 21:03:45 bostic Ex #include #include "../common/common.h" -#include "../ip_vi/ip.h" +#include "../ip/ip.h" #include "ipc_extern.h" extern int vi_ofd; /* Output file descriptor. */ diff --git a/ipc/ip_trans.c b/ipc/ip_trans.c index 3846d3cf..e91451bb 100644 --- a/ipc/ip_trans.c +++ b/ipc/ip_trans.c @@ -8,7 +8,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: ip_trans.c,v 8.9 1996/12/10 21:03:56 bostic Exp $ (Berkeley) $Date: 1996/12/10 21:03:56 $"; +static const char sccsid[] = "$Id: ip_trans.c,v 8.10 1996/12/11 20:57:03 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:57:03 $"; #endif /* not lint */ #include @@ -25,7 +25,7 @@ static const char sccsid[] = "$Id: ip_trans.c,v 8.9 1996/12/10 21:03:56 bostic E #endif #include "../common/common.h" -#include "../ip_vi/ip.h" +#include "../ip/ip.h" #include "ipc_extern.h" /* diff --git a/motif/m_cde.c b/motif/m_cde.c index 8e7408bb..d5e248c4 100644 --- a/motif/m_cde.c +++ b/motif/m_cde.c @@ -10,13 +10,15 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: m_cde.c,v 8.7 1996/12/11 13:34:47 bostic Exp $ (Berkeley) $Date: 1996/12/11 13:34:47 $"; +static const char sccsid[] = "$Id: m_cde.c,v 8.8 1996/12/11 20:56:42 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:56:42 $"; #endif /* not lint */ #include #include #include +#include "extern.h" + #if SelfTest #define _TRACE( x ) printf x #else @@ -38,16 +40,16 @@ static struct { }; /* - * __vi_is_cde -- + * is_cde -- * * When running under CDE (or VUE on HPUX) applications should not define * fallback colors (or fonts). The only way to tell is to check the atoms * attached to the server. This routine does that. * - * PUBLIC: int __vi_is_cde __P((Display *)); + * PUBLIC: int is_cde __P((Display *)); */ int -__vi_is_cde(d) +is_cde(d) Display *d; { int i, r, format; diff --git a/motif/m_main.c b/motif/m_main.c index 64eee04a..181a9345 100644 --- a/motif/m_main.c +++ b/motif/m_main.c @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: m_main.c,v 8.25 1996/12/11 15:04:38 bostic Exp $ (Berkeley) $Date: 1996/12/11 15:04:38 $"; +static const char sccsid[] = "$Id: m_main.c,v 8.26 1996/12/11 20:56:43 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:56:43 $"; #endif /* not lint */ #include @@ -20,25 +20,19 @@ static const char sccsid[] = "$Id: m_main.c,v 8.25 1996/12/11 15:04:38 bostic Ex #include #include -#include -#include -#include #include -#include #include -#include -#include -#include "../common/common.h" -#include "../ip_vi/ip.h" -#include "ipc_motif.h" -#include "ipc_mutil.h" -#include "ipc_mextern.h" -#include "pathnames.h" +#include "../motif_l/vi_mextern.h" +#include "extern.h" -#include "nvi.xbm" /* Icon bitmap. */ +#if XtSpecificationRelease == 4 +#define ArgcType Cardinal * +#else +#define ArgcType int * +#endif -int vi_ofd; /* GLOBAL: known to vi_pipe_input_func(). */ +#include "nvi.xbm" /* Icon bitmap. */ static pid_t pid; static Pixel icon_fg, @@ -90,11 +84,6 @@ String fallback_rsrcs[] = { "?Preferences*options.background: gray90", }; -static XutResource resource[] = { - { "iconForeground", XutRKpixel, &icon_fg }, - { "iconBackground", XutRKpixel, &icon_bg }, -}; - #if defined(__STDC__) static String *get_fallback_rsrcs( String name ) #else @@ -108,7 +97,7 @@ static String *get_fallback_rsrcs( name ) /* connect to server and see if the CDE atoms are present */ d = XOpenDisplay(0); - running_cde = __vi_is_cde( d ); + running_cde = is_cde( d ); XCloseDisplay(d); for ( i=0; i