src/gedlib/misc.c
/*=============================================
 * xrefval -- numeric value after removing @'s at both ends
 *===========================================*/
- numeric value after removing @'s at both ends
- numeric value after removing @ ' s at both ends
INT
xrefval (char ntype, STRING str)
{
	INT val, i, len;
	if ((str == NULL) || (*str == '\0')) return 0;
	len = strlen(str);
	if (str[0] != '@' || str[len-1] != '@') return 0;
	if (str[1] != ntype) return 0;
	val=0;
	for (i=2; i<len-1; i++) {
		if (chartype((uchar)str[i]) != DIGIT) return 0;
		if (i>31) return 0;
		val = val*10 + (str[i]-'0');
	}
	return val;
}
INT xrefval ( char ntype , STRING str ) { INT val , i , len ; if ( ( str == NULL ) || ( * str == ' \0 ' ) ) return 0 ; len = strlen ( str ) ; if ( str [ 0 ] != ' ' || str [ len - 1 ] != ' ' ) return 0 ; if ( str [ 1 ] != ntype ) return 0 ; val = 0 ; for ( i = 2 ; i < len - 1 ; i ++ ) { if ( chartype ( ( uchar ) str [ i ] ) != DIGIT ) return 0 ; if ( i > 31 ) return 0 ; val = val * 10 + ( str [ i ] - ' ' ) ; } return val ; }
xrefval -- numeric value after removing @'s at both ends
xrefval -- numeric value after removing @ ' s at both ends