/***** * * Michael Riff * Object software version 1.0 Okto 2013. * * Header file for the redefined stndard IO unix routines to use the * lower part of a MacOS window as a console. * * Version 1.1: 04 Feb 2014 * Renamed InitStdLib *****/ #ifndef UX_STD_DEFS #include #include #include #define UX_STD_DEFS typedef unsigned long size_t; Ptr malloc(size_t taille); void free(void *ptr); Ptr calloc(size_t typeSize, size_t num); void memcpy(void* to, const void* from, size_t size); typedef struct { FSSpec spec; short fRefNum; short vRefNum; } FILE; FILE *fopen(const char *filename, const char *mode); char *fgets(char *s, int n, FILE *stream); void fclose(FILE *file); void InitStdio(WindowPtr port, Point startPos); void SelectConsole(); void DeselectConsole(); void ReleaseConsole(); int printf(const char *format, ...); int sprintf(char *s, const char *format, ...); int scanf(const char*format, ...); int sscanf(const char*s, const char*format, ...); int strlen(const char *s); int strcmp(const char *s1, const char *s2); int strncmp(const char *s1, const char *s2, int n); int strcpy(char *to, char *from); int strncpy(char *to, char *from, int n); char* strcat(char *to, char *from); long atoi(Ptr sValue); long int strtol(const char *str, char **endptr, int base); unsigned long int strtoul(const char *str, char **endptr, int base); void InitStdLib(); double atof(Ptr); double strtod(const char *, char **); #endif