Changeset f7428b1 in buchla-68k for include/stddefs.h


Ignore:
Timestamp:
07/10/2017 01:26:59 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
5fa506d
Parents:
c3aee8a
Message:

Started to rework include files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/stddefs.h

    rc3aee8a rf7428b1  
    33        stddefs.h -- Standard definitions for C programs
    44        Version 12 -- 1987-12-15 -- D.N. Lynx Crowe
    5 
    6         Must follow stdio.h if stdio.h is used as both define:
    7 
    8                 NULL, EOF.
    9 
    10         Must follow define.h on the Atari if define.h is used as both define:
    11 
    12                 NULL, EOF, FOREVER, TRUE, FALSE, FAILURE, SUCCESS,
    13                 YES, NO, EOS, NIL.
    14 
    155        Released to Public Domain - 1987-06 - D.N. Lynx Crowe
    166   ============================================================================
    177*/
    188
    19 #ifndef STD_DEFS                /* so we only define these once */
    20 
    21 #define STD_DEFS        1
     9#pragma once
     10#include "stdint.h"
    2211
    2312/* relational operators */
     
    3625#define OR      ||
    3726
    38 /* infinite loop constructs */
    39 
    40 #ifndef FOREVER
    41 #define FOREVER         for(;;)
    42 #endif
    43 
    44 #ifndef REPEAT
    45 #define REPEAT          for(;;)
    46 #endif
    47 
    4827/*
    4928
    5029*/
    5130
    52 /* various terminators */
    53 
    54 #ifndef EOF
    55 #define EOF             (-1)
    56 #endif
    57 
    58 #ifndef EOS
    59 #define EOS             '\0'
    60 #endif
    61 
    62 #ifndef NIL
    63 #define NIL             0
    64 #endif
    65 
    6631/* manifest constants for function return and flag values */
    6732
    68 #ifndef NULL
    69 #define NULL            0
    70 #endif
     33#define FAILURE -1                      /*      Function failure return val */
     34#define SUCCESS 0                       /*      Function success return val */
    7135
    72 #ifndef YES
    73 #define YES             1
    74 #endif
     36#define FOREVER for (;;)                /*      Infinite loop declaration   */
    7537
    76 #ifndef NO
    77 #define NO              0
    78 #endif
     38#define NULL    0                       /*      Null pointer value          */
    7939
    80 #ifndef FALSE
    81 #define FALSE           0
    82 #endif
    83 
    84 #ifndef TRUE
    85 #define TRUE            1
    86 #endif
    87 
    88 #ifndef SUCCESS
    89 #define SUCCESS         0
    90 #endif
    91 
    92 #ifndef FAILURE
    93 #define FAILURE         (-1)
    94 #endif
     40#define TRUE    1                       /*      Function TRUE  value        */
     41#define FALSE   0                       /*      Function FALSE value        */
    9542
    9643/* BOOL type definition for flag variables */
    9744
    9845typedef int8_t  BOOL;
    99 
    100 #endif
Note: See TracChangeset for help on using the changeset viewer.