libk  Diff

Differences From Artifact [7135ae8006]:

To Artifact [632e354c90]:


    17     17   typedef struct kenv {
    18     18   	kiochan std;
    19     19   	kiochan err;
    20     20   	sz argc; char** argv;
    21     21   	kvar* vars;
    22     22   } kenv;
    23     23   
    24         -
    25     24   /* i'm really sorry okay */
    26     25   typedef
    27     26   #if (__STDC_VERSION__ >= 199901L)
    28     27   	_Bool bool;
    29     28   #endif
    30     29   enum
    31     30   #if !(__STDC_VERSION__ >= 199901L)
................................................................................
    37     36   }
    38     37   #if !(__STDC_VERSION__ >= 199901L)
    39     38   	bool /* } bool ; */
    40     39   #endif
    41     40   ;
    42     41   
    43     42   #ifndef KFclean
           43  +#	include <k/internal.egroup.h>
           44  +#	define Kokay(cond) (((cond) % kglobal_module_offset) == 0)
    44     45   #	if (__STDC_VERSION__ >= 199901L) ||\
    45     46   	   (__cplusplus      >= 201103L)
    46     47   #		define KVvm_args __VA_ARGS__
    47     48   #		define KVvm_spec ...
    48     49   #		define KFfeat_variadic_macro
    49     50   #	else
    50     51   #		define KVvm_args K_TEMP_M2QD52
................................................................................
   142    143   #ifdef __cplusplus
   143    144   	[[noreturn]] void kstop(stat_long code);
   144    145   #elif __STDC_VERSION__ >= 201103L
   145    146   	_Noreturn void kstop(stat_long code);
   146    147   #else
   147    148   	void kstop(stat_long code);
   148    149   #endif
          150  +
          151  +typedef u16 kcond;
          152  +/* this will probably not need to be altered,
          153  + * as libk sports a modest number of modules,
          154  + * and there are few enough error conditions
          155  + * in each  that 16-bit address space should
          156  + * be more  than enough for the  foreseeable
          157  + * future. however if that changes, altering
          158  + * the  definition here will effect all  the
          159  + * necessary changes throughout the library */
          160  +bool kokay(kcond);
   149    161   
   150    162   #ifdef __cplusplus
   151    163   }
   152    164   #endif
   153    165   
   154    166   #endif