Mercurial > noffle
comparison src/protocol.c @ 247:7a830ce3211e noffle
[svn] *** empty log message ***
author | mirkol |
---|---|
date | Tue, 26 Mar 2002 17:52:01 +0000 |
parents | 4e69e9b722ae |
children | 0340b9c17edc |
comparison
equal
deleted
inserted
replaced
246:6f3a55d18659 | 247:7a830ce3211e |
---|---|
1 /* | 1 /* |
2 protocol.c | 2 protocol.c |
3 | 3 |
4 $Id: protocol.c 375 2002-03-15 10:50:33Z bears $ | 4 $Id: protocol.c 379 2002-03-26 17:52:01Z mirkol $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
164 Str lineLower, t; | 164 Str lineLower, t; |
165 | 165 |
166 Utl_cpyStr( lineLower, line ); | 166 Utl_cpyStr( lineLower, line ); |
167 Utl_toLower( lineLower ); | 167 Utl_toLower( lineLower ); |
168 p = Utl_stripWhiteSpace( lineLower ); | 168 p = Utl_stripWhiteSpace( lineLower ); |
169 dst = resultField; | 169 if ( p == lineLower ) |
170 while ( ! isspace( *p ) && *p != ':' && *p != '\0' ) | 170 { |
171 *(dst++) = *(p++); | 171 dst = resultField; |
172 *dst = '\0'; | 172 while ( ! isspace( *p ) && *p != ':' && *p != '\0' ) |
173 while ( isspace( *p ) ) | 173 *(dst++) = *(p++); |
174 ++p; | 174 *dst = '\0'; |
175 if ( *p == ':' ) | 175 while ( isspace( *p ) ) |
176 { | 176 ++p; |
177 ++p; | 177 if ( *p == ':' ) |
178 strcpy( t, line + ( p - lineLower ) ); | 178 { |
179 p = Utl_stripWhiteSpace( t ); | 179 ++p; |
180 strcpy( resultValue, p ); | 180 strcpy( t, line + ( p - lineLower ) ); |
181 return TRUE; | 181 p = Utl_stripWhiteSpace( t ); |
182 strcpy( resultValue, p ); | |
183 return TRUE; | |
184 } | |
185 } | |
186 else /* continued header. */ | |
187 { | |
188 strcpy( resultValue, lineLower ); /* include starting whitespace */ | |
189 return TRUE; | |
182 } | 190 } |
183 return FALSE; | 191 return FALSE; |
184 } | 192 } |
185 | 193 |
186 Bool | 194 Bool |