From 7f8b1dfb2f5b39f125f10e3b1c336c909710c84b Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 29 Apr 2023 19:08:38 -0400 Subject: [PATCH] step: handle ctrl+D. --- mumble | Bin 0 -> 8972 bytes src/mumble.c | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100755 mumble diff --git a/mumble b/mumble new file mode 100755 index 0000000000000000000000000000000000000000..cd4289f89530d530931c1fd0d8fcec80879f95bf GIT binary patch literal 8972 zcmcgxeQab^6~CSCv}Hf0?Fw4uV<%)cE?{T6q+7Z~$V_R=REDs!i!LI(PG{bOvc85>kV6;l_h zi&PsSL3(1k1l*H^_i$+8YuK)pIOIKCzNf|W6Mhlf36~7PQD2Q>EPDKrc25 zL#~29(mt+n;Zt0}zVkFpKVdBd=ofxV9CwNRgdfpXN(qZeo7(l&Ovn%76>WH~<$v zlzpdT98AwU$piWk1DBkDA2o2~D0Ixgc}R89bBrTD2=Z|1*j z*rWf1P8oQ$Z>aFJ5oetkGk>%5lDD?~W2|!gjzs0P#N3}x?cAN555C?SR*Cry|J3Z7 zQ^Zy-c!PfbeGv8ww zJ(ZD@^CKtcPOHxQ4#9Ii_!Naq%#+hE$o^5bzY^~A!NSdJyz}EM-UOK}8hrW{&qF)qUa;RCpkm*Z!z&yH~31mtTd+_{z$PR-a!$ z5GJ%Y{>kKlYd%Ld@lT9ZeigrEtn#1u?s(E|;(305k`|{rsbI)|#c6ix&uz{(=}WkFTTw1&!+TG{@w7Mg`ylJpB& z+47l|u$n^16H64Ebxivci!~ju@rh$vpMX7H-xEhjC$4TR&rD3);XCb;lPl!IeUZM% zwzXxog#ow!K!VTMOl|lgeeT4sUTN1`UO#Y3B0&u5XQL zMB02P;OX+dx-FhA>&czky0-rHurBX$hU3Y4HOLjqIwkfOuwOGK-_>U2|4+P?R`A38 z%`)q4r5Ap%EoMSmZly0ptRdb-`;PGj_Vn#OuMu8nssZF9-%!({RduOvt}6ao)zcm` zLvZ|cs=py#XUg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YXmU)}|j`G&NH%d#w5^cP9c& zkYMI7cZ@ylo`vxjvIeAH@ppXwau?ap{^oiCAHV;7>@WGt-Asc0;bW3N|F2P@+5Xk~ zfBQZ9|DFA1{QdRI+AM95{G}hzOytkgt$Nod|9Ov!BXjW=_<0ggxA-r$kL#i(?!O~i ztCdT=U5vj-+^k>j6c2JmMYa7|wQiDyiXl&W0*y1sr|SKXAA@X-KKBCL`B=?{9b#yzJ0GsBSh{ig_P z}SPR;+`U`QU5Kn|6A-Y%s*ED1KaXe A%>V!Z literal 0 HcmV?d00001 diff --git a/src/mumble.c b/src/mumble.c index c162f6e..faacd06 100644 --- a/src/mumble.c +++ b/src/mumble.c @@ -8,10 +8,12 @@ int main(int argc, char** argv) puts("Press Ctrl+C to exit\n"); int loop = 1; while (loop) { - fputs("mumble>", stdout); + fputs("mumble> ", stdout); void* catcher = fgets(input, 2048, stdin); if (catcher == NULL) { + // ^ catches Ctrl+D loop = 0; + puts(""); } else { printf("You said: %s", input); }