Escape unescape < > & in HTML

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9664 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2007-03-26 01:26:44 +00:00
commit cf6e9f2743
3 changed files with 23 additions and 23 deletions

View file

@ -581,7 +581,7 @@ Original Datatype lstr()
const char *a char *a const char *a char *a
double a[20] double *a double a[20] double *a
double a[20][30] double *a double a[20][30] double *a
double &a double *a double &amp;a double *a
</pre> </pre>
</blockquote> </blockquote>
@ -605,7 +605,7 @@ char *a
const char *a (const char *) name const char *a (const char *) name
double a[20] (double *) name double a[20] (double *) name
double a[20][30] (double (*)[30]) name double a[20][30] (double (*)[30]) name
double &a (double &) *name double &amp;a (double &amp;) *name
</pre> </pre>
</blockquote> </blockquote>
@ -626,7 +626,7 @@ char *a
const char *a (char *) name const char *a (char *) name
double a[20] (double *) name double a[20] (double *) name
double a[20][30] (double *) name double a[20][30] (double *) name
double &a (double *) &name double &amp;a (double *) &amp;name
</pre> </pre>
</blockquote> </blockquote>
@ -807,7 +807,7 @@ The "bar" method is wrapped by a function like this:
<blockquote> <blockquote>
<pre> <pre>
double Foo_bar(Foo *self, double arg0) { double Foo_bar(Foo *self, double arg0) {
return self->bar(arg0); return self-&gt;bar(arg0);
} }
</pre> </pre>
</blockquote> </blockquote>
@ -829,10 +829,10 @@ gets wrapped as follows:
<blockquote> <blockquote>
<pre> <pre>
int Foo_x_get(Foo *self) { int Foo_x_get(Foo *self) {
return self->x; return self-&gt;x;
} }
int Foo_x_set(Foo *self, int value) { int Foo_x_set(Foo *self, int value) {
return (self->x = value); return (self-&gt;x = value);
} }
</pre> </pre>
</blockquote> </blockquote>
@ -948,7 +948,7 @@ ParmList *l = ... parameter list of the function ...
DataType *t = ... return type of the function ... DataType *t = ... return type of the function ...
char *name = ... name of the function ... char *name = ... name of the function ...
Wrapper *w = NewWrapper(); Wrapper *w = NewWrapper();
Printf(w->def,"void wrap_%s() {\n", name); Printf(w-&gt;def,"void wrap_%s() {\n", name);
/* Declare all of the local variables */ /* Declare all of the local variables */
Swig_cargs(w, l); Swig_cargs(w, l);
@ -962,7 +962,7 @@ Swig_cresult(w,t,"result",Swig_cfunction(name,l));
/* Convert the result into whatever */ /* Convert the result into whatever */
... ...
Printf(w->code,"}\n"); Printf(w-&gt;code,"}\n");
Wrapper_print(w,out); Wrapper_print(w,out);
</pre> </pre>
</blockquote> </blockquote>
@ -1073,25 +1073,25 @@ With each is the cast that can be used in the debugger to extract the underlying
<p> <p>
<li>String *s;</li> <li>String *s;</li>
<br> <br>
(String *)((DohBase *)s)->data (String *)((DohBase *)s)-&gt;data
<br> <br>
The underlying char * string can be displayed with The underlying char * string can be displayed with
<br> <br>
((String *)((DohBase *)s)->data)->str ((String *)((DohBase *)s)-&gt;data)-&gt;str
<p> <p>
<li>SwigType *t;</li> <li>SwigType *t;</li>
<br> <br>
(String *)((DohBase *)t)->data (String *)((DohBase *)t)-&gt;data
<br> <br>
The underlying char * string can be displayed with The underlying char * string can be displayed with
<br> <br>
((String *)((DohBase *)t)->data)->str ((String *)((DohBase *)t)-&gt;data)-&gt;str
<p> <p>
<li>String_or_char *sc;</li> <li>String_or_char *sc;</li>
Either <br> Either <br>
((String *)((DohBase *)sc)->data)->str ((String *)((DohBase *)sc)-&gt;data)-&gt;str
<br> or <br> <br> or <br>
(char *)sc (char *)sc
<br> will work depending on whether the underlying type is really a String * or char *. <br> will work depending on whether the underlying type is really a String * or char *.

View file

@ -114,7 +114,7 @@ skipped text can be obtained using <tt>Scanner_text()</tt> afterwards. Returns 0
<p> <p>
<b><tt>void Scanner_set_location(Scanner *s, int startchar, int endchar)</tt></b> <b><tt>void Scanner_set_location(Scanner *s, int startchar, int endchar)</tt></b>
<blockquote> <blockquote>
Changes the current filename and line number of the scanner.< Changes the current filename and line number of the scanner.
</blockquote> </blockquote>
<p> <p>
@ -201,9 +201,9 @@ SWIG_TOKEN_OR |
SWIG_TOKEN_LOR || SWIG_TOKEN_LOR ||
SWIG_TOKEN_XOR ^ SWIG_TOKEN_XOR ^
SWIG_TOKEN_LESSTHAN &lt; SWIG_TOKEN_LESSTHAN &lt;
SWIG_TOKEN_GREATERTHAN > SWIG_TOKEN_GREATERTHAN &gt;
SWIG_TOKEN_LTEQUAL &lt;= SWIG_TOKEN_LTEQUAL &lt;=
SWIG_TOKEN_GTEQUAL >= SWIG_TOKEN_GTEQUAL &gt;=
SWIG_TOKEN_NOT ~ SWIG_TOKEN_NOT ~
SWIG_TOKEN_LNOT ! SWIG_TOKEN_LNOT !
SWIG_TOKEN_LBRACKET [ SWIG_TOKEN_LBRACKET [
@ -218,7 +218,7 @@ SWIG_TOKEN_COLON :
SWIG_TOKEN_DCOLON :: SWIG_TOKEN_DCOLON ::
SWIG_TOKEN_DCOLONSTAR ::* SWIG_TOKEN_DCOLONSTAR ::*
SWIG_TOKEN_LSHIFT &lt;&lt; SWIG_TOKEN_LSHIFT &lt;&lt;
SWIG_TOKEN_RSHIFT >> SWIG_TOKEN_RSHIFT &gt;&gt;
SWIG_TOKEN_QUESTION ? SWIG_TOKEN_QUESTION ?
SWIG_TOKEN_PLUSPLUS ++ SWIG_TOKEN_PLUSPLUS ++
SWIG_TOKEN_MINUSMINUS -- SWIG_TOKEN_MINUSMINUS --
@ -230,10 +230,10 @@ SWIG_TOKEN_ANDEQUAL &amp;=
SWIG_TOKEN_OREQUAL |= SWIG_TOKEN_OREQUAL |=
SWIG_TOKEN_XOREQUAL ^= SWIG_TOKEN_XOREQUAL ^=
SWIG_TOKEN_LSEQUAL &lt;&lt;= SWIG_TOKEN_LSEQUAL &lt;&lt;=
SWIG_TOKEN_RSEQUAL >>= SWIG_TOKEN_RSEQUAL &gt;&gt;=
SWIG_TOKEN_MODEQUAL %= SWIG_TOKEN_MODEQUAL %=
SWIG_TOKEN_ARROW -> SWIG_TOKEN_ARROW -&gt;
SWIG_TOKEN_ARROWSTAR ->* SWIG_TOKEN_ARROWSTAR -&gt;*
SWIG_TOKEN_PERIOD . SWIG_TOKEN_PERIOD .
SWIG_TOKEN_AT @ SWIG_TOKEN_AT @
SWIG_TOKEN_DOLLAR $ SWIG_TOKEN_DOLLAR $

View file

@ -196,13 +196,13 @@ Here is code that generates the above function:
<blockquote> <blockquote>
<pre> <pre>
Wrapper *w = NewWrapper(); Wrapper *w = NewWrapper();
Printf(w->def,"void foo(int n) {"); Printf(w-&gt;def,"void foo(int n) {");
Wrapper_add_local(w,"n",""); /* parameter n */ Wrapper_add_local(w,"n",""); /* parameter n */
Wrapper_add_local(w,"i", "int i;"); /* local i */ Wrapper_add_local(w,"i", "int i;"); /* local i */
Printv(w->code,"for (i = 0; i &lt; n; i++) {", Printv(w-&gt;code,"for (i = 0; i &lt; n; i++) {",
"printf(\"%d\n",i);", "printf(\"%d\n",i);",
"}\n", NIL); "}\n", NIL);
Printf(w->code,"}\n"); Printf(w-&gt;code,"}\n");
/* Emit wrapper code */ /* Emit wrapper code */
Wrapper_print(w,outf); Wrapper_print(w,outf);