Remove remaining C++ comments from source tree.
authorMarko Kreen <[email protected]>
Fri, 4 Jan 2013 21:19:34 +0000 (23:19 +0200)
committerMarko Kreen <[email protected]>
Fri, 4 Jan 2013 21:19:34 +0000 (23:19 +0200)
I like to use them for debugging, to show that this
comment is temporary, but that also means they
should not stay around.

12 files changed:
test/compile.c
test/force_compat.sed
test/test_aatree.c
test/test_cbtree.c
test/test_cxalloc.c
test/test_heap.c
test/test_list.c
test/test_regex.c
test/test_string.c
usual/base_win32.h
usual/crypto/keccak.c
usual/pgsocket.c

index 16ca71192dfb1f57bf498c737dba9e8b5a4f5bc5..59a36b6c3f68c4aec9c878baa78d7a9455aeddf0 100644 (file)
@@ -16,7 +16,6 @@
 #include <usual/mbuf.h>
 #include <usual/crypto/md5.h>
 #include <usual/misc.h>
-//#include <usual/pgsocket.h>
 #include <usual/safeio.h>
 #include <usual/shlist.h>
 #include <usual/signal.h>
index 6b438491f86ab3ae79a0230e432aaffbfdb9d996..33430dacd5c3dca6a7853e134764d999b72b0dcd 100644 (file)
@@ -1,13 +1,13 @@
-/FFS/s,^,//,
-/FLS/s,^,//,
-/STRLCPY/s,^,//,
-/STRLCAT/s,^,//,
-/BASENAME/s,^,//,
-/DIRNAME/s,^,//,
-/REGCOMP/s,^,//,
-/GETADDRINFO_A/s,^,//,
-/INET_NTOP/s,^,//,
-/INET_PTON/s,^,//,
-/GETOPT/s,^,//,
-/CTYPE_ON_CHAR/s,^,//,
-/FNMATCH/s,^,//,
+/^#define.*FFS/s,.*,/* & */,
+/^#define.*FLS/s,.*,/* & */,
+/^#define.*STRLCPY/s,.*,/* & */,
+/^#define.*STRLCAT/s,.*,/* & */,
+/^#define.*BASENAME/s,.*,/* & */,
+/^#define.*DIRNAME/s,.*,/* & */,
+/^#define.*REGCOMP/s,.*,/* & */,
+/^#define.*GETADDRINFO_A/s,.*,/* & */,
+/^#define.*INET_NTOP/s,.*,/* & */,
+/^#define.*INET_PTON/s,.*,/* & */,
+/^#define.*GETOPT/s,.*,/* & */,
+/^#define.*CTYPE_ON_CHAR/s,.*,/* & */,
+/^#define.*FNMATCH/s,.*,/* & */,
index 0204f44fe360ec019637eca1b9e436d792964367..fbcafc634b8a93966aab63c344402c458a3bb29e 100644 (file)
@@ -175,13 +175,12 @@ static int get_next(bool with_stat, bool added[])
 static void test_aatree_random(void *p)
 {
        bool is_added[RSIZE];
-       int prefer_remove = 0; // 0 - insert, 1 - delete
+       int prefer_remove = 0; /* 0 - insert, 1 - delete */
        int n;
-       int op; // 0 - insert, 1 - delete
+       int op; /* 0 - insert, 1 - delete */
        struct AATree tree[1];
        unsigned long long total = 0;
 
-       //printf("\n\n*** rand test ***\n\n");
        srandom(123123);
        memset(is_added, 0, sizeof(is_added));
 
@@ -192,14 +191,12 @@ static void test_aatree_random(void *p)
                        op = r > 5;
                else
                        op = r > 10;
-               //op = 0;
+               /* op = 0; */
 
                n = get_next(op, is_added);
                if (n < 0) {
-                       //break;
                        if (prefer_remove == op) {
                                prefer_remove = !prefer_remove;
-                               //printf("** toggling remove to %d\n", prefer_remove);
                        }
                        continue;
                }
index 6618a093daf4eada95ffb2f3faf89be3fae9a5a7..f52fdb686243998d985e2e94e4f18d30b458ab36 100644 (file)
@@ -129,13 +129,12 @@ static int get_next(bool with_stat, bool added[])
 static void test_cbtree_random(void *p)
 {
        bool is_added[RSIZE];
-       int prefer_remove = 0; // 0 - insert, 1 - delete
+       int prefer_remove = 0; /* 0 - insert, 1 - delete */
        int n;
-       int op; // 0 - insert, 1 - delete
+       int op; /* 0 - insert, 1 - delete */
        struct CBTree *tree;
        unsigned long long total = 0;
 
-       //printf("\n\n*** rand test ***\n\n");
        srandom(123123);
        memset(is_added, 0, sizeof(is_added));
 
@@ -147,14 +146,12 @@ static void test_cbtree_random(void *p)
                        op = r > 5;
                else
                        op = r > 10;
-               //op = 0;
+               /* op = 0; */
 
                n = get_next(op, is_added);
                if (n < 0) {
-                       //break;
                        if (prefer_remove == op) {
                                prefer_remove = !prefer_remove;
-                               //printf("** toggling remove to %d\n", prefer_remove);
                        }
                        continue;
                }
index 54d91696b54544f17a414217a4cda0e8fbad238d..294c33bbdec0a6a9a9f4269678689b14f267bb01 100644 (file)
@@ -24,8 +24,6 @@ static void m_log(const char *fmt, ...)
        va_start(ap, fmt);
        vsnprintf(logbuf + len, sizeof(logbuf) - len, fmt, ap);
        va_end(ap);
-
-       //printf("\n%s: delta=%d\n", logbuf + len, delta);
 }
 
 static void *log_alloc(void *ctx, size_t len)
@@ -106,7 +104,7 @@ static void test_cxalloc_tree(void *zzz)
 
        cx_destroy(cx1);
 
-       //str_check(logbuf, "A(16)R(500)F()");
+       /* str_check(logbuf, "A(16)R(500)F()"); */
        int_check(delta, 0);
 end:
        reset();
index 6467b91eb751d89cb19b1ee9b3951c1fa1a180b7..0f37d45f5b17a4abc338fadfcc356e8f49eadf43 100644 (file)
@@ -183,13 +183,12 @@ static int get_next(bool with_stat, bool added[])
 static void test_aatree_random(void *p)
 {
        bool is_added[RSIZE];
-       int prefer_remove = 0; // 0 - insert, 1 - delete
+       int prefer_remove = 0; /* 0 - insert, 1 - delete */
        int n;
-       int op; // 0 - insert, 1 - delete
+       int op; /* 0 - insert, 1 - delete */
        struct AATree tree[1];
        unsigned long long total = 0;
 
-       //printf("\n\n*** rand test ***\n\n");
        srandom(123123);
        memset(is_added, 0, sizeof(is_added));
 
@@ -200,14 +199,12 @@ static void test_aatree_random(void *p)
                        op = r > 5;
                else
                        op = r > 10;
-               //op = 0;
+               /* op = 0; */
 
                n = get_next(op, is_added);
                if (n < 0) {
-                       //break;
                        if (prefer_remove == op) {
                                prefer_remove = !prefer_remove;
-                               //printf("** toggling remove to %d\n", prefer_remove);
                        }
                        continue;
                }
@@ -228,7 +225,7 @@ end:
 
 struct testcase_t heap_tests[] = {
        { "basic", test_heap_basic },
-       //{ "random", test_aatree_random },
+       /* { "random", test_aatree_random }, */
        END_OF_TESTCASES
 };
 
index 7a1f40c3501c5425fb8ed22ada55f6bcae046cc0..47368e5af474b1a1cd5387bfc8049a9d4c056463 100644 (file)
@@ -147,8 +147,10 @@ end:;
 
 struct testcase_t list_tests[] = {
        { "sort", test_list_sort },
-       //{ "sort2", test_list_sort2 },
-       //{ "sort3", test_list_sort3 },
+#if 0
+       { "sort2", test_list_sort2 },
+       { "sort3", test_list_sort3 },
+#endif
        END_OF_TESTCASES
 };
 
index b738d284a9dc5190f3c0fb20ccd18d8946bd1f1d..db4fb77b6a7921c421b8a0b85dd3d3b7a4705dd6 100644 (file)
@@ -95,7 +95,7 @@ static void test_regex(void *ptr)
        str_check(e_rx("foo(x)?.*", "foobar", 0), "(0,6)(?,?)");
        str_check(e_rx("foo", "bar", 0), "NOMATCH");
        str_check(e_rx("foo{5,1}", "bar", 0), "BADBR");
-       //str_check(e_rx("(|)", "bar", 0), "BADPAT");
+       /* str_check(e_rx("(|)", "bar", 0), "BADPAT"); */
        str_check(e_rx("*", "bar", 0), "BADRPT");
        str_check(e_rx("foo{", "bar", 0), "EBRACE");
        str_check(e_rx("fo[o", "bar", 0), "EBRACK");
index aac18e542f85cb8ae4e38f8a92fe4a543204297c..10132134e235efddae052f95bf75b654f516367d 100644 (file)
@@ -173,7 +173,6 @@ static bool slshow(void *arg, const char *s)
                        return false;
        }
        if (!s) s = "NULL";
-       //printf("writing: <%s>\n", s);
        return mbuf_write(mb, s, strlen(s));
 }
 
index adbb1be4d34a3d9bf6f20990a899a4a134c0feed..941de16c236746f0e453c282955c07a6bfc7b798 100644 (file)
 
 #define ECONNABORTED WSAECONNABORTED
 #define EMSGSIZE WSAEMSGSIZE
-#define EINPROGRESS WSAEWOULDBLOCK // WSAEINPROGRESS
+#define EINPROGRESS WSAEWOULDBLOCK /* WSAEINPROGRESS */
 
 #undef EAGAIN
-#define EAGAIN WSAEWOULDBLOCK // WSAEAGAIN
+#define EAGAIN WSAEWOULDBLOCK /* WSAEAGAIN */
 
 #ifndef EAFNOSUPPORT
 #define EAFNOSUPPORT ENOSYS
index e405cc3040d7a8df33c3709dd37ec21cad7c177d..720c50061a2c7531a3170cc202047beea255242b 100644 (file)
@@ -43,8 +43,6 @@
 #include <limits.h>
 #include <string.h>
 
-//#define KECCAK_64BIT
-
 /*
  * Decide whether to use 64- or 32-bit implementation.
  */
index 414217b0ca80386e584352834f65019404a60967..4311307912a4bdfcbc6f7de860733c254ce47842 100644 (file)
@@ -43,7 +43,8 @@ struct PgSocket {
        /* track wait state */
        enum WType wait_type;
 
-       uint8_t wait_event; // EV_READ / EV_WRITE
+       /* EV_READ / EV_WRITE */
+       uint8_t wait_event;
 
        /* should connect after sleep */
        bool reconnect;