home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l196 / 3.ddi / MXSHKC.C$$ < prev    next >
Encoding:
Text File  |  1990-06-24  |  897 b   |  31 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. /* Function Prototypes force either correct data typing or compiler warnings.
  5.  * Note all functions exported to BASIC and all BASIC callback (extern)
  6.  * functions are declared with the far pascal calling convention.
  7.  * IMPORTANT: This must be compiled with the Medium memory model (/AM)
  8.  */
  9. void far pascal shakespeare( void );
  10. extern void far pascal addstring( char  ** s1, int * s1len,
  11.                     char ** s2, int * s2len,
  12.                     char ** s3, int * s3len );
  13.  
  14. void far pascal shakespeare( void )
  15. {
  16.     char * s1 = "To be or not to be;";
  17.     int  s1len;
  18.     char * s2 = " that is the question.";
  19.     int  s2len;
  20.     char s3[100];
  21.     int  s3len;
  22.     char * s3add = s3;
  23.  
  24.     s1len = strlen( s1 );
  25.     s2len = strlen( s2 );
  26.     addstring( &s1, &s1len, &s2, &s2len, &s3add, &s3len );
  27.  
  28.     s3[s3len] = '\0';
  29.     printf("\n%s", s3 );
  30. }
  31.