forked from pool/ispell
193 lines
4.6 KiB
Plaintext
193 lines
4.6 KiB
Plaintext
|
---
|
||
|
buildhash.c | 4 ++++
|
||
|
defmt.c | 8 ++++++++
|
||
|
fields.c | 8 ++++++++
|
||
|
icombine.c | 4 ++++
|
||
|
ijoin.c | 4 ++++
|
||
|
ispell.c | 4 ++++
|
||
|
munchlist.X | 33 +++++++++++++++++----------------
|
||
|
7 files changed, 49 insertions(+), 16 deletions(-)
|
||
|
|
||
|
--- buildhash.c
|
||
|
+++ buildhash.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -119,6 +119,7 @@ static char Rcs_Id[] =
|
||
|
#include "version.h"
|
||
|
#include <ctype.h>
|
||
|
#include <sys/stat.h>
|
||
|
+#include <locale.h>
|
||
|
|
||
|
int main P ((int argc, char * argv[]));
|
||
|
static void output P ((void));
|
||
|
@@ -152,6 +153,9 @@ int main (argc, argv)
|
||
|
unsigned int i;
|
||
|
int j;
|
||
|
|
||
|
+ (void)setlocale(LC_CTYPE, "POSIX");
|
||
|
+ (void)setlocale(LC_COLLATE, "POSIX");
|
||
|
+
|
||
|
while (argc > 1 && *argv[1] == '-')
|
||
|
{
|
||
|
argc--;
|
||
|
--- defmt.c
|
||
|
+++ defmt.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -719,6 +719,14 @@ void checkline (ofile)
|
||
|
|
||
|
p = ctoken;
|
||
|
endp = skipoverword (currentchar);
|
||
|
+
|
||
|
+ /* Within copyout() the ``compensate for short copy strategy''
|
||
|
+ * will cause that (*currentchar == 0) is always false.
|
||
|
+ * Therefore compare endp position to be able to break this
|
||
|
+ * otherwise endless loop for HUGE lines */
|
||
|
+ if (currentchar >= endp)
|
||
|
+ break;
|
||
|
+
|
||
|
while (currentchar < endp && p < ctoken + sizeof ctoken - 1)
|
||
|
*p++ = *currentchar++;
|
||
|
*p = 0;
|
||
|
--- fields.c
|
||
|
+++ fields.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -119,6 +119,7 @@ field_t * fieldread (file, delims, flags
|
||
|
if (linesize == 0)
|
||
|
{
|
||
|
free (linebuf);
|
||
|
+ linebuf = NULL;
|
||
|
return NULL;
|
||
|
}
|
||
|
return fieldmake (linebuf, 1, delims, flags, maxf);
|
||
|
@@ -417,8 +418,15 @@ void fieldfree (fieldp)
|
||
|
if (fieldp == NULL)
|
||
|
return;
|
||
|
if (fieldp->linebuf != NULL)
|
||
|
+ {
|
||
|
free ((char *) fieldp->linebuf);
|
||
|
+ fieldp->linebuf = NULL;
|
||
|
+ }
|
||
|
if (fieldp->fields != NULL)
|
||
|
+ {
|
||
|
free ((char *) fieldp->fields);
|
||
|
+ fieldp->fields = NULL;
|
||
|
+ }
|
||
|
free ((char *) fieldp);
|
||
|
+ fieldp = NULL;
|
||
|
}
|
||
|
--- icombine.c
|
||
|
+++ icombine.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -89,6 +89,7 @@ static char Rcs_Id[] =
|
||
|
#include "ispell.h"
|
||
|
#include "proto.h"
|
||
|
#include "msgs.h"
|
||
|
+#include <locale.h>
|
||
|
|
||
|
char * Lfile; /* Language-description file */
|
||
|
|
||
|
@@ -109,6 +110,9 @@ int main (argc, argv)
|
||
|
char * preftype = NULL;
|
||
|
char * wchars = NULL;
|
||
|
|
||
|
+ (void)setlocale(LC_CTYPE, "POSIX");
|
||
|
+ (void)setlocale(LC_COLLATE, "POSIX");
|
||
|
+
|
||
|
while (argc > 1 && argv[1][0] == '-')
|
||
|
{
|
||
|
argc--;
|
||
|
--- ijoin.c
|
||
|
+++ ijoin.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -122,6 +122,7 @@ static char Rcs_Id[] =
|
||
|
#include "ispell.h"
|
||
|
#include "proto.h"
|
||
|
#include "fields.h"
|
||
|
+#include <locale.h>
|
||
|
|
||
|
#ifdef __STDC__
|
||
|
#define SIGNED signed
|
||
|
@@ -179,6 +180,9 @@ int main (argc, argv) /* Join files */
|
||
|
char * argv[]; /* Argument vector */
|
||
|
{
|
||
|
|
||
|
+ (void)setlocale(LC_CTYPE, "POSIX");
|
||
|
+ (void)setlocale(LC_COLLATE, "POSIX");
|
||
|
+
|
||
|
while (argc > 3 && argv[1][0] == '-')
|
||
|
{
|
||
|
argc--;
|
||
|
--- ispell.c
|
||
|
+++ ispell.c 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -244,6 +244,7 @@ static char Rcs_Id[] =
|
||
|
#include <fcntl.h>
|
||
|
#endif /* NO_FCNTL_H */
|
||
|
#include <sys/stat.h>
|
||
|
+#include <locale.h>
|
||
|
|
||
|
static void usage P ((void));
|
||
|
int main P ((int argc, char * argv[]));
|
||
|
@@ -292,6 +293,9 @@ int main (argc, argv)
|
||
|
|
||
|
Trynum = 0;
|
||
|
|
||
|
+ (void)setlocale(LC_CTYPE, "POSIX");
|
||
|
+ (void)setlocale(LC_COLLATE, "POSIX");
|
||
|
+
|
||
|
p = getenv (LIBRARYVAR);
|
||
|
if (p == NULL)
|
||
|
(void) strcpy (libdir, LIBDIR);
|
||
|
--- munchlist.X
|
||
|
+++ munchlist.X 2022-10-07 10:59:27.604746809 +0000
|
||
|
@@ -191,7 +191,7 @@ then
|
||
|
echo "munchlist $*" 1>&2
|
||
|
set -vx
|
||
|
fi
|
||
|
-SORTTMP="-T ${TDIR}" # !!SORTTMP!!
|
||
|
+SORTTMP="-T ${MUNCHDIR}" # !!SORTTMP!!
|
||
|
|
||
|
DBDIR=${MUNCHDEBUGDIR-$MAILDEBUGDIR}
|
||
|
|
||
|
@@ -267,31 +267,32 @@ fi
|
||
|
# But that doesn't excuse breaking compatibility.)
|
||
|
#
|
||
|
# Detect whether sort accepts old-style switches.
|
||
|
-if sort +0 /dev/null >/dev/null 2>&1
|
||
|
-then
|
||
|
- CRETIN_SORT=false
|
||
|
-else
|
||
|
- CRETIN_SORT=true
|
||
|
-fi
|
||
|
+##if sort +0 /dev/null >/dev/null 2>&1
|
||
|
+##then
|
||
|
+## CRETIN_SORT=false
|
||
|
+##else
|
||
|
+## CRETIN_SORT=true
|
||
|
+##fi
|
||
|
+CRETIN_SORT=true
|
||
|
|
||
|
#
|
||
|
# The following is necessary so that some internationalized versions of
|
||
|
# sort(1) don't confuse things by sorting into a nonstandard order.
|
||
|
#
|
||
|
-LANG=C
|
||
|
-LOCALE=C
|
||
|
-LC_ALL=C
|
||
|
-LC_COLLATE=C
|
||
|
-LC_CTYPE=C
|
||
|
+LANG=POSIX
|
||
|
+LOCALE=POSIX
|
||
|
+LC_ALL=POSIX
|
||
|
+LC_COLLATE=POSIX
|
||
|
+LC_CTYPE=POSIX
|
||
|
export LANG LOCALE LC_COLLATE LC_CTYPE
|
||
|
#
|
||
|
# The following aren't strictly necessary, but I've been made paranoid
|
||
|
# by problems with the stuff above. It can't hurt to set them to a
|
||
|
# sensible value.
|
||
|
-LC_MESSAGES=C
|
||
|
-LC_MONETARY=C
|
||
|
-LC_NUMERIC=C
|
||
|
-LC_TIME=C
|
||
|
+LC_MESSAGES=POSIX
|
||
|
+LC_MONETARY=POSIX
|
||
|
+LC_NUMERIC=POSIX
|
||
|
+LC_TIME=POSIX
|
||
|
export LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
|
||
|
|
||
|
debug=no
|