home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
base32pr.zip
/
B32demoprof.zip
/
dlldemo.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-29
|
1KB
|
61 lines
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "extern.h"
EXPAR* EXPORT Testp1( const EXPAR* p1 )
{
if ( p1->type == NUMERIC_PTYPE )
{
static EXPAR res ;
res.type = NUMERIC_PTYPE ;
res.numeric = p1->numeric * p1->numeric ;
return &res ;
}
return ( EXPAR* ) NULL ;
}
EXPAR* EXPORT Testp2( const EXPAR* p1 , const EXPAR* p2 )
{
if ( p1->type == NUMERIC_PTYPE && p2->type == NUMERIC_PTYPE )
{
static EXPAR res ;
res.type = NUMERIC_PTYPE ;
res.numeric = p1->numeric * p2->numeric ;
return &res ;
}
return ( EXPAR* ) NULL ;
}
EXPAR* EXPORT Testp3( const EXPAR* p1 , const EXPAR* p2 , const EXPAR* p3 )
{
if ( p1->type == CHAR_PTYPE &&
p2->type == CHAR_PTYPE &&
p3->type == CHAR_PTYPE )
{
static EXPAR res ;
static char str[255] ;
strcpy( str , p1->string.ptr ) ;
strcat( str , p2->string.ptr ) ;
strcat( str , p3->string.ptr ) ;
res.type = CHAR_PTYPE ;
res.string.ptr = str ;
res.string.len = strlen( str ) ;
return &res ;
}
return ( EXPAR* ) NULL ;
}
EXPAR* EXPORT Testp4( const EXPAR* p1 , const EXPAR* p2 , const EXPAR* p3 , const EXPAR* p4 )
{
return ( EXPAR* ) NULL ;
}