FDK/Tools/Programs/makeotf/source/cb.c
/* [hot callback] Refill data buffer from file. ALways read just one line. */
[hot callback] Refill data buffer from file. ALways read just one line.
[ hot callback ] Refill data buffer from file . ALways read just one line .
static char *uvsGetLine(void *ctx,  char * buffer, long *count)
	{
	cbCtx h = ctx;
	char * buff; 
	buff =  fgets( buffer, 255, h->uvs.file.fp);
	if (buff == NULL)
		*count = 0;
	else
		*count = strlen(buff);
	if  (*count>= 254)
		{
		char * p;
		p = strchr(buffer, '\n');
		if (p == NULL)
			p = strchr(buffer, '\r');
		if 	(p != NULL)
			*p = '\0';
		else
			buff[64] = 0;
		cbFatal(h, "Line in Unicode Variation Sequence does not end in a new-line.\n\tPlease check if the file type is correct. Line content:\n\t%s\n",  buffer);
		}
	return (buff == NULL) ? NULL : buffer;
	}
static char * uvsGetLine ( void * ctx , char * buffer , long * count ) { cbCtx h = ctx ; char * buff ; buff = fgets ( buffer , 255 , h -> uvs . file . fp ) ; if ( buff == NULL ) * count = 0 ; else * count = strlen ( buff ) ; if ( * count >= 254 ) { char * p ; p = strchr ( buffer , ' \n ' ) ; if ( p == NULL ) p = strchr ( buffer , ' \r ' ) ; if ( p != NULL ) * p = ' \0 ' ; else buff [ 64 ] = 0 ; cbFatal ( h , " \n \t \n \t \n " , buffer ) ; } return ( buff == NULL ) ? NULL : buffer ; }
[hot callback] Refill data buffer from file.
[ hot callback ] Refill data buffer from file .
/* before echoing this line, look to see where the next new-line in any form is, and terminate the string there.*/