/* **********************************************************************
 * *                                                                    *
 * *  String operations, pointer style                                  *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xsig/pstrops.c
 *
 *                        COPYRIGHT (c) 1999  BY
 *          SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */

#include <stdio.h>
#include <Xm/ToggleB.h>

#include "sigtypes.h"
#include "xsig_lib.h"

char* pstrcat( const char* str1_a, const char* str2_a )
{
  static char snam[80];
  strcpy( snam, str1_a );
  strcat( snam, str2_a );
  return &snam[0];
}

char* pstridx( const char* str1_a, int idx_a )
{
  static char snam[80];
  SINT2       ilen;

  strcpy( snam,str1_a );
  ilen = strlen( snam );
  if ( idx_a < 10 )
    {
      snam[ilen  ] = '0'+ idx_a;
      snam[ilen+1] =  0; 
    }
  else 
    { 
      snam[ilen  ] = '0'+ idx_a/10;      
      snam[ilen+1] = '0'+ idx_a%10;      
      snam[ilen+2] =  0; 
    };
  return &snam[0];
}
