Go to file
R. Eric Wheeler b8928bfa4c Fixed README 2015-07-15 11:37:58 -07:00
examples Removed std::map requirement 2015-07-15 08:27:11 -07:00
releases gitignore 2015-07-14 17:51:32 -07:00
src gitignore 2015-07-14 17:51:32 -07:00
.gitignore Fixed README 2015-07-15 11:37:58 -07:00
COPYING Modified license 2015-07-01 08:13:20 -07:00
ChangeLog Initial Commit 2015-07-01 07:44:53 -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 std::map requirement 2015-07-15 08:27:11 -07:00
README Fixed README 2015-07-15 11:37:58 -07:00
README.md Finally update README.md 2015-07-15 08:56:02 -07:00
acinclude.m4 Initial Commit 2015-07-01 07:44:53 -07:00
autogen.sh Fixes 2015-07-07 15:09:36 -07:00
configure.ac Removed std::map requirement 2015-07-15 08:27:11 -07:00
libpipecolors.7 Removed std::map requirement 2015-07-15 08:27:11 -07:00
libpipecolors.cc Removed std::map requirement 2015-07-15 08:28:24 -07:00
libpipecolors.h.in Added libpipecolors.h.in 2015-07-10 04:48:04 -07:00
libpipecolors.pc.in Switched to boost:regex 2015-07-03 00:56:32 -07:00
pcprintf.3 Removed std::map requirement 2015-07-15 08:27:11 -07:00
pipecolors.h Removed std::map requirement 2015-07-15 08:27:11 -07:00

README.md

libpipecolors

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

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