%{
#define
ATSCODEFORMAT "txt"
//
#if(ATSCODEFORMAT == "txt")
//
#include
"utils/atsdoc/HATS/postiatsatxt.hats"
//
#endif // end of [ATSCCODEFORMAT]
//
val
_thisfilename = atext_strcst"strptr.cats"
val ((*void*)) =
theAtextMap_insert_str("thisfilename", _thisfilename)
%}\
\
#atscode_banner_for_C()
#atscode_copyright_GPL_for_C()

#atscode_separator_for_C()

/*
#atscode_author("Hongwei Xi")
#atscode_authoremail("gmhwxiATgmailDOTcom")
#atscode_start_time("March, 2013")
*/

#atscode_separator_for_C()

/*
** Source:
** $PATSHOME/prelude/CATS/CODEGEN/strptr.atxt
** Time of generation: #timestamp()
*/

#atscode_separator_for_C()

\#ifndef ATSLIB_PRELUDE_CATS_STRPTR
\#define ATSLIB_PRELUDE_CATS_STRPTR

#atscode_separator_for_C()
//
// [string.h]
//
extern
int // (sign)
strcmp(const char *x1, const char *x2) ;

#atscode_separator_for_C()

\#define atspre_strptr_null() atsptr_null

#atscode_separator_for_C()

\#define atspre_strptr_free atspre_mfree_gc
\#define atspre_strnptr_free atspre_mfree_gc

#atscode_separator_for_C()

ATSinline()
atstype_int
atspre_compare_strptr_strptr
(
  atstype_strptr x1, atstype_strptr x2
) {
  if(x1==0)
  {
    return (x2==0 ? 0 : -1) ;
  } else {
    return (x2==0 ? 1 : atspre_compare_string_string(x1, x2)) ;
  } // end of [if]
} // end of [atspre_compare_strptr_strptr]

#atscode_separator_for_C()

\#define atspre_eq_strptr_string atspre_eq_string_string 
\#define atspre_neq_strptr_string atspre_neq_string_string 
\#define atspre_compare_strptr_string atspre_compare_string_string 

#atscode_separator_for_C()

\#endif // ifndef ATSLIB_PRELUDE_CATS_STRPTR

#atscode_separator_for_C()

#atscode_eof_strsub_for_C("\#thisfilename$")\

%{
implement
main (argc, argv) = fprint_filsub (stdout_ref, "strptr_atxt.txt")
%}\