projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2aecee
)
list_to_text() now appends empty line at end
author
oes
<oes@users.sourceforge.net>
Tue, 31 Jul 2001 14:44:51 +0000
(14:44 +0000)
committer
oes
<oes@users.sourceforge.net>
Tue, 31 Jul 2001 14:44:51 +0000
(14:44 +0000)
list.c
patch
|
blob
|
history
diff --git
a/list.c
b/list.c
index
18e5da7
..
255d6fd
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-1,4
+1,4
@@
-const char list_rcs[] = "$Id: list.c,v 1.
4 2001/06/29 13:30:22
oes Exp $";
+const char list_rcs[] = "$Id: list.c,v 1.
5 2001/06/29 21:45:41
oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/list.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/list.c,v $
@@
-34,6
+34,9
@@
const char list_rcs[] = "$Id: list.c,v 1.4 2001/06/29 13:30:22 oes Exp $";
*
* Revisions :
* $Log: list.c,v $
*
* Revisions :
* $Log: list.c,v $
+ * Revision 1.5 2001/06/29 21:45:41 oes
+ * Indentation, CRLF->LF, Tab-> Space
+ *
* Revision 1.4 2001/06/29 13:30:22 oes
* - Added Convenience function enlist_unique_header(),
* which takes the Header name and value as separate
* Revision 1.4 2001/06/29 13:30:22 oes
* - Added Convenience function enlist_unique_header(),
* which takes the Header name and value as separate
@@
-298,7
+301,8
@@
void destroy_list(struct list *header)
*
* Function : list_to_text
*
*
* Function : list_to_text
*
- * Description : "Flaten" a string list into 1 long \r\n delimited string.
+ * Description : "Flaten" a string list into 1 long \r\n delimited string,
+ * adding an empty line at the end.
*
* Parameters :
* 1 : h = pointer to list 'dummy' header
*
* Parameters :
* 1 : h = pointer to list 'dummy' header
@@
-311,9
+315,7
@@
char *list_to_text(struct list *h)
struct list *p;
char *ret = NULL;
char *s;
struct list *p;
char *ret = NULL;
char *s;
- int size;
-
- size = 0;
+ int size = 2;
for (p = h->next; p ; p = p->next)
{
for (p = h->next; p ; p = p->next)
{
@@
-341,6
+343,7
@@
char *list_to_text(struct list *h)
*s++ = '\r'; *s++ = '\n';
}
}
*s++ = '\r'; *s++ = '\n';
}
}
+ *s++ = '\r'; *s++ = '\n';
return(ret);
return(ret);