/*
 * $RCSfile: util.c,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: util.c,v $
 * Revision 1.3  1996/01/27 00:13:01  slm
 * Updated copyright and version.
 *
 * Revision 1.2  1995/10/17  15:41:27  slm
 * Moved system prototypes to compose_*.h files.
 *
 * Revision 1.1  1995/07/29  03:08:13  slm
 * Initial revision
 *
 * Revision 1.6  1994/02/05  00:09:43  menze
 *   [ 1994/01/18         davidm ]
 *   System prototype decl. now conditioned on XK_NEEDS_SYSTEM_PROTOTYPES.
 *
 *   [ 1994/01/04          menze ]
 *   Includes global.h
 */

#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "global.h"


char *
xerox(char *str)
{
  char *temp;
  int len;

  assert(str);
  len = strlen(str) + 2;
  temp = (char *) malloc(len);
  strcpy(temp, str);
  return (temp);
}


char *
join(char *str1, char *str2)
{
  char *temp;
  int len;

  if (!str1)
    return (str2);
  if (!str2)
    return (str1);

  len = strlen(str1) + strlen(str2) + 2;
  temp = (char *) malloc(len);
  strcpy(temp, str1);
  strcat(temp, str2);
  return (temp);
}
