perl-embperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@locus.apache.org
Subject cvs commit: embperl/test/html binary.htm
Date Tue, 17 Oct 2000 08:23:09 GMT
richter     00/10/17 01:23:09

  Modified:    .        Changes.pod Embperl.pod Embperl.xs EmbperlD.pod
                        MANIFEST TODO epmain.c epnames.h test.pl
               test/cmp errdoc2.htm
  Added:       test/cmp binary.htm
               test/html binary.htm
  Log:
     - Embperl is now able to output binary data if EMBPERL_ESCMODE
       and/or $escmode is zero. This also include that no CRLF is
       added at the end of the file, if escmode is zero.
  
  Revision  Changes    Path
  1.132     +13 -10    embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- Changes.pod	2000/10/17 07:25:12	1.131
  +++ Changes.pod	2000/10/17 08:23:04	1.132
  @@ -18,26 +18,29 @@
          ../foo.html, or bar/foo.html, which includes a relative path.
      - ../* is now a shortcut for the requested file, but in the
        parent directory (or upper depending on the search path)
  -   - Added Test for pnotes ('EMBPERL_ERRORS')
  -   - Fixed a problem with importing files that contains foreach and
  -     do until loops, which may caused a syntax error or endless
  -     loop. Spotted by Steffen Geschke.
      - Added access to Embperl session handling for modules and
        calling scripts (see SetupSession and GetSession)
  +   - Embperl is now able to output binary data if EMBPERL_ESCMODE
  +     and/or $escmode is zero. This also include that no CRLF is
  +     added at the end of the file, if escmode is zero.
      - Added method for deleting session data and cookie
      - Added method for triggering resend of session cookie. 
  -   - embpcgi* and embpexec* are now geratated out of *.templ instead
  -     of editied in place to avoid problems with cvs conflicts
  -     and lower/uppercase on Win32. Suggest by Jens-Uwe Mager.
  -   - make test works with Apache that has mod_jserv compiled in
  -   - Embperl now cache same files with relative path, which are located
  -     in different directories correctly.
  +   - Added Test for pnotes ('EMBPERL_ERRORS')
      - Added hash %CLEANUPFILE. All variables defined into the files given
        in this hash, are also cleanup at the end of the request.
        Patch from Todd Eigenschink.
      - Changed the way the C Requestobject is attached to the Perlobject,
        so it should now also work on 64Bit Processor like Alpha.
        Spotted by Andre Landwehr.
  +   - Fixed a problem with importing files that contains foreach and
  +     do until loops, which may caused a syntax error or endless
  +     loop. Spotted by Steffen Geschke.
  +   - embpcgi* and embpexec* are now geratated out of *.templ instead
  +     of editied in place to avoid problems with cvs conflicts
  +     and lower/uppercase on Win32. Suggest by Jens-Uwe Mager.
  +   - make test works with Apache that has mod_jserv compiled in
  +   - Embperl now cache same files with relative path, which are located
  +     in different directories correctly.
   
   =head1 1.3b5 (BETA)  20. Aug 2000
   
  
  
  
  1.59      +4 -0      embperl/Embperl.pod
  
  Index: Embperl.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pod,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Embperl.pod	2000/10/17 07:25:13	1.58
  +++ Embperl.pod	2000/10/17 08:23:04	1.59
  @@ -1760,6 +1760,10 @@
   Embperl to ignore the backslash when it does output escaping at all.
   (only 1.3b4 and above)
   
  +B<NOTE 2:> If you want to output binary data, you must set the escmode
  +to zero. (only 1.3b6 and above)
  +
  + 
   =over 4
   
   =item B<$escmode = 3 (or 7)>
  
  
  
  1.34      +9 -2      embperl/Embperl.xs
  
  Index: Embperl.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.xs,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Embperl.xs	2000/10/17 07:25:14	1.33
  +++ Embperl.xs	2000/10/17 08:23:04	1.34
  @@ -231,11 +231,18 @@
   
   void
   embperl_output(sText)
  -    char * sText
  +    SV * sText
   INIT:
  +    STRLEN l ;
       tReq * r = pCurrReq ;
   CODE:
  -    OutputToHtml (r,sText) ;
  +    if (r -> pCurrEscape == NULL)
  +	{
  +	char * p = SvPV (sText, l) ;
  +	owrite (r, p, l) ;
  +	}
  +    else
  +	OutputToHtml (r, SvPV (sText, l)) ;
   
   
   void
  
  
  
  1.32      +3 -1      embperl/EmbperlD.pod
  
  Index: EmbperlD.pod
  ===================================================================
  RCS file: /home/cvs/embperl/EmbperlD.pod,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- EmbperlD.pod	2000/10/17 07:25:14	1.31
  +++ EmbperlD.pod	2000/10/17 08:23:05	1.32
  @@ -2,7 +2,7 @@
   
   =head1 NAME
   
  -HTML::Embperl- einbetten von Perlcode in HTML Dokumente
  +HTML::Embperl_ - einbetten von Perlcode in HTML Dokumente
   
   =head1 SYNOPSIS
   
  @@ -1661,6 +1661,8 @@
   dem Benuter ermöglich beliebiges HTML einzugeben. Um dies zu verhindern muß zu den
   unten aufgeführten Werten jeweils eine 4 addiert werden. Dies führt dazu, dass I<Embperl>
   den Backslash bei der Ausgabe nicht gesondert behandelt. (ab 1.3b4)
  +
  +B<Hinweis 2:>Um binäre Daten auszugeben muß escmode auf Null gesetzt werden (ab 1.3b6)
   
   =over 4
   
  
  
  
  1.52      +2 -0      embperl/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/embperl/MANIFEST,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- MANIFEST	2000/10/17 07:02:02	1.51
  +++ MANIFEST	2000/10/17 08:23:05	1.52
  @@ -53,6 +53,7 @@
   epdbg.c
   test.pl
   test/html/ascii
  +test/html/binary.htm
   test/html/pure.htm
   test/html/plain.htm
   test/html/plainblock.htm
  @@ -162,6 +163,7 @@
   test/html/EmbperlObject/lib/epobase3.htm
   test/html/EmbperlObject/lib/epolib.htm
   test/cmp/ascii
  +test/cmp/binary.htm
   test/cmp/pure.htm
   test/cmp/plain.htm
   test/cmp/plainblock.htm
  
  
  
  1.100     +2 -2      embperl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/embperl/TODO,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- TODO	2000/10/17 07:25:15	1.99
  +++ TODO	2000/10/17 08:23:05	1.100
  @@ -43,8 +43,6 @@
   
   - url escape <input src>
   
  -- allow null bytes in output [ARnel Estanisloa 4.12.99] -> done in 2.0
  -
   - handle input image (add field.x/y to %idat) [Pierre Etchemaite 13.12.99]
   
   - make multifiled delimiter \t configurabel [Jean-Philippe FAUVELLE 13.12.99]
  @@ -88,6 +86,8 @@
   - var cleanup of in imported subs [Lai Yiu Fai 14.3.00] 
   
   - using outputfile inside a outputfile crashs
  +
  +- errdoc2 sv count (-> loop)
   
   Docs
   ----
  
  
  
  1.80      +10 -2     embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- epmain.c	2000/10/17 07:25:15	1.79
  +++ epmain.c	2000/10/17 08:23:05	1.80
  @@ -841,7 +841,13 @@
   			}	
   		    else
   			{
  -			OutputToHtml (r, SvPV (pRet, na)) ;
  +			if (r -> pCurrEscape == NULL)
  +			    {
  +			    char * p = SvPV (pRet, l) ;
  +			    owrite (r, p, l) ;
  +			    }
  +			else
  +			    OutputToHtml (r, SvPV (pRet, l)) ;
   			}
   		    SvREFCNT_dec (pRet) ;
   		    }
  @@ -2700,7 +2706,9 @@
   #endif
           {
   #ifdef EP2
  -	if (r -> bEP1Compat)
  +	if (r -> bEP1Compat && r -> pCurrEscape)
  +#else
  +	if (r -> pCurrEscape)
   #endif		
   	    oputs (r, "\r\n") ;
   
  
  
  
  1.20      +7 -0      embperl/epnames.h
  
  Index: epnames.h
  ===================================================================
  RCS file: /home/cvs/embperl/epnames.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- epnames.h	2000/08/20 17:50:13	1.19
  +++ epnames.h	2000/10/17 08:23:05	1.20
  @@ -40,6 +40,7 @@
   #define _malloc                EMBPERL__malloc           
   #define LogError               EMBPERL_LogError          
   #define OutputToHtml           EMBPERL_OutputToHtml      
  +#define OutputEscape           EMBPERL_OutputEscape      
   #define Eval                   EMBPERL_Eval              
   #define EvalNum                EMBPERL_EvalNum           
   #define EvalBool               EMBPERL_EvalBool           
  @@ -50,6 +51,8 @@
   #define GetHtmlArg             EMBPERL_GetHtmlArg        
   #define GetHashValueLen        EMBPERL_GetHashValueLen   
   #define GetHashValue           EMBPERL_GetHashValue      
  +#define GetHashValueStrDup     EMBPERL_GetHashValueStrDup      
  +#define SetHashValueStr        EMBPERL_SetHashValueStr      
   #define Char2Html              EMBPERL_Char2Html         
   #define Html2Char              EMBPERL_Html2Char         
   #define sizeHtml2Char          EMBPERL_sizeHtml2Char     
  @@ -72,6 +75,7 @@
   #define ScanCmdEvalsInString   EMBPERL_ScanCmdEvalsInString
   #define EvalDirect             EMBPERL_EvalDirect
   #define GetLineNo              EMBPERL_GetLineNo
  +#define GetLineNoOf            EMBPERL_GetLineNoOf
   #define Dirname                EMBPERL_Dirname
   #define CommitError            EMBPERL_CommitError
   #define RollbackError          EMBPERL_RollbackError
  @@ -91,12 +95,15 @@
   #define SetupRequest           EMBPERL_SetupRequest   
   #define Term                   EMBPERL_Term           
   #define sstrdup                EMBPERL_sstrdup        
  +#define _ep_memdup             EMBPERL__ep_memdup
   #define ProcessBlock           EMBPERL_ProcessBlock
   #define NewEscMode             EMBPERL_NewEscMode
   #define GetSubTextPos          EMBPERL_GetSubTextPos
   #define SetSubTextPos          EMBPERL_SetSubTextPos
   #define SetupDebugger          EMBPERL_SetupDebugger
   #define GetFileData            EMBPERL_GetFileData
  +#define SplitFdat              EMBPERL_SplitFdat
  +#define AddMagicAV             EMBPERL_AddMagicAV
   
   #define InitialReq             EMBPERL_InitialReq
   #define pCurrReq               EMBPERL_pCurrReq
  
  
  
  1.75      +6 -2      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- test.pl	2000/10/17 07:25:15	1.74
  +++ test.pl	2000/10/17 08:23:05	1.75
  @@ -62,6 +62,7 @@
           'errors'     => 6,
           'version'    => 1,
           'cgi'        => 0,
  +        'noloop'     => 1,
           },
       'errdoc/epl/errdoc2.htm' => { 
           'option'     => '262144',
  @@ -75,10 +76,11 @@
           },
       'var.htm' => { },
       'varerr.htm' => { 
  -        'errors'     => '-1',
  +        'errors'     => -1,
  +        'noloop'     => 1,
           },
       'varerr.htm' => { 
  -        'errors'     => '2',
  +        'errors'     => 2,
           'version'    => 1,
           'cgi'        => 0,
           },
  @@ -117,6 +119,7 @@
           'query_info' => 'sel=2&SEL1=B&SEL3=D&SEL4=cc',
           },
       'mix.htm' => { },
  +    'binary.htm' => { },
       'nesting.htm' => { 
           'version'    => 1,
           },
  @@ -1674,6 +1677,7 @@
               $testnum++ ;
               $testversion = $version == 2 && !$ep1compat?2:1 ;
   
  +            next if ($test->{noloop} && $loopcnt > 0) ;
               next if ($test->{version} && $testversion != $test->{version})
;
               next if ($loc eq $embploc && 
                         ((defined ($test -> {modperl}) && $test -> {modperl}
== 0) ||
  
  
  
  1.5       +1 -1      embperl/test/cmp/errdoc2.htm
  
  Index: errdoc2.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/errdoc2.htm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- errdoc2.htm	2000/09/14 04:57:34	1.4
  +++ errdoc2.htm	2000/10/17 08:23:07	1.5
  @@ -12,7 +12,7 @@
   ^prev: Apache=SCALAR
   next: 
   ^last: Apache=SCALAR
  -^There are 1(2|3|5) errormessages:
  +^There are 1(0|2|3|5) errormessages:
   
   <table border=1>
   ^	<tr><td>\[\d+\]ERR:  32: Line 13: Warning in Perl code: Use of uninitialized
value
  
  
  
  1.1                  embperl/test/cmp/binary.htm
  
  	<<Binary file>>
  
  
  1.1                  embperl/test/html/binary.htm
  
  Index: binary.htm
  ===================================================================
  [- $escmode = 0 -][+ "Some binary data" +][- for ($i = 0; $i < 256; $i++) { print OUT
chr($i) } -][$foreach $i (0..255)$][+ chr($i) +][$endforeach$]
  
  
  

Mime
View raw message