shithub: choc

Download patch

ref: f716939956e0da16d20b18ea63b5a49b4038da15
parent: cb72358ee930b29f4840b04bbb81f8d8444ce481
author: Simon Howard <[email protected]>
date: Sat Sep 13 01:15:05 EDT 2014

Add vld_ prefix for vldoor_e enum values.

It was pointed out to me recently that vldoor_e has enum values
named 'open' and 'close'. These can potentially conflict with POSIX
standard functions that have the same names, if the right header
files are included.

This doesn't currently cause any problems. However, to avoid any
possibility of a conflict occurring if a different compiler is used,
add a vld_ prefix to all the enum values, to namespace them.

--- a/src/doom/p_doors.c
+++ b/src/doom/p_doors.c
@@ -66,17 +66,17 @@
 	{
 	    switch(door->type)
 	    {
-	      case blazeRaise:
+	      case vld_blazeRaise:
 		door->direction = -1; // time to go back down
 		S_StartSound(&door->sector->soundorg, sfx_bdcls);
 		break;
 		
-	      case normal:
+	      case vld_normal:
 		door->direction = -1; // time to go back down
 		S_StartSound(&door->sector->soundorg, sfx_dorcls);
 		break;
 		
-	      case close30ThenOpen:
+	      case vld_close30ThenOpen:
 		door->direction = 1;
 		S_StartSound(&door->sector->soundorg, sfx_doropn);
 		break;
@@ -93,9 +93,9 @@
 	{
 	    switch(door->type)
 	    {
-	      case raiseIn5Mins:
+	      case vld_raiseIn5Mins:
 		door->direction = 1;
-		door->type = normal;
+		door->type = vld_normal;
 		S_StartSound(&door->sector->soundorg, sfx_doropn);
 		break;
 		
@@ -115,20 +115,20 @@
 	{
 	    switch(door->type)
 	    {
-	      case blazeRaise:
-	      case blazeClose:
+	      case vld_blazeRaise:
+	      case vld_blazeClose:
 		door->sector->specialdata = NULL;
 		P_RemoveThinker (&door->thinker);  // unlink and free
 		S_StartSound(&door->sector->soundorg, sfx_bdcls);
 		break;
 		
-	      case normal:
-	      case close:
+	      case vld_normal:
+	      case vld_close:
 		door->sector->specialdata = NULL;
 		P_RemoveThinker (&door->thinker);  // unlink and free
 		break;
 		
-	      case close30ThenOpen:
+	      case vld_close30ThenOpen:
 		door->direction = 0;
 		door->topcountdown = TICRATE*30;
 		break;
@@ -141,8 +141,8 @@
 	{
 	    switch(door->type)
 	    {
-	      case blazeClose:
-	      case close:		// DO NOT GO BACK UP!
+	      case vld_blazeClose:
+	      case vld_close:		// DO NOT GO BACK UP!
 		break;
 		
 	      default:
@@ -164,15 +164,15 @@
 	{
 	    switch(door->type)
 	    {
-	      case blazeRaise:
-	      case normal:
+	      case vld_blazeRaise:
+	      case vld_normal:
 		door->direction = 0; // wait at top
 		door->topcountdown = door->topwait;
 		break;
 		
-	      case close30ThenOpen:
-	      case blazeOpen:
-	      case open:
+	      case vld_close30ThenOpen:
+	      case vld_blazeOpen:
+	      case vld_open:
 		door->sector->specialdata = NULL;
 		P_RemoveThinker (&door->thinker);  // unlink and free
 		break;
@@ -281,7 +281,7 @@
 		
 	switch(type)
 	{
-	  case blazeClose:
+	  case vld_blazeClose:
 	    door->topheight = P_FindLowestCeilingSurrounding(sec);
 	    door->topheight -= 4*FRACUNIT;
 	    door->direction = -1;
@@ -289,7 +289,7 @@
 	    S_StartSound(&door->sector->soundorg, sfx_bdcls);
 	    break;
 	    
-	  case close:
+	  case vld_close:
 	    door->topheight = P_FindLowestCeilingSurrounding(sec);
 	    door->topheight -= 4*FRACUNIT;
 	    door->direction = -1;
@@ -296,14 +296,14 @@
 	    S_StartSound(&door->sector->soundorg, sfx_dorcls);
 	    break;
 	    
-	  case close30ThenOpen:
+	  case vld_close30ThenOpen:
 	    door->topheight = sec->ceilingheight;
 	    door->direction = -1;
 	    S_StartSound(&door->sector->soundorg, sfx_dorcls);
 	    break;
 	    
-	  case blazeRaise:
-	  case blazeOpen:
+	  case vld_blazeRaise:
+	  case vld_blazeOpen:
 	    door->direction = 1;
 	    door->topheight = P_FindLowestCeilingSurrounding(sec);
 	    door->topheight -= 4*FRACUNIT;
@@ -312,8 +312,8 @@
 		S_StartSound(&door->sector->soundorg, sfx_bdopn);
 	    break;
 	    
-	  case normal:
-	  case open:
+	  case vld_normal:
+	  case vld_open:
 	    door->direction = 1;
 	    door->topheight = P_FindLowestCeilingSurrounding(sec);
 	    door->topheight -= 4*FRACUNIT;
@@ -485,7 +485,7 @@
       case 26:
       case 27:
       case 28:
-	door->type = normal;
+	door->type = vld_normal;
 	break;
 	
       case 31:
@@ -492,16 +492,16 @@
       case 32:
       case 33:
       case 34:
-	door->type = open;
+	door->type = vld_open;
 	line->special = 0;
 	break;
 	
       case 117:	// blazing door raise
-	door->type = blazeRaise;
+	door->type = vld_blazeRaise;
 	door->speed = VDOORSPEED*4;
 	break;
       case 118:	// blazing door open
-	door->type = blazeOpen;
+	door->type = vld_blazeOpen;
 	line->special = 0;
 	door->speed = VDOORSPEED*4;
 	break;
@@ -530,7 +530,7 @@
     door->thinker.function.acp1 = (actionf_p1)T_VerticalDoor;
     door->sector = sec;
     door->direction = 0;
-    door->type = normal;
+    door->type = vld_normal;
     door->speed = VDOORSPEED;
     door->topcountdown = 30 * TICRATE;
 }
@@ -555,7 +555,7 @@
     door->thinker.function.acp1 = (actionf_p1)T_VerticalDoor;
     door->sector = sec;
     door->direction = 2;
-    door->type = raiseIn5Mins;
+    door->type = vld_raiseIn5Mins;
     door->speed = VDOORSPEED;
     door->topheight = P_FindLowestCeilingSurrounding(sec);
     door->topheight -= 4*FRACUNIT;
--- a/src/doom/p_enemy.c
+++ b/src/doom/p_enemy.c
@@ -574,7 +574,7 @@
     }
 
     junk.tag = 666;
-    EV_DoDoor(&junk,open);
+    EV_DoDoor(&junk, vld_open);
 }
 
 
@@ -1737,7 +1737,7 @@
 	    {
 	      case 6:
 		junk.tag = 666;
-		EV_DoDoor (&junk, blazeOpen);
+		EV_DoDoor (&junk, vld_blazeOpen);
 		return;
 		break;
 		
--- a/src/doom/p_spec.c
+++ b/src/doom/p_spec.c
@@ -552,19 +552,19 @@
 	// All from here to RETRIGGERS.
       case 2:
 	// Open Door
-	EV_DoDoor(line,open);
+	EV_DoDoor(line,vld_open);
 	line->special = 0;
 	break;
 
       case 3:
 	// Close Door
-	EV_DoDoor(line,close);
+	EV_DoDoor(line,vld_close);
 	line->special = 0;
 	break;
 
       case 4:
 	// Raise Door
-	EV_DoDoor(line,normal);
+	EV_DoDoor(line,vld_normal);
 	line->special = 0;
 	break;
 	
@@ -606,7 +606,7 @@
 	
       case 16:
 	// Close Door 30
-	EV_DoDoor(line,close30ThenOpen);
+	EV_DoDoor(line,vld_close30ThenOpen);
 	line->special = 0;
 	break;
 	
@@ -733,13 +733,13 @@
 	
       case 108:
 	// Blazing Door Raise (faster than TURBO!)
-	EV_DoDoor (line,blazeRaise);
+	EV_DoDoor (line,vld_blazeRaise);
 	line->special = 0;
 	break;
 	
       case 109:
 	// Blazing Door Open (faster than TURBO!)
-	EV_DoDoor (line,blazeOpen);
+	EV_DoDoor (line,vld_blazeOpen);
 	line->special = 0;
 	break;
 	
@@ -751,7 +751,7 @@
 	
       case 110:
 	// Blazing Door Close (faster than TURBO!)
-	EV_DoDoor (line,blazeClose);
+	EV_DoDoor (line,vld_blazeClose);
 	line->special = 0;
 	break;
 
@@ -811,12 +811,12 @@
 	
       case 75:
 	// Close Door
-	EV_DoDoor(line,close);
+	EV_DoDoor(line,vld_close);
 	break;
 	
       case 76:
 	// Close Door 30
-	EV_DoDoor(line,close30ThenOpen);
+	EV_DoDoor(line,vld_close30ThenOpen);
 	break;
 	
       case 77:
@@ -856,7 +856,7 @@
 
       case 86:
 	// Open Door
-	EV_DoDoor(line,open);
+	EV_DoDoor(line,vld_open);
 	break;
 	
       case 87:
@@ -876,7 +876,7 @@
 	
       case 90:
 	// Raise Door
-	EV_DoDoor(line,normal);
+	EV_DoDoor(line,vld_normal);
 	break;
 	
       case 91:
@@ -923,17 +923,17 @@
 
       case 105:
 	// Blazing Door Raise (faster than TURBO!)
-	EV_DoDoor (line,blazeRaise);
+	EV_DoDoor (line,vld_blazeRaise);
 	break;
 	
       case 106:
 	// Blazing Door Open (faster than TURBO!)
-	EV_DoDoor (line,blazeOpen);
+	EV_DoDoor (line,vld_blazeOpen);
 	break;
 
       case 107:
 	// Blazing Door Close (faster than TURBO!)
-	EV_DoDoor (line,blazeClose);
+	EV_DoDoor (line,vld_blazeClose);
 	break;
 
       case 120:
@@ -997,7 +997,7 @@
 	
       case 46:
 	// OPEN DOOR
-	EV_DoDoor(line,open);
+	EV_DoDoor(line,vld_open);
 	P_ChangeSwitchTexture(line,1);
 	break;
 	
--- a/src/doom/p_spec.h
+++ b/src/doom/p_spec.h
@@ -324,14 +324,14 @@
 //
 typedef enum
 {
-    normal,
-    close30ThenOpen,
-    close,
-    open,
-    raiseIn5Mins,
-    blazeRaise,
-    blazeOpen,
-    blazeClose
+    vld_normal,
+    vld_close30ThenOpen,
+    vld_close,
+    vld_open,
+    vld_raiseIn5Mins,
+    vld_blazeRaise,
+    vld_blazeOpen,
+    vld_blazeClose
 
 } vldoor_e;
 
--- a/src/doom/p_switch.c
+++ b/src/doom/p_switch.c
@@ -394,7 +394,7 @@
 	
       case 29:
 	// Raise Door
-	if (EV_DoDoor(line,normal))
+	if (EV_DoDoor(line,vld_normal))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
@@ -418,7 +418,7 @@
 	
       case 50:
 	// Close Door
-	if (EV_DoDoor(line,close))
+	if (EV_DoDoor(line,vld_close))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
@@ -448,25 +448,25 @@
 	
       case 103:
 	// Open Door
-	if (EV_DoDoor(line,open))
+	if (EV_DoDoor(line,vld_open))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
       case 111:
 	// Blazing Door Raise (faster than TURBO!)
-	if (EV_DoDoor (line,blazeRaise))
+	if (EV_DoDoor (line,vld_blazeRaise))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
       case 112:
 	// Blazing Door Open (faster than TURBO!)
-	if (EV_DoDoor (line,blazeOpen))
+	if (EV_DoDoor (line,vld_blazeOpen))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
       case 113:
 	// Blazing Door Close (faster than TURBO!)
-	if (EV_DoDoor (line,blazeClose))
+	if (EV_DoDoor (line,vld_blazeClose))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
@@ -494,7 +494,7 @@
 	// BlzOpenDoor RED
       case 137:
 	// BlzOpenDoor YELLOW
-	if (EV_DoLockedDoor (line,blazeOpen,thing))
+	if (EV_DoLockedDoor (line,vld_blazeOpen,thing))
 	    P_ChangeSwitchTexture(line,0);
 	break;
 	
@@ -507,7 +507,7 @@
 	// BUTTONS
       case 42:
 	// Close Door
-	if (EV_DoDoor(line,close))
+	if (EV_DoDoor(line,vld_close))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
@@ -531,7 +531,7 @@
 	
       case 61:
 	// Open Door
-	if (EV_DoDoor(line,open))
+	if (EV_DoDoor(line,vld_open))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
@@ -543,7 +543,7 @@
 	
       case 63:
 	// Raise Door
-	if (EV_DoDoor(line,normal))
+	if (EV_DoDoor(line,vld_normal))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
@@ -591,19 +591,19 @@
 	
       case 114:
 	// Blazing Door Raise (faster than TURBO!)
-	if (EV_DoDoor (line,blazeRaise))
+	if (EV_DoDoor (line,vld_blazeRaise))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
       case 115:
 	// Blazing Door Open (faster than TURBO!)
-	if (EV_DoDoor (line,blazeOpen))
+	if (EV_DoDoor (line,vld_blazeOpen))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
       case 116:
 	// Blazing Door Close (faster than TURBO!)
-	if (EV_DoDoor (line,blazeClose))
+	if (EV_DoDoor (line,vld_blazeClose))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
@@ -625,7 +625,7 @@
 	// BlzOpenDoor RED
       case 136:
 	// BlzOpenDoor YELLOW
-	if (EV_DoLockedDoor (line,blazeOpen,thing))
+	if (EV_DoLockedDoor (line,vld_blazeOpen,thing))
 	    P_ChangeSwitchTexture(line,1);
 	break;
 	
--- a/src/heretic/p_doors.c
+++ b/src/heretic/p_doors.c
@@ -45,11 +45,11 @@
             if (!--door->topcountdown)
                 switch (door->type)
                 {
-                    case normal:
+                    case vld_normal:
                         door->direction = -1;   // time to go back down
                         S_StartSound(&door->sector->soundorg, sfx_doropn);
                         break;
-                    case close30ThenOpen:
+                    case vld_close30ThenOpen:
                         door->direction = 1;
                         S_StartSound(&door->sector->soundorg, sfx_doropn);
                         break;
@@ -62,9 +62,9 @@
             {
                 switch (door->type)
                 {
-                    case raiseIn5Mins:
+                    case vld_raiseIn5Mins:
                         door->direction = 1;
-                        door->type = normal;
+                        door->type = vld_normal;
                         S_StartSound(&door->sector->soundorg, sfx_doropn);
                         break;
                     default:
@@ -80,13 +80,13 @@
             {
                 switch (door->type)
                 {
-                    case normal:
-                    case close:
+                    case vld_normal:
+                    case vld_close:
                         door->sector->specialdata = NULL;
                         P_RemoveThinker(&door->thinker);        // unlink and free
                         S_StartSound(&door->sector->soundorg, sfx_dorcls);
                         break;
-                    case close30ThenOpen:
+                    case vld_close30ThenOpen:
                         door->direction = 0;
                         door->topcountdown = 35 * 30;
                         break;
@@ -98,7 +98,7 @@
             {
                 switch (door->type)
                 {
-                    case close:        // DON'T GO BACK UP!
+                    case vld_close:        // DON'T GO BACK UP!
                         break;
                     default:
                         door->direction = 1;
@@ -114,12 +114,12 @@
             {
                 switch (door->type)
                 {
-                    case normal:
+                    case vld_normal:
                         door->direction = 0;    // wait at top
                         door->topcountdown = door->topwait;
                         break;
-                    case close30ThenOpen:
-                    case open:
+                    case vld_close30ThenOpen:
+                    case vld_open:
                         door->sector->specialdata = NULL;
                         P_RemoveThinker(&door->thinker);        // unlink and free
                         S_StopSound(&door->sector->soundorg);
@@ -165,19 +165,19 @@
         door->sector = sec;
         switch (type)
         {
-            case close:
+            case vld_close:
                 door->topheight = P_FindLowestCeilingSurrounding(sec);
                 door->topheight -= 4 * FRACUNIT;
                 door->direction = -1;
                 S_StartSound(&door->sector->soundorg, sfx_doropn);
                 break;
-            case close30ThenOpen:
+            case vld_close30ThenOpen:
                 door->topheight = sec->ceilingheight;
                 door->direction = -1;
                 S_StartSound(&door->sector->soundorg, sfx_doropn);
                 break;
-            case normal:
-            case open:
+            case vld_normal:
+            case vld_open:
                 door->direction = 1;
                 door->topheight = P_FindLowestCeilingSurrounding(sec);
                 door->topheight -= 4 * FRACUNIT;
@@ -313,13 +313,13 @@
         case 26:
         case 27:
         case 28:
-            door->type = normal;
+            door->type = vld_normal;
             break;
         case 31:
         case 32:
         case 33:
         case 34:
-            door->type = open;
+            door->type = vld_open;
             line->special = 0;
             break;
     }
@@ -349,7 +349,7 @@
     door->thinker.function = T_VerticalDoor;
     door->sector = sec;
     door->direction = 0;
-    door->type = normal;
+    door->type = vld_normal;
     door->speed = VDOORSPEED;
     door->topcountdown = 30 * 35;
 }
@@ -370,7 +370,7 @@
     door->thinker.function = T_VerticalDoor;
     door->sector = sec;
     door->direction = 2;
-    door->type = raiseIn5Mins;
+    door->type = vld_raiseIn5Mins;
     door->speed = VDOORSPEED;
     door->topheight = P_FindLowestCeilingSurrounding(sec);
     door->topheight -= 4 * FRACUNIT;
--- a/src/heretic/p_spec.c
+++ b/src/heretic/p_spec.c
@@ -571,15 +571,15 @@
             // TRIGGERS
             //====================================================
         case 2:                // Open Door
-            EV_DoDoor(line, open, VDOORSPEED);
+            EV_DoDoor(line, vld_open, VDOORSPEED);
             line->special = 0;
             break;
         case 3:                // Close Door
-            EV_DoDoor(line, close, VDOORSPEED);
+            EV_DoDoor(line, vld_close, VDOORSPEED);
             line->special = 0;
             break;
         case 4:                // Raise Door
-            EV_DoDoor(line, normal, VDOORSPEED);
+            EV_DoDoor(line, vld_normal, VDOORSPEED);
             line->special = 0;
             break;
         case 5:                // Raise Floor
@@ -611,7 +611,7 @@
             line->special = 0;
             break;
         case 16:               // Close Door 30
-            EV_DoDoor(line, close30ThenOpen, VDOORSPEED);
+            EV_DoDoor(line, vld_close30ThenOpen, VDOORSPEED);
             line->special = 0;
             break;
         case 17:               // Start Light Strobing
@@ -715,10 +715,10 @@
             EV_CeilingCrushStop(line);
             break;
         case 75:               // Close Door
-            EV_DoDoor(line, close, VDOORSPEED);
+            EV_DoDoor(line, vld_close, VDOORSPEED);
             break;
         case 76:               // Close Door 30
-            EV_DoDoor(line, close30ThenOpen, VDOORSPEED);
+            EV_DoDoor(line, vld_close30ThenOpen, VDOORSPEED);
             break;
         case 77:               // Fast Ceiling Crush & Raise
             EV_DoCeiling(line, fastCrushAndRaise);
@@ -742,7 +742,7 @@
             EV_DoFloor(line, lowerAndChange);
             break;
         case 86:               // Open Door
-            EV_DoDoor(line, open, VDOORSPEED);
+            EV_DoDoor(line, vld_open, VDOORSPEED);
             break;
         case 87:               // Perpetual Platform Raise
             EV_DoPlat(line, perpetualRaise, 0);
@@ -754,10 +754,10 @@
             EV_StopPlat(line);
             break;
         case 90:               // Raise Door
-            EV_DoDoor(line, normal, VDOORSPEED);
+            EV_DoDoor(line, vld_normal, VDOORSPEED);
             break;
         case 100:              // Retrigger_Raise_Door_Turbo
-            EV_DoDoor(line, normal, VDOORSPEED * 3);
+            EV_DoDoor(line, vld_normal, VDOORSPEED * 3);
             break;
         case 91:               // Raise Floor
             EV_DoFloor(line, raiseFloor);
@@ -815,7 +815,7 @@
             P_ChangeSwitchTexture(line, 0);
             break;
         case 46:               // Impact_OpenDoor
-            EV_DoDoor(line, open, VDOORSPEED);
+            EV_DoDoor(line, vld_open, VDOORSPEED);
             P_ChangeSwitchTexture(line, 1);
             break;
         case 47:               // Impact_RaiseFloorNear&Change
--- a/src/heretic/p_spec.h
+++ b/src/heretic/p_spec.h
@@ -253,11 +253,11 @@
 */
 typedef enum
 {
-    normal,
-    close30ThenOpen,
-    close,
-    open,
-    raiseIn5Mins
+    vld_normal,
+    vld_close30ThenOpen,
+    vld_close,
+    vld_open,
+    vld_raiseIn5Mins
 } vldoor_e;
 
 typedef struct
--- a/src/heretic/p_switch.c
+++ b/src/heretic/p_switch.c
@@ -302,7 +302,7 @@
                 P_ChangeSwitchTexture(line, 0);
             break;
         case 29:               // Raise Door
-            if (EV_DoDoor(line, normal, VDOORSPEED))
+            if (EV_DoDoor(line, vld_normal, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 0);
             break;
         case 41:               // Lower Ceiling to Floor
@@ -318,7 +318,7 @@
                 P_ChangeSwitchTexture(line, 0);
             break;
         case 50:               // Close Door
-            if (EV_DoDoor(line, close, VDOORSPEED))
+            if (EV_DoDoor(line, vld_close, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 0);
             break;
         case 51:               // Secret EXIT
@@ -338,7 +338,7 @@
                 P_ChangeSwitchTexture(line, 0);
             break;
         case 103:              // Open Door
-            if (EV_DoDoor(line, open, VDOORSPEED))
+            if (EV_DoDoor(line, vld_open, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 0);
             break;
             //===============================================
@@ -345,7 +345,7 @@
             //      BUTTONS
             //===============================================
         case 42:               // Close Door
-            if (EV_DoDoor(line, close, VDOORSPEED))
+            if (EV_DoDoor(line, vld_close, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 1);
             break;
         case 43:               // Lower Ceiling to Floor
@@ -361,7 +361,7 @@
                 P_ChangeSwitchTexture(line, 1);
             break;
         case 61:               // Open Door
-            if (EV_DoDoor(line, open, VDOORSPEED))
+            if (EV_DoDoor(line, vld_open, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 1);
             break;
         case 62:               // PlatDownWaitUpStay
@@ -369,7 +369,7 @@
                 P_ChangeSwitchTexture(line, 1);
             break;
         case 63:               // Raise Door
-            if (EV_DoDoor(line, normal, VDOORSPEED))
+            if (EV_DoDoor(line, vld_normal, VDOORSPEED))
                 P_ChangeSwitchTexture(line, 1);
             break;
         case 64:               // Raise Floor to ceiling
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -918,12 +918,12 @@
 
         case MT_TOKEN_DOOR1: // Door special 1
             junk.tag = 222;
-            EV_DoDoor(&junk, open);
+            EV_DoDoor(&junk, vld_open);
             break;
 
         case MT_TOKEN_PRISON_PASS: // Door special 1 - Prison pass
             junk.tag = 223;
-            EV_DoDoor(&junk, open);
+            EV_DoDoor(&junk, vld_open);
             if(gamemap == 2) // If on Tarnhill, give Prison pass object
                 P_GiveInventoryItem(player, sprnum, type);
             break;
@@ -930,12 +930,12 @@
 
         case MT_TOKEN_SHOPCLOSE: // Door special 3 - "Shop close" - unused?
             junk.tag = 222;
-            EV_DoDoor(&junk, close);
+            EV_DoDoor(&junk, vld_close);
             break;
 
         case MT_TOKEN_DOOR3: // Door special 4 (or 3? :P ) 
             junk.tag = 224;
-            EV_DoDoor(&junk, close);
+            EV_DoDoor(&junk, vld_close);
             break;
 
         case MT_TOKEN_STAMINA: // Stamina upgrade
--- a/src/strife/p_doors.c
+++ b/src/strife/p_doors.c
@@ -58,12 +58,12 @@
         {
             switch(door->type)
             {
-            case blazeRaise:
+            case vld_blazeRaise:
                 door->direction = -1; // time to go back down
                 S_StartSound(&door->sector->soundorg, sfx_bdcls);
                 break;
 
-            case normal:
+            case vld_normal:
                 door->direction = -1; // time to go back down
                 // villsa [STRIFE] closesound added
                 S_StartSound(&door->sector->soundorg, door->closesound);
@@ -70,13 +70,13 @@
                 break;
 
                 // villsa [STRIFE]
-            case shopClose:
+            case vld_shopClose:
                 door->direction = 1;
                 door->speed = (2*FRACUNIT);
                 S_StartSound(&door->sector->soundorg, door->opensound);
                 break;
 
-            case close30ThenOpen:
+            case vld_close30ThenOpen:
                 door->direction = 1;
 
                 // villsa [STRIFE] opensound added
@@ -95,9 +95,9 @@
         {
             switch(door->type)
             {
-            case raiseIn5Mins:
+            case vld_raiseIn5Mins:
                 door->direction = 1;
-                door->type = normal;
+                door->type = vld_normal;
 
                 // villsa [STRIFE] opensound added
                 S_StartSound(&door->sector->soundorg, door->opensound);
@@ -130,22 +130,22 @@
         {
             switch(door->type)
             {
-            case normal:
-            case close:
-            case blazeRaise:
-            case blazeClose:
+            case vld_normal:
+            case vld_close:
+            case vld_blazeRaise:
+            case vld_blazeClose:
                 door->sector->specialdata = NULL;
                 P_RemoveThinker (&door->thinker);  // unlink and free
                 // villsa [STRIFE] no sounds
                 break;
 
-            case close30ThenOpen:
+            case vld_close30ThenOpen:
                 door->direction = 0;
                 door->topcountdown = TICRATE*30;
                 break;
 
                 // villsa [STRIFE]
-            case shopClose:
+            case vld_shopClose:
                 door->direction = 0;
                 door->topcountdown = TICRATE*120;
                 break;
@@ -158,9 +158,9 @@
         {
             switch(door->type)
             {
-            case blazeClose:
-            case close:		// DO NOT GO BACK UP!
-            case shopClose:     // villsa [STRIFE]
+            case vld_blazeClose:
+            case vld_close:		// DO NOT GO BACK UP!
+            case vld_shopClose:     // villsa [STRIFE]
                 break;
 
             default:
@@ -183,16 +183,16 @@
         {
             switch(door->type)
             {
-            case blazeRaise:
-            case normal:
+            case vld_blazeRaise:
+            case vld_normal:
                 door->direction = 0; // wait at top
                 door->topcountdown = door->topwait;
                 break;
 
-            case close30ThenOpen:
-            case blazeOpen:
-            case open:
-            case shopClose:     // villsa [STRIFE]
+            case vld_close30ThenOpen:
+            case vld_blazeOpen:
+            case vld_open:
+            case vld_shopClose:     // villsa [STRIFE]
                 door->sector->specialdata = NULL;
                 P_RemoveThinker (&door->thinker);  // unlink and free
                 break;
@@ -407,7 +407,7 @@
         switch(type)
         {
             // villsa [STRIFE] new door type
-        case splitOpen:
+        case vld_splitOpen:
             door->direction = -2;
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
@@ -421,7 +421,7 @@
             break;
 
             // villsa [STRIFE] new door type
-        case splitRaiseNearest:
+        case vld_splitRaiseNearest:
             door->direction = -2;
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
@@ -434,8 +434,8 @@
             S_StartSound(&sec->soundorg, door->opensound);
             break;
 
-        case blazeClose:
-        case shopClose:     // villsa [STRIFE]
+        case vld_blazeClose:
+        case vld_shopClose:     // villsa [STRIFE]
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
             door->direction = -1;
@@ -443,7 +443,7 @@
             S_StartSound(&door->sector->soundorg, sfx_bdcls);
             break;
 
-        case close:
+        case vld_close:
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
             door->direction = -1;
@@ -452,7 +452,7 @@
             S_StartSound(&door->sector->soundorg, door->opensound);
             break;
 
-        case close30ThenOpen:
+        case vld_close30ThenOpen:
             door->topheight = sec->ceilingheight;
             door->direction = -1;
 
@@ -460,8 +460,8 @@
             S_StartSound(&door->sector->soundorg, door->closesound);
             break;
 
-        case blazeRaise:
-        case blazeOpen:
+        case vld_blazeRaise:
+        case vld_blazeOpen:
             door->direction = 1;
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
@@ -470,8 +470,8 @@
                 S_StartSound(&door->sector->soundorg, sfx_bdopn);
             break;
 
-        case normal:
-        case open:
+        case vld_normal:
+        case vld_open:
             door->direction = 1;
             door->topheight = P_FindLowestCeilingSurrounding(sec);
             door->topheight -= 4*FRACUNIT;
@@ -826,7 +826,7 @@
     case 26:
     case 27:
     case 28:
-        door->type = normal;
+        door->type = vld_normal;
         break;
 
     case 31:
@@ -836,17 +836,17 @@
     case 156:   // villsa [STRIFE]
     case 157:   // villsa [STRIFE]
     case 158:   // villsa [STRIFE]
-        door->type = open;
+        door->type = vld_open;
         line->special = 0;
         break;
 
     case 117:	// blazing door raise
-        door->type = blazeRaise;
+        door->type = vld_blazeRaise;
         door->speed = VDOORSPEED*4;
         break;
 
     case 118:	// blazing door open
-        door->type = blazeOpen;
+        door->type = vld_blazeOpen;
         line->special = 0;
         door->speed = VDOORSPEED*4;
         break;
@@ -853,7 +853,7 @@
 
     default:
         // haleyjd: [STRIFE] pretty important to have this here!
-        door->type = normal;
+        door->type = vld_normal;
         break;
     }
 
@@ -880,7 +880,7 @@
     door->thinker.function.acp1 = (actionf_p1)T_VerticalDoor;
     door->sector = sec;
     door->direction = 0;
-    door->type = normal;
+    door->type = vld_normal;
     door->speed = VDOORSPEED;
     door->topcountdown = 30 * TICRATE;
 }
@@ -905,7 +905,7 @@
     door->thinker.function.acp1 = (actionf_p1)T_VerticalDoor;
     door->sector = sec;
     door->direction = 2;
-    door->type = raiseIn5Mins;
+    door->type = vld_raiseIn5Mins;
     door->speed = VDOORSPEED;
     door->topheight = P_FindLowestCeilingSurrounding(sec);
     door->topheight -= 4*FRACUNIT;
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -2333,7 +2333,7 @@
     line_t junk;
 
     junk.tag = 999;
-    EV_DoDoor(&junk, blazeClose);
+    EV_DoDoor(&junk, vld_blazeClose);
 
     if(actor->target && actor->target->player)
         P_NoiseAlert(actor->target, actor); // inlined in asm
@@ -2351,7 +2351,7 @@
     line_t junk;
 
     junk.tag = 999;
-    EV_DoDoor(&junk, shopClose);
+    EV_DoDoor(&junk, vld_shopClose);
 
     if(actor->target && actor->target->player)
         P_NoiseAlert(actor->target, actor); // inlined in asm
@@ -3018,7 +3018,7 @@
             GiveVoiceObjective("VOC87", "LOG87", 0);
         }
         junk.tag = 222;         // Open the exit door again;
-        EV_DoDoor(&junk, open); // Note this is NOT the Loremaster door...
+        EV_DoDoor(&junk, vld_open); // Note this is NOT the Loremaster door...
         break;
 
     case MT_SPECTRE_D:
--- a/src/strife/p_inter.c
+++ b/src/strife/p_inter.c
@@ -939,7 +939,7 @@
 
         case MT_COUPLING:
             junk.tag = 225;
-            EV_DoDoor(&junk, close);
+            EV_DoDoor(&junk, vld_close);
 
             junk.tag = 44;
             EV_DoFloor(&junk, lowerFloor);
@@ -960,7 +960,7 @@
     {
     case MT_TOKEN_SHOPCLOSE:
         junk.tag = 222;
-        EV_DoDoor(&junk, close);
+        EV_DoDoor(&junk, vld_close);
         P_NoiseAlert(players[0].mo, players[0].mo);
 
         M_snprintf(plrkilledmsg, sizeof(plrkilledmsg),
@@ -972,12 +972,12 @@
 
     case MT_TOKEN_PRISON_PASS:
         junk.tag = 223;
-        EV_DoDoor(&junk, open);
+        EV_DoDoor(&junk, vld_open);
         return;
 
     case MT_TOKEN_DOOR3:
         junk.tag = 224;
-        EV_DoDoor(&junk, open);
+        EV_DoDoor(&junk, vld_open);
         return;
 
     case MT_SIGIL_A:
--- a/src/strife/p_spec.c
+++ b/src/strife/p_spec.c
@@ -648,7 +648,7 @@
         // fall-through:
     case 2:
         // Open Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,open);
+        EV_DoDoor(line,vld_open);
         line->special = 0;
         break;
 
@@ -662,13 +662,13 @@
         // fall-through:
     case 3:
         // Close Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,close);
+        EV_DoDoor(line,vld_close);
         line->special = 0;
         break;
 
     case 4:
         // Raise Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,normal);
+        EV_DoDoor(line,vld_normal);
         line->special = 0;
         break;
 
@@ -710,7 +710,7 @@
 
     case 16:
         // Close Door 30 - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,close30ThenOpen);
+        EV_DoDoor(line,vld_close30ThenOpen);
         line->special = 0;
         break;
 
@@ -848,13 +848,13 @@
 
     case 108:
         // Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeRaise);
+        EV_DoDoor (line,vld_blazeRaise);
         line->special = 0;
         break;
 
     case 109:
         // Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeOpen);
+        EV_DoDoor (line,vld_blazeOpen);
         line->special = 0;
         break;
 
@@ -871,7 +871,7 @@
         // fall-through:
     case 110:
         // Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeClose);
+        EV_DoDoor (line,vld_blazeClose);
         line->special = 0;
         break;
 
@@ -918,13 +918,13 @@
 
     case 174:
         // villsa [STRIFE] Split Open
-        EV_DoDoor(line, splitOpen);
+        EV_DoDoor(line, vld_splitOpen);
         line->special = 0;
         break;
 
     case 183:
         // villsa [STRIFE] Split Raise Nearest
-        EV_DoDoor(line, splitRaiseNearest);
+        EV_DoDoor(line, vld_splitRaiseNearest);
         line->special = 0;
         break;
 
@@ -967,7 +967,7 @@
         // Destroyed)
         if(!(thing->player->questflags & QF_QUEST16))
             break;
-        EV_DoDoor(line, open);
+        EV_DoDoor(line, vld_open);
         line->special = 0;
         break;
 
@@ -984,7 +984,7 @@
         // haleyjd 09/21/10: [STRIFE] W1 Open Door if Sigil Owned
         if(!(thing->player->weaponowned[wp_sigil]))
             break;
-        EV_DoDoor(line, open);
+        EV_DoDoor(line, vld_open);
         line->special = 0;
         break;
 
@@ -1124,12 +1124,12 @@
 
     case 75:
         // Close Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,close);
+        EV_DoDoor(line,vld_close);
         break;
 
     case 76:
         // Close Door 30 - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,close30ThenOpen);
+        EV_DoDoor(line,vld_close30ThenOpen);
         break;
 
     case 77:
@@ -1169,7 +1169,7 @@
 
     case 86:
         // Open Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,open);
+        EV_DoDoor(line,vld_open);
         break;
 
     case 87:
@@ -1197,7 +1197,7 @@
         // fall-through:
     case 90: 
         // Raise Door - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,normal);
+        EV_DoDoor(line,vld_normal);
         break;
 
     case 91:
@@ -1246,17 +1246,17 @@
 
     case 105:
         // Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeRaise);
+        EV_DoDoor (line,vld_blazeRaise);
         break;
 
     case 106:
         // Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeOpen);
+        EV_DoDoor (line,vld_blazeOpen);
         break;
 
     case 107:
         // Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified.
-        EV_DoDoor (line,blazeClose);
+        EV_DoDoor (line,vld_blazeClose);
         break;
 
     case 120:
@@ -1438,7 +1438,7 @@
 
     case 46:
         // OPEN DOOR - [STRIFE] Verified unmodified.
-        EV_DoDoor(line,open);
+        EV_DoDoor(line,vld_open);
         P_ChangeSwitchTexture(line,1);
         break;
 
--- a/src/strife/p_spec.h
+++ b/src/strife/p_spec.h
@@ -339,17 +339,17 @@
 //
 typedef enum
 {
-    normal,
-    close30ThenOpen,
-    close,
-    open,
-    raiseIn5Mins,
-    blazeRaise,
-    blazeOpen,
-    blazeClose,
-    shopClose,          // villsa [STRIFE]
-    splitRaiseNearest,  // villsa [STRIFE]
-    splitOpen           // villsa [STRIFE]
+    vld_normal,
+    vld_close30ThenOpen,
+    vld_close,
+    vld_open,
+    vld_raiseIn5Mins,
+    vld_blazeRaise,
+    vld_blazeOpen,
+    vld_blazeClose,
+    vld_shopClose,          // villsa [STRIFE]
+    vld_splitRaiseNearest,  // villsa [STRIFE]
+    vld_splitOpen           // villsa [STRIFE]
 
 } vldoor_e;
 
--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -576,13 +576,13 @@
 
     case 29:
         // Raise Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,normal))
+        if (EV_DoDoor(line,vld_normal))
             P_ChangeSwitchTexture(line,0);
         break;
 
     case 40:
         // villsa [STRIFE] Split Open Door
-        if(EV_DoDoor(line, splitOpen))
+        if(EV_DoDoor(line, vld_splitOpen))
             P_ChangeSwitchTexture(line, 0);
         break; // haleyjd
 
@@ -594,7 +594,7 @@
 
     case 42:
         // Close Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,close))
+        if (EV_DoDoor(line,vld_close))
             P_ChangeSwitchTexture(line,1);
         break;
 
@@ -618,7 +618,7 @@
 
     case 50:
         // Close Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,close))
+        if (EV_DoDoor(line,vld_close))
             P_ChangeSwitchTexture(line,0);
         break;
 
@@ -642,7 +642,7 @@
 
     case 61:
         // Open Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,open))
+        if (EV_DoDoor(line,vld_open))
             P_ChangeSwitchTexture(line,1);
         break;
 
@@ -654,7 +654,7 @@
 
     case 63:
         // Raise Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,normal))
+        if (EV_DoDoor(line,vld_normal))
             P_ChangeSwitchTexture(line,1);
         break;
 
@@ -720,43 +720,43 @@
 
     case 103:
         // Open Door - [STRIFE] Verified unmodified
-        if (EV_DoDoor(line,open))
+        if (EV_DoDoor(line,vld_open))
             P_ChangeSwitchTexture(line,0);
         break;
 
     case 111:
         // Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeRaise))
+        if (EV_DoDoor (line,vld_blazeRaise))
             P_ChangeSwitchTexture(line,0);
         break;
 
     case 112:
         // Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeOpen))
+        if (EV_DoDoor (line,vld_blazeOpen))
             P_ChangeSwitchTexture(line,0);
         break;
 
     case 113:
         // Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeClose))
+        if (EV_DoDoor (line,vld_blazeClose))
             P_ChangeSwitchTexture(line,0);
         break;
     
     case 114:
         // Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeRaise))
+        if (EV_DoDoor (line,vld_blazeRaise))
             P_ChangeSwitchTexture(line,1);
         break;
 
     case 115:
         // Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeOpen))
+        if (EV_DoDoor (line,vld_blazeOpen))
             P_ChangeSwitchTexture(line,1);
         break;
 
     case 116:
         // Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified
-        if (EV_DoDoor (line,blazeClose))
+        if (EV_DoDoor (line,vld_blazeClose))
             P_ChangeSwitchTexture(line,1);
         break;
 
@@ -793,7 +793,7 @@
     case 133: // [STRIFE] TODO - which key is it?
     case 135: // [STRIFE] TODO - which key is it?
     case 137: // [STRIFE] TODO - which key is it?
-        if (EV_DoLockedDoor (line,blazeOpen,thing))
+        if (EV_DoLockedDoor (line,vld_blazeOpen,thing))
             P_ChangeSwitchTexture(line,0);
         break;
 
@@ -800,7 +800,7 @@
     case 99:  // [STRIFE] TODO: which key is it?
     case 134: // [STRIFE] TODO: which key is it?
     case 136: // [STRIFE] TODO: which key is it?
-        if (EV_DoLockedDoor (line,blazeOpen,thing))
+        if (EV_DoLockedDoor (line,vld_blazeOpen,thing))
             P_ChangeSwitchTexture(line,1);
         break;
 
@@ -848,7 +848,7 @@
     case 151: // villsa [STRIFE] BlzOpenDoor Gold key
     case 152: // [STRIFE] TODO: which key is it?
     case 153: // [STRIFE] TODO: which key is it?
-        if(EV_DoLockedDoor(line, blazeOpen, thing))
+        if(EV_DoLockedDoor(line, vld_blazeOpen, thing))
             P_ChangeSwitchTexture(line, 1);
         break;
 
@@ -876,19 +876,19 @@
     case 163: // [STRIFE] TODO: which key is it?
     case 164: // villsa [STRIFE] BlzOpenDoor Gold key
     case 167: // [STRIFE] TODO: which key is it?
-        if(EV_DoLockedDoor(line, blazeOpen, thing))
+        if(EV_DoLockedDoor(line, vld_blazeOpen, thing))
             P_ChangeSwitchTexture(line, 0);
         break;
 
     case 168: // [STRIFE] TODO: which key is it?
         // haleyjd 09/25/10: [STRIFE] SR Blaze Open Door ???? Key
-        if(EV_DoLockedDoor(line, blazeOpen, thing))
+        if(EV_DoLockedDoor(line, vld_blazeOpen, thing))
             P_ChangeSwitchTexture(line, 1);
         break;
 
     case 171: // [STRIFE] TODO: which key is it?
         // haleyjd 09/25/10: [STRIFE] S1 Open Door ???? Key
-        if(EV_DoLockedDoor(line, open, thing))
+        if(EV_DoLockedDoor(line, vld_open, thing))
             P_ChangeSwitchTexture(line, 0);
         break;
 
@@ -898,7 +898,7 @@
     case 191: // [STRIFE] TODO: which key is it?
     case 192: // [STRIFE] TODO: which key is it?
     case 223: // [STRIFE] TODO: which key is it?
-        if(EV_DoLockedDoor(line, normal, thing))
+        if(EV_DoLockedDoor(line, vld_normal, thing))
             P_ChangeSwitchTexture(line, 1);
         break;
 
@@ -924,13 +924,13 @@
 
     case 189: // [STRIFE] TODO: which key is it???
         // haleyjd 09/25/10: [STRIFE] S1 Split Open Door ???? Key
-        if(EV_DoLockedDoor(line, splitOpen, thing))
+        if(EV_DoLockedDoor(line, vld_splitOpen, thing))
             P_ChangeSwitchTexture(line, 0);
         break;
 
     case 194:
         // villsa [STRIFE] S1 Free Prisoners
-        if(EV_DoDoor(line, open))
+        if(EV_DoDoor(line, vld_open))
         {
             P_ChangeSwitchTexture(line, 0);
             P_FreePrisoners();
@@ -1028,7 +1028,7 @@
 
     case 233:
         // villsa [STRIFE] objective given after revealing the computer
-        if(!EV_DoDoor(line, splitOpen))
+        if(!EV_DoDoor(line, vld_splitOpen))
             return true;
 
         P_ChangeSwitchTexture(line, 1);
@@ -1051,7 +1051,7 @@
                          "That doesn't seem to work!");
             thing->player->message = usemessage;
         }
-        else if(EV_DoDoor(line, normal))
+        else if(EV_DoDoor(line, vld_normal))
             P_ChangeSwitchTexture(line, 1);
         break;
 
@@ -1059,7 +1059,7 @@
         // haleyjd 09/25/10: [STRIFE] S1 Split Open Door if Have Sigil 4
         if(thing->player->sigiltype == 4)
         {
-            if(EV_DoDoor(line, splitOpen))
+            if(EV_DoDoor(line, vld_splitOpen))
                 P_ChangeSwitchTexture(line, 0);
         }
         break;