home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / c / compilers / Tickle-4.0.sit.hqx / Tickle-4.0 / src / XTCL_echo.c < prev    next >
Text File  |  1993-11-18  |  1KB  |  56 lines

  1. /*
  2. ** This source code was written by Tim Endres
  3. ** Email: time@ice.com.
  4. ** USMail: 8840 Main Street, Whitmore Lake, MI  48189
  5. **
  6. ** Some portions of this application utilize sources
  7. ** that are copyrighted by ICE Engineering, Inc., and
  8. ** ICE Engineering retains all rights to those sources.
  9. **
  10. ** Neither ICE Engineering, Inc., nor Tim Endres, 
  11. ** warrants this source code for any reason, and neither
  12. ** party assumes any responsbility for the use of these
  13. ** sources, libraries, or applications. The user of these
  14. ** sources and binaries assumes all responsbilities for
  15. ** any resulting consequences.
  16. */
  17.  
  18. #include <Types.h>
  19. #include <Resources.h>
  20. #include <QuickDraw.h>
  21. #include <Windows.h>
  22. #include <Memory.h>
  23. #include "tcl.h"
  24. #include "xtcl.h"
  25.  
  26. void
  27. XTCLEntry(argc, argv, xpb)
  28. int            argc;
  29. char        **argv;
  30. XTCLParmBlk    *xpb;
  31. {
  32. char    *ptr, state;
  33. int        i, length, slen;
  34.  
  35.     xpb->result = TCL_OK;
  36.     
  37.     length = GetHandleSize(xpb->resultH);
  38.     
  39.     for (i=1; i < argc; i++)
  40.         slen += strlen(argv[i]) + 1;
  41.  
  42.     SetHandleSize(xpb->resultH, slen+1);
  43.     
  44.     state = HGetState(xpb->resultH);
  45.     HLock(xpb->resultH);
  46.     
  47.     for (ptr=*xpb->resultH, i=1; i < argc; i++) {
  48.         strcat(ptr, argv[i]);
  49.         strcat(ptr, " ");
  50.         ptr += strlen(ptr);
  51.         }
  52.  
  53.     HSetState(xpb->resultH, state);
  54.     }
  55.  
  56.