OBS User unknown 2007-07-02 12:40:15 +00:00 committed by Git OBS Bridge
commit 7973d77a98
12 changed files with 411 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

23
nedit-5.4-makefiles.patch Normal file
View File

@ -0,0 +1,23 @@
--- nedit-5.4/makefiles/Makefile.linux.makefiles 2003-05-20 02:27:56.000000000 +0200
+++ nedit-5.4/makefiles/Makefile.linux 2004-03-17 15:28:40.000000000 +0100
@@ -1,5 +1,5 @@
# $Id: Makefile.linux,v 1.11 2003/05/20 00:27:56 n8gray Exp $
-CC=cc
+CC=gcc
AR=ar
# For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS
@@ -17,11 +17,11 @@
# To test if the Motif library exports the runtime version
# add -DHAVE__XMVERSIONSTRING to CFLAGS
#
-CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
+CFLAGS=-I/usr/X11R6/include $(RPM_OPT_FLAGS) -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DBUILD_UNTESTED_NEDIT
ARFLAGS=-urs
-LIBS= -L/usr/X11R6/lib -Wl,-Bstatic -lXm -Wl,-Bdynamic -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
+LIBS= -lXm -lXmu -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
include Makefile.common

61
nedit-5.4-security.patch Normal file
View File

@ -0,0 +1,61 @@
--- nedit-5.4/source/file.c.security 2003-09-28 16:18:12.000000000 +0200
+++ nedit-5.4/source/file.c 2004-03-17 15:25:31.000000000 +0100
@@ -1218,7 +1218,7 @@
*/
void PrintString(const char *string, int length, Widget parent, const char *jobName)
{
- char tmpFileName[L_tmpnam]; /* L_tmpnam defined in stdio.h */
+ char *tmpFileName=strdup("/tmp/neditXXXXXX");
FILE *fp;
int fd;
@@ -1229,14 +1229,10 @@
1. Create a filename
2. Open the file with the O_CREAT|O_EXCL flags
So all an attacker can do is a DoS on the print function. */
- tmpnam(tmpFileName);
+ fd = mkstemp(tmpFileName);
/* open the temporary file */
-#ifdef VMS
- if ((fp = fopen(tmpFileName, "w", "rfm = stmlf")) == NULL)
-#else
- if ((fd = open(tmpFileName, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR)) < 0 || (fp = fdopen(fd, "w")) == NULL)
-#endif /* VMS */
+ if ((fp = fdopen(fd, "w")) == NULL)
{
DialogF(DF_WARN, parent, 1, "Error while Printing",
"Unable to write file for printing:\n%s", "Dismiss",
@@ -1250,7 +1246,7 @@
/* write to the file */
#ifdef IBM_FWRITE_BUG
- write(fileno(fp), string, length);
+ write(fd, string, length);
#else
fwrite(string, sizeof(char), length, fp);
#endif
@@ -1260,6 +1256,7 @@
"%s not printed:\n%s", "Dismiss", jobName, errorString());
fclose(fp); /* should call close(fd) in turn! */
remove(tmpFileName);
+ free(tmpFileName);
return;
}
@@ -1270,6 +1267,7 @@
"Error closing temp. print file:\n%s", "Dismiss",
errorString());
remove(tmpFileName);
+ free(tmpFileName);
return;
}
@@ -1281,6 +1279,7 @@
PrintFile(parent, tmpFileName, jobName);
remove(tmpFileName);
#endif /*VMS*/
+ free(tmpFileName);
return;
}

118
nedit-5.5-nc-manfix.patch Normal file
View File

@ -0,0 +1,118 @@
--- nedit-5.5/doc/nc.man.nc-manfix 2004-09-30 23:03:59.000000000 +0200
+++ nedit-5.5/doc/nc.man 2005-10-16 08:53:42.000000000 +0200
@@ -128,30 +128,30 @@
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
-.IX Title "NC 1"
-.TH NC 1 "2004-07-21" "NEdit 5.5" "NEdit documentation"
+.IX Title "NEDIT-CLIENT 1"
+.TH NEDIT-CLIENT 1 "2004-07-21" "NEdit 5.5" "NEdit documentation"
.SH "NAME"
-nc \- Client program for NEdit text editor
+nedit-client \- Client program for NEdit text editor
.SH "SYNOPSYS"
.IX Header "SYNOPSYS"
-nc [\fB\-read\fR] [\fB\-create\fR] [\fB\-line\fR \fIn\fR | \fB+\fR\fIn\fR] [\fB\-do\fR \fIcommand\fR]
- [\fB\-ask\fR] [\fB\-noask\fR] [\fB\-svrname\fR \fIname\fR] [\fB\-svrcmd\fR \fIcommand\fR]
- [\fB\-lm\fR \fIlanguagemode\fR]
- [\fB\-geometry\fR \fIgeometry\fR | \fB\-g\fR \fIgeometry\fR] [\fB\-icon\fR | \fB\-iconic\fR]
- [\fB\-display\fR \fI[host]:server[.screen]\fR]
- [\fB\-timeout\fR \fIseconds\fR] [\fB\-wait\fR] [\fB\-xrm\fR \fIresourcestring\fR]
- [\fB\-tabbed\fR] [\fB\-untabbed\fR] [\fB\-group\fR]
- [\fB\-V\fR | \fB\-version\fR] [\fB\-\-\fR] [file...]
+nedit-client [\fB\-read\fR] [\fB\-create\fR] [\fB\-line\fR \fIn\fR | \fB+\fR\fIn\fR] [\fB\-do\fR \fIcommand\fR]
+ [\fB\-ask\fR] [\fB\-noask\fR] [\fB\-svrname\fR \fIname\fR] [\fB\-svrcmd\fR \fIcommand\fR]
+ [\fB\-lm\fR \fIlanguagemode\fR]
+ [\fB\-geometry\fR \fIgeometry\fR | \fB\-g\fR \fIgeometry\fR] [\fB\-icon\fR | \fB\-iconic\fR]
+ [\fB\-display\fR \fI[host]:server[.screen]\fR]
+ [\fB\-timeout\fR \fIseconds\fR] [\fB\-wait\fR] [\fB\-xrm\fR \fIresourcestring\fR]
+ [\fB\-tabbed\fR] [\fB\-untabbed\fR] [\fB\-group\fR]
+ [\fB\-V\fR | \fB\-version\fR] [\fB\-\-\fR] [file...]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
-\&\fBnc\fR is the client interface to the NEdit text editor. A server can be started
+\&\fBnedit-client\fR is the client interface to the NEdit text editor. A server can be started
explicitly by running NEdit in server mode:
.PP
.Vb 1
\& nedit -server
.Ve
.PP
-If no server is running, \fBnc\fR will start one unless configured otherwise.
+If no server is running, \fBnedit-client\fR will start one unless configured otherwise.
Client/server mode is useful for integrating NEdit with software development
environments, mailers, and other programs; or just as a quick way to open files
from the shell command line without starting a new NEdit session.
@@ -171,21 +171,21 @@ Go to line number \fIn\fR.
Execute an NEdit macro or action on the file following the \-do argument on the
command line.
.Sp
-If you use this command without a filename, \fBnc\fR would randomly choose one
+If you use this command without a filename, \fBnedit-client\fR would randomly choose one
window to focus and execute the macro in.
.IP "\fB\-ask\fR, \fB\-noask\fR" 4
.IX Item "-ask, -noask"
-Instructs \fBnc\fR whether to automatically start a server if one is not
+Instructs \fBnedit-client\fR whether to automatically start a server if one is not
available. This overrides the X resource `nc.autoStart'.
.IP "\fB\-svrname\fR \fIname\fR" 4
.IX Item "-svrname name"
-Explicitly instructs \fBnc\fR which server to connect to, an instance of
+Explicitly instructs \fBnedit-client\fR which server to connect to, an instance of
\&\fInedit\fR\|(1) with a corresponding \fB\-svrname\fR argument. By naming servers, you
can run several simultaneously, and direct files and commands specifically to
any one.
.IP "\fB\-svrcmd\fR \fIcommand\fR" 4
.IX Item "-svrcmd command"
-The command which \fBnc\fR uses to start an NEdit server. It is also settable via
+The command which \fBnedit-client\fR uses to start an NEdit server. It is also settable via
the X resource `nc.serverCommand', by default, \fI\*(L"nedit \-server\*(R"\fR.
.IP "\fB\-lm\fR \fIlanguagemode\fR" 4
.IX Item "-lm languagemode"
@@ -221,11 +221,11 @@ Under rare conditions (such as a slow co
increase the time-out period. In most cases, the default is fine.
.IP "\fB\-wait\fR" 4
.IX Item "-wait"
-Instructs \fBnc\fR not to return to the shell until all files given
+Instructs \fBnedit-client\fR not to return to the shell until all files given
are closed.
.Sp
-Normally, \fBnc\fR returns once the files given in its command line
-are opened by the server. When this option is given, nc returns
+Normally, \fBnedit-client\fR returns once the files given in its command line
+are opened by the server. When this option is given, nedit-client returns
only after the last file given in this call is closed.
Note that this option affects all files, not only the ones
following this option in the command line.
@@ -262,11 +262,11 @@ for your display:
.Ve
.SH "NOTES"
.IX Header "NOTES"
-Communication between \fInc\fR\|(1) and \fInedit\fR\|(1) is through the X display. So as
-long as X windows is set up and working properly, \fBnc\fR will work properly
-as well. \fBnc\fR uses the `\s-1DISPLAY\s0' environment variable, the machine name and
+Communication between \fInedit-client\fR\|(1) and \fInedit\fR\|(1) is through the X display. So as
+long as X windows is set up and working properly, \fBnedit-client\fR will work properly
+as well. \fBnedit-client\fR uses the `\s-1DISPLAY\s0' environment variable, the machine name and
your user name to find the appropriate server, meaning, if you have several
-machines sharing a common file system, \fBnc\fR will not be able to find a server
+machines sharing a common file system, \fBnedit-client\fR will not be able to find a server
that is running on a machine with a different host name, even though it may be
perfectly appropriate for editing a given file.
.PP
@@ -275,12 +275,12 @@ command line, for example:
.IP "incorrect:" 4
.IX Item "incorrect:"
.Vb 1
-\& nc file.c -line 25
+\& nedit-client file.c -line 25
.Ve
.IP "correct:" 4
.IX Item "correct:"
.Vb 1
-\& nc -line 25 file.c
+\& nedit-client -line 25 file.c
.Ve
.PP
For more information see NEdit's online help, or \fInedit.doc\fR in the NEdit

3
nedit-5.5-src.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f6ae7205753080e8b047fb45759a7d6036b19396045c0b5c4a979441231966b
size 1124825

52
nedit-5.5-utf8.patch Normal file
View File

@ -0,0 +1,52 @@
--- nedit-5.5/source/nedit.c.utf8 2004-09-02 10:49:56.000000000 +0200
+++ nedit-5.5/source/nedit.c 2004-12-27 09:59:40.997208056 +0100
@@ -90,6 +90,7 @@ static int checkDoMacroArg(const char *m
static String neditLanguageProc(Display *dpy, String xnl, XtPointer closure);
static void maskArgvKeywords(int argc, char **argv, const char **maskArgs);
static void unmaskArgvKeywords(int argc, char **argv, const char **maskArgs);
+static void changeLocaleIfUTF8(void);
static void patchResourcesForVisual(void);
static void patchResourcesForKDEbug(void);
static void patchLocaleForMotif(void);
@@ -392,6 +393,8 @@ int main(int argc, char **argv)
/* Save the command which was used to invoke nedit for restart command */
ArgV0 = argv[0];
+ changeLocaleIfUTF8();
+
/* Set locale for C library, X, and Motif input functions.
Reverts to "C" if requested locale not available. */
XtSetLanguageProc(NULL, neditLanguageProc, NULL);
@@ -1035,6 +1038,32 @@ static String neditLanguageProc(Display
return setlocale(LC_ALL, NULL); /* re-query in case overwritten */
}
+static void changeLocaleIfUTF8(void)
+{
+ char *locale;
+
+ locale = getenv("LANG");
+ if (!locale) {
+ locale = setlocale(LC_ALL, NULL);
+ }
+
+ if (locale) {
+ char *ptr;
+
+ ptr = strstr(locale, ".UTF-8");
+ if (ptr) {
+ fprintf(stderr, "nedit: the current locale is utf8 (%s)\n", locale);
+
+ ptr[0] = '\0';
+
+ setenv("LC_ALL", locale, 1);
+ locale = setlocale(LC_ALL, locale);
+
+ fprintf(stderr, "nedit: changed locale to non-utf8 (%s)\n", locale);
+ }
+ }
+}
+
static int sortAlphabetical(const void* k1, const void* k2)
{
const char* key1 = *(const char**)k1;

11
nedit-5.5-varfix.patch Normal file
View File

@ -0,0 +1,11 @@
--- nedit-5.5/source/server.c.varfix 2004-07-21 13:32:05.000000000 +0200
+++ nedit-5.5/source/server.c 2005-01-12 11:12:08.989922248 +0100
@@ -340,7 +340,7 @@ static void processServerCommandString(c
char *fullname, filename[MAXPATHLEN], pathname[MAXPATHLEN];
char *doCommand, *geometry, *langMode, *inPtr;
int editFlags, stringLen = strlen(string);
- int lineNum, createFlag, readFlag, iconicFlag, lastIconic = 0, tabbed;
+ int lineNum, createFlag, readFlag, iconicFlag, lastIconic = 0, tabbed = 0;
int fileLen, doLen, lmLen, geomLen, charsRead, itemsRead;
WindowInfo *window, *lastFile = NULL;
long currentDesktop = QueryCurrentDesktop(TheDisplay,

3
nedit-icon.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d3956f8fa051c051e472d491214afb494f7ec4bbc0b45cf4f0352714e7a26e6
size 3216

5
nedit.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Fri Jun 29 14:44:56 CEST 2007 - drahn@suse.de
- initial BS version

28
nedit.desktop Normal file
View File

@ -0,0 +1,28 @@
[Desktop Entry]
Encoding=UTF-8
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Comment=Text Editor
Comment[bg]=Nedit Ðåäàêòîð
Comment[ca]=Editor Nedit
Comment[cs]=Editor Nedit
Comment[eo]=redaktilo Nedit
Comment[et]=Tekstiredaktor Nedit
Comment[fi]=Nedit-editori
Comment[fr]=Éditeur Nedit
Comment[hu]=Nedit szövegszerkesztő
Comment[is]=Nedit-ritill
Comment[mk]=Nedit - лесен и моќен уредувач
Comment[pt]=Editor Nedit
Comment[ro]=Editorul Nedit
Comment[ru]=Редактор Nedit
Comment[sk]=Editor Nedit
Comment[sl]=Urejevalnik Nedit
Comment[uk]=Редактор Nedit
Name=Nedit
Name[et]=Tekstiredaktor Nedit
Name[ru]=NEdit
Exec=nedit %f
Icon=nedit-icon.png
Path=
Type=Application
Terminal=false

73
nedit.spec Normal file
View File

@ -0,0 +1,73 @@
Name: nedit
Version: 5.5
Release: 1
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: openmotif-devel update-desktop-files
%if 0%{?suse_version} <= 1010
BuildRequires: xorg-x11-devel
%endif
Group: Applications/Editors
Summary: A GUI text editor
Source0: http://nedit.org/ftp/v5_5/nedit-%{version}-src.tar.bz2
Source1: nedit-icon.png
Source2: nedit.desktop
Patch1: nedit-5.4-makefiles.patch
Patch2: nedit-5.4-security.patch
Patch3: nedit-5.5-utf8.patch
Patch4: nedit-5.5-varfix.patch
Patch5: nedit-5.5-nc-manfix.patch
%description
NEdit is a GUI style plain text editor for workstations with the X Window System
and Motif. NEdit provides all of the standard menu, dialog, editing,
mouse support, macro extension language, syntax highlighting,
and a lot other nice features (and extensions for programmers).
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
cp %{S:1} $RPM_BUILD_DIR/%{name}-%{version}/
cp %{S:2} $RPM_BUILD_DIR/%{name}-%{version}/
%build
%if 0%{?suse_version} <= 1010
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -L/usr/X11R6/%{_lib}" \
linux
%endif
%if 0%{?suse_version} > 1010
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" \
linux
%endif
%install
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
mv source/nc source/nedit-client
install -s -m 755 source/nedit source/nedit-client $RPM_BUILD_ROOT%{_bindir}
install -m 644 doc/nedit.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit.1x
mv doc/nc.man doc/nedit-client.man
install -m 644 doc/nedit-client.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit-client.1x
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
install -m 644 nedit-icon.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/
install -m 644 nedit.desktop $RPM_BUILD_ROOT%{_datadir}/applications/
%suse_update_desktop_file %name TextEditor
%clean
rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root)
%doc doc/nedit.doc README ReleaseNotes
%{_mandir}/*/*
%{_bindir}/*
%{_prefix}/share/applications/*
%{_datadir}/pixmaps/nedit-icon.png

11
openmotif.diff Normal file
View File

@ -0,0 +1,11 @@
--- makefiles/Makefile.linux.orig 2007-04-23 14:29:04.000000000 +0200
+++ makefiles/Makefile.linux 2007-04-23 14:29:40.000000000 +0200
@@ -17,7 +17,7 @@
# To test if the Motif library exports the runtime version
# add -DHAVE__XMVERSIONSTRING to CFLAGS
#
-CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
+CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DBUILD_UNTESTED_NEDIT
ARFLAGS=-urs