home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / base32pr.zip / B32demoprof.zip / dlldemo.cpp < prev    next >
C/C++ Source or Header  |  1995-10-29  |  1KB  |  61 lines

  1. #include <stdarg.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5.  
  6. #include "extern.h"
  7.  
  8.  
  9. EXPAR* EXPORT Testp1( const EXPAR* p1  )
  10. {
  11.    if ( p1->type == NUMERIC_PTYPE ) 
  12.    {
  13.       static EXPAR res ;
  14.       res.type = NUMERIC_PTYPE ;
  15.       res.numeric = p1->numeric * p1->numeric ;
  16.       return &res ;
  17.    }
  18.    return ( EXPAR* ) NULL ;
  19. }
  20.  
  21. EXPAR* EXPORT Testp2( const EXPAR* p1 , const EXPAR* p2 )
  22. {
  23.    if ( p1->type == NUMERIC_PTYPE && p2->type == NUMERIC_PTYPE ) 
  24.    {
  25.       static EXPAR res ;
  26.       res.type = NUMERIC_PTYPE ;
  27.       res.numeric = p1->numeric * p2->numeric ;
  28.       return &res ;
  29.    }
  30.    return ( EXPAR* ) NULL ;
  31. }
  32.  
  33. EXPAR* EXPORT Testp3( const EXPAR* p1 , const EXPAR* p2 , const EXPAR* p3 )
  34. {
  35.     
  36.    if ( p1->type == CHAR_PTYPE && 
  37.         p2->type == CHAR_PTYPE && 
  38.         p3->type == CHAR_PTYPE ) 
  39.    {
  40.       static EXPAR res ;
  41.       static char str[255] ;
  42.       strcpy( str , p1->string.ptr ) ;
  43.       strcat( str , p2->string.ptr ) ;
  44.       strcat( str , p3->string.ptr ) ;
  45.       res.type = CHAR_PTYPE ;
  46.       res.string.ptr = str ;
  47.       res.string.len = strlen( str ) ;
  48.       return &res ;
  49.    }
  50.  
  51.    return ( EXPAR* ) NULL ;
  52. }
  53.  
  54. EXPAR* EXPORT Testp4( const EXPAR* p1 , const EXPAR* p2 , const EXPAR* p3 , const EXPAR* p4 )
  55. {
  56.    return ( EXPAR* ) NULL ;
  57. }
  58.  
  59.  
  60.  
  61.