home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Tetris Light 1.0.3 / source / pstring.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-07  |  1.6 KB  |  46 lines  |  [TEXT/CWIE]

  1. /* ----------------------------------------------------------------------
  2. File: pstring.c
  3.  
  4. Purpose:    This module contains implementations of the familar string
  5.             manipulation routines from the standard C libraries, but
  6.             written to operate on Pascal strings.
  7.             
  8. Tetris Light - a simple implementation of a Tetris game
  9. Copyright © 1993-1996 Hoylen Sue
  10.  
  11. Updated for CW9 by Paul Celestin
  12. Questions about this version should go to me at celestin@celestin.com
  13.  
  14. This program is free software; you can redistribute it and/or modify
  15. it under the terms of the GNU General Public License as published by
  16. the Free Software Foundation; either version 2 of the License, or
  17. (at your option) any later version.
  18.  
  19. This program is distributed in the hope that it will be useful,
  20. but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. GNU General Public License for more details.
  23.  
  24. You should have received a copy of the GNU General Public License
  25. along with this program; see the file COPYING.  If not, write to the
  26. Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  27. ---------------------------------------------------------------------- */
  28.  
  29. #include "local.h"
  30. #include "pstring.h"
  31.  
  32. /*--------------------------------------------------------------------*/
  33.  
  34. void pstrcpy(Str255 dest, const Str255 src)
  35. /* Copies the Pascal string from `src' to `dest'.  It is assumed that
  36.    there is enough space in `dest' to hold the string. */
  37. {
  38.     register short count = src[0];
  39.     
  40.     do {
  41.         *(dest++) = *(src++);
  42.     } while (count-- > 0);
  43. }
  44.  
  45. /*--------------------------------------------------------------------*/
  46.