Bootmanager in Pascal

Ich habe dir hier mal den Code in C von einen Taschenrechner reingestellt.
Er besteht jedoch im wesentlichen aus vielen Mathematik-Funktionen, etwa so wie bei einem wissenschaftlichen Taschenrechner, und den fprintf- und fscanf-Funktionsfamilien, die aus einer größeren Anzahl von Varianten dieser Grundfunktionen bestehen.

HTML:
Diagnostics <assert.h>

        NDEBUG
        void assert(int expression);

Complex <complex.h>

        complex          imaginary        I
        _Complex_I       _Imaginary_I
        #pragma STDC CX_LIMITED_RANGE on-off-switch
        [ ... ]

Character handling <ctype.h>

        int isalnum(int c);
        int isalpha(int c);
        int iscntrl(int c);
        int isdigit(int c);
        int isgraph(int c);
        int islower(int c);
        int isprint(int c);
        int ispunct(int c);
        int isspace(int c);
        int isupper(int c);
        int isxdigit(int c);
        int tolower(int c);
        int toupper(int c);

Errors <errno.h>

        EDOM         EILSEQ       ERANGE       errno

Floating-point environment <fenv.h>

        fenv_t           FE_OVERFLOW      FE_TOWARDZERO
        fexcept_t        FE_UNDERFLOW     FE_UPWARD
        FE_DIVBYZERO     FE_ALL_EXCEPT    FE_DFL_ENV
        FE_INEXACT       FE_DOWNWARD
        FE_INVALID       FE_TONEAREST
        #pragma STDC FENV_ACCESS on-off-switch
        void feclearexcept(int excepts);
        void fegetexceptflag(fexcept_t *flagp,
                int excepts);
        void feraiseexcept(int excepts);
        void fesetexceptflag(const fexcept_t *flagp, int excepts);
        int fetestexcept(int excepts);
        int fegetround(void);
        int fesetround(int round);
        void fegetenv(fenv_t *envp);
        int feholdexcept(fenv_t *envp);
        void fesetenv(const fenv_t *envp);
        void feupdateenv(const fenv_t *envp);

Characteristics of floating types <float.h>

        [ ... ]

Format conversion of integer types <inttypes.h>

        [ ... ]
        intmax_t strtoimax(const char * restrict nptr,
                char ** restrict endptr, int base);
        uintmax_t strtoumax(const char * restrict nptr,
                char ** restrict endptr, int base);
        intmax_t wcstoimax(const wchar_t * restrict nptr,
                wchar_t ** restrict endptr, int base);
        uintmax_t wcstoumax(const wchar_t * restrict nptr,
                wchar_t ** restrict endptr, int base);

Alternative spellings <iso646.h>

        and          bitor        not_eq       xor
        and_eq       compl        or           xor_eq
        bitand       not          or_eq

Sizes of integer types <limits.h>

        CHAR_BIT     CHAR_MAX     INT_MIN      ULONG_MAX
        SCHAR_MIN    MB_LEN_MAX   INT_MAX      LLONG_MIN
        SCHAR_MAX    SHRT_MIN     UINT_MAX     LLONG_MAX
        UCHAR_MAX    SHRT_MAX     LONG_MIN     ULLONG_MAX
        CHAR_MIN     USHRT_MAX    LONG_MAX

Localization <locale.h>

        struct lconv LC_ALL       LC_CTYPE     LC_NUMERIC
        NULL         LC_COLLATE   LC_MONETARY  LC_TIME
        char *setlocale(int category, const char *locale);
        struct lconv *localeconv(void);

Mathematics <math.h>

        float_t      INFINITY     FP_SUBNORMAL FP_ILOGB0
        double_t     NAN          FP_ZERO      FP_ILOGBNAN
        HUGE_VAL     FP_INFINITE  FP_FAST_FMA
        HUGE_VALF    FP_NAN       FP_FAST_FMAF
        HUGE_VALL    FP_NORMAL    FP_FAST_FMAL
        #pragma STDC FP_CONTRACT on-off-switch
        int fpclassify(real-floating x);
        int isfinite(real-floating x);
        int isinf(real-floating x);
        int isnan(real-floating x);
        int isnormal(real-floating x);
        int signbit(real-floating x);
        double acos(double x);
        float acosf(float x);
        long double acosl(long double x);
        double asin(double x);
        float asinf(float x);
        long double asinl(long double x);
        double atan(double x);
        float atanf(float x);
        long double atanl(long double x);
        double atan2(double y, double x);
        float atan2f(float y, float x);
        long double atan2l(long double y, long double x);
        double cos(double x);
        float cosf(float x);
        long double cosl(long double x);
        double sin(double x);
        float sinf(float x);
        long double sinl(long double x);
        double tan(double x);
        float tanf(float x);
        long double tanl(long double x);
        double acosh(double x);
        float acoshf(float x);
        long double acoshl(long double x);
        double asinh(double x);
        float asinhf(float x);
        long double asinhl(long double x);
        double atanh(double x);
        float atanhf(float x);
        long double atanhl(long double x);
        double cosh(double x);
        float coshf(float x);
        long double coshl(long double x);
        double sinh(double x);
        float sinhf(float x);
        long double sinhl(long double x);
        double tanh(double x);
        float tanhf(float x);
        long double tanhl(long double x);
        double exp(double x);
        float expf(float x);
        long double expl(long double x);
        double exp2(double x);
        float exp2f(float x);
        long double exp2l(long double x);
        double expm1(double x);
        float expm1f(float x);
        long double expm1l(long double x);
        double frexp(double value, int *exp);
        float frexpf(float value, int *exp);
        long double frexpl(long double value, int *exp);
        int ilogb(double x);
        int ilogbf(float x);
        int ilogbl(long double x);
        double ldexp(double x, int exp);
        float ldexpf(float x, int exp);
        long double ldexpl(long double x, int exp);
        double log(double x);
        float logf(float x);
        long double logl(long double x);
        double log10(double x);
        float log10f(float x);
        long double log10l(long double x);
        double log1p(double x);
        float log1pf(float x);
        long double log1pl(long double x);
        double log2(double x);
        float log2f(float x);
        long double log2l(long double x);
        double logb(double x);
        float logbf(float x);
        long double logbl(long double x);
        double modf(double value, double *iptr);
        float modff(float value, float *iptr);
        long double modfl(long double value, long double *iptr);
        double scalbn(double x, int n);
        float scalbnf(float x, int n);
        long double scalbnl(long double x, int n);
        double scalbln(double x, long int n);
        float scalblnf(float x, long int n);
        long double scalblnl(long double x, long int n);
        double cbrt(double x);
        float cbrtf(float x);
        long double cbrtl(long double x);
        double fabs(double x);
        float fabsf(float x);
        long double fabsl(long double x);
        double hypot(double x, double y);
        float hypotf(float x, float y);
        long double hypotl(long double x, long double y);
        double pow(double x, double y);
        float powf(float x, float y);
        long double powl(long double x, long double y);
        double sqrt(double x);
        float sqrtf(float x);
        long double sqrtl(long double x);
        double erf(double x);
        float erff(float x);
        long double erfl(long double x);
        double erfc(double x);
        float erfcf(float x);
        long double erfcl(long double x);
        double lgamma(double x);
        float lgammaf(float x);
        long double lgammal(long double x);
        double tgamma(double x);
        float tgammaf(float x);
        long double tgammal(long double x);
        double ceil(double x);
        float ceilf(float x);
        long double ceill(long double x);
        double floor(double x);
        float floorf(float x);
        long double floorl(long double x);
        double nearbyint(double x);
        float nearbyintf(float x);
        long double nearbyintl(long double x);
        double rint(double x);
        float rintf(float x);
        long double rintl(long double x);
        long int lrint(double x);
        long int lrintf(float x);
        long int lrintl(long double x);
        long long int llrint(double x);
        long long int llrintf(float x);
        long long int llrintl(long double x);
        double round(double x);
        float roundf(float x);
        long double roundl(long double x);
        long int lround(double x);
        long int lroundf(float x);
        long int lroundl(long double x);
        long long int llround(double x);
        long long int llroundf(float x);
        long long int llroundl(long double x);
        double trunc(double x);
        float truncf(float x);
        long double truncl(long double x);
        double fmod(double x, double y);
        float fmodf(float x, float y);
        long double fmodl(long double x, long double y);
        double remainder(double x, double y);
        float remainderf(float x, float y);
        long double remainderl(long double x, long double y);
        double remquo(double x, double y, int *quo);
        float remquof(float x, float y, int *quo);
        long double remquol(long double x, long double y,
                int *quo);
        double copysign(double x, double y);
        float copysignf(float x, float y);
        long double copysignl(long double x, long double y);
        double nan(const char *tagp);
        float nanf(const char *tagp);
        long double nanl(const char *tagp);
        double nextafter(double x, double y);
        float nextafterf(float x, float y);
        long double nextafterl(long double x, long double y);
        double nextafterx(double x, long double y);
        float nextafterxf(float x, long double y);
        long double nextafterxl(long double x, long double y);
        double fdim(double x, double y);
        float fdimf(float x, float y);
        long double fdiml(long double x, long double y);
        double fmax(double x, double y);
        float fmaxf(float x, float y);
        long double fmaxl(long double x, long double y);
        double fmin(double x, double y);
        float fminf(float x, float y);
        long double fminl(long double x, long double y);
        double fma(double x, double y, double z);
        float fmaf(float x, float y, float z);
        long double fmal(long double x, long double y,
                long double z);
        int isgreater(real-floating x, real-floating y);
        int isgreaterequal(real-floating x, real-floating y);
        int isless(real-floating x, real-floating y);
        int islessequal(real-floating x, real-floating y);
        int islessgreater(real-floating x, real-floating y);
        int isunordered(real-floating x, real-floating y);

Nonlocal jumps <setjmp.h>

        jmp_buf
        int setjmp(jmp_buf env);
        void longjmp(jmp_buf env, int val);

Signal handling <signal.h>

        sig_atomic_t SIG_IGN      SIGILL       SIGTERM
        SIG_DFL      SIGABRT      SIGINT
        SIG_ERR      SIGFPE       SIGSEGV
        void (*signal(int sig, void (*func)(int)))(int);
        int raise(int sig);

Variable arguments <stdarg.h>

        va_list
        type va_arg(va_list ap, type);
        void va_copy(va_list dest, va_list src);
        void va_end(va_list ap);
        void va_start(va_list ap, parmN);

Boolean type and values <stdbool.h>

        bool
        true
        false
        __bool_true_false_are_defined

Common definitions <stddef.h>

        ptrdiff_t    size_t       wchar_t      NULL
        offsetof(type, member-designator)

Integer types <stdint.h>

        int8_t           INT32_MIN        UINT_FAST8_MAX
        int16_t          INT64_MIN        UINT_FAST16_MAX
        int32_t          INT8_MAX         UINT_FAST32_MAX
        int64_t          INT16_MAX        UINT_FAST64_MAX
        uint8_t          INT32_MAX        INTPTR_MIN
        uint16_t         INT64_MAX        INTPTR_MAX
        uint32_t         UINT8_MAX        UINTPTR_MAX
        uint64_t         UINT16_MAX       INTMAX_MIN
        int_least8_t     UINT32_MAX       INTMAX_MAX
        int_least16_t    UINT64_MAX       UINTMAX_MAX
        int_least32_t    INT_LEAST8_MIN   PTRDIFF_MIN
        int_least64_t    INT_LEAST16_MIN  PTRDIFF_MAX
        uint_least8_t    INT_LEAST32_MIN  SIG_ATOMIC_MIN
        uint_least16_t   INT_LEAST64_MIN  SIG_ATOMIC_MAX
        uint_least32_t   INT_LEAST8_MAX   SIZE_MAX
        uint_least64_t   INT_LEAST16_MAX  WCHAR_MIN
        int_fast8_t      INT_LEAST32_MAX  WCHAR_MAX
        int_fast16_t     INT_LEAST64_MAX  WINT_MIN
        int_fast32_t     UINT_LEAST8_MAX  WINT_MAX
        int_fast64_t     UINT_LEAST16_MAX INT8_C(value)
        uint_fast8_t     UINT_LEAST32_MAX INT16_C(value)
        uint_fast16_t    UINT_LEAST64_MAX INT32_C(value)
        uint_fast32_t    INT_FAST8_MIN    INT64_C(value)
        uint_fast64_t    INT_FAST16_MIN   UINT8_C(value)
        intptr_t         INT_FAST32_MIN   UINT16_C(value)
        uintptr_t        INT_FAST64_MIN   UINT32_C(value)
        intmax_t         INT_FAST8_MAX    UINT64_C(value)
        uintmax_t        INT_FAST16_MAX   INTMAX_C(value)
        INT8_MIN         INT_FAST32_MAX   UINTMAX_C(value)
        INT16_MIN        INT_FAST64_MAX

Input/output <stdio.h>

        size_t       _IOLBF       FILENAME_MAX TMP_MAX
        FILE         _IONBF       L_tmpnam     stderr
        fpos_t       BUFSIZ       SEEK_CUR     stdin
        NULL         EOF          SEEK_END     stdout
        _IOFBF       FOPEN_MAX    SEEK_SET
        int remove(const char *filename);
        int rename(const char *old, const char *new);
        FILE *tmpfile(void);
        char *tmpnam(char *s);
        int fclose(FILE *stream);
        int fflush(FILE *stream);
        FILE *fopen(const char * restrict filename,
                const char * restrict mode);
        FILE *freopen(const char * restrict filename,
                const char * restrict mode,
                FILE * restrict stream);
        void setbuf(FILE * restrict stream,
                char * restrict buf);
        int setvbuf(FILE * restrict stream,
                char * restrict buf,
                int mode, size_t size);
        int fprintf(FILE * restrict stream,
                const char * restrict format, ...);
        int fscanf(FILE * restrict stream,
                const char * restrict format, ...);
        int printf(const char * restrict format, ...);
        int scanf(const char * restrict format, ...);
        int snprintf(char * restrict s, size_t n,
                const char * restrict format, ...);
        int sprintf(char * restrict s,
                const char * restrict format, ...);
        int sscanf(const char * restrict s,
                const char * restrict format, ...);
        int vfprintf(FILE * restrict stream,
                const char * restrict format,
                va_list arg);
        int vfscanf(FILE * restrict stream,
                const char * restrict format,
                va_list arg);
        int vprintf(const char * restrict format,
                va_list arg);
        int vscanf(const char * restrict format,
                va_list arg);
        int vsnprintf(char * restrict s, size_t n,
                const char * restrict format,
                va_list arg);
        int vsprintf(char * restrict s,
                const char * restrict format,
                va_list arg);
        int vsscanf(const char * restrict s,
                const char * restrict format,
                va_list arg);

Damit kannst du ausrechnen, wie lange du für deine Aufgabe brauchen wirst,
die du dir vorgenommen hast. :D

Leider musste ich bei 17.000 Zeichen aufhören, da unser Boardchef keine
größeren Geheimnisse ausplaudern möchte. :cry:
 
Oben