mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
rename the width parameter to lsize as it's the size of the input line, not
the drawn width
This commit is contained in:
parent
6d63d1d55b
commit
d1460f6166
2 changed files with 5 additions and 5 deletions
|
@ -102,7 +102,7 @@ void Con_BasicCompleteCommandLine (inputline_t *il);
|
||||||
// formatted in columns on the console
|
// formatted in columns on the console
|
||||||
void Con_DisplayList(const char **list, int con_linewidth);
|
void Con_DisplayList(const char **list, int con_linewidth);
|
||||||
|
|
||||||
inputline_t *Con_CreateInputLine (int lines, int width, char prompt);
|
inputline_t *Con_CreateInputLine (int lines, int lsize, char prompt);
|
||||||
void Con_DestroyInputLine (inputline_t *inputline);
|
void Con_DestroyInputLine (inputline_t *inputline);
|
||||||
void Con_ClearTyping (inputline_t *il);
|
void Con_ClearTyping (inputline_t *il);
|
||||||
void Con_ProcessInputLine (inputline_t *il, int ch);
|
void Con_ProcessInputLine (inputline_t *il, int ch);
|
||||||
|
|
|
@ -48,7 +48,7 @@ static const char rcsid[] =
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
struct inputline_s *
|
struct inputline_s *
|
||||||
Con_CreateInputLine (int lines, int width, char prompt)
|
Con_CreateInputLine (int lines, int lsize, char prompt)
|
||||||
{
|
{
|
||||||
char *l, **p;
|
char *l, **p;
|
||||||
int size;
|
int size;
|
||||||
|
@ -57,7 +57,7 @@ Con_CreateInputLine (int lines, int width, char prompt)
|
||||||
|
|
||||||
size = sizeof (inputline_t); // space for the header
|
size = sizeof (inputline_t); // space for the header
|
||||||
size += sizeof (char *[lines]); // space for the line pointers
|
size += sizeof (char *[lines]); // space for the line pointers
|
||||||
size += lines * width; // space for the lines themselves
|
size += lines * lsize; // space for the lines themselves
|
||||||
|
|
||||||
inputline = calloc (1, size);
|
inputline = calloc (1, size);
|
||||||
p = (char**)(inputline + 1);
|
p = (char**)(inputline + 1);
|
||||||
|
@ -65,10 +65,10 @@ Con_CreateInputLine (int lines, int width, char prompt)
|
||||||
|
|
||||||
inputline->lines = p;
|
inputline->lines = p;
|
||||||
inputline->num_lines = lines;
|
inputline->num_lines = lines;
|
||||||
inputline->line_size = width;
|
inputline->line_size = lsize;
|
||||||
while (lines--) {
|
while (lines--) {
|
||||||
*p++ = l;
|
*p++ = l;
|
||||||
l += width;
|
l += lsize;
|
||||||
}
|
}
|
||||||
inputline->prompt_char = prompt;
|
inputline->prompt_char = prompt;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue