back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/windows_client
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-08-30 16:04:43 +0300
committerscratko <m@scratko.xyz>2024-08-30 21:01:53 +0300
commitbedb024261f6539d0517430e88cfaa1e78e6e955 (patch)
tree35cf5a44b8e555de4b241653be5b5b2736a6726d /windows_client
parent831f9f01fbe4088eb6bd378c0e417d9996b676fd (diff)
downloaddurak-master.tar.gz
durak-master.tar.bz2
durak-master.zip
Changed readmeHEADmaster
Diffstat (limited to 'windows_client')
-rw-r--r--windows_client/client.c8
-rw-r--r--windows_client/client.h3
2 files changed, 5 insertions, 6 deletions
diff --git a/windows_client/client.c b/windows_client/client.c
index 521dd0f..0388e34 100644
--- a/windows_client/client.c
+++ b/windows_client/client.c
@@ -211,14 +211,14 @@ static int fill_in_buffer(struct client *cl, int *data_size,
/* the data has not yet been entered up to the newline character */
if(!end_status && input_status) {
for(; (key = _getch()) != '\r'; ) {
- if(key == back && buffer_idx > 0) {
+ if(key == backspace && buffer_idx > 0) {
--buffer_idx;
cl->buffer[buffer_idx] = '\0';
- putchar(back);
+ putchar(backspace);
putchar(' ');
- putchar(back);
+ putchar(backspace);
continue;
- } else if(key == back)
+ } else if(key == backspace)
continue;
cl->buffer[buffer_idx] = key;
++buffer_idx;
diff --git a/windows_client/client.h b/windows_client/client.h
index f3b1ce8..060afcd 100644
--- a/windows_client/client.h
+++ b/windows_client/client.h
@@ -8,8 +8,7 @@ enum {
max_cot_arr_size = 18,
card_size = 4,
max_cq_arr_size = 5,
- backspace = 127,
- back = 8
+ backspace = 8
};
enum client_states {