summaryrefslogtreecommitdiff
path: root/textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2005-05-24 12:37:50 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2005-05-24 12:37:50 +0000
commit40a684ff1e8608bde986585a735e66d9a456e675 (patch)
tree21680bac7d4436c9b33d17b1753f63e511708512 /textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp
parentUpdate to 0.65. (diff)
IIIMF-related ports:
- drop maintainership - update to r12.2 - some bug fixes PR: 81184 Submitted by: Masanori OZAWA <ozawa@ongs.co.jp> Approved by: maintainer
Diffstat (limited to 'textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp')
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp b/textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp
new file mode 100644
index 000000000000..ad0fb280089c
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_lexmlconf.cpp
@@ -0,0 +1,66 @@
+--- iiimsf/src/lexmlconf.cpp.orig Fri Apr 22 16:53:03 2005
++++ iiimsf/src/lexmlconf.cpp Mon May 16 19:00:55 2005
+@@ -114,6 +114,7 @@
+ list = (IIIMLEInfoList *)malloc(sizeof (IIIMLEInfoList) * 1);
+ list->data = leinfo;
+ list->next = NULL;
++ list->prev = NULL;
+
+ return list;
+ }
+@@ -128,6 +129,7 @@
+ if (list != NULL) {
+ for (ll = list; ll->next != NULL; ll = ll->next);
+ ll->next = l;
++ l->prev = ll;
+ ll = list;
+ } else {
+ ll = l;
+@@ -144,7 +146,12 @@
+
+ l = iiim_le_info_list_new(leinfo);
+ if (list != NULL) {
++ if (list->prev != NULL) {
++ list->prev->next = l;
++ }
+ l->next = list;
++ l->prev = list->prev;
++ list->prev = l;
+ }
+
+ return l;
+@@ -154,22 +161,19 @@
+ iiim_le_info_list_remove(IIIMLEInfoList *list,
+ IIIMLEInfo *leinfo)
+ {
+- IIIMLEInfoList *tmp, *prev = NULL;
++ IIIMLEInfoList *prev, *next;
+
+- tmp = list;
+- while (tmp) {
+- if (tmp->data == leinfo) {
+- if (prev)
+- prev->next = tmp->next;
+- else
+- list = tmp->next;
+- iiim_le_info_free(tmp->data);
+- free(tmp);
+-
+- break;
+- }
+- prev = tmp;
+- tmp = prev->next;
++ for (; list && list->data != leinfo; list = list->next);
++
++ if (NULL != list) {
++ prev = list->prev;
++ next = list->next;
++
++ if (NULL != prev) prev->next = next;
++ if (NULL != next) next->prev = prev;
++
++ if (list->data) iiim_le_info_free(list->data);
++ free(list);
+ }
+
+ return list;