Giter VIP home page Giter VIP logo

ansicolor-w32.c's Introduction

ansicolor-w32.c

ANSI color support on windows

Usage

You can display ANSI color on windows without hacks

#include <stdio.h>
#ifdef _WIN32
# include "ansicolor-w32.h"
#endif

int
main(int argc, char* argv[]) {
  printf("\x1b[2J\x1b[1;1H\x1b[40mhello"); 
  return 0;
}

The library replaces the printf family functions with wrappers that recognize the ANSI escape code and render the input using the specified colors.

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

ansicolor-w32.c's People

Contributors

jcward avatar joakimsoderberg avatar katzer avatar mattn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansicolor-w32.c's Issues

Doesn't work

Hello @mattn I was thinking of writing something similar myself, but googled it first... However, I tried it and couldn't get it to work (I had to add vasprintf back since that's not available on windows, just noticed I could've simply gone back a commit instead :feelsgood:).

Aside from vasprintf, I cannot get this to work at all. The example you give in the Readme doesn't do anything for me on OSX if I try it there, nor does it do anything with aniscolor-w32 on windows. I also tried a simpler \x1b[22;31m to make the text red which works fine on OSX, but not on Windows.

Any ideas?

Unknown license

I'm potentially interested in using this, but it has no obvious license attached to it, and I can't use it without a reasonably permissive open-source license. Can you choose a license, or alternatively place it in the public domain, so that its legal usages are clear?

Unable to fetch package using clib

Hi @mattn,
I'm using your library in a project of mine, but I face some troubles when I try to install it using clib.
After some investigations I discovered that the problem is that there is no release tag with version 0.0.1 as referenced in the package.json, so when clib tries to fetch the library at https://raw.githubusercontent.com/mattn/ansicolor-w32.c/0.0.1/ansicolor-w32.h it gets an HTTP 404.
So I was just wondering if you could release the 0.0.1 version in order to fix that :)

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.