Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
0.22.5.1
Browse files Browse the repository at this point in the history
Used sigprocmask instead of pthread_sigmask
  • Loading branch information
PQCraft authored Sep 26, 2021
1 parent a2e2d3f commit 7152ada
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clibasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

// Base defines

char VER[] = "0.22.5";
char VER[] = "0.22.5.1";

#if defined(__linux__)
char OSVER[] = "Linux";
Expand Down Expand Up @@ -1121,7 +1121,7 @@ static inline void getCurPos() {
#ifndef _WIN32
char buf[16];
register int i;
if (gcp_sig) pthread_sigmask(SIG_SETMASK, &intmask, &oldmask);
if (gcp_sig) sigprocmask(SIG_SETMASK, &intmask, &oldmask);
i = kbhit();
while (i > 0) {getchar(); i--;}
if (!textlock) {
Expand All @@ -1146,7 +1146,7 @@ static inline void getCurPos() {
while (i > 0) {getchar(); i--;}
if (gcpret != gcpi) {gcp_sig = false; getCurPos(); gcp_sig = true;}
else {sscanf(buf, "\e[%d;%dR", &cury, &curx);}
if (gcp_sig) pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
if (gcp_sig) sigprocmask(SIG_SETMASK, &oldmask, NULL);
#else
CONSOLE_SCREEN_BUFFER_INFO con;
GetConsoleScreenBufferInfo(hConsole, &con);
Expand Down

0 comments on commit 7152ada

Please sign in to comment.