[MPlayer-cvslog] r32955 - in trunk/gui/skin: cut.c cut.h
ib
subversion at mplayerhq.hu
Wed Feb 23 13:59:31 CET 2011
Author: ib
Date: Wed Feb 23 13:59:31 2011
New Revision: 32955
Log:
Cosmetic: Format to MPlayer coding style.
Modified:
trunk/gui/skin/cut.c
trunk/gui/skin/cut.h
Modified: trunk/gui/skin/cut.c
==============================================================================
--- trunk/gui/skin/cut.c Tue Feb 22 23:27:01 2011 (r32954)
+++ trunk/gui/skin/cut.c Wed Feb 23 13:59:31 2011 (r32955)
@@ -16,27 +16,33 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include "cut.h"
-void cutItemString( char * in,char * out,char sep,int num,size_t maxout )
+void cutItemString(char *in, char *out, char sep, int num, size_t maxout)
{
- int n;
- unsigned int i,c;
- for ( c=0,n=0,i=0;i<strlen( in );i++ )
- {
- if ( in[i] == sep ) n++;
- if ( n >= num && in[i] != sep && c + 1 < maxout ) out[c++] = in[i];
- if ( n >= num && in[i+1] == sep ) break;
- }
- if ( c < maxout ) out[c] = 0;
+ int n;
+ unsigned int i, c;
+
+ for (c = 0, n = 0, i = 0; i < strlen(in); i++) {
+ if (in[i] == sep)
+ n++;
+ if (n >= num && in[i] != sep && c + 1 < maxout)
+ out[c++] = in[i];
+ if (n >= num && in[i + 1] == sep)
+ break;
+ }
+
+ if (c < maxout)
+ out[c] = 0;
}
-int cutItemToInt( char * in,char sep,int num )
+int cutItemToInt(char *in, char sep, int num)
{
- char tmp[64];
- cutItem( in,tmp,sep,num );
- return atoi( tmp );
+ char tmp[64];
+
+ cutItem(in, tmp, sep, num);
+ return atoi(tmp);
}
Modified: trunk/gui/skin/cut.h
==============================================================================
--- trunk/gui/skin/cut.h Tue Feb 22 23:27:01 2011 (r32954)
+++ trunk/gui/skin/cut.h Wed Feb 23 13:59:31 2011 (r32955)
@@ -23,7 +23,7 @@
#define cutItem(in, out, sep, num) cutItemString(in, out, sep, num, sizeof(out))
-void cutItemString( char * in, char * out, char sep, int num, size_t maxout );
-int cutItemToInt( char * in, char sep, int num );
+void cutItemString(char *, char *, char, int, size_t);
+int cutItemToInt(char *, char, int);
#endif /* MPLAYER_GUI_CUT_H */
More information about the MPlayer-cvslog
mailing list