fixed the printing issue of a long double value for MINGW32
This commit is contained in:
		| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: extio.c 372 2008-09-23 09:51:24Z baconevi $ | ||||
|  * $Id: extio.c 466 2008-12-09 09:50:40Z baconevi $ | ||||
|  * | ||||
|  * {License} | ||||
|  */ | ||||
| @ -394,6 +394,7 @@ int ase_awk_readextio ( | ||||
| 	return ret; | ||||
| } | ||||
|  | ||||
| #include <ase/utl/stdio.h> | ||||
| int ase_awk_writeextio_val ( | ||||
| 	ase_awk_run_t* run, int out_type,  | ||||
| 	const ase_char_t* name, ase_awk_val_t* v) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: run.c 391 2008-09-27 09:51:23Z baconevi $ | ||||
|  * $Id: run.c 466 2008-12-09 09:50:40Z baconevi $ | ||||
|  * | ||||
|  * {License} | ||||
|  */ | ||||
| @ -6954,7 +6954,7 @@ ase_char_t* ase_awk_format ( | ||||
| 			ase_real_t r; | ||||
| 			ase_char_t* p; | ||||
| 			int n; | ||||
|  | ||||
| 	 | ||||
| 			FMT_CHAR (ASE_T('L')); | ||||
| 			FMT_CHAR (fmt[i]); | ||||
|  | ||||
| @ -6999,7 +6999,12 @@ ase_char_t* ase_awk_format ( | ||||
| 					run->format.tmp.ptr,  | ||||
| 					run->format.tmp.len, | ||||
| 					ASE_STR_PTR(fbu), | ||||
| 					(long double)r); | ||||
| 				#if defined(__MINGW32__) | ||||
| 					(double)r | ||||
| 				#else | ||||
| 					(long double)r | ||||
| 				#endif | ||||
| 				); | ||||
| 					 | ||||
| 				if (n == -1) | ||||
| 				{ | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: tree.c 381 2008-09-24 11:07:24Z baconevi $ | ||||
|  * $Id: tree.c 466 2008-12-09 09:50:40Z baconevi $ | ||||
|  * | ||||
|  * {License} | ||||
|  */ | ||||
| @ -264,7 +264,7 @@ static int print_expression (ase_awk_t* awk, ase_awk_nde_t* nde) | ||||
| 		{ | ||||
| 			if (((ase_awk_nde_real_t*)nde)->str == ASE_NULL) | ||||
| 			{ | ||||
| 			#if (ASE_SIZEOF_LONG_DOUBLE != 0) | ||||
| 			#if (ASE_SIZEOF_LONG_DOUBLE != 0) && !defined(__MINGW32__) | ||||
| 				awk->prmfns->sprintf ( | ||||
| 					awk->prmfns->data, | ||||
| 					awk->tmp.fmt, ASE_COUNTOF(awk->tmp.fmt), ASE_T("%Lf"),  | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: val.c 389 2008-09-26 08:01:24Z baconevi $ | ||||
|  * $Id: val.c 466 2008-12-09 09:50:40Z baconevi $ | ||||
|  * | ||||
|  * {License} | ||||
|  */ | ||||
| @ -1178,8 +1178,13 @@ void ase_awk_dprintval (ase_awk_run_t* run, ase_awk_val_t* val) | ||||
| 			break; | ||||
|  | ||||
| 		case ASE_AWK_VAL_REAL: | ||||
| 		#if defined(__MINGW32__) | ||||
| 			DPRINTF (DCUSTOM, ASE_T("%Lf"),  | ||||
| 				(double)((ase_awk_val_real_t*)val)->val); | ||||
| 		#else | ||||
| 			DPRINTF (DCUSTOM, ASE_T("%Lf"),  | ||||
| 				(long double)((ase_awk_val_real_t*)val)->val); | ||||
| 		#endif | ||||
| 			break; | ||||
|  | ||||
| 		case ASE_AWK_VAL_STR: | ||||
|  | ||||
		Reference in New Issue
	
	Block a user