--- mgdiff-1.0.orig/Imakefile +++ mgdiff-1.0/Imakefile @@ -8,7 +8,8 @@ XCOMM XCOMM for Dell SVR4 XCOMM -EXTRA_LIBRARIES = -lc -lucb +#EXTRA_LIBRARIES = -lc -lucb +EXTRA_DEFINES = -Wall -Wstrict-prototypes -Wmissing-prototypes SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o --- mgdiff-1.0.orig/Makefile +++ mgdiff-1.0/Makefile @@ -0,0 +1,1631 @@ +# Makefile generated by imake - do not edit! + +# ---------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and +# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ +# $XdotOrg: xc/config/cf/Imake.tmpl,v 1.9 2005/01/24 06:37:31 daniels Exp $ +# +# +# +# +# $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $ +# ---------------------------------------------------------------------- + +all:: + +.SUFFIXES: .i + +# $XdotOrg: xc/config/cf/Imake.cf,v 1.7 2005/03/02 11:20:29 gisburn Exp $ +# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $ + +# $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $ + +# ----------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ + +# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ + +# $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ + +# ---------------------------------------------------------------------- +# platform-specific configuration parameters - edit linux.cf to change + +# $XdotOrg: xc/config/cf/linux.cf,v 1.24 2005/03/06 01:05:00 branden Exp $ +# platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ + +# platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $ + +# operating system: Linux 4.4.0-x32 x86_64 [ELF] (4.4.0) +# libc: (6.21.0) +# binutils: (225) + +# $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ +# $XFree86: xc/config/cf/lnxLib.rules,v 3.52 2003/10/31 20:49:03 herrb Exp $ + +# $XdotOrg: xc/config/cf/xorg.cf,v 1.44 2005/01/27 03:50:46 ajax Exp $ + +# $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $ + +XORG_VERSION_CURRENT = (((7) * 10000000) + ((7) * 100000) + ((0) * 1000) + 0) +RELEASE_VERSION = RELEASE-1 + +AFB_DEFS = -DUSE_AFB + +DRIVERSDKDIR = $(USRLIBDIR)/Server +DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules +DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include + + XF86SRC = $(SERVERSRC)/hw/xfree86 + XF86COMSRC = $(XF86SRC)/common + XF86PARSERSRC = $(XF86SRC)/parser + XF86OSSRC = $(XF86SRC)/os-support + XF86DRIVERSRC = $(XF86SRC)/drivers + DRIVERSRC = $(XF86DRIVERSRC) + + XFREE86DOCDIR = $(DOCDIR) + XFREE86PSDOCDIR = $(DOCPSDIR) + XFREE86PDFDOCDIR = $(DOCPDFDIR) + XFREE86HTMLDOCDIR = $(DOCHTMLDIR) +XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese + +# $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ + +# $XFree86: xc/config/cf/xf86.rules,v 3.34tsi Exp $ + + SELINUX_LDFLAGS = + + SELINUX_INCLUDES = -I/usr/include/selinux + + SELINUX_CFLAGS = -DHAVE_SELINUX + + SELINUX_LIBS = -lselinux + +# ---------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ + +# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ + +# --------------------------------------------------------------------- +# Imake rules for building libraries, programs, scripts, and data files +# rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ +# rules: $XdotOrg: xc/config/cf/Imake.rules,v 1.8 2005/02/01 22:27:00 ajax Exp $ +# +# +# +# +# rules: $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $ + +.PHONY: all interfaces install install.man install.lib install.sdk depend includes cleandir + + _NULLCMD_ = @ echo -n + +X_BYTE_ORDER = X_LITTLE_ENDIAN + +GLIDE2INCDIR = + +GLIDE3INCDIR = /usr/include/glide3 + +GLIDE3LIBNAME = glide3 + +TKLIBNAME = tk8.4 + +TKLIBDIR = /usr/lib + +TCLLIBNAME = tcl8.4 + +TCLIBDIR = /usr/lib + + PATHSEP = / + SHELL = /bin/sh -e + + TOP = . + CURRENT_DIR = . + + IMAKE = imake + DEPEND = gccmakedep + MKDIRHIER = mkdir -p + REVPATH = revpath + EXPORTLISTGEN = + RMAN = /usr/bin/rman + RMANBASENAME = rman + RMANOPTIONS = + CONFIGSRC = $(TOP)/config + IMAKESRC = $(CONFIGSRC)/imake + DEPENDSRC = $(CONFIGSRC)/util + + INCROOT = /usr/include + USRLIBDIR = /usr/lib + VARDIR = /var + VARLIBDIR = $(VARDIR)/lib + SYSTEMUSRLIBDIR = /usr/lib + SYSTEMUSRINCDIR = /usr/include + SHLIBDIR = /usr/lib + LINTLIBDIR = $(USRLIBDIR)/lint + MANPATH = /usr/share/man + MANSOURCEPATH = $(MANPATH)/man + MANDIR = $(MANSOURCEPATH)$(MANSECT) + SYSCALLMANDIR = $(MANSOURCEPATH)$(SYSCALLMANSECT) + LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSECT) + DRIVERMANDIR = $(MANSOURCEPATH)4 + FILEMANDIR = $(MANSOURCEPATH)$(FILEMANSECT) + GAMEMANDIR = $(MANSOURCEPATH)$(GAMEMANSECT) + MISCMANDIR = $(MANSOURCEPATH)7 + ADMMANDIR = $(MANSOURCEPATH)$(ADMMANSECT) + ICONDIR = "/usr/share/icons" + XCURSORPATH = "~/.icons:/usr/share/icons:/usr/share/pixmaps" + DRIVERMANDIR = $(MANSOURCEPATH)4 + LOGDIRECTORY = $(VARDIR)/log + + VARRUNDIR = $(VARDIR)/run + + VARDBDIR = $(VARDIR)/lib + + AR = ar clq + +# Nice try but useless: make will inherit BOOTSTRAPCFLAGS +# from top Makefile + BOOTSTRAPCFLAGS = + + CC = gcc + AS = gcc -c -x assembler + +.SUFFIXES: .cc + + CXX = c++ + + CXXFILT = c++filt + + CXXLIB = -lstdc++ + + CXXDEBUGFLAGS = -g -O2 -fno-strict-aliasing +CXXDEPENDINCLUDES = + CXXEXTRA_DEFINES = +CXXEXTRA_INCLUDES = + CXXSTD_DEFINES = -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(CXXPROJECT_DEFINES) + CXXOPTIONS = + CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) + CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES) + CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) + + COMPRESS = compress + GZIPCMD = gzip + + CPP = cpp $(STD_CPP_DEFINES) + RAWCPP = cpp -undef $(STD_CPP_OPTIONS) + PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) + + INSTALL = install + INSTALLFLAGS = -c + + LD = gcc -nostdlib + + LEX = flex -l + M4 = m4 + M4FLAGS = + LEXLIB = -lfl + YACC = bison -y + CCYACC = bison -y + + LINT = lint + + LINTLIBFLAG = -C + LINTOPTS = -axz + LN = ln -s + MAKE = make + MV = mv -f + CP = cp + + RANLIB = ranlib + + RANLIBINSTFLAGS = + + RM = rm -f + PERL = perl + PERLOPTS = + PERLENVSETUP = env LC_ALL=C + + MANSECT = 1 + SYSCALLMANSECT = 2 + LIBMANSECT = 3 + DRIVERMANSECT = 4 + FILEMANSECT = 5 + GAMEMANSECT = 6 + MISCMANSECT = 7 + ADMMANSECT = 8 + MANSRCSECT = s + MANNEWSECT = n + PROJECTMANSUFFIX = x + MANSUFFIX = $(MANSECT)$(PROJECTMANSUFFIX) + SYSCALLMANSUFFIX = $(SYSCALLMANSECT)$(PROJECTMANSUFFIX) + LIBMANSUFFIX = $(LIBMANSECT)$(PROJECTMANSUFFIX) + DRIVERMANSUFFIX = 4x + FILEMANSUFFIX = $(FILEMANSECT)$(PROJECTMANSUFFIX) + GAMEMANSUFFIX = $(GAMEMANSECT)$(PROJECTMANSUFFIX) + MISCMANSUFFIX = 7x + ADMMANSUFFIX = $(ADMMANSECT)$(PROJECTMANSUFFIX) + ADMINMANSUFFIX = 8 + MANSRCSUFFIX = man + MANNEWSUFFIX = _man + MANDEFS = -D__apploaddir__=$(XAPPLOADDIR) -D__filemansuffix__=$(FILEMANSECT)$(PROJECTMANSUFFIX) -D__osfilemansuffix__=$(FILEMANSECT) -D__libmansuffix__=$(LIBMANSECT)$(PROJECTMANSUFFIX) -D__oslibmansuffix__=$(LIBMANSECT) -D__mansuffix__=$(MANSECT)$(PROJECTMANSUFFIX) -D__osmansuffix__=$(MANSECT) -D__syscallmansuffix__=$(SYSCALLMANSECT)$(PROJECTMANSUFFIX) -D__ossysmansuffix__=$(SYSCALLMANSECT) -D__gamemansuffix__=$(GAMEMANSECT)$(PROJECTMANSUFFIX) -D__osgamemansuffix__=$(GAMEMANSECT) -D__miscmansuffix__=$(MISCMANSECT)$(PROJECTMANSUFFIX) -D__osmiscmansuffix__=$(MISCMANSECT) -D__admmansuffix__=$(ADMMANSECT)$(PROJECTMANSUFFIX) -D__osadmmansuffix__=$(ADMMANSECT) -D__miscmansuffix__=$(MISCMANSECT)$(PROJECTMANSUFFIX) -D__osmiscmansuffix__=$(MISCMANSECT) -D__drivermansuffix__=$(DRIVERMANSECT)$(PROJECTMANSUFFIX) -D__osdrivermansuffix__=$(DRIVERMANSECT) -D__adminmansuffix__=$(ADMINMANSUFFIX) -D__projectroot__=$(PROJECTROOT) -D__xconfigfile__=$(XCONFIGFILE) -D__xconfigdir__=$(XCONFIGDIR) -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) -D__appmansuffix__=$(MANSECT)$(PROJECTMANSUFFIX) $(XORGMANDEFS) $(VENDORMANDEFS) + + COMPRESSMANCMD = gzip -n + + TROFF = groff -Tps + NROFF = nroff + + MSMACROS = -ms + MANMACROS = -man + TBL = tbl + EQN = eqn + NEQN = neqn + COL = col + COLFLAGS = -b + + MODCC = gcc + + MODCPP = cpp + MODCFLAGS = $(CFLAGS) + MODAS = gcc -c -x assembler + MODASFLAGS = + + MODLD = gcc -nostdlib + + MODLDFLAGS = +MODLDCOMBINEFLAGS = -r + MODAR = ar clq + + MODRANLIB = ranlib + + DVIPS = dvips + LATEX = latex + + STD_INCLUDES = + STD_CPP_OPTIONS = -traditional + STD_CPP_DEFINES = -traditional -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) + STD_DEFINES = -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) + EXTRA_LOAD_FLAGS = + EXTRA_LDOPTIONS = + EXTRA_LIBRARIES = + TAGS = ctags + + PARALLELMFLAGS = + + SHAREDCODEDEF = + SHLIBDEF = + + SHLIBLDFLAGS = -shared $(SHLIBGLOBALSFLAGS) + + NOSTDLIB = -nostdlib + POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic + + PICFLAGS = -fPIC + + CXXPICFLAGS = -fPIC + + PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO + + INSTPGMFLAGS = + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4711 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4711 + + PROJECTROOT = /usr + + CDEBUGFLAGS = -g -O2 -fno-strict-aliasing + CCOPTIONS = + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) + LDPRELIB = $(INSTALLED_LIBS) + LDPOSTLIB = + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + + LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + CCLINK = $(CC) + + CXXLINK = $(CXX) + + LDSTRIPFLAGS = -x + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + DEPEND_DEFINES = + +# Not sure this belongs here + TKLIBDIR = /usr/lib + TKINCDIR = /usr/include + TKLIBNAME = tk8.4 + TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) + TCLLIBDIR = /usr/lib + TCLINCDIR = /usr/include + TCLLIBNAME = tcl8.4 + TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) + + MACROFILE = linux.cf + RM_CMD = $(RM) + + IMAKE_DEFINES = + IMAKE_WARNINGS = -Wundef + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) + +# $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ + +# $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ + +# ---------------------------------------------------------------------- +# X Window System Build Parameters and Rules +# $XdotOrg: xc/config/cf/X11.tmpl,v 1.52 2005/09/22 23:54:18 alanc Exp $ +# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $ + +XORGRELSTRING = `echo 7 7 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` + XORGMANNAME = X Version 11 + +STICKY_DEFINES = -DHAS_STICKY_DIR_BIT + +FCHOWN_DEFINES = -DHAS_FCHOWN + +# ----------------------------------------------------------------------- +# X Window System make variables; these need to be coordinated with rules + + XTOP = $(TOP) + BINDIR = /usr/bin + BUILDINCROOT = $(TOP)/exports + BUILDINCDIR = $(BUILDINCROOT)/include + BUILDINCTOP = ../.. + BUILDLIBDIR = $(TOP)/exports/lib + BUILDLIBTOP = ../.. + BUILDBINDIR = $(TOP)/exports/bin + BUILDBINTOP = ../.. + BUILDMODULEDIR = $(BUILDLIBDIR)/modules + BUILDI18NDIR = $(BUILDLIBDIR)/locale + BUILDMODULETOP = $(BUILDLIBTOP)/.. + XBUILDINCROOT = $(XTOP)/exports + XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 + XBUILDINCTOP = ../../.. + XBUILDBINDIR = $(XBUILDINCROOT)/bin + INCDIR = $(INCROOT) + ADMDIR = /usr/adm + LIBDIR = /usr/lib/X11 + SHAREDIR = /usr/share/X11 + LIBEXECDIR = /usr/libexec + MODULEDIR = $(USRLIBDIR)/modules + TOP_X_INCLUDES = + XBINDIR = $(PROJECTROOT)/bin + + INSTSRCDIR = /usr/src + + ETCX11DIR = /etc/X11 + + CONFDIR = $(ETCX11DIR) + + DOCDIR = $(LIBDIR)/doc + DOCHTMLDIR = $(DOCDIR)/html + DOCPSDIR = $(DOCDIR)/PostScript + DOCPDFDIR = $(DOCDIR)/PDF + FONTDIR = ${datarootdir}/fonts/X11 + FONTROOTDIR = ${datarootdir}/fonts/X11 + ENCODINGSDIR = ${FONTROOTDIR}/encodings + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + XDMVARDIR = $(VARLIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + XSMDIR = $(LIBDIR)/xsm + NLSDIR = $(LIBDIR)/nls + XLOCALEDIR = $(LIBDIR)/locale + LBXPROXYDIR = $(LIBDIR)/lbxproxy + PROXYMANAGERDIR = $(LIBDIR)/proxymngr + XPRINTDIR = $(LIBDIR)/xserver + XAPPLOADDIR = /etc/X11/app-defaults + FONTCFLAGS = -t + + INSTAPPFLAGS = $(INSTDATFLAGS) + + RGB = $(XBINDIR)/rgb + FONTC = $(XBINDIR)/bdftopcf + MKFONTSCALE = $(XBINDIR)/mkfontscale + MKFONTDIR = $(XBINDIR)/mkfontdir + MKHTMLINDEX = $(XBINDIR)/mkhtmlindex + UCS2ANY = $(XBINDIR)/ucs2any + BDFTRUNCATE = $(XBINDIR)/bdftruncate + UCSMAPPREFIX = $(FONTDIR)/util/map- + XCURSORGEN = $(XBINDIR)/xcursorgen + + HTMLINDEXCMD = HtmlIndexCmd + + DOCUTILSRC = $(XTOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + XDOCMACROS = $(DOCUTILSRC)/macros.t + XIDXMACROS = $(DOCUTILSRC)/indexmacros.t + PROGRAMSRC = $(TOP)/programs + LIBSRC = $(XTOP)/lib + FONTSRC = $(XTOP)/fonts + ENCODINGSSRC = $(FONTSRC)/encodings + INCLUDESRC = $(BUILDINCROOT)/include + XINCLUDESRC = $(INCLUDESRC)/X11 + SERVERSRC = $(XTOP)/programs/Xserver + CONTRIBSRC = $(XTOP)/../contrib + UNSUPPORTEDSRC = $(XTOP)/unsupported + DOCSRC = $(XTOP)/doc + RGBSRC = $(XTOP)/programs/rgb + BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf + MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir + FONTSERVERSRC = $(PROGRAMSRC)/xfs + FONTINCSRC = $(XTOP)/include/fonts + EXTINCSRC = $(XTOP)/include/extensions + FTSOURCEDIR = FreeTypeSrcDir + DRMSRCDIR = $(TOP)/extras/drm + MESASRCDIR = $(TOP)/extras/Mesa + OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample + PSWRAPSRC = $(XTOP)/config/pswrap + TRANSCOMMSRC = $(LIBSRC)/xtrans + TRANS_INCLUDES = -I$(TRANSCOMMSRC) + CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) -DIPv6 +XTRANS_FAILDEFINES = -DFAIL_HARD + + VENDORMANNAME = X.Org + VENDORMANVERSION = `echo 7 7 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` + XORGMANDEFS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" + VENDORMANDEFS = -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)" + VENDORNAME = The X.Org Foundation + VENDORNAMESHORT = X.Org + + VENDORWEBSUPPORT = http://wiki.X.Org + +VENDORSUPPORTDEFS = -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"' + + XKBDEFRULES = xorg + XKBDEFRULESDEFS = -D__XKBDEFRULES__='"$(XKBDEFRULES)"' + + XCONFIGFILE = xorg.conf + XCONFIGDIR = $(LIBDIR) + XLOGFILE = Xorg + XSERVERNAME = Xorg + + XENVLIBDIR = $(USRLIBDIR) + CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) XLOCALEDIR=$(BUILDLIBDIR)/locale + +# $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ +# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ + + XLIBSRC = $(LIBSRC)/X11 + +SOXLIBREV = 6.2 +DEPXONLYLIB = +XONLYLIB = -lX11 + +LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln + + DEPXLIBONLY = $(DEPXONLYLIB) + XLIBONLY = $(XONLYLIB) + LINTXONLYLIB = $(LINTXONLY) + + XEXTLIBSRC = $(LIBSRC)/Xext + +SOXEXTREV = 6.4 +DEPEXTENSIONLIB = +EXTENSIONLIB = -lXext + +LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln + +LINTEXTENSIONLIB = $(LINTEXTENSION) + DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) + XLIB = $(EXTENSIONLIB) $(XONLYLIB) + LINTXLIB = $(LINTXONLYLIB) + + XSSLIBSRC = $(LIBSRC)/Xss + +SOXSSREV = 1.0 +DEPXSSLIB = +XSSLIB = -lXss + +LINTXSS = $(LINTLIBDIR)/llib-lXss.ln + + XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc + +SOXXF86MISCREV = 1.1 +DEPXXF86MISCLIB = +XXF86MISCLIB = -lXxf86misc + +LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln + + XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm + +SOXXF86VMREV = 1.0 +DEPXXF86VMLIB = +XXF86VMLIB = -lXxf86vm + +LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln + + XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga + +SOXXF86DGAREV = 1.0 +DEPXXF86DGALIB = +XXF86DGALIB = -lXxf86dga + +LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln + + XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush + +SOXXF86RUSHREV = 1.0 +DEPXXF86RUSHLIB = +XXF86RUSHLIB = -lXxf86rush + +LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln + + XVLIBSRC = $(LIBSRC)/Xv + +SOXVREV = 1.0 +DEPXVLIB = +XVLIB = -lXv + +LINTXV = $(LINTLIBDIR)/llib-lXv.ln + + XVMCLIBSRC = $(LIBSRC)/XvMC + +SOXVMCREV = 1.0 +DEPXVMCLIB = +XVMCLIB = -lXvMC + +LINTXVMC = $(LINTLIBDIR)/llib-lXvMC.ln + + XINERAMALIBSRC = $(LIBSRC)/Xinerama + +SOXINERAMAREV = 1.0 +DEPXINERAMALIB = +XINERAMALIB = -lXinerama + +LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln + + XRESLIBSRC = $(LIBSRC)/XRes + +SOXRESREV = 1.0 +DEPXRESLIB = +XRESLIB = -lXRes + +LINTXRES = $(LINTLIBDIR)/llib-lXRes.ln + + DMXLIBSRC = $(LIBSRC)/dmx + +SODMXREV = 1.0 +DEPDMXLIB = +DMXLIB = -ldmx + +LINTDMX = $(LINTLIBDIR)/llib-ldmx.ln + + DPSLIBSRC = $(LIBSRC)/dps + +DEPDPSLIB = $(USRLIBDIR)/libdps.a +DPSLIB = -ldps + +LINTDPS = $(LINTLIBDIR)/llib-ldps.ln + + DPSTKLIBSRC = $(LIBSRC)/dpstk + +DEPDPSTKLIB = $(USRLIBDIR)/libdpstk.a +DPSTKLIB = -ldpstk + +LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln + + PSRESLIBSRC = $(LIBSRC)/psres + +DEPPSRESLIB = $(USRLIBDIR)/libpsres.a +PSRESLIB = -lpsres + +LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln + + GLULIBSRC = $(LIBSRC)/GLU + +SOGLUREV = 1.3 +DEPGLULIB = +GLULIB = -lGLU + +LINTGLU = $(LINTLIBDIR)/llib-lGLU.ln + + GLXLIBSRC = $(LIBSRC)/GL + +SOGLREV = 1.2 +DEPGLXLIB = +GLXLIB = -lGL + +LINTGLX = $(LINTLIBDIR)/llib-lGL.ln + + GLWIDGETSRC = $(LIBSRC)/GLw + +DEPGLWLIB = $(USRLIBDIR)/libGLw.a +GLWLIB = -lGLw + +LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln + +XRENDERDIR = /usr +XRENDERLIBDIR = /usr/lib +XRENDERINCDIR = /usr/include +XRENDERLIB = -L$(XRENDERLIBDIR) -lXrender +DEPXRENDERLIB = + +XRENDERINCLUDES = -I$(XRENDERINCDIR) + + XRANDRLIBSRC = $(LIBSRC)/Xrandr + +SOXRANDRREV = 2.0 +DEPXRANDRLIB = +XRANDRLIB = -lXrandr + +LINTXRANDR = $(LINTLIBDIR)/llib-lXrandr.ln + + XFIXESLIBSRC = $(LIBSRC)/Xfixes + +SOXFIXESREV = 3.0 +DEPXFIXESLIB = +XFIXESLIB = -lXfixes + +LINTXFIXES = $(LINTLIBDIR)/llib-lXfixes.ln + + XDAMAGELIBSRC = $(LIBSRC)/Xdamage + +SOXDAMAGEREV = 1.0 +DEPXDAMAGELIB = +XDAMAGELIB = -lXdamage + +LINTXDAMAGE = $(LINTLIBDIR)/llib-lXdamage.ln + +XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite + +SOXCOMPOSITEREV = 1.0 +DEPXCOMPOSITELIB = +XCOMPOSITELIB = -lXcomposite + +LINTXCOMPOSITE = $(LINTLIBDIR)/llib-lXcomposite.ln + +XEVIELIBSRC = $(LIBSRC)/Xevie + +SOXEVIEREV = 1.0 +DEPXEVIELIB = +XEVIELIB = -lXevie + +LINTXEVIE = $(LINTLIBDIR)/llib-lXevie.ln + +XCURSORDIR = /usr +XCURSORLIBDIR = /usr/lib +XCURSORINCDIR = /usr/include +XCURSORLIB = -L$(XCURSORLIBDIR) -lXcursor + +XCURSORINCLUDES=-I$(XCURSORINCDIR) $(XRENDERINCLUDES) + + APPLEWMLIBSRC = $(LIBSRC)/apple + +DEPAPPLEWMLIB = $(USRLIBDIR)/libAppleWM.a +APPLEWMLIB = -lAppleWM + +LINTAPPLEWM = $(LINTLIBDIR)/llib-lAppleWM.ln + + WINDOWSWMLIBSRC = $(LIBSRC)/windows + +DEPWINDOWSWMLIB = $(USRLIBDIR)/libWindowsWM.a +WINDOWSWMLIB = -lWindowsWM + +LINTWINDOWSWM = $(LINTLIBDIR)/llib-lWindowsWM.ln + + XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache + +DEPXFONTCACHELIB = $(USRLIBDIR)/libXfontcache.a +XFONTCACHELIB = -lXfontcache + +LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln + + XAUTHSRC = $(LIBSRC)/Xau + +SOXAUTHREV = 6.0 +DEPXAUTHLIB = +XAUTHLIB = -lXau + +LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln + + XDMCPLIBSRC = $(LIBSRC)/Xdmcp + +SOXDMCPREV = 6.0 +DEPXDMCPLIB = +XDMCPLIB = -lXdmcp + +LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln + + XMUSRC = $(LIBSRC)/Xmu + +SOXMUREV = 6.2 +DEPXMULIB = +XMULIB = -lXmu + +LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + + XMUUSRC = $(LIBSRC)/Xmuu + +SOXMUUREV = 1.0 +DEPXMUULIB = +XMUULIB = -lXmuu + +LINTXMUU = $(LINTLIBDIR)/llib-lXmuu.ln + + OLDXLIBSRC = $(LIBSRC)/oldX + +DEPOLDXLIB = $(USRLIBDIR)/liboldX.a +OLDXLIB = -loldX + +LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln + + XPLIBSRC = $(LIBSRC)/Xp + +SOXPREV = 6.2 +DEPXPLIB = +XPLIB = -lXp + +LINTXP = $(LINTLIBDIR)/llib-lXp.ln + + TOOLKITSRC = $(LIBSRC)/Xt + +SOXTREV = 6.0 +DEPXTOOLONLYLIB = +XTOOLONLYLIB = -lXt + +LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln + + DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) + XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) + LINTXTOOLLIB = $(LINTXTOOLONLYLIB) + + XALIBSRC = $(LIBSRC)/Xa + +SOXAREV = 1.0 +DEPXALIB = +XALIB = -lXa + +LINTXA = $(LINTLIBDIR)/llib-lXa.ln + + AWIDGETSRC = $(LIBSRC)/Xaw + +SOXAWREV = 8.0 +DEPXAWLIB = +XAWLIB = -lXaw + +LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + + AWIDGET7SRC = $(LIBSRC)/Xaw7 + +SOXAW7REV = 7.0 +DEPXAW7LIB = +XAW7LIB = -lXaw + +LINTXAW7 = $(LINTLIBDIR)/llib-lXaw.ln + + AWIDGET6SRC = $(LIBSRC)/Xaw6 + +SOXAW6REV = 6.1 +DEPXAW6LIB = +XAW6LIB = -lXaw + +LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln + + XILIBSRC = $(LIBSRC)/Xi + +SOXINPUTREV = 6.0 +DEPXILIB = +XILIB = -lXi + +LINTXI = $(LINTLIBDIR)/llib-lXi.ln + + XTESTLIBSRC = $(LIBSRC)/Xtst + +SOXTESTREV = 6.1 +DEPXTESTLIB = +XTESTLIB = -lXtst + +LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln + +DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a +XBSDLIB = -lXbsd + +LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln + + ICESRC = $(LIBSRC)/ICE + +SOICEREV = 6.4 +DEPICELIB = +ICELIB = -lICE + +LINTICE = $(LINTLIBDIR)/llib-lICE.ln + + SMSRC = $(LIBSRC)/SM + +SOSMREV = 6.0 +DEPSMLIB = +SMLIB = -lSM + +LINTSM = $(LINTLIBDIR)/llib-lSM.ln + + XKEYSRC = $(LIBSRC)/Xkey + +SOXKEYREV = 6.0 +DEPXKEYLIB = +XKEYLIB = -lXkey + +LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln + + FSLIBSRC = $(LIBSRC)/FS + +SOFSREV = 6.0 +DEPFSLIB = +FSLIB = -lFS + +LINTFS = $(LINTLIBDIR)/llib-lFS.ln + + FONTLIBSRC = $(LIBSRC)/font + +DEPFONTLIB = $(USRLIBDIR)/libXfont.a +FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont + +LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln +# +DEPXFONTLIB = $(USRLIBDIR)/libXfont.a +XFONTLIB = -lXfont + +LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln + + FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs + +DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a +FONTSTUBLIB = -lfntstubs + +LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln + DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) + FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) + + FONTENCLIBSRC = $(LIBSRC)/fontenc + +DEPXFONTENCLIB = $(USRLIBDIR)/libfontenc.a +XFONTENCLIB = -lfontenc + +LINTXFONTENC = $(LINTLIBDIR)/llib-lfontenc.ln + + XPMLIBSRC = $(LIBSRC)/Xpm + +SOXPMREV = 4.11 +DEPXPMLIB = +XPMLIB = -lXpm + +LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln + +FREETYPE2DIR = /usr +FREETYPE2LIBDIR = /usr/lib +FREETYPE2INCDIR = /usr/include + +FREETYPE2LIB = -lfreetype + +FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config + +FREETYPE2DEFINES = -DFREETYPE2 + + EXPATLIBSRC = $(LIBSRC)/expat + +SOEXPATREV = 0.4 +DEPEXPATLIB = +EXPATLIB = -lexpat + +LINTEXPAT = $(LINTLIBDIR)/llib-lexpat.ln + +EXPATDIR = /usr +EXPATLIBDIR = /usr/lib +EXPATINCDIR = /usr/include + +EXPATINCLUDES = + +EXPATLIB = -lexpat + +EXPATDEFINES = -DEXPAT + +XFTDIR = /usr +XFTLIBDIR = /usr/lib +XFTINCDIR = /usr/include +XFTLIB = -L$(XFTLIBDIR) -lXft + +XFTINCLUDES= -I$(XFTINCDIR) $(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) $(XRENDERINCLUDES) + +FONTCONFIGDIR = /usr +FONTCONFIGLIBDIR = /usr/lib +FONTCONFIGINCDIR = /usr/include +FONTCONFIGBINDIR = /usr/bin + +FONTCONFIGLIB = -lfontconfig + +FONTCONFIGINCLUDES = + +FCCACHE = $(FONTCONFIGBINDIR)/fc-cache + +FONTCONFIGDEFINES = -DFONTCONFIG + +LIBPNGINCDIR = /usr/include + +LIBPNGINC= + +LIBPNGDIR = /usr +LIBPNGLIBDIR = /usr/lib +LIBPNGINCDIR = /usr/include + +LIBPNGLIB = -lpng + + XKBFILELIBSRC = $(LIBSRC)/xkbfile + +SOXKBFILEREV = 1.0 +DEPXKBFILELIB = +XKBFILELIB = -lxkbfile + +LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln + + XKBCOMPCMD = $(XBINDIR)/xkbcomp + + XKBUILIBSRC = $(LIBSRC)/xkbui + +SOXKBUIREV = 1.0 +DEPXKBUILIB = +XKBUILIB = -lxkbui + +LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln + +EXTRAXAWREQS = + +EXTRAXAWCLIENTDEPLIBS = + +EXTRAXAWCLIENTLIBS = + + XTRAPLIBSRC = $(LIBSRC)/XTrap + +SOXTRAPREV = 6.4 +DEPXTRAPLIB = +XTRAPLIB = -lXTrap + +LINTXTRAP = $(LINTLIBDIR)/llib-lXTrap.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + DEPLIBS4 = $(DEPLIBS) + DEPLIBS5 = $(DEPLIBS) + DEPLIBS6 = $(DEPLIBS) + DEPLIBS7 = $(DEPLIBS) + DEPLIBS8 = $(DEPLIBS) + DEPLIBS9 = $(DEPLIBS) + DEPLIBS10 = $(DEPLIBS) + + XFTPRELOADPATTERN = libXft.so.? + XRENDERPRELOADPATTERN = libXrender.so.? + XFONTPRELOADPATTERN = libXfont*.so.? + +XMULIBONLY = -lXmu +XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) + + CONFIGDIR = $(LIBDIR)/config + + USRLIBDIRPATH = $(USRLIBDIR) + LDPRELIBS = $(INSTALLED_LIBS) + LDPOSTLIBS = + TOP_INCLUDES = $(TOP_X_INCLUDES) + PROJECT_DEFINES = + VENDOR_DEFINES = -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"' + +CXXPROJECT_DEFINES = + +# ---------------------------------------------------------------------- +# start of Imakefile + +# Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp + +XMLIB = -lXm +# +# for Dell SVR4 +# +# EXTRA_LIBRARIES = -lc -lucb +EXTRA_DEFINES = -Wall -Wstrict-prototypes -Wmissing-prototypes + +SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c +OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o + +LOCAL_LIBRARIES = $(XMLIB) $(XTOOLLIB) $(XMULIBONLY) $(XLIB) + + PROGRAM = mgdiff + +all:: mgdiff + +mgdiff: $(OBJS) $(DEPLIBS) + $(RM) $@ + $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) + +install:: mgdiff + @if [ -d $(DESTDIR)$(BINDIR) ]; then \ + set +x; \ + else \ + if [ -h $(DESTDIR)$(BINDIR) ]; then \ + (set -x; rm -f $(DESTDIR)$(BINDIR)); \ + fi; \ + (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); \ + fi + $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) mgdiff $(DESTDIR)$(BINDIR)/mgdiff + +all:: mgdiff.$(MANNEWSUFFIX) + +mgdiff.$(MANNEWSUFFIX): mgdiff.$(MANSRCSUFFIX) + $(RM) $@ + if test -z "$(PREPROCESSMANPAGES)" ; then \ + cd `dirname mgdiff` && \ + $(LN) `basename mgdiff.$(MANSRCSUFFIX)` `basename $@`; \ + else \ + $(RAWCPP) $(MANDEFS) $(EXTRAMANDEFS) \ + < mgdiff.$(MANSRCSUFFIX) | sed -e '/^# *[0-9][0-9]* *.*$$/d' -e '/^#line *[0-9][0-9]* *.*$$/d' -e '/^[ ]*XCOMM$$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/\@\@$$/s/\@\@$$/\\/' >$@; \ + fi + +cleandir:: + $(RM) mgdiff.$(MANNEWSUFFIX) + +install.man:: mgdiff.$(MANNEWSUFFIX) + @if [ -d $(DESTDIR)$(MANDIR) ]; then \ + set +x; \ + else \ + if [ -h $(DESTDIR)$(MANDIR) ]; then \ + (set -x; rm -f $(DESTDIR)$(MANDIR)); \ + fi; \ + (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); \ + fi + $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) mgdiff.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/mgdiff.$(MANSUFFIX) + +depend:: + $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) + +lint: + $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) +lint1: + $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) + +cleandir:: + $(RM) mgdiff + +install:: Mgdiff.ad + @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ + set +x; \ + else \ + if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ + (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ + fi; \ + (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ + fi + $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) Mgdiff.ad $(DESTDIR)$(XAPPLOADDIR)/Mgdiff + +# ---------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +.c.i: + $(RM) $@ + $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ + +.SUFFIXES: .ii + +.cc.ii: + $(RM) $@ + $(CC) -E $(CFLAGS) $(_NOOP_) $*.cc > $@ + +.SUFFIXES: .s + +.c.s: + $(RM) $@ + $(CC) -S $(CFLAGS) $(_NOOP_) $*.c + +.cc.s: + $(RM) $@ + $(CC) -S $(CFLAGS) $(_NOOP_) $*.cc + +emptyrule:: + +cleandir:: + $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* + +Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + +tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + +man_keywords:: + +html_index:: + +clean:: cleandir + +distclean:: cleandir + + PREPROCESSMANPAGES = true + +# ---------------------------------------------------------------------- +# empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +install.sdk:: + @echo "install.sdk in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +depend:: + +distclean:: + $(RM) Makefile Makefile.dep + +# ---------------------------------------------------------------------- +# dependencies generated by makedepend + +# DO NOT DELETE +mgdiff.o: mgdiff.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/assert.h \ + /usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/X11/Intrinsic.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \ + /usr/include/X11/Xresource.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/StringDefs.h /usr/include/Xm/MainW.h \ + /usr/include/Xm/Xm.h /usr/include/X11/Shell.h \ + /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \ + /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \ + /usr/include/X11/Xatom.h /usr/include/Xm/XmStrDefs.h \ + /usr/include/Xm/XmStrDefs22.h /usr/include/Xm/XmStrDefs23.h \ + /usr/include/Xm/VirtKeys.h /usr/include/Xm/Transfer.h \ + /usr/include/Xm/DragC.h /usr/include/Xm/Display.h \ + /usr/include/Xm/DropSMgr.h /usr/include/Xm/Primitive.h \ + /usr/include/Xm/Manager.h /usr/include/Xm/Gadget.h \ + /usr/include/Xm/TxtPropCv.h /usr/include/Xm/VendorS.h \ + /usr/include/Xm/XmIm.h /usr/include/Xm/Form.h \ + /usr/include/Xm/BulletinB.h /usr/include/Xm/Frame.h \ + /usr/include/Xm/DrawingA.h /usr/include/Xm/MessageB.h \ + /usr/include/Xm/ScrollBar.h /usr/include/Xm/PushB.h \ + /usr/include/Xm/ToggleB.h /usr/include/Xm/PanedW.h \ + /usr/include/Xm/Label.h /usr/include/Xm/TextF.h \ + /usr/include/Xm/AtomMgr.h /usr/include/Xm/Protocols.h mgdiff.h externs.h \ + patchlevel.h mgdiff.xbm +rundiff.o: rundiff.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/ctype.h \ + /usr/include/x86_64-linux-gnu/sys/wait.h /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ + /usr/include/x86_64-linux-gnu/bits/xopen_lim.h /usr/include/assert.h \ + /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \ + /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \ + /usr/include/X11/Xutil.h /usr/include/X11/keysym.h \ + /usr/include/X11/keysymdef.h /usr/include/X11/Xresource.h \ + /usr/include/X11/Core.h /usr/include/X11/Composite.h \ + /usr/include/X11/Constraint.h /usr/include/X11/Object.h \ + /usr/include/X11/RectObj.h /usr/include/Xm/Xm.h /usr/include/X11/Shell.h \ + /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \ + /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \ + /usr/include/X11/Xatom.h /usr/include/Xm/XmStrDefs.h \ + /usr/include/X11/StringDefs.h /usr/include/Xm/XmStrDefs22.h \ + /usr/include/Xm/XmStrDefs23.h /usr/include/Xm/VirtKeys.h \ + /usr/include/Xm/Transfer.h /usr/include/Xm/DragC.h \ + /usr/include/Xm/Display.h /usr/include/Xm/DropSMgr.h \ + /usr/include/Xm/Primitive.h /usr/include/Xm/Manager.h \ + /usr/include/Xm/Gadget.h /usr/include/Xm/TxtPropCv.h \ + /usr/include/Xm/VendorS.h /usr/include/Xm/XmIm.h mgdiff.h externs.h +misc.o: misc.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/Xm/Xm.h /usr/include/X11/Intrinsic.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \ + /usr/include/X11/Xresource.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/Shell.h /usr/include/X11/SM/SMlib.h \ + /usr/include/X11/SM/SM.h /usr/include/X11/ICE/ICElib.h \ + /usr/include/X11/ICE/ICE.h /usr/include/X11/Xatom.h \ + /usr/include/Xm/XmStrDefs.h /usr/include/X11/StringDefs.h \ + /usr/include/Xm/XmStrDefs22.h /usr/include/Xm/XmStrDefs23.h \ + /usr/include/Xm/VirtKeys.h /usr/include/Xm/Transfer.h \ + /usr/include/Xm/DragC.h /usr/include/Xm/Display.h \ + /usr/include/Xm/DropSMgr.h /usr/include/Xm/Primitive.h \ + /usr/include/Xm/Manager.h /usr/include/Xm/Gadget.h \ + /usr/include/Xm/TxtPropCv.h /usr/include/Xm/VendorS.h \ + /usr/include/Xm/XmIm.h /usr/include/X11/cursorfont.h \ + /usr/include/Xm/SashP.h /usr/include/Xm/PrimitiveP.h \ + /usr/include/Xm/XmP.h /usr/include/X11/IntrinsicP.h \ + /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \ + /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \ + /usr/include/X11/RectObjP.h /usr/include/Xm/ColorP.h \ + /usr/include/Xm/AccColorT.h /usr/include/Xm/BaseClassP.h mgdiff.h \ + externs.h +files.o: files.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h /usr/include/ctype.h \ + /usr/include/assert.h /usr/include/Xm/Form.h /usr/include/Xm/BulletinB.h \ + /usr/include/Xm/Xm.h /usr/include/X11/Intrinsic.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \ + /usr/include/X11/Xresource.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/Shell.h /usr/include/X11/SM/SMlib.h \ + /usr/include/X11/SM/SM.h /usr/include/X11/ICE/ICElib.h \ + /usr/include/X11/ICE/ICE.h /usr/include/X11/Xatom.h \ + /usr/include/Xm/XmStrDefs.h /usr/include/X11/StringDefs.h \ + /usr/include/Xm/XmStrDefs22.h /usr/include/Xm/XmStrDefs23.h \ + /usr/include/Xm/VirtKeys.h /usr/include/Xm/Transfer.h \ + /usr/include/Xm/DragC.h /usr/include/Xm/Display.h \ + /usr/include/Xm/DropSMgr.h /usr/include/Xm/Primitive.h \ + /usr/include/Xm/Manager.h /usr/include/Xm/Gadget.h \ + /usr/include/Xm/TxtPropCv.h /usr/include/Xm/VendorS.h \ + /usr/include/Xm/XmIm.h /usr/include/Xm/Frame.h /usr/include/Xm/FileSB.h \ + /usr/include/Xm/DialogS.h /usr/include/Xm/MessageB.h \ + /usr/include/Xm/AtomMgr.h /usr/include/Xm/Protocols.h mgdiff.h externs.h +spawn.o: spawn.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \ + /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \ + /usr/include/X11/Xutil.h /usr/include/X11/keysym.h \ + /usr/include/X11/keysymdef.h /usr/include/X11/Xresource.h \ + /usr/include/X11/Core.h /usr/include/X11/Composite.h \ + /usr/include/X11/Constraint.h /usr/include/X11/Object.h \ + /usr/include/X11/RectObj.h mgdiff.h externs.h +manual.o: manual.c /usr/include/stdc-predef.h /usr/include/X11/Xos.h \ + /usr/include/X11/Xosdefs.h /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl.h \ + /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/X11/Xarch.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/X11/StringDefs.h /usr/include/Xm/DialogS.h \ + /usr/include/Xm/Xm.h /usr/include/X11/Intrinsic.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xutil.h \ + /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \ + /usr/include/X11/Xresource.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/Shell.h /usr/include/X11/SM/SMlib.h \ + /usr/include/X11/SM/SM.h /usr/include/X11/ICE/ICElib.h \ + /usr/include/X11/ICE/ICE.h /usr/include/X11/Xatom.h \ + /usr/include/Xm/XmStrDefs.h /usr/include/Xm/XmStrDefs22.h \ + /usr/include/Xm/XmStrDefs23.h /usr/include/Xm/VirtKeys.h \ + /usr/include/Xm/Transfer.h /usr/include/Xm/DragC.h \ + /usr/include/Xm/Display.h /usr/include/Xm/DropSMgr.h \ + /usr/include/Xm/Primitive.h /usr/include/Xm/Manager.h \ + /usr/include/Xm/Gadget.h /usr/include/Xm/TxtPropCv.h \ + /usr/include/Xm/VendorS.h /usr/include/Xm/XmIm.h \ + /usr/include/Xm/PanedW.h /usr/include/Xm/Form.h \ + /usr/include/Xm/BulletinB.h /usr/include/Xm/PushB.h \ + /usr/include/Xm/MessageB.h /usr/include/Xm/Text.h mgdiff.h externs.h +modal.o: modal.c /usr/include/stdc-predef.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/Xm/MessageB.h /usr/include/Xm/Xm.h \ + /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xosdefs.h \ + /usr/include/X11/Xutil.h /usr/include/X11/keysym.h \ + /usr/include/X11/keysymdef.h /usr/include/X11/Xresource.h \ + /usr/include/string.h /usr/include/xlocale.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/Shell.h /usr/include/X11/SM/SMlib.h \ + /usr/include/X11/SM/SM.h /usr/include/X11/ICE/ICElib.h \ + /usr/include/X11/ICE/ICE.h /usr/include/X11/Xatom.h \ + /usr/include/Xm/XmStrDefs.h /usr/include/X11/StringDefs.h \ + /usr/include/Xm/XmStrDefs22.h /usr/include/Xm/XmStrDefs23.h \ + /usr/include/Xm/VirtKeys.h /usr/include/Xm/Transfer.h \ + /usr/include/Xm/DragC.h /usr/include/Xm/Display.h \ + /usr/include/Xm/DropSMgr.h /usr/include/Xm/Primitive.h \ + /usr/include/Xm/Manager.h /usr/include/Xm/Gadget.h \ + /usr/include/Xm/TxtPropCv.h /usr/include/Xm/VendorS.h \ + /usr/include/Xm/XmIm.h mgdiff.h externs.h +legend.o: legend.c /usr/include/stdc-predef.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/X11/StringDefs.h /usr/include/Xm/DialogS.h \ + /usr/include/Xm/Xm.h /usr/include/X11/Intrinsic.h \ + /usr/include/X11/Xlib.h /usr/include/X11/X.h \ + /usr/include/X11/Xfuncproto.h /usr/include/X11/Xosdefs.h \ + /usr/include/X11/Xutil.h /usr/include/X11/keysym.h \ + /usr/include/X11/keysymdef.h /usr/include/X11/Xresource.h \ + /usr/include/string.h /usr/include/xlocale.h /usr/include/X11/Core.h \ + /usr/include/X11/Composite.h /usr/include/X11/Constraint.h \ + /usr/include/X11/Object.h /usr/include/X11/RectObj.h \ + /usr/include/X11/Shell.h /usr/include/X11/SM/SMlib.h \ + /usr/include/X11/SM/SM.h /usr/include/X11/ICE/ICElib.h \ + /usr/include/X11/ICE/ICE.h /usr/include/X11/Xatom.h \ + /usr/include/Xm/XmStrDefs.h /usr/include/Xm/XmStrDefs22.h \ + /usr/include/Xm/XmStrDefs23.h /usr/include/Xm/VirtKeys.h \ + /usr/include/Xm/Transfer.h /usr/include/Xm/DragC.h \ + /usr/include/Xm/Display.h /usr/include/Xm/DropSMgr.h \ + /usr/include/Xm/Primitive.h /usr/include/Xm/Manager.h \ + /usr/include/Xm/Gadget.h /usr/include/Xm/TxtPropCv.h \ + /usr/include/Xm/VendorS.h /usr/include/Xm/XmIm.h \ + /usr/include/Xm/RowColumn.h /usr/include/Xm/PanedW.h \ + /usr/include/Xm/Form.h /usr/include/Xm/BulletinB.h \ + /usr/include/Xm/Label.h /usr/include/Xm/PushB.h mgdiff.h externs.h --- mgdiff-1.0.orig/Mgdiff.ad +++ mgdiff-1.0/Mgdiff.ad @@ -112,7 +112,7 @@ ! ! this should only be defined in the site-wide file ! -?.AppDefaultsVersion: 1 +?.AppDefaultsVersion: 2 ?.Geometry: 800x600 @@ -210,15 +210,23 @@ *file_menu*button_2.Accelerator: Ctrlr *file_menu*button_2.AcceleratorText: Ctrl+R -*file_menu*button_3.XmString: Save As... -*file_menu*button_3.Mnemonic: S -*file_menu*button_3.Accelerator: Ctrls -*file_menu*button_3.AcceleratorText: Ctrl+S - -*file_menu*button_4.XmString: Exit -*file_menu*button_4.Mnemonic: E -*file_menu*button_4.Accelerator: Ctrlc -*file_menu*button_4.AcceleratorText: Ctrl+C +*file_menu*button_3.XmString: Reload Both +*file_menu*button_3.Accelerator: Metar +*file_menu*button_3.AcceleratorText: Meta+R + +*file_menu*button_4.XmString: Save As... +*file_menu*button_4.Mnemonic: S +*file_menu*button_4.Accelerator: Ctrls +*file_menu*button_4.AcceleratorText: Ctrl+S + +*file_menu*button_5.XmString: Save As Left... +*file_menu*button_6.XmString: Save As Right... + +*file_menu*button_7.XmString: Exit +*file_menu*button_7.Mnemonic: E +*file_menu*button_7.Accelerator: Ctrlc +*file_menu*button_7.AcceleratorText: Ctrl+C + ! ! *view_menu*button_0.XmString: Previous --- mgdiff-1.0.orig/debian/README.debian +++ mgdiff-1.0/debian/README.debian @@ -0,0 +1,39 @@ +mgdiff for DEBIAN +---------------------- + +I've added an awk script called "rmgdiff" that allows you to use +mgdiff (or tkdiff etc.) to graphically and recursively diff two +directories. + +Paul Serice , Tue, 25 Aug 1998 23:05:16 -0500 + + ----------------------------- + +I've applied lots of patches from Erik de Castro Lopo . Main new features for the user are: + + - Save As Left... / Save As Right... in File menu + - saving without having selected all textblocks is possible + - click-middle-button selects both sides, the resulting file gets + markers like CVS uses + - changes documented in manpage + +See the changelog entry of 1.0-20 for a complete list of changes and +the manpage for more explanations of the new features. Thanks Erik, +great work! + +Edelhard Becker , Sat, 07 Jun 2003 16:02:26 +0200 + + ----------------------------- + +I've got another useful patch from Roger Gammans which add two features (see his "Patch Viewer" page +http://www.sandman.uklinux.net/patchv/default.html for more info): + + - X Paste of the most recently selected diff hunk. + - A wrapper to view patches, by appliy them to a temporary file first + +The latter is installed as /usr/share/doc/mgdiff/viewpatch, thanks +Roger! + +Edelhard Becker , Thu, 08 Apr 2004 00:42:30 +0200 --- mgdiff-1.0.orig/debian/changelog +++ mgdiff-1.0/debian/changelog @@ -0,0 +1,298 @@ +mgdiff (1.0-30) unstable; urgency=medium + + * QA upload. + * Set the maintainer to the QA team. + * Fix FTBFS with glibc 2.21 and gcc-5 (Closes: #790267). + * Fix parsing of diff output in non-English locales (Closes: #387301). + * Add a "Reload Both" (meta-R) command (Closes: #394601). + * Extend VCS ignores to bzr/git/SVN (Closes: #489327). + * Drop remnants of the /usr/doc/ transition. + * Make the packaging slightly less musty (debhelper 4->9, dh_clean, dh_prep, + build-{binary,arch}, ${misc:Depends}. + * Set temporary Vcs-Git/Browser. + + -- Adam Borowski Wed, 13 Jan 2016 15:03:29 +0100 + +mgdiff (1.0-29.1) unstable; urgency=low + + * Non-maintainer upload. + * Build-depend on libxt-dev and libxext-dev (Closes: #707943). + * Transition from lesstif2 to motif (Closes: #714663). + + -- Luk Claes Sat, 14 Sep 2013 17:46:18 +0200 + +mgdiff (1.0-29) unstable; urgency=low + + * Build-depend on xutils-dev rather than xutils (thanks, Daniel Schepler) + Closes: #485210 + * Bumped to standards version 3.8.0 + * removed DH_COMPAT from debian/rules + * fixed rules clean target: removed "-", added debian/tmp + * fixed manpages (wrong Minus "-") + + -- Edelhard Becker Tue, 10 Jun 2008 23:33:58 +0200 + +mgdiff (1.0-28) unstable; urgency=low + + * bug fixes by Javier Fernández-Sanguino Peña + - Insecure /tmp usage in viewpatch example script (Closes: #335188) + - mgdiff: Allows user to set both input as '-' (Closes: #335191) + Thanks Javier! + + -- Edelhard Becker Tue, 25 Oct 2005 22:48:37 +0200 + +mgdiff (1.0-27) unstable; urgency=low + + * updated Paul Serices rmgdiff shell and awk scripts to 1.8.1, available + from his rmgdiff page (see copyright file); this should fix problems with + filenames and dirs with spaces and gawk compatibility, thanks Paul! + + -- Edelhard Becker Thu, 23 Jun 2005 22:14:26 +0200 + +mgdiff (1.0-26) unstable; urgency=low + + * fixed rmgdiff.1x typo, thanks A Costa (Closes: #310343) + + -- Edelhard Becker Fri, 27 May 2005 17:37:17 +0200 + +mgdiff (1.0-25) unstable; urgency=low + + * switched to lesstif2, get rid of lesstif1 + * switched to debhelper, get rid of debmake + * made debhelper version lintian-clean + + -- Edelhard Becker Sat, 12 Mar 2005 22:33:35 +0100 + +mgdiff (1.0-24) unstable; urgency=low + + * bug fixes by Erik de Castro Lopo : + - clean compiler warnigs (Closes: #271623) + - fix Ctrl-U/Ctrl-P handling (Closes: #271624) + - fix UTF8 handling (Closes: #135854) + Thanks Erik! + + -- Edelhard Becker Thu, 7 Oct 2004 00:50:16 +0200 + +mgdiff (1.0-23) unstable; urgency=low + + * Removes Xmu references from the build process (Closes: Bug#256419, must + been there for ages, thanks Daniel). + * corrected manpage sections to 1x + + -- Edelhard Becker Sun, 27 Jun 2004 14:50:55 +0200 + +mgdiff (1.0-22) unstable; urgency=low + + * included Roger Gammans "Patch Viewer" + plus necessary mgdiff patch + * Bumped to standards version 3.6.1 + + -- Edelhard Becker Thu, 8 Apr 2004 00:33:53 +0200 + +mgdiff (1.0-21) unstable; urgency=low + + * scrambled Eriks e-mail in the manpage also + * typo in man-page fixed (thx Erik pointing this out) + + -- Edelhard Becker Wed, 9 Jul 2003 16:33:07 +0200 + +mgdiff (1.0-20) unstable; urgency=low + + * applied lots of patches from Erik de Castro Lopo (explanations from his e-mail to me): + - mgdiff-includes.diff: Fix a couple of missing includes. + - mgdiff-islatin.diff: Fix a warning message. + - mgdiff-sun-fix.diff: A fix for SUN Solaris. + - mgdiff-tempfile.diff: Replace use of tempnam() with something more + secure. + - mgdiff-warnings.diff: Remove compiler warnings when using CFLAGS equal + to -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes [eb: added the + flags to the Imakefile]. + - mgdiff-snprintf.diff: Replace all usage of sprintf() with snprintf(). + - mgdiff-save-left-right.diff: Add file menu entries for "Save as Left..." + and "Save as Right...". Includes increment of APP_DEFAULTS_VERSION + number, mods to Mgdiff.ad and checks for correct app-default value. + - mgdiff-save-unselected.diff: Allow saving files with unselected blocks. + - mgdiff-select-both.diff: Add ability to select both sides by clicking + with the middle button. When both sides are selected the two blocks are + written to the output file using markings similar to the markings CVS + palces in a file when a merge goes wrong. + - mgdiff-man.diff: Update the man page to reflect the above changes. Also + added my own copyright to a couple of files where I made anything more + than minor changes. I'm quite happy to have my changes under the same + license as the original code. + * changed maintainer address to debian account + * Bumped to standards version 3.5.10 + * updated README + + -- Edelhard Becker Sat, 7 Jun 2003 16:07:42 +0200 + +mgdiff (1.0-19) unstable; urgency=low + + * Added NAME section to cvsmgdiff man page (closes: #141670). + * Bumped to standards version 3.5.8.0. + * New maintainer. Closes: #169554. + + -- Edelhard Becker Wed, 26 Feb 2003 19:01:20 +0100 + +mgdiff (1.0-18) unstable; urgency=low + + * Change source maintainer to myself (closes: #71915). + * Make cvsmgdiff a bash script (bash should handle anything pdksh does). + * Write a manpage for cvsmgdiff. + * Add dh_strip to rules (fixes lintian warning). + * Add debhelper to Build-Depends. + + -- Ian Zimmerman Fri, 15 Feb 2002 12:38:38 -0800 + +mgdiff (1.0-17) unstable; urgency=low + + * Fixed not being able to specify the cvsmgdiff gui from the command + line. There is now a -g flag. + * Also fixed a problem with where mgdiff was not comming up when + the -r option was used exactly once on the command line. + + -- Paul Serice Tue, 5 Feb 2002 13:09:08 -0600 + +mgdiff (1.0-16) unstable; urgency=low + + * Better dependencies in the Debian "control" file. + * Introduced the "cvsmgdiff" script for comparing a revision in your + CVS archive with what is currently checked out or for comparing + two revision both of which are in the archive. It works with + "mgdiff" (of course), xdiff, xxdiff, and tkdiff (not that tkdiff + needs this script). + * Portable way to move rmgdiff.awk out of /usr/bin and into + /usr/lib/rmgdiff where it should have been in the first place. + + -- Paul Serice Sat, 26 Jan 2002 23:06:47 -0600 + +mgdiff (1.0-15) unstable; urgency=low + + * Debian QA Upload. + * New version built by Paul Serice + Fri, 26 Oct 2001 03:19:15 -0500; Thank you for your contribution: + - This is getting embarrassing. Previous version introduced a bug + that caused the "only in" sanity check to be triggered (yes, + again) when a file was only in one directory but had a minimum + depth of 2. + + -- Peter Palfrader Sun, 28 Oct 2001 01:55:22 +0200 + +mgdiff (1.0-14) unstable; urgency=low + + * Debian QA Upload. + * New version built by Paul Serice + Thu, 27 Sep 2001 20:33:15 -0500; Thanks Paul: + - Fatal bug in rmgdiff caused by working on two directories the last + one was a superstring of the first one is fixed. + * Removed emacs mode commands from debian/changelog. + * /etc/X11/app-defaults/Mgdiff tagged as conffile. + + -- Peter Palfrader Sat, 29 Sep 2001 23:24:31 +0200 + +mgdiff (1.0-13) unstable; urgency=low + + * Debian QA Upload. + * Changed maintainer email address from debian-qa@lists.debian.org + to packages@qa.debian.org. + * New version built by Paul Serice + Fri, 21 Sep 2001 01:29:06 -0500; Thanks Paul: + - Merged patch from Polish(ed) distribution, closes: #96085 + (mgdiff has wrong heuristics for determining whether a file is + text or not). + - rmgdiff failed to escape meta-characters in directory names causing + directories like "c++_src" to trigger a sanity check. + + -- Peter Palfrader Sat, 22 Sep 2001 15:42:00 +0200 + +mgdiff (1.0-12) unstable; urgency=low + + * Fixed RMGDIFF_GUI variable in /usr/bin/rmgdiff. + * Added license and author of rmgdiff to copyright file. + * Thanks Paul, closes: #87929. + + -- Peter Palfrader Wed, 28 Feb 2001 03:40:31 +0000 + +mgdiff (1.0-11) unstable; urgency=low + + * Made Build-Depends: xutils, lesstif-dev, debmake (closes: #83848). + * Some app-defaults bugs have not been closed by last changelog: + (closes: #81421, #81383) + * Added support for DEB_BUILD_OPTIONS. + * Removed diff from Depends. diff is essential. + * Changed man path from usr/X11R6/man to /usr/share/man. + * Install binaries in usr/bin instead of usr/X11R6/bin. + * Moved doc from /usr/doc to /usr/share/doc and create symlink. + * Calling dpkg-gencontrol with -isp now, so Section and Priority fields + are in the pacakge. + + -- Peter Palfrader Sat, 24 Feb 2001 17:39:49 +0000 + +mgdiff (1.0-10) unstable; urgency=low + + * Rebuilt to move app-defaults file to /etc/X11, Closes: #86278 + + -- Joey Hess Fri, 16 Feb 2001 19:50:21 -0800 + +mgdiff (1.0-9) unstable; urgency=low + + * Paul orphaned the package a while back. Maintainer set to QA. + + -- Joey Hess Fri, 29 Dec 2000 18:47:27 -0800 + +mgdiff (1.0-8) unstable; urgency=low + + * Fixed error in man page for rmgdiff. + + -- Paul Serice Sat, 13 Nov 1999 05:37:36 -0600 + +mgdiff (1.0-7) unstable; urgency=low + + * Added dependency on mawk. + * Fixed usage for rmgdiff: -m should be -g. + + -- Paul Serice Tue, 26 Oct 1999 21:09:52 -0500 + +mgdiff (1.0-6) unstable; urgency=low + + * Linked against lesstif1. Closes bug #48167. + + -- Paul Serice Sun, 24 Oct 1999 21:23:31 -0500 + +mgdiff (1.0-5) unstable; urgency=low + + * Added needed dependency on "file". + + -- Paul Serice Sat, 8 May 1999 15:30:37 -0500 + +mgdiff (1.0-4) unstable; urgency=low + + * I wrote "rmgdiff" to allow the user to recursively diff two + directories using any graphical diff viewer -- including + mgdiff. + * Compiled using libc6 with new naming convention. + * mgdiff man page was not in the correct directory. + * Added "mgdiff.README". + * Now using original source in tarball. + + -- Paul Serice Sun, 17 Jan 1999 23:05:44 -0600 + +mgdiff (1.0-3) unstable; urgency=low + + * Updated description to reflect Lesstif improvements. + * Changed architecture to 'any'. + + -- Paul Serice Mon, 26 Oct 1998 01:16:45 -0600 + +mgdiff (1.0-2) unstable; urgency=low + + * Changed architecture to all. + + -- Paul Serice Sat, 24 Oct 1998 23:08:56 -0500 + +mgdiff (1.0-1) unstable; urgency=low + + * Initial Release. + + -- Paul Serice Tue, 25 Aug 1998 23:05:16 -0500 --- mgdiff-1.0.orig/debian/compat +++ mgdiff-1.0/debian/compat @@ -0,0 +1 @@ +9 --- mgdiff-1.0.orig/debian/control +++ mgdiff-1.0/debian/control @@ -0,0 +1,18 @@ +Source: mgdiff +Section: text +Priority: optional +Maintainer: Debian QA Group +Build-Depends: xutils-dev, libmotif-dev, libxt-dev, libxext-dev, debhelper (>= 9) +Standards-Version: 3.9.6 +# Please migrate this to a non-private space once Alioth is back. +Vcs-Git: https://gitlab.com/kilobyte/pkg-mgdiff.git +Vcs-Browser: https://gitlab.com/kilobyte/pkg-mgdiff/tree/master + +Package: mgdiff +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, debianutils (>=1.7), file, mawk +Description: xdiff clone + mgdiff is modeled after xdiff and provides a nice graphical interface + for comparing the contents of two text files. rmgdiff recurses down + two directories collating difference information and invoking mgdiff + whenever two text files differ. --- mgdiff-1.0.orig/debian/copyright +++ mgdiff-1.0/debian/copyright @@ -0,0 +1,42 @@ +This package was debianized by Paul Serice on +Tue, 25 Aug 1998 23:05:16 -0500. + +It was downloaded from ftp://ftp.x.org/contrib/applications/mgdiff.tar.gz . + +Please note that rmgdiff is not a part of the mgdiff distribution. Instead, +it was written by your humble Debian maintainer. rmgdiff is GNU +copyrighted. + +The copyright for mgdiff as found in mgdiff.c of the source distribution +is as follows: + +/* + * Copyright (c) 1994 Daniel Williams + * + * The X Consortium, and any party obtaining a copy of these files from + * the X Consortium, directly or indirectly, is granted, free of charge, + * a full and unrestricted irrevocable, world-wide, paid up, + * royalty-free, nonexclusive right and license to deal in this software + * and documentation files (the "Software"), including without limitation + * the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons + * who receive copies from any such party to do so. This license + * includes without limitation a license to do the foregoing actions + * under any patents of the party supplying this software to the X + * Consortium. The following conditions apply: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL DANIEL WILLIAMS OR SYSTEMS & SCIENTIFIC SOFTWARE BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +rmgdiff was written by Paul Serice . It has its homepage +at http://www.serice.net/rmgdiff/ and is in public domain. --- mgdiff-1.0.orig/debian/cvsmgdiff +++ mgdiff-1.0/debian/cvsmgdiff @@ -0,0 +1,245 @@ +#! /bin/bash + +# +# This script lets you recursively diff the CVS directories you have +# checked out. To use, just pass in an optional revision levels and +# an optional file directory name. This script then will show you the +# differences you're interested in. +# +# -- Paul Serice +# + +CVSMGDIFF_VERSION=1.1 + +: ${MGDIFF:=/usr/bin/mgdiff} +: ${TMP:=/tmp} + +function usage { + if [ $# -ne 1 ] ; then + echo "progname: Error: Invalid args for usage: \"$@\"" >&2 + exit 1 + fi + cmd= + cmd="$cmd echo >&2 ;" + cmd="$cmd echo \"Usage: $progname [-h] [-v]" + cmd="$cmd [-g ] [[-r ] [-r ]] file\" >&$1 ;" + cmd="$cmd echo >&2" + eval "$cmd" + if [ $1 -eq 1 ] ; then + exit 0 + fi + exit 1 +} + +function verify_exec { + if [ $# -ne 1 ] ; then + echo "$progname: Error: Invalid args for verify_exec: \"$@\"" >&2 + exit 1 + fi + if ! type "$1" >/dev/null 2>&1 ; then + echo "$progname: Error: Unable to find executable for \"$1\"." >&2 + exit 1 + fi +} + +tmp_base="cvsmgdiff-$$." +function clean_up { + # These signal handlers are rough. It is, as far as I can tell, + # impossible to pass in the name of the currently active temporary + # files. A reasonable alternative is to scan $TMP for files that + # match the pattern we use being careful not to allow a malicious + # user to trick us into deleting some other file. + find "$TMP" -maxdepth 1 \ + -type f \ + -links 1 \ + -uid `id -u` \ + -name "$tmp_base"'*' \ + -print0 \ + | xargs -r0 rm -f + exit 0 +} + +# +# getunique() -- Finds two unique temporary file names. +# +getunique() +{ + old_umask=`umask` + umask 077 + if ! tmp_file_1=$(mktemp -q "$TMP/${tmp_base}XXXXXX") ; then + echo "Error: Unable to allocate a necessary temporary file." >&2 + exit 1 + fi + + if ! tmp_file_2=$(mktemp -q "$TMP/${tmp_base}XXXXXX") ; then + echo "Error: Unable to allocate a necessary temporary file." >&2 + exit 1 + fi + umask $old_umask +} + +# +# Script Starts Here !!! +# + +progname="cvsmgdiff.sh" +verify_exec "basename" +progname=`basename $0` + +# Signal Trap handler to clean up temporary files in "$TMP". +if ! trap 'clean_up' HUP INT QUIT TERM ; then + echo "$progname: Unable to register signal handler." >&2 + exit 1 +fi + +# Get cvs revision(s) to use. +cnt=0 +while getopts "g:hr:v" OPT ; do + case "$OPT" in + g) MGDIFF="$OPTARG" + ;; + h) usage 1 + ;; + r) rev[$cnt]="-r$OPTARG" + cnt=`expr $cnt + 1` + ;; + v) echo "$progname: ${CVSMGDIFF_VERSION}" + exit 0 + ;; + \?) usage 2 + ;; + esac +done +shift `expr $OPTIND - 1` + +verify_exec "cut" +verify_exec "cvs" +verify_exec "echo" +verify_exec "expr" +verify_exec "find" +verify_exec "grep" +verify_exec "$MGDIFF" +verify_exec "mktemp" +verify_exec "sleep" +verify_exec "xargs" + +mgdiff_basename=`basename "$MGDIFF"` + +# Portability issues. +if [ "$mgdiff_basename" = "mgdiff" ] ; then + QUIET_OPT="-quit" + FNAME_OPT="-file" +elif [ "$mgdiff_basename" = "xdiff" ] ; then + QUIET_OPT="-D" + FNAME_OPT="-N" +elif [ "$mgdiff_basename" = "xxdiff" ] ; then + QUIET_OPT="-D" + FNAME_OPT="-N" + TITLE_1_OPT="--title1" + TITLE_2_OPT="--title2" +fi + +if [ $cnt -gt 2 ] ; then + echo + echo "Error: Too many revisions." + echo + exit 1 +fi + +if [ ! -d `pwd`"/CVS" ] && [ ! -d `pwd`"/$1/CVS" ] ; then + echo + echo "Warning: \"$1\" does not appear to be a CVS directory." 1>&2 + echo "Trying to diff \"$1\" with CVS repository anyway." + echo + sleep 5 +fi + +# Run CVS recursively on the entire directory. +cvs diff "${rev[@]}" "$@" 2>/dev/null \ +| grep '^Index:' \ +| cut -d ' ' -f 2 \ +| while read fname ; do + + echo -n "Processing $fname . . . " + + # tkdiff CVS access built-in. + if [ "$mgdiff_basename" = "tkdiff" ] ; then + + "$MGDIFF" ${rev[0]+"${rev[@]}"} "$fname" + + # The others require a little bit of scripting. + elif [ $cnt -eq 2 ] ; then + + getunique + + \cvs update -p "${rev[0]}" "$fname" > "$tmp_file_1" 2> /dev/null + \cvs update -p "${rev[1]}" "$fname" > "$tmp_file_2" 2> /dev/null + + "$MGDIFF" ${QUIET_OPT+"$QUIET_OPT"} \ + ${TITLE_1_OPT+"$TITLE_1_OPT" "$fname (rev ${rev[0]#-r})"} \ + ${TITLE_2_OPT+"$TITLE_2_OPT" "$fname (rev ${rev[1]#-r})"} \ + "$tmp_file_1" "$tmp_file_2" + + \rm -f "$tmp_file_1" > /dev/null 2>&1 + \rm -f "$tmp_file_2" > /dev/null 2>&1 + + elif [ $cnt -le 1 ] ; then + + if [ $cnt -eq 1 ] ; then + title_rev="${rev[0]#-r}" + else + title_rev=`cvs status "$fname" \ + | grep 'Working revision:' \ + | awk '{print $3;}'` + fi + + # For some reason, xxdiff does not like to work with pipes + # despite its saying otherwise. + if [ "$TITLE_1_OPT" ] ; then + + getunique + + # The convention that "diff" uses is that the old file is on + # the left and the new file is on the right. We use this to + # display the files for all but "mgdiff" which has a + # "File->Save As..." menu option that works better the other + # way around. + file_first="$tmp_file_1" + file_second="$fname" + if [ "$mgdiff_basename" = "mgdiff" ] ; then + file_first="$fname" + file_second="$tmp_file_1" + fi + + cvs update -p ${rev[0]+"${rev[0]}"} "$fname" \ + > "$tmp_file_1" 2>/dev/null + + "$MGDIFF" ${QUIET_OPT+"$QUIET_OPT"} \ + ${TITLE_1_OPT+"$TITLE_1_OPT" "$fname (rev $title_rev)"}\ + "$file_first" "$file_second" + + \rm -f "$tmp_file_1" > /dev/null 2>&1 + \rm -f "$tmp_file_2" > /dev/null 2>&1 + + else + + # See comment above. + file_first="-" + file_second="$fname" + if [ "$mgdiff_basename" = "mgdiff" ] ; then + file_first="$fname" + file_second="-" + fi + + cvs update -p ${rev[0]+"${rev[0]}"} "$fname" 2>/dev/null \ + | "$MGDIFF" ${QUIET_OPT+"$QUIET_OPT"} \ + ${FNAME_OPT+"$FNAME_OPT" "$fname (rev $title_rev)"} \ + "$file_first" "$file_second" + + fi + + fi + + echo "Done." + + done --- mgdiff-1.0.orig/debian/cvsmgdiff.1 +++ mgdiff-1.0/debian/cvsmgdiff.1 @@ -0,0 +1,182 @@ +.\" Automatically generated by Pod::Man version 1.16 +.\" Fri Feb 15 12:01:43 2002 +.\" +.\" Standard preamble: +.\" ====================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R + +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used +.\" to do unbreakable dashes and therefore won't be available. \*(C` and +.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr +.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and +.\" index entries marked with X<> in POD. Of course, you'll have to process +.\" the output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it +.\" makes way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +.bd B 3 +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ====================================================================== +.\" +.IX Title "CVSMGDIFF 1" +.TH CVSMGDIFF 1 "Utility Scripts" "2002-02-15" "Utility Scripts" +.SH NAME +cvsmgdiff \- uses mgdiff to display differences between any two cvs revisions. +.UC +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBcvsmgdiff\fR [\fB\-v\fR|\fB\-h\fR|\fB\-g\fR \fIgui\fR|\fB\-r\fR \fIrev1\fR [\fB\-r\fR \fIrev2\fR]] \fIfile\fR ... +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This manual page documents briefly the cvsmgdiff program. +This manual page was written for the Debian GNU/Linux distribution +(but may be used by others), because the original +program does not have a manual page. +.PP +This script lets you recursively diff the \s-1CVS\s0 directories you have +checked out. To use, just pass in an optional revision levels and +an optional file directory name. This script then will show you the +differences you're interested in. +.SH "OPTIONS" +.IX Header "OPTIONS" +.Ip "\fB\-v\fR" 4 +.IX Item "-v" +Print version information successfully +.Ip "\fB\-h\fR" 4 +.IX Item "-h" +Print help information +.Ip "\fB\-g\fR \fIgui\fR" 4 +.IX Item "-g gui" +Use the program \fIgui\fR as the user interface (default: \fI/usr/bin/mgdiff\fR) +.Ip "\fB\-r\fR \fIrevision\fR" 4 +.IX Item "-r revision" +Specify the \s-1CVS\s0 revision to view. If just one \fB\-r\fR option is given, view +differences between that revision and the current file in the \s-1CVS\s0 working +directory. If two \fB\-r\fR options are given, compare those two revisions +with each other. +.SH "AUTHOR" +.IX Header "AUTHOR" +cvsmgdiff appears to have been written by Paul Serice. +This manual page was written by Ian Zimmerman +for the Debian GNU/Linux project, but may +be used by others. It was written with the assistance of +\&\fIpod2man\fR\|(1). --- mgdiff-1.0.orig/debian/mgdiff.README +++ mgdiff-1.0/debian/mgdiff.README @@ -0,0 +1,44 @@ +Mon May 16 21:52:32 EDT 1994 + +This is mgdiff, a graphical front end to the Unix diff command based +upon X11R[456] and the Motif widget set. It allows the user to select +two files for comparison, runs the diff command, parses the output and +presents the results graphically. This presentation can also be used +to generate a user-specified merge of the two files into a third file. + +This program's appearance is based upon a program called gdiff, which +runs only on Silicon Graphics workstations and for which source code +is not provided. + +The program has been developed and tested in the following +environment: + + - Dell SVR4 Issue 2.2 + - cc and gcc 2.3.3 + - X11R4 and X11R5 + - Motif 1.1.4 + +It has received some testing using SGI IRIX 5.2 with cc, X11R5 and +Motif 1.2.3. + +It should build fairly painlessly with the Imakefile provided. You +may need to point the Imakefile at your Motif libraries. + +You will need to install the application defaults file correctly for +the program to run at all. + +An XPM icon file is provided if your window manager can use it. + +A preformatted manual page is also provided for those who don't have +DWB or it's equivalent. + +Please send your comments, bug reports, bug fixes etc. to: + + mgdiff@sass.com + +Enjoy, +Dan +-- +Daniel Williams, Consultant | Systems & Scientific Software +Internet: dan@sass.com | 263 Forrest Avenue +Voice: (215) 885-1573 | Elkins Park, PA 19027 --- mgdiff-1.0.orig/debian/rmgdiff +++ mgdiff-1.0/debian/rmgdiff @@ -0,0 +1,183 @@ +#!/bin/sh + +# Default value for the RMGDIFF_GUI environment variable. +: ${RMGDIFF_GUI:=/usr/bin/mgdiff} + +# +# You shouldn't need to edit beneath here. +# + +SHOW_FILE_TYPES="TRUE" +USE_CVS="" +DEBUG="" +USE_GUI="TRUE" +RMGDIFF_VERSION="" + + + +Usage() { +cat <<-EOF + +Usage: `basename "$0"` [-b] [-c] [-d] [-g ] [-n] [-v] + + -b: basic reporting (no file type info will be printed) + -c: cvs files will be included in diff + -d: print debugging information + -g: which gui to use + -n: no gui will pop up + -v: version + +EOF +} + +verify_exec () { + type "$1" 1>/dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo "$progname: Error: Unable to find executable for \"$1\"." >&2 + exit 1 + fi +} + +# Some machines don't have a "readlink" command. +read_link_via_ls() { + if [ $# -ne 1 ] ; then + echo "$progname: Internal Error: Invalid args for" \ + "readlink_via_ls: $@" >&2 + exit 1 + fi + + \ls -l "$1" | sed -e 's|.*-> ||' +} + + +# Some machines don't have a "realpath" command. follow_link_via_ls +# does not pretend to be "realpath" because it will leave all sorts of +# cruft in the path string, but it should eventuall reach a regular +# file. +follow_link_via_ls() { + + if [ $# -ne 1 ] ; then + echo "$progname: Internal Error: Invalid args for" \ + "follow_link_via_ls: $@" >&2 + exit 1 + fi + + local_iteration_count=0 + local_iteration_max=1024 + + # Prime the pump. + local_tmp= + local_rv="$1" + + while [ $local_iteration_count -lt $local_iteration_max ] ; do + + if [ ! -h "$local_rv" ] ; then + break + fi + + local_tmp=`read_link_via_ls "$local_rv"` + + # The "read_link_via_ls" above could result in an absolute + # path or a relative one. The Solaris /bin/sh does not + # support "${PSTREE_AWK_SCRIPT#/}". So, use grep instead. + echo "$local_tmp" | grep '^/' >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + # The path given by readlink was relative. So, we have a + # little more work to do because we need to prepend the + # same path used to reach the original symlink. + local_tmp=`dirname "$local_rv"`/"$local_tmp" + fi + + local_rv="$local_tmp" + + local_iteration_count=`expr $local_iteration_count + 1` + + done + + if [ $local_iteration_count -ge $local_iteration_max ] ; then + echo "$progname: Error: Symbolic link nesting is too deep when" \ + "following \"$1\"." >&2 + exit 1 + fi + + echo "$local_rv" + +} + + +# +# Script starts here. +# + +progname="rmgdiff" +verify_exec "basename" +progname=`basename "$0"` + +verify_exec "awk" +verify_exec "diff" +verify_exec "dirname" +verify_exec "expr" +verify_exec "file" +verify_exec "grep" +verify_exec "ls" +verify_exec "$RMGDIFF_GUI" +verify_exec "sed" + +while getopts "bcdg:nv" OPT ; do + case "$OPT" in + b) SHOW_FILE_TYPES="" + ;; + c) USE_CVS="TRUE" + ;; + d) DEBUG="TRUE" + ;; + g) RMGDIFF_GUI="$OPTARG" + ;; + n) USE_GUI="" + ;; + v) RMGDIFF_VERSION="TRUE" + ;; + \?) Usage + exit 1 + ;; + esac +done +shift `expr $OPTIND - 1` + +# +# Find the rmgdiff awk script. It is located in the same directory as +# this shell script after following all the symlinks. +# +lib_dir=`follow_link_via_ls "$0"` +RMGDIFF_AWK=`dirname "$lib_dir"`/rmgdiff.awk + + +# If the user just wants the version ... +if [ -n "$RMGDIFF_VERSION" ] ; then + exec awk -v version="$RMGDIFF_VERSION" -f "$RMGDIFF_AWK" +fi + +if [ $# -lt 2 ] || [ $# -gt 2 ] ; then + Usage + exit 1 +fi + +if [ ! -d "$1" ] ; then + echo "$progname: dir1=\"$1\" is not a directory." 1>&2 + exit 1 +fi + +if [ ! -d "$2" ] ; then + echo "$progname: dir2=\"$2\" is not a directory." 1>&2 + exit 1 +fi + +LC_MESSAGES=C exec diff -rq "$1" "$2" | awk -v debug="$DEBUG" \ + -v dir1="$1" \ + -v dir2="$2" \ + -v rmgdiff_gui="$RMGDIFF_GUI" \ + -v show_file_types="$SHOW_FILE_TYPES" \ + -v use_cvs="$USE_CVS" \ + -v use_gui="$USE_GUI" \ + -v version="$RMGDIFF_VERSION" \ + -f "$RMGDIFF_AWK" --- mgdiff-1.0.orig/debian/rmgdiff.1x +++ mgdiff-1.0/debian/rmgdiff.1x @@ -0,0 +1,98 @@ +.na +.TH RMGDIFF 1x +.SH NAME +rmgdiff \- use almost any graphical file difference browser to recursively +view the differences between two directories. +.SH SYNOPSIS +rmgdiff [\-b] [\-d] [\-g gui] [\-n] dir1 dir2 +.SH DESCRIPTION +.LP +.I rmgdiff +is an awk script that works in conjunction with almost any graphical file +difference browser. It is known to work with +.IR mgdiff , +.IR tkdiff , +and +.IR xdiff . +.LP +Unless I am mistaken, most of the GUI difference viewers (except for emacs) +do not have built-in support for recursing down two directories, but +.I diff +does. Based on +.IR diff 's +output, +.I rmgdiff +decides when to invoke the graphical difference viewer. +.LP +In addition, +.I rmgdiff +also collates +.IR diff 's +output. As soon as a new difference is encountered in a text file, +.I rmgdiff +will print to standard output the name of the file that both directories have +in common. It will then start the GUI and block until the user exits. +As more text files with differences are found, the GUI will be started up +again. +.LP +In the interim, +.I rmgdiff +will keep track of differences in binary (non-text) files. It organizes +the binary files as executables, shared libraries, static libraries, object +files, and other. Only after all the text files have been displayed will +.I rmgdiff +report the binary differences. +.LP +It also keeps track of files and directories that +.I diff +reports as being only in one directory or another. +.I rmgdiff +organizes these entries by directory. Thus, files in one directory +will be reported in one block, and files that are in the other directory +will be reported in a different block. +.LP +In addition to printing the name of the files that are different, +.I rmgdiff +defaults to printing the relevant portion of the output from the +.I file +command. This has the unfortunate side-effect of slowing things down; +however, I find this information to be invaluable. If you're just looking +for a fast way to collate +.IR diff 's +output, try piping it into +.I sort +instead. + +.SH COMMAND LINE OPTIONS +.TP 8 +.B \-b +Sets the basic reporting mode. In basic mode, rmgdiff reports only +file names. It does not report the file types involved. +.TP 8 +.B \-c +By default, files relating to +.I CVS +are ignored by +.IR rmgdiff . +If you want to include CVS files, use this option. +.TP 8 +.B \-d +Sets +.I rmgdiff +to print way too much debugging information. +.TP 8 +\fB\-g\fP \fIgui\fP +Tells +.I rmgdiff +which gui you would like to use for viewing differences. By default, +.I mgdiff +is used. You can also set $RMGDIFF_GUI in your environment, but it can +be overridden with this option. +.TP 8 +.B \-n +.I rmgdiff +will not invoke the gui. This is useful, if you only want to view the +collated output. + +.SH AUTHOR +Paul Serice (paul@serice.net) --- mgdiff-1.0.orig/debian/rmgdiff.awk +++ mgdiff-1.0/debian/rmgdiff.awk @@ -0,0 +1,776 @@ +# +# rmgdiff.awk +# -- awk script to that reads standard input for the output +# of "diff -rq ". It then takes diff's +# output and calls mgdiff once for each pair of text +# files that differ. It prints out a message to this +# effect. It then prints out a list of binary files +# that have differences followed by a list of files +# that appear only in the first directory followed by a +# list of files that appear only in the second +# directory. +# +# It expects you to pass in and on the +# command line using awk's "-v" option. You should +# find the shell script I use to call this file near +# where you found this file. +# +# -- Paul Serice +# + +# +# Changes: +# +# v1.8.1 Minor clean up. +# +# v1.8.0 Testing revealed problems handling white space. +# +# v1.7 Fixed a problem with the regular expression that +# escapes meta-characters in the escape_dir() function. +# Now, both gawk and mawk should be able to interpret this +# script. +# +# v1.6 Changed the "rmgdiff" shell script wrapper so that this +# awk script does not have to be in the same directory. +# You can now place both "rmgdiff" and "rmgdiff.awk" in +# any directory and place a symbolic link in a "bin" +# directory that points to the "rmgdiff" shell script. +# The shell script will then follow the symbolic links +# in order to find the "rmgdiff.awk" script. One way to +# set this up is as follows: +# +# /usr/local/lib/rmgdiff/rmgdiff +# /usr/local/lib/rmgdiff/rmgdiff.awk +# /usr/local/bin/rmgdiff -> ../lib/rmgdiff/rmgdiff +# +# v1.5 I've said it before, and here I go again. This time +# it's fixed. v1.4 introduced a new bug related to the same +# section of code that v1.3 and v1.4 was trying to fix. +# This new bug manifested itself when a subdirectory was +# only in one directory and had a minimum depth of at least +# 2. Everything that was originally a bug and everything I +# subsequently broke now appears to work. +# v1.4 Was finally able to reproduce the bug that was causing +# reported directories to appear to have been split +# incorrectly. Problem solved. +# v1.3 Forgot to escape the accidental meta-characters in the +# directory names. Also, I am explicitly putting both the +# "rmgdiff" shell script and this "rmgdiff.awk" awk script +# in the public domain. (It has always been in the public +# domain. This just makes it official. Use at your own +# risk.) +# v1.2 Changed the way the "rmgdiff" shell script initialized the +# RMGDIFF_GUI variable. +# v1.1 Fixed bug in "/^Binary file /" rule that used "$4" and "$6" +# instead of "$3" and "$5". +# v1.0 Initial release +# + +# +# trim_dir(dir) -- A user can enter a directory such as "dir", "dir/", +# "dir//", etc. trim_dirr() will reduce all of these +# to "dir" by removing all trailing slashes. +# +function trim_dir( dir , pos ) { + if( !dir ) + return ""; + + pos = length(dir); + while( pos > 0 ) + { + if( substr(dir, pos, 1) != "/" ) + break; + pos--; + } + + # If you made it back to the beginning, then "dir" was all slashes + # which is a synonym for the root dir. + if( pos <= 0 ) + return "/"; + else + return substr(dir, 1, pos); +} + + +# +# escape_dir(dir) -- Escape the characters in the directory name that +# are coincidentally meta characters. +# +function escape_dir(dir) { + gsub(/[[\]{}()^$. +|*?]/, "\\\\&", dir); + return dir; +} + + +# +# relative_path(full_path, upper_dir) +# +# This function strips off the upper most directory. This +# lets you report a difference just by reporting the relative +# path. Thus, "dir1/abcd/efgh" and "dir2/abcd/efgh" can be +# reported as being different by referring to "a difference in +# the abcd/efgh files that reside in both directories." +# +function relative_path( full_path, upper_dir , pos ) { + if( index(full_path, upper_dir) != 1 ) + { + print("***"); + print("*** rmgdiff.awk: Internal error. "); + print("*** " upper_dir ); + print("*** can't possibly be the base directory of "); + print("*** " full_path "."); + print("***"); + exit_flag = 1; + exit(1); + } + + pos = length(upper_dir) + 1; + full_path_len = length(full_path); + + while( pos <= full_path_len ) + { + if( substr(full_path, pos, 1) != "/") + break; + pos++; + } + + # If "pos" makes it all the way to the end of "full_path", then the + # user passed in the name of a single directory instead of a path. + if( pos == length ) + return ""; + else + return substr(full_path, pos); +} + + +# +# get_file_type() -- Returns the relevant part of the description returned +# by "file". Unlike for Linux, the "file" command for +# SGI will have in indeterminate number of spaces before +# the relevant partion. Hence the iterative solution. +# Perhaps it would be better to use 'FS= ' (?). +# +function get_file_type( file_name, \ + cmd, pos, file_type, file_type_len, next_ch) { + cmd = file_cmd " \"" file_name "\""; + if( (cmd | getline file_type) == -1) + { + print(""); + print("rmgdiff.awk: Unable to determine file type of " $2 "."); + print(" This usually occurs because you don't have any " \ + "available"); + print(" file descriptors or \"file\" is not in your path."); + print(""); + exit_flag = 1; + exit(1); + } + close(cmd); + + # Start right after the colon that always follows the file name. + pos = length(file_name) + 2; + file_type_len = length(file_type); + + # Iterate until you find the first non-space and non-tab. I did it + # like this because different versions of Unix have different spacing. + while( pos <= file_type_len ) + { + next_ch = substr(file_type, pos, 1); + if( (next_ch != " ") && (next_ch != "\t") ) + break; + pos++; + } + + if( pos > file_type_len ) + { + print("***"); + print("*** rmgdiff.awk: Internal error. Missed a file type for"); + print("*** " file_name); + print("***"); + exit_flag = 1; + exit(1); + } + + return substr(file_type, pos); +} + + +# +# add_only_in(dir, str3, str4) -- routine to convert $3 and $4 of the +# output of diff when the file is only +# in one directory into something we can +# later print. +# +function add_only_in(dir, str3, str4 , middle, fullpath, file_type) { + + middle = relative_path(str3, dir); + + if( middle == "" ) + fullpath = dir "/" str4; + else + fullpath = dir "/" middle "/" str4; + + file_type = get_file_type(fullpath); + + if( debug ) + print("file_type = " file_type); + + if( dir == dir1 ) + { + if( debug ) + print("Adding " fullpath " to only_in_dir1[" only_in_dir1_cnt "]."); + + if( show_file_types ) + only_in_dir1[only_in_dir1_cnt++] = fullpath " (" file_type ")"; + else + only_in_dir1[only_in_dir1_cnt++] = fullpath; + } + else if( dir == dir2 ) + { + if( debug ) + print("Adding " fullpath " to only_in_dir2[" only_in_dir2_cnt "]."); + + if( show_file_types ) + only_in_dir2[only_in_dir2_cnt++] = fullpath " (" file_type ")"; + else + only_in_dir2[only_in_dir2_cnt++] = fullpath; + } + else + { + print("***"); + print("*** rmgdiff.awk: Internal error. Can't figure out " \ + "\"only in\" directory."); + print("***"); + exit_flag = 1; + exit(1); + } +} + + + +# +# add_binary(full_name_1, full_name_2) +# -- Determines what type of binary a file is and adds it +# to the appropriate list for reporting later. Make +# sure "full_name_1" is the full_name associated with +# "dir1" (which is a global variable). +# + +function add_binary(full_name_1, full_name_2 , file_type_1, file_type_2) { + file_type_1 = get_file_type(full_name_1); + file_type_2 = get_file_type(full_name_2); + + if( debug ) + { + print("full_name_1 = " full_name_1); + print("full_name_2 = " full_name_2); + print("file_type_1 = " file_type_1); + print("file_type_2 = " file_type_2); + } + + if( file_type_1 ~ /executable/ && file_type_2 ~ /executable/ ) + { + if( debug ) + print("Adding " relative_path(full_name_1, dir1) \ + " to executable_files[" executable_files_cnt "]."); + + if( show_file_types ) + executable_files[executable_files_cnt++] \ + = relative_path(full_name_1, dir1) " (" file_type_1 ")"; + else + executable_files[executable_files_cnt++] \ + = relative_path(full_name_1, dir1); + } + else if( file_type_1 ~ /shared object/ && file_type_2 ~ /shared object/ ) + { + if( debug ) + print("Adding " relative_path(full_name_1, dir1) " to shared_libs[" \ + shared_libs_cnt "]."); + + if( show_file_types ) + shared_libs[shared_libs_cnt++] \ + = relative_path(full_name_1, dir1) " (" file_type_1 ")"; + else + shared_libs[shared_libs_cnt++] \ + = relative_path(full_name_1, dir1); + } + else if( file_type_1 ~ /ar archive/ && file_type_2 ~ /ar archive/ ) + { + if( debug ) + print("Adding " relative_path(full_name_1, dir1) " to static_libs[" \ + static_libs_cnt "]."); + + if( show_file_types ) + static_libs[static_libs_cnt++] \ + = relative_path(full_name_1, dir1) " (" file_type_1 ")"; + else + static_libs[static_libs_cnt++] \ + = relative_path(full_name_1, dir1); + } + else if( file_type_1 ~ /relocatable/ && file_type_2 ~ /relocatable/ ) + { + if( debug ) + print("Adding " relative_path(full_name_1, dir1) " to object_files[" \ + object_files_cnt "]."); + + if( show_file_types ) + object_files[object_files_cnt++] \ + = relative_path(full_name_1, dir1) " (" file_type_1 ")"; + else + object_files[object_files_cnt++] \ + = relative_path(full_name_1, dir1); + } + # gzip files report a date which is causing them to appear + # to be mismatched. Avoid a mismatch with this rule. + else if ( file_type_1 ~ /gzip compressed data/ && + file_type_2 ~ /gzip compressed data/ ) + { + if( debug ) + { + print("Matched a gzipped file. I'll be making up a type!!!"); + print("Adding " relative_path(full_name_1, dir1) \ + " to other_bin_files[" other_bin_files_cnt "]."); + } + + if( show_file_types ) + other_bin_files[other_bin_files_cnt++] \ + = relative_path(full_name_1, dir1) " (gzip compressed data)"; + else + other_bin_files[other_bin_files_cnt++] \ + = relative_path(full_name_1, dir1); + } + # Mismatched types. + else if ( file_type_1 !~ file_type_2 ) + { + if( debug ) + { + print("Adding " relative_path(full_name_1, dir1) \ + " to mismatched_files[" mismatched_files_cnt "]."); + print("File types differ!"); + } + + mismatched_files[mismatched_files_cnt++] \ + = relative_path(full_name_1, dir1) \ + " (Types differ. See next two lines.)\n" \ + " " dir1 ": (" file_type_1 ")\n" \ + " " dir2 ": (" file_type_2 ")"; + } + else + { + if( debug ) + print("Adding " relative_path(full_name_1, dir1) \ + " to other_bin_files[" other_bin_files_cnt "]."); + + if( show_file_types ) + other_bin_files[other_bin_files_cnt++] \ + = relative_path(full_name_1, dir1) " (" file_type_1 ")"; + else + other_bin_files[other_bin_files_cnt++] \ + = relative_path(full_name_1, dir1); + } +} + + +# +# add_text(full_name_1, full_name_2, file_type_1, file_type2) +# -- We don't really need to "add" an entry to note that +# we have found a text file. Instead, we go ahead and +# print out the file's name and start up the GUI. +# +function add_text(full_name_1, full_name_2, file_type_1, file_type_2) { + if( debug ) + { + print("full_name_1 = " full_name_1); + print("full_name_2 = " full_name_2); + print("file_type_1 = " file_type_1); + print("file_type_2 = " file_type_2); + } + + if( first_diff ) + { + printf("\n*** DIFFERENT TEXT FILES ***\n\n"); + first_diff = 0; + } + + if( file_type_1 == file_type_2 ) + if( show_file_types ) + print(relative_path(full_name_1, dir1) " (" file_type_1 ")"); + else + print(relative_path(full_name_1, dir1)); + else + { + print("====="); + print(relative_path(full_name_1, dir1) " (Types differ. " \ + "See next two lines)"); + print(" " dir1 ": (" file_type_1 ")"); + print(" " dir2 ": (" file_type_2 ")"); + print("====="); + } + + if(use_gui) + system(rmgdiff_gui " \"" full_name_1 "\" \"" full_name_2 "\""); +} + + +# +# add_text_or_binary(full_name_1, full_name_2) +# -- Used to detect whether we have text files that differ +# or something else. It sure would be nice if we could +# pass these strings by reference. +# +function add_text_or_binary(full_name_1, full_name_2 , file_type_1, file_type_2) +{ + file_type_1 = get_file_type(full_name_1); + file_type_2 = get_file_type(full_name_2); + + if( (file_type_1 ~ /text/ || file_type_1 ~ /^empty$/) && + (file_type_2 ~ /text/ || file_type_2 ~ /^empty$/) ) + { + add_text(full_name_1, full_name_2, file_type_1, file_type_2); + } + else + { + add_binary(full_name_1, full_name_2); + } +} + + + +function check_exec(exec , cmd) { + cmd="type \"" exec "\" 1>/dev/null 2>&1"; + if( system(cmd) != 0 ) + { + printf("\nrmgdiff.awk: " exec " isn't executable.\n\n"); + exit_flag = 1; + exit(1); + } +} + + +function check_dir(dir , cmd) { + cmd = "[ -d \"" dir "\" ]"; + if( system(cmd) != 0 ) + { + printf("\nrmgdiff.awk: \"" dir "\" isn't a directory.\n\n"); + exit_flag = 1; + exit(1); + } +} + + +function check_external_executables() { + # You only need a gui if debug is off. Default to "mgdiff" if + # the user does not pass in a value. + if(use_gui && !rmgdiff_gui) + { + rmgdiff_gui = "mgdiff"; + } + check_exec(rmgdiff_gui); + + if(!file_cmd) + { + file_cmd = "file"; + } + check_exec(file_cmd); + + check_dir(dir1); + check_dir(dir2); +} + +# +# get_full_names(raw_diff_line, dir1, dir2, full_names) +# -- This function takes the raw output of "diff -rq" for lines of +# the form "... and differ" and returns +# and in "full_names[1]" and "full_names[2]" respectively. +# A special function is needed in order to account for those +# cases where the file names have embedded spaces. +# +function get_full_names(raw_diff_line, dir1, dir2, full_names , regex) { + # + # full_names[2] -- The first call to gsub() strips off the trailing + # "differ". The second call to gsub() strips from the beginning of + # the string to the "and" that precedes . In case you missed + # it, we are calculating full_names[2] [sic] first. + # + full_names[2] = raw_diff_line; + gsub(/ differ$/, "", full_names[2]); + gsub("^.* and (" dir2 ")", dir2, full_names[2]); + + # + # full_names[1] -- The first call to gsub() strips off the trailing + # "and differ". The second call to gsub() strips from the + # beginning of the string up to . + # + full_names[1] = raw_diff_line; + sub(" and " full_names[2] " differ$", "", full_names[1]); + sub("^.* " dir1, dir1, full_names[1]); + + if( debug ) { + print("full_names[1] = " full_names[1]); + print("full_names[2] = " full_names[2]); + } +} + + + +BEGIN { + if( debug ) + print("Start BEGIN"); + + if( version ) + { + printf("\nrmgdiff.awk: v1.8.1\n\n"); + exit_flag = 1; + exit 1; + } + + first_diff = 1; # Flag. + + check_external_executables(); + + if( debug ) + { + print("dir1 = " dir1); + print("dir2 = " dir2); + } + + dir1 = trim_dir(dir1); + dir2 = trim_dir(dir2); + + if( debug ) + { + print("Trimmed dir1 to " dir1); + print("Trimmed dir2 to " dir2); + print(""); + } + + # When you want to match regular expressions, you need to escape any + # meta characters. For example, if your directory where "c++_src", + # and you try to do the match in the /^Only in/ that checks the + # following: + # + # if( "c++_src" ~ "^" "c++_src" ) + # + # it will fail because the "++" in the last term are meta characters + # that aren't matched. + dir1_escaped = escape_dir(dir1); + dir2_escaped = escape_dir(dir2); + + if( debug ) + { + print("dir1 escaped to " dir1_escaped); + print("dir2 escaped to " dir2_escaped); + } + + if( length(dir1_escaped) >= length(dir2_escaped) ) { + longer_dir = dir1; + longer_dir_escaped = dir1_escaped; + shorter_dir = dir2; + shorter_dir_escaped = dir2_escaped; + } else { + longer_dir = dir2; + longer_dir_escaped = dir2_escaped; + shorter_dir = dir1; + shorter_dir_escaped = dir1_escaped; + } + + if( debug ) + { + print("longer_dir = " longer_dir); + print("longer_dir_escaped = " longer_dir_escaped); + print("shorter_dir = " shorter_dir); + print("shorter_dir_escaped = " shorter_dir_escaped); + } + +} + + +{ + # Show the current line. + if( debug ) + print("Current line: " $0); +} + + + +# Find the files that differ. Filter out the VCS entries. Call mgdiff +# if the file is a text file. If the file is a binary, save it for later. +/^Files / { + if( debug ) + print("Start Text and Binary files"); + + if( !use_cvs && $0 ~ /[ \/](CVS|.bzr|.git|.svn)([ \/:]|$)/ ) + { + if( debug ) + print("Skipping VCS file.\n"); + next; + } + + full_names[1] = ""; + full_names[2] = ""; + get_full_names($0, dir1, dir2, full_names); + + add_text_or_binary(full_names[1], full_names[2]); +} + + +# This is here for compatibility with the older version of GNU diff +# that reported binary and text file differences separately. +/^Binary files / { + if( debug ) + print("Start Binary files only"); + + if( !use_cvs && $0 ~ /[ \/](CVS|.bzr|.git|.svn)([ \/:]|$)/ ) + { + if( debug ) + print("Skipping VCS file.\n"); + next; + } + + full_names[1] = ""; + full_names[2] = ""; + get_full_names($0, dir1, dir2, full_names); + + add_binary(full_names[1], full_names[2]); +} + +# Find the files that are only in one of the directories. Filter out +# the VCS entries. Sort into two arrays for later printing. +/^Only in / { + if( debug ) + print("Start Only in"); + + if( !use_cvs && $0 ~ /[ \/](CVS|.bzr|.git|.svn)([ \/:]|$)/ ) + { + if( debug ) + print("Skipping VCS file.\n"); + next; + } + + # Find the directory. + only_in_dir = substr($0, length("Only in ") + 1); + gsub(/: .*$/, "", only_in_dir); + + # Find the file that is only in "only_in_dir". + only_file = $0; + gsub(/^.*: /, "", only_file); + + if( debug ) + { + print("only_in_dir = " only_in_dir); + print("only_file = " only_file); + } + + # + # A space means to concatenate the strings. So, + # + # only_in_dir ~ "^" longer_dir_escaped + # + # + # means you have a match if only_in_dir begins with longer_dir_escaped. + # + # You have to NOT anchor the end of the string to match. The reason + # is that you could easily get the situation where a file or + # directory is only in one of the directories you are recursively + # diffing, and it has a depth of 2 or more. (Note, "depth" here is + # the same concept as the "find" command's "-maxdepth" parameter.) + # This means you don't know what is going to be at the end of only_in_dir. + # + # You have to test the longer directory first because you might be + # diffing two directories named something like "my_dir" and + # "my_dir-v1.0". If you tested the shorter directory first, you + # would always get a match because when only_in_dir is the longer directory, + # it too matches the shorter directory. + # + + if( only_in_dir ~ "^" longer_dir_escaped ) { + add_only_in(longer_dir, only_in_dir, only_file); + } + else if( only_in_dir ~ "^" shorter_dir_escaped ) { + add_only_in(shorter_dir, only_in_dir, only_file); + } else { + print("***"); + print("*** rmgdiff.awk: Internal error. Missed an \"only in\"."); + print("*** only_in_dir = " only_in_dir); + print("***"); + exit_flag = 1; + exit(1); + } + +} + + +# Just print a line to separate output for each pass. +{ + if( debug ) + print(""); +} + + +# Print out the entries you earlier saved to an array. +END { + if( !exit_flag ) + { + + # I decided to not create a separate function for printing + # reports because you can't pass these potentially large + # arrays by reference. + + if( executable_files_cnt ) + { + printf("\n*** DIFFERENT EXECUTABLES ***\n\n"); + for( i = 0 ; i < executable_files_cnt ; i++ ) + print(executable_files[i]); + } + + if( shared_libs_cnt ) + { + printf("\n*** DIFFERENT SHARED LIBRARIES ***\n\n"); + for( i = 0 ; i < shared_libs_cnt ; i++ ) + print(shared_libs[i]); + } + + if( static_libs_cnt ) + { + printf("\n*** DIFFERENT STATIC LIBRARIES ***\n\n"); + for( i = 0 ; i < static_libs_cnt ; i++ ) + print(static_libs[i]); + } + + if( object_files_cnt ) + { + printf("\n*** DIFFERENT OBJECT FILES ***\n\n"); + for( i = 0 ; i < object_files_cnt ; i++ ) + print(object_files[i]); + } + + if( other_bin_files_cnt ) + { + printf("\n*** OTHER DIFFERENT BINARY FILES ***\n\n"); + for( i = 0 ; i < other_bin_files_cnt ; i++ ) + print(other_bin_files[i]); + } + + if( only_in_dir1_cnt ) + { + printf("\n*** FILES ONLY IN %s ***\n\n", dir1); + for( i = 0 ; i < only_in_dir1_cnt ; i++ ) + print(only_in_dir1[i]); + } + + if( only_in_dir2_cnt ) + { + printf("\n*** FILES ONLY IN %s ***\n\n", dir2); + for( i = 0 ; i < only_in_dir2_cnt ; i++ ) + print(only_in_dir2[i]); + } + + if( mismatched_files_cnt ) + { + printf("\n*** WARNING: MISMATCHED FILES ***\n\n"); + for( i = 0 ; i < mismatched_files_cnt ; i++ ) + print(mismatched_files[i]); + } + + print(""); + } +} --- mgdiff-1.0.orig/debian/rules +++ mgdiff-1.0/debian/rules @@ -0,0 +1,69 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=mgdiff + +build: build-arch +build-arch: + dh_testdir + xmkmf + make depend XMULIBONLY="" + make XMULIBONLY="" + touch build + +clean: + dh_testdir + rm -f build + make clean + rm -f `find . -name "*~"` + rm -rf debian/mgdiff debian/files* core debian/substvars debian/tmp + dh_clean + +binary-indep: build + dh_testdir + dh_testroot +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + -rm -rf debian/mgdiff + install -d debian/mgdiff debian/mgdiff/usr/bin debian/mgdiff/usr/share/man/man1 debian/mgdiff/usr/share/doc/mgdiff + make install BINDIR=`pwd`/debian/mgdiff/usr/bin \ + XAPPLOADDIR=`pwd`/debian/mgdiff/etc/X11/app-defaults \ + XMULIBONLY="" + make install.man MANDIR=`pwd`/debian/mgdiff/usr/share/man/man1 XMULIBONLY="" + mkdir -p debian/mgdiff/usr/lib/rmgdiff + install -m 755 debian/rmgdiff debian/mgdiff/usr/lib/rmgdiff + install -m 644 debian/rmgdiff.awk debian/mgdiff/usr/lib/rmgdiff + ln -s ../lib/rmgdiff/rmgdiff debian/mgdiff/usr/bin + install -m 755 debian/cvsmgdiff debian/mgdiff/usr/bin + install -m 644 debian/cvsmgdiff.1 debian/mgdiff/usr/share/man/man1 + install -m 644 debian/rmgdiff.1x debian/mgdiff/usr/share/man/man1 + install -m 644 debian/mgdiff.README debian/mgdiff/usr/share/doc/mgdiff + install -m 755 debian/viewpatch debian/mgdiff/usr/share/doc/mgdiff + chmod u+w debian/mgdiff/usr/share/man/man1/mgdiff.1x + chmod u+w debian/mgdiff/etc/X11/app-defaults/Mgdiff + dh_testdir + dh_installdirs + dh_installdocs + dh_installman + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +build-indep: + +.PHONY: binary binary-arch binary-indep clean --- mgdiff-1.0.orig/debian/viewpatch +++ mgdiff-1.0/debian/viewpatch @@ -0,0 +1,33 @@ +#!/bin/sh +## +# +# (C) Roger Gammans 2001 (rgammans@computer-surgery.co.uk). +# +# Please distribute under the GPL. +# +# It's probably better to rely on the $PATH +# to find the various external bits as they more likey +# to be in it somewhere than one particluar location +# over many unices. +# + +FNAME=`tempfile` || { echo "$0: Cannot create temporary file" >&2; exit 1; } +trap " [ -f \"$FNAME\" ] && /bin/rm -f -- \"$FNAME\"" 0 1 2 3 13 15 + +ORIG=$1 +PATCH=$2 + +shift 2 + +if [ -z "$ORIG" ] || [ ! -e "$ORIG" ] ; then + echo "$0: original file '$ORIG' does not exist" +fi +if [ -z "$PATCH" ] || [ ! -e "$PATCH" ] ; then + echo "$0: original file '$ORIG' does not exist" +fi + + +cp $ORIG $FNAME; +if patch $* $FNAME < $PATCH; then mgdiff $ORIG $FNAME; fi + +exit 0 --- mgdiff-1.0.orig/externs.h +++ mgdiff-1.0/externs.h @@ -28,7 +28,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef lint +#if 0 static char rcsid_externs_h[] = "externs.h,v 2.0 1994/05/19 02:01:05 dan Exp"; #endif @@ -43,7 +43,7 @@ extern DiffInfo *build_diff_info (char *prog, char *args, char *path1, char *path2); extern int max (int i, int j); extern int min (int i, int j); -extern int copy_to_file (FILE *fin, char *name); +extern int copy_to_tempfile (FILE *fin, char *name, size_t name_len); extern void set_cursor (Widget w); extern void reset_cursor (Widget w); extern Widget get_top_shell (Widget w); @@ -61,5 +61,6 @@ extern void turn_off_sash_traversal (Widget pane); extern void show_legend (Widget parent); extern void show_context (Widget parent); +extern void save_as_filename (Widget parent, Block *b, char *name); #endif --- mgdiff-1.0.orig/files.c +++ mgdiff-1.0/files.c @@ -1,9 +1,10 @@ -#ifndef lint +#if 0 static char rcsid[] = "files.c,v 2.0 1994/05/19 02:01:06 dan Exp"; #endif /* * Copyright (c) 1994 Daniel Williams + * Copyright (c) 2003 Erik de Castro Lopo * * The X Consortium, and any party obtaining a copy of these files from * the X Consortium, directly or indirectly, is granted, free of charge, @@ -83,16 +84,18 @@ */ static int is_ascii_text (char *filename) { - int fd, bytes, i; + int fd, bytes, i, ch; char buffer[1024]; fd = open (filename, O_RDONLY); bytes = read (fd, (void *) buffer, 1024); (void) close (fd); - for (i = 0; i < bytes; i++) - if (!isascii (buffer[i])) + for (i = 0; i < bytes; i++) { + ch = buffer [i]; + if (!isallowed(ch)) return (0); + } return (1); } @@ -143,7 +146,7 @@ XmString xms; Arg args[2]; - (void) sprintf (buffer, "%s: %s", msg1, msg2); + (void) snprintf (buffer, sizeof (buffer), "%s: %s", msg1, msg2); xms = XmStringCreateLtoR (buffer, XmSTRING_DEFAULT_CHARSET); XtSetArg (args[0], XmNmessageString, xms); XtSetArg (args[1], XmNdialogStyle, XmDIALOG_PRIMARY_APPLICATION_MODAL); @@ -318,7 +321,7 @@ Arg args[2]; int i; char *dir; - XmString xms; + XmString xms = NULL ; shell = XtVaCreatePopupShell ("openfiles", xmDialogShellWidgetClass, parent, XmNallowShellResize, True, @@ -424,7 +427,7 @@ Arg args[2]; int i; char *dir; - XmString xms; + XmString xms = NULL ; i = 0; XtSetArg (args[i], XmNdeleteResponse, XmDO_NOTHING); i++; @@ -477,7 +480,7 @@ Arg args[2]; int i; char *dir; - XmString xms; + XmString xms = NULL ; i = 0; XtSetArg (args[i], XmNdeleteResponse, XmDO_NOTHING); i++; @@ -533,7 +536,7 @@ if (access (filename, W_OK) == 0) { /* file exists and can be written */ char buffer[1024]; - (void) sprintf (buffer, "Overwrite \"%s\"?", filename); + (void) snprintf (buffer, sizeof (buffer), "Overwrite \"%s\"?", filename); if (modal_question (w, "Mgdiff Save Question", buffer)) { set_cursor (shell); if ((status = really_save_file (filename, (Block *) closure)) != 0) { @@ -569,7 +572,7 @@ Arg args[3]; int i; char *dir; - XmString xms; + XmString xms = NULL ; i = 0; XtSetArg (args[i], XmNdialogStyle, XmDIALOG_PRIMARY_APPLICATION_MODAL); i++; @@ -618,18 +621,32 @@ return (status); } else if ((b->arr[LEFT].type == DIFF) && (b->arr[RIGHT].type == DIFF)) { - assert (b->selected != NEITHER); + switch (b->selected) { + case BOTH: + fprintf (file, "<<<<<<< diff from left file\n"); + if ((status = write_chunk (file, &b->arr[LEFT])) != 0) + return (status); + fprintf (file, "========\n"); + if ((status = write_chunk (file, &b->arr[RIGHT])) != 0) + return (status); + fprintf (file, ">>>>>>> diff from right file\n"); + break; + case LEFT: + case RIGHT: if ((status = write_chunk (file, &b->arr[b->selected])) != 0) return (status); + break; + case NEITHER: + break; + default : assert (False); + } } else if ((b->arr[LEFT].type == INSERT) && (b->arr[RIGHT].type == BLANK)) { - assert (b->selected != NEITHER); if (b->selected == LEFT) if ((status = write_chunk (file, &b->arr[LEFT])) != 0) return (status); } else if ((b->arr[LEFT].type == BLANK) && (b->arr[RIGHT].type == INSERT)) { - assert (b->selected != NEITHER); if (b->selected == RIGHT) if ((status = write_chunk (file, &b->arr[RIGHT])) != 0) return (status); @@ -669,3 +686,45 @@ return (0); } + +void save_as_filename (Widget parent, Block *closure, char *filename) +{ + char *title = "Mgdiff Save Error"; + int status; + Widget shell = get_top_shell (parent); + + if (access (filename, W_OK) == 0) { + /* file exists and can be written */ + char buffer[1024]; + + (void) snprintf (buffer, sizeof (buffer), "Overwrite \"%s\"?", filename); + if (modal_question (parent, "Mgdiff Save Question", buffer)) { + set_cursor (shell); + if ((status = really_save_file (filename, (Block *) closure)) != 0) { + reset_cursor (shell); + werror (parent, title, filename, strerror (status)); + return; + } + reset_cursor (shell) ; + } + } + else { + /* file can't be written to */ + if (errno == ENOENT) { + /* because it doesn't exist */ + set_cursor (shell); + if ((status = really_save_file (filename, (Block *) closure)) != 0) { + reset_cursor (shell); + werror (parent, title, filename, strerror (status)); + return; + } + reset_cursor (shell); + } + else { + /* for some other reason */ + werror (parent, title, filename, strerror (errno)); + return; + } + } + +} /* save_as_filename */ --- mgdiff-1.0.orig/legend.c +++ mgdiff-1.0/legend.c @@ -1,4 +1,4 @@ -#ifndef lint +#if 0 static char rcsid[] = "legend.c,v 2.0 1994/05/19 02:01:08 dan Exp"; #endif --- mgdiff-1.0.orig/manual.c +++ mgdiff-1.0/manual.c @@ -1,4 +1,4 @@ -#ifndef lint +#if 0 static char rcsid[] = "manual.c,v 2.0 1994/05/19 02:01:09 dan Exp"; #endif @@ -134,14 +134,14 @@ if (value == NULL) { /* system calls in popen failed */ char buffer[1024]; - (void) sprintf (buffer, "System routine \"popen\" failed executing\nthis command (resource \"manCommand\"):\n\n\"%s\"", cmd); + (void) snprintf (buffer, sizeof (buffer), "System routine \"popen\" failed executing\nthis command (resource \"manCommand\"):\n\n\"%s\"", cmd); xms = XmStringCreateLtoR (buffer, XmSTRING_DEFAULT_CHARSET); iserror = 1; } else if (value[0] == '\0') { /* command produced no output */ char buffer[1024]; - (void) sprintf (buffer, "Shell command (resource \"manCommand\"):\n\n\"%s\"\n\nproduced no output", cmd); + (void) snprintf (buffer, sizeof (buffer), "Shell command (resource \"manCommand\"):\n\n\"%s\"\n\nproduced no output", cmd); xms = XmStringCreateLtoR (buffer, XmSTRING_DEFAULT_CHARSET); iserror = 1; } @@ -151,7 +151,7 @@ if ((tmp = strrchr (value, '\n')) != NULL) *tmp = '\0'; - (void) sprintf (buffer, "Shell command (resource \"manCommand\"):\n\n \"%s\"\n\nproduced this output: \n\n \"%s\"", cmd, value); + (void) snprintf (buffer, sizeof (buffer), "Shell command (resource \"manCommand\"):\n\n \"%s\"\n\nproduced this output: \n\n \"%s\"", cmd, value); xms = XmStringCreateLtoR (buffer, XmSTRING_DEFAULT_CHARSET); iserror = 1; } --- mgdiff-1.0.orig/mgdiff.c +++ mgdiff-1.0/mgdiff.c @@ -1,13 +1,14 @@ -#ifndef lint +#if 0 static char rcsid[] = "mgdiff.c,v 2.1 1994/09/29 01:56:53 dan Exp"; #endif -#ifndef lint +#if 0 static char copyright[] = "Copyright (c) 1994, Daniel Williams"; #endif /* * Copyright (c) 1994 Daniel Williams + * Copyright (c) 2003 Erik de Castro Lopo * * The X Consortium, and any party obtaining a copy of these files from * the X Consortium, directly or indirectly, is granted, free of charge, @@ -40,6 +41,7 @@ #include #include #include +#include #include #include @@ -99,7 +101,7 @@ static void show_version (Widget parent); static void update_overall (void); static void refresh (void); -static void toggle_saveas_sensitive (Boolean sensitive); +static void toggle_saveas_sensitive (Boolean saveas, Boolean save_left, Boolean save_right); static void exit_cb (Widget w, XtPointer closure, XtPointer call_data); static void Select (Widget widget, XEvent *event, String *params, Cardinal *num_params); static void Scroll (Widget widget, XEvent *event, String *params, Cardinal *num_params); @@ -109,9 +111,15 @@ static void unselect_all (void); static Boolean all_selected (void); static Dimension get_preferred_width (Widget w); -static char *basename (char *name); +static char *mgdiff_basename (char *name); +static void reload_both (void); -#define APP_DEFAULTS_VERSION 1 +enum { + WIDGET_LEFT = 0x10000000, + WIDGET_RIGHT = 0x20000000 +} ; + +#define APP_DEFAULTS_VERSION 2 /* * treat failure to find the resources from the application defaults @@ -120,10 +128,16 @@ */ static String fallbacks[] = { "*menubar.button_0.XmString: File", - "*file_menu*button_4.XmString: Exit", + "*file_menu*button_6.XmString: Exit", NULL }; +static char unselected_text_msg [] = + "Unselected blocks remain.\n\n" + "Press Cancel to go back to correct this.\n" + "Pressing OK will save the merged data with all unselected\n" + "blocks absent from the output file." ; + static XrmOptionDescRec option_table[] = { {"-quit", "quitIfSame", XrmoptionNoArg, "true"}, {"-args", "diffArgs", XrmoptionSepArg, NULL}, @@ -137,6 +151,7 @@ static struct screenstate { Block *b; + Block *lastSelected; int topline; int leftcol; int sindex, findex[2]; @@ -170,7 +185,7 @@ static char *str_fnamel, *str_fnamer; static char *str_snamel, *str_snamer; -static char *tempfname; +static char tempfname [512] = "" ; static char *user_filename; char *progname; @@ -195,8 +210,11 @@ * anyway) and less complex than turning on and correctly processing * GraphicsExpose events. */ -static int statel = VisibilityFullyObscured; -static int stater = VisibilityFullyObscured; + +/* Make the initial state unobscured. */ +static int statel = VisibilityUnobscured; +static int stater = VisibilityUnobscured; + /* ARGSUSED1 */ static void Visible (Widget widget, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch) @@ -398,23 +416,37 @@ Region region; Block *b; GC fore, back; - int columns; - + int columns, widget_side; + + Side x_selection = NEITHER; + Block *curr_x_block = newss.lastSelected; + + if (curr_x_block) { + x_selection = curr_x_block->selected; + } + XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL); XtAddExposureToRegion (cbs->event, region = XCreateRegion ()); columns = (int) width / font_width + 1; + if (w == textl) + widget_side = WIDGET_LEFT; + else if (w == textr) + widget_side = WIDGET_RIGHT; + else + assert (False); + itemp = newss.sindex; ypos = 0; for (b = newss.b; b != NULL; b = b->next) { int j; Chunk *ths, *oth; - if (w == textl) { + if (widget_side == WIDGET_LEFT) { ths = &b->arr[LEFT]; oth = &b->arr[RIGHT]; - if (b->selected == LEFT) { + if (b->selected == LEFT || b->selected == BOTH) { fore = gcfore[4]; back = gcback[4]; } @@ -423,10 +455,10 @@ back = gcback[ths->type]; } } - else if (w == textr) { + else if (widget_side == WIDGET_RIGHT) { ths = &b->arr[RIGHT]; oth = &b->arr[LEFT]; - if (b->selected == RIGHT) { + if (b->selected == RIGHT || b->selected == BOTH) { fore = gcfore[4]; back = gcback[4]; } @@ -536,16 +568,36 @@ set_cursor (toplevel); open_right_file (toplevel, str_fnamer); break; - case 3: /* save as */ - if (all_selected ()) { - set_cursor (toplevel); - save_file (toplevel, di->first, str_fnamel); + case 3: /* refresh */ + reload_both(); + break; + case 4: /* save as */ + if (all_selected () == False) { + if (modal_question (toplevel, "Mgdiff Save", unselected_text_msg) == False) + break; } - else { - werror (toplevel, "Save Error", "Save", "there are unselected text blocks"); + save_file (toplevel, di->first, str_fnamel); + break; + case 5: /* save as left */ + if (all_selected () == False) { + if (modal_question (toplevel, "Mgdiff Save", unselected_text_msg) == False) + break; } + set_cursor (toplevel); + save_as_filename (toplevel, di->first, str_fnamel); + reset_cursor (toplevel); break; - case 4: /* exit */ + case 6: /* save as right */ + if (all_selected () == False) { + if (modal_question (toplevel, "Mgdiff Save", unselected_text_msg) == False) + break; + } + set_cursor (toplevel); + save_as_filename (toplevel, di->first, str_fnamer); + reset_cursor (toplevel); + + break; + case 7: /* exit */ exit_cb (w, NULL, NULL); break; default: @@ -724,7 +776,6 @@ dagcb = XtGetGC (children[1], GCForeground|GCBackground, &gc_values); been_here = 1; } - for (i = 0; i < 3; i++) { XtVaGetValues (children[i], XmNwidth, &width[i], @@ -755,7 +806,7 @@ yfpos[LEFT] += b->arr[LEFT].fsize; h = ((int) height[0] * yfpos[LEFT] / max (di->flines[LEFT], 1)) - y; y3 = ((h == 0) ? y1 : (y1 + h - 1)); - back = (b->selected == LEFT) ? 4 : b->arr[LEFT].type; + back = (b->selected == LEFT || b->selected == BOTH) ? 4 : b->arr[LEFT].type; XFillRectangle (XtDisplay (children[0]), p[0], gcback[back], 0, y, width[0], h); @@ -763,7 +814,7 @@ yfpos[RIGHT] += b->arr[RIGHT].fsize; h = ((int) height[2] * yfpos[RIGHT] / max (di->flines[RIGHT], 1)) - y; y4 = ((h == 0) ? y2 : (y2 + h - 1)); - back = (b->selected == RIGHT) ? 4 : b->arr[RIGHT].type; + back = (b->selected == RIGHT || b->selected == BOTH) ? 4 : b->arr[RIGHT].type; XFillRectangle (XtDisplay (children[2]), p[2], gcback[back], 0, y, width[2], h); @@ -906,6 +957,7 @@ */ static char *foo3 = "\ : Select() \n\ + : Select() \n\ ~Ctrl osfPageDown: Scroll(PageDown) \n\ ~Ctrl osfPageUp: Scroll(PageUp) \n\ osfLeft: Scroll(Left) \n\ @@ -951,8 +1003,9 @@ */ static void cleanup_at_exit (void) { - if (tempfname != NULL) + if (strlen (tempfname) > 0) (void) unlink (tempfname); + tempfname [0] = 0 ; } /* @@ -1018,8 +1071,11 @@ {"debug", "Debug", XtRBoolean, sizeof (Boolean), 0, XtRString, "false"}, {"filename", "Filename", XtRString, sizeof (String), 0, XtRString, ""}}; - progname = basename (argv[0]); + progname = mgdiff_basename (argv[0]); + XtSetLanguageProc (NULL, NULL, NULL); + setlocale (LC_ALL, ""); + setlocale (LC_CTYPE, "en"); toplevel = XtVaAppInitialize (&app, "Mgdiff", option_table, XtNumber (option_table), #if X11R5 &argc, @@ -1079,7 +1135,6 @@ }; werror_long (toplevel, "Wrong Application Defaults", array, sizeof (array) / sizeof (array[0])); } - if (debug_flag) { XSetErrorHandler (x_error_handler); XtAppSetErrorHandler (app, xt_error_handler); @@ -1087,7 +1142,10 @@ else XtAppSetWarningHandler (app, xt_warning_handler); -#if sun +#if 0 + /* May possibly be required on some old versions of SunOS. + ** Definitely not required on Solaris. + */ (void) on_exit (cleanup_at_exit, NULL); #else (void) atexit (cleanup_at_exit); @@ -1109,14 +1167,17 @@ * two filenames on command line; process them */ case 3: + if (strcmp (argv[1], "-") == 0 && strcmp (argv[2], "-") == 0) { + (void) fprintf (stderr, "Cannot use stdin for both file input\n"); + exit (2); + } if (strcmp (argv[1], "-") == 0) { - tempfname = tempnam (NULL, "mgdif"); - str_fnamel = strdup (tempfname); - str_snamel = strdup (user_filename); - if (!copy_to_file (stdin, tempfname)) { + if (!copy_to_tempfile (stdin, tempfname, sizeof (tempfname))) { (void) fprintf (stderr, "Error copying stdin to temp file \"%s\"\n", tempfname); exit (2); } + str_fnamel = strdup (tempfname); + str_snamel = strdup (user_filename); } else if (!file_tests (toplevel, argv[1])) { no_files_flag = True; @@ -1131,13 +1192,12 @@ } if (strcmp (argv[2], "-") == 0) { - tempfname = tempnam (NULL, "mgdif"); - str_fnamer = strdup (tempfname); - str_snamer = strdup (user_filename); - if (!copy_to_file (stdin, tempfname)) { + if (!copy_to_tempfile (stdin, tempfname, sizeof (tempfname))) { (void) fprintf (stderr, "Error copying stdin to temp file \"%s\"\n", tempfname); exit (2); } + str_fnamer = strdup (tempfname); + str_snamer = strdup (user_filename); } else if (!file_tests (toplevel, argv[2])) { no_files_flag = True; @@ -1174,6 +1234,7 @@ } newss.b = di->first; + newss.lastSelected= NULL; newss.topline = newss.sindex = newss.findex[LEFT] = newss.findex[RIGHT] = 0; mainw = XtVaCreateManagedWidget ("mainw", xmMainWindowWidgetClass, @@ -1205,10 +1266,14 @@ XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, XmVaSEPARATOR, XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, + XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, + XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, + XmVaSEPARATOR, + XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, NULL); if (no_files_flag || (di->status == 2)) { toggle_openlr_sensitive (False); - toggle_saveas_sensitive (False); + toggle_saveas_sensitive (False, False, False); } XmVaCreateSimplePulldownMenu (menubar, "view_menu", 1, view_cb, XmVaPUSHBUTTON, NULL, NULL, NULL, NULL, @@ -1491,6 +1556,7 @@ XtAppMainLoop (app); /* NOTREACHED */ + return 0; } static void redraw_partial_vert (Widget w) @@ -1622,9 +1688,9 @@ { char buffer[16]; - (void) sprintf (buffer, "%*d", linenum_columns, l); + (void) snprintf (buffer, sizeof (buffer), "%*d", linenum_columns, l); XmTextFieldSetString (linenuml, buffer); - (void) sprintf (buffer, "%*d", linenum_columns, r); + (void) snprintf (buffer, sizeof (buffer), "%*d", linenum_columns, r); XmTextFieldSetString (linenumr, buffer); } @@ -1986,7 +2052,7 @@ mgdiff_width, mgdiff_height, fg, bg, DefaultDepth (dpy, DefaultScreen (dpy))); - (void) sprintf (buffer, "mgdiff\n\nA graphical difference browser\n\nAuthor: Dan Williams (dan@sass.com)\nVersion: %s PL%s", VERSION, PATCHLEVEL); + (void) snprintf (buffer, sizeof (buffer), "mgdiff\n\nA graphical difference browser\n\nAuthors: Dan Williams (dan@sass.com)\nErik de Castro Lopo (erikd@mega-nerd.com)\n\nVersion: %s PL%s", VERSION, PATCHLEVEL); XtVaSetValues (dialog, XmNautoUnmanage, True, @@ -2020,6 +2086,42 @@ newss.findex[RIGHT] = value; } +/* Re-run diff on the current files and update the display */ +void reload_both(void) +{ + DiffInfo *newdi; + + set_cursor (toplevel); + + if (no_files_flag == True) { + /* Currently there are no files, + so don't do anything */ + return; + } + + newdi = build_diff_info (diffcmd, diffargs, str_fnamel, str_fnamer); + + free_diff_info (di); + di = newdi; + if (di->status == 2) { + no_files_flag = True; + toggle_openlr_sensitive (False); + toggle_saveas_sensitive (False, False, False); + free (str_fnamel); + free (str_snamel); + free (str_fnamer); + free (str_snamer); + str_snamel = strdup ("(no file)"); + str_snamer = strdup ("(no file)"); + str_fnamel = str_fnamer = NULL; + } + refresh (); + fake_adjust_label (fnamel); + reset_cursor (toplevel); + + handle_diff_errors (di); +} + void process_both_files (char *file1, char *name1, char *file2, char *name2) { DiffInfo *newdi; @@ -2041,12 +2143,12 @@ if (di->status != 2) { no_files_flag = False; toggle_openlr_sensitive (True); - toggle_saveas_sensitive (True); + toggle_saveas_sensitive (True, True, True); } else { no_files_flag = True; toggle_openlr_sensitive (False); - toggle_saveas_sensitive (False); + toggle_saveas_sensitive (False, False, False); free (str_fnamel); free (str_snamel); free (str_fnamer); @@ -2082,7 +2184,7 @@ if (di->status == 2) { no_files_flag = True; toggle_openlr_sensitive (False); - toggle_saveas_sensitive (False); + toggle_saveas_sensitive (False, False, False); free (str_fnamel); free (str_snamel); free (str_fnamer); @@ -2117,7 +2219,7 @@ if (di->status == 2) { no_files_flag = True; toggle_openlr_sensitive (False); - toggle_saveas_sensitive (False); + toggle_saveas_sensitive (False, False, False); free (str_fnamel); free (str_snamel); free (str_fnamer); @@ -2133,6 +2235,7 @@ handle_diff_errors (di); } + static void refresh (void) { newss.b = di->first; @@ -2182,9 +2285,11 @@ toggle_openlr_sensitive (sensitive); } -static void toggle_saveas_sensitive (Boolean sensitive) +static void toggle_saveas_sensitive (Boolean saveas, Boolean save_left, Boolean save_right) { - XtSetSensitive (XtNameToWidget (file_menu, "button_3"), sensitive); + XtSetSensitive (XtNameToWidget (file_menu, "button_4"), saveas); + XtSetSensitive (XtNameToWidget (file_menu, "button_5"), save_left); + XtSetSensitive (XtNameToWidget (file_menu, "button_6"), save_right); } /* @@ -2196,78 +2301,263 @@ exit ((di != NULL) ? di->status : 2); } +static void lost_selection ( Widget widget, Atom* selection) { + + if (debug_flag) { + fprintf(stderr,"selection lost on widget %p\n",widget); + } +// newss.lastSelected=NULL; +} + +static Boolean do_selection(Widget widget, Atom* selection, Atom* target , + Atom* type, XtPointer* value, + unsigned long* length,int* format) { + + Atom targets = XInternAtom(XtDisplay(widget), "TARGETS", False); + Atom *array; + char* result; + char* line; + int i,j; + Block *b= newss.lastSelected; + Chunk *chunk =NULL; + + if (debug_flag) { + fprintf(stderr,"selection request on widget %p\n",widget); + } + + if (!b) return False; + + chunk = &(b->arr[b->selected]); + + if (*target == targets) + { + if (debug_flag) { + fprintf(stderr,"clipboards targets requested on widget %p\n",widget); + } + /* + * Handle request for data types + */ + + if ((array = (Atom *)XtMalloc((unsigned)(sizeof(Atom) * 1))) == NULL) + return False; + *value = (XtPointer)array; + array[0] = XA_STRING; + *type = XA_ATOM; + *format = sizeof(Atom) * 8; + *length = 5; + return True; + } + + if (*target == XA_STRING) { + /* + * request for string data !. + */ + if (debug_flag) { + fprintf(stderr,"string target requested on widget %p\n",widget); + } + + /* + * Iterate through the lines in the text block + * summing the lengths + */ + *length=0; + for (i = 0; i < chunk->fsize; i++) { + if ((chunk->wtext != NULL) && (chunk->wtext[i] != NULL)) { + *length += (strlen(chunk->wtext[i])+1); + } else { + *length += (strlen(chunk->text[i])+1); + } + } + *format = 8; /* 8 bits per char */ + *type = XA_STRING; + if (debug_flag) { + fprintf(stderr,"string length= %li\n",*length); + } + + *value = XtMalloc(*length); + result = (char*)(*value); + /* + * Iterate through the lines in the text block + * moving the data into the clipboard memblock + */ + for (i = 0; i < chunk->fsize; i++) { + if ((chunk->wtext != NULL) && (chunk->wtext[i] != NULL)) { + line = chunk->wtext[i] ; + } else { + line = chunk->text[i]; + } + j =strlen(line); + memcpy(result,line,j); + result+=j; + *(result++)= '\n'; + } + + + if (debug_flag) { + fprintf(stderr,"all done string at= %p\n",*value); + } + if (!(*value)) { + return False; + } + return True; + } + /* + * Haven't found data type we know about! + */ + return False; +} + + + + /* ARGSUSED2 */ static void Select (Widget widget, XEvent *event, String *params, Cardinal *num_params) { - if (event->xany.type == ButtonPress) { + /* + ** The original version of this function was rather confusing. It was + ** rewritten to make it easier to follow so that more selection features + ** could then be added (ie select both left and right). + ** The function itself and the main for loop are written so that evaluation + ** of current state occurs at the top and processing at the bottom. For + ** instance, the first test to see if the XEvent is a ButtonPress returns + ** from the function rather than making the whole function one huge if + ** statement. Similarly, continue statements are used in the for loop to + ** bypass the lower part of the loop. + */ Block *b; Dimension ypos, height; - int itemp, rect_height; + int itemp, rect_height, widget_side; + Side x_selection = NEITHER; + Block *curr_x_block = newss.lastSelected; + + if (event->xany.type != ButtonPress) + return; + + if (widget == textl) + widget_side = WIDGET_LEFT; + else if (widget == textr) + widget_side = WIDGET_RIGHT; + else + assert (False); + + + if (curr_x_block) { + x_selection = curr_x_block->selected; + } XtVaGetValues (widget, XmNheight, &height, NULL); itemp = newss.sindex; ypos = 0; + //Find selected chunk!. for (b = newss.b; b != NULL; b = b->next) { + /* If the current ypos is > height of window, we're done, so just return. */ + if (ypos > height) + return; + if ((rect_height = font_height * (b->ssize - itemp)) > (int) height) rect_height = height; + itemp = 0; - if ((event->xbutton.y >= (unsigned int) ypos) && - (event->xbutton.y < (unsigned int) (ypos + rect_height)) && - (b->arr[LEFT].type != SAME)) { - switch (b->selected) { - case LEFT: - if (widget == textl) { - b->selected = NEITHER; - redraw_partial (textl, ypos, rect_height); - redraw_partial (textr, ypos, rect_height); - update_pixmaps (); + if (event->xbutton.y < (unsigned int) ypos) { + ypos += rect_height; + continue; } - else if (widget == textr) { - b->selected = RIGHT; - redraw_partial (textl, ypos, rect_height); - redraw_partial (textr, ypos, rect_height); - update_pixmaps (); + + if (event->xbutton.y >= (unsigned int) (ypos + rect_height)) { + ypos += rect_height; + continue; } - else - assert (False); - break; - case RIGHT: - if (widget == textl) { + + /* + ** Have now found the selected block. + ** If the LH and RH sides of the selected block are the same, then + ** there is nothing to do, so just return. + */ + if (b->arr[LEFT].type == SAME) + return; + + /* + ** This state machine has been rewritten as a true state machine. The + ** original had three cases (LEFT< RIGHT, NEITHER) and an if statement + ** in each case. Since the original simplification, more states have + ** been added (ie select BOTH state). + */ + switch (widget_side | (event->xbutton.button << 4) | b->selected) { + case WIDGET_LEFT | (1<<4) | NEITHER: + case WIDGET_LEFT | (1<<4) | RIGHT: + case WIDGET_LEFT | (1<<4) | BOTH: b->selected = LEFT; - redraw_partial (textl, ypos, rect_height); - redraw_partial (textr, ypos, rect_height); - update_pixmaps (); - } - else if (widget == textr) { + break; + case WIDGET_LEFT | (1<<4) | LEFT: + case WIDGET_RIGHT | (2<<4) | BOTH: b->selected = NEITHER; - redraw_partial (textl, ypos, rect_height); - redraw_partial (textr, ypos, rect_height); - update_pixmaps (); - } - else - assert (False); break; - case NEITHER: - b->selected = (widget == textl) ? LEFT : RIGHT; - redraw_partial (textl, ypos, rect_height); - redraw_partial (textr, ypos, rect_height); - update_pixmaps (); + + case WIDGET_RIGHT | (1<<4) | NEITHER: + case WIDGET_RIGHT | (1<<4) | LEFT: + case WIDGET_RIGHT | (1<<4) | BOTH: + b->selected = RIGHT; + break; + case WIDGET_RIGHT | (1<<4) | RIGHT: + case WIDGET_LEFT | (2<<4) | BOTH: + b->selected = NEITHER; break; - default: - assert (False); + + case WIDGET_LEFT | (2<<4) | NEITHER: + case WIDGET_LEFT | (2<<4) | LEFT: + case WIDGET_LEFT | (2<<4) | RIGHT: + if (b->arr[LEFT].type == DIFF) { + b->selected = BOTH; break; } - return; - } + if (b->arr[LEFT].wtext != NULL) + b->selected = (b->selected == LEFT) ? NEITHER : LEFT; + break ; + + case WIDGET_RIGHT | (2<<4) | NEITHER: + case WIDGET_RIGHT | (2<<4) | LEFT: + case WIDGET_RIGHT | (2<<4) | RIGHT: + if (b->arr[LEFT].type == DIFF) { + b->selected = BOTH; + break; + } + if (b->arr[RIGHT].wtext != NULL) + b->selected = (b->selected == RIGHT) ? NEITHER : RIGHT; + break ; - ypos += rect_height; - itemp = 0; - if (ypos > height) - return; + default: + printf ("Button:%d widget:%s sel:%d\n", event->xbutton.button, + widget_side == WIDGET_LEFT ? "LEFT" : "RIGHT", b->selected) ; + assert (False); + break; + } + redraw_partial (textl, ypos, rect_height); + redraw_partial (textr, ypos, rect_height); + update_pixmaps (); + + if ( b->selected == NEITHER ) { + if (b == newss.lastSelected) + newss.lastSelected=NULL; + } else { + newss.lastSelected=b; } - } + + if ( !newss.lastSelected + || (x_selection != newss.lastSelected->selected) + // || (newss.lastSelected != curr_x_block ) + ) + { + XtDisownSelection(widget,XA_PRIMARY, CurrentTime); + } + + if (newss.lastSelected) { + XtOwnSelection(widget,XA_PRIMARY, CurrentTime,&do_selection,&lost_selection,NULL); + } + + return; + } } /* @@ -2307,14 +2597,14 @@ else { char buffer[1024]; - (void) sprintf (buffer, "Illegal argument to action proc Scroll (\"%s\")", params[0]); + (void) snprintf (buffer, sizeof (buffer), "Illegal argument to action proc Scroll (\"%s\")", params[0]); XtAppWarning (XtWidgetToApplicationContext (widget), buffer); } } else { char buffer[1024]; - (void) sprintf (buffer, "Illegal number of arguments to action proc Scroll (\"%d\")", *num_params); + (void) snprintf (buffer, sizeof (buffer), "Illegal number of arguments to action proc Scroll (\"%d\")", *num_params); XtAppWarning (XtWidgetToApplicationContext (widget), buffer); } } @@ -2391,7 +2681,7 @@ /* * delete any prefix ending in '/' and return a copy */ -static char *basename (char *path) +static char *mgdiff_basename (char *path) { if (path) { char *p; --- mgdiff-1.0.orig/mgdiff.h +++ mgdiff-1.0/mgdiff.h @@ -1,7 +1,7 @@ #ifndef MXDIFF_H #define MXDIFF_H -#ifndef lint +#if 0 static char rcsid_mgdiff_h[] = "mgdiff.h,v 2.0 1994/05/19 02:01:15 dan Exp"; #endif @@ -52,7 +52,11 @@ short *tlen; /* the lengths of each line */ } Chunk; -typedef enum {LEFT = 0, RIGHT, NEITHER} Side; +/* +** LEFT and RIGHT must be 0 and 1 respectively as they are used +** to index as array. +*/ +typedef enum {LEFT = 0, RIGHT, NEITHER, BOTH} Side; /* * a block is an element of a doubly linked list containing a left chunk @@ -86,4 +90,11 @@ */ #define X11R5 (defined(XtSpecificationRelease) && (XtSpecificationRelease >= 5)) +/* + * According to IETF RFC 2279, byte values of 0xfe and 0xff are + * not legal utf-8, but all others bytes are legal. + */ +#define islatin(c) (isprint((c)) || ((((unsigned char)(c)) <= 0xfd))) + +#define isallowed(c) (isascii((c)) || islatin((c))) #endif --- mgdiff-1.0.orig/mgdiff.man +++ mgdiff-1.0/mgdiff.man @@ -1,6 +1,7 @@ .\" mgdiff.man,v 2.0 1994/05/19 02:01:16 dan Exp .\" .\" Copyright (c) 1994 Daniel Williams +.\" Copyright (c) 2003 Erik de Castro Lopo .\" .\" The X Consortium, and any party obtaining a copy of these files from .\" the X Consortium, directly or indirectly, is granted, free of charge, @@ -26,7 +27,7 @@ .\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .na -.TH MGDIFF 1 +.TH MGDIFF 1x .SH NAME mgdiff \- Motif-based graphical file difference browser .SH SYNOPSIS @@ -82,6 +83,20 @@ .LP At the top of the display is a Motif menu bar; those functions are discussed in the MENUS section of this manual page. +.LP +Earlier versions of this program (pre 2003) only allowed the selection +of the left hand side difference or the right hand side difference. It +also would not allow a file to be saved with unselected blocks. The +current version allows the user to select both sides of a difference +by selecting blocks using the middle mouse button. When both sides of a +difference are selected both blocks will be saved to the merged file and +marked in a similar manner to the way +.I CVS +marks merges that require manual resolution of conflicting changes. In +addition, the current version also allows saving of a merged file with +unselected blocks. In this case, the merged file will contain +neither the left hand side nor the right hand side of the unselected +blocks. .SH COMMAND LINE OPTIONS .TP 8 @@ -162,6 +177,10 @@ Brings up the "Open File" FileSelectionDialog to allow the user to specify a file to open and compare with the already opened left\-hand file. +.IP "\fBReload Both\fP" \n(XYP +.B Meta+R +.LP +Re-runs diff on both the currently opened files. .IP "\fBSave As...\fP" \n(XYP .B Ctrl+S .LP @@ -170,8 +189,27 @@ application modal dialog. The program will allow the user to overwrite an existing file but pops up a QuestionDialog to allow the user to cancel the operation if desired. If there are any unselected -areas of difference between the two files the user is notified via an -ErrorDialog and the save operation is canceled. +areas of difference between the two files the user is asked whether +they want to continue or cancel the operation. If the user continues, +the output file will contain none of the unselected blocks. +.IP "\fBSave As Left...\fP" \n(XYP +.LP +Saves the merged file to the location given by the left hand side +file location. The user will be asked if they are sure they wish the +existing file to be overwritten. As with the "Save As", if there are +any unselected areas of difference between the two files the user +asked whether they want to continue or cancel the operation. If the +user continues, the output file will contain none of the data in the +unselected blocks. +.IP "\fBSave As Right...\fP" \n(XYP +.LP +Saves the merged file to the location given by the right hand side +file location. The user will be asked if they are sure they wish the +existing file to be overwritten. As with the "Save As", if there are +any unselected areas of difference between the two files the user +asked whether they want to continue or cancel the operation. If the +user continues, the output file will contain none of the data in the +unselected blocks. .IP "\fBExit\fP" \n(XYP .B Ctrl+C .LP @@ -330,8 +368,12 @@ XmPushButtonGadget button_1 XmPushButtonGadget button_2 XmPushButtonGadget button_3 - XmSeparatorGadget separator_0 XmPushButtonGadget button_4 + XmSeparatorGadget separator_0 + XmPushButtonGadget button_5 + XmPushButtonGadget button_6 + XmSeparatorGadget separator_1 + XmPushButtonGadget button_7 XmRowColumn options_menu XmToggleButtonGadget button_0 XmToggleButtonGadget button_1 @@ -543,12 +585,17 @@ any quote processing. .SH COPYRIGHT Copyright (c) 1994, Daniel Williams +.br +Copyright (c) 2003, Erik de Castro Lopo .br See .B X (1) for a full statement of rights and permissions. -.SH AUTHOR +.SH AUTHORS Daniel Williams (dan@sass.com) +.br +Erik de Castro Lopo (erikd AT mega-nerd DOT com) added "\fBSave as Left/Right\fP" +and saving both and neither sides. .SH ACKNOWLEDGEMENTS To Andrew C. Myers for writing .I gdiff. --- mgdiff-1.0.orig/misc.c +++ mgdiff-1.0/misc.c @@ -1,9 +1,10 @@ -#ifndef lint +#if 0 static char rcsid[] = "misc.c,v 2.0 1994/05/19 02:01:19 dan Exp"; #endif /* * Copyright (c) 1994 Daniel Williams + * Copyright (c) 2003 Erik de Castro Lopo * * The X Consortium, and any party obtaining a copy of these files from * the X Consortium, directly or indirectly, is granted, free of charge, @@ -33,6 +34,8 @@ #include #include +#include +#include #include #include @@ -40,6 +43,7 @@ #include #include "mgdiff.h" +#include "externs.h" int max (int i, int j) { @@ -52,14 +56,38 @@ } /* - * copy a stream up to the EOF to a file + * Create a temporary file and write all text from the input stream (up to + * the EOF) to the file. + * The name of the temp file is returned to the user in *name. */ -int copy_to_file (FILE *fin, char *name) +int copy_to_tempfile (FILE *fin, char *name, size_t name_len) { - FILE *fout; + FILE *fout ; + int fd ; + + /* + ** Seed the random() generator. This does not need to be super + ** randomised as the while loop below will be run until a file + ** is opened. + */ + srandom (getpid () + getppid () + time (NULL)) ; + + while (1) { + snprintf (name, name_len, "/tmp/mgdiff-%#lx", random()) ; + if ((fd = open (name, O_CREAT | O_EXCL | O_RDWR, 0600)) < 0) { + if (errno == EEXIST) + continue ; + return 1 ; + } + + if ((fout = fdopen (fd, "r+")) == NULL) { + close (fd) ; + return 1 ; + } + + break ; + } - if ((fout = fopen (name, "a")) == NULL) - return (0); while (!feof (fin)) { char buffer[BUFSIZ]; int nitems; @@ -68,10 +96,12 @@ if (fwrite (buffer, 1, nitems, fout) != nitems) break; } + if (ferror (fin) || ferror (fout)) { (void) fclose (fout); return (1); } + return ((fclose (fout) == 0)); } --- mgdiff-1.0.orig/modal.c +++ mgdiff-1.0/modal.c @@ -1,4 +1,4 @@ -#ifndef lint +#if 0 static char rcsid[] = "modal.c,v 2.0 1994/05/19 02:01:20 dan Exp"; #endif --- mgdiff-1.0.orig/patchlevel.h +++ mgdiff-1.0/patchlevel.h @@ -28,11 +28,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef lint +#if 0 static char rcsid_patchlevel_h[] = "patchlevel.h,v 2.0 1994/05/19 02:01:21 dan Exp"; #endif #define VERSION "1.0" -#define PATCHLEVEL "0" +#define PATCHLEVEL "1" #endif --- mgdiff-1.0.orig/rundiff.c +++ mgdiff-1.0/rundiff.c @@ -1,4 +1,4 @@ -#ifndef lint +#if 0 static char rcsid[] = "rundiff.c,v 2.0 1994/05/19 02:01:22 dan Exp"; #endif @@ -63,7 +63,7 @@ static char *duplicate (char *s, int *flag); static DiffType parse_diff_line (char *buf, int *f1n1, int *f1n2, int *f2n1, int *f2n2); static int eatline (FILE *f); -static void getline (FILE *f, char **cooked, char **raw); +static void get_line (FILE *f, char **cooked, char **raw); static void reset_blist (void); static Block *get_blist (void); static void add_blist (Block *b); @@ -209,7 +209,7 @@ FILE *diff, *file1, *file2; char buffer[BUFSIZ+1]; int sline, fline1, fline2; - Block *b; + Block *b = NULL; int i, lines, counter; int stat_loc; DiffInfo *di; @@ -245,7 +245,7 @@ char cmdline[4096]; di->etext = (char **) calloc (MAX_ERROR_LINES + 1, sizeof (char *)); - (void) sprintf (cmdline, " \"%s %s %s %s\"", prog, args, path1, path2); + (void) snprintf (cmdline, sizeof (cmdline), " \"%s %s %s %s\"", prog, args, path1, path2); di->etext[di->errors++] = strdup ("diff command line:"); di->etext[di->errors++] = strdup (""); di->etext[di->errors++] = strdup (cmdline); @@ -271,7 +271,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -300,7 +300,7 @@ b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *)); b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short)); for (i = 0; i < b->arr[RIGHT].fsize; i++) { - getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]); + get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]); b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]); if (di->maxcols < b->arr[RIGHT].tlen[i]) { di->maxcols = b->arr[RIGHT].tlen[i]; @@ -331,7 +331,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -358,7 +358,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -371,7 +371,7 @@ b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *)); b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short)); for (i = 0; i < b->arr[RIGHT].fsize; i++) { - getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]); + get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]); b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]); if (di->maxcols < b->arr[RIGHT].tlen[i]) { di->maxcols = b->arr[RIGHT].tlen[i]; @@ -399,7 +399,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -428,7 +428,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -491,7 +491,7 @@ b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *)); b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short)); for (i = 0; i < b->arr[LEFT].fsize; i++) { - getline (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); + get_line (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]); b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]); if (di->maxcols < b->arr[LEFT].tlen[i]) { di->maxcols = b->arr[LEFT].tlen[i]; @@ -522,21 +522,23 @@ */ static char *duplicate (char *s, int *flag) { - int len, i, tabs, ctrls; + int len, i, tabs, ctrls, latin, ch; /* * compute length of new string, taking tabs and control * characters into account */ for (i = 0, len = 0, ctrls = tabs = 0; s[i] != '\0'; i++) { - if (isascii (s[i])) { + ch = s [i]; + latin = islatin(ch); + if ((isascii(ch) || latin)) { if (s[i] == '\t') { tabs++; len += 8; len /= 8; len *= 8; } - else if (iscntrl (s[i])) { + else if (!latin && iscntrl (s[i])) { ctrls++; len += 2; } @@ -551,16 +553,18 @@ if (tabs || ctrls) { char *ret = (char *) calloc (1, len + 1); - int j; + int j, ch; for (i = 0, j = 0; s[i] != '\0'; i++) { - if (isascii (s[i])) { + ch = s[i]; + latin = islatin(ch); + if ((isascii(ch) || latin)) { if (s[i] == '\t') { ret[j++] = ' '; while ((j % 8) != 0) ret[j++] = ' '; } - else if (iscntrl (s[i])) { + else if (!latin && iscntrl (s[i])) { ret[j++] = '^'; ret[j++] = (s[i] + '@') & 0x7f; } @@ -663,7 +667,7 @@ * printable) if necessary. Silently truncate input lines at BUFSIZ * characters. */ -static void getline (FILE *f, char **cooked, char **raw) +static void get_line (FILE *f, char **cooked, char **raw) { char buffer[BUFSIZ+1]; char *s; --- mgdiff-1.0.orig/spawn.c +++ mgdiff-1.0/spawn.c @@ -1,4 +1,4 @@ -#ifndef lint +#if 0 static char rcsid[] = "spawn.c,v 2.0 1994/05/19 02:01:23 dan Exp"; #endif @@ -35,6 +35,11 @@ #include #include +#include + +#include "mgdiff.h" +#include "externs.h" + #define BLOCKSIZE 10 /* @@ -105,7 +110,7 @@ argv[argc++] = NULL; if (execvp (prog, argv) == -1) { - (void) sprintf (buffer, "%s: %s: %s", progname, "exec", prog); + (void) snprintf (buffer, sizeof (buffer), "%s: %s: %s", progname, "exec", prog); perror (buffer); exit (2); } @@ -131,4 +136,5 @@ break; } /* NOTREACHED */ + return NULL; }