make idl-lite compiler handle varying arrays
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 14 Feb 2005 19:46:03 +0000 (19:46 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 14 Feb 2005 19:46:03 +0000 (19:46 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13400 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/dcerpc/idl2eth.c

index a89573676021da9c2d650b373a87453d464b4dba..5234d876829212878868eb431279745af712670b 100644 (file)
@@ -1501,6 +1501,17 @@ void parsetypedefstruct(int pass)
                            FPRINTF(eth_code, "\n");
                            ptmpstr=strdup(tmpstr);
                            break;
+                         case BI_LENGTH_IS:
+                           sprintf(tmpstr, "uvarray_%s", ptmpstr);
+                           FPRINTF(eth_code, "static int\n");
+                           FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)\n", tmpstr);
+                           FPRINTF(eth_code, "{\n");
+                           FPRINTF(eth_code, "    offset=dissect_ndr_uvarray(tvb, offset, pinfo, tree, drep, %s);\n", ptmpstr);
+                           FPRINTF(eth_code, "    return offset;\n");
+                           FPRINTF(eth_code, "}\n");
+                           FPRINTF(eth_code, "\n");
+                           ptmpstr=strdup(tmpstr);
+                           break;
                          case BI_SIZE_IS|BI_LENGTH_IS:
                            sprintf(tmpstr, "ucvarray_%s", ptmpstr);
                            FPRINTF(eth_code, "static int\n");
@@ -1559,6 +1570,10 @@ void parsetypedefstruct(int pass)
                            sprintf(tmpstr, "ucarray_%s", ptmpstr);
                            ptmpstr=strdup(tmpstr);
                            break;
+                         case BI_LENGTH_IS:
+                           sprintf(tmpstr, "uvarray_%s", ptmpstr);
+                           ptmpstr=strdup(tmpstr);
+                           break;
                          case BI_SIZE_IS|BI_LENGTH_IS:
                            sprintf(tmpstr, "ucvarray_%s", ptmpstr);
                            ptmpstr=strdup(tmpstr);