[PATCH 8/9] types: use llong instead of longlong, ldouble for ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These shortened names are used elsewhere too but the may
reason for the change is to try to make ctype_declare[]
more readable.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 expression.c |  2 +-
 lib.c        |  2 +-
 symbol.c     | 16 ++++++++--------
 target.c     | 10 +++++-----
 target.h     |  6 +++---
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/expression.c b/expression.c
index ffb6cb9dc..e1720f194 100644
--- a/expression.c
+++ b/expression.c
@@ -325,7 +325,7 @@ static void get_number_value(struct expression *expr, struct token *token)
 		size = 2;
 		do_warn |= 1;
 	}
-	bits = bits_in_longlong - 1;
+	bits = bits_in_llong - 1;
 	if (value & (~1ULL << bits))
 		goto Eoverflow;
 	if (!(value & (1ULL << bits)))
diff --git a/lib.c b/lib.c
index fd45da5d1..74a01a83c 100644
--- a/lib.c
+++ b/lib.c
@@ -1443,7 +1443,7 @@ static void predefined_macros(void)
 
 	predefined_sizeof("FLOAT", "", bits_in_float);
 	predefined_sizeof("DOUBLE", "", bits_in_double);
-	predefined_sizeof("LONG_DOUBLE", "", bits_in_longdouble);
+	predefined_sizeof("LONG_DOUBLE", "", bits_in_ldouble);
 
 	predefine("__ORDER_LITTLE_ENDIAN__", 1, "1234");
 	predefine("__ORDER_BIG_ENDIAN__", 1, "4321");
diff --git a/symbol.c b/symbol.c
index 90149e5ae..a7cbe08b4 100644
--- a/symbol.c
+++ b/symbol.c
@@ -759,21 +759,21 @@ static const struct ctype_declare {
 	{ &long_ctype,	    SYM_BASETYPE, MOD_SIGNED | MOD_LONG,    &bits_in_long,	     &max_int_alignment, &int_type },
 	{ &slong_ctype,	    SYM_BASETYPE, MOD_ESIGNED | MOD_LONG,   &bits_in_long,	     &max_int_alignment, &int_type },
 	{ &ulong_ctype,	    SYM_BASETYPE, MOD_UNSIGNED | MOD_LONG,  &bits_in_long,	     &max_int_alignment, &int_type },
-	{ &llong_ctype,	    SYM_BASETYPE, MOD_SIGNED | MOD_LL,	    &bits_in_longlong,       &max_int_alignment, &int_type },
-	{ &sllong_ctype,    SYM_BASETYPE, MOD_ESIGNED | MOD_LL,	    &bits_in_longlong,       &max_int_alignment, &int_type },
-	{ &ullong_ctype,    SYM_BASETYPE, MOD_UNSIGNED | MOD_LL,    &bits_in_longlong,       &max_int_alignment, &int_type },
-	{ &lllong_ctype,    SYM_BASETYPE, MOD_SIGNED | MOD_LLL,	    &bits_in_longlonglong,   &max_int_alignment, &int_type },
-	{ &slllong_ctype,   SYM_BASETYPE, MOD_ESIGNED | MOD_LLL,    &bits_in_longlonglong,   &max_int_alignment, &int_type },
-	{ &ulllong_ctype,   SYM_BASETYPE, MOD_UNSIGNED | MOD_LLL,   &bits_in_longlonglong,   &max_int_alignment, &int_type },
+	{ &llong_ctype,	    SYM_BASETYPE, MOD_SIGNED | MOD_LL,	    &bits_in_llong,       &max_int_alignment, &int_type },
+	{ &sllong_ctype,    SYM_BASETYPE, MOD_ESIGNED | MOD_LL,	    &bits_in_llong,       &max_int_alignment, &int_type },
+	{ &ullong_ctype,    SYM_BASETYPE, MOD_UNSIGNED | MOD_LL,    &bits_in_llong,       &max_int_alignment, &int_type },
+	{ &lllong_ctype,    SYM_BASETYPE, MOD_SIGNED | MOD_LLL,	    &bits_in_lllong,   &max_int_alignment, &int_type },
+	{ &slllong_ctype,   SYM_BASETYPE, MOD_ESIGNED | MOD_LLL,    &bits_in_lllong,   &max_int_alignment, &int_type },
+	{ &ulllong_ctype,   SYM_BASETYPE, MOD_UNSIGNED | MOD_LLL,   &bits_in_lllong,   &max_int_alignment, &int_type },
 
 	{ &float_ctype,	    SYM_BASETYPE,  0,			    &bits_in_float,          &max_fp_alignment,  &fp_type },
 	{ &double_ctype,    SYM_BASETYPE, MOD_LONG,		    &bits_in_double,         &max_fp_alignment,  &fp_type },
-	{ &ldouble_ctype,   SYM_BASETYPE, MOD_LONG | MOD_LONGLONG,  &bits_in_longdouble,     &max_fp_alignment,  &fp_type },
+	{ &ldouble_ctype,   SYM_BASETYPE, MOD_LONG | MOD_LONGLONG,  &bits_in_ldouble,     &max_fp_alignment,  &fp_type },
 
 	{ &float32_ctype,   SYM_BASETYPE,  0,			    &bits_in_type32,          &max_fp_alignment, &fp_type },
 	{ &float32x_ctype,  SYM_BASETYPE, MOD_LONG,		    &bits_in_double,         &max_fp_alignment,  &fp_type },
 	{ &float64_ctype,   SYM_BASETYPE,  0,			    &bits_in_type64,          &max_fp_alignment, &fp_type },
-	{ &float64x_ctype,  SYM_BASETYPE, MOD_LONG | MOD_LONGLONG,  &bits_in_longdouble,     &max_fp_alignment,  &fp_type },
+	{ &float64x_ctype,  SYM_BASETYPE, MOD_LONG | MOD_LONGLONG,  &bits_in_ldouble,     &max_fp_alignment,  &fp_type },
 	{ &float128_ctype,  SYM_BASETYPE,  0,			    &bits_in_type128,         &max_alignment,    &fp_type },
 
 	{ &string_ctype,    SYM_PTR,	  0,			    &bits_in_pointer,        &pointer_alignment, &char_ctype },
diff --git a/target.c b/target.c
index 90097818f..4ec736258 100644
--- a/target.c
+++ b/target.c
@@ -28,8 +28,8 @@ int bits_in_char = 8;
 int bits_in_short = 16;
 int bits_in_int = 32;
 int bits_in_long = 32;
-int bits_in_longlong = 64;
-int bits_in_longlonglong = 128;
+int bits_in_llong = 64;
+int bits_in_lllong = 128;
 
 int max_int_alignment = 4;
 
@@ -38,7 +38,7 @@ int max_int_alignment = 4;
  */
 int bits_in_float = 32;
 int bits_in_double = 64;
-int bits_in_longdouble = 128;
+int bits_in_ldouble = 128;
 
 int max_fp_alignment = 16;
 
@@ -121,7 +121,7 @@ void init_target(void)
 	case MACH_S390:
 	case MACH_S390X:
 	case MACH_SPARC32:
-		bits_in_longdouble = 64;
+		bits_in_ldouble = 64;
 		max_fp_alignment = 8;
 		break;
 	case MACH_X86_64:
@@ -130,7 +130,7 @@ void init_target(void)
 		/* fall through */
 	case MACH_I386:
 	case MACH_M68K:
-		bits_in_longdouble = 96;
+		bits_in_ldouble = 96;
 		max_fp_alignment = 4;
 		break;
 	default:
diff --git a/target.h b/target.h
index 8bbe494f8..36e7610a0 100644
--- a/target.h
+++ b/target.h
@@ -25,8 +25,8 @@ extern int bits_in_char;
 extern int bits_in_short;
 extern int bits_in_int;
 extern int bits_in_long;
-extern int bits_in_longlong;
-extern int bits_in_longlonglong;
+extern int bits_in_llong;
+extern int bits_in_lllong;
 
 extern int max_int_alignment;
 
@@ -35,7 +35,7 @@ extern int max_int_alignment;
  */
 extern int bits_in_float;
 extern int bits_in_double;
-extern int bits_in_longdouble;
+extern int bits_in_ldouble;
 
 extern int max_fp_alignment;
 
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux