2009-11-23 10:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/win_prn2.c
! Commented buggy code dealing with Chr( 256 ) strippage in PRINTFILERAW().
While I can imagine Chr( 26 ) may cause a little inconvenience
when sent to printer, it will just be a small visual one, and it's
very easy to overcome by using HB_MEMOWRIT() instead of MEMOWRIT()
to create the disk file, if the file was created by other means,
the Chr( 26 ) won't be there anyway. Anyhow I opted to have a clear cut
behavior even if it's slightly incompatible because old implementation
was buggy, and IMO such printing function shouldn't do behind-the-scenes
alterations on the data to be printed. After all the function is called
"RAW".
INCOMPATIBLE for files which has an ending Chr( 26 ).
* contrib/hbide/hbide.prg
! Removed CURDRIVE() and CURDIR() usage.
Notice that on *nix platforms there is no such thing as
drive letter, plus some platforms don't even have the
concept of current dir. CURDRIVE() is also an XBase++
specific call, so it may not be available in Harbour core.
! Removed hard-wired Windows specific path from save dialog.
(it was a template yet)
* config/rules.mk
! Deleted CFLAGS from default link rule.
After quick scan through the make files this shouldn't cause
problems. Please test and if it does, we should add missing
options to LDFLAGS.
; TODO: Clean CPPFLAGS vs. CFLAGS usage in all .mk files.
They should all uniformly use CFLAGS now.
This commit is contained in:
@@ -17,6 +17,37 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-11-23 10:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/win_prn2.c
|
||||
! Commented buggy code dealing with Chr( 256 ) strippage in PRINTFILERAW().
|
||||
While I can imagine Chr( 26 ) may cause a little inconvenience
|
||||
when sent to printer, it will just be a small visual one, and it's
|
||||
very easy to overcome by using HB_MEMOWRIT() instead of MEMOWRIT()
|
||||
to create the disk file, if the file was created by other means,
|
||||
the Chr( 26 ) won't be there anyway. Anyhow I opted to have a clear cut
|
||||
behavior even if it's slightly incompatible because old implementation
|
||||
was buggy, and IMO such printing function shouldn't do behind-the-scenes
|
||||
alterations on the data to be printed. After all the function is called
|
||||
"RAW".
|
||||
INCOMPATIBLE for files which has an ending Chr( 26 ).
|
||||
|
||||
* contrib/hbide/hbide.prg
|
||||
! Removed CURDRIVE() and CURDIR() usage.
|
||||
Notice that on *nix platforms there is no such thing as
|
||||
drive letter, plus some platforms don't even have the
|
||||
concept of current dir. CURDRIVE() is also an XBase++
|
||||
specific call, so it may not be available in Harbour core.
|
||||
! Removed hard-wired Windows specific path from save dialog.
|
||||
(it was a template yet)
|
||||
|
||||
* config/rules.mk
|
||||
! Deleted CFLAGS from default link rule.
|
||||
After quick scan through the make files this shouldn't cause
|
||||
problems. Please test and if it does, we should add missing
|
||||
options to LDFLAGS.
|
||||
; TODO: Clean CPPFLAGS vs. CFLAGS usage in all .mk files.
|
||||
They should all uniformly use CFLAGS now.
|
||||
|
||||
2009-11-23 09:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/filesys.c
|
||||
! Fixed leak in hb_fsCurDirBuff() report by Pritpal.
|
||||
@@ -261,7 +292,7 @@
|
||||
strip Chr( 26 ) even from inside the file if the file is
|
||||
larger than read buffer, which means it will corrupt input
|
||||
and may cause wrong output to be printed (f.e. if that Chr( 26 )
|
||||
is part of a printer control char sequence).
|
||||
is part of a printer control char sequence). [DONE]
|
||||
|
||||
* INSTALL
|
||||
+ Added linux/clang to the target mix.
|
||||
|
||||
@@ -63,7 +63,7 @@ endif
|
||||
|
||||
# The rule to link an executable.
|
||||
ifeq ($(LD_RULE),)
|
||||
LD_RULE = $(LD) $(CFLAGS) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) $(LD_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $(^F) $(LDLIBS) $(LDSTRIP)
|
||||
LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) $(LD_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $(^F) $(LDLIBS) $(LDSTRIP)
|
||||
endif
|
||||
|
||||
# Eliminate these rules.
|
||||
|
||||
@@ -542,12 +542,12 @@ METHOD HbIde:selectSource( cMode )
|
||||
oDlg:fileFilters := { { "PRG Sources", "*.prg" }, { "C Sources", "*.c" }, { "CPP Sources", "*.cpp" }, ;
|
||||
{ "H Headers", "*.h" }, { "CH Headers", "*.ch" } }
|
||||
|
||||
cFile := oDlg:open( CurDrive() +":\"+ CurDir(), , .f. )
|
||||
cFile := oDlg:open( , , .f. )
|
||||
ELSE
|
||||
oDlg:title := "Save this Database"
|
||||
oDlg:fileFilters := { { "Database Files", "*.dbf" } }
|
||||
oDlg:quit := {|| MsgBox( "Quitting the Dialog" ), 1 }
|
||||
cFile := oDlg:saveAs( "c:\temp\myfile.dbf" )
|
||||
cFile := oDlg:saveAs( "myfile.dbf" )
|
||||
IF !empty( cFile )
|
||||
HBXBP_DEBUG( cFile )
|
||||
ENDIF
|
||||
@@ -958,4 +958,3 @@ METHOD HbIde:fetchNewProject()
|
||||
RETURN self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -429,12 +429,14 @@ HB_FUNC( PRINTFILERAW )
|
||||
|
||||
while( ( nRead = hb_fsRead( fhnd, pbyBuffer, sizeof( pbyBuffer ) ) ) > 0 )
|
||||
{
|
||||
#if 0
|
||||
/* TOFIX: This check seems wrong for any input files
|
||||
larger than our read buffer, in such case it
|
||||
will strip Chr( 26 ) from inside the file, which
|
||||
means it will corrupt it. [vszakats] */
|
||||
if( pbyBuffer[ nRead - 1 ] == 26 )
|
||||
nRead--; /* Skip the EOF() character */
|
||||
#endif
|
||||
|
||||
WritePrinter( hPrinter, pbyBuffer, nRead, &dwWritten );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user