mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-06-02 18:11:12 +00:00
Cleaned up a lot of fixmes.
This commit is contained in:
parent
e73ff67bf3
commit
c316ae0069
4 changed files with 12 additions and 64 deletions
29
source/cmd.c
29
source/cmd.c
|
@ -137,35 +137,9 @@ Cbuf_InsertText
|
|||
|
||||
Adds command text immediately after the current command
|
||||
Adds a \n to the text
|
||||
FIXME: actually change the command buffer to do less copying
|
||||
TODO: Can we just read the buffer in the reverse order?
|
||||
============
|
||||
*/
|
||||
#if 0 // Tonik
|
||||
void
|
||||
Cbuf_InsertText (char *text)
|
||||
{
|
||||
char *temp;
|
||||
int templen;
|
||||
|
||||
// copy off any commands still remaining in the exec buffer
|
||||
templen = cmd_text.cursize;
|
||||
if (templen) {
|
||||
temp = malloc (templen);
|
||||
memcpy (temp, cmd_text.data, templen);
|
||||
SZ_Clear (&cmd_text);
|
||||
} else
|
||||
temp = NULL; // shut up compiler
|
||||
|
||||
// add the entire text of the file
|
||||
Cbuf_AddText (text);
|
||||
SZ_Write (&cmd_text, "\n", 1);
|
||||
// add the copied off data
|
||||
if (templen) {
|
||||
SZ_Write (&cmd_text, temp, templen);
|
||||
free (temp);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void
|
||||
Cbuf_InsertText (char *text)
|
||||
{
|
||||
|
@ -190,7 +164,6 @@ Cbuf_InsertText (char *text)
|
|||
memcpy (cmd_text.data, text, textlen);
|
||||
cmd_text.data[textlen] = '\n';
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue