view dstep/coreservices/carboncore/NumberFormatting.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
line wrap: on
line source

/**
 * Copyright: Copyright (c) 2009 Jacob Carlborg.
 * Authors: Jacob Carlborg
 * Version: Initial created: Jul 21, 2009 
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
 */
module dstep.coreservices.carboncore.NumberFormatting;

//import dstep.AvailabilityMacros;
import dstep.coreservices.carboncore.ConditionalMacros;
import dstep.coreservices.carboncore.IntlResources;
import dstep.coreservices.carboncore.MacTypes;

alias NumFormatString[] NumFormatStringRec;
alias short FormatStatus;
alias byte FormatClass;
alias byte FormatResultType;

enum
{
	fVNumber = 0
}

enum
{
	fPositive = 0,
	fNegative = 1,
	fZero = 2
}

enum
{
	fFormatOK = 0,
	fBestGuess = 1,
	fOutOfSynch = 2,
	fSpuriousChars = 3,
	fMissingDelimiter = 4,
	fExtraDecimal = 5,
	fMissingLiteral = 6,
	fExtraExp = 7,
	fFormatOverflow = 8,
	fFormStrIsNAN = 9,
	fBadPartsTable = 10,
	fExtraPercent = 11,
	fExtraSeparator = 12,
	fEmptyFormatString = 13
}

struct NumFormatString
{
	ubyte fLength;
	ubyte fVersion;
	char* data;
}


struct FVector
{
	short start;
	short length;
}

extern (C)
{
	void numtostring (int theNum, char* theString);
}