summaryrefslogtreecommitdiff
path: root/local/mib2c-conf.d/generic-data-context.m2i
diff options
context:
space:
mode:
authorHideki Yamane <henrich@debian.org>2014-03-30 19:38:48 +0900
committerHideki Yamane <henrich@debian.org>2014-03-30 19:38:48 +0900
commit7769a9595c3da9a35f31b42451b1f6c3ed4004fa (patch)
tree009bf8fd68af6bb1129e07dd8c1ed205010d81f8 /local/mib2c-conf.d/generic-data-context.m2i
parent2e7891b0311204e0ecd5dc4a4334df01f3a6a1b4 (diff)
downloadpkg-net-snmp-7769a9595c3da9a35f31b42451b1f6c3ed4004fa.tar.gz
Imported Upstream version 5.7.2~dfsg
Diffstat (limited to 'local/mib2c-conf.d/generic-data-context.m2i')
-rw-r--r--local/mib2c-conf.d/generic-data-context.m2i51
1 files changed, 51 insertions, 0 deletions
diff --git a/local/mib2c-conf.d/generic-data-context.m2i b/local/mib2c-conf.d/generic-data-context.m2i
new file mode 100644
index 0000000..4152e91
--- /dev/null
+++ b/local/mib2c-conf.d/generic-data-context.m2i
@@ -0,0 +1,51 @@
+############################################################# -*- c -*-
+## generic include for XXX. Do not use directly.
+##
+## $Id$
+########################################################################
+@if $m2c_mark_boundary == 1@
+/** START code generated by $RCSfile$ $Revision$ */
+@end@
+########################################################################
+##
+/**********************************************************************/
+/*
+ * TODO:110:r: |-> Review ${context} data context structure.
+ * This structure is used to represent the data for $context.
+ */
+##
+@if "$m2c_data_context" eq "generated"@
+/*
+ * This structure contains storage for all the columns defined in the
+ * $context.
+ */
+typedef struct ${context}_data_s {
+
+@ foreach $node nonindex@
+@ include m2c_setup_node.m2i@
+ /*
+ * $m2c_node_summary
+ */
+@ if $m2c_node_needlength == 0@
+ $m2c_decl $node;
+@ else@
+ $m2c_decl $node[$m2c_node_maxlen];
+size_t ${node}_len; /* # of $m2c_decl elements, not bytes */
+@ end@
+
+@ end@ # foreach nonindex
+} ${context}_data;
+@elsif "$m2c_data_context" eq "unknown"@
+ /*
+ * update typedef to correct pointer type.
+ * (or add @eval $@m2c_data_context = "TYPE"@ and regenerate code) */
+typedef void ${context}_data;
+@else@
+typedef $m2c_data_context ${context}_data;
+@end@
+
+##
+########################################################################
+@if $m2c_mark_boundary == 1@
+/** END code generated by $RCSfile$ $Revision$ */
+@end@