home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TASMSWAN.ZIP / CFILLSTR.C < prev    next >
Text File  |  1989-07-17  |  671b  |  29 lines

  1. /******************************************************************
  2. cfillstr.c
  3.     tests CFILL external module
  4.        NOTE: you must use the TCC comand-line compiler for this.
  5.           See book.
  6. ********/
  7.  
  8. #include <stdio.h>
  9.  
  10. extern void fillstring(unsigned char far * thestring, int stringlength, char fillchar);
  11.  
  12. char *test = "Filled to the brim";
  13.  
  14. main()
  15. {
  16.     printf("Before fillstring: %s\n", test);
  17.     fillstring(test, strlen(test), '@' );
  18.     printf("After fillstring:   %s\n", test);
  19. }
  20. /****
  21. void fillstring(unsigned char far * thestring, int stringlength, char fillchar)
  22. {
  23.     int    i;
  24.  
  25.     for (i=0; i < stringlength; i++)
  26.         thestring[i] = fillchr;
  27. }
  28. ******/
  29.