From 69d635f5f1ad693f0e57f9c1cdcd3e15c0ce6c99 Mon Sep 17 00:00:00 2001 From: Manoj A Date: Thu, 11 Apr 2024 12:01:20 +0530 Subject: [PATCH] add ico rc; update test add window resource file add ascii icon update test --- ascii.ico | Bin 0 -> 3865 bytes ascii.rc | 32 ++++++++++++++++++++++++++++++++ headers/ascii.h | 1 - src/ascii.h | 1 - test/test.c | 15 +++++++++++++-- 5 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 ascii.ico create mode 100644 ascii.rc diff --git a/ascii.ico b/ascii.ico new file mode 100644 index 0000000000000000000000000000000000000000..692fe6165f5632dd750a24872b0f5665715758ce GIT binary patch literal 3865 zcmb_e3p7-1zkg=iGxmsV>Xj%)xu($TTDj~&xrHg-Qcz zZAwxMQ=&VP3S~$a6oy8I#^u}I?>lFmv%dA6b>6eiv)A7L|Ni}N&;RnQ^#DL3p7})r zG$0`hfC9lMGFr~JcI&)!{zWJR@%+8$000Z0I@r?P!*hl&2PAv$U;5~d z(B%%}#^dE1A)mN7TXaR5HlKX=dDd364UuCPFwq5Vn#y?=FY8a5#&wR8D+%u%n5V%goS;{ z$-1=S1Zs__{g;pJ=BM8!QqmPz5?qlrqO-InNZ)Ao6_#r-QvAoely3oF9$Z>yd_H~l zNz*~$=!4i@eda1%J`1xfbp`Gb78hL(l>s(A!|ZHqz}ot66O!WJ=0R(~kkDwpCf=$0 zNmUbjM97|illD@*LZ}gY_D_{GsCqYB(SO}v^w*^W1QtU%nq_x& z=m7E7%N6k(nmIoLZNO`oM8h=^Z$qd^69ELzBNPA$UI<|Tp#`CUpsaX6P-Gd50~G6} z0fIu3B!Z%5|2GpOI(R3C8UOc4*aotJE!dYs!;eYz=HgKJo2bjq(hvp?%kfMEp(bnp zGZvc)g&#{cW{P(EEh4tYvu!9{dGg#P&C-JTWNt(>cdR9S^qkhW_kK`*TetD7$~&c} z^~qXa_P&~%I8CI2Mf}Ak(7Ib17`w2SQ2(F$n;JTy4b4x5f5|PaKYh@N>S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}tVHud~qk&ZYZJge^6 z(fw5wd#D-L9$e=eCK3gi_D%YkgRNavlDGcoa?#JX87Dw=`px?vs)|ye#-dTGAj{U# z8l>(p7KRJ5$&On-ya|~&cW3%dCSmH6v~JDVv7Q}gl#jcJavdtw;okHk`aO>ngmx@z z_sQTw)69unr+IkWv@x{5sN%KRePVOzC^j>AU~25(xPO4)SNG~8gHMf}JQL)NsHAq! zaAx&$g|P*!74F)(!m!MDSe%v`-nF2f!G<-;f|MzA@Z*Ao*#m`9Hbz|)SfQFQ5w?_) z03p zbuKxMc?(x9F2{4We?uSV5b%Yxa + +IDI_ICON1 ICON "ascii.ico" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION 0,3,2,10 +PRODUCTVERSION 0,3,2,0 +FILEFLAGSMASK 0x3fL +FILEFLAGS 0x0L +FILEOS 0x4L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "AceContra\0" + VALUE "FileDescription", "AsciiTable shows octal, hexadecimal, and decimal representations of ascii characters\0" + VALUE "FileVersion", "0.3.2.10\0" + VALUE "InternalName", "YourInternalName\0" + VALUE "LegalCopyright", "AceContra\0" + VALUE "OriginalFilename", "ascii_x64.exe\0" + VALUE "ProductName", "asciiTable\0" + VALUE "ProductVersion", "0.3.2.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/headers/ascii.h b/headers/ascii.h index f293051..1c6ebab 100644 --- a/headers/ascii.h +++ b/headers/ascii.h @@ -33,7 +33,6 @@ typedef struct parameter{ uint8_t order; //0 - default , (--asc)1 - ascending, (--des)2 - desending ordered output table bool color; //--vt100 register ansi vt100 escape sequence color to the terminal - }asciiParams; uint8_t isHex( char* _hexadecimal ); diff --git a/src/ascii.h b/src/ascii.h index f293051..1c6ebab 100644 --- a/src/ascii.h +++ b/src/ascii.h @@ -33,7 +33,6 @@ typedef struct parameter{ uint8_t order; //0 - default , (--asc)1 - ascending, (--des)2 - desending ordered output table bool color; //--vt100 register ansi vt100 escape sequence color to the terminal - }asciiParams; uint8_t isHex( char* _hexadecimal ); diff --git a/test/test.c b/test/test.c index b807e28..113cfc9 100644 --- a/test/test.c +++ b/test/test.c @@ -1,8 +1,9 @@ #include #include "../headers/ascii.h" -#define OCTAL 8 -#define BINARY 2 +#define OCTAL 8 +#define BINARY 2 +#define DECIMAL 10 int main(){ @@ -67,5 +68,15 @@ int main(){ assert( isBin("1b") == BINARY); assert( isBin("10001b") == BINARY); + //isDec() + assert( isDec("0") == false ); + assert( isDec("100") == false ); + assert( isDec("999") == false ); + assert( isDec("6969") == false ); + assert( isDec("010") == false ); + assert( isDec("0d") == DECIMAL); + assert( isDec("10d") == DECIMAL); + assert( isDec("100d") == DECIMAL); + return 0; }