/*------------------------->  Sather - configfile  <-------------------------*/
/* Copyright (C) 2000 by K Hopper, University of Waikato, New Zealand        */
/* This file is part of the GNU Sather library. It is free software; you may */
/* redistribute  and/or modify it under the terms of the GNU Library General */
/* Public  License (LGPL)  as published  by the  Free  Software  Foundation; */
/* either version 2 of the license, or (at your option) any later version.   */
/* This  library  is distributed  in the  hope that it will  be  useful, but */
/* WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY */
/* or FITNESS FOR A PARTICULAR PURPOSE. See Doc/LGPL for more details.       */
/* The license text is also available from:  Free Software Foundation, Inc., */
/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     */
/*------------>  Please email comments to <bug-sather@gnu.org>  <------------*/

#ifndef STR_CONFIG
#define STR_CONFIG

#ifdef PP
#undef PP
#endif

#define PP	no_pre,no_post

STR_AGET_CARD:			PP ,reads "@0::[]" "@0::asize" "@0::width", writes "@0::[]" "@0::asize",
				exec "STRAGETCARD($0,$1)",
				f_exec "if(^0&&^1) STRAGETCARD($0,$1) else F_STRAGETCARD($0,$1);";

STR_ASET_CARD_CHAR:		PP ,reads "@0::[]" "@0::asize" "@0::width", writes "@0::[]" "@0::asize",
				exec "STRASETCARDCHAR($0,$1,$2)",
				f_exec "if(^0&&^1) STRASETCARDCHAR($0,$1,2); else F_STRASETCARDCHAR($0,$1);";

--   NOTE All ACOPY macros are hard coded into the compiler. This was needed
--        to achieve higher performance especially for pSather.  It is
--        essential, however, that they are defined here since the compiler
--        needs some of the information provided.

STR_ACOPY_FSTR_CARD:		PP,reads "@0::[]" "@0::asize",writes "@0::[]" "@0::asize",
				exec "STRACOPYNF($0,$1,$2);",
				f_exec "if(^0&&^1) STRACOPYNF($0,$1,$2); else F_STRACOPYNF($0,$1,$2);";
STR_ACOPY_STR_CARD:		PP,reads "@0::[]" "@0::asize",writes "@0::[]" "@0::asize",
				exec "STRACOPYN($0,$1,$2);",
				f_exec "if(^0&&^1) STRACOPYN($0,$1,$2); else F_STRACOPYN($0,$1,$2);";

--   a macro for BINSTR operation.

STR_MEMCMP_STR_CARD:		PP,reads "@0::asize" "@0::loc" "@0::[]",var "@r $$;",
				exec "$$=STRISEQHELPER($0,$1,$2);" "$$",
				f_exec "$$=(^0&&^1)?STRISEQHELPER($0,$1,$2):F_STRISEQHELPER(@0,$0,@1,$1,$2);" "$$";



#endif
