changeset 32868:f9d70de26708

Cosmetic: Format to MPlayer coding style.
author ib
date Wed, 23 Feb 2011 12:59:31 +0000
parents 454f6decbd93
children 67ec52396b81
files gui/skin/cut.c gui/skin/cut.h
diffstat 2 files changed, 23 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/cut.c	Tue Feb 22 22:27:01 2011 +0000
+++ b/gui/skin/cut.c	Wed Feb 23 12:59:31 2011 +0000
@@ -16,27 +16,33 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include <stdlib.h>
 #include <string.h>
-#include <stdlib.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);
 }
--- a/gui/skin/cut.h	Tue Feb 22 22:27:01 2011 +0000
+++ b/gui/skin/cut.h	Wed Feb 23 12:59:31 2011 +0000
@@ -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 */