[ekg2-commit] r4220 - trunk/plugins/icq: trunk/plugins/icq/misc.c

SVN commit svn w toxygen.net
Czw, 7 Sie 2008, 19:35:06 CEST


Author: wiechu
Date: 2008-08-07 19:35:06 +0200 (Thu, 07 Aug 2008)
New Revision: 4220

Modified:
   trunk/plugins/icq/misc.c
Log:
    add 'x' and 'X' to icq_unpack() -- skip byte or word.


Modified: trunk/plugins/icq/misc.c
===================================================================
--- trunk/plugins/icq/misc.c	2008-08-07 17:25:36 UTC (rev 4219)
+++ trunk/plugins/icq/misc.c	2008-08-07 17:35:06 UTC (rev 4220)
@@ -1,3 +1,21 @@
+/*
+ *  (C) Copyright 2006-2008 Jakub Zawadzki <darkjames w darkjames.ath.cx>
+ *                     2008 Wiesław Ochmiński <wiechu w wiechu.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
 #include <stdint.h>
 #include <stdarg.h>
 #include <string.h>
@@ -341,6 +359,16 @@
 				break;
 			}
 
+			case 'x':	/* skip this byte */
+				buf += 1;
+				len -= 1;
+				break;
+
+			case 'X':	/* skip this byte */
+				buf += 2;
+				len -= 2;
+				break;
+
 			default:
 				debug_error("icq_unpack() unknown format: %c\n", *format);
 				goto err2;



Więcej informacji o liście dyskusyjnej ekg2-commit