Language: C

#define _CRT_SECURE_NO_WARNINGS
////#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#include<math.h>
//#include<string.h>
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
typedef struct LIST{
	struct LIST *next;
	struct LIST *prev;
	int value;
}*PNODE;

PNODE list;
void Add(int);
void Del(int);
void DelFirst();
void DelLast();
void DelNode(PNODE);
void Display();
void Release();

int main() {
	list = (LIST*)malloc(sizeof(LIST));
	list->next = list;
	list->prev = list;
	int fig,n,f;
	char op[13];
	fscanf(stdin, "%d", &n),getchar();
	while (n--) {
		fscanf(stdin, "%[^\n]*s", op),getchar();
		f == 0;
		if (op[0] == 'i') { f = 1; }
		else if (op[0] == 'd') {
			switch (op[6]) {
			case 'F':
				DelFirst();
				break;
			case 'L':
				DelLast();
				break;
			default:
				f = 2;
				break;
			}
		}
		if (f) {
			fig = atoi(&op[7]);
			if (f == 1) Add(fig);
			else if (f == 2) Del(fig);
		}
	}
	Display();
	Release();
	return 0;
}

void Add(int tmp){
	LIST *p, *next, *prev;
	p = (LIST*)malloc(sizeof(LIST));
	p->value = tmp;
	p->next = list->next;
	p->prev = list;
	list->next->prev = p;
	list->next = p;
}

void Del(int tmp){
	PNODE cur = list->next;
	while (cur != list) {
		if (cur->value == tmp) {
			DelNode(cur);
			return;
		}
		cur = cur->next;
	}
}

void DelFirst(){
	DelNode(list->next);
}

void DelLast(){
	DelNode(list->prev);
}

void DelNode(PNODE node){
	if (node == list) return;
	node->next->prev = node->prev;
	node->prev->next = node->next;
}

void Display() {
	if (list->next == list) { puts("list is empty"); return; }
	LIST *p;
	for (p = list->next; p != list; p = p->next) fprintf(stdout, "%d ", p->value);
	puts("");
}

void Release(){
	LIST *next, *del;
	next = list->next;
	while (next != list){
		del = next;
		next = next->next;
		free(del);
	}
}

Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'LIST' undeclared (first use in this function)
   25 |         list = (LIST*)malloc(sizeof(LIST));
      |                 ^~~~
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:22: error: expected expression before ')' token
   25 |         list = (LIST*)malloc(sizeof(LIST));
      |                      ^
main.c: In function 'Add':
main.c:60:9: error: unknown type name 'LIST'; use 'struct' keyword to refer to the type
   60 |         LIST *p, *next, *prev;
      |         ^~~~
      |         struct 
main.c:61:14: error: 'LIST' undeclared (first use in this function)
   61 |         p = (LIST*)malloc(sizeof(LIST));
      |              ^~~~
main.c:61:19: error: expected expression before ')' token
   61 |         p = (LIST*)malloc(sizeof(LIST));
      |                   ^
main.c:62:10: error: request for member 'value' in something not a structure or union
   62 |         p->value = tmp;
      |          ^~
main.c:63:10: error: request for member 'next' in something not a structure or union
   63 |         p->next = list->next;
      |          ^~
main.c:64:10: error: request for member 'prev' in something not a structure or union
   64 |         p->prev = list;
      |          ^~
main.c:65:26: error: assignment to 'struct LIST *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   65 |         list->next->prev = p;
      |                          ^
main.c:66:20: error: assignment to 'struct LIST *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   66 |         list->next = p;
      |                    ^
main.c: In function 'Display':
main.c:96:9: error: unknown type name 'LIST'; use 'struct' keyword to refer to the type
   96 |         LIST *p;
      |         ^~~~
      |         struct 
main.c:97:16: error: assignment to 'int *' from incompatible pointer type 'struct LIST *' [-Wincompatible-pointer-types]
   97 |         for (p = list->next; p != list; p = p->next) fprintf(stdout, "%d ", p->value);
      |                ^
main.c:97:32: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
   97 |         for (p = list->next; p != list; p = p->next) fprintf(stdout, "%d ", p->value);
      |                                ^~
main.c:97:46: error: request for member 'next' in something not a structure or union
   97 |         for (p = list->next; p != list; p = p->next) fprintf(stdout, "%d ", p->value);
      |                                              ^~
main.c:97:78: error: request for member 'value' in something not a structure or union
   97 |         for (p = list->next; p != list; p = p->next) fprintf(stdout, "%d ", p->value);
      |                                                                              ^~
main.c: In function 'Release':
main.c:102:9: error: unknown type name 'LIST'; use 'struct' keyword to refer to the type
  102 |         LIST *next, *del;
      |         ^~~~
      |         struct 
main.c:103:14: error: assignment to 'int *' from incompatible pointer type 'struct LIST *' [-Wincompatible-pointer-types]
  103 |         next = list->next;
      |              ^
main.c:104:21: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
  104 |         while (next != list){
      |                     ^~
main.c:106:28: error: request for member 'next' in something not a structure or union
  106 |                 next = next->next;
      |                            ^~