Getting the return value of write() for now. Will do something with it in a future commit.

modified:   src/nmstermio.c
This commit is contained in:
Brian Barto 2018-10-24 20:41:23 -04:00
parent cd912b65a8
commit 86181d9b52
1 changed files with 2 additions and 2 deletions

View File

@ -257,14 +257,14 @@ void nmstermio_set_foregroundcolor(char *c) {
* reading/parsing its response.
*/
int nmstermio_get_cursor_row(void) {
int i, r = 0;
int i, r;
int row = 0;
char buf[10];
char *cmd = "\033[6n";
memset(buf, 0, sizeof(buf));
write(STDOUT_FILENO, cmd, strlen(cmd));
r = write(STDOUT_FILENO, cmd, strlen(cmd));
r = read(STDIN_FILENO, buf, sizeof(buf));