home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 125.img / PRO-C4.ZIP / BENCH1.ZIP / BENCH / REPCHR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-28  |  929 b   |  40 lines

  1. /* ==( bench/repchr.c )== */
  2.  
  3. /* ----------------------------------------------- */
  4. /* Pro-C  Copyright (C) 1988 - 1990 Vestronix Inc. */
  5. /* Modification to this source is not supported    */
  6. /* by Vestronix Inc.                               */
  7. /*            All Rights Reserved                  */
  8. /* ----------------------------------------------- */
  9. /* Written   Geo   1-Sep-87                        */
  10. /* Modified  Geo  11-Dec-89  See comments below    */
  11. /* ----------------------------------------------- */
  12. /* %W%  (%H% %T%) */
  13.  
  14. /*
  15.  *  Modifications
  16.  *
  17.  *  11-Dec-89  Geo - V2 version
  18.  *  25-Oct-89  Geo - 1.32 Merge
  19. */
  20.  
  21. /*  repchr()
  22.  *
  23.  *  Repeat a character N times
  24.  *  - returns a pointer to the NULL terminated string
  25. */
  26. # include <bench.h>
  27.  
  28. char *repchr( ch, n)
  29. char ch;
  30. int n;
  31. {
  32.    static char buf[81];
  33.  
  34.    buf[n] = '\0';
  35.    while( n--)
  36.       buf[n] = ch;
  37.    return(buf);
  38. }
  39.  
  40.