Coder Social home page Coder Social logo

rstemmer / libprinthex Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 74 KB

๐Ÿ”ง A library to print a buffer as typical hex-view with highlighted regions on the console screen.

License: GNU General Public License v3.0

Shell 11.08% C 88.92%
library console ansi-colors hex-viewer ansi-escape-sequences debugging

libprinthex's Introduction

Hi ๐Ÿ‘‹


Research Gate: Ralf Stemmer Research Gate: Ralf Stemmer

libprinthex's People

Contributors

rstemmer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

seventyb

libprinthex's Issues

test.sh produces weird output

The output from the test.sh:

Screenshot 2023-10-22 at 19 33 01

The output is reproducible by building the docker image

docker build . -t showdump

using the following Dockerfile:

FROM ubuntu:latest
RUN apt-get update && apt-get install -y clang git libz-dev
RUN git clone https://github.com/rstemmer/libprinthex.git
RUN cd libprinthex && ./build.sh && ./install.sh
WORKDIR /libprinthex
CMD [ "bash", "./test.sh" ]

and running it:

docker run showdump

Use clang for compiling and fix warnings

Currently I still call gcc in the build.sh script.
This should be changed to clang (LLVM is the future).

When using clang, I get the following warnings: (one more reason to use clang ;) )

printhex.c:76:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
            printf(color);
                   ^~~~~
printhex.c:76:20: note: treat the string as an argument to avoid this
            printf(color);
                   ^
                   "%s", 
printhex.c:81:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
            printf(color);
                   ^~~~~
printhex.c:81:20: note: treat the string as an argument to avoid this
            printf(color);
                   ^
                   "%s", 
2 warnings generated.

These should be fixed as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.