logo       

cvs: ZendEngine2 / zend_stream.c: msg#00011

Subject: cvs: ZendEngine2 / zend_stream.c
hyanantha               Thu Jul  7 11:43:50 2005 EDT

  Modified files:              
    /ZendEngine2        zend_stream.c 
  Log:
  zend_stream_getc uses fread internally. NetWare LibC fread reads 4(Which I 
believe EOT) for EOF(^D) character. This happens when fread is asked to read 
one and only character as is the case with cl interactive mode.
  -- Kamesh
  
  
http://cvs.php.net/diff.php/ZendEngine2/zend_stream.c?r1=1.11&r2=1.12&ty=u
Index: ZendEngine2/zend_stream.c
diff -u ZendEngine2/zend_stream.c:1.11 ZendEngine2/zend_stream.c:1.12
--- ZendEngine2/zend_stream.c:1.11      Sat Jun  4 12:16:19 2005
+++ ZendEngine2/zend_stream.c   Thu Jul  7 11:43:50 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_stream.c,v 1.11 2005/06/04 16:16:19 zeev Exp $ */
+/* $Id: zend_stream.c,v 1.12 2005/07/07 15:43:50 hyanantha Exp $ */
 
 
 #include "zend.h"
@@ -102,7 +102,16 @@
                int c = '*';
                size_t n; 
 
+#ifdef NETWARE
+               /*
+                       c != 4 check is there as fread of a character in 
NetWare LibC gives 4 upon ^D character.
+                       Ascii value 4 is actually EOT character which is not 
defined anywhere in the LibC
+                       or else we can use instead of hardcoded 4.
+               */
+                for ( n = 0; n < len && (c = zend_stream_getc( file_handle 
TSRMLS_CC)) != EOF && c != 4 && c != '\n'; ++n )
+#else
                for ( n = 0; n < len && (c = zend_stream_getc( file_handle 
TSRMLS_CC)) != EOF && c != '\n'; ++n ) 
+#endif
                        buf[n] = (char) c; 
                if ( c == '\n' )
                        buf[n++] = (char) c; 

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe