** E-Mail: furukawa@tcp-ip.or.jp
** \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
***********************************************************************/
-/* $Id: nkf.c,v 1.40 2004/11/19 15:18:43 naruse Exp $ */
+/* $Id: nkf.c,v 1.41 2004/11/20 08:14:44 rei_furukawa Exp $ */
#define NKF_VERSION "2.0.4"
#define NKF_RELEASE_DATE "2004-11-15"
#include "config.h"
}
}
-#ifdef PERL_XS
#define STD_GC_BUFSIZE (256)
int std_gc_buf[STD_GC_BUFSIZE];
int std_gc_ndx;
-#endif
int
std_getc(f)
FILE *f;
{
-#ifdef PERL_XS
if (std_gc_ndx){
return std_gc_buf[--std_gc_ndx];
}
-#endif
return getc(f);
}
int c;
FILE *f;
{
-#ifdef PERL_XS
if (std_gc_ndx == STD_GC_BUFSIZE){
return EOF;
}
std_gc_buf[std_gc_ndx++] = c;
return c;
-#endif
- return ungetc(c,f);
}
void