CVS:myspell-deb/debian/patches 02_mystrdup.dpatch,NONE,1.1 00list,1.1,1.2
Update of /cvs/debian-openoffice/myspell-deb/debian/patches
In directory gluck:/tmp/cvs-serv25205/patches
Modified Files:
00list
Added Files:
02_mystrdup.dpatch
Log Message:
* New patch, 02_mystrdup, to replace usage of 'strdup'
with 'mystrdup', needed for Woody backport
--- NEW FILE: 02_mystrdup.dpatch ---
#!/bin/sh -e
## 02_string_h.dpatch by Chris Halls <halls@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Replace single usage of 'strdup' with 'mystrdup' used elsewhere
if [ $# -lt 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
@DPATCH@
diff -urNad /home/challs/oo1/src/myspell-3.0+pre3.1/suggestmgr.cxx myspell-3.0+pre3.1/suggestmgr.cxx
--- /home/challs/oo1/src/myspell-3.0+pre3.1/suggestmgr.cxx 2004-01-19 18:30:54.000000000 +0100
+++ myspell-3.0+pre3.1/suggestmgr.cxx 2004-01-19 18:31:13.000000000 +0100
@@ -118,7 +118,7 @@
for (int j = 0; j < nummap; j++) {
if (strchr(maptable[j].set,c) != 0) {
in_map = 1;
- char * newword = strdup(word);
+ char * newword = mystrdup(word);
for (int k = 0; k < maptable[j].len; k++) {
*(newword + i) = *(maptable[j].set + k);
ns = map_related(newword, (i+1), wlst, ns, maptable, nummap);
@@ -398,7 +398,7 @@
int thresh = 0;
char * mw = NULL;
for (int sp = 1; sp < 4; sp++) {
- mw = strdup(word);
+ mw = mystrdup(word);
for (int k=sp; k < n; k+=4) *(mw + k) = '*';
thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH);
free(mw);
Index: 00list
===================================================================
RCS file: /cvs/debian-openoffice/myspell-deb/debian/patches/00list,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- 00list 10 Dec 2003 07:09:22 -0000 1.1
+++ 00list 19 Jan 2004 17:43:13 -0000 1.2
@@ -1 +1,2 @@
01_perl_path
+02_mystrdup
Reply to: