[dovecot-cvs] dovecot/src/lib-imap imap-parser.c,1.25,1.26

cras at procontrol.fi cras at procontrol.fi
Thu Dec 19 03:02:37 EET 2002


Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv11467/lib-imap

Modified Files:
	imap-parser.c 
Log Message:
Buffer related cleanups. Use PATH_MAX instead of hardcoded 1024 for paths.
Added str_path() and str_ppath() functions. i_snprintf() now returns only -1
or 0 depending on if buffer got full. dec2str() returns the string allocated
from data stack. Instead of just casting to (long) or (int), we now use
dec2str() with printf-like functions. Added o_stream_send_str(). Added
strocpy() and replaced all strcpy()s and strncpy()s with it.

Pretty much untested, hope it doesn't break too badly :)



Index: imap-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-parser.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- imap-parser.c	18 Dec 2002 15:15:41 -0000	1.25
+++ imap-parser.c	19 Dec 2002 01:02:35 -0000	1.26
@@ -215,8 +215,8 @@
 		if (parser->str_first_escape >= 0 &&
 		    (parser->flags & IMAP_PARSE_FLAG_NO_UNESCAPE) == 0) {
 			/* -1 because we skipped the '"' prefix */
-			string_remove_escapes(arg->data.str +
-					      parser->str_first_escape-1);
+			str_remove_escapes(arg->data.str +
+					   parser->str_first_escape-1);
 		}
 		break;
 	case ARG_PARSE_LITERAL_DATA:




More information about the dovecot-cvs mailing list