fixes xml
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 3 Jun 2005 20:48:33 +0000 (20:48 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 3 Jun 2005 20:48:33 +0000 (20:48 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@936 04897980-b3bd-0310-b5e0-8ef037075253

genevent/core.xml
genevent/genevent.c
genevent/ipc.xml
genevent/parser.c
genevent/timer.xml

index 0dfe9d0a2f1b75bcef5fe04550f5c520ff75561a..1b7cd1b9766d2df4314b3342b36077bd196cb90e 100644 (file)
 
   <event name=block_end>
     <description>Block end timestamp</description>
-    <field name="timestamp"><typeref name=timestamp/></field>
-    <field name="block_id"><uint size=4/></field>
+    <struct>
+      <field name="timestamp"><typeref name=timestamp/></field>
+      <field name="block_id"><uint size=4/></field>
+    </struct>
   </event>
 
   <type name=timestamp>
index e6c5bb8934f744f0b4c2655e097e316206a89ac2..7c21d9e6d3bdb2bb3ede8b5ef90d6cb56d8ae703 100644 (file)
@@ -222,6 +222,7 @@ void generateEnumEvent(FILE *fp, char *facName, int * nbEvent, unsigned long che
  *    hasStrSeq         : string or sequence present?
  *    structCount       : struct postfix
  ****************************************************************************/
+
 static void
 printStruct(FILE * fp, int len, void ** array, char * name, char * facName,
             int * whichTypeFirst, int * hasStrSeq, int * structCount)
@@ -235,34 +236,32 @@ printStruct(FILE * fp, int len, void ** array, char * name, char * facName,
     fld  = (field *)array[pos];
     td = fld->type;
     if( td->type != STRING && td->type != SEQUENCE &&
-        td->type != ARRAY) {
+             td->type != ARRAY) {
       if (*whichTypeFirst == 0) {
         *whichTypeFirst = 1; //struct first
       }
       if (flag == 0) {
         flag = 1;
 
-        fprintf(fp,"struct %s_%s",
-                 name, facName);
-        if (structCount) {
-          fprintf(fp, "_%d {\n",
-                   ++*structCount);
-        } else {
-          fprintf(fp, " {\n");
-        }
+        fprintf(fp,"struct %s_%s",name, facName);
+        if (structCount) {
+               fprintf(fp, "_%d {\n",++*structCount);
+        } else {
+          fprintf(fp, " {\n");
+        }
       }
-      fprintf(fp, "\t%s %s; /* %s */\n",
-               getTypeStr(td),fld->name,fld->description );
+      fprintf(fp, "\t%s %s; /* %s */\n", 
+          getTypeStr(td),fld->name,fld->description );
     } else {
-      if (*whichTypeFirst == 0) {
+        if (*whichTypeFirst == 0) {
         //string or sequence or array first
-        *whichTypeFirst = 2;
-      }
-      (*hasStrSeq)++;
-      if(flag) {
-        fprintf(fp,"} __attribute__ ((packed));\n\n");
-      }
-      flag = 0;
+          *whichTypeFirst = 2;
+        }
+        (*hasStrSeq)++;
+        if(flag) {
+          fprintf(fp,"} __attribute__ ((packed));\n\n");
+        }
+        flag = 0;
     }
   }
 
index e66d727035db8e5022140c953f58e46ef6d2c112..1a0c47a73f6cbbf8d5474b7e25b96a2e3e5f703f 100644 (file)
@@ -1,14 +1,15 @@
 <facility name=ipc>
   <description>The ipc facility contains events related to Inter Process Communication</description>
-
+       
   <event name=call>
-    <descriptiona>IPC call</description>
+
+    <description>IPC call</description>
     <struct>
       <field name="call_number"> <description>Number of IPC call</description> <uint size=4/> </field>
+
       <field name="first"> <description>First argument</description> <int size=4/> </field>
     </struct>
   </event>
-
   <event name=msg_create>
     <description>Get an IPC message queue identifier</description>
     <struct>
index 465f9cb4c75a8490cc152b69319a517aed9d2643..fe0e01470d182b4997afe4525f287d6d2eb15e53 100644 (file)
@@ -679,7 +679,7 @@ void parseTypeDefinition(parse_file * in, sequence * unnamed_types,
   getRAnglebracket(in); //<type name=type_name>
   getLAnglebracket(in); //<struct>
   token = getName(in);
-  if(strcmp("struct",token))in->error(in,"not a valid type definition");
+  //MD ??if(strcmp("struct",token))in->error(in,"not a valid type definition");
   ungetToken(in);
   parseType(in,t, unnamed_types, named_types);
   
index 8f84e3fd4531c6eca27b4ae3c630072fda77ac05..a3209c7dab645e4066c5eb4268a55589bc577c26 100644 (file)
     <description>An interval timer is set.</description>
      <struct>
       <field name="which"> <description>kind of interval timer.</description>
-                       <typeref name=itimer_kind>
+                       <typeref name=itimer_kind/>
       </field>
       <field name="interval"> <description>timer interval.</description>
-                       <typeref name=timeval>
+                       <typeref name=timeval/>
       </field>
       <field name="value"> <description>current value.</description>
-                       <typeref name=timeval>
+                       <typeref name=timeval/>
       </field>
      </struct>
   </event>
This page took 0.026738 seconds and 4 git commands to generate.