HCoop
/
hcoop
/
debian
/
exim4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'debian'
[hcoop/debian/exim4.git]
/
src
/
lookups
/
lsearch.c
diff --git
a/src/lookups/lsearch.c
b/src/lookups/lsearch.c
index
6101d00
..
8b4459a
100644
(file)
--- a/
src/lookups/lsearch.c
+++ b/
src/lookups/lsearch.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 201
5
*/
+/* Copyright (c) University of Cambridge 1995 - 201
8
*/
/* See the file NOTICE for conditions of use and distribution. */
#include "../exim.h"
/* See the file NOTICE for conditions of use and distribution. */
#include "../exim.h"
@@
-101,11
+101,10
@@
for (last_was_eol = TRUE;
Ufgets(buffer, sizeof(buffer), f) != NULL;
last_was_eol = this_is_eol)
{
Ufgets(buffer, sizeof(buffer), f) != NULL;
last_was_eol = this_is_eol)
{
- int ptr, size;
int p = Ustrlen(buffer);
int linekeylength;
BOOL this_is_comment;
int p = Ustrlen(buffer);
int linekeylength;
BOOL this_is_comment;
-
uschar *
yield;
+
gstring *
yield;
uschar *s = buffer;
/* Check whether this the final segment of a line. If it follows an
uschar *s = buffer;
/* Check whether this the final segment of a line. If it follows an
@@
-240,7
+239,7
@@
for (last_was_eol = TRUE;
/* Reset dynamic store, if we need to, and revert to the search pool */
/* Reset dynamic store, if we need to, and revert to the search pool */
- if (reset_point
!= NULL
)
+ if (reset_point)
{
store_reset(reset_point);
store_pool = old_pool;
{
store_reset(reset_point);
store_pool = old_pool;
@@
-254,11
+253,9
@@
for (last_was_eol = TRUE;
Initialize, and copy the first segment of data. */
this_is_comment = FALSE;
Initialize, and copy the first segment of data. */
this_is_comment = FALSE;
- size = 100;
- ptr = 0;
- yield = store_get(size);
+ yield = string_get(100);
if (*s != 0)
if (*s != 0)
- yield = string_cat(yield,
&size, &ptr,
s);
+ yield = string_cat(yield, s);
/* Now handle continuations */
/* Now handle continuations */
@@
-294,18
+291,17
@@
for (last_was_eol = TRUE;
/* Join a physical or logical line continuation onto the result string. */
/* Join a physical or logical line continuation onto the result string. */
- yield = string_cat(yield,
&size, &ptr,
s);
+ yield = string_cat(yield, s);
}
}
- yield[ptr] = 0;
- store_reset(yield + ptr + 1);
- *result = yield;
+ store_reset(yield->s + yield->ptr + 1);
+ *result = string_from_gstring(yield);
return OK;
}
/* Reset dynamic store, if we need to */
return OK;
}
/* Reset dynamic store, if we need to */
-if (reset_point
!= NULL
)
+if (reset_point)
{
store_reset(reset_point);
store_pool = old_pool;
{
store_reset(reset_point);
store_pool = old_pool;