浏览代码

Adjusted the vs9-to-vs8 converter so that status messages won't mix with its converted output.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13082 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 年之前
父节点
当前提交
2e677dbb88
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      tools/vs9-to-vs8.php

+ 9 - 9
tools/vs9-to-vs8.php

@@ -1,14 +1,14 @@
 <?php
 <?php
 	// Visual Studio 9 to Visual Studio 8 project file converter
 	// Visual Studio 9 to Visual Studio 8 project file converter
 	// author : theultramage
 	// author : theultramage
-	// version: 4. august 2008
+	// version: 15. august 2008
 ?>
 ?>
 <?php
 <?php
-	echo "VS9 to VS8 project file converter"."\n";
-	echo "---------------------------------"."\n";
+	fprintf(STDERR, "VS9 to VS8 project file converter"."\n");
+	fprintf(STDERR, "---------------------------------"."\n");
 	if( @$_SERVER["argc"] < 2 )
 	if( @$_SERVER["argc"] < 2 )
 	{
 	{
-		echo "Usage: {$_SERVER["argv"][0]} file.vcproj"."\n";
+		fprintf(STDERR, "Usage: {$_SERVER["argv"][0]} file.vcproj"."\n");
 		exit();
 		exit();
 	}
 	}
 
 
@@ -17,15 +17,15 @@
 	if( $data === FALSE )
 	if( $data === FALSE )
 		die("invalid input file '".$input."'");
 		die("invalid input file '".$input."'");
 
 
-	echo "Converting {$input}...";
+	fprintf(STDERR, "Converting {$input}...");
 	
 	
 	foreach( $data as $line )
 	foreach( $data as $line )
 	{
 	{
 		if( strstr($line,'Version="9,00"') !== FALSE )
 		if( strstr($line,'Version="9,00"') !== FALSE )
-			echo "\t".'Version="8,00"'."\n";
+			fprintf(STDOUT, "\t".'Version="8,00"'."\n");
 		else
 		else
 		if( strstr($line,'Version="9.00"') !== FALSE )
 		if( strstr($line,'Version="9.00"') !== FALSE )
-			echo "\t".'Version="8.00"'."\n";
+			fprintf(STDOUT, "\t".'Version="8.00"'."\n");
 		else
 		else
 		if( strstr($line,'TargetFrameworkVersion') !== FALSE )
 		if( strstr($line,'TargetFrameworkVersion') !== FALSE )
 			;
 			;
@@ -36,8 +36,8 @@
 		if( strstr($line,'DataExecutionPrevention') !== FALSE )
 		if( strstr($line,'DataExecutionPrevention') !== FALSE )
 			;
 			;
 		else // default
 		else // default
-			echo $line;
+			fprintf(STDOUT, $line);
 	}
 	}
 
 
-	echo "done."."\n";
+	fprintf(STDERR, "done."."\n");
 ?>
 ?>