Skip to content
Snippets Groups Projects
Commit 7779eb8e authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*removed unnecessary logic for keeping carriage returns to avoid having an...

*removed unnecessary logic for keeping carriage returns to avoid having an empty line at the top of the console after clearing console
parent ae2d5df7
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ static void dopost(const char *s) ...@@ -23,9 +23,9 @@ static void dopost(const char *s)
{ {
char upbuf[MAXPDSTRING]; char upbuf[MAXPDSTRING];
int ptin = 0, ptout = 0, len = strlen(s); int ptin = 0, ptout = 0, len = strlen(s);
static int heldcr = 0; //static int heldcr = 0;
if (heldcr) //if (heldcr)
upbuf[ptout++] = '\n', heldcr = 0; // upbuf[ptout++] = '\n', heldcr = 0;
for (; ptin < len && ptout < MAXPDSTRING-3; for (; ptin < len && ptout < MAXPDSTRING-3;
ptin++, ptout++) ptin++, ptout++)
{ {
...@@ -34,8 +34,8 @@ static void dopost(const char *s) ...@@ -34,8 +34,8 @@ static void dopost(const char *s)
upbuf[ptout++] = '\\'; upbuf[ptout++] = '\\';
upbuf[ptout] = s[ptin]; upbuf[ptout] = s[ptin];
} }
if (ptout && upbuf[ptout-1] == '\n') //if (ptout && upbuf[ptout-1] == '\n')
upbuf[--ptout] = 0, heldcr = 1; // upbuf[--ptout] = 0, heldcr = 1;
upbuf[ptout] = 0; upbuf[ptout] = 0;
sys_vgui("pdtk_post {%s}\n", upbuf); sys_vgui("pdtk_post {%s}\n", upbuf);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment