1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
   2: /* $Header: b.h,v 2.2 85/08/22 15:59:55 timo Exp $ */
   3: 
   4: /*
   5:  * B editor -- Basics copied from B interpreter's run-time system.
   6:  */
   7: 
   8: #include <stdio.h>
   9: 
  10: #define Visible
  11: #define Hidden static
  12: #define Procedure
  13: 
  14: typedef int bool;
  15: typedef short intlet;
  16: typedef char *string;
  17: 
  18: #define No 0
  19: #define Yes 1
  20: 
  21: #define Maxintlet ((1<<15)-1) /* MACHINE DEPENDENT */
  22: 
  23: typedef struct {
  24:     char    type;
  25:     char    _unused;
  26:     intlet  refcnt;
  27:     intlet  len;
  28:     string  *cts;
  29: } *value;
  30: 
  31: /* See also definitions in node.h and queu.h which must match the first
  32:    four fields of 'value'! */
  33: 
  34: #define Refcnt(v) ((v)->refcnt)
  35: #define Type(v) ((v)->type)
  36: #define Length(v) ((v)->len)
  37: #define Str(v) ((char*)(&(v)->cts))
  38: 
  39: #define Vnil ((value) NULL)
  40: 
  41: /* Types: */
  42: #define Num '0'
  43: #define Tex '"'
  44: #define Com ','
  45: #define Nod 'N'
  46: #define Pat 'P'
  47: 
  48: /*
  49:  * C library standard functions
  50:  */
  51: 
  52: string malloc();
  53: string realloc();
  54: 
  55: string sprintf();
  56: 
  57: string strcpy();
  58: string strncpy();
  59: string index();
  60: string rindex();
  61: 
  62: string getenv();
  63: 
  64: #define Strequ(s, t) !strcmp(s, t)
  65: #define Strnequ(s, t, n) !strncmp(s, t, n)

Defined typedef's

bool defined in line 14; used 189 times
intlet defined in line 15; used 4 times
string defined in line 16; used 247 times

Defined macros

Com defined in line 44; used 3 times
Hidden defined in line 11; used 288 times
Maxintlet defined in line 21; used 11 times
No defined in line 18; used 225 times
Num defined in line 42; used 1 times
Pat defined in line 46; used 1 times
Procedure defined in line 12; used 141 times
Visible defined in line 10; used 235 times
Yes defined in line 19; used 224 times

Usage of this include

b.h used 33 times
Last modified: 1985-08-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 829
Valid CSS Valid XHTML 1.0 Strict