| 700 | } |
| 701 | |
| 702 | void ParseLine(char *srcline, char *command, char *operand, int cmdlen, int oprlen) { |
| 703 | // tokenize line. |
| 704 | char *opr, *cmd; |
| 705 | |
| 706 | if (strlen(srcline) == 0) |
| 707 | return; |
| 708 | |
| 709 | // parse out command and operand (command=str) |
| 710 | // m_lineptr = command, opr = operand, nextcmd = next lineptr. |
| 711 | cmd = strtok(srcline, " \t=:"); |
| 712 | if (cmd) |
| 713 | opr = strtok(NULL, ""); |
| 714 | else |
| 715 | return; // null command, so bail |
| 716 | |
| 717 | // clean out trailing and preceeding trash (tabs, spaces, etc) |
| 718 | CleanupStr(command, cmd, cmdlen); |
| 719 | if (opr) |
| 720 | CleanupStr(operand, opr, oprlen); |
| 721 | else |
| 722 | operand[0] = 0; |
| 723 | } |
| 724 | |
| 725 | // Called once per frame for the dedicated server |
| 726 | void DoDedicatedServerFrame() { |
no test coverage detected