OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/xds_test_xdr.c versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/xds_test_xdr.c 1.2 -> 1.3

--- xds_test_xdr.c       2001/08/09 19:58:35     1.2
+++ xds_test_xdr.c       2001/08/09 20:59:05     1.3
@@ -37,7 +37,7 @@
 
 #ifdef XDS_TEST_XDR_INT32
 
-int main()
+int main(int argc, char *argv[])
 {
     XDR xdrs;
     char xdr_buf[1024];
@@ -59,7 +59,6 @@
     size_t i;
 
     /* Encode the values array using the RPC-XDR implementation. */
-
     xdrmem_create(&xdrs, xdr_buf, sizeof (xdr_buf), XDR_ENCODE);
     for (i = 0; i < sizeof (values) / sizeof (xds_int32_t); ++i)
         xdr_int32_t(&xdrs, &values[i]);
@@ -67,7 +66,6 @@
     xdr_destroy(&xdrs);
 
     /* Encode the values array using the XDS implementation. */
-
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -91,7 +89,6 @@
     xds_destroy(xds);
 
     /* Both buffers must be equal now. */
-
     if (xdr_buf_size != xds_buf_size) {
         printf("The buffer sizes don't match: %d != %d.\n", xdr_buf_size,
                xds_buf_size);
@@ -103,9 +100,8 @@
     }
 
     /* Now we decode the values again using the XDS implementation and
-     * compare them to our original values. Obviously, they should not
-     * differ. */
-
+       compare them to our original values. Obviously, they should not
+       differ. */
     xds = xds_init(XDS_DECODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -133,7 +129,6 @@
     xds_destroy(xds);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -142,13 +137,13 @@
 #ifdef XDS_TEST_XDR_UINT32
 
 #ifdef __FreeBSD__
-static int xdr_uint32_t(XDR * xdrs, uint32_t * val)
+static int xdr_uint32_t(XDR *xdrs, uint32_t *val)
 {
     return xdr_u_int32_t(xdrs, val);
 }
 #endif
 
-int main()
+int main(int argc, char *argv[])
 {
     XDR xdrs;
     char xdr_buf[1024];
@@ -169,7 +164,6 @@
     size_t i;
 
     /* Encode the values array using the RPC-XDR implementation. */
-
     xdrmem_create(&xdrs, xdr_buf, sizeof (xdr_buf), XDR_ENCODE);
     for (i = 0; i < sizeof (values) / sizeof (xds_uint32_t); ++i)
         xdr_uint32_t(&xdrs, &values[i]);
@@ -177,7 +171,6 @@
     xdr_destroy(&xdrs);
 
     /* Encode the values array using the XDS implementation. */
-
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -201,7 +194,6 @@
     xds_destroy(xds);
 
     /* Both buffers must be equal now. */
-
     if (xdr_buf_size != xds_buf_size) {
         printf("The buffer sizes don't match: %d != %d.\n", xdr_buf_size,
                xds_buf_size);
@@ -213,9 +205,8 @@
     }
 
     /* Now we decode the values again using the XDS implementation and
-     * compare them to our original values. Obviously, they should not
-     * differ. */
-
+       compare them to our original values. Obviously, they should not
+       differ. */
     xds = xds_init(XDS_DECODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -243,7 +234,6 @@
     xds_destroy(xds);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -253,7 +243,7 @@
 
 #ifdef XDS_HAVE_64_BIT_SUPPORT
 
-int main()
+int main(int argc, char *argv[])
 {
     XDR xdrs;
     char xdr_buf[1024];
@@ -275,7 +265,6 @@
     size_t i;
 
     /* Encode the values array using the RPC-XDR implementation. */
-
     xdrmem_create(&xdrs, xdr_buf, sizeof (xdr_buf), XDR_ENCODE);
     for (i = 0; i < sizeof (values) / sizeof (xds_int64_t); ++i)
         xdr_int64_t(&xdrs, &values[i]);
@@ -283,7 +272,6 @@
     xdr_destroy(&xdrs);
 
     /* Encode the values array using the XDS implementation. */
-
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -307,7 +295,6 @@
     xds_destroy(xds);
 
     /* Both buffers must be equal now. */
-
     if (xdr_buf_size != xds_buf_size) {
         printf("The buffer sizes don't match: %d != %d.\n", xdr_buf_size,
                xds_buf_size);
@@ -319,9 +306,8 @@
     }
 
     /* Now we decode the values again using the XDS implementation and
-     * compare them to our original values. Obviously, they should not
-     * differ. */
-
+       compare them to our original values. Obviously, they should not
+       differ. */
     xds = xds_init(XDS_DECODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -349,7 +335,6 @@
     xds_destroy(xds);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -362,13 +347,13 @@
 #ifdef XDS_HAVE_64_BIT_SUPPORT 
 
 #ifdef __FreeBSD__
-static int xdr_uint64_t(XDR * xdrs, uint64_t * val)
+static int xdr_uint64_t(XDR *xdrs, uint64_t *val)
 {
     return xdr_u_int64_t(xdrs, val);
 }
 #endif
 
-int main()
+int main(int argc, char *argv[])
 {
     XDR xdrs;
     char xdr_buf[1024];
@@ -389,7 +374,6 @@
     size_t i;
 
     /* Encode the values array using the RPC-XDR implementation. */
-
     xdrmem_create(&xdrs, xdr_buf, sizeof (xdr_buf), XDR_ENCODE);
     for (i = 0; i < sizeof (values) / sizeof (xds_uint64_t); ++i)
         xdr_uint64_t(&xdrs, &values[i]);
@@ -397,7 +381,6 @@
     xdr_destroy(&xdrs);
 
     /* Encode the values array using the XDS implementation. */
-
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -421,7 +404,6 @@
     xds_destroy(xds);
 
     /* Both buffers must be equal now. */
-
     if (xdr_buf_size != xds_buf_size) {
         printf("The buffer sizes don't match: %d != %d.\n", xdr_buf_size,
                xds_buf_size);
@@ -433,9 +415,8 @@
     }
 
     /* Now we decode the values again using the XDS implementation and
-     * compare them to our original values. Obviously, they should not
-     * differ. */
-
+       compare them to our original values. Obviously, they should not
+       differ. */
     xds = xds_init(XDS_DECODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -463,7 +444,6 @@
     xds_destroy(xds);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -473,7 +453,7 @@
 
 #ifdef XDS_TEST_XDR_STRING
 
-int main()
+int main(int argc, char *argv[])
 {
     xds_t *xds;
     char *buffer;
@@ -483,8 +463,7 @@
     char *new_msg;
 
     /* Encode the string as octet stream. Then erase the buffer and decode
-     * the string back, verifying that it hasn't changed. */
-
+       the string back, verifying that it hasn't changed. */
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -538,7 +517,6 @@
     free(new_msg);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -546,7 +524,7 @@
 
 #ifdef XDS_TEST_XDR_STRING_EMPTY
 
-int main()
+int main(int argc, char *argv[])
 {
     xds_t *xds;
     char *buffer;
@@ -556,8 +534,7 @@
     char *new_msg;
 
     /* Encode the string as octet stream. Then erase the buffer and decode
-     * the string back, verifying that it hasn't changed. */
-
+       the string back, verifying that it hasn't changed. */
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -607,7 +584,6 @@
     free(new_msg);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -615,7 +591,7 @@
 
 #ifdef XDS_TEST_XDR_OCTETSTREAM
 
-int main()
+int main(int argc, char *argv[])
 {
     xds_t *xds;
     char *buffer;
@@ -626,8 +602,7 @@
     size_t new_msg_size;
 
     /* Encode the string as octet stream. Then erase the buffer and decode
-     * the string back, verifying that it hasn't changed. */
-
+       the string back, verifying that it hasn't changed. */
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -682,7 +657,6 @@
     free(new_msg);
 
     /* Everything went fine. */
-
     return 0;
 }
 
@@ -690,7 +664,7 @@
 
 #ifdef XDS_TEST_XDR_OCTETSTREAM_EMPTY
 
-int main()
+int main(int argc, char *argv[])
 {
     xds_t *xds;
     char *buffer;
@@ -701,8 +675,7 @@
     size_t new_msg_size;
 
     /* Encode the string as octet stream. Then erase the buffer and decode
-     * the string back, verifying that it hasn't changed. */
-
+       the string back, verifying that it hasn't changed. */
     xds = xds_init(XDS_ENCODE);
     if (xds == NULL) {
         printf("Failed to initialize XDS context.\n");
@@ -723,8 +696,7 @@
     }
     xds_destroy(xds);
     if (buffer_size % 4 != 0) {
-        printf
-            ("The encoded octet stream's buffer size is not a multiple of 4.\n");
+        printf("The encoded octet stream's buffer size is not a multiple of 4.\n");
         return 1;
     }
 
@@ -757,8 +729,8 @@
     free(new_msg);
 
     /* Everything went fine. */
-
     return 0;
 }
 
 #endif /* XDS_TEST_XDR_OCTETSTREAM_EMPTY */
+

CVSTrac 2.0.1