Download Appendix 2 Alecsis standard libraries
Transcript
Appendix 2. Alecsis standard libraries
* about parameters for functions listed below.
*
*/
#ifndef _ALEC_INCLUDED
# define _ALEC_INCLUDED
#
#
#
ifndef NULL
define NULL (0)
endif /* NULL */
#
#
#
ifndef EOF
define EOF (-1)
endif /* EOF */
# ifndef MAX
# define MAX(_x, _y) ((_x)>(_y) ? (_x) : (_y))
# endif /* MAX */
# ifndef MIN
# define MIN(_x, _y) ((_x)<(_y) ? (_x) : (_y))
# endif /* MIN */
# define cout stdout
# define cin stdin
# define cerr stderr
typedef struct {
int __cnt;
char *__ptr;
char *__base;
int __flag;
char __file;
} FILE;
/* standard built-in function prototypes */
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
int printf(const char *, ... );
int fprintf(FILE *, const char *, ...);
int sprintf(char *, const char *, ...);
int fputc(char, FILE *);
int putc(char, FILE *);
int putchar(char);
char fgetc(FILE *);
char getc(FILE *);
char *gets(char *);
char *fgets(char *, int, FILE*);
char getchar(void);
int exit(int=0);
FILE *fopen(const char *, const char *);
int fclose(FILE *);
int fflush(FILE *);
int feof(FILE *);
int fseek(FILE *, int, int);
int ftell(FILE *);
int rewind(FILE *);
int fwrite(const void *, int, int, FILE *);
int fread(void *, int, int, FILE *);
void *calloc(int, int);
void *malloc(int);
void free(void *);
double node_value(int, int);
double drand(void);
void srand(int=1);
163