⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macros.h

📁 凸壳算法
💻 H
字号:
/*====================================================================    macros.h  	macros used to access data structures and perform quick tests.  ====================================================================*//* general-purpose macros */#define SWAP(t,x,y)	{ t = x; x = y; y = t; }char *malloc();#define NEW(p,type)	if ((p=(type *) malloc (sizeof(type))) == NULL) {\				printf ("Out of Memory!\n");\				exit(0);\			}#define FREE(p)		if (p) { free ((char *) p); p = NULL; }#define ADD( head, p )  if ( head )  { \				p->next = head; \				p->prev = head->prev; \				head->prev = p; \				p->prev->next = p; \			} \			else { \				head = p; \				head->next = head->prev = p; \			}#define DELETE( head, p ) if ( head )  { \				if ( head == head->next ) \					head = NULL;  \				else if ( p == head ) \					head = head->next; \				p->next->prev = p->prev;  \				p->prev->next = p->next;  \				FREE( p ); \			} 

⌨️ 快捷键说明

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