Explorar o código

Ready for v1.0.0

Wu Han %!s(int64=6) %!d(string=hai) anos
pai
achega
e943319bb2

+ 1 - 1
examples/amessage_decode_from_file.c

@@ -5,7 +5,7 @@
 
 #include "amessage.pb-c.h"
 
-static void protobuf_decode_from_file(int argc,char *argv[])
+static void protobuf_decode_from_file(int argc, char *argv[])
 {
     rt_kprintf("---- Reading ---\n");
 

+ 1 - 1
examples/amessage_encode_decode.c

@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include "amessage.pb-c.h"
 
-static void protobuf_encode_decode(int argc,char *argv[])
+static void protobuf_encode_decode(int argc, char *argv[])
 {
     void *buf;                     // Buffer to store serialized data
     unsigned msg_len;              // Length of serialized data

+ 3 - 4
examples/amessage_encode_to_file.c

@@ -5,9 +5,9 @@
 
 #include "amessage.pb-c.h"
 
-static void protobuf_encode_to_file(int argc,char *argv[])
+static void protobuf_encode_to_file(int argc, char *argv[])
 {
-    void *buffer;                     // Buffer to store serialized data
+    void *buffer;                      // Buffer to store serialized data
     unsigned msg_len;                  // Length of serialized data
 
     if (argc != 3)
@@ -19,7 +19,7 @@ static void protobuf_encode_to_file(int argc,char *argv[])
     // Encode message to buffer
     {
         rt_kprintf("---- Encoding ---\n");
-        AMessage encode_msg = AMESSAGE__INIT; // AMessage
+        AMessage encode_msg = AMESSAGE__INIT;   // AMessage
 
         encode_msg.has_a  = 1;
         encode_msg.a      = atoi(argv[1]);
@@ -32,7 +32,6 @@ static void protobuf_encode_to_file(int argc,char *argv[])
         rt_kprintf("Encoding %d serialized bytes\n", msg_len);
         amessage__pack(&encode_msg, buffer);
 
-
         rt_kprintf("---- Saving ---\n");
         int fd = open("/amessage.onnx", O_WRONLY | O_CREAT | O_TRUNC);
         if (fd>= 0)