home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / flistfrontend / src / strucpy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-19  |  754 b   |  41 lines

  1. #ifndef    NO_IDENT
  2. static    char    *Id = "$Id: strucpy.c,v 1.3 1995/02/19 02:20:24 tom Exp $";
  3. #endif
  4.  
  5. /*
  6.  * Title:    strucpy.c
  7.  * Author:    Thomas E. Dickey
  8.  * Created:    22 Aug 1983
  9.  * Last update:
  10.  *        18 Feb 1995, prototyped
  11.  *        15 May 1985, use ctype-include
  12.  *        11 Nov 1983
  13.  *
  14.  * Function:    Copy a string, converting it to uppercase.
  15.  *
  16.  * Parameters:    optr -    output string pointer
  17.  *         iptr -    input string pointer
  18.  *
  19.  * Returns:    Pointer to final null in output buffer.
  20.  */
  21.  
  22. #include    <ctype.h>
  23.  
  24. #include    "strutils.h"
  25.  
  26. char *
  27. strucpy (
  28.     char    *optr,            /* => output string        */
  29.     char    *iptr)            /* => input string        */
  30. {
  31.     if (!iptr)    iptr = optr;
  32.  
  33.     while (*iptr)
  34.     {
  35.         *optr++ = _toupper(*iptr);
  36.         iptr++;
  37.     }
  38.     *optr = '\0';            /* Copy a trailing null        */
  39.     return (optr);
  40. }
  41.