richter 01/05/02 05:14:15
Modified: . Tag: Embperl2c Changes.pod epdat.h epdom.c epdom.h
epparse.c
Embperl Tag: Embperl2c Syntax.pm
Embperl/Syntax Tag: Embperl2c HTML.pm
test/cmp Tag: Embperl2c inputjs2.htm
test/cmp2 Tag: Embperl2c input.htm
Log:
Embperl 2 - keep single/double quotes in attributes
Revision Changes Path
No revision
No revision
1.129.4.18 +4 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.129.4.17
retrieving revision 1.129.4.18
diff -u -r1.129.4.17 -r1.129.4.18
--- Changes.pod 2001/05/02 11:54:41 1.129.4.17
+++ Changes.pod 2001/05/02 12:14:13 1.129.4.18
@@ -20,6 +20,10 @@
html tags anymore. Spotted by Ian Van der Poel.
- type=checkbox|radio is now case insensitiv as it should. Spotted
by Jonny Cavell.
+ - print OUT and Execute now works together. Spotted by Jonny Cavell.
+ - Embperl doesn't insert a linefeed after an Execute anymore.
+ - Embperl now keeps single or double quote the same as in the source
+ file. Requested by Jonny Cavell.
=head1 2.0b2 (BETA) 29. Mar 2001
1.20.4.17 +2 -1 embperl/epdat.h
Index: epdat.h
===================================================================
RCS file: /home/cvs/embperl/epdat.h,v
retrieving revision 1.20.4.16
retrieving revision 1.20.4.17
diff -u -r1.20.4.16 -r1.20.4.17
--- epdat.h 2001/04/26 06:44:27 1.20.4.16
+++ epdat.h 2001/05/02 12:14:13 1.20.4.17
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdat.h,v 1.20.4.16 2001/04/26 06:44:27 richter Exp $
+# $Id: epdat.h,v 1.20.4.17 2001/05/02 12:14:13 richter Exp $
#
###################################################################################*/
@@ -112,6 +112,7 @@
enum tNodeType nCDataType ;/* type for sub nodes that contains text */
enum tNodeType nForceType ;/* force this type for sub nodes */
int bUnescape ; /* translate input? */
+ int bAddFlags ; /* add flags to node */
unsigned char * pContains ; /* chars that could be contained in the string
*/
struct tTokenTable * pFollowedBy;/* table of tokens that can follow this one
*/
struct tTokenTable * pInside ; /* table of tokens that can apear
inside this one */
1.4.2.34 +9 -3 embperl/Attic/epdom.c
Index: epdom.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.c,v
retrieving revision 1.4.2.33
retrieving revision 1.4.2.34
diff -u -r1.4.2.33 -r1.4.2.34
--- epdom.c 2001/05/02 11:54:43 1.4.2.33
+++ epdom.c 2001/05/02 12:14:13 1.4.2.34
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdom.c,v 1.4.2.33 2001/05/02 11:54:43 richter Exp $
+# $Id: epdom.c,v 1.4.2.34 2001/05/02 12:14:13 richter Exp $
#
###################################################################################*/
@@ -2313,7 +2313,10 @@
if (pAttr -> xValue)
{
if (pAttr -> xName != xNoName)
- oputs (r, "=\"") ;
+ if (pAttr -> bFlags & aflgSingleQuote)
+ oputs (r, "='") ;
+ else
+ oputs (r, "=\"") ;
if (pAttr -> bFlags & aflgAttrChilds)
{
@@ -2335,7 +2338,10 @@
owrite (r, s, l) ;
}
if (pAttr -> xName != xNoName)
- oputc (r, '"') ;
+ if (pAttr -> bFlags & aflgSingleQuote)
+ oputc (r, '\'') ;
+ else
+ oputc (r, '"') ;
}
}
pAttr++ ;
1.4.2.16 +5 -1 embperl/Attic/epdom.h
Index: epdom.h
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.h,v
retrieving revision 1.4.2.15
retrieving revision 1.4.2.16
diff -u -r1.4.2.15 -r1.4.2.16
--- epdom.h 2001/05/02 11:54:44 1.4.2.15
+++ epdom.h 2001/05/02 12:14:14 1.4.2.16
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdom.h,v 1.4.2.15 2001/05/02 11:54:44 richter Exp $
+# $Id: epdom.h,v 1.4.2.16 2001/05/02 12:14:14 richter Exp $
#
###################################################################################*/
@@ -145,6 +145,7 @@
aflgOK = 1,
aflgAttrValue = 2,
aflgAttrChilds = 4,
+ aflgSingleQuote = 8,
} ;
struct tDomTreeOrder
@@ -297,6 +298,9 @@
tNodeData * Node_selfCloneNode (/*in*/ tDomTree * pDomTree,
/*in*/ tNodeData * pNode,
/*in*/ int bDeep) ;
+
+tNodeData * Node_selfCondCloneNode (/*in*/ tDomTree * pDomTree,
+ /*in*/ tNodeData * pNode) ;
tNode Node_cloneNode (/*in*/ tDomTree * pDomTree,
/*in*/ tNode xNode,
1.4.2.19 +10 -2 embperl/Attic/epparse.c
Index: epparse.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epparse.c,v
retrieving revision 1.4.2.18
retrieving revision 1.4.2.19
diff -u -r1.4.2.18 -r1.4.2.19
--- epparse.c 2001/04/27 06:33:18 1.4.2.18
+++ epparse.c 2001/05/02 12:14:14 1.4.2.19
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epparse.c,v 1.4.2.18 2001/04/27 06:33:18 richter Exp $
+# $Id: epparse.c,v 1.4.2.19 2001/05/02 12:14:14 richter Exp $
#
###################################################################################*/
@@ -291,6 +291,7 @@
p -> sNodeName = GetHashValueStrDup (pHash, "nodename", NULL) ;
p -> nNodeType = GetHashValueInt (pHash, "nodetype", ntypTag) ;
p -> bUnescape = GetHashValueInt (pHash, "unescape", 0) ;
+ p -> bAddFlags = GetHashValueInt (pHash, "addflags", 0) ;
p -> nCDataType = GetHashValueInt (pHash, "cdatatype", ntypCDATA) ;
p -> nForceType = GetHashValueInt (pHash, "forcetype", 0) ;
p -> pStartTag = (struct tToken *)GetHashValueStrDup (pHash, "starttag",
NULL) ;
@@ -643,7 +644,10 @@
if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken ->
nCDataType, 0, pCurr, pEndCurr - pCurr, xParentNode, level+1, GetLineNoOf (r, pCurr))))
return 1 ;
- }
+ if (pToken -> bAddFlags)
+ Node_self (pDomTree, xNewAttrNode) -> bFlags |=
pToken -> bAddFlags ;
+
+ }
pCurr = pEndCurr + strlen (pToken -> sEndText) ;
}
level-- ;
@@ -673,6 +677,8 @@
return rc ;
}
+ if (pToken -> bAddFlags)
+ Node_self (pDomTree, xNewNode) -> bFlags |= pToken ->
bAddFlags ;
}
else
{
@@ -722,6 +728,8 @@
if (!(xNewAttrNode = Node_appendChild (pDomTree,
pToken -> nCDataType, 0, pCurr, pEndCurr - pCurr, xNewNode, level+1, nLine =
GetLineNoOf (r, pCurr))))
return 1 ;
+ if (pToken -> bAddFlags)
+ Node_self (pDomTree, xNewAttrNode) -> bFlags |=
pToken -> bAddFlags ;
if (pToken -> sParseTimePerlCode)
if ((rc = ExecParseTimeCode (r, pToken, pCurr,
pEndCurr - pCurr, nLine)) != ok)
return rc ;
No revision
No revision
1.1.4.32 +7 -2 embperl/Embperl/Attic/Syntax.pm
Index: Syntax.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
retrieving revision 1.1.4.31
retrieving revision 1.1.4.32
diff -u -r1.1.4.31 -r1.1.4.32
--- Syntax.pm 2001/03/28 19:15:31 1.1.4.31
+++ Syntax.pm 2001/05/02 12:14:14 1.1.4.32
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Syntax.pm,v 1.1.4.31 2001/03/28 19:15:31 richter Exp $
+# $Id: Syntax.pm,v 1.1.4.32 2001/05/02 12:14:14 richter Exp $
#
###################################################################################
@@ -40,7 +40,9 @@
use constant ntypDocumentFraq => 11 ;
use constant ntypNotation => 12 ;
+use constant aflgSingleQuote => 8 ;
+
@EXPORT_OK = qw{
ntypTag
ntypStartTag
@@ -57,7 +59,10 @@
ntypDocument
ntypDocumentType
ntypDocumentFraq
-ntypNotation} ;
+ntypNotation
+
+aflgSingleQuote
+} ;
No revision
No revision
1.1.2.12 +2 -1 embperl/Embperl/Syntax/Attic/HTML.pm
Index: HTML.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/HTML.pm,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- HTML.pm 2001/04/27 06:33:22 1.1.2.11
+++ HTML.pm 2001/05/02 12:14:15 1.1.2.12
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: HTML.pm,v 1.1.2.11 2001/04/27 06:33:22 richter Exp $
+# $Id: HTML.pm,v 1.1.2.12 2001/05/02 12:14:15 richter Exp $
#
###################################################################################
@@ -255,6 +255,7 @@
'end' => '\'',
'nodetype' => ntypAttr,
'cdatatype' => ntypAttrValue,
+ 'addflags' => aflgSingleQuote,
},
'Attribut alphanum' =>
{
No revision
No revision
1.1.2.2 +4 -4 embperl/test/cmp/Attic/inputjs2.htm
Index: inputjs2.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Attic/inputjs2.htm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- inputjs2.htm 2001/04/27 06:39:34 1.1.2.1
+++ inputjs2.htm 2001/05/02 12:14:15 1.1.2.2
@@ -10,10 +10,10 @@
<input type="text" name="titleref" value="" SIZE="20"
MAXSIZE="20" onChange="javascript:this.value=this.value.toUpperCase();">
- <input type="text" name="titleref" value="" SIZE='20'
+ <input type='text' name="titleref" value="" SIZE='20'
MAXSIZE="20" onChange='javascript:this.value=this.value.toUpperCase();'>
- <input type="text" name="titleref" value="" SIZE='20'
+ <input type='text' name="titleref" value="" SIZE='20'
MAXSIZE="20" onChange='javascript:this.value=this.value.toUpperCase(1);'>
<select name="foo"
onChange="javascript:this.value=this.value.toUpperCase();"> </select>
@@ -28,10 +28,10 @@
<input type="text" name="titleref" value SIZE="20"
MAXSIZE="20" onChange="javascript:this.value=this.value.toUpperCase();">
- <input type="text" name="titleref" value SIZE='20'
+ <input type='text' name="titleref" value SIZE='20'
MAXSIZE="20" onChange='javascript:this.value=this.value.toUpperCase();'>
- <input type="text" name="titleref" value SIZE='20'
+ <input type='text' name="titleref" value SIZE='20'
MAXSIZE="20" onChange='javascript:this.value=this.value.toUpperCase([+ '1'
+]);'>
No revision
No revision
1.1.2.7 +1 -1 embperl/test/cmp2/Attic/input.htm
Index: input.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp2/Attic/input.htm,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- input.htm 2001/05/02 11:54:54 1.1.2.6
+++ input.htm 2001/05/02 12:14:15 1.1.2.7
@@ -25,7 +25,7 @@
<input foo >
<input name="neu2" value="">
- <input name="neu3" value=">>">
+ <input name='neu3' value=">>">
<input type="text" name="feld1" value="Wert1">
<input type="text" name="feld2" value="">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]