Subversion Repositories Kolibri OS

Rev

Rev 4874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4874 Rev 4921
Line 62... Line 62...
62
}
62
}
Line 63... Line 63...
63
 
63
 
64
int
64
int
65
_DEFUN (hexnan, (sp, fpi, x0),
65
_DEFUN (hexnan, (sp, fpi, x0),
66
	_CONST char **sp _AND
66
	_CONST char **sp _AND
67
	FPI *fpi _AND
67
	_CONST FPI *fpi _AND
68
	__ULong *x0)
68
	__ULong *x0)
69
{
69
{
70
	__ULong c, h, *x, *x1, *xe;
70
	__ULong c, h, *x, *x1, *xe;
71
	_CONST char *s;
71
	_CONST char *s;
Line 72... Line -...
72
	int havedig, hd0, i, nbits;
-
 
73
 
-
 
74
	if (!hexdig['0'])
72
	int havedig, hd0, i, nbits;
75
		hexdig_init();
73
 
76
	nbits = fpi->nbits;
74
	nbits = fpi->nbits;
77
	x = x0 + (nbits >> kshift);
75
	x = x0 + (nbits >> kshift);
78
	if (nbits & kmask)
76
	if (nbits & kmask)
79
		x++;
77
		x++;
80
	*--x = 0;
78
	*--x = 0;
81
	x1 = xe = x;
79
	x1 = xe = x;
82
	havedig = hd0 = i = 0;
80
	havedig = hd0 = i = 0;
83
	s = *sp;
81
	s = *sp;
84
	while((c = *(_CONST unsigned char*)++s)) {
82
	while((c = *(_CONST unsigned char*)++s)) {
85
		if (!(h = hexdig[c])) {
83
		if (!(h = __get_hexdig(c))) {
86
			if (c <= ' ') {
84
			if (c <= ' ') {
87
				if (hd0 < havedig) {
85
				if (hd0 < havedig) {
88
					if (x < x1 && i < 8)
86
					if (x < x1 && i < 8)