]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/examples/mpo/ddso/ddsop.c
Reformat the sources with orte/uncrustify script
[orte.git] / orte / examples / mpo / ddso / ddsop.c
index 5a143b201e048fefaedde1a62fe7db0e3bc02d91..19ce8478cc925c361061ec43aa032d292877b5c1 100644 (file)
@@ -3,7 +3,7 @@
 #include <ddso.h>
 #include "ddso_cb.h"
 
-ORTEDomain        *d=NULL; 
+ORTEDomain        *d = NULL;
 NtpTime           persistence, delay;
 ORTEPublication   *p_octet;
 ORTEPublication   *p_short;
@@ -13,19 +13,22 @@ ofb_octet         i2s_octet;
 ofb_short         i2s_short;
 ofb_long          i2s_long;
 
-int main(int argc,char *argv[]) {
+int
+main(int argc, char *argv[])
+{
   //init
   ORTEInit();
-  d=ORTEDomainAppCreate(ORTE_DEFAULT_DOMAIN,NULL,NULL,ORTE_FALSE);
-  if (!d) return -1;
-  NTPTIME_BUILD(persistence,3);  //3s
-  NTPTIME_BUILD(delay,1);        //1s
-  i2s_octet.guid=0x123456;
-  i2s_octet.value=0;
-  i2s_short.guid=0x654321;
-  i2s_short.value=0;
-  i2s_long.guid=0x123654;
-  i2s_long.value=0;
+  d = ORTEDomainAppCreate(ORTE_DEFAULT_DOMAIN, NULL, NULL, ORTE_FALSE);
+  if (!d)
+    return -1;
+  NTPTIME_BUILD(persistence, 3);  //3s
+  NTPTIME_BUILD(delay, 1);        //1s
+  i2s_octet.guid = 0x123456;
+  i2s_octet.value = 0;
+  i2s_short.guid = 0x654321;
+  i2s_short.value = 0;
+  i2s_long.guid = 0x123654;
+  i2s_long.value = 0;
 
   //register serialization/deserealization functions for a given types
   ofb_octet_type_register(d);
@@ -35,39 +38,38 @@ int main(int argc,char *argv[]) {
   ofb_double_type_register(d);
 
   //create of services
-  p_octet=ORTEPublicationCreate(
-       d,
-      "GUID_octet",
-      "ofb_octet",
-      &i2s_octet,
-      &persistence,
-      1,
-      &ofb_cbs_octet,
-      NULL,
-      &delay);
-  p_short=ORTEPublicationCreate(
-       d,
-      "GUID_short",
-      "ofb_short",
-      &i2s_short,
-      &persistence,
-      1,
-      &ofb_cbs_short,
-      NULL,
-      &delay);
-  p_long=ORTEPublicationCreate(
-       d,
-      "GUID_long",
-      "ofb_long",
-      &i2s_long,
-      &persistence,
-      1,
-      &ofb_cbs_long,
-      NULL,
-      &delay);
-  
-  while(1) {
+  p_octet = ORTEPublicationCreate(
+    d,
+    "GUID_octet",
+    "ofb_octet",
+    &i2s_octet,
+    &persistence,
+    1,
+    &ofb_cbs_octet,
+    NULL,
+    &delay);
+  p_short = ORTEPublicationCreate(
+    d,
+    "GUID_short",
+    "ofb_short",
+    &i2s_short,
+    &persistence,
+    1,
+    &ofb_cbs_short,
+    NULL,
+    &delay);
+  p_long = ORTEPublicationCreate(
+    d,
+    "GUID_long",
+    "ofb_long",
+    &i2s_long,
+    &persistence,
+    1,
+    &ofb_cbs_long,
+    NULL,
+    &delay);
+
+  while (1)
     ORTESleepMs(1);
-  }
   return 0;
 }