w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

wrtjava.cpp File Reference
#include <assert.h>
#include "unicode/unistr.h"
#include "reslist.h"
#include "unewdata.h"
#include "unicode/ures.h"
#include "errmsg.h"
#include "filestrm.h"
#include "cstring.h"
#include "unicode/ucnv.h"
#include "genrb.h"
#include "rle.h"
#include "uhash.h"
#include "uresimp.h"
#include "unicode/ustring.h"
#include "unicode/utf8.h"
Include dependency graph for wrtjava.cpp:

Go to the source code of this file.

Macros

#define ZERO   0x30
 

Functions

void res_write_java (struct SResource *res, UErrorCode *status)
 
static void write_tabs (FileStream *os)
 
static int32_t uCharsToChars (char *target, int32_t targetLen, const UChar *source, int32_t sourceLen, UErrorCode *status)
 
static uint32_t strrch (const char *source, uint32_t sourceLen, char find)
 
static int32_t getColumnCount (int32_t len)
 
static void str_write_java (const UChar *src, int32_t srcLen, UBool printEndLine, UErrorCode *status)
 
static void string_write_java (const StringResource *res, UErrorCode *status)
 
static void array_write_java (const ArrayResource *res, UErrorCode *status)
 
static void intvector_write_java (const IntVectorResource *res, UErrorCode *)
 
static void int_write_java (const IntResource *res, UErrorCode *)
 
static void bytes_write_java (const BinaryResource *res, UErrorCode *)
 
static void table_write_java (const TableResource *res, UErrorCode *status)
 
void bundle_write_java (struct SRBRoot *bundle, const char *outputDir, const char *outputEnc, char *writtenFilename, int writtenFilenameLen, const char *packageName, const char *bundleName, UErrorCode *status)
 

Variables

static const char copyRight []
 
static const char warningMsg []
 
static const char * openBrace ="{\n"
 
static const char * closeClass
 
static const char * javaClass
 
static const char * javaClass1
 
static int tabCount = 3
 
static FileStreamout = ((void *)0)
 
static struct SRBRootsrBundle
 
static const char * bName = ((void *)0)
 
static const char * pName = ((void *)0)
 
static const char * enc =""
 
static UConverterconv = ((void *)0)
 
static UBool start = 1
 

Macro Definition Documentation

◆ ZERO

#define ZERO   0x30

Definition at line 101 of file wrtjava.cpp.

Function Documentation

◆ array_write_java()

static void array_write_java ( const ArrayResource res,
UErrorCode status 
)
static

◆ bundle_write_java()

void bundle_write_java ( struct SRBRoot bundle,
const char *  outputDir,
const char *  outputEnc,
char *  writtenFilename,
int  writtenFilenameLen,
const char *  packageName,
const char *  bundleName,
UErrorCode status 
)

◆ bytes_write_java()

static void bytes_write_java ( const BinaryResource res,
UErrorCode  
)
static

Definition at line 448 of file wrtjava.cpp.

References NULL, out, sprintf, T_FileStream_write(), tabCount, type, uprv_strlen, and write_tabs().

Referenced by res_write_java().

◆ getColumnCount()

static int32_t getColumnCount ( int32_t  len)
static

Definition at line 218 of file wrtjava.cpp.

References len.

Referenced by str_write_java().

◆ int_write_java()

static void int_write_java ( const IntResource res,
UErrorCode  
)
static

Definition at line 432 of file wrtjava.cpp.

References buf, itostr(), len, out, T_FileStream_write(), uprv_strlen, and write_tabs().

Referenced by res_write_java().

◆ intvector_write_java()

static void intvector_write_java ( const IntVectorResource res,
UErrorCode  
)
static

Definition at line 391 of file wrtjava.cpp.

References buf, i, itostr(), len, NULL, out, srBundle, T_FileStream_write(), tabCount, uprv_strcmp, uprv_strlen, and write_tabs().

Referenced by res_write_java().

◆ res_write_java()

◆ str_write_java()

◆ string_write_java()

static void string_write_java ( const StringResource res,
UErrorCode status 
)
static

Definition at line 324 of file wrtjava.cpp.

References srBundle, status, str_write_java(), TRUE, and void.

Referenced by res_write_java().

◆ strrch()

static uint32_t strrch ( const char *  source,
uint32_t  sourceLen,
char  find 
)
static

Definition at line 207 of file wrtjava.cpp.

References find(), and source.

Referenced by str_write_java().

◆ table_write_java()

static void table_write_java ( const TableResource res,
UErrorCode status 
)
static

◆ uCharsToChars()

static int32_t uCharsToChars ( char *  target,
int32_t  targetLen,
const UChar source,
int32_t  sourceLen,
UErrorCode status 
)
static

Definition at line 107 of file wrtjava.cpp.

References conv, fc-lang::default, dest, i, itostr(), j, status, str, target, U_FAILURE, ucnv_fromUChars, uprv_strcat, and uprv_strcpy.

Referenced by str_write_java().

◆ write_tabs()

Variable Documentation

◆ bName

const char* bName = ((void *)0)
static

Definition at line 91 of file wrtjava.cpp.

Referenced by bundle_write_java(), and NoCommon().

◆ closeClass

const char* closeClass
static
Initial value:
=" };\n"
"}\n"

Definition at line 66 of file wrtjava.cpp.

Referenced by bundle_write_java().

◆ conv

UConverter* conv = ((void *)0)
static

Definition at line 104 of file wrtjava.cpp.

Referenced by bundle_write_java(), and uCharsToChars().

◆ copyRight

const char copyRight[]
static
Initial value:
=
"/* \n"
" *******************************************************************************\n"
" *\n"
" * Copyright (C) International Business Machines\n"
" * Corporation and others. All Rights Reserved.\n"
" *\n"
" *******************************************************************************\n"
" * $" "Source: $ \n"
" * $" "Date: $ \n"
" * $" "Revision: $ \n"
" *******************************************************************************\n"
" */\n\n"

Definition at line 41 of file wrtjava.cpp.

Referenced by bundle_write_java(), and createCommonDataFile().

◆ enc

const char* enc =""
static

Definition at line 103 of file wrtjava.cpp.

◆ javaClass

const char* javaClass
static
Initial value:
= "import java.util.ListResourceBundle;\n\n"
"public class "

Definition at line 69 of file wrtjava.cpp.

Referenced by bundle_write_java().

◆ javaClass1

const char* javaClass1
static
Initial value:
= " extends ListResourceBundle {\n\n"
" /**\n"
" * Overrides ListResourceBundle \n"
" */\n"
" public final Object[][] getContents() { \n"
" return contents;\n"
" }\n\n"
" private static Object[][] contents = {\n"

Definition at line 72 of file wrtjava.cpp.

Referenced by bundle_write_java().

◆ openBrace

const char* openBrace ="{\n"
static

Definition at line 65 of file wrtjava.cpp.

Referenced by table_write_java().

◆ out

◆ pName

◆ srBundle

struct SRBRoot* srBundle
static

◆ start

UBool start = 1
static

Definition at line 509 of file wrtjava.cpp.

Referenced by bundle_write_java(), and table_write_java().

◆ tabCount

int tabCount = 3
static

◆ warningMsg

const char warningMsg[]
static
Initial value:
=
"/*********************************************************************\n"
"######################################################################\n"
"\n"
" WARNING: This file is generated by genrb Version " "56" ".\n"
" If you edit this file, please make sure that, the source\n"
" of this file (XXXX.txt in LocaleElements_XXXX.java)\n"
" is also edited.\n"
"######################################################################\n"
" *********************************************************************\n"
" */\n\n"

Definition at line 54 of file wrtjava.cpp.

Referenced by bundle_write_java().