diff options
author | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 |
commit | 98a8ac8498974e499fc129878ab05b9a7bf8ba30 (patch) | |
tree | 2914967687516632a93da9af59818f22d3120861 /src/mds-vt.c | |
parent | Update e-mail (diff) | |
download | mds-master.tar.gz mds-master.tar.bz2 mds-master.tar.xz |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/mds-vt.c')
-rw-r--r-- | src/mds-vt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mds-vt.c b/src/mds-vt.c index 7a34dd6..9d6c0a0 100644 --- a/src/mds-vt.c +++ b/src/mds-vt.c @@ -1,6 +1,6 @@ /** * mds — A micro-display server - * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (maandree@kth.se) + * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (m@maandree.se) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -558,7 +558,7 @@ handle_message(void) size_t i; #define __get_header(storage, header)\ - (startswith(received.headers[i], header))\ + (strstarts(received.headers[i], header))\ storage = received.headers[i] + strlen(header) for (i = 0; i < received.header_count; i++) { @@ -576,7 +576,7 @@ handle_message(void) if (!recv_message_id) return eprint("received message without ID, ignoring, master server is misbehaving."), 0; - if (strequals(recv_client_id, "0:0")) + if (streq(recv_client_id, "0:0")) return eprint("received information request from an anonymous client, ignoring."), 0; if (strlen(recv_client_id) > 21) @@ -589,10 +589,10 @@ handle_message(void) if (!recv_command) return 0; /* How did that get here, no matter, just ignore it? */ - if (strequals(recv_command, "get-vt")) + if (streq(recv_command, "get-vt")) fail_if (handle_get_vt(recv_client_id, recv_message_id)); - if (strequals(recv_command, "configure-vt")) + if (streq(recv_command, "configure-vt")) fail_if (handle_configure_vt(recv_client_id, recv_message_id, recv_graphical, recv_exclusive)); return 0; /* How did that get here, no matter, just ignore it? */ @@ -651,19 +651,19 @@ handle_configure_vt(const char *client, const char *message, const char *graphic char buf[60 + 41 + 3 * sizeof(int)]; int r = 0, set_nonexclusive; - if (strequals(exclusive, "yes") || strequals(exclusive, "no")) { + if (streq(exclusive, "yes") || streq(exclusive, "no")) { /* Switch to exclusive mode when no server has request non-exclusive mode anymore, and switch to non-exclusive mode when the number of server that server that has request non-exclusive switches from zero to one. */ - set_nonexclusive = strequals(exclusive, "no"); + set_nonexclusive = streq(exclusive, "no"); if (nonexclusive_counter == (ssize_t)!set_nonexclusive) r |= vt_set_exclusive(display_tty_fd, !set_nonexclusive); nonexclusive_counter += set_nonexclusive ? 1 : -1; } - if (strequals(graphical, "yes") || strequals(graphical, "no")) - r |= vt_set_graphical(display_tty_fd, strequals(graphical, "yes")); + if (streq(graphical, "yes") || streq(graphical, "no")) + r |= vt_set_graphical(display_tty_fd, streq(graphical, "yes")); sprintf(buf, "Command: error\n" |