implemented CLEAR_AND_GO_UP in chat stuff
This commit is contained in:
parent
899b79941b
commit
eedea02701
@ -38,4 +38,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
#define SERVER_PORT 1204
|
#define SERVER_PORT 1204
|
||||||
#define MAX_CONNECTIONS 1000
|
#define MAX_CONNECTIONS 1000
|
||||||
|
|
||||||
|
#define CLEAR_AND_GO_UP "\33[2K\r\033[A"
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -56,7 +56,7 @@ int main(void)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
getline(&line, &line_length, stdin);
|
getline(&line, &line_length, stdin);
|
||||||
printf("\33[2K\r\033[A");
|
printf(CLEAR_AND_GO_UP);
|
||||||
|
|
||||||
why2_send_socket(line, listen_socket);
|
why2_send_socket(line, listen_socket);
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ void *why2_listen_server(void *socket)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
read = why2_read_socket(*((int*) socket)); //TODO: Fix other user message formatting
|
read = why2_read_socket(*((int*) socket)); //TODO: Fix other user message formatting
|
||||||
printf("\33[2K\r\033[A");
|
printf(CLEAR_AND_GO_UP);
|
||||||
printf("%s\n>>> ", read);
|
printf("%s\n>>> ", read);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user