diff --git a/harbour/ChangeLog b/harbour/ChangeLog index be1a2f0030..efa3a228db 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-15 18:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/compiler/genc.c + * harbour/src/compiler/compi18n.c + * use "w' instead of "wb" in hb_fopen flags. It causes that in some + systems like DOS or Windows if CRTL supports it then all \n in + generated files will be automatically translated to native EOLs + (\r\n). + This modification should make .pot and .c files generated by + Harbour compiler more readable for DOS and Windows users. + + * harbour/src/compiler/gencobj.c + ! fixed wrong hb_fopen() flags 't' is not documented fopen() flag + so some systems may refuse to open files when it's used. + 2009-10-15 17:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/common/hbver.c * src/rtl/fstemp.c diff --git a/harbour/src/compiler/compi18n.c b/harbour/src/compiler/compi18n.c index b2265e1d28..b79e9287e6 100644 --- a/harbour/src/compiler/compi18n.c +++ b/harbour/src/compiler/compi18n.c @@ -327,7 +327,7 @@ BOOL hb_compI18nSave( HB_COMP_DECL, BOOL fFinal ) hb_fsFNameMerge( szFileName, &FileName ); - file = hb_fopen( szFileName, "wb" ); + file = hb_fopen( szFileName, "w" ); if( ! file ) { diff --git a/harbour/src/compiler/genc.c b/harbour/src/compiler/genc.c index 762a61b5d8..a4ec593268 100644 --- a/harbour/src/compiler/genc.c +++ b/harbour/src/compiler/genc.c @@ -170,7 +170,7 @@ void hb_compGenCCode( HB_COMP_DECL, PHB_FNAME pFileName ) /* generates the pFileName->szExtension = ".c"; hb_fsFNameMerge( szFileName, pFileName ); - yyc = hb_fopen( szFileName, "wb" ); + yyc = hb_fopen( szFileName, "w" ); if( ! yyc ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_CREATE_OUTPUT, szFileName, NULL ); diff --git a/harbour/src/compiler/gencobj.c b/harbour/src/compiler/gencobj.c index e7d618e31e..3551f3ccbb 100644 --- a/harbour/src/compiler/gencobj.c +++ b/harbour/src/compiler/gencobj.c @@ -165,7 +165,7 @@ void hb_compGenCObj( HB_COMP_DECL, PHB_FNAME pFileName ) if( pszEnv && *hb_searchpath( pszCfgFileName, pszEnv, pszTemp ) ) { - filecfg = hb_fopen( pszTemp, "rt" ); + filecfg = hb_fopen( pszTemp, "r" ); if( ! filecfg ) { hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_OPEN_CFG, szFileName, NULL );