Commit graph

29 commits

Author SHA1 Message Date
yamadapc 117b10376a Start drafting custom color support
This is mostly just taken out of @SyntaxColoring's ansitext [1]. I just
want to see what I can do with it.

[1] - https://github.com/SyntaxColoring/ansitext
2014-11-14 23:32:23 -05:00
ponce cfa4b2f11a Fix Windows unittests. 2014-08-05 20:55:26 +02:00
yamadapc a075732c0b Let the nogc enum fix from 4a46262 be private.
This is so it doesn't leak on `import`. This also bumps version to
`1.0.4` and is also related to #7.
2014-08-05 15:34:56 -03:00
yamadapc 4a462627ea Patch for DMD 2.065 compatibility on Windows.
It seems it got `undefined identifier nogc`, when compiling with DMD
2.065 on Windows. This should patch that using a solution found here:
https://github.com/DerelictOrg/DerelictUtil/blob/master/source/derelict/util/system.d#L71

This is a fix to #7.
2014-08-05 15:29:28 -03:00
yamadapc 8499c64cd1 Bump the version to v1.0.2
This is simply to keep dub's README information in sync.
2014-08-01 04:30:50 -03:00
yamadapc 05107daa5a Update version number headers in the files.
This is a good practice. I'd forgotten to update them on the version
bumps, but will hopefully start to do so, from now on.
2014-08-01 04:19:55 -03:00
yamadapc 589c22e38f Rename the colorize function to color.
This will fix the name conflicts we were having before. It's a major
breaking change, but it should fix our problems which is nice. This
closes #6 and bumps the version to v1.0.0.
2014-07-31 18:28:18 -03:00
yamadapc 7398ee11f1 Fix a bunch of bugs in the cwrite module.
We had problems with format parameters dispatching (`cwritefln` ended up
calling `format` with '\n' as a trailing - orphan - format parameter),
`format` not being imported from `std.string` and an infinitely
recursive template case for the overloaded `cwritef` function.

This also bumps the version to 0.2.1.
2014-07-30 20:12:01 -03:00
yamadapc d0becf6a63 Remove trailing spaces and newlines.
This simply removes trailing spaces and '\n' characters left by p0nce's
contribution of adding windows support.
2014-07-30 14:35:19 -03:00
ponce 57605758d2 2-space indent 2014-07-30 00:29:05 +02:00
ponce 183ee21692 Whitespace tweak. 2014-07-29 23:53:59 +02:00
ponce on vps 4d98f3f9d3 Fix compatibility with linux and 2.065 2014-07-29 23:49:38 +02:00
ponce 8ff025230e fg and bg colours working. There was a problem with changing colors before stdout was ever flushed. 2014-07-29 23:36:46 +02:00
ponce 30f4576db5 Implement colour changing, still not working. 2014-07-29 00:41:50 +02:00
ponce 48444a6fb6 Coloured write now uses WinTermEmulation on Windows.
Basic state machine for parsing ANSI VT100 subset.
2014-07-29 00:20:33 +02:00
ponce 1361fca5d8 Partially implement coloured write/writef/...
Partially implement windows terminal emulation.
2014-07-28 23:55:16 +02:00
ponce 5caf15bd46 Reorganize package as to split in several files (colourize, Windows term emulation, and cprintf functions). 2014-07-28 22:54:08 +02:00
yamadapc b4a23ba7cf Fix the version in the source code.
I won't republish the package, just because of this, but it's nice to
keep things in sync.
2014-07-13 17:18:02 -03:00
yamadapc 42a779cfc3 Make colorHelper overloading cleaner.
Using `static if`'s for type checking inside of a constrained template
function didn't make much sense after all.
2014-07-13 15:12:50 -03:00
yamadapc 4d8473495a Start drafting string API support and add aliases.
This changes the way colorize works and is still a *really* rough draft.
I didn't want to repeat the color codes, but also don't feel much like
wasting time making such a trivial use case non-verbose.

This relates to #1, but, as I said is still just an API idea, not
something I'd like to push to dub yet.
2014-07-12 20:42:18 -03:00
yamadapc b47a79deb2 Fix style for template constraints.
I'm simply trying to follow what I see in the wild; not sure about this
either.
2014-07-12 20:10:05 -03:00
yamadapc 342da0b563 Use a generic function for the colorHelper.
Instead of using a template. This is cleaner; I don't know why it didn't
come to my mind. I'm not sure if it's possible to make it work while
using the private specifier.
2014-07-12 20:07:30 -03:00
yamadapc be783f8fe1 Try cleaning-up the module with templates.
I'm not sure about this, but it saves a few lines and is still pretty
easy to understand, while having no runtime cost.
2014-07-12 19:49:05 -03:00
yamadapc fc2a2dd537 Fix the proposed helper functions.
I think this can be simplified with templates. I'm wondering if the
colorize function could be made compile-time when that's possible.
2014-07-12 19:32:59 -03:00
yamadapc 5f944fad66 Use const str parameters.
This is a more reasonable approach.
2014-07-12 19:32:26 -03:00
yamadapc 9f4fddd188 Add separate functions for each coloring type.
This is more than a draft; I'm just jotting down ideas to see how they
look on the screen.
2014-07-11 20:30:13 -03:00
yamadapc 4a227f46c1 Add build status badge and bump version.
I'm doing this simply to have the cleaned-up in the registry.
2014-07-10 00:06:21 -03:00
yamadapc 321a3664ef Start adding proper documentation.
I still have to add travis-ci testing and publish this package to the
dub directory.
2014-07-09 23:24:24 -03:00
yamadapc 304f29787e Initial commit. 2014-07-09 13:50:01 -03:00