campo-sirio/cb/source/f4true.c
alex af15e0698b Codebase
git-svn-id: svn://10.65.10.50/trunk@4679 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-06-16 13:01:08 +00:00

34 lines
722 B
C
Executable File

/* f4true.c (c)Copyright Sequiter Software Inc., 1988-1996. All rights reserved.
Returns a true or false.
*/
#include "d4all.h"
#ifndef S4UNIX
#ifdef __TURBOC__
#pragma hdrstop
#endif
#endif
#include <ctype.h>
int S4FUNCTION f4true( const FIELD4 *field )
{
char charValue ;
#ifdef S4VBASIC
if ( c4parm_check( (void *)field, 3, E90537 ) )
return -1 ;
#endif
#ifdef E4PARM_HIGH
if ( field == 0 )
return error4( 0, e4parm_null, E90537 ) ;
if ( f4type( field ) != r4log )
error4( field->data->codeBase, e4parm, E81409 ) ;
#endif
charValue = (char) toupper( *f4ptr( field ) ) ;
return ( charValue == 'Y' || charValue == 'T' ) ? 1 : 0 ;
}