From aac8ea591b81c8cb13da1addac61d0fdfcb9d3a4 Mon Sep 17 00:00:00 2001 From: oes Date: Thu, 17 May 2001 22:52:35 +0000 Subject: [PATCH] - Cleaned CRLF's from the sources and related files --- encode.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/encode.c b/encode.c index 42d07443..7e82acd8 100644 --- a/encode.c +++ b/encode.c @@ -1,7 +1,7 @@ -const char encode_rcs[] = "$Id: encode.c,v 1.1 2001/05/13 21:57:06 administrator Exp $"; +const char encode_rcs[] = "$Id: encode.c,v 1.1.1.1 2001/05/15 13:58:51 oes Exp $"; /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/encode.c,v $ + * File : $Source: /cvsroot/ijbswa/current/encode.c,v $ * * Purpose : Functions to encode and decode URLs, and also to * encode cookies and HTML text. @@ -33,6 +33,9 @@ const char encode_rcs[] = "$Id: encode.c,v 1.1 2001/05/13 21:57:06 administrator * * Revisions : * $Log: encode.c,v $ + * Revision 1.1.1.1 2001/05/15 13:58:51 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -42,7 +45,7 @@ const char encode_rcs[] = "$Id: encode.c,v 1.1 2001/05/13 21:57:06 administrator #include #include #include - + #include "encode.h" const char encode_h_rcs[] = ENCODE_H_VERSION; @@ -232,7 +235,7 @@ char * cookie_encode(const char *s) * Function : url_encode * * Description : Encodes a string so it can be used in a URL - * query string. Replaces special characters with + * query string. Replaces special characters with * the appropriate %xx codes. * * Parameters : @@ -243,12 +246,12 @@ char * cookie_encode(const char *s) * *********************************************************************/ char * url_encode(const char *s) -{ - /* each input char can expand to at most 3 chars */ +{ + /* each input char can expand to at most 3 chars */ char * buf = (char *) malloc((strlen(s) * 3) + 1); - + if (buf) - { + { char c; char * p = buf; while( (c = *s++) != '\0') @@ -266,9 +269,9 @@ char * url_encode(const char *s) } *p = '\0'; - + } - + return(buf); } @@ -355,9 +358,9 @@ char *url_decode(const char * s) { char *buf = malloc(strlen(s) + 1); char *q = buf; - - if (buf) - { + + if (buf) + { while (*s) { switch (*s) @@ -385,9 +388,9 @@ char *url_decode(const char * s) break; } } - *q = '\0'; + *q = '\0'; } - + return(buf); } -- 2.39.2