summaryrefslogtreecommitdiff
path: root/docs/examples/cssom-example-1.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@gnome.org>2003-12-11 21:14:05 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-12-11 21:14:05 +0000
commit61ade384b3856379e82bceba7768762d04a015ef (patch)
tree1491ca77c9990fac776faee8e18adda439fb9495 /docs/examples/cssom-example-1.c
parent7da465f33ed5cd06d322eb0cdf174f313a2cf6e6 (diff)
downloadlibcroco-61ade384b3856379e82bceba7768762d04a015ef.tar.gz
Fixed more build system stuffs here. Make these compile with g++. another
2003-12-11 Dodji Seketeli <dodji@gnome.org> * src/layeng/Makefile.am,src/seleng/Makefile.am: Fixed more build system stuffs here. * docs/examples/cssom-example-1.c,docs/examples/sac-example-1.c: Make these compile with g++. * src/layeng/Makefile.am: another build system cleanup. * docs/examples/selection-example-1.c,docs/examples/selection-example-1.css, docs/examples/selection-example-1.xml: added this code example from Stefan Seefeld.
Diffstat (limited to 'docs/examples/cssom-example-1.c')
-rw-r--r--docs/examples/cssom-example-1.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/examples/cssom-example-1.c b/docs/examples/cssom-example-1.c
index 01e93ed..663f86f 100644
--- a/docs/examples/cssom-example-1.c
+++ b/docs/examples/cssom-example-1.c
@@ -3,10 +3,12 @@
/**
*This is an example that shows how to use
*the CSSOM api of the libcroco CSS2 parsing library.
+ *It just parses the CSS document given in argument and
+ *it dumps it (serializes) it on the screen.
*
*To compile it using gcc, type
*
- *gcc `croco-config --cflags` `croco-config --libs` -o cssom-example cssom-example.c
+ *gcc -g `croco-config --cflags` `croco-config --libs` -o cssom-example-1 cssom-example-1.c
*
*Prior to that, you must have compiled and installed libcroco, of course.
*
@@ -52,7 +54,6 @@ main (int argc, char **argv)
{
short i = 0 ;
enum CRStatus status = CR_OK ;
- CROMParser *parser = NULL ;
CRStyleSheet *stylesheet = NULL ;
/*first parse command line arguments*/
@@ -78,7 +79,7 @@ main (int argc, char **argv)
return 0;
}
- /*****************************************************
+ /*****************************************************
*Enough plumbering... now, the real libcroco stuffs.
***************************************************/
@@ -86,7 +87,7 @@ main (int argc, char **argv)
*What we want here is to simply parse
*a CSS document using the cssom api.
*/
- status = cr_om_parser_simply_parse_file (argv[i] /*sheet*/,
+ status = cr_om_parser_simply_parse_file ((const guchar*)argv[i] /*sheet*/,
CR_ASCII /*the encoding*/,
&stylesheet) ;
if (status == CR_OK && stylesheet)