1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 01:37:19 +00:00

fixed formatting in src/core/os.c

This commit is contained in:
tionis 2023-05-21 15:55:11 +02:00
parent b4b1c7d80b
commit 4dfc869b8a

View File

@ -650,7 +650,7 @@ static const struct keyword_signal signal_keywords[] = {
#endif #endif
#ifdef SIGPIPE #ifdef SIGPIPE
{"pipe", SIGPIPE}, {"pipe", SIGPIPE},
#endif #endif
#ifdef SIGQUIT #ifdef SIGQUIT
{"quit", SIGQUIT}, {"quit", SIGQUIT},
#endif #endif
@ -731,17 +731,17 @@ JANET_CORE_FN(os_proc_kill,
CloseHandle(proc->tHandle); CloseHandle(proc->tHandle);
#else #else
int signal = -1; int signal = -1;
if(argc == 3){ if (argc == 3) {
JanetKeyword signal_kw = janet_getkeyword(argv, 2); JanetKeyword signal_kw = janet_getkeyword(argv, 2);
const struct keyword_signal *ptr = signal_keywords; const struct keyword_signal *ptr = signal_keywords;
while (ptr->keyword){ while (ptr->keyword) {
if(!janet_cstrcmp(signal_kw, ptr->keyword)){ if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
signal = ptr->signal; signal = ptr->signal;
break; break;
} }
ptr++; ptr++;
} }
if(signal == -1){ if (signal == -1) {
janet_panic("undefined signal"); janet_panic("undefined signal");
} }
} }