blob: 21add3bcde98c2dae4e6d1736a6141544746d48e [file] [log] [blame]
rspangler@google.com49fdf182009-10-10 00:57:34 +00001// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <stdlib.h>
6#include <stdio.h>
7#include <iostream>
8#include <glib.h>
9#include <glog/logging.h>
10
11#include <libxml/parser.h>
12#include <libxml/xpath.h>
13#include <libxml/xpathInternals.h>
14
15// This code runs inside the main loop
16gboolean EntryPoint(gpointer data) {
17 GMainLoop *loop = reinterpret_cast<GMainLoop*>(data);
18 LOG(INFO) << "Chrome OS Update Engine beginning";
19 g_main_loop_quit(loop);
20 return FALSE;
21}
22
23int main(int argc, char** argv) {
24 xmlDocPtr doc = xmlNewDoc((const xmlChar*)"1.0");
25 CHECK(doc);
26 CHECK_EQ(argc, 2);
27 printf("enc: [%s]\n", xmlEncodeEntitiesReentrant(doc, (const xmlChar*)argv[1]));
28 return 0;
29
30
31 GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
32 g_timeout_add(0, &EntryPoint, loop);
33 g_main_loop_run(loop);
34 return 0;
35}