code cleanup: make function definition confirm to GNU coding style
[xboard.git] / uci.c
diff --git a/uci.c b/uci.c
index 1f39f6a..683a71b 100644 (file)
--- a/uci.c
+++ b/uci.c
@@ -5,6 +5,8 @@
  *
  * Copyright 2006 Alessandro Scotti
  *
+ * Enhancement Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ *
  * ------------------------------------------------------------------------
  *
  * GNU XBoard is free software: you can redistribute it and/or modify
@@ -23,6 +25,7 @@
  * ------------------------------------------------------------------------
  */
 #include <stdio.h>
+#include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -30,7 +33,8 @@
 #include "backend.h"
 Boolean GetArgValue(char *a);                          
 
-void InitEngineUCI( const char * iniDir, ChessProgramState * cps )
+void
+InitEngineUCI (const char *iniDir, ChessProgramState *cps)
 {   // replace engine command line by adapter command with expanded meta-symbols
     if( cps->isUCI ) {
         char *p, *q;
@@ -47,7 +51,7 @@ void InitEngineUCI( const char * iniDir, ChessProgramState * cps )
               *s++ = cps == &first ? 'f' : 's';
               p++;
             }
-            while(*p >= '0' && *p) *s++ = *p++; // copy option name
+            while(isdigit(*p) || isalpha(*p)) *s++ = *p++; // copy option name
             *s = NULLCHAR;
             if(cps == &second) { // change options for first into those for second engine
               if(strstr(buf, "first") == buf) sprintf(argName, "second%s", buf+5); else