mathing_patterns: fix off by one alloc error
[nedit-bw.git] / motifless-nc.patch
blob30e0a0f51ad6913103d2ea141057dcc5718a7399
1 ---
3 Makefile | 11 +++++++++++
4 makefiles/Makefile.bertw | 7 ++++---
5 source/Makefile.common | 11 +++++++----
6 source/server_common.c | 5 +++--
7 util/prefFile.c | 7 ++++---
8 5 files changed, 29 insertions(+), 12 deletions(-)
10 diff --quilt old/source/Makefile.common new/source/Makefile.common
11 --- old/source/Makefile.common
12 +++ new/source/Makefile.common
13 @@ -26,11 +26,14 @@ all: nedit nc
14 nedit: $(OBJS) ../util/libNUtil.a $(XMLLIB) $(XLTLIB)
15 $(CC) $(CFLAGS) -c linkdate.c
16 $(CC) $(CFLAGS) $(OBJS) linkdate.o $(XMLLIB) \
17 - $(XLTLIB) ../util/libNUtil.a $(LIBS) -o $@
18 + $(XLTLIB) ../util/libNUtil.a $(XMLIBS) $(LIBS) -o $@
20 -# Note LIBS isn't quite right here; it links unnecessarily against Motif
21 -nc: nc.o server_common.o ../util/libNUtil.a
22 - $(CC) $(CFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@
23 +nc: nc.o server_common.o \
24 + ../util/fileUtils.o \
25 + ../util/utils.o \
26 + ../util/prefFile.o \
27 + ../util/clearcase.o
28 + $(CC) $(CFLAGS) $^ $(LIBS) -o $@
30 help.o: help.c
31 $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c help.c -o $@
32 diff --quilt old/makefiles/Makefile.bertw new/makefiles/Makefile.bertw
33 --- old/makefiles/Makefile.bertw
34 +++ new/makefiles/Makefile.bertw
35 @@ -47,7 +47,8 @@ endif
37 ARFLAGS=-urs
39 -LIBS += -lXm -lXmu -lXp -lXext -lXt -lSM -lICE -lX11 -lm
40 +LIBS += -lXmu -lXp -lXext -lXt -lSM -lICE -lX11 -lm
41 +XMLIBS += -lXm
43 ifdef OM231
44 OM23=1
45 @@ -59,8 +60,8 @@ endif
47 ifdef OM23
48 CFLAGS += -I/home/$(USER)/opt/openmotif-2.3.$(OM23)/include
49 - LIBS += -Wl,-R,/home/$(USER)/opt/openmotif-2.3.$(OM23)/lib
50 - LIBS += -L/home/$(USER)/opt/openmotif-2.3.$(OM23)/lib
51 + XMLIBS += -Wl,-R,/home/$(USER)/opt/openmotif-2.3.$(OM23)/lib
52 + XMLIBS += -L/home/$(USER)/opt/openmotif-2.3.$(OM23)/lib
53 endif
55 include Makefile.common
56 diff --quilt old/source/server_common.c new/source/server_common.c
57 --- old/source/server_common.c
58 +++ new/source/server_common.c
59 @@ -26,7 +26,6 @@
60 * *
61 *******************************************************************************/
62 #include <stdio.h>
63 -#include <Xm/Xm.h>
64 #include <sys/types.h>
65 #ifdef VMS
66 #include "../util/VMSparam.h"
67 @@ -35,10 +34,12 @@
68 #include <sys/param.h>
69 #endif
70 #endif /*VMS*/
71 -#include "nedit.h"
72 #include "server_common.h"
73 #include "../util/utils.h"
75 +/* comes from nc.c or nedit.c */
76 +extern Display *TheDisplay;
78 #define NEDIT_VERSION_STRING "5.7"
79 #define NEDIT_VERSION_STRING_LEN 3
81 diff --quilt old/util/prefFile.c new/util/prefFile.c
82 --- old/util/prefFile.c
83 +++ new/util/prefFile.c
84 @@ -45,7 +45,8 @@ static const char CVSID[] = "$Id: prefFi
85 #include <sys/param.h>
86 #endif
87 #endif
88 -#include <Xm/Xm.h>
89 +#include <X11/Intrinsic.h>
90 +#include <X11/StringDefs.h>
92 #ifdef HAVE_DEBUG_H
93 #include "../debug.h"
94 @@ -217,14 +218,14 @@ static void readPrefs(XrmDatabase prefDB
95 sprintf(rsrcClass, "%s.%s", appClass, rsrcDescrip[i].class);
96 if (prefDB!=NULL &&
97 XrmGetResource(prefDB, rsrcName, rsrcClass, &type, &rsrcValue)) {
98 - if (strcmp(type, XmRString)) {
99 + if (strcmp(type, XtRString)) {
100 fprintf(stderr,"nedit: Internal Error: Unexpected resource type, %s\n",
101 type);
102 return;
104 valueString = rsrcValue.addr;
105 } else if (XrmGetResource(appDB,rsrcName,rsrcClass,&type,&rsrcValue)) {
106 - if (strcmp(type, XmRString)) {
107 + if (strcmp(type, XtRString)) {
108 fprintf(stderr,"nedit: Internal Error: Unexpected resource type, %s\n",
109 type);
110 return;
111 diff --quilt old/Makefile new/Makefile
112 --- old/Makefile
113 +++ new/Makefile
114 @@ -18,6 +18,16 @@ all:
115 @echo "(For example, type \"make linux\" for a Linux system.)"
116 @ls makefiles/Makefile* | sed -e 's|makefiles/Makefile\.||g' | column | column -t | sed -e 's/^/\t/'
118 +ifdef CLIENT_ONLY
119 +.DEFAULT:
120 + @- (cd util; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
121 + then ln -s ../makefiles/Makefile.$@ .; fi)
122 + @- (cd source; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
123 + then ln -s ../makefiles/Makefile.$@ .; fi)
125 + (cd util; $(MAKE) -f Makefile.$@ fileUtils.o utils.o prefFile.o clearcase.o)
126 + (cd source; $(MAKE) -f Makefile.$@ nc)
127 +else
128 .DEFAULT:
129 @- (cd Microline/XmL; if [ -f ../../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
130 then ln -s ../../makefiles/Makefile.$@ .; fi)
131 @@ -35,6 +45,7 @@ all:
132 (cd Xlt; $(MAKE) -f Makefile.$@ libXlt.a)
133 (cd Microline/XmL; $(MAKE) -f Makefile.$@ libXmL.a)
134 (cd source; $(MAKE) -f Makefile.$@ nedit nc)
135 +endif
137 .PHONY: docs help clean realclean