Any idea / hint / test ... in problem described below ?

David Macias


Harbour under OS/2 does not output to printer

Notice: I never tried to print with Harbour under OS/2 due I use it in
server side, which does not need to print, so this was a surprise

I use an old and complex system made in Clipper 5.3 in DOS session under
OS/2 and it print as usual
Now I ported it to Harbour under OS/2 and does not print

- Testing with harbour\tests\output.prg does not show output in printer

- This small code work (print) fine with Clipper but does not print with
Harbour
---------------
func main

SET PRINTER ON
? "Printing to default"
SET PRINTER OFF

SET PRINTER TO PRN
SET PRINTER ON
? "Printing to default (PRN)"
SET PRINTER OFF
SET PRINTER TO

SET PRINTER TO LPT1
SET PRINTER ON
? "Printing to LPT1"
SET PRINTER OFF
SET PRINTER TO

RETURN NIL
---------------

- Tested with older Harbour releases show the same: does not print

- From command line these output to printer as usual
  COPY test.txt LPT1:
  COPY test.txt PRN:

- harbour\source\rtl\set.c contain this code:
-----------------------------
#if defined(HB_OS_UNIX)
   hb_set.HB_SET_PRINTFILE = hb_strdup( "|lpr" );
#elif defined(HB_OS_DOS)
   hb_set.HB_SET_PRINTFILE = hb_strdup( "PRN" );
#elif defined(HB_OS_WIN_32)
   hb_set.HB_SET_PRINTFILE = hb_strdup( "LPT1" );
#else
   hb_set.HB_SET_PRINTFILE = hb_strdup( "PRN" ); /* TOFIX */
#endif
-----------------------------

so OS/2 is using PRN as default, which work under command line

- These lines show correct values:
 QOUT( SET( _SET_PRINTER ) )     .F. / .T.
 QOUT( SET( _SET_PRINTFILE ) )   "PRN", "LPT1"


Any hints ?


David Macias



_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to