heap.e

来自「HTML-XML-utils由一套小型C程序(过滤器)组成」· E 代码 · 共 13 行

E
13
字号
#define fatal(msg)   fatal3( msg , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )   #define new(p)   if ((( p )=malloc(sizeof(*( p ))))); else fatal3( "out of memory" , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )    #define dispose(p)   if (!( p )) ; else (free( p ), ( p ) = (void*)0)   #define heapmax(p)   9999999   #define newstring(s)   heap_newstring( s , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )   #define newnstring(s,n)   heap_newnstring( s ,  n , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )   #define newarray(p,n)   if ((( p )=malloc(( n )*sizeof(*( p ))))); else fatal3( "out of memory" , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )    #define renewarray(p,n)   if ((( p )=realloc( p ,( n )*sizeof(*( p ))))); else fatal3( "out of memory" , /*"*/__FI ## LE__/*"*/ , /*"*/__LI ## NE__/*"*/ )     void fatal3(const char *s, const char *file, const int line); char * heap_newstring(const char *s, const char *file, const int line); char * heap_newnstring(const char *s, const size_t n,			      const char *file, const int line);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?