ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

varformat.c File Reference
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "winerror.h"
#include "variant.h"
#include "wine/debug.h"

Go to the source code of this file.

Data Structures

struct  FMT_SHORT_HEADER
struct  FMT_HEADER
struct  FMT_STRING_HEADER
struct  FMT_NUMBER_HEADER
struct  FMT_DATE_HEADER
struct  NAMED_FORMAT

Defines

#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define LCID_US   MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT)
#define FMT_TYPE_UNKNOWN   0x0
#define FMT_TYPE_GENERAL   0x1
#define FMT_TYPE_NUMBER   0x2
#define FMT_TYPE_DATE   0x3
#define FMT_TYPE_STRING   0x4
#define FMT_TO_STRING   0x0 /* If header->size == this, act like VB's Str() fn */
#define FmtGetPositive(x)   (x->starts[0])
#define FmtGetNegative(x)   (x->starts[1] ? x->starts[1] : x->starts[0])
#define FmtGetZero(x)   (x->starts[2] ? x->starts[2] : x->starts[0])
#define FmtGetNull(x)   (x->starts[3] ? x->starts[3] : x->starts[0])
#define FMT_FLAG_LT   0x1 /* Has '<' (lower case) */
#define FMT_FLAG_GT   0x2 /* Has '>' (upper case) */
#define FMT_FLAG_RTL   0x4 /* Has '!' (Copy right to left) */
#define FMT_FLAG_PERCENT   0x1 /* Has '%' (Percentage) */
#define FMT_FLAG_EXPONENT   0x2 /* Has 'e' (Exponent/Scientific notation) */
#define FMT_FLAG_THOUSANDS   0x4 /* Has ',' (Standard use of the thousands separator) */
#define FMT_FLAG_BOOL   0x20 /* Boolean format */
#define FMT_GEN_COPY   0x00 /* \n, "lit" => 0,pos,len: Copy len chars from input+pos */
#define FMT_GEN_INLINE   0x01 /* => 1,len,[chars]: Copy len chars from token stream */
#define FMT_GEN_END   0x02 /* \0,; => 2: End of the tokenised format */
#define FMT_DATE_TIME_SEP   0x03 /* Time separator char */
#define FMT_DATE_DATE_SEP   0x04 /* Date separator char */
#define FMT_DATE_GENERAL   0x05 /* General format date */
#define FMT_DATE_QUARTER   0x06 /* Quarter of the year from 1-4 */
#define FMT_DATE_TIME_SYS   0x07 /* System long time format */
#define FMT_DATE_DAY   0x08 /* Day with no leading 0 */
#define FMT_DATE_DAY_0   0x09 /* Day with leading 0 */
#define FMT_DATE_DAY_SHORT   0x0A /* Short day name */
#define FMT_DATE_DAY_LONG   0x0B /* Long day name */
#define FMT_DATE_SHORT   0x0C /* Short date format */
#define FMT_DATE_LONG   0x0D /* Long date format */
#define FMT_DATE_MEDIUM   0x0E /* Medium date format */
#define FMT_DATE_DAY_WEEK   0x0F /* First day of the week */
#define FMT_DATE_WEEK_YEAR   0x10 /* First week of the year */
#define FMT_DATE_MON   0x11 /* Month with no leading 0 */
#define FMT_DATE_MON_0   0x12 /* Month with leading 0 */
#define FMT_DATE_MON_SHORT   0x13 /* Short month name */
#define FMT_DATE_MON_LONG   0x14 /* Long month name */
#define FMT_DATE_YEAR_DOY   0x15 /* Day of the year with no leading 0 */
#define FMT_DATE_YEAR_0   0x16 /* 2 digit year with leading 0 */
#define FMT_DATE_YEAR_LONG   0x18 /* 4 digit year */
#define FMT_DATE_MIN   0x1A /* Minutes with no leading 0 */
#define FMT_DATE_MIN_0   0x1B /* Minutes with leading 0 */
#define FMT_DATE_SEC   0x1C /* Seconds with no leading 0 */
#define FMT_DATE_SEC_0   0x1D /* Seconds with leading 0 */
#define FMT_DATE_HOUR   0x1E /* Hours with no leading 0 */
#define FMT_DATE_HOUR_0   0x1F /* Hours with leading 0 */
#define FMT_DATE_HOUR_12   0x20 /* Hours with no leading 0, 12 hour clock */
#define FMT_DATE_HOUR_12_0   0x21 /* Hours with leading 0, 12 hour clock */
#define FMT_DATE_TIME_UNK2   0x23
#define FMT_DATE_AMPM_SYS1   0x2E /* AM/PM as defined by system settings */
#define FMT_DATE_AMPM_UPPER   0x2F /* Upper-case AM or PM */
#define FMT_DATE_A_UPPER   0x30 /* Upper-case A or P */
#define FMT_DATE_AMPM_SYS2   0x31 /* AM/PM as defined by system settings */
#define FMT_DATE_AMPM_LOWER   0x32 /* Lower-case AM or PM */
#define FMT_DATE_A_LOWER   0x33 /* Lower-case A or P */
#define FMT_NUM_COPY_ZERO   0x34 /* Copy 1 digit or 0 if no digit */
#define FMT_NUM_COPY_SKIP   0x35 /* Copy 1 digit or skip if no digit */
#define FMT_NUM_DECIMAL   0x36 /* Decimal separator */
#define FMT_NUM_EXP_POS_U   0x37 /* Scientific notation, uppercase, + sign */
#define FMT_NUM_EXP_NEG_U   0x38 /* Scientific notation, uppercase, - sign */
#define FMT_NUM_EXP_POS_L   0x39 /* Scientific notation, lowercase, + sign */
#define FMT_NUM_EXP_NEG_L   0x3A /* Scientific notation, lowercase, - sign */
#define FMT_NUM_CURRENCY   0x3B /* Currency symbol */
#define FMT_NUM_TRUE_FALSE   0x3D /* Convert to "True" or "False" */
#define FMT_NUM_YES_NO   0x3E /* Convert to "Yes" or "No" */
#define FMT_NUM_ON_OFF   0x3F /* Convert to "On" or "Off" */
#define FMT_STR_COPY_SPACE   0x40 /* Copy len chars with space if no char */
#define FMT_STR_COPY_SKIP   0x41 /* Copy len chars or skip if no char */
#define FMT_WINE_HOURS_12   0x81 /* Hours using 12 hour clock */
#define NEED_SPACE(x)   if (cbTok < (int)(x)) return TYPE_E_BUFFERTOOSMALL; cbTok -= (x)
#define COULD_BE(typ)   ((!fmt_number && header->type==FMT_TYPE_UNKNOWN)||header->type==typ)
#define FMT_STATE_OPEN_COPY   0x1 /* Last token written was a copy */
#define FMT_STATE_WROTE_DECIMAL   0x2 /* Already wrote a decimal separator */
#define FMT_STATE_SEEN_HOURS   0x4 /* See the hh specifier */
#define FMT_STATE_WROTE_MINUTES   0x8 /* Wrote minutes */
#define NUM_WROTE_DEC   0x01 /* Written the decimal separator */
#define NUM_WRITE_ON   0x02 /* Started to write the number */
#define NUM_WROTE_SIGN   0x04 /* Written the negative sign */
#define NUMBER_VTBITS
#define GETLOCALENUMBER(type, field)

Typedefs

typedef const NAMED_FORMATLPCNAMED_FORMAT

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (variant)
static int FormatCompareFn (const void *l, const void *r)
static const BYTEVARIANT_GetNamedFormat (LPCWSTR lpszFormat)
HRESULT WINAPI VarTokenizeFormatString (LPOLESTR lpszFormat, LPBYTE rgbTok, int cbTok, int nFirstDay, int nFirstWeek, LCID lcid, int *pcbActual)
static HRESULT VARIANT_FormatNumber (LPVARIANT pVarIn, LPOLESTR lpszFormat, LPBYTE rgbTok, ULONG dwFlags, BSTR *pbstrOut, LCID lcid)
static HRESULT VARIANT_FormatDate (LPVARIANT pVarIn, LPOLESTR lpszFormat, LPBYTE rgbTok, ULONG dwFlags, BSTR *pbstrOut, LCID lcid)
static HRESULT VARIANT_FormatString (LPVARIANT pVarIn, LPOLESTR lpszFormat, LPBYTE rgbTok, ULONG dwFlags, BSTR *pbstrOut, LCID lcid)
HRESULT WINAPI VarFormatFromTokens (LPVARIANT pVarIn, LPOLESTR lpszFormat, LPBYTE rgbTok, ULONG dwFlags, BSTR *pbstrOut, LCID lcid)
HRESULT WINAPI VarFormat (LPVARIANT pVarIn, LPOLESTR lpszFormat, int nFirstDay, int nFirstWeek, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarFormatDateTime (LPVARIANT pVarIn, INT nFormat, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarFormatNumber (LPVARIANT pVarIn, INT nDigits, INT nLeading, INT nParens, INT nGrouping, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarFormatPercent (LPVARIANT pVarIn, INT nDigits, INT nLeading, INT nParens, INT nGrouping, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarFormatCurrency (LPVARIANT pVarIn, INT nDigits, INT nLeading, INT nParens, INT nGrouping, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarMonthName (INT iMonth, INT fAbbrev, ULONG dwFlags, BSTR *pbstrOut)
HRESULT WINAPI VarWeekdayName (INT iWeekday, INT fAbbrev, INT iFirstDay, ULONG dwFlags, BSTR *pbstrOut)

Variables

static const WCHAR szPercent_d [] = { '%','d','\0' }
static const WCHAR szPercentZeroTwo_d [] = { '%','0','2','d','\0' }
static const WCHAR szPercentZeroStar_d [] = { '%','0','*','d','\0' }
static const WCHAR szGeneralDate [] = { 'G','e','n','e','r','a','l',' ','D','a','t','e','\0' }
static const BYTE fmtGeneralDate [0x0a]
static const WCHAR szShortDate [] = { 'S','h','o','r','t',' ','D','a','t','e','\0' }
static const BYTE fmtShortDate [0x0a]
static const WCHAR szMediumDate [] = { 'M','e','d','i','u','m',' ','D','a','t','e','\0' }
static const BYTE fmtMediumDate [0x0a]
static const WCHAR szLongDate [] = { 'L','o','n','g',' ','D','a','t','e','\0' }
static const BYTE fmtLongDate [0x0a]
static const WCHAR szShortTime [] = { 'S','h','o','r','t',' ','T','i','m','e','\0' }
static const BYTE fmtShortTime [0x0c]
static const WCHAR szMediumTime [] = { 'M','e','d','i','u','m',' ','T','i','m','e','\0' }
static const BYTE fmtMediumTime [0x11]
static const WCHAR szLongTime [] = { 'L','o','n','g',' ','T','i','m','e','\0' }
static const BYTE fmtLongTime [0x0d]
static const WCHAR szTrueFalse [] = { 'T','r','u','e','/','F','a','l','s','e','\0' }
static const BYTE fmtTrueFalse [0x0d]
static const WCHAR szYesNo [] = { 'Y','e','s','/','N','o','\0' }
static const BYTE fmtYesNo [0x0d]
static const WCHAR szOnOff [] = { 'O','n','/','O','f','f','\0' }
static const BYTE fmtOnOff [0x0d]
static const WCHAR szGeneralNumber [] = { 'G','e','n','e','r','a','l',' ','N','u','m','b','e','r','\0' }
static const BYTE fmtGeneralNumber [sizeof(FMT_HEADER)]
static const WCHAR szCurrency [] = { 'C','u','r','r','e','n','c','y','\0' }
static const BYTE fmtCurrency [0x26]
static const WCHAR szFixed [] = { 'F','i','x','e','d','\0' }
static const BYTE fmtFixed [0x11]
static const WCHAR szStandard [] = { 'S','t','a','n','d','a','r','d','\0' }
static const BYTE fmtStandard [0x11]
static const WCHAR szPercent [] = { 'P','e','r','c','e','n','t','\0' }
static const BYTE fmtPercent [0x15]
static const WCHAR szScientific [] = { 'S','c','i','e','n','t','i','f','i','c','\0' }
static const BYTE fmtScientific [0x13]
static const NAMED_FORMAT VARIANT_NamedFormats []

Generated on Sun May 27 2012 05:16:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.