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:
parent
cd912b65a8
commit
86181d9b52
@ -257,14 +257,14 @@ void nmstermio_set_foregroundcolor(char *c) {
|
|||||||
* reading/parsing its response.
|
* reading/parsing its response.
|
||||||
*/
|
*/
|
||||||
int nmstermio_get_cursor_row(void) {
|
int nmstermio_get_cursor_row(void) {
|
||||||
int i, r = 0;
|
int i, r;
|
||||||
int row = 0;
|
int row = 0;
|
||||||
char buf[10];
|
char buf[10];
|
||||||
char *cmd = "\033[6n";
|
char *cmd = "\033[6n";
|
||||||
|
|
||||||
memset(buf, 0, sizeof(buf));
|
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));
|
r = read(STDIN_FILENO, buf, sizeof(buf));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user