]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_edict.c
now supports Mac and Windows newlines everywhere
[xonotic/darkplaces.git] / pr_edict.c
index 2ea21f97ffde0ba94e64756c11d6b2d90e3174cd..efb884bd9bb335fe8c280eeec9870133c7181a37 100644 (file)
@@ -931,6 +931,8 @@ char *ED_NewString (const char *string)
                        i++;
                        if (string[i] == 'n')
                                *new_p++ = '\n';
+                       else if (string[i] == 'r')
+                               *new_p++ = '\r';
                        else
                                *new_p++ = '\\';
                }
@@ -1296,7 +1298,7 @@ void PR_LoadProgs (const char *progsname)
        ddef_t *infielddefs;
        dfunction_t *dfunctions;
 
-       if (!progsname || !*progsname) 
+       if (!progsname || !*progsname)
                Host_Error("PR_LoadProgs: passed empty progsname");
 
 // flush the non-C variable lookup cache
@@ -1676,6 +1678,20 @@ void PR_Init (void)
        PR_Cmd_Init();
 }
 
+/*
+===============
+PR_Shutdown
+===============
+*/
+extern void PR_Cmd_Shutdown(void);
+void PR_Shutdown (void)
+{
+       PR_Cmd_Shutdown();
+
+       Mem_FreePool(&edictstring_mempool);
+       Mem_FreePool(&progs_mempool);
+}
+
 // LordHavoc: turned EDICT_NUM into a #define for speed reasons
 edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline)
 {