mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* This is not a proper strtod() implementation, but sufficient for Python.
 | 
						|
   Python won't detect floating point constant overflow, though. */
 | 
						|
 | 
						|
#include <string.h>
 | 
						|
 | 
						|
extern double atof();
 | 
						|
 | 
						|
/*ARGSUSED*/
 | 
						|
double
 | 
						|
strtod(p, pp)
 | 
						|
	char *p;
 | 
						|
	char **pp;
 | 
						|
{
 | 
						|
	if (pp)
 | 
						|
		*pp = strchr(p, '\0');
 | 
						|
	return atof(p);
 | 
						|
}
 |