Menu

Tree [775793] master next pu v0.6 /
 History

HTTPS access


File Date Author Commit
 build-aux 2010-12-01 David M. Syzdek David M. Syzdek [645596] Removing generated files from repository.
 doc 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 examples 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 include 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 lib 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 m4 2010-12-01 David M. Syzdek David M. Syzdek [645596] Removing generated files from repository.
 roman.xcodeproj 2010-12-01 David M. Syzdek David M. Syzdek [0479dc] Changing filetype of configure.ac in Xcode proj...
 src 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 tests 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 .gitignore 2010-12-01 David M. Syzdek David M. Syzdek [031424] Creating Xcode project to manage sources.
 AUTHORS 2009-03-01 David M. Syzdek David M. Syzdek [360e9c] Removing CVS keywords from files.
 COPYING 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 ChangeLog 2010-12-01 David M. Syzdek David M. Syzdek [775793] Preparing new release of roman.
 INSTALL 2010-12-01 David M. Syzdek David M. Syzdek [645596] Removing generated files from repository.
 Makefile.am 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 NEWS 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 README 2010-12-01 David M. Syzdek David M. Syzdek [07c084] Updating Readme with Git information.
 THANKS 2008-01-23 David M. Syzdek David M. Syzdek [53a93b] udpated logs
 TODO 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 acinclude.m4 2010-12-01 David M. Syzdek David M. Syzdek [603510] Changing License from GPL to Modified BSD license.
 configure.ac 2010-12-01 David M. Syzdek David M. Syzdek [33f7b8] Updating version scheme for package.

Read Me

Roman Numeral Conversion API
Copyright (C) 2007, 2008 David M. Syzdek
Copyright (C) 2010 Bindle Binaries


Contents
========
   I. Introduction
  II. Reporting Problems
 III. Roman Numerals
  IV. Obtaining the Source
   V. Compiling and Installing
  VI. Programming Examples


I. Introduction
---------------

This package was developed to provide an easy method of including Roman Numeral
values in the output of programs written in C/C++.  There are example programs
that demonstrates the use of the functions included in the library.  The
utilities `romannum' and `romandate' show possible uses for the functions as
well as provide silly tools to play with.


II. Reporting Problems
----------------------

Please report problems regarding this package using the SourceForge Tracker.
The Tracker page for this project is available here:

	<a href=http://sourceforge.net/tracker/?group_id=211070>
	http://sourceforge.net/tracker/?group_id=211070
	</a>

If the Tracker is too confusing, time consuming, detailed, arbitrary, ridiculous,
chaotic, organized, purlple, "I don't speak your crazy moon-language."; send the
request to:

	<a href=mailto:syzdek@users.sourceforge.net>
	syzdek@users.sourceforge.net
	</a>


III. Roman Numerals
-------------------

A simple chart is included below showing the values for Roman Numeral symbols. This
chart is also included in the `romannum' command and in the roman.7 man page.

   Roman Numerals:
    Symbol    Value              Name
      N     0  (zero)          (nullae) *
      I     1  (one)           (unus)
      V     5  (five)          (quinque)
      X    10  (ten)           (decem)
      L    50  (fifty)         (quinquaginta)
      C   100  (one hundred)   (centum)
      D   500  (five hundred)  (quingenti)
      M  1000  (one thousand)  (mille)
   
   * Non-standard Roman numeral used by St. Bede.

A bar placed across the top of a Roman Numeral implies that the value shoud be
multiplied by 1000.  However, this utility does not use this notation since
there is not an acceptable manner of representing this notation using ASCII
characters.

More information on Roman Numerals can be found on the following web sites:

	http://en.wikipedia.org/wiki/Roman_numerals
	http://www.novaroma.org/via_romana/numbers.html


IV. Obtaining the Source
------------------------

The source code for this project is maintained using git (http://git-scm.com).
The following contains information to checkout the source code from the git
repository.

   Git URLs:
      git://github.com/syzdek/roman.git
      git://roman.git.sourceforge.net/gitroot/roman/roman
      git://git.scm.syzdek.net/pub/scm/net.sourceforge/roman.git

   Downloading Source:

      $ git://roman.git.sourceforge.net/gitroot/roman/roman

   Preparing Source:

      $ autoreconf -i -f

   Git Branches:
      master - Current release of packages.
      next   - changes staged for next release
      pu     - proposed updates for next release
      xx/yy+ - branch for testing new changes before merging to 'pu' branch


V. Compiling and Installing
---------------------------

This project uses GNU Autoconf, GNU Automake, and GNU Libtool in order to ease
porting source across multiple platforms.  As of this writing the source was 
known to compile for the following platforms:

	Apple OS X 10.5.1
	Slackware Linux 11.0
	Windows 2000 (using MinGW32)

The easist way to compile the source on a Unix platform is to run the following:

	gzip -cd roman-x.x.x.tar.gz | tar -xvf -
	cd roman-x.x.x
	./configure
	make
	make install

For more information on building and installing using configure, please read the
INSTALL file.

The Windows binaries that are released on SourceForge are cross-compiled on
OS X using MinGW32.  How to cross-compile is beyond the scope of this document
however the following should work if your environment is set up correctly:

	gzip -cd roman-x.x.x.tar.gz | tar -xvf -
	cd roman-x.x.x
	./configure --prefix=/tmp/roman-mingw32 --disable-shared \
	            --bindir=/tmp/roman-mingw32 --host=i386-mingw32
	make
	make install

Removing the `--disable-shared' option will create a DLL library which must
be in the same directory as the executables that use it. I am a Unix developer,
so I am not familiar with the development tools available on Windows.  If you
have questions about developing on Windows, please see the MSDN.  If there is
an error in how I generate Windows libraries, please let me know and I will
try to correct it in the next release.


VI. Programming Examples
------------------------

The first example demonstrates generating Roman Numeral strings from an integer:

	/* compile with gcc -lroman -o test1 test1.c */
	#include <stdio.h>
	#include <roman.h>

	int main(void);

	int main(void)
	{
	   const char * roman;
	   roman = int2roman(3132);
	   if (!(roman))
	   {
	      perror("int2roman()");
	      return(1);
	   };
	   printf("Roman Numeral: %s\n", roman);
	   return(0);
	}

If the above program is run on a Posix system, the output should be similiar
to the following:

	syzdek@tacntock$ gcc -lroman -o test1 test1.c
	syzdek@tacntock$ ./test1 
	Roman Numeral: MMMCXXXII
	syzdek@tacntock$

The second example demonstrates converting a Roman Numeral string into an integer:

	/* compile with gcc -lroman -o test2 test2.c */
	#include <stdio.h>
	#include <roman.h>

	int main(void);

	int main(void)
	{
	   int num;
	   num = roman2int("MMMCXXXII");
	   if (num < 0)
	   {
	      perror("roman2int()");
	      return(1);
	   };
	   printf("Number: %i\n", num);
	   return(0);
	}


If the above program is run on a Posix system, the output should be similiar
to the following:

	syzdek@tacntock$ gcc -lroman -o test2 test2.c
	syzdek@tacntock$ ./test2 
	Number: 3132
	syzdek@tacntock$

Additional examples are included in the `examples' directory.


=============================================================================

Please enjoy this project.

Sincerely,
David M. Syzdek