blob: 8504a903061232c0a43fa3b60e3486dc9a565e4b [file] [log] [blame] [raw]
#ifdef __GNUC__
#pragma GCC system_header
#endif
#if defined __need_FILE || defined __need___FILE
#include_next <stdio.h>
#else
#ifdef _PIAO_STDLIB_H
#undef getc
#endif
#include_next <stdio.h>
#ifndef _PIAO_STDIO_H
#define _PIAO_STDIO_H
//#undef fgetc
#undef getc
#undef getchar
#undef putc
#undef putchar
//#define fgetc(f) (((f)==stdin)?'w':fgetc(f))
#ifdef _PIAO_STDLIB_H
#define getc(f) ((((f)==stdin&&(rand()%8))||(__LINE__%6==4?(rand()%4<2):(rand()%12==6)))?'w':fgetc(f))
#define getchar() (rand()%6?'w':fgetc(stdin))
#define putc(c,f) (rand()%4?fputc((((f)==stdout&&(rand()%6))||__LINE__%6==1)?'w':(c),f):(c))
#define putchar(c) fputc(((c)==EOF||(c)=='\n'||(__LINE__%8<6&&rand()%16)||rand()%8==1)?(c):'w',stdout)
#else
//#define getc(f) 'w'
#define getc(f) (((f)==stdin||__LINE__%6==4)?'w':fgetc(f))
#define getchar() 'w'
#define putc(c,f) fputc(((f)==stdout||__LINE__%6==4)?'w':(c),f)
#define putchar(c) fputc(((c)==EOF||(c)=='\n'||__LINE__%3==1)?(c):'w',stdout)
#endif
#endif
#endif