[Swfed-svn] swfed-svn [115] 拡張子を phps から php に変更

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2009年 2月 11日 (水) 21:58:58 JST


Revision: 115
          http://svn.sourceforge.jp/view?root=swfed&view=rev&rev=115
Author:   yoya
Date:     2009-02-11 21:58:58 +0900 (Wed, 11 Feb 2009)

Log Message:
-----------
拡張子を phps から php に変更

Added Paths:
-----------
    trunk/sample/swfcompress.php
    trunk/sample/swfdump.php
    trunk/sample/swfgeteditstring.php
    trunk/sample/swfgetjpegalphadata.php
    trunk/sample/swfgetjpegdata.php
    trunk/sample/swfgetpngdata.php
    trunk/sample/swfgetsounddata.php
    trunk/sample/swfreplaceeditstring.php
    trunk/sample/swfreplacegifdata.php
    trunk/sample/swfreplacejpegdata.php
    trunk/sample/swfreplacemlddata.php
    trunk/sample/swfreplacepngdata.php

Removed Paths:
-------------
    trunk/sample/swfcompress.phps
    trunk/sample/swfdump.phps
    trunk/sample/swfgeteditstring.phps
    trunk/sample/swfgetjpegalphadata.phps
    trunk/sample/swfgetjpegdata.phps
    trunk/sample/swfgetpngdata.phps
    trunk/sample/swfgetsounddata.phps
    trunk/sample/swfreplaceeditstring.phps
    trunk/sample/swfreplacegifdata.phps
    trunk/sample/swfreplacejpegdata.phps
    trunk/sample/swfreplacemlddata.phps
    trunk/sample/swfreplacepngdata.phps


-------------- next part --------------
Copied: trunk/sample/swfcompress.php (from rev 114, trunk/sample/swfcompress.phps)
===================================================================
--- trunk/sample/swfcompress.php	                        (rev 0)
+++ trunk/sample/swfcompress.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,31 @@
+<?php
+
+$compress = true;
+
+switch($argc) {
+  case 2:
+    $swf_filename = $argv[1];
+    break;
+  case 3:
+    if ($argv[1] == '-u') {
+       $compress = false;
+       $swf_filename = $argv[2];
+       break;
+    }
+  default:
+    fprintf(STDERR, "Usage: php swfcompress.phps [-u] <swf_file>\n");
+    exit(1);
+}
+
+$swf_data = file_get_contents($swf_filename);
+
+$swf = new SWFEditor();
+if ($swf->input($swf_data) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+$info = array('compress' => $compress);
+$swf->setHeaderInfo($info);
+
+echo $swf->output();

Deleted: trunk/sample/swfcompress.phps
===================================================================
--- trunk/sample/swfcompress.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfcompress.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,31 +0,0 @@
-<?php
-
-$compress = true;
-
-switch($argc) {
-  case 2:
-    $swf_filename = $argv[1];
-    break;
-  case 3:
-    if ($argv[1] == '-u') {
-       $compress = false;
-       $swf_filename = $argv[2];
-       break;
-    }
-  default:
-    fprintf(STDERR, "Usage: php swfcompress.phps [-u] <swf_file>\n");
-    exit(1);
-}
-
-$swf_data = file_get_contents($swf_filename);
-
-$swf = new SWFEditor();
-if ($swf->input($swf_data) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-$info = array('compress' => $compress);
-$swf->setHeaderInfo($info);
-
-echo $swf->output();

Copied: trunk/sample/swfdump.php (from rev 114, trunk/sample/swfdump.phps)
===================================================================
--- trunk/sample/swfdump.php	                        (rev 0)
+++ trunk/sample/swfdump.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,17 @@
+<?php
+
+if ($argc < 2) {
+    fprintf(STDERR, "Usage: swfdump <swf_file>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+$obj->swfInfo();

Deleted: trunk/sample/swfdump.phps
===================================================================
--- trunk/sample/swfdump.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfdump.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,17 +0,0 @@
-<?php
-
-if ($argc < 2) {
-    fprintf(STDERR, "Usage: swfdump <swf_file>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-$obj->swfInfo();

Copied: trunk/sample/swfgeteditstring.php (from rev 114, trunk/sample/swfgeteditstring.phps)
===================================================================
--- trunk/sample/swfgeteditstring.php	                        (rev 0)
+++ trunk/sample/swfgeteditstring.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,18 @@
+<?php
+
+if ($argc != 3) {
+    fprintf(STDERR, "Usage: swfgeteditstrint <swf_file> <var_name>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$var_name = $argv[2];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+echo $obj->getEditString($var_name) . "\n";

Deleted: trunk/sample/swfgeteditstring.phps
===================================================================
--- trunk/sample/swfgeteditstring.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfgeteditstring.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,18 +0,0 @@
-<?php
-
-if ($argc != 3) {
-    fprintf(STDERR, "Usage: swfgeteditstrint <swf_file> <var_name>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$var_name = $argv[2];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-echo $obj->getEditString($var_name) . "\n";

Copied: trunk/sample/swfgetjpegalphadata.php (from rev 114, trunk/sample/swfgetjpegalphadata.phps)
===================================================================
--- trunk/sample/swfgetjpegalphadata.php	                        (rev 0)
+++ trunk/sample/swfgetjpegalphadata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,16 @@
+<?php
+
+if ($argc != 3) {
+    fprintf(STDERR, "Usage: swfgetjpegalphadata <swf_file> <image_id>\n");
+    exit(1);
+}
+$swf_filename = $argv[1];
+$image_id = $argv[2];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+echo $obj->getJpegAlpha($image_id);

Deleted: trunk/sample/swfgetjpegalphadata.phps
===================================================================
--- trunk/sample/swfgetjpegalphadata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfgetjpegalphadata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,16 +0,0 @@
-<?php
-
-if ($argc != 3) {
-    fprintf(STDERR, "Usage: swfgetjpegalphadata <swf_file> <image_id>\n");
-    exit(1);
-}
-$swf_filename = $argv[1];
-$image_id = $argv[2];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-echo $obj->getJpegAlpha($image_id);

Copied: trunk/sample/swfgetjpegdata.php (from rev 114, trunk/sample/swfgetjpegdata.phps)
===================================================================
--- trunk/sample/swfgetjpegdata.php	                        (rev 0)
+++ trunk/sample/swfgetjpegdata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,18 @@
+<?php
+
+if ($argc != 3) {
+    fprintf(STDERR, "Usage: swfgetjpegdata <swf_file> <image_id>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$image_id = $argv[2];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+	fprintf(STDERR, "input failed\n");
+	exit(1);
+}
+
+echo $obj->getJpegData($image_id);

Deleted: trunk/sample/swfgetjpegdata.phps
===================================================================
--- trunk/sample/swfgetjpegdata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfgetjpegdata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,18 +0,0 @@
-<?php
-
-if ($argc != 3) {
-    fprintf(STDERR, "Usage: swfgetjpegdata <swf_file> <image_id>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$image_id = $argv[2];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-	fprintf(STDERR, "input failed\n");
-	exit(1);
-}
-
-echo $obj->getJpegData($image_id);

Copied: trunk/sample/swfgetpngdata.php (from rev 114, trunk/sample/swfgetpngdata.phps)
===================================================================
--- trunk/sample/swfgetpngdata.php	                        (rev 0)
+++ trunk/sample/swfgetpngdata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,18 @@
+<?php
+
+if ($argc != 3) {
+    fprintf(STDERR, "Usage: swfgetpngdata <swf_file> <image_id>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$image_id = $argv[2];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+echo $obj->getPNGData($image_id);

Deleted: trunk/sample/swfgetpngdata.phps
===================================================================
--- trunk/sample/swfgetpngdata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfgetpngdata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,18 +0,0 @@
-<?php
-
-if ($argc != 3) {
-    fprintf(STDERR, "Usage: swfgetpngdata <swf_file> <image_id>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$image_id = $argv[2];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-echo $obj->getPNGData($image_id);

Copied: trunk/sample/swfgetsounddata.php (from rev 114, trunk/sample/swfgetsounddata.phps)
===================================================================
--- trunk/sample/swfgetsounddata.php	                        (rev 0)
+++ trunk/sample/swfgetsounddata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,18 @@
+<?php
+
+if ($argc != 3) {
+    fprintf(STDERR, "Usage: swfgetsounddata <swf_file> <sound_id>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$sound_id = $argv[2];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+echo $obj->getSoundData($sound_id);

Deleted: trunk/sample/swfgetsounddata.phps
===================================================================
--- trunk/sample/swfgetsounddata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfgetsounddata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,18 +0,0 @@
-<?php
-
-if ($argc != 3) {
-    fprintf(STDERR, "Usage: swfgetsounddata <swf_file> <sound_id>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$sound_id = $argv[2];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-echo $obj->getSoundData($sound_id);

Copied: trunk/sample/swfreplaceeditstring.php (from rev 114, trunk/sample/swfreplaceeditstring.phps)
===================================================================
--- trunk/sample/swfreplaceeditstring.php	                        (rev 0)
+++ trunk/sample/swfreplaceeditstring.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,23 @@
+<?php
+
+if ($argc < 4) {
+    fprintf(STDERR, "Usage: swfreplaceeditstring <swf_file> <variable_name> <initial_text>\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+$variable_name = $argv[2];
+$initial_text = $argv[3];
+$swfdata = file_get_contents($swf_filename);
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+if ($obj->replaceEditString($variable_name, $initial_text) == false) {
+    fprintf(STDERR, "replaceEditString($variable_name, ...) failed\n");
+    exit(1);
+}
+
+echo $obj->output();

Deleted: trunk/sample/swfreplaceeditstring.phps
===================================================================
--- trunk/sample/swfreplaceeditstring.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfreplaceeditstring.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,23 +0,0 @@
-<?php
-
-if ($argc < 4) {
-    fprintf(STDERR, "Usage: swfreplaceeditstring <swf_file> <variable_name> <initial_text>\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-$variable_name = $argv[2];
-$initial_text = $argv[3];
-$swfdata = file_get_contents($swf_filename);
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-if ($obj->replaceEditString($variable_name, $initial_text) == false) {
-    fprintf(STDERR, "replaceEditString($variable_name, ...) failed\n");
-    exit(1);
-}
-
-echo $obj->output();

Copied: trunk/sample/swfreplacegifdata.php (from rev 114, trunk/sample/swfreplacegifdata.phps)
===================================================================
--- trunk/sample/swfreplacegifdata.php	                        (rev 0)
+++ trunk/sample/swfreplacegifdata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,27 @@
+<?php
+
+if (($argc < 4) || ($argc%2 != 0)) {
+    fprintf(STDERR, "Usage: swfreplacegifdata <swf_file> <image_id> <gif_file> [<image_id2> <gif_file2> [...]]\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+
+$swfdata = file_get_contents($swf_filename);
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+for ($i=2 ; $i < $argc ; $i+=2) {
+    $image_id = $argv[$i];
+    $gif_filename = $argv[$i+1];
+    $gifdata = file_get_contents($gif_filename);
+    if ($obj->replaceGIFData($image_id, $gifdata) == false) {
+        fprintf(STDERR, "replaceGIFdata($image_id, ...) failed\n");
+        exit(1);
+    }
+}
+
+echo $obj->output();

Deleted: trunk/sample/swfreplacegifdata.phps
===================================================================
--- trunk/sample/swfreplacegifdata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfreplacegifdata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,27 +0,0 @@
-<?php
-
-if (($argc < 4) || ($argc%2 != 0)) {
-    fprintf(STDERR, "Usage: swfreplacegifdata <swf_file> <image_id> <gif_file> [<image_id2> <gif_file2> [...]]\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-
-$swfdata = file_get_contents($swf_filename);
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-for ($i=2 ; $i < $argc ; $i+=2) {
-    $image_id = $argv[$i];
-    $gif_filename = $argv[$i+1];
-    $gifdata = file_get_contents($gif_filename);
-    if ($obj->replaceGIFData($image_id, $gifdata) == false) {
-        fprintf(STDERR, "replaceGIFdata($image_id, ...) failed\n");
-        exit(1);
-    }
-}
-
-echo $obj->output();

Copied: trunk/sample/swfreplacejpegdata.php (from rev 114, trunk/sample/swfreplacejpegdata.phps)
===================================================================
--- trunk/sample/swfreplacejpegdata.php	                        (rev 0)
+++ trunk/sample/swfreplacejpegdata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,41 @@
+<?php
+
+if ($argc < 4) {
+    fprintf(STDERR, "Usage: swfreplacejpegdata <swf_file> <image_id> <jpeg_file> [alpha_file]\n");
+    exit(1);
+}
+
+if ($argc > 3) {
+    $swf_filename = $argv[1];
+    $image_id = $argv[2];
+    $jpeg_filename = $argv[3];
+    if ($argc > 4) {
+	$alpha_filename = $argv[4];
+    }
+}
+
+$swfdata = file_get_contents($swf_filename);
+$jpegdata = file_get_contents($jpeg_filename);
+
+if (! empty($alpha_filename)) {
+    $alphadata = file_get_contents($alpha_filename);
+}
+
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+if (empty($alphadata)) {
+    $result = $obj->replaceJpegData($image_id, $jpegdata);
+} else {
+    $result = $obj->replaceJpegData($image_id, $jpegdata, $alphadata);
+}
+
+if ($result == false) {
+    fprintf(STDERR, "replaceJpegdata($image_id, ...) failed\n");
+    exit(1);
+}
+
+echo $obj->output();

Deleted: trunk/sample/swfreplacejpegdata.phps
===================================================================
--- trunk/sample/swfreplacejpegdata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfreplacejpegdata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,41 +0,0 @@
-<?php
-
-if ($argc < 4) {
-    fprintf(STDERR, "Usage: swfreplacejpegdata <swf_file> <image_id> <jpeg_file> [alpha_file]\n");
-    exit(1);
-}
-
-if ($argc > 3) {
-    $swf_filename = $argv[1];
-    $image_id = $argv[2];
-    $jpeg_filename = $argv[3];
-    if ($argc > 4) {
-	$alpha_filename = $argv[4];
-    }
-}
-
-$swfdata = file_get_contents($swf_filename);
-$jpegdata = file_get_contents($jpeg_filename);
-
-if (! empty($alpha_filename)) {
-    $alphadata = file_get_contents($alpha_filename);
-}
-
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-if (empty($alphadata)) {
-    $result = $obj->replaceJpegData($image_id, $jpegdata);
-} else {
-    $result = $obj->replaceJpegData($image_id, $jpegdata, $alphadata);
-}
-
-if ($result == false) {
-    fprintf(STDERR, "replaceJpegdata($image_id, ...) failed\n");
-    exit(1);
-}
-
-echo $obj->output();

Copied: trunk/sample/swfreplacemlddata.php (from rev 114, trunk/sample/swfreplacemlddata.phps)
===================================================================
--- trunk/sample/swfreplacemlddata.php	                        (rev 0)
+++ trunk/sample/swfreplacemlddata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,27 @@
+<?php
+
+if (($argc < 4) || ($argc%2 != 0)) {
+    fprintf(STDERR, "Usage: swfreplacemlddata <swf_file> <sound_id> <mld_file> [<sound_id2> <mld_file2> [...]]\n");
+    exit(1);
+}
+
+$swf_filename = $argv[1];
+
+$swfdata = file_get_contents($swf_filename);
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+    fprintf(STDERR, "input failed\n");
+    exit(1);
+}
+
+for ($i=2 ; $i < $argc ; $i+=2) {
+    $sound_id = $argv[$i];
+    $mld_filename = $argv[$i+1];
+    $mlddata = file_get_contents($mld_filename);
+    if ($obj->replaceMLDData($sound_id, $mlddata) == false) {
+	fprintf(STDERR, "replaceMLDdata($sound_id, ...) failed\n");
+        exit(1);
+    }
+}
+
+echo $obj->output();

Deleted: trunk/sample/swfreplacemlddata.phps
===================================================================
--- trunk/sample/swfreplacemlddata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfreplacemlddata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,27 +0,0 @@
-<?php
-
-if (($argc < 4) || ($argc%2 != 0)) {
-    fprintf(STDERR, "Usage: swfreplacemlddata <swf_file> <sound_id> <mld_file> [<sound_id2> <mld_file2> [...]]\n");
-    exit(1);
-}
-
-$swf_filename = $argv[1];
-
-$swfdata = file_get_contents($swf_filename);
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-    fprintf(STDERR, "input failed\n");
-    exit(1);
-}
-
-for ($i=2 ; $i < $argc ; $i+=2) {
-    $sound_id = $argv[$i];
-    $mld_filename = $argv[$i+1];
-    $mlddata = file_get_contents($mld_filename);
-    if ($obj->replaceMLDData($sound_id, $mlddata) == false) {
-	fprintf(STDERR, "replaceMLDdata($sound_id, ...) failed\n");
-        exit(1);
-    }
-}
-
-echo $obj->output();

Copied: trunk/sample/swfreplacepngdata.php (from rev 114, trunk/sample/swfreplacepngdata.phps)
===================================================================
--- trunk/sample/swfreplacepngdata.php	                        (rev 0)
+++ trunk/sample/swfreplacepngdata.php	2009-02-11 12:58:58 UTC (rev 115)
@@ -0,0 +1,27 @@
+<?php
+
+if (($argc < 4) || ($argc%2 != 0)) {
+	fprintf(STDERR, "Usage: swfreplacepngdata <swf_file> <image_id> <png_file> [<image_id2> <png_file2> [...]]\n");
+	exit(1);
+}
+
+$swf_filename = $argv[1];
+
+$swfdata = file_get_contents($swf_filename);
+$obj = new SWFEditor();
+if ($obj->input($swfdata) == false) {
+	fprintf(STDERR, "input failed\n");
+	exit(1);
+}
+
+for ($i=2 ; $i < $argc ; $i+=2) {
+	$image_id = $argv[$i];
+	$png_filename = $argv[$i+1];
+	$pngdata = file_get_contents($png_filename);
+	if ($obj->replacePNGData($image_id, $pngdata) == false) {
+		fprintf(STDERR, "replacePNGdata($image_id, ...) failed\n");
+		exit(1);
+	}
+}
+
+echo $obj->output();

Deleted: trunk/sample/swfreplacepngdata.phps
===================================================================
--- trunk/sample/swfreplacepngdata.phps	2009-02-11 12:55:59 UTC (rev 114)
+++ trunk/sample/swfreplacepngdata.phps	2009-02-11 12:58:58 UTC (rev 115)
@@ -1,27 +0,0 @@
-<?php
-
-if (($argc < 4) || ($argc%2 != 0)) {
-	fprintf(STDERR, "Usage: swfreplacepngdata <swf_file> <image_id> <png_file> [<image_id2> <png_file2> [...]]\n");
-	exit(1);
-}
-
-$swf_filename = $argv[1];
-
-$swfdata = file_get_contents($swf_filename);
-$obj = new SWFEditor();
-if ($obj->input($swfdata) == false) {
-	fprintf(STDERR, "input failed\n");
-	exit(1);
-}
-
-for ($i=2 ; $i < $argc ; $i+=2) {
-	$image_id = $argv[$i];
-	$png_filename = $argv[$i+1];
-	$pngdata = file_get_contents($png_filename);
-	if ($obj->replacePNGData($image_id, $pngdata) == false) {
-		fprintf(STDERR, "replacePNGdata($image_id, ...) failed\n");
-		exit(1);
-	}
-}
-
-echo $obj->output();



Swfed-svn メーリングリストの案内
アーカイブの一覧に戻る