summaryrefslogtreecommitdiffstats
path: root/0.4.5/encoder/test/enc_test.c
diff options
context:
space:
mode:
authorphil <phil@FreeBSD.org>2016-03-17 00:46:36 +0000
committerphil <phil@FreeBSD.org>2016-03-17 00:46:36 +0000
commit0efb2620b96d9cbb76b33a390facfc24ff231ba3 (patch)
treeafa76ef09b8528cae96477148b1c0437ceb1f2d4 /0.4.5/encoder/test/enc_test.c
parent3ce11bd9fc4d042a890334b8e0c5adcb094b9d17 (diff)
downloadFreeBSD-src-0efb2620b96d9cbb76b33a390facfc24ff231ba3.zip
FreeBSD-src-0efb2620b96d9cbb76b33a390facfc24ff231ba3.tar.gz
Tag libxo 0.4.5
Approved by: sjg
Diffstat (limited to '0.4.5/encoder/test/enc_test.c')
-rw-r--r--0.4.5/encoder/test/enc_test.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/0.4.5/encoder/test/enc_test.c b/0.4.5/encoder/test/enc_test.c
new file mode 100644
index 0000000..ec49499
--- /dev/null
+++ b/0.4.5/encoder/test/enc_test.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Juniper Networks, Inc.
+ * All rights reserved.
+ * This SOFTWARE is licensed under the LICENSE provided in the
+ * ../Copyright file. By downloading, installing, copying, or otherwise
+ * using the SOFTWARE, you agree to be bound by the terms of that
+ * LICENSE.
+ * Phil Shafer, August 2015
+ */
+
+#include "xo.h"
+#include "xo_encoder.h"
+
+static int
+test_handler (XO_ENCODER_HANDLER_ARGS)
+{
+ printf("op %s: [%s] [%s]\n", xo_encoder_op_name(op),
+ name ?: "", value ?: "");
+
+ return 0;
+}
+
+int
+xo_encoder_library_init (XO_ENCODER_INIT_ARGS)
+{
+ arg->xei_version = XO_ENCODER_VERSION;
+ arg->xei_handler = test_handler;
+
+ return 0;
+}
OpenPOWER on IntegriCloud