Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

erts: Use block comments - ansi style

  • Loading branch information...
commit 209f6091c24c63651132dae4cbcf1eab9ea8913c 1 parent 6ca494b
Björn-Egil Dahlberg authored
10  erts/emulator/beam/big.c
@@ -150,14 +150,14 @@
150 150
 #define D2GTE(a1,a0,b1,b0) (!D2LT(a1,a0,b1,b0))
151 151
 #define D2LTE(a1,a0,b1,b0) (!D2GT(a1,a0,b1,b0))
152 152
 
153  
-// Add (A+B),  A=(a1B+a0) B=(b1B+b0)
  153
+/* Add (A+B),  A=(a1B+a0) B=(b1B+b0) */
154 154
 #define D2ADD(a1,a0,b1,b0,c1,c0) do { \
155 155
 	ErtsDigit __ci = 0;	      \
156 156
 	DSUM(a0,b0,__ci,c0); \
157 157
 	DSUMc(a1,b1,__ci,c1);			\
158 158
     } while(0)
159 159
 
160  
-// Subtract (A-B), A=(a1B+a0), B=(b1B+b0)  (A>=B)
  160
+/* Subtract (A-B), A=(a1B+a0), B=(b1B+b0)  (A>=B) */
161 161
 #define D2SUB(a1,a0,b1,b0,c1,c0) do { \
162 162
 	ErtsDigit __bi;		      \
163 163
 	DSUB(a0,b0,__bi,c0);	      \
@@ -1337,7 +1337,7 @@ static dsize_t I_lshift(ErtsDigit* x, dsize_t xl, Sint y,
1337 1337
 
1338 1338
 	    while(bw--)
1339 1339
 		*r++ = 0;
1340  
-	    if (sw) {  // NOTE! x >> 32 is not = 0!
  1340
+	    if (sw) {  /* NOTE! x >> 32 is not = 0! */
1341 1341
 		while(xl--) {
1342 1342
 		    a0 = (*x << sw) | a1;
1343 1343
 		    a1 = (*x >> (D_EXP - sw));
@@ -1384,7 +1384,7 @@ static dsize_t I_lshift(ErtsDigit* x, dsize_t xl, Sint y,
1384 1384
 	    x += (xl-1);
1385 1385
 	    r += (rl-1);
1386 1386
 	    xl -= bw;
1387  
-	    if (sw) { // NOTE! x >> 32 is not = 0!
  1387
+	    if (sw) { /* NOTE! x >> 32 is not = 0! */
1388 1388
 		while(xl--) {
1389 1389
 		    a1 = (*x >> sw) | a0;
1390 1390
 		    a0 = (*x << (D_EXP-sw));
@@ -2468,7 +2468,7 @@ int term_equals_2pow32(Eterm x)
2468 2468
 	if (!is_big(x))
2469 2469
 	    return 0;
2470 2470
 	bp = big_val(x);
2471  
-#if D_EXP == 16   // 16 bit platfrom not really supported!!!
  2471
+#if D_EXP == 16   /* 16 bit platfrom not really supported!!! */
2472 2472
 	return (BIG_SIZE(bp) == 3) && !BIG_DIGIT(bp,0) && !BIG_DIGIT(bp,1) && 
2473 2473
 	    BIG_DIGIT(bp,2) == 1;
2474 2474
 #elif D_EXP == 32
2  erts/emulator/beam/erl_process.c
@@ -1811,7 +1811,7 @@ erts_set_aux_work_timeout(int ix, erts_aint32_t type, int enable)
1811 1811
 
1812 1812
     ERTS_DBG_CHK_AUX_WORK_VAL(type);
1813 1813
     ERTS_DBG_CHK_AUX_WORK_VAL(erts_atomic32_read_nob(&aux_work_tmo->type[ix]));
1814  
-//    erts_fprintf(stderr, "t(%d, 0x%x, %d)\n", ix, type, enable);
  1814
+    /* erts_fprintf(stderr, "t(%d, 0x%x, %d)\n", ix, type, enable); */
1815 1815
 
1816 1816
     if (!enable) {
1817 1817
 	old = erts_atomic32_read_band_mb(&aux_work_tmo->type[ix], ~type);
2  erts/emulator/beam/erl_unicode.c
@@ -724,7 +724,7 @@ static Eterm do_build_utf8(Process *p, Eterm ioterm, int *left, int latin1,
724 724
 			hp = HAlloc(p, 2);
725 725
 			obj = CDR(objp);
726 726
 			ioterm = CONS(hp, rest_term, obj);
727  
-			//(*left) = 0;
  727
+			/* (*left) = 0; */
728 728
 			goto done;
729 729
 		    }
730 730
 		    if (rest_term != NIL) {
34  erts/emulator/beam/utils.c
@@ -2713,25 +2713,26 @@ Sint cmp(Eterm a, Eterm b)
2713 2713
 	case SMALL_FLOAT:
2714 2714
 	    GET_DOUBLE(bw, f2);
2715 2715
 	    if (f2.fd < MAX_LOSSLESS_FLOAT && f2.fd > MIN_LOSSLESS_FLOAT) {
2716  
-		// Float is within the no loss limit
  2716
+		/* Float is within the no loss limit */
2717 2717
 		f1.fd = signed_val(aw);
2718 2718
 		j = float_comp(f1.fd, f2.fd);
2719 2719
 #if ERTS_SIZEOF_ETERM == 8
2720 2720
 	    } else if (f2.fd > (double) (MAX_SMALL + 1)) {
2721  
-		// Float is a positive bignum, i.e. bigger
  2721
+		/* Float is a positive bignum, i.e. bigger */
2722 2722
 		j = -1;
2723 2723
 	    } else if (f2.fd < (double) (MIN_SMALL - 1)) {
2724  
-		// Float is a negative bignum, i.e. smaller
  2724
+		/* Float is a negative bignum, i.e. smaller */
2725 2725
 		j = 1;
2726  
-	    } else { // Float is a Sint but less precise
  2726
+	    } else {
  2727
+		/* Float is a Sint but less precise */
2727 2728
 		j = signed_val(aw) - (Sint) f2.fd;
2728 2729
 	    }
2729 2730
 #else
2730 2731
 	    } else {
2731  
-		// If float is positive it is bigger than small
  2732
+		/* If float is positive it is bigger than small */
2732 2733
 		j = (f2.fd > 0.0) ? -1 : 1;
2733 2734
 	    }
2734  
-#endif // ERTS_SIZEOF_ETERM == 8
  2735
+#endif /* ERTS_SIZEOF_ETERM == 8 */
2735 2736
 	    break;
2736 2737
         case FLOAT_BIG:
2737 2738
 	{
@@ -2743,18 +2744,18 @@ Sint cmp(Eterm a, Eterm b)
2743 2744
 	    GET_DOUBLE(bw, f2);
2744 2745
 	    if ((f2.fd < (double) (MAX_SMALL + 1))
2745 2746
 		    && (f2.fd > (double) (MIN_SMALL - 1))) {
2746  
-		// Float is a Sint
  2747
+		/* Float is a Sint */
2747 2748
 		j = big_sign(aw) ? -1 : 1;
2748 2749
 	    } else if (big_arity(aw) > BIG_ARITY_FLOAT_MAX
2749 2750
 		       || pow(2.0,(big_arity(aw)-1)*D_EXP) > fabs(f2.fd)) {
2750  
-		// If bignum size shows that it is bigger than the abs float
  2751
+		/* If bignum size shows that it is bigger than the abs float */
2751 2752
 		j = big_sign(aw) ? -1 : 1;
2752 2753
 	    } else if (big_arity(aw) < BIG_ARITY_FLOAT_MAX
2753 2754
 		       && (pow(2.0,(big_arity(aw))*D_EXP)-1.0) < fabs(f2.fd)) {
2754  
-		// If bignum size shows that it is smaller than the abs float
  2755
+		/* If bignum size shows that it is smaller than the abs float */
2755 2756
 		j = f2.fd < 0 ? 1 : -1;
2756 2757
 	    } else if (f2.fd < MAX_LOSSLESS_FLOAT && f2.fd > MIN_LOSSLESS_FLOAT) {
2757  
-		// Float is within the no loss limit
  2758
+		/* Float is within the no loss limit */
2758 2759
 		if (big_to_double(aw, &f1.fd) < 0) {
2759 2760
 		    j = big_sign(aw) ? -1 : 1;
2760 2761
 		} else {
@@ -2771,25 +2772,26 @@ Sint cmp(Eterm a, Eterm b)
2771 2772
 	case FLOAT_SMALL:
2772 2773
 	    GET_DOUBLE(aw, f1);
2773 2774
 	    if (f1.fd < MAX_LOSSLESS_FLOAT && f1.fd > MIN_LOSSLESS_FLOAT) {
2774  
-		// Float is within the no loss limit
  2775
+		/* Float is within the no loss limit */
2775 2776
 		f2.fd = signed_val(bw);
2776 2777
 		j = float_comp(f1.fd, f2.fd);
2777 2778
 #if ERTS_SIZEOF_ETERM == 8
2778 2779
 	    } else if (f1.fd > (double) (MAX_SMALL + 1)) {
2779  
-		// Float is a positive bignum, i.e. bigger
  2780
+		/* Float is a positive bignum, i.e. bigger */
2780 2781
 		j = 1;
2781 2782
 	    } else if (f1.fd < (double) (MIN_SMALL - 1)) {
2782  
-		// Float is a negative bignum, i.e. smaller
  2783
+		/* Float is a negative bignum, i.e. smaller */
2783 2784
 		j = -1;
2784  
-	    } else { // Float is a Sint but less precise it
  2785
+	    } else {
  2786
+		/* Float is a Sint but less precise it */
2785 2787
 		j = (Sint) f1.fd - signed_val(bw);
2786 2788
 	    }
2787 2789
 #else
2788 2790
 	    } else {
2789  
-		// If float is positive it is bigger than small
  2791
+		/* If float is positive it is bigger than small */
2790 2792
 		j = (f1.fd > 0.0) ? 1 : -1;
2791 2793
 	    }
2792  
-#endif // ERTS_SIZEOF_ETERM == 8
  2794
+#endif /* ERTS_SIZEOF_ETERM == 8 */
2793 2795
 	    break;
2794 2796
 	default:
2795 2797
 	    j = b_tag - a_tag;
4  erts/emulator/drivers/common/efile_drv.c
@@ -2559,7 +2559,7 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data)
2559 2559
 	      reply_Sint64(desc, d->c.sendfile.written);
2560 2560
 	      desc->sendfile_state = not_sending;
2561 2561
 	      free_sendfile(data);
2562  
-	  } else if (d->result_ok == 1) { // If we are using select to send the rest of the data
  2562
+	  } else if (d->result_ok == 1) { /* If we are using select to send the rest of the data */
2563 2563
 	      desc->sendfile_state = sending;
2564 2564
 	      desc->d = d;
2565 2565
 	      driver_select(desc->port, (ErlDrvEvent)(long)d->c.sendfile.out_fd,
@@ -4114,7 +4114,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
4114 4114
 	}
4115 4115
 
4116 4116
 	if (hd_len != 0 || tl_len != 0 || flags != 0) {
4117  
-	    // We do not allow header, trailers and/or flags right now
  4117
+	    /* We do not allow header, trailers and/or flags right now */
4118 4118
 	    reply_posix_error(desc, EINVAL);
4119 4119
 	    goto done;
4120 4120
 	}
16  erts/emulator/drivers/common/erl_efile.h
@@ -67,7 +67,7 @@
67 67
 #define FILENAMES_16BIT 1
68 68
 #endif
69 69
 
70  
-// We use sendfilev if it exist on solaris
  70
+/* We use sendfilev if it exist on solaris */
71 71
 #if !defined(HAVE_SENDFILE) && defined(HAVE_SENDFILEV)
72 72
 #define HAVE_SENDFILE
73 73
 #endif
@@ -88,20 +88,6 @@ typedef struct _Efile_error {
88 88
 } Efile_error;
89 89
 
90 90
 /*
91  
- * This structure contains date and time.
92  
- */
93  
-
94  
-//typedef struct _Efile_time {
95  
-//    unsigned year;		/* (4 digits). */
96  
-//    unsigned month;		/* (1..12). */
97  
-//    unsigned day;		/* (1..31). */
98  
-//    unsigned hour;		/* (0..23). */
99  
-//    unsigned minute;		/* (0..59). */
100  
-//    unsigned second;		/* (0..59). */
101  
-//} Efile_time;
102  
-
103  
-
104  
-/*
105 91
  * Describes what is returned by file:file_info/1.
106 92
  */
107 93
 
6  erts/emulator/drivers/common/inet_drv.c
@@ -3854,8 +3854,10 @@ static void desc_close(inet_descriptor* desc)
3854 3854
 	desc->forced_events = 0;
3855 3855
 	desc->send_would_block = 0;
3856 3856
 #endif
3857  
-	// We should close the fd here, but the other driver might still
3858  
-	// be selecting on it.
  3857
+	/*
  3858
+	 * We should close the fd here, but the other driver might still
  3859
+	 * be selecting on it.
  3860
+	 */
3859 3861
 	if (!desc->is_ignored)
3860 3862
 	    driver_select(desc->port,(ErlDrvEvent)(long)desc->event, 
3861 3863
 			  ERL_DRV_USE, 0);
2  erts/emulator/pcre/pcre_exec.c
@@ -36,7 +36,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 36
 POSSIBILITY OF SUCH DAMAGE.
37 37
 -----------------------------------------------------------------------------
38 38
 */
39  
-//#define ERLANG_DEBUG 1
  39
+/* #define ERLANG_DEBUG 1 */
40 40
 
41 41
 /* This module contains erts_pcre_exec(), the externally visible function that does
42 42
 pattern matching using an NFA algorithm, trying to mimic Perl as closely as

0 notes on commit 209f609

Please sign in to comment.
Something went wrong with that request. Please try again.