📄 heap.e
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -