Go to file
R. Eric Wheeler faa4e842db Removed make test workaround 2015-08-07 13:09:12 -07:00
examples Fixed a bug that was skipping codes if they had already been used 2015-07-21 09:30:52 -07:00
man Cleaned up directory structure 2015-07-15 10:46:41 -07:00
src Removed make test workaround 2015-08-07 13:09:12 -07:00
.gitignore Updated READMEs 2015-07-16 13:53:27 -07:00
.travis.yml removed make install 2015-08-07 13:05:41 -07:00
AUTHORS Updated AUTHORS, Changelog 2015-07-16 14:12:22 -07:00
COPYING Modified license 2015-07-01 08:13:20 -07:00
ChangeLog Fixed std::out_of_range error 2015-07-17 14:37:57 -07:00
INSTALL Modified license 2015-07-01 08:13:20 -07:00
LICENSE Modified license 2015-07-01 08:13:20 -07:00
Makefile.am Removed make test workaround 2015-08-07 13:09:12 -07:00
NEWS Added AUTHORS and NEWS 2015-07-15 14:16:02 -07:00
README Updated READMEs 2015-07-16 13:53:27 -07:00
README.md Added travis-ci image 2015-08-07 13:08:14 -07:00
acinclude.m4 Initial Commit 2015-07-01 07:44:53 -07:00
autogen.sh good god 2015-08-07 12:48:25 -07:00
configure.ac ....b 2015-08-07 12:46:37 -07:00

README.md

libpipecolors

Build Status

This library parses input like printf and sprintf but instead of returning a boring string it will replace renegade bbs style pipecodes (|09) with their ansi equivelent.

It has two functions -

int pcprintf(const char * format, ...);
int pcsprintf(char * str, const char * format, ...);

To Do

  • Remove std::map requirement
  • Remove boost requirement without forcing -std=c++11 (Reduced size from 1.2M to 87K)

Example use

#include <cstdio>
#include <iostream>
#include <pipecolors.h>

using namespace pipecolors;

int main(void) {

  int num = 5;
  const char* str = "My number is";
  pcprintf("|02%s |10%d|39\n", str, num);

  return 0;
}

This would return \x1b[0;32mMy number is \x1b[0;92m5\x1b[0;39m\n, Printing str in dark green and num in light green