/*
 *	(c) 1998-99 Sassafras Software Inc.
 *
 *	Basic routines for getting strings out of resources.
 */


/**********************************************************************

  YAAF is Copyright 1997-1999 by William Woody.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions 
  are met:

  Redistributions of source code must retain the above copyright notice, 
  this list of conditions and the following disclaimer.

  Neither the name of the copyright holder or other contributors may
  be used to promote products derived from this software without
  specific written prior permission.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
  SOFTWARE.
  
  Contact:   woody@alumni.caltech.edu
  Web page:  http://www.pandawave.com/yaaf/

**********************************************************************/

#ifndef SS_STRINGUTILS
#define SS_STRINGUTILS

#include <XTypes.h>

#ifdef __cplusplus
extern "C" {
#endif

/************************************************************************/
/*																		*/
/*	Pascal string manipulation											*/
/*																		*/
/************************************************************************/

extern pchar			*cvtc2p(pchar *, const char *);
extern char				*cvtp2c(char *, const pchar *);
extern pchar			*ncvtc2p(pchar *dest, const char *src, uint16 maxlen);
extern char				*ncvtp2c(char *dest, const pchar *src, uint16 maxlen);

extern pchar			*pstrcpy(pchar *, const pchar *);
extern pchar			*pstrcat(pchar *, const pchar *);
extern uint16			pstrcmp(const pchar *, const pchar *);
extern char				*nstrcpy(char *dest, const char *src, uint16 maxlen);
extern char				*nstrcat(char *dest, const char *src, uint16 maxlen);
extern pchar			*npstrcpy(pchar *, const pchar *, uint16 maxlen);
extern pchar			*npstrcat(pchar *, const pchar *, uint16 maxlen);

/************************************************************************/
/*																		*/
/*	String Resource Management											*/
/*																		*/
/************************************************************************/

extern boolean			XGGetAppVersion (char *s, uint16 maxlen);
extern uint16			XGGetResString (short res, char *s, uint16 maxlen);
extern uint16			XGGetIndResString (short res, short ix, char *s, uint16 maxlen);
extern sint16			XGCompareStrings (const char *s1, const char *s2);
extern sint16			XGCompareStringsEx (const char *s1, const char *s2, boolean csens, boolean loose);
extern sint16			XGCompareNumbers (sint32 num1, sint32 num2);
extern void				XGReadableSpaceString (char *buf, uint32 space);

#ifdef __cplusplus
}
#endif

#endif	// SS_STRINGUTILS
