-// LordHavoc: grabbed these from QWSV, works around a gcc 2.95.3 compiler bug
-#define MAX_PRSTR 65536
-static char *pr_strtbl[MAX_PRSTR];
-static int num_prstr;
-
-char *PR_GetString (int num)
-{
- return num >= 0 ? pr_strings + num : pr_strtbl[-num];
-}
-
-int PR_SetString (char *s)
-{
- if (s >= pr_strings)
- return (int) (s - pr_strings);
- else
- {
- int i;
- for (i = 0; i <= num_prstr; i++)
- if (pr_strtbl[i] == s)
- return -i;
- if (num_prstr >= (MAX_PRSTR - 1))
- Host_Error ("PR_Setstring: ran out of string table slots");
- pr_strtbl[++num_prstr] = s;
- return -num_prstr;
- }
-}
-