Last active
May 22, 2020 23:36
-
-
Save FedorLap2006/7d1a6b83c4cb0f1a76593788bf5cd25e to your computer and use it in GitHub Desktop.
Pascal stdlib implementation for c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cpastd.h" | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
#ifdef __cplusplus | |
} | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _CPASTD_H_ | |
#define _CPASTD_H_ | |
#ifdef __cplusplus | |
extern "C" { | |
#endif // C++ safe guard | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#define PasL(NAME) Pas_##NAME // Pseudo namespace | |
typedef char PasL(String)[255]; | |
typedef char* PasL(Text); | |
typedef char PasL(string); | |
typedef char* PasL(pstring); | |
typedef int PasL(Integer); | |
typedef float PasL(Float); | |
PasL(pstring) PasL(ReadF)(PasL(String) F); | |
PasL(pstring) PasL(Read)(PasL(Text) fmt, ...); | |
PasL(pstring) PasL(ReadlnF)(PasL(pstring) F); | |
PasL(pstring) PasL(Readln)(PasL(Text) fmt, ...); | |
PasL(String) PasL(Copy)(PasL(String) s, PasL(Integer) index, PasL(Integer) count); | |
#undef PasL | |
#ifdef __cplusplus | |
} | |
#endif // C++ safe guard | |
#endif // Include guard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment