home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / kludge03.tz / kludge03 / mk74 / user / libmach / strcat.c < prev    next >
Text File  |  1991-05-15  |  3KB  |  78 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    strcat.c,v $
  29.  * Revision 2.3  91/05/14  17:55:02  mrt
  30.  *     Correcting copyright
  31.  * 
  32.  * Revision 2.2  91/02/14  14:18:47  mrt
  33.  *     Added new Mach copyright
  34.  *     [91/02/13  12:44:57  mrt]
  35.  * 
  36.  */
  37.  
  38. /*-
  39.  * Copyright (c) 1990 The Regents of the University of California.
  40.  * All rights reserved.
  41.  *
  42.  * Redistribution and use in source and binary forms are permitted provided
  43.  * that: (1) source distributions retain this entire copyright notice and
  44.  * comment, and (2) distributions including binaries display the following
  45.  * acknowledgement:  ``This product includes software developed by the
  46.  * University of California, Berkeley and its contributors'' in the
  47.  * documentation or other materials provided with the distribution and in
  48.  * all advertising materials mentioning features or use of this software.
  49.  * Neither the name of the University nor the names of its contributors may
  50.  * be used to endorse or promote products derived from this software without
  51.  * specific prior written permission.
  52.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  53.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  54.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  55.  *
  56.  *    @(#)string.h    5.4 (Berkeley) 5/29/90
  57.  */
  58.  
  59. /*
  60.  * Concatenate s2 on the end of s1.  S1's space must be large enough.
  61.  * Return s1.
  62.  */
  63.  
  64. char *
  65. strcat(s1, s2)
  66. register char *s1, *s2;
  67. {
  68.     register char *os1;
  69.  
  70.     os1 = s1;
  71.     while (*s1++)
  72.         ;
  73.     --s1;
  74.     while (*s1++ = *s2++)
  75.         ;
  76.     return(os1);
  77. }
  78.