[PHP-DOC] cvs: pecl /phar TODO package.php phar.c phar_internal.h phar_object.c tar.c /phar/tests/tar tar_gzip.phpt

2008-01-08 Thread Greg Beaver
cellog  Wed Jan  9 07:09:03 2008 UTC

  Added files: 
/pecl/phar/tests/tartar_gzip.phpt 

  Modified files:  
/pecl/phar  TODO package.php phar.c phar_internal.h phar_object.c 
tar.c 
  Log:
  implement whole-file compression of phars for phar/tar-based phars
  still not 100% working, add failing test
  add Phar::isCompressed(), which returns either 0, Phar::GZ, or Phar::BZ2
  [DOC]
  http://cvs.php.net/viewvc.cgi/pecl/phar/TODO?r1=1.49&r2=1.50&diff_format=u
Index: pecl/phar/TODO
diff -u pecl/phar/TODO:1.49 pecl/phar/TODO:1.50
--- pecl/phar/TODO:1.49 Wed Jan  9 03:53:41 2008
+++ pecl/phar/TODO  Wed Jan  9 07:09:03 2008
@@ -68,6 +68,5 @@
  X Phar::copy($from, $to); [Greg]
  X Phar::delete($what) [Greg]
  X Phar::buildFromIterator(Iterator $it[, string $base_directory]) [Greg]
- * Layout: Option to compress all content rather than single files.
-   That excludes stub and manifest haeder. (tar only)
+ X Layout: Option to compress all content rather than single files. (tar/phar 
only) [Greg]
  X clean crap paths like phar://blah.phar/file//../to\\here.php [Greg]
http://cvs.php.net/viewvc.cgi/pecl/phar/package.php?r1=1.29&r2=1.30&diff_format=u
Index: pecl/phar/package.php
diff -u pecl/phar/package.php:1.29 pecl/phar/package.php:1.30
--- pecl/phar/package.php:1.29  Wed Jan  9 03:53:41 2008
+++ pecl/phar/package.php   Wed Jan  9 07:09:03 2008
@@ -9,6 +9,7 @@
  * include/fopen with include_path all work unmodified within a phar [Greg]
  * paths with . and .. work (phar://blah.phar/a/../b.php => 
phar://blah.phar/b.php) [Greg]
  * add support for mkdir()/rmdir() and support for empty directories to phar 
file format [Greg]
+ * add option to compress the entire phar file for phar/tar file format [Greg]
  * implement Phar::copy(string $from, string $to) [Greg]
  * implement Phar::buildFromIterator(Iterator $it[, string $base_directory]) 
[Greg]
  * add mapping of include/require from within a phar to location within phar 
[Greg]
http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.258&r2=1.259&diff_format=u
Index: pecl/phar/phar.c
diff -u pecl/phar/phar.c:1.258 pecl/phar/phar.c:1.259
--- pecl/phar/phar.c:1.258  Wed Jan  9 03:47:21 2008
+++ pecl/phar/phar.cWed Jan  9 07:09:03 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.258 2008/01/09 03:47:21 cellog Exp $ */
+/* $Id: phar.c,v 1.259 2008/01/09 07:09:03 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -979,7 +979,7 @@
  * This is used by phar_open_filename to process the manifest, but can be 
called
  * directly.
  */
-int phar_open_file(php_stream *fp, char *fname, int fname_len, char *alias, 
int alias_len, long halt_offset, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
+int phar_open_file(php_stream *fp, char *fname, int fname_len, char *alias, 
int alias_len, long halt_offset, phar_archive_data** pphar, php_uint32 
compression, char **error TSRMLS_DC) /* {{{ */
 {
char b32[4], *buffer, *endbuffer, *savebuf;
phar_archive_data *mydata = NULL;
@@ -1066,7 +1066,11 @@
 
PHAR_GET_32(buffer, manifest_flags);
 
-   manifest_flags &= ~PHAR_HDR_COMPRESSION_MASK; 
+   manifest_flags &= ~PHAR_HDR_COMPRESSION_MASK;
+
+   manifest_flags &= ~PHAR_FILE_COMPRESSION_MASK;
+   /* remember whether this entire phar was compressed with gz/bzip2 */
+   manifest_flags |= compression;
 
/* The lowest nibble contains the phar wide flags. The compression 
flags can */
/* be ignored on reading because it is being generated anyways. */
@@ -1624,14 +1628,14 @@
 {
const char token[] = "__HALT_COMPILER();";
const char zip_magic[] = "PK\x03\x04";
+   const char gz_magic[] = "\x1f\x8b\x08";
+   const char bz_magic[] = "BZh";
char *pos, buffer[1024 + sizeof(token)], test = '\0';
const long readsize = sizeof(buffer) - sizeof(token);
const long tokenlen = sizeof(token) - 1;
long halt_offset;
size_t got;
-
-   /* Maybe it's better to compile the file instead of just searching,  */
-   /* but we only want the offset. So we want a .re scanner to find it. */
+   php_uint32 compression = PHAR_FILE_COMPRESSED_NONE;
 
if (error) {
*error = NULL;
@@ -1643,6 +1647,9 @@
buffer[sizeof(buffer)-1] = '\0';
memset(buffer, 32, sizeof(token));
halt_offset = 0;
+
+   /* Maybe it's better to compile the file instead of just searching,  */
+   /* but we only want the offset. So we want a .re scanner to find it. */
while(!php_stream_eof(fp)) {
if ((got = php_stream_read(fp, buffer+tokenlen, readsize)) < 
(size_t) tokenlen) {
MAPPHAR_ALLOC_FAIL("internal corruption of phar \"%s\" 
(truncated entry)")
@@ -1650,19 +1657,85 @@
if (!test) {
test = '\1';
  

Re: [PHP-DOC] Suggested text for the Tidy example

2008-01-08 Thread Lars Gunther

Hannes Magnusson skrev:


I have absolutely no clue about the team-extension... or eclipse :)
The IBM guys probably do, if any of them are subscribed to this list...?



I got it working. I had missed the password!


Lars Gunther


[PHP-DOC] phpdoc-tr

2008-01-08 Thread Sezer Yalcin


I got Turkish branch build working now. All checked in.
I see there is not much translated so far but there will be soon. Anyone who 
will change something in phpdoc-tr/ please let me know since I will be 
changing things as well.


I am sending it here here assuming its a list but I don't get anything from 
the list


Sezer Yalcin 


Re: [PHP-DOC] Suggested text for the Tidy example

2008-01-08 Thread Hannes Magnusson
On Jan 8, 2008 8:51 PM, Keryx Web <[EMAIL PROTECTED]> wrote:
> If I'd like to check out from the CVS using Eclipse using the
> team-extension, what would the settings be?

I have absolutely no clue about the team-extension... or eclipse :)
The IBM guys probably do, if any of them are subscribed to this list...?


> Host:cvs.php.net
correct

> Repository path: 
/repository

(or /repository/phpdoc if you don't have any "module:" option)

>
> User:cvsread?
correct

> Password: (clear)
phpfi


> Connection type: pserver
> Default port
correct

See php.net/anoncvs :)

-Hannes


Re: [PHP-DOC] Suggested text for the Tidy example

2008-01-08 Thread Keryx Web

Hannes Magnusson skrev:

Is that text copy&paste from that book? If so, we can't use it.
If not, cool!


You may use it. I am the humble author.

I saw one typo:
> Notice that the dfn and em tags now are correctly nested
Should be:
Notice that the span and em tags now are correctly nested

(In my experience back-end devs usually know too little about good front 
end code and I only suggested a way for the manual to be even better 
than the O'Reilly book...)


If I'd like to check out from the CVS using Eclipse using the 
team-extension, what would the settings be?


Host:cvs.php.net
Repository path: 

User:cvsread?
Password: (clear)

Connection type: pserver
Default port


Lars Gunther

(BTW, I've had trouble getting XDebug to work correctly in Eclipse. If 
someone could help me through IRC or some other IM I'd be willing to pay 
up to 50 USD for that. Answer off list, of course!)