summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-01-31 17:36:15 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-01-31 17:36:15 +0300
commiteac37c6a45837f7ea717c9fed8cb21e2d5665618 (patch)
treed09a2c645baf2ab043762856aacc9111be221f99 /examples
parent0be032c6998e712dc2c9f2ed97c3491d89eb05af (diff)
downloadxift-eac37c6a45837f7ea717c9fed8cb21e2d5665618.tar
xift-eac37c6a45837f7ea717c9fed8cb21e2d5665618.tar.xz
xift-eac37c6a45837f7ea717c9fed8cb21e2d5665618.zip
[xift] Working.
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile4
-rw-r--r--examples/error.cpp5
-rw-r--r--examples/filter.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 3f40167..60df4ff 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -12,9 +12,9 @@ CPPFLAGS += -O3
endif
INCLUDE = -I../src
-LFLAGS = -L.. -lxenophage
+LFLAGS = -L.. -lxift
-XENOPHAGE = ../libxenophage.a
+XENOPHAGE = ../libxift.a
default: $(EXAMPLES)
diff --git a/examples/error.cpp b/examples/error.cpp
index 54bb17d..72c5bfe 100644
--- a/examples/error.cpp
+++ b/examples/error.cpp
@@ -7,13 +7,14 @@ int main()
XiftFile exporter(stdout);
Xift xift(exporter);
- xift.permitted.Tag("p").Attribute("class");
+ xift.Tag("p").Attribute("class");
xift.PutFile("error.html");
if (!xift.End()) {
printf("Error on %d line, %d column:\n%s",
- xift.ErrorLine(), xift.ErrorColumn(), xift.Error());
+ xift.ErrorLine(), xift.ErrorColumn(),
+ xift_error_message(xift.GetError()));
}
return 0;
diff --git a/examples/filter.cpp b/examples/filter.cpp
index 6e786c9..48d0a6a 100644
--- a/examples/filter.cpp
+++ b/examples/filter.cpp
@@ -8,7 +8,7 @@ int main()
Xift xift(exporter);
xift.Tag("a").Attribute("href");
- XiftTags::Tag &p = xift.Tag("p");
+ XiftTag &p = xift.Tag("p");
p.Attribute("class");
p.Attribute("hidden");
p.Attribute("id");
@@ -21,7 +21,8 @@ int main()
if (!xift.End()) {
printf("Error on %d line, %d column:\n%s",
- xift.ErrorLine(), xift.ErrorColumn(), xift.Error());
+ xift.ErrorLine(), xift.ErrorColumn(),
+ xift_error_message(xift.GetError()));
}
return 0;