ICU-1802 Donot add copyright in gernerated java files by default, add only when requested explicitly with -c option

X-SVN-Rev: 8208
This commit is contained in:
Ram Viswanadha 2002-03-22 18:57:09 +00:00
parent a6f4133e21
commit 9a6483bf77
4 changed files with 10 additions and 6 deletions

View file

@ -284,7 +284,7 @@ processFile(const char *filename, const char *cp, const char *inputDir, const ch
bundle_write_java(data,outputDir,outputEnc, outputFileName, sizeof(outputFileName), status);
}
if (U_FAILURE(*status)) {
fprintf(stderr, "couldn't write bundle %s\n", outputFileName);
fprintf(stderr, "couldn't write bundle %s. Error:%s\n", outputFileName,u_errorName(*status));
}
bundle_close(data, status);

View file

@ -51,7 +51,9 @@ static uint8_t calcPadding(uint32_t size) {
void setIncludeCopyright(UBool val){
gIncludeCopyright=val;
}
UBool getIncludeCopyright(void){
return gIncludeCopyright;
}
/* Writing Functions */
static uint32_t string_write(UNewDataMemory *mem, struct SResource *res,
uint32_t usedOffset, UErrorCode *status) {

View file

@ -126,6 +126,7 @@ struct SResource {
void res_close(struct SResource *res, UErrorCode *status);
void setIncludeCopyright(UBool val);
UBool getIncludeCopyright(void);
U_CDECL_END
#endif /* #ifndef RESLIST_H */

View file

@ -39,8 +39,8 @@ static const char* copyRight = "/* \n"
" *\n"
" *******************************************************************************\n"
" * $Source: /xsrl/Nsvn/icu/icu/source/tools/genrb/wrtjava.c,v $ \n"
" * $Date: 2002/03/22 03:15:27 $ \n"
" * $Revision: 1.5 $ \n"
" * $Date: 2002/03/22 18:57:09 $ \n"
" * $Revision: 1.6 $ \n"
" *******************************************************************************\n"
" */\n\n"
"/*******************************************************************************\n"
@ -775,8 +775,9 @@ bundle_write_java(struct SRBRoot *bundle, const char *outputDir,const char* outp
*status = U_FILE_ACCESS_ERROR;
return;
}
T_FileStream_write(out,copyRight,uprv_strlen(copyRight));
if(getIncludeCopyright()){
T_FileStream_write(out,copyRight,uprv_strlen(copyRight));
}
T_FileStream_write(out,javaClass,uprv_strlen(javaClass));
T_FileStream_write(out,className,uprv_strlen(className));
if(j1){