Index: /trunk/zoo-project/zoo-kernel/makefile.vc
===================================================================
--- /trunk/zoo-project/zoo-kernel/makefile.vc	(revision 466)
+++ /trunk/zoo-project/zoo-kernel/makefile.vc	(revision 467)
@@ -8,11 +8,9 @@
 !INCLUDE nmake.opt
 
-all:  zoo_loader.cgi
+all:  zoo_loader.cgi zcfg2yaml
 
 version.h:
-	svnversion -q -c -n . > version_0.h
-	set /p VERS=<version_0.h
-	rm version_0.h
-	echo #define ZOO_VERSION "%VERS%" > version.h
+	set VERS=`svnversion .`
+	echo #define ZOO_VERSION "$(VERS)" > version.h
 
 main_conf_read.tab.c: main_conf_read.y service.h
@@ -39,4 +37,7 @@
 lex.sr.obj: lex.sr.c service.h
 	$(CPP) $(CFLAGS) /c lex.sr.c
+
+zcfg2yaml.obj: zcfg2yaml.c
+	$(CPP) $(CFLAGS) /c zcfg2yaml.c
 
 service_internal.obj: service_internal.c
@@ -70,6 +71,9 @@
 	$(CPP) /EHsc /c $(CFLAGS) ..\..\thirds\dirent-win32\dirent.c
 
-zoo_loader.cgi: zoo_loader.obj zoo_service_loader.obj service_internal.obj $(PY_FILE) $(JAVA_FILE) $(MS_FILE) $(JS_FILE) $(RUBY_FILE) ulinet.obj lex.cr.obj lex.sr.obj service_conf.tab.obj main_conf_read.tab.obj dirent.obj
+zoo_loader.cgi: version.h zoo_loader.obj zoo_service_loader.obj service_internal.obj $(PY_FILE) $(JAVA_FILE) $(MS_FILE) $(JS_FILE) $(RUBY_FILE) ulinet.obj lex.cr.obj lex.sr.obj service_conf.tab.obj main_conf_read.tab.obj dirent.obj
 	link zoo_loader.obj dirent.obj service_internal.obj $(PY_FILE) $(JAVA_FILE) $(MS_FILE) $(JS_FILE) $(RUBY_FILE) ulinet.obj main_conf_read.tab.obj lex.cr.obj service_conf.tab.obj lex.sr.obj  zoo_service_loader.obj /out:zoo_loader.cgi $(LDFLAGS) $(LDFLAGSCGI)
+
+zcfg2yaml.exe: version.h zcfg2yaml.obj zoo_service_loader.obj service_internal.obj $(PY_FILE) $(JAVA_FILE) $(MS_FILE) $(JS_FILE) $(RUBY_FILE) ulinet.obj lex.cr.obj lex.sr.obj service_conf.tab.obj main_conf_read.tab.obj dirent.obj
+	link zcfg2yaml.obj dirent.obj service_internal.obj $(PY_FILE) $(JAVA_FILE) $(MS_FILE) $(JS_FILE) $(RUBY_FILE) ulinet.obj main_conf_read.tab.obj lex.cr.obj service_conf.tab.obj lex.sr.obj /out:zcfg2yaml.exe $(LDFLAGS) $(LDFLAGSCGI)
 
 clean:
Index: /trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 466)
+++ /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 467)
@@ -35,14 +35,4 @@
 #endif
 
-int readServiceFile(maps* conf, char* file,service** service,char *name){
-  int t=getServiceFromFile(conf,file,service);
-#ifdef YAML
-  if(t<0){
-    t=getServiceFromYAML(conf,file,service,name);
-  }
-#endif
-  return t;
-}
-
 void printHeaders(maps* m){
   maps *_tmp=getMaps(m,"headers");
@@ -133,5 +123,5 @@
 
 char* getStatus(int pid){
-  char lpszBuf[SHMEMSIZE];
+  char *lpszBuf=(char*) malloc(SHMEMSIZE*sizeof(char));
   int i=0;
   LPWSTR lpszTmp=NULL;
Index: /trunk/zoo-project/zoo-kernel/service_internal.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 466)
+++ /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 467)
@@ -42,4 +42,5 @@
 #include <sys/shm.h>
 #else
+#include "cgic.h"
 #include <direct.h>
 #endif
@@ -65,5 +66,4 @@
 #include "ulinet.h"
 
-extern   int getServiceFromFile(maps*,const char*,service**);
 extern   int conf_read(const char*,maps*);
 
Index: /trunk/zoo-project/zoo-kernel/zcfg2yaml.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/zcfg2yaml.c	(revision 466)
+++ /trunk/zoo-project/zoo-kernel/zcfg2yaml.c	(revision 467)
@@ -26,4 +26,6 @@
 #include "service_internal.h"
 
+extern   int getServiceFromFile(maps*,const char*,service**);
+
 int main(int argc, char** argv){
   service* s1=NULL;
@@ -35,6 +37,7 @@
     return errorException(m, _("Unable to allocate memory."),"InternalError",NULL);
   }
-  readServiceFile(m,argv[1],&s1,argv[2]);
-  dumpServiceAsYAML(s1);
+  int t=getServiceFromFile(conf,file,service);
+  if(t>=0)
+    dumpServiceAsYAML(s1);
   return 0;
 }
Index: /trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 466)
+++ /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 467)
@@ -95,6 +95,6 @@
 #ifndef USE_MS
  { 
-  char *x=_zStrdup(a); 
-  char *y=_zStrdup(b); 
+  char *x=zStrdup(a); 
+  char *y=zStrdup(b); 
   
   x=_strlwr(x); 
@@ -115,4 +115,15 @@
 #define __(String) dgettext ("zoo-service",String)
 
+extern   int getServiceFromFile(maps*,const char*,service**);
+
+int readServiceFile(maps* conf, char* file,service** service,char *name){
+  int t=getServiceFromFile(conf,file,service);
+#ifdef YAML
+  if(t<0){
+    t=getServiceFromYAML(conf,file,service,name);
+  }
+#endif
+  return t;
+}
 
 void translateChar(char* str,char toReplace,char toReplaceBy){
Index: /trunk/zoo-project/zoo-services/utils/status/service.c
===================================================================
--- /trunk/zoo-project/zoo-services/utils/status/service.c	(revision 466)
+++ /trunk/zoo-project/zoo-services/utils/status/service.c	(revision 467)
@@ -121,4 +121,5 @@
 	setMapInMaps(outputs,"Result","value",(char*)xmlbuff);
 	xmlFree(xmlbuff);
+	free(tmpStr);
 	free(tmpStr1);
 	free(tmpStr0);
