wez Tue Oct 29 09:36:51 2002 EDT Modified files: /php4/ext/standard/tests/file userstreams.phpt Log: I like my C comments, thanks very much. Index: php4/ext/standard/tests/file/userstreams.phpt diff -u php4/ext/standard/tests/file/userstreams.phpt:1.7 php4/ext/standard/tests/file/userstreams.phpt:1.8 --- php4/ext/standard/tests/file/userstreams.phpt:1.7 Tue Oct 29 09:31:54 2002 +++ php4/ext/standard/tests/file/userstreams.phpt Tue Oct 29 09:36:49 2002 @@ -4,9 +4,9 @@ <?php # vim600:syn=php: -// This is a fairly aggressive test that looks at -// user streams and also gives the seek/gets/buffer -// layer of streams a thorough testing +/* This is a fairly aggressive test that looks at + * user streams and also gives the seek/gets/buffer + * layer of streams a thorough testing */ $lyrics = <<<EOD ...and the road becomes my bride @@ -53,9 +53,9 @@ EOD; -// repeat the data a few times so that it grows larger than -// the default cache chunk size and that we have something -// to seek around... +/* repeat the data a few times so that it grows larger than + * the default cache chunk size and that we have something + * to seek around... */ $DATA = ""; for ($i = 0; $i < 30; $i++) { if ($i % 2 == 0) @@ -64,8 +64,8 @@ $DATA .= $lyrics; } -// store the data in a regular file so that we can compare -// the results +/* store the data in a regular file so that we can compare + * the results */ $tf = tmpfile(); fwrite($tf, $DATA); $n = ftell($tf); @@ -178,15 +178,15 @@ die("Failed to open resource"); } -// some default seeks that will cause buffer/cache misses +/* some default seeks that will cause buffer/cache misses */ $seeks = array( array(SEEK_SET, 0, 0), array(SEEK_CUR, 8450, 8450), array(SEEK_CUR, -7904, 546), array(SEEK_CUR, 12456, 13002), - // end up at BOF so that randomly generated seek offsets - // below will know where they are supposed to be + /* end up at BOF so that randomly generated seek offsets + * below will know where they are supposed to be */ array(SEEK_SET, 0, 0) ); @@ -201,7 +201,7 @@ SEEK_END => "SEEK_END" ); -// generate some random seek offsets +/* generate some random seek offsets */ $position = 0; for ($i = 0; $i < 256; $i++) { $whence = $whence_map[array_rand($whence_map, 1)]; @@ -224,14 +224,14 @@ $seeks[] = array($whence, $offset, $position); } -// we compare the results of fgets using differing line lengths to -// test the fgets layer also +/* we compare the results of fgets using differing line lengths to + * test the fgets layer also */ $line_lengths = array(1024, 256, 64, 16); $fail_count = 0; ob_start(); foreach($line_lengths as $line_length) { - // now compare the real stream with the user stream + /* now compare the real stream with the user stream */ $j = 0; rewind($tf); rewind($fp); @@ -301,7 +301,6 @@ if ($fail_count == 0) { echo "FGETS: OK\n"; } -/**/ ?> --EXPECT-- Not Registered
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php