From f9c2300ceda32998caf5cdf032d25050b2e09a9a Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Wed, 29 Jun 2022 17:14:30 +0000 Subject: [PATCH] Include additional header and separate file --- extras.c | 6 ++++++ extras.h | 1 + main | Bin 17384 -> 17624 bytes main.c | 9 +++++++-- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 extras.c create mode 100644 extras.h diff --git a/extras.c b/extras.c new file mode 100644 index 0000000..e70a274 --- /dev/null +++ b/extras.c @@ -0,0 +1,6 @@ +#include +#include "extras.h" + +void writeExtras(){ + addch(ACS_PI); +} \ No newline at end of file diff --git a/extras.h b/extras.h new file mode 100644 index 0000000..bcd992e --- /dev/null +++ b/extras.h @@ -0,0 +1 @@ +void writeExtras(); \ No newline at end of file diff --git a/main b/main index 38615f85edb2e8799ff4c77c376d07f8fb0a0fec..19612d028356e0f531988b5e85816dd7a3c14cc6 100755 GIT binary patch delta 3785 zcmZ`+4Qx}_6+X{DiC^L*en~vXj1Y&m3Q!U|Kaiwbh@BtmY}uNq3uV$eaA{~FjU+WD z$uv-sveCLGEa9vo)ijkd(Xk1MW=Je!Dv&X?Wd$`Y{3>i<4Kp>QSqq97Rp> zj!Y?rCM7rwoxvIO_{t64*YKc>n+zR9H0j4+=I0lFe&HvjL-+}aXO+upy9m{eubQ4H z{eL~q3C}rH&07j>f3K>)+7h0>cKcM}z+dOCxSz{<4|khaxeF+m96Z378AidwFekoc zZdL|Sv3T*ErARqIEthhF*OzeC;#HP#lIjZ#IY@+GaMK~YWqDlL!`naR_2015>ayOX zkSlT8RG@r_W7Z#a4TU0+@Rt5Q*fBT|?(K^V!O(Nvk!?ND-S_NJZyyNz_U$kf?%p2m z-q`~~JNgH^p|`I$vSlFD8|JN@+rqFj5(-DQZ0r9)KYBA>8!>?yOkkn@m^6OCrI}DO zy{rPCl9er-hn`)_dTF^WkSkV}+5eDYH-GCX(#)_d#m<^y;o-?QKB3M`u->q*0lD-x zBC!$|d#p|@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hd)(pE*YJ+q|XJm|jT!;+jB4eSK zOMVkaEXeUVL@L7=X>+CO7yBxF_aY-PnytTb0gPAp6*qX_(6B`nUv=B4WD?+iO16K5c_f5yYGFf1=jJAYX5h&>2S@U!I~Nvs%g z+?ZkutA)v>suYIx%T#F%1edA)Lh`ZD2Ifa%>>jf5x1;vwJ{b-e5neNF&Iud-MilR` zD~8QH_!8s9Fk?5vyB5E8mb*xcCzGgBrA~t%gx$!$WbkL;g(|h{WAvp}b@L2cd5Ggk z-S|0E&gT`8>$$!7jKm&mjK3jH_UzouYQ)CU90ABXVm zhexJwzfXd!#WvC$YmqGPNO0ngkTS?mPSC}0`Hrw6Do4;;AzB-DiMqk!Yp<=6HC~b$ z4A)lA)TyXfCtR-Wa%TC;AsAQTKwR;S^NS>?xL1b3CulIi5kZgUM^F=rA~svlCWt1& zE^(=_I@=Tbr3Sd1z>X3yodtD5v@R@*3eaG8U9~JKW*rQpB)+?wVY04zrX#iSgB^ru iygd1^)#HhR~A$ diff --git a/main.c b/main.c index 607517d..8dc52d3 100644 --- a/main.c +++ b/main.c @@ -1,10 +1,13 @@ #include #include +#include "extras.h" int main(int argc,char**argv) { int rows,cols; initscr(); + start_color(); + init_pair(1,COLOR_RED,COLOR_BLACK); getmaxyx(stdscr,rows,cols); raw(); keypad(stdscr,TRUE); @@ -16,11 +19,13 @@ int main(int argc,char**argv) { addch(ACS_BLOCK); addch(ACS_BSBS); addch(ACS_BTEE); + addch(' '); + writeExtras(); mvaddch(5,17,ACS_DARROW); + attron(COLOR_PAIR(1)); mvprintw(4,7,"There are %dx%d squares.",rows,cols); - - mvchgat(4,10,4,A_REVERSE,0,NULL); + attroff(COLOR_PAIR(1)); refresh(); getch(); endwin();