+ {
+ Con_Print(", ");
+ Con_Print(PRVM_GlobalStringNoContents((unsigned short) s->c));
+ }
+ }
+ Con_Print("\n");
+}
+
+void PRVM_PrintFunctionStatements (const char *name)
+{
+ int i, firststatement, endstatement;
+ mfunction_t *func;
+ func = PRVM_ED_FindFunction (name);
+ if (!func)
+ {
+ Con_Printf("%s progs: no function named %s\n", PRVM_NAME, name);
+ return;
+ }
+ firststatement = func->first_statement;
+ if (firststatement < 0)
+ {
+ Con_Printf("%s progs: function %s is builtin #%i\n", PRVM_NAME, name, -firststatement);
+ return;
+ }
+
+ // find the end statement
+ endstatement = prog->progs->numstatements;
+ for (i = 0;i < prog->progs->numfunctions;i++)
+ if (endstatement > prog->functions[i].first_statement && firststatement < prog->functions[i].first_statement)
+ endstatement = prog->functions[i].first_statement;
+
+ // now print the range of statements
+ Con_Printf("%s progs: disassembly of function %s (statements %i-%i):\n", PRVM_NAME, name, firststatement, endstatement);
+ for (i = firststatement;i < endstatement;i++)
+ {
+ PRVM_PrintStatement(prog->statements + i);
+ prog->statement_profile[i] = 0;