richter     00/11/15 00:11:31

  Modified:    .        Tag: Embperl2c MANIFEST eputil.c test.pl
  Added:       test/cmp Tag: Embperl2c heredoc.htm
               test/html Tag: Embperl2c heredoc.htm
  Log:
  Embperl 2 - HERE documents
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.50.4.9  +2 -0      embperl/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/embperl/MANIFEST,v
  retrieving revision 1.50.4.8
  retrieving revision 1.50.4.9
  diff -u -r1.50.4.8 -r1.50.4.9
  --- MANIFEST  2000/11/10 08:52:26     1.50.4.8
  +++ MANIFEST  2000/11/15 08:11:27     1.50.4.9
  @@ -151,6 +151,7 @@
   test/html/exit.htm
   test/html/exit2.htm
   test/html/exit3.htm
  +test/html/heredoc.htm
   test/html/post.htm
   test/html/upload.htm
   test/html/nochdir/nochdir.htm
  @@ -234,6 +235,7 @@
   test/cmp/Execute.htm
   test/cmp/errpage.htm
   test/cmp/tied.htm
  +test/cmp/heredoc.htm
   test/cmp/include.htm
   test/cmp/includeerr1.htm
   test/cmp/includeerr2.htm
  
  
  
  1.15.4.1  +19 -11    embperl/eputil.c
  
  Index: eputil.c
  ===================================================================
  RCS file: /home/cvs/embperl/eputil.c,v
  retrieving revision 1.15
  retrieving revision 1.15.4.1
  diff -u -r1.15 -r1.15.4.1
  --- eputil.c  2000/09/12 12:49:49     1.15
  +++ eputil.c  2000/11/15 08:11:27     1.15.4.1
  @@ -257,14 +257,19 @@
       EPENTRY (TransHtml) ;
        
       if (r -> bOptions & optRawInput)
  -     { /* Just remove CR for raw input */
  -     while (*p != '\0')
  +     { 
  +#if PERL_VERSION < 5
  +     /* Just remove CR for raw input for perl 5.004 */
  +     if (nLen == 0)
  +         nLen = strlen (sData) ;
  +     e = sData + nLen ;
  +     while (p < e)
            {
            if (*p == '\r')
                *p = ' ' ;
            p++ ;
            }   
  -
  +#endif
        return nLen ;   
           }
           
  @@ -273,7 +278,7 @@
           nLen = strlen (sData) ;
       e = sData + nLen ;
   
  -    while (*p && p < e)
  +    while (p < e)
        {
        if (*p == '\\')
            {
  @@ -283,7 +288,7 @@
                memmove (p, p + 1, e - p - 1) ;
                e[-1] = ' ' ;
                p++ ;
  -             while (*p && *p != '>')
  +             while (p < e && *p != '>')
                    p++ ;
                }
            else if (p[1] == '&')
  @@ -291,7 +296,7 @@
                memmove (p, p + 1, e - p - 1) ;
                e[-1] = ' ' ;
                p++ ;
  -             while (*p && *p != ';')
  +             while (p < e && *p != ';')
                    p++ ;
                }
            else if (bInUrl && p[1] == '%')
  @@ -303,19 +308,22 @@
            else
                p++ ; /* Nothing to quote */
            }
  +#if PERL_VERSION < 5
  +     /* remove CR for perl 5.004 */
        else if (*p == '\r')
            {
            *p++ = ' ' ;
            }
  +#endif
        else
            {
            if (p[0] == '<' && (isalpha (p[1]) || p[1] == '/'))
                { /*  count HTML tag length */
                s = p ;
                p++ ;
  -             while (*p && *p != '>')
  +             while (p < e && *p != '>')
                    p++ ;
  -             if (*p)
  +             if (p < e)
                    p++ ;
                else
                    { /* missing left '>' -> no html tag  */
  @@ -327,10 +335,10 @@
                { /*  count HTML char length */
                s = p ;
                p++ ;
  -             while (*p && *p != ';')
  +             while (p < e && *p != ';')
                    p++ ;
   
  -             if (*p)
  +             if (p < e)
                    {
                    *p = '\0' ;
                    p++ ;
  @@ -367,7 +375,7 @@
                s = NULL ;
                }
            else
  -             if (*p)
  +             if (p < e)
                    p++ ;
            }
        }
  
  
  
  1.70.4.21 +1 -0      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.70.4.20
  retrieving revision 1.70.4.21
  diff -u -r1.70.4.20 -r1.70.4.21
  --- test.pl   2000/11/15 07:21:52     1.70.4.20
  +++ test.pl   2000/11/15 08:11:27     1.70.4.21
  @@ -144,6 +144,7 @@
           },
       'java.htm' => { },
       'inputjava.htm' => { },
  +    'heredoc.htm' => { },
       'post.htm' => {
           'offline'    => 0,
           },
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +6 -0      embperl/test/cmp/Attic/heredoc.htm
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +13 -0     embperl/test/html/Attic/heredoc.htm
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to