MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
C4P.h File Reference

Pascalish run-time support. More...

#include <miktex/C4P/config.h>
#include <cctype>
#include <climits>
#include <cmath>
#include <csignal>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <memory>
#include <string>
#include <vector>
#include <miktex/App/Application>
#include <miktex/Core/File>
#include <miktex/Core/IntegerTypes>
#include <miktex/Core/Session>
#include <miktex/Util/StringUtil>
#include <miktex/Util/inliners.h>
Include dependency graph for C4P.h:

Go to the source code of this file.

Classes

struct  C4P::FileRoot
struct  C4P::BufferedFile< T >
struct  C4P::C4P_text

Namespaces

namespace  C4P
 The "C/C++ for Pascal" namespace.

Macros

#define C4P_FILE_STRUCT(Bt)
#define c4pargc   GetArgC()
#define c4pargv   GetArgV()
#define c4ppline   GetCmdLine()
#define c4pplen   strlen(GetCmdLine())
#define input   (*(GetStdFilePtr(0)))
#define output   (*(GetStdFilePtr(1)))
#define c4perroroutput   (*(GetStdFilePtr(2)))
#define C4P_BEGIN_PROGRAM(programName, argc, argv)
#define C4P_END_PROGRAM()
#define c4pbegintryblock(n)
#define c4pendtryblock(n)
#define c4pthrow(n)
#define C4P_FOR_BEGIN(var, startval, relop, lastval)
#define C4P_FOR_END(var, op)
#define C4P_PROC_ENTRY(handle)
#define C4P_PROC_EXIT(handle)
#define C4P_READ_BEGIN()
#define C4P_READLN_BEGIN()
#define C4P_READ_END(f)
#define C4P_READLN_END(f)
#define C4P_WRITE_BEGIN()
#define C4P_WRITELN_BEGIN()
#define C4P_WRITE_END(f)
#define C4P_WRITELN_END(f)
#define c4parrcpy(dst, src)
#define c4pbreakloop()
#define c4pday   GetDay()
#define c4phour   GetHour()
#define c4pminute   GetMinute()
#define c4pmonth   GetMonth()
#define c4psecond   GetSecond()
#define c4pyear   GetYear()

Typedefs

typedef MIKTEX_INT16 C4P::C4P_signed16
typedef MIKTEX_INT32 C4P::C4P_signed32
typedef MIKTEX_INT64 C4P::C4P_signed64
typedef MIKTEX_INT8 C4P::C4P_signed8
typedef MIKTEX_UINT16 C4P::C4P_unsigned16
typedef MIKTEX_UINT32 C4P::C4P_unsigned32
typedef MIKTEX_UINT64 C4P::C4P_unsigned64
typedef MIKTEX_UINT8 C4P::C4P_unsigned8
typedef int C4P::C4P_integer
typedef MIKTEX_INT64 C4P::C4P_longinteger
typedef float C4P::C4P_real
typedef double C4P::C4P_longreal
typedef bool C4P::C4P_boolean

Functions

class C4P::C4PTYPEAPI (ProgramBase)
C4P_integer C4P::Round (double r)

Detailed Description

Pascalish run-time support.

Author
Christian Schenk

This file is part of the MiKTeX TeXMF Framework.

The MiKTeX TeXMF Framework is licensed under GNU General Public License version 2 or any later version.

Macro Definition Documentation

◆ C4P_BEGIN_PROGRAM

#define C4P_BEGIN_PROGRAM ( programName,
argc,
argv )
Value:
{ \
int c4p_retcode = 0; \
try \
{ \
this->Initialize(programName, argc, argv);

◆ C4P_END_PROGRAM

#define C4P_END_PROGRAM ( )
Value:
this->Finish(); \
} \
catch(int retcode) \
{ \
c4p_retcode = retcode; \
} \
return c4p_retcode; \
}

◆ C4P_FILE_STRUCT

#define C4P_FILE_STRUCT ( Bt)
Value:

◆ C4P_FOR_BEGIN

#define C4P_FOR_BEGIN ( var,
startval,
relop,
lastval )
Value:
{ \
int c4p_temp = (lastval); \
if ((var = (startval)) relop c4p_temp) \
{ \
do \
{

◆ C4P_FOR_END

#define C4P_FOR_END ( var,
op )
Value:
} \
while (var op != c4p_temp); \
} \
}

◆ C4P_PROC_ENTRY

#define C4P_PROC_ENTRY ( handle)
Value:
c4p_proc_entry<handle>();

◆ C4P_PROC_EXIT

#define C4P_PROC_EXIT ( handle)
Value:
C4P_LABEL_PROC_EXIT: c4p_proc_exit<handle>();

◆ C4P_READ_BEGIN

#define C4P_READ_BEGIN ( )
Value:
{

◆ C4P_READ_END

#define C4P_READ_END ( f)
Value:
}

◆ C4P_READLN_BEGIN

#define C4P_READLN_BEGIN ( )
Value:
C4P_READ_BEGIN()

◆ C4P_READLN_END

#define C4P_READLN_END ( f)
Value:
f.DiscardLine(); }

◆ C4P_WRITE_BEGIN

#define C4P_WRITE_BEGIN ( )
Value:
{

◆ C4P_WRITE_END

#define C4P_WRITE_END ( f)
Value:
}

◆ C4P_WRITELN_BEGIN

#define C4P_WRITELN_BEGIN ( )
Value:
C4P_WRITE_BEGIN()

◆ C4P_WRITELN_END

#define C4P_WRITELN_END ( f)
Value:
putc('\n', f); }

◆ c4parrcpy

#define c4parrcpy ( dst,
src )
Value:
c4pmemcpy(dst, sizeof(dst), src, sizeof(dst))

◆ c4pbegintryblock

#define c4pbegintryblock ( n)
Value:
try \
{

◆ c4pbreakloop

#define c4pbreakloop ( )
Value:
break

◆ c4pendtryblock

#define c4pendtryblock ( n)
Value:
; \
} \
catch (const C4P::Exception##n&) \
{ \
}

◆ c4pthrow

#define c4pthrow ( n)
Value:
throw C4P::Exception##n()