Przemek:

>Have you tried xHarbour?
>Such printing uses normal file API. In xHarbour Maurilio changed open()
>function used by hb_fsOpen() to OS2 API DosOpen() combined with >_imphandle()

>   2006-06-06 09:58 UTC+0200 Maurilio Longo <maurilio.longo at
>libero.it>
>      * source/rtl/filesys.c
>        + added HB_OS2_IO sections to work around a GCC 'feature' on
>OS/2
>          which makes it fail to open/create files on filesystems which
>do
>          not support extended attributes (EAs).

Before your responses I wrote to Maurilio, after old xHarbour tests. This is his reponse:
----------------------------------------------
David,

I think OS/2 support for printers has never been written. I don't know if
opening "LPTn:" as a file is enough for a line printer, it surely is not
enough for a modern printer, say a laser or ink-jet one.

Maurilio.

David Arturo Macias Corona wrote:
> Maurilio:
>
> Any idea / hint / test ... in problem described below ?
>
> I tested with latest OS/2 binaries from xHarbour.org ( Dec 2006 ) and
> does not print too
>
> I can not build current xHarbour under OS/2 yet
>
> David Macias
----------------------------------------------


>It's possible that this modification resolves the problem.
>Anyhow if possible I would like to also ask you to make tests
>with file range locking with Harbour and xHarbour. F.e. try
>to check if RLOCK set by one process is visible by other, f.e.
>in this code:

>   proc main()
>      if !dbExists("_tst")
>         ? "Create table"
>         dbCreate("_tst",{{"F1","C",1,0}})
>         use _tst
>         dbappend()
>         close
>      endif
>      use _tst shared
>      dbgoto(1)
>      ? "Locking record 1:", dbRlock()
>      inkey(0)
>   return

>I'm not OS2 user/programmer and it's not clear for me reading OS2
>API if it is possible to set file range locking without HLockID handler
>returned by DosProtectOpen(). If _imphandle() cannot retrieve it
>internally from OS structures then probably not.
>If locking works correctly in xHarbour then I'll add Maurilio's
>modifications to Harbour OS2/GCC builds.

Tested with old xHarbour ( Dec 2006 ) and current Harbour
Result is:
    Locking record 1: .F.
in program started in second place ( Harbour-xHarbour, xHarbour-Harbour )

Perhaps in recent xHarbour it can lock fine, but Dec 2006 is after date of Maurilio's changes ( 2006-06-06 )

You and Maurilio can decide about adding Maurilio's
modifications to Harbour OS2/GCC builds.

But I need to learn how to rebuild current xHarbour under OS/2  :-)

David Macias

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to