Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #6

Merged
merged 6 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
![asciitable](https://github.com/ManojTGN/ascii-table/assets/42494649/ab86ba7e-6085-464c-9ff2-c76e6aa661e6)

## Overview
AsciiTable shows octal, hexadecimal, and decimal representations of ascii characters. It supports all 8-bit ASCII characters. But 7-bit ASCII characters are prefered to be processed.
AsciiTable shows octal, hexadecimal, decimal and binary representations of ascii characters. It supports all 8-bit(256) ASCII characters. But 7-bit(128) ASCII characters are prefered to be processed.
![asciitable](https://github.com/ManojTGN/ascii-table/assets/42494649/c140c32a-6315-424a-a4cd-62924970acac)

## Features
- Converts ASCII characters to octal, hexadecimal, and decimal values.
- Converts ASCII characters to octal, hexadecimal, decimal and binary values.
- Simple and lightweight command-line interface.
- Supports the full range of 256 ASCII characters.

Expand Down
4 changes: 2 additions & 2 deletions ascii.rc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "AceContra\0"
VALUE "FileDescription", "AsciiTable shows octal, hexadecimal, and decimal representations of ascii characters\0"
VALUE "FileVersion", "0.4.1.7\0"
VALUE "FileVersion", "0.5.0.0\0"
VALUE "InternalName", "acecontra.ascii-table\0"
VALUE "LegalCopyright", "AceContra\0"
VALUE "OriginalFilename", "ascii_x64.exe\0"
VALUE "ProductName", "asciiTable\0"
VALUE "ProductVersion", "0.4.1.0\0"
VALUE "ProductVersion", "0.5.0.0\0"
END
END
BLOCK "VarFileInfo"
Expand Down
10 changes: 8 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ _test: _build
$(CC) -o test/test.exe build/ascii.o test/test.c
./test/test.exe

rc:
if [ ! -d build ]; then mkdir build; fi
windres ascii.rc -o build/asciirc.o

renderer:
if [ ! -d build ]; then mkdir build; fi
$(CXX) -shared -o build/renderer.dll src/renderer.cpp -Wno-write-strings

_build: clean renderer
_build: clean renderer rc
if [ ! -d build ]; then mkdir build; fi
$(CC) -o build/ascii.o -c src/ascii.c
$(CC) -o build/ascii.exe build/ascii.o src/main.c -Lbuild -lrenderer
$(CC) -o build/ascii.exe build/ascii.o src/main.c -Lbuild -lrenderer build/asciirc.o

clean:
if [ ! -d build ]; then mkdir build; fi
rm -rf build/*.o
rm -rf build/*.exe
rm -rf build/*.dll
5 changes: 3 additions & 2 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
int main(){

//YEL RESET
assert( strcmp(YEL, "\x1b[33m")== 0 );
assert( strcmp(RESET,"\x1b[0m" )== 0 );
assert( strcmp(YEL, "\x1B[38;5;172m")== 0 );
assert( strcmp(GRAY, "\x1B[38;5;243m")== 0 );
assert( strcmp(RESET, "\x1b[0m")== 0 );

// isHex()
assert( isHex("0x00") == true );
Expand Down
Loading