Re: [Harbour] Kubuntu 9.10 and HBQT

2009-08-03 Thread Davor Siklic

Alexandr Okhotnikov napsal(a):

Hi

After upgrade my Kubuntu (up to Kubuntu karmic 9.10, GCC 4.4, KDE 4.3 RC3):
attempt to start (demo in "contrib/hbqt/tests/demoqt") leads to error
"Segmentation fault (core dumped)"
  

First come in mind that you need to recompile harbour
best regards
Davor



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


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


Re: [Harbour] Problems updating from SVN

2009-11-26 Thread Davor Siklic

Bruno Luciani napsal(a):

Something Strange happens  when i try to update via SVN

 Bruno

//

br...@notebook:~$ svn co 
https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk 
harbour_svn
svn: Error al convertir la entrada en el directorio 
«harbour_svn/harbour/contrib/hbide» a UTF-8

svn: Datos UTF-8 válidos
(hex:)
seguidos de una secuencia UTF-8 inválida
(hex: d0 d3 43)
br...@notebook:~$



___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  

export LC_ALL=C
svn co 
https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour




___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Problems updating from SVN

2009-11-27 Thread Davor Siklic

Bruno Luciani napsal(a):


But I never need to do that
until yesterday all works ok

Bruno


"export LC_ALL=C" make error message in English



2009/11/27 Davor Siklic mailto:s...@msoft.cz>>

Bruno Luciani napsal(a):

Something Strange happens  when i try to update via SVN

 Bruno

//

br...@notebook:~$ svn co

https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk
harbour_svn
svn: Error al convertir la entrada en el directorio
«harbour_svn/harbour/contrib/hbide» a UTF-8
svn: Datos UTF-8 válidos
(hex:)
seguidos de una secuencia UTF-8 inválida
(hex: d0 d3 43)
br...@notebook:~$





___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org <mailto:Harbour@harbour-project.org>
http://lists.harbour-project.org/mailman/listinfo/harbour
 


export LC_ALL=C

svn co

https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour



___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org <mailto:Harbour@harbour-project.org>
http://lists.harbour-project.org/mailman/listinfo/harbour




___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] hbide

2009-11-29 Thread Davor Siklic

hbide fail to compile on ubuntu
regards
Davor

s...@siki:~/clipp/harbour/contrib/hbide$ hbmk2 hbide
hbmk2: Processing environment options: 
-compiler=gcc   
hbmk2: Processing configuration: 
/usr/bin/hbmk.cfg 
Harbour 2.0.0beta3 (Rev. 
13063)
Copyright (c) 1999-2009, 
http://www.harbour-project.org/   
Compiling 
'hbide.prg'...   
Lines 5819, Functions/Procedures 
42
Generating C source output to 'hbide.c'... 
Done.   
hbide.o:(.data+0x448): undefined reference to 
`HB_FUN_SETAPPWINDOW'
hbide.o:(.data+0x488): undefined reference to 
`HB_FUN_XBPTABWIDGET'
hbide.o:(.data+0x518): undefined reference to 
`HB_FUN_QGRIDLAYOUT' 
hbide.o:(.data+0x598): undefined reference to 
`HB_FUN_QSPLITTER'   
hbide.o:(.data+0x5f8): undefined reference to 
`HB_FUN_XBPFONT' 
hbide.o:(.data+0x628): undefined reference to 
`HB_FUN_BUILDMAINMENU'   
hbide.o:(.data+0x638): undefined reference to 
`HB_FUN_BUILDTOOLBAR'
hbide.o:(.data+0x688): undefined reference to 
`HB_FUN_APPEVENT'
hbide.o:(.data+0x878): undefined reference to 
`HB_FUN_HBQT_QTPTR_FROM_GCPOINTER'
hbide.o:(.data+0x948): undefined reference to 
`HB_FUN_READSOURCE'   
hbide.o:(.data+0x998): undefined reference to 
`HB_FUN_POSTAPPEVENT' 
hbide.o:(.data+0xb48): undefined reference to 
`HB_FUN_QTEXTCURSOR'  
hbide.o:(.data+0xc68): undefined reference to 
`HB_FUN_XBPTABPAGE'   
hbide.o:(.data+0xd08): undefined reference to 
`HB_FUN_QTEXTEDIT'
hbide.o:(.data+0xd68): undefined reference to 
`HB_FUN_QCOLOR'   
hbide.o:(.data+0xd78): undefined reference to 
`HB_FUN_QTEXTDOCUMENT'
hbide.o:(.data+0xd98): undefined reference to 
`HB_FUN_QBOXLAYOUT'   
hbide.o:(.data+0xdb8): undefined reference to 
`HB_FUN_QSYNTAXHIGHLIGHTER'   
hbide.o:(.data+0xe08): undefined reference to 
`HB_FUN_QT_CONNECT_SIGNAL'
hbide.o:(.data+0xe88): undefined reference to 
`HB_FUN_QMESSAGEBOX'  
hbide.o:(.data+0xf68): undefined reference to 
`HB_FUN_XBPFILEDIALOG'
hbide.o:(.data+0xfc8): undefined reference to 
`HB_FUN_MSGBOX'   
hbide.o:(.data+0xff8): undefined reference to 
`HB_FUN_XBPTREEVIEW'  
hbide.o:(.data+0x1038): undefined reference to 
`HB_FUN_GRAMAKERGBCOLOR' 
hbide.o:(.data+0x10d8): undefined reference to 
`HB_FUN_XBPSTATUSBAR'
hbide.o:(.data+0x1138): undefined reference to 
`HB_FUN_XBPDIALOG'   
hbide.o:(.data+0x11d8): undefined reference to 
`HB_FUN_EXECPOPUP'   
hbide.o:(.data+0x1208): undefined reference to 
`HB_FUN_XBPWINDOW'   
hbide.o:(.data+0x1228): undefined reference to 
`HB_FUN_QDOCKWIDGET' 
hbide.o:(.data+0x1298): undefined reference to 
`HB_FUN_XBPLISTBOX'  
hbide.o:(.data+0x12b8): undefined reference to 
`HB_FUN_GETSTYLESHEET'   
hbide.o:(.data+0x13d8): undefined reference to 
`HB_FUN_XBPMLE'  
hbide.o:(.data+0x1488): undefined reference to 
`HB_FUN_CHECKCOMMENTS'   
hbide.o:(.data+0x1498): undefined reference to 
`HB_FUN_SUMMARIZE'   
hbide.o:(.data+0x14a8): undefined reference to 
`HB_FUN_UPDATETAGS'  
hbide.o:(.data+0x14d8): undefined reference to 
`HB_FUN_QPRINTPREVIEWDIALOG' 
hbide.o:(.data+0x14f8): undefined reference to 
`HB_FUN_QT_DISCONNECT_SIGNAL'
hbide.o:(.data+0x1508): undefined reference to 
`HB_FUN_QPRINTER'
hbide.o:(.data+0x1528): undefined reference to 
`HB_FUN_QDIALOG' 
hbide.o:(.data+0x1538): undefined reference to 
`HB_FUN_QLABEL'  
hbide.o:(.data+0x1548): undefined reference to 
`HB_FUN_QCOMBOBOX'   
hbide.o:(.data+0x1558): undefined reference to `HB_FUN_XBPSLE'

hbide.o:(.data+0x1568): undefined reference to `HB_FUN_QHBOXLAYOUT'
hbide.o:(.data+0x1588): undefined reference to `HB_FUN_XBPPUSHBUTTON'
hbide.o:(.data+0x15e8): undefined reference to `HB_FUN_QWIDGET'
hbide.o:(.data+0x1608): undefined reference to `HB_FUN_JUSTACALL'
hbide.o:(.data+0x1628): undefined reference to `HB_FUN_QFILE'
hbide.o:(.data+0x1638): undefined reference to `HB_FUN_QUILOADER'
hbide.o:(.data+0x1698): undefined reference to `HB_FUN_XBPCOMBOBOX'
hbide.o:(.data+0x16a8): undefined reference to `HB_FUN_QT_FINDCHILD'
hbide.o:(.data+0x16f8): undefined reference to `HB_FUN_QLINEEDIT'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc hbide.o hbmk_n1rd9q.o   -Wl,--start-group -lhbcplr -lhbdebug -lgpm 
-lharbour  -Wl,--end-group -ohbide -L/usr/lib/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-proj

Re: [Harbour] hbide

2009-11-29 Thread Davor Siklic

Tamas TEVESZ napsal(a):

On Mon, 30 Nov 2009, Davor Siklic wrote:

 > s...@siki:~/clipp/harbour/contrib/hbide$ hbmk2 hbide

hbmk2 hbide.hbp


  

jeah
so tired after all night work
thank you and sorry to bother

best regards
Davor

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] gcc2

2009-12-14 Thread Davor Siklic

Tamas TEVESZ napsal(a):

hi,

would someone with gcc2 handy get me the output of

gcc -dM -E -xc /dev/null

please? (whatever /dev/null is on your platform; running it on an 
empty file is good, too.)


please indicate what platform you are on.

i am not at the moment interested in any other gcc version, only v2.

thanks,

  

Not sure what you mean with "gcc2 handy" but there are my output

best regards
Davor

gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--enable-shared --enable-multiarch --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 
--program-suffix=-4.4 --enable-nls --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-objc-gc --enable-targets=all 
--disable-werror --with-arch-32=i486 --with-tune=generic 
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu 
--target=i486-linux-gnu

Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)


s...@siki:~$ gcc -dM -E -xc /dev/null  
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8 
#define __WCHAR_MAX__ 2147483647   
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1   
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1   
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1   
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 
#define __FLT_EVAL_METHOD__ 2  
#define __unix__ 1 
#define __DBL_MIN_10_EXP__ (-307)  
#define __FINITE_MATH_ONLY__ 0 
#define __GNUC_PATCHLEVEL__ 1  
#define __DEC64_MAX_EXP__ 385  
#define __SHRT_MAX__ 32767 
#define __LDBL_MAX__ 1.18973149535723176502e+4932L 
#define __UINTMAX_TYPE__ long long unsigned int
#define __linux 1  
#define __DEC32_EPSILON__ 1E-6DF   
#define __unix 1   
#define __LDBL_MAX_EXP__ 16384 
#define __linux__ 1
#define __SCHAR_MAX__ 127  
#define __DBL_DIG__ 15 
#define _FORTIFY_SOURCE 2  
#define __SIZEOF_INT__ 4   
#define __SIZEOF_POINTER__ 4   
#define __USER_LABEL_PREFIX__  
#define __STDC_HOSTED__ 1  
#define __LDBL_HAS_INFINITY__ 1
#define __FLT_EPSILON__ 1.19209290e-7F 
#define __LDBL_MIN__ 3.36210314311209350626e-4932L 
#define __DEC32_MAX__ 9.99E96DF
#define __SIZEOF_LONG__ 4  
#define __DECIMAL_DIG__ 21 
#define __gnu_linux__ 1
#define __LDBL_HAS_QUIET_NAN__ 1   
#define __GNUC__ 4 
#define __FLT_HAS_DENORM__ 1   
#define __SIZEOF_LONG_DOUBLE__ 12  
#define __BIGGEST_ALIGNMENT__ 16   
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1 
#define __DEC32_MIN_EXP__ (-94)
#define __LDBL_HAS_DENORM__ 1  
#define __DEC128_MAX__ 9.9E6144DL  
#define __DEC32_MIN__ 1E-95DF  
#define __DBL_MAX_EXP__ 1024   
#define __DEC128_EPSILON__ 1E-33DL 
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WINT_T__ 4

Re: [Harbour] observation about 9.1 ubuntu Package

2010-01-03 Thread Davor Siklic

Viktor Szakáts napsal(a):

Yes , but there aren't  any people asking or responding in this forum/list



One more reason to redirect traffic there, otherwise 
it's a catch 22, nobody goes there (even with relevant 
question), because there is nobody there :)


Community experts pls jump on this how to resolve that.

Brgds,
Viktor

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  

Hi

I'm user of linux from 95
maybe I'm wrong but right place to install from packaging system deb or 
rpm are /usr/bin, /usr/lib, /usr/include etc.  This systems are able to 
install and uninstall packages and there are not mess up


locally compiled  and installed software always are placed in 
/usr/local/bin, /usr/local/lib, /usr/local/include

and that are clean situation and is easy to find what is installed locally

standard unix path settings are:

   
PATH=/home/siki/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin


that means that locally compiled software are used and are very easy to 
change which versions  are used


no other magic

best regards
Davor



___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] dbu

2009-06-09 Thread Davor Siklic

Hello all

dbu.dif is not usable on linux, any hint ?
there are a problem with dbu.hbp also becouse the filenames are in uppercase

best regards
Davor



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


Re: [Harbour] dbu

2009-06-09 Thread Davor Siklic

Viktor Szakáts napsal(a):

dbu.dif is not usable on linux, any hint ?



I have a guess: EOL.

Convert it with dos2unix or similar tool and retry.
I'll fix it in a while.

Brgds,
Viktor
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  

Hi Viktor

There is what I get (I change uppercase names to lowercase in .dif file)

s...@siki:/opt/clipp/harbour/examples/dbu$ patch  < dbu.dif
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff -u -x make_dif.bat ..\ori_src\dbu.prg .\dbu.prg
|--- ..\ori_src\dbu.prg Thu Mar 04 04:20:00 1993
|+++ .\dbu.prg  Fri Dec 19 12:56:30 2008
--

s...@siki:/opt/clipp/harbour/examples/dbu$ mkdir ori_src
s...@siki:/opt/clipp/harbour/examples/dbu$ cp *.prg ori_src/

s...@siki:/opt/clipp/harbour/examples/dbu$ patch  < dbu.dif
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff -u -x make_dif.bat ..\ori_src\dbu.prg .\dbu.prg
|--- ..\ori_src\dbu.prg Thu Mar 04 04:20:00 1993
|+++ .\dbu.prg  Fri Dec 19 12:56:30 2008
--
File to patch:




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


Re: [Harbour] dbu

2009-06-09 Thread Davor Siklic

Viktor Szakáts napsal(a):

Hi all

dbu.dif is not usable on linux, any hint ?



No. What happens?

  

there are a problem with dbu.hbp also becouse the filenames are in uppercase



It's intentionally uppercase (specifically because
of *nix systems) because the original sources were
also uppercased, and we expect the original sources
for the .dif, so I expected them to appear as uppercase
even on Linux.
  
It's question of how filesystem are mounted. I mount my old dos hard 
drive and I have all files lowercase. I think that this is mostly true 
for expirienced linux/unix user
I think that dbu are very important and  we can try to make dif proces  
case insensitive and dont have such problems in future


regards
Davor



If they aren't on your system, convert them to uppercase
and retry.

Brgds,
Viktor
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


Re: [Harbour] dbu

2009-06-09 Thread Davor Siklic

Davor Siklic napsal(a):

Viktor Szakáts napsal(a):

Hi all

dbu.dif is not usable on linux, any hint ?



No. What happens?


s...@siki:/opt/clipp/harbour/examples/dbu$ dos2unix dbu.dif
s...@siki:/opt/clipp/harbour/examples/dbu$ patch dbu.prg  dbu.dif
patching file dbu.prg
Hunk #1 FAILED at 60.
Hunk #2 FAILED at 381.
Hunk #3 FAILED at 398.
3 out of 3 hunks FAILED -- saving rejects to file dbu.prg.rej
can't find file to patch at input line 44
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff -u -x make_dif.bat ..\ori_src\dbucopy.prg .\dbucopy.prg
|--- ..\ori_src\dbucopy.prg Thu Mar 04 04:20:00 1993
|+++ .\dbucopy.prg  Fri May 30 14:41:33 2008
--
File to patch:


maybe we can to update information in readme how to patch in linux

regards
Davor


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


Re: [Harbour] dbu

2009-06-09 Thread Davor Siklic

Viktor Szakáts napsal(a):

It's question of how filesystem are mounted. I mount my old dos hard drive
and I have all files lowercase. I think that this is mostly true for
expirienced linux/unix user
I think that dbu are very important and  we can try to make dif proces  case
insensitive and dont have such problems in future



hbmk2 is also case-sensitive.

I'd expect ppl are copying these files from old archives /
backup dirs to native file system where casing is retained,
but it's very difficult to tell.
  
yes, that's true, but in linux are most common use of lowercase file 
names and that are, how to say, more native and expected



Probably the distro/source tree cannot be fully perfect for
every existing scenario.
  

I think that if we can make script/batch/makefile which
   change case of files if needed->apply dif->compile using hbmk2

and have fully perfect another part :-)

Maybe we can include another dbu clone, Alexander's dbc come in mind 
(Hello Alex :-)), or bdbf
From god old DOS days I use DBX (today with use of dosemu) but dont 
have source and dont know how is with licence. Anyone ?


regards
Davor




I cannot make a decision here.

Brgds,
Viktor
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


Re: [Harbour] dbu

2009-06-09 Thread Davor Siklic

Przemyslaw Czerpak napsal(a):

On Wed, 10 Jun 2009, Szak�ts Viktor wrote:
  

I know, one of the major points of this patch is to
make DBU code use lower case names. However DBU sources
still come in uppercase from the vendor, as we're just
patching them :) Same situation with superlib, but
there at least the source file is on a known public
FTP server.



Viktor, please convert it to lower names.
You will not find native *nix user who can accept upper filenames
in such context. Also most of use use archive programs which automatically
convert DOS file names to lower case. The problem is only with trash
introduced by windows and mixed short (upper) and long names (mixed) so
automatic file name conversion from DOS is usually disabled and have to
be enabled explicitly by user but it's still sth what is default action
for most of *nix users. People who are using case sensitive FS as default
used to use simple strict file case rules to avoid problems.

best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  

+1

regards
Davor




#
# $Id: dbu.hbp 11177 2009-05-29 16:38:23Z vszakats $
#

dbu.prg
dbucopy.prg
dbuedit.prg
dbuhelp.prg
dbuindx.prg
dbunet.prg
dbustru.prg
dbuutil.prg
dbuview.prg
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: dbu

2009-06-10 Thread Davor Siklic

Alexander S.Kresin napsal(a):

Davor Siklic writes:


Maybe we can include another dbu clone, Alexander's dbc come in mind 
(Hello Alex :-))


Hi, glad to see you :)


me to

I'm ready to provide dbc sources under common Harbour license.


That's great, thank You

best regards
Davor


Regards, Alexander.
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


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


Re: [Harbour] dbu

2009-06-10 Thread Davor Siklic

Viktor Szakáts napsal(a):

Okay.

Is there a simple cmdline to convert filenames to lowercase,
which works on most *nix systems?

  

|
   convmv --lower --notest *

or

|

|rename 'y/A-Z/a-z/' *|

|or script like

|

|#!/bin/bash
for filename in *
do
  n=`echo $filename | tr '[:upper:]' '[:lower:]'`
  mv $filename $n
done
|

best regards
Davor


If there is I'd like to include it in readme.txt.

Brgds,
Viktor

On Wed, Jun 10, 2009 at 2:24 AM, Przemyslaw Czerpak wrote:
  

On Wed, 10 Jun 2009, Szak�ts Viktor wrote:


I know, one of the major points of this patch is to
make DBU code use lower case names. However DBU sources
still come in uppercase from the vendor, as we're just
patching them :) Same situation with superlib, but
there at least the source file is on a known public
FTP server.
  

Viktor, please convert it to lower names.
You will not find native *nix user who can accept upper filenames
in such context. Also most of use use archive programs which automatically
convert DOS file names to lower case. The problem is only with trash
introduced by windows and mixed short (upper) and long names (mixed) so
automatic file name conversion from DOS is usually disabled and have to
be enabled explicitly by user but it's still sth what is default action
for most of *nix users. People who are using case sensitive FS as default
used to use simple strict file case rules to avoid problems.

best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour



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


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


Re: [Harbour] dbu

2009-06-10 Thread Davor Siklic

Viktor Szakáts napsal(a):

Okay.

Is there a simple cmdline to convert filenames to lowercase,
which works on most *nix systems?



|
  convmv --lower --notest *

or

|

|rename 'y/A-Z/a-z/' *|

|or script like

|

|#!/bin/bash
for filename in *
do
 n=`echo $filename | tr '[:upper:]' '[:lower:]'`
 mv $filename $n
done
|


Thanks. convmv and rename doesn't work on Darwin, so we'd
need something universal. Plus now also EOL conversion is
needed, which again doesn't seem to have an easy and portable
*nix command.



Here is a perl one-line that does the same thing from the command line:

|perl -MFile::Copy -e 'move $_, lc($_) foreach glob "*"'|

|I'm not sure that darwin have installed perl at default, universal are 
bash script




|

I guess we must assume that *nix users are professional
enough who know how to solve such problems on their actual
*nix variant.

If someone feels like it, please update dbu/rl/superlib
readme.txt files with such information.

I think that for *nix users is enought info in readme files

regards
Davor



Brgds,
Viktor

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


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


[Harbour] Debuger

2009-06-11 Thread Davor Siklic

Hi All

I found small problem in debbuger

when try to locate some text in source file debbuger chrashed:

METHOD Search( cString, lCaseSensitive, nMode ) CLASS HBBrwText

  LOCAL bMove
  LOCAL lFound := .F.

  IF !lCaseSensitive
 cString := Upper( cString )
  ENDIF

  DO CASE
  CASE nMode == 0 // From Top
 ::GoTop()
 bMove := {|| ::Skip( 1 ) }
  CASE nMode == 1 // Forward
 bMove := {|| ::Skip( 1 ) }
  CASE nMode == 2 // Backward
 bMove := {|| ::Skip( -1 ) }
  ENDCASE

  DO WHILE Eval( bMove ) != 0
 IF cString $ IIF( lCaseSensitive, ::cCurLine, Upper( ::cCurLine ) 
)   <-here ::cCurLine is not initialized and valtype return NIL

lFound := .T.
::RefreshAll()
EXIT
 ENDIF
  ENDDO

  RETURN lFound

I try to found solution but I'm not much familiar with oo coding style. 
cCurLine are not initialized and used anywhere

anybody can take a look

best regards
Davor






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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

Thank you Alexander.

I've added this hbformat command line into readme.txts:
hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpace=no *.prg

I'd appreciate if Linux users could test the process with real
sources. Davor?


hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpace=no *.prg
Initialization error  2 in parameter : lSpace=no
hbformat -V
Harbour Source Formatter 2.0.0beta1 (Rev. 11307)
Copyright (c) 2009, Alexander S.Kresin
http://www.harbour-project.org/


Brgds,
Viktor

On 2009.06.11., at 17:09, alkre...@users.sourceforge.net wrote:


Revision: 11305
 
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11305&view=rev 


Author:   alkresin
Date: 2009-06-11 15:09:58 + (Thu, 11 Jun 2009)

Log Message:
---
2009-06-11 19:10 UTC+0300 Alexander Kresin 
 * utils/hbformat/hbformat.prg
 * utils/hbformat/hbformat.ini
   * if "nEol" option is 0, the EOL is set to OS default value
   * new option added - lFCaseLow ( default - no ). If yes, the file 
name

 is converted to lower case.
   * A limitation for file mask has been introduced - *.* is rejected 
now

 ( it may be dangerous ).

Modified Paths:
--
   trunk/harbour/ChangeLog
   trunk/harbour/utils/hbformat/hbformat.ini
   trunk/harbour/utils/hbformat/hbformat.prg


This was sent by the SourceForge.net collaborative development 
platform, the world's largest Open Source development site.

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


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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

My typo :(

Could you try with this one:
hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg

Brgds,
Viktor


s...@siki:~/clipp/harbour/source/debug/test_src$ ls
dbucopy.prg  dbu.hlp  dbunet.prg  dbustru.prg  dbuview.prg
dbuedit.prg  dbuindx.prg  DBU.PRG dbuutil.prg
dbuhelp.prg  dbu.lnk  dbu.rmk dbuview.bak
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat -lFCaseLow=yes 
-nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg


Reformatting dbuview.prg
<.>
s...@siki:~/clipp/harbour/source/debug/test_src$ ls
dbucopy.prg  dbu.hlp  dbunet.prg  dbustru.prg  dbuview.prg
dbuedit.prg  dbuindx.prg  DBU.PRG dbuutil.prg
dbuhelp.prg  dbu.lnk  dbu.rmk dbuview.bak
s...@siki:~/clipp/harbour/source/debug/test_src$




On 2009.06.11., at 19:32, Davor Siklic wrote:


Viktor Szakáts napsal(a):

Thank you Alexander.

I've added this hbformat command line into readme.txts:
hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpace=no *.prg

I'd appreciate if Linux users could test the process with real
sources. Davor?


hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpace=no *.prg
Initialization error  2 in parameter : lSpace=no
hbformat -V
Harbour Source Formatter 2.0.0beta1 (Rev. 11307)
Copyright (c) 2009, Alexander S.Kresin
http://www.harbour-project.org/


Brgds,
Viktor

On 2009.06.11., at 17:09, alkre...@users.sourceforge.net wrote:


Revision: 11305

http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11305&view=rev 


Author:   alkresin
Date: 2009-06-11 15:09:58 + (Thu, 11 Jun 2009)

Log Message:
---
2009-06-11 19:10 UTC+0300 Alexander Kresin belacy.belgorod.su>

* utils/hbformat/hbformat.prg
* utils/hbformat/hbformat.ini
  * if "nEol" option is 0, the EOL is set to OS default value
  * new option added - lFCaseLow ( default - no ). If yes, the file 
name

is converted to lower case.
  * A limitation for file mask has been introduced - *.* is 
rejected now

( it may be dangerous ).

Modified Paths:
--
  trunk/harbour/ChangeLog
  trunk/harbour/utils/hbformat/hbformat.ini
  trunk/harbour/utils/hbformat/hbformat.prg


This was sent by the SourceForge.net collaborative development 
platform, the world's largest Open Source development site.

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


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


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


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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

Brgds,
Viktor


s...@siki:~/clipp/harbour/source/debug/test_src$ ls
dbucopy.prg  dbu.hlp  dbunet.prg  dbustru.prg  dbuview.prg
dbuedit.prg  dbuindx.prg  DBU.PRG dbuutil.prg
dbuhelp.prg  dbu.lnk  dbu.rmk dbuview.bak
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat 
-lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg


Reformatting dbuview.prg
<.>
s...@siki:~/clipp/harbour/source/debug/test_src$ ls
dbucopy.prg  dbu.hlp  dbunet.prg  dbustru.prg  dbuview.prg
dbuedit.prg  dbuindx.prg  DBU.PRG dbuutil.prg
dbuhelp.prg  dbu.lnk  dbu.rmk dbuview.bak
s...@siki:~/clipp/harbour/source/debug/test_src$


Good, so the command line is fine.

Next question is what happens if the source
filenames were in uppercase, plus whether the
patch command works after above conversion.

Can you test this process?


s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBUCOPY.PRG  DBU.HLP  DBUNET.PRG  DBUSTRU.PRG  DBUVIEW.PRG
DBUEDIT.PRG  DBUINDX.PRG  DBU.PRG DBUUTIL.PRG
DBUHELP.PRG  DBU.LNK  DBU.RMK DBUVIEW.BAK
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat -lFCaseLow=yes 
-nEol=0 -lIndent=no -lCase=no -lSpaces=no 
*.prg   


Reformatting ./DBUHELP.PRG
<>
Reformatting ./DBUINDX.PRG
<.>
Reformatting ./DBUSTRU.PRG
<.>
Reformatting ./DBUVIEW.PRG
<.>
Reformatting ./DBUUTIL.PRG
<.>
Reformatting ./DBUCOPY.PRG
<.>
Reformatting ./DBU.PRG
<.>
Reformatting ./DBUEDIT.PRG
<.>
Reformatting ./DBUNET.PRG
<>
s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBU.bak  dbuedit.prg  DBUINDX.bak  dbunet.prg   dbustru.prg  DBUVIEW.BAK
DBUCOPY.bak  DBUHELP.bak  dbuindx.prg  dbu.prg  DBUUTIL.bak  dbuview.prg
dbucopy.prg  dbuhelp.prg  DBU.LNK  DBU.RMK  dbuutil.prg
DBUEDIT.bak  DBU.HLP  DBUNET.bak   DBUSTRU.bak  DBUVIEW.bak
s...@siki:~/clipp/harbour/source/debug/test_src$

regards
Davor



Brgds,
Viktor

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


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


Re: [Harbour] Re: Debugger

2009-06-11 Thread Davor Siklic

Alexander S.Kresin napsal(a):

I found small problem in debbuger
when try to locate some text in source file debbuger chrashed:



 Fixed.

Regards, Alexander.




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

Great :-)

VAR cCurLine
   at line 72 now are not needed at al

thank You Alex

best regards
DAVOR


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Davor Siklic napsal(a)

but in case I run again and there are all files lowercase



s...@siki:~/clipp/harbour/source/debug/test_src$ ls
dbucopy.prg  dbuhelp.prg  dbuindx.prg  dbunet.prg  DBU.RMK  dbuutil.prg
dbuedit.prg  DBU.HLP  DBU.LNK  dbu.prg dbustru.prg  dbuview.prg
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat -lFCaseLow=yes 
-nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg


Reformatting dbuview.prg
<.>
s...@siki:~/clipp/harbour/source/debug/test_src$


not all files are processed !?

regards
Davor

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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

Good, so the command line is fine.

Next question is what happens if the source
filenames were in uppercase, plus whether the
patch command works after above conversion.

Can you test this process?


s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBUCOPY.PRG  DBU.HLP  DBUNET.PRG  DBUSTRU.PRG  DBUVIEW.PRG
DBUEDIT.PRG  DBUINDX.PRG  DBU.PRG DBUUTIL.PRG
DBUHELP.PRG  DBU.LNK  DBU.RMK DBUVIEW.BAK
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat 
-lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg

Reformatting ./DBUHELP.PRG
<>
Reformatting ./DBUINDX.PRG
<.>
Reformatting ./DBUSTRU.PRG
<.>
Reformatting ./DBUVIEW.PRG
<.>
Reformatting ./DBUUTIL.PRG
<.>
Reformatting ./DBUCOPY.PRG
<.>
Reformatting ./DBU.PRG
<.>
Reformatting ./DBUEDIT.PRG
<.>
Reformatting ./DBUNET.PRG
<>
s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBU.bak  dbuedit.prg  DBUINDX.bak  dbunet.prg   dbustru.prg  
DBUVIEW.BAK
DBUCOPY.bak  DBUHELP.bak  dbuindx.prg  dbu.prg  DBUUTIL.bak  
dbuview.prg

dbucopy.prg  dbuhelp.prg  DBU.LNK  DBU.RMK  dbuutil.prg
DBUEDIT.bak  DBU.HLP  DBUNET.bak   DBUSTRU.bak  DBUVIEW.bak
s...@siki:~/clipp/harbour/source/debug/test_src$


Thanks. This looks fine to me, hbformat left the
uppercased names as .bak files.

What I don't understand is how hbformat found the *.PRG
extension where we looked for *.prg one. Anyway current
behavior is very good for us, since it accept extension
regardless of the case.

Can you test the 'patch -N -i dbu52.dif' (or dif53.dif)
command, if it finished successfully?

s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu52.dif
patching file dbu.prg 
Hunk #1 FAILED at 60. 
Hunk #2 FAILED at 381.

Hunk #3 FAILED at 398.
3 out of 3 hunks FAILED -- saving rejects to file dbu.prg.rej
patching file dbucopy.prg
Hunk #1 FAILED at 104.
Hunk #2 FAILED at 208.
Hunk #3 FAILED at 735.
Hunk #4 FAILED at 750.
Hunk #5 FAILED at 813.
Hunk #6 FAILED at 828.
6 out of 6 hunks FAILED -- saving rejects to file dbucopy.prg.rej
patching file dbuindx.prg
Hunk #1 FAILED at 240.
1 out of 1 hunk FAILED -- saving rejects to file dbuindx.prg.rej
patching file dbustru.prg
Hunk #1 FAILED at 811.
Hunk #2 FAILED at 1215.
Hunk #3 FAILED at 1236.
Hunk #4 FAILED at 1320.
4 out of 4 hunks FAILED -- saving rejects to file dbustru.prg.rej
patching file dbuutil.prg
Hunk #1 FAILED at 2152.
1 out of 1 hunk FAILED -- saving rejects to file dbuutil.prg.rej
patching file dbuview.prg
Hunk #1 FAILED at 1110.
Hunk #2 FAILED at 1141.
Hunk #3 FAILED at 2790.
Hunk #4 FAILED at 2799.
Hunk #5 FAILED at 2841.
Hunk #6 FAILED at 3010.
Hunk #7 FAILED at 3081.
7 out of 7 hunks FAILED -- saving rejects to file dbuview.prg.rej
s...@siki:~/clipp/harbour/examples/dbu/test_src$

huh



Brgds,
Viktor

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


***
*** 104,110 
  
* DBF for normal mode
files = "dbf_list"
-   def_ext = ".DBF"
  
* when is a filename acceptable?
fi_done = "not_empty('filename')"
--- 104,110 
  
* DBF for normal mode
files = "dbf_list"
+   def_ext = ".dbf"
  
* when is a filename acceptable?
fi_done = "not_empty('filename')"
***
*** 208,214 
  
SELECT (M->cur_area)
  
-   IF RAT(M->def_ext, M->filename) = LEN(M->filename) - 3
* target has default extension..does it exists in 
current dir?
add_name = .NOT. FILE(name(M->filename) + M->def_ext)
  
--- 208,214 
  
SELECT (M->cur_area)
  
+   IF RAT(Lower( M->def_ext ), Lower( M->filename )) = 
LEN(M->filename) - 3
* target has default extension..does it exists in 
current dir?
add_name = .NOT. FILE(name(M->filename) + M->def_ext)
  
***
*** 735,741 
cur_el = 1
rel_row = 0
files = "dbf_list"
-   def_ext = ".DBF"
filelist(1) && display new list
  
ELSE
--- 735,741 
cur_el = 1
rel_row = 0
files = "dbf_list"
+   def_ext = ".dbf"
filelist(1)

Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

Good, so the command line is fine.

Next question is what happens if the source
filenames were in uppercase, plus whether the
patch command works after above conversion.

Can you test this process?


s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBUCOPY.PRG  DBU.HLP  DBUNET.PRG  DBUSTRU.PRG  DBUVIEW.PRG
DBUEDIT.PRG  DBUINDX.PRG  DBU.PRG DBUUTIL.PRG
DBUHELP.PRG  DBU.LNK  DBU.RMK DBUVIEW.BAK
s...@siki:~/clipp/harbour/source/debug/test_src$ hbformat 
-lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg

Reformatting ./DBUHELP.PRG
<>
Reformatting ./DBUINDX.PRG
<.>
Reformatting ./DBUSTRU.PRG
<.>
Reformatting ./DBUVIEW.PRG
<.>
Reformatting ./DBUUTIL.PRG
<.>
Reformatting ./DBUCOPY.PRG
<.>
Reformatting ./DBU.PRG
<.>
Reformatting ./DBUEDIT.PRG
<.>
Reformatting ./DBUNET.PRG
<>
s...@siki:~/clipp/harbour/source/debug/test_src$ ls
DBU.bak  dbuedit.prg  DBUINDX.bak  dbunet.prg   dbustru.prg  
DBUVIEW.BAK
DBUCOPY.bak  DBUHELP.bak  dbuindx.prg  dbu.prg  DBUUTIL.bak  
dbuview.prg

dbucopy.prg  dbuhelp.prg  DBU.LNK  DBU.RMK  dbuutil.prg
DBUEDIT.bak  DBU.HLP  DBUNET.bak   DBUSTRU.bak  DBUVIEW.bak
s...@siki:~/clipp/harbour/source/debug/test_src$


Thanks. This looks fine to me, hbformat left the
uppercased names as .bak files.

What I don't understand is how hbformat found the *.PRG
extension where we looked for *.prg one. Anyway current
behavior is very good for us, since it accept extension
regardless of the case.

Can you test the 'patch -N -i dbu52.dif' (or dif53.dif)
command, if it finished successfully?


better now, but stel there are errors


s...@siki:~/clipp/harbour/examples/dbu/test_src$ dos2unix *.prg
s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu52.dif
patching file dbu.prg
Hunk #1 FAILED at 60.
Hunk #2 FAILED at 381.
Hunk #3 FAILED at 398.
3 out of 3 hunks FAILED -- saving rejects to file dbu.prg.rej
patching file dbucopy.prg
Hunk #3 succeeded at 741 (offset 6 lines).
Hunk #4 succeeded at 756 (offset 6 lines).
Hunk #5 succeeded at 819 (offset 6 lines).
Hunk #6 succeeded at 834 (offset 6 lines).
patching file dbuindx.prg
patching file dbustru.prg
patching file dbuutil.prg
patching file dbuview.prg
Hunk #3 succeeded at 2789 (offset -1 lines).
Hunk #4 succeeded at 2798 (offset -1 lines).
Hunk #5 succeeded at 2840 (offset -1 lines).
Hunk #6 succeeded at 3009 (offset -1 lines).
Hunk #7 succeeded at 3080 (offset -1 lines).



Brgds,
Viktor

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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):


Thanks. This looks fine to me, hbformat left the
uppercased names as .bak files.

What I don't understand is how hbformat found the *.PRG
extension where we looked for *.prg one. Anyway current
behavior is very good for us, since it accept extension
regardless of the case.

Can you test the 'patch -N -i dbu52.dif' (or dif53.dif)
command, if it finished successfully?

I start from beginning an log all steps,  seem that EOL are not 
converted using hbformat

and strange that not reformated all files when are lowercase



Brgds,
Viktor

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


s...@siki:~/clipp/harbour/examples/dbu$ rm test_src/* 
s...@siki:~/clipp/harbour/examples/dbu$ 
s...@siki:~/clipp/harbour/examples/dbu$ cp ori_src/dbu* test_src/
s...@siki:~/clipp/harbour/examples/dbu$ cd test_src/
s...@siki:~/clipp/harbour/examples/dbu/test_src$ hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg

Reformatting dbuview.prg
<.>
s...@siki:~/clipp/harbour/examples/dbu/test_src$ convmv --upper --notest * 
Your Perl version has fleas #37757 #49830  
mv "./dbucopy.prg"  "./DBUCOPY.PRG"
mv "./dbuedit.prg"  "./DBUEDIT.PRG"
mv "./dbuhelp.prg"  "./DBUHELP.PRG"
mv "./dbuindx.prg"  "./DBUINDX.PRG"
mv "./dbunet.prg"   "./DBUNET.PRG" 
mv "./dbu.prg"  "./DBU.PRG"
mv "./dbustru.prg"  "./DBUSTRU.PRG"
mv "./dbuutil.prg"  "./DBUUTIL.PRG"
mv "./dbuview.bak"  "./DBUVIEW.BAK"
mv "./dbuview.prg"  "./DBUVIEW.PRG"
Ready! 
s...@siki:~/clipp/harbour/examples/dbu/test_src$ hbformat -lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no *.prg

Reformatting ./DBUHELP.PRG
<>
Reformatting ./DBUINDX.PRG
<.>   
Reformatting ./DBUSTRU.PRG
<.>   
Reformatting ./DBUVIEW.PRG
<.>   
Reformatting ./DBUUTIL.PRG
<.>   
Reformatting ./DBUCOPY.PRG
<.>   
Reformatting ./DBU.PRG
<.>   
Reformatting ./DBUEDIT.PRG
<.>   
Reformatting ./DBUNET.PRG 
<>
s...@siki:~/clipp/harbour/examples/dbu/test_src$ ls
DBU.bak  dbuedit.prg  dbuindx.prg  DBUSTRU.bak  DBUVIEW.bak
DBUCOPY.bak  DBUHELP.bak  DBUNET.bak   dbustru.prg  DBUVIEW.BAK
dbucopy.prg  dbuhelp.prg  dbunet.prg   DBUUTIL.bak  dbuview.prg
DBUEDIT.bak  DBUINDX.bak  dbu.prg  dbuutil.prg 
s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu52.difpatch:  Can't open patch file dbu52.dif : No such file or directory
s...@siki:~/clipp/harbour/examples/dbu/test_src$ cp ../dbu52.dif .
s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu52.dif
patching file dbu.prg 
Hunk #1 FAILED at 60. 
Hunk #2 FAILED at 381.
Hunk #3 FAILED at 398.
3 out of 3 hunks FAILED -- saving rejects to file dbu.prg.rej 
patching file dbucopy.prg 
Hunk #1 FAILED at 104.
Hunk #2 FAILED at 208.
Hunk #3 FAILED at 735.
Hunk #4 FAILED at 750.
Hunk #5 FAILED at 813.
Hunk #6 FAILED at 828.
6 out of 6 hunks FAILED -- saving rejects to file dbucopy.prg.rej 
patching file dbuindx.prg 
Hunk #1 FAILED at 240.
1 out of 1 hunk FAILED -- saving rejects to file dbuindx.prg.rej  
patching file dbustru.prg  

Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-11 Thread Davor Siklic

Viktor Szakáts napsal(a):

s...@siki:~/clipp/harbour/examples/dbu/test_src$ dos2unix *
s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu52.dif
patching file dbu.prg
Hunk #1 FAILED at 60.
Hunk #2 FAILED at 381.
Hunk #3 FAILED at 398.
3 out of 3 hunks FAILED -- saving rejects to file dbu.prg.rej
patching file dbucopy.prg
Hunk #3 succeeded at 741 (offset 6 lines).
Hunk #4 succeeded at 756 (offset 6 lines).
Hunk #5 succeeded at 819 (offset 6 lines).
Hunk #6 succeeded at 834 (offset 6 lines).
patching file dbuindx.prg
patching file dbustru.prg
patching file dbuutil.prg
patching file dbuview.prg
Hunk #3 succeeded at 2789 (offset -1 lines).
Hunk #4 succeeded at 2798 (offset -1 lines).
Hunk #5 succeeded at 2840 (offset -1 lines).
Hunk #6 succeeded at 3009 (offset -1 lines).
Hunk #7 succeeded at 3080 (offset -1 lines).


Could be the EOL conversion is also wrong, but this last
series of errors are a clear sign that you're trying to
patch 5.3 sources with the 5.2 .dif file.

I never used 5.3, this is 5.2e sources, but maybe are touched/changed 
I'm not sure




Please try with dbu53.dif, it should finish successfully.

s...@siki:~/clipp/harbour/examples/dbu$ rm test_src/*
s...@siki:~/clipp/harbour/examples/dbu$ cp test
test.dbf  test_src/
s...@siki:~/clipp/harbour/examples/dbu$ cp ori_src/* test_src/
s...@siki:~/clipp/harbour/examples/dbu$ cp dbu5
dbu52.dif  dbu53.dif
s...@siki:~/clipp/harbour/examples/dbu$ cp dbu53.dif test_src/
s...@siki:~/clipp/harbour/examples/dbu$
s...@siki:~/clipp/harbour/examples/dbu$ cd test_src/
s...@siki:~/clipp/harbour/examples/dbu/test_src$ ls
dbucopy.prg  dbuhelp.prg  dbunet.prg  dbustru.prg  dbuview.prg
dbuedit.prg  dbuindx.prg  dbu.prg dbuutil.prg  dbu53.dif
s...@siki:~/clipp/harbour/examples/dbu/test_src$ dos2unix *.prg
s...@siki:~/clipp/harbour/examples/dbu/test_src$ patch -N -i dbu53.dif
patching file dbu.prg
Hunk #1 FAILED at 9.
Hunk #2 succeeded at 61 with fuzz 2 (offset -10 lines).
Hunk #3 FAILED at 353.
Hunk #4 FAILED at 385.
Hunk #5 FAILED at 402.
Hunk #6 FAILED at 701.
5 out of 6 hunks FAILED -- saving rejects to file dbu.prg.rej
patching file dbucopy.prg
Hunk #3 succeeded at 741 (offset -1 lines).
Hunk #4 succeeded at 756 (offset -1 lines).
Hunk #5 succeeded at 819 (offset -1 lines).
Hunk #6 succeeded at 834 (offset -1 lines).
patching file dbustru.prg
patching file dbuutil.prg
patching file dbuview.prg
s...@siki:~/clipp/harbour/examples/dbu/test_src$




I hope Alexander can check the EOL conversion, maybe
hbformat gets confused on LF line termination on input.
Sorry if this isn't the case, but I cannot verify now.


I take a look

regards
Davor


Brgds,
Viktor

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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-12 Thread Davor Siklic

Viktor Szakáts napsal(a):

Hunk #7 succeeded at 3080 (offset -1 lines).


Could be the EOL conversion is also wrong, but this last
series of errors are a clear sign that you're trying to
patch 5.3 sources with the 5.2 .dif file.

I never used 5.3, this is 5.2e sources, but maybe are touched/changed 
I'm not sure


If the header of dbu.prg says 'Copyright (c) 1987 - 1996'
it's 5.3, if it says '1990-1993' it's 5.2.

I'm getting the *exact* same errors you posted when patching
5.3 with dbu52.dif. In fact these error were the reason I've
added dbu53.dif.

Please double check.


double checked

/***
*
*  Dbu.prg
*
*  DBU Main Module
*
*  Copyright (c) 1990-1993, Computer Associates International, Inc.
*  All rights reserved.
*
*/


Brgds,
Viktor

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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-12 Thread Davor Siklic

Viktor Szakáts napsal(a):

I've committed another tweak to 'patch' command options
to work around line ending space stripping done by hbformat,
but for me even without this there was only three failing
HUNKs with 5.2 sources in dbu.prg, tested on Darwin.

After this commit the process is cleanly done without errors
with all .dif files as per readme.txt on Darwin. Linux
*should be* the same, but I didn't try.

Brgds,
Viktor


r...@siki:/opt/clipp/harbour/examples/dbu/test_src# rm *
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# cp ../ori_src/dbu* .
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# cp ../dbu52.dif .
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# dos2unix *.prg
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# patch -lNi dbu52.dif
patching file dbu.prg
Hunk #2 succeeded at 384 (offset 3 lines).
Hunk #3 succeeded at 401 (offset 3 lines).
patching file dbucopy.prg
Hunk #3 succeeded at 741 (offset 6 lines).
Hunk #4 succeeded at 756 (offset 6 lines).
Hunk #5 succeeded at 819 (offset 6 lines).
Hunk #6 succeeded at 834 (offset 6 lines).
patching file dbuindx.prg
patching file dbustru.prg
patching file dbuutil.prg
patching file dbuview.prg
Hunk #3 succeeded at 2789 (offset -1 lines).
Hunk #4 succeeded at 2798 (offset -1 lines).
Hunk #5 succeeded at 2840 (offset -1 lines).
Hunk #6 succeeded at 3009 (offset -1 lines).
Hunk #7 succeeded at 3080 (offset -1 lines).

using hbformat work after alex update, note change in command line ! 
("*.prg") for hbformat

or it not work and change eols if filenames are in lowercase before



r...@siki:/opt/clipp/harbour/examples/dbu/test_src# rm *
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# cp ../ori_src/dbu* 
.r...@siki:/opt/clipp/harbour/examples/dbu/test_src# hbformat 
-lFCaseLow=yes -nEol=0 -lIndent=no -lCase=no -lSpaces=no 
"*.prg"  


Reformatting ./dbuhelp.prg
<>
Reformatting ./dbuindx.prg   
<.>  
Reformatting ./dbustru.prg

<.>
Reformatting ./dbucopy.prg
<.>
Reformatting ./dbuutil.prg
<.>
Reformatting ./dbunet.prg
<>
Reformatting ./dbuview.prg
<.>
Reformatting ./dbuedit.prg
<.>
Reformatting ./dbu.prg
<.>
r...@siki:/opt/clipp/harbour/examples/dbu/test_src# patch -lNi ../dbu52.dif
patching file dbu.prg
Hunk #2 succeeded at 384 (offset 3 lines).
Hunk #3 succeeded at 401 (offset 3 lines).
patching file dbucopy.prg
Hunk #3 succeeded at 741 (offset 6 lines).
Hunk #4 succeeded at 756 (offset 6 lines).
Hunk #5 succeeded at 819 (offset 6 lines).
Hunk #6 succeeded at 834 (offset 6 lines).
patching file dbuindx.prg
patching file dbustru.prg
patching file dbuutil.prg
patching file dbuview.prg
Hunk #3 succeeded at 2789 (offset -1 lines).
Hunk #4 succeeded at 2798 (offset -1 lines).
Hunk #5 succeeded at 2840 (offset -1 lines).
Hunk #6 succeeded at 3009 (offset -1 lines).
Hunk #7 succeeded at 3080 (offset -1 lines).
r...@siki:/opt/clipp/harbour/examples/dbu/test_src#

regards
Davor



On 2009.06.12., at 11:47, Davor Siklic wrote:


Viktor Szakáts napsal(a):

Hunk #7 succeeded at 3080 (offset -1 lines).


Could be the EOL conversion is also wrong, but this last
series of errors are a clear sign that you're trying to
patch 5.3 sources with the 5.2 .dif file.

I never used 5.3, this is 5.2e sources, but maybe are 
touched/changed I'm not sure


If the header of dbu.prg says 'Copyright (c) 1987 - 1996'
it's 5.3, if it says '1990-1993' it's 5.2.

I'm getting the *exact* same errors you posted when patching
5.3 with dbu52.dif. In fact these error were the reason I've
added dbu53.dif.

Please double check.


double checked

/***
*
*  Dbu.prg
*
*  DBU Main Module
*
*  Copyright (c) 1990-1993, Computer Associates International, Inc.
*  All rights reserved.
*
*/


Brgds,
Viktor

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


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


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


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


Re: [Harbour] SF.net SVN: harbour-project:[11305] trunk/harbour

2009-06-12 Thread Davor Siklic

Viktor Szakáts napsal(a):

I've committed another tweak to 'patch' command options
to work around line ending space stripping done by hbformat,
but for me even without this there was only three failing
HUNKs with 5.2 sources in dbu.prg, tested on Darwin.

After this commit the process is cleanly done without errors
with all .dif files as per readme.txt on Darwin. Linux
*should be* the same, but I didn't try.

Brgds,
Viktor

On 2009.06.12., at 11:47, Davor Siklic wrote:

I found another problem, please remove ! from string "@K!S8" at line 
1105 and 1272 dbuview.prg to awoid automatic upercase of typing dbf and 
index names and make diff


dbu freeze when press F7 or F8, there must be some incompatibility with 
original clipper

I not found solution for now

best regards
Davor



best regards
Davor



Viktor Szakáts napsal(a):

Hunk #7 succeeded at 3080 (offset -1 lines).


Could be the EOL conversion is also wrong, but this last
series of errors are a clear sign that you're trying to
patch 5.3 sources with the 5.2 .dif file.

I never used 5.3, this is 5.2e sources, but maybe are 
touched/changed I'm not sure


If the header of dbu.prg says 'Copyright (c) 1987 - 1996'
it's 5.3, if it says '1990-1993' it's 5.2.

I'm getting the *exact* same errors you posted when patching
5.3 with dbu52.dif. In fact these error were the reason I've
added dbu53.dif.

Please double check.


double checked

/***
*
*  Dbu.prg
*
*  DBU Main Module
*
*  Copyright (c) 1990-1993, Computer Associates International, Inc.
*  All rights reserved.
*
*/


Brgds,
Viktor

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


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


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


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


Re: [Harbour] SF.net SVN: harbour-project:[11321] trunk/harbour

2009-06-12 Thread Davor Siklic

vszak...@users.sourceforge.net napsal(a):

Found another place to remove ! line 707 file  dbuutil.prg
and there is old bug in dbu, need to put SET CURSOR ON some where before 
get to make cursor visible


regards
Davor



Revision: 11321
  
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11321&view=rev
Author:   vszakats
Date: 2009-06-12 12:50:40 + (Fri, 12 Jun 2009)

Log Message:
---
2009-06-12 14:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
  * examples/superlib/readme.txt
  * examples/dbu/readme.txt
  * examples/rl/readme.txt
+ Added workaround for hbformat needing quotes around wildcarded
  input filenames on *nix systems.

  * examples/dbu/dbu52.dif
  * examples/dbu/dbu53.dif
! Added fix to not force uppercase in filename input GETs.
  Thanks to Davor Siklic for the hint.

  * examples/rl/rl.dif
! Added fix to not force uppercase in filename input GET.

Modified Paths:
--
trunk/harbour/ChangeLog
trunk/harbour/examples/dbu/dbu52.dif
trunk/harbour/examples/dbu/dbu53.dif
trunk/harbour/examples/dbu/readme.txt
trunk/harbour/examples/rl/readme.txt
trunk/harbour/examples/rl/rl.dif
trunk/harbour/examples/superlib/readme.txt


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


[Harbour] achoice

2009-06-12 Thread Davor Siklic

Hi all

I found that achoice in harbour are incompatible with clipper. Problem 
is when all menu items are nonselectable
working on a dbu I see problem when press F7 .or. press F1 and then left 
and right

achoice are C function, and out of my skils
anyone?

strange that all this years nobody found and report this bug

regards
Davor

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


Re: [Harbour] achoice

2009-06-12 Thread Davor Siklic

Viktor Szakáts napsal(a):

Hi all

I found that achoice in harbour are incompatible with clipper. 
Problem is when all menu items are nonselectable
working on a dbu I see problem when press F7 .or. press F1 and then 
left and right

achoice are C function, and out of my skils
anyone?

strange that all this years nobody found and report this bug


ACHOICE() has new bugs discovered regularly.

It's not easy to write automated testing for
ACHOICE() that's one reason why it has never
been properly tested and regressions are also
easy to happen.

ACHOICE() is .prg function, so you can try
patching it.

yes sorry, I see now. First i found achoice.c and think that is defined 
there. I take a look

thank You

regards


Brgds,
Viktor


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


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


Re: [Harbour] achoice

2009-06-12 Thread Davor Siklic

Massimo Belgrano napsal(a):


can you post a sample so i try


for example make a dbu and press F7



2009/6/12 Davor Siklic mailto:s...@msoft.cz>>

Hi all

I found that achoice in harbour are incompatible with clipper.
Problem is when all menu items are nonselectable
working on a dbu I see problem when press F7 .or. press F1 and
then left and right
achoice are C function, and out of my skils
anyone?

strange that all this years nobody found and report this bug

regards
Davor

___
Harbour mailing list
Harbour@harbour-project.org <mailto:Harbour@harbour-project.org>
http://lists.harbour-project.org/mailman/listinfo/harbour




--
Massimo Belgrano




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


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


Re: [Harbour] SF.net SVN: harbour-project:[11323] trunk/harbour

2009-06-14 Thread Davor Siklic

vszak...@users.sourceforge.net napsal(a):

Great :-)
thank You

regards
Davor


Revision: 11323
  
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11323&view=rev
Author:   vszakats
Date: 2009-06-13 11:56:32 + (Sat, 13 Jun 2009)

Log Message:
---
2009-06-13 13:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
  * source/rtl/achoice.prg
! Partially reverted this commit:
  https://sourceforge.net/apps/trac/harbour-project/changeset/10605
  After this change, activating DBU menus with all items disabled
  (f.e. F7/F8) caused app hang.
  This line:
 nUserFunc := iif( nMode != AC_NOITEM,;
Do( xUserFunc, nMode, nPos, nPos - nAtTop ), NIL )
  Was now changed back to this:
 nUserFunc := Do( xUserFunc, nMode, nPos, nPos - nAtTop )
  ac_test2.prg still seem to function fine after this, but
  I'd kindly like to ask Vladislav Lavrecky to make tests
  again, maybe we need another fix here.

  * source/vm/evalhb.c
* Minor formatting.

  * contrib/hbtip/client.prg
* Minor formatting.
! :ReadToFile() nMode param check.

  * utils/hbmk2/hbmk2.prg
* Cleanup to variable name prefixes.

  * contrib/xhb/Makefile
  + contrib/xhb/xthrow.prg
+ Added THROW() function for xhb compatibility.
  This is written in Harbour, based on hbcompat.ch
  and has Harbour license + exception.

  + contrib/xhb/xcstr.prg
  + contrib/xhb/xdbmodst.prg
  * contrib/xhb/Makefile
+ Ported following old functions from xhb:
  CSTRTOVAL(), STRINGTOLITERAL(), VALTOPRG(), PRGEXPTOVAL()
+ Ported following new functions from xhb:
  VALTOARRAY(), VALTODATE(), VALTOHASH(), VALTOLOGICAL()
  VALTONUMBER(), VALTOARRAY(), VALTOTYPE(),
  DBMODIFYSTRUCTURE(), DBIMPORT(), DBMERGE()
  (borrowed from xhb, work of Ron Pinkas)

Modified Paths:
--
trunk/harbour/ChangeLog
trunk/harbour/contrib/hbtip/client.prg
trunk/harbour/contrib/xhb/Makefile
trunk/harbour/source/rtl/achoice.prg
trunk/harbour/source/vm/evalhb.c
trunk/harbour/utils/hbmk2/hbmk2.prg

Added Paths:
---
trunk/harbour/contrib/xhb/xcstr.prg
trunk/harbour/contrib/xhb/xdbmodst.prg
trunk/harbour/contrib/xhb/xthrow.prg


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


Re: [Harbour] Install paths in Linux

2009-06-16 Thread Davor Siklic

Barry Jackson napsal(a):
If Harbour is built from SVN using make_gnu.sh and make_gnu.sh 
install, the install defaults to /usr/local/bin /usr/local/lib/harbour 
and /usr/local/include/harbour.
If rpms are made using mpkg_rpm.sh then the resulting rpms install 
Harbour in /usr/bin /usr/lib/harbour and usr/include/harbour.

This assumes that no environment variables are set.
I think that make_gnu.sh should use the same default paths as 
mpkg_rpm.sh and mpkg_rpm_from_svn.sh to avoid confusion.

Rgds, Barry

No

that is standard behaviour and installing culture in *nix. In case 
installing thought script right place is /usr/local/*
using package system like rpm or deb, there are possibility to 
install/upgrade/remove and in this case right place is /usr/*

You can to avoid that using environment variables

sorry I can to explain better due my bad English

best regards
Davor

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


[Harbour] syscmd

2009-06-16 Thread Davor Siklic

Hi all

I need to have run command with standard input,  std. output and error 
output which I  use in past. After discover found hb_process* functions 
and find that are little difficult to use.
Attached is syscmd.prg and is good example of using hb_process* 
functions. I get inspired with uhttpd. Be free to use or include this in 
harbour if find useful


best regards
Davor





#include "fileio.ch"

/*

Function SYSCMD()

SYSCMD(, , @, @)  --> 

SYSCMD() runs system command  and sends to this command string  
with a  standart input. Standard output is writen to cStdOut and error output 
is writen to cStdError



 String, is the command to execute 

 String, passed to stdinput 

 String, is the string with the standard output of executed 
command

 Strung, is the string with the error output of executet 
command 

Returns:

Returns -1 on error or returns errorcode from OS

*/


#ifdef TEST

PROC main( )

   LOCAL cOut := "", cErr := "", nRet, cSecOut := ""

   nRet := syscmd( "ls -l", , @cOut )
   ? cOut
   nRet := syscmd( "grep prg ", cOut, @cSecOut, @cErr )
   ? "nRet", nRet
   ? "cOut", cSecOut
   ? "cErr:",  cErr
   ?

   RETURN

#endif



FUNCTION syscmd( cCmd, cStdIn, cStdOut, cStdErr )

   LOCAL nErrorLevel := 0
   LOCAL hProc, hStdIn, hStdOut, hStdErr

   hProc := hb_ProcessOpen( cCmd, @hStdIn, @hStdOut, @hStdErr )
   IF hProc == F_ERROR
  nErrorLevel := F_ERROR
   ELSE
  IF cStdIn != NIL
 FWrite( hStdIn, cStdIn )
 FClose( hStdIn )
  ENDIF
  IF cStdOut != NIL
 cStdOut := ReadStd( hStdOut ) 
  ENDIF
  IF cStdErr != NIL
 cStdErr := ReadStd( hStdErr )
  ENDIF
  nErrorLevel := hb_processvalue( hProc )
  hb_processclose( hProc, .T. )
   ENDIF

   RETURN nErrorLevel

STATIC FUNCTION ReadStd( hHandle )

   LOCAL cBuffer := Space ( 200 )
   LOCAL cOutPut := ""
   LOCAL nLen

   DO WHILE ( nLen := FRead( hHandle, @cBuffer, Len( cBuffer ) ) ) > 0
  cOutPut += SubStr( cBuffer, 1, nLen )
  cBuffer := Space( 200 )
   ENDDO
   FClose ( hHandle )

   RETURN AllTrim( cOutPut )

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


Re: [Harbour] syscmd

2009-06-16 Thread Davor Siklic

Viktor Szakáts napsal(a):

Thanks Davor.

Here's a slightly tweaked version:

Great
Note, that I don't make a much tests, but seem to work as expected, only 
I have no idea what function return in nErrorLevel. In case that all is 
ok, expected behavior is that 0 be returned, but function return -2 in 
example. Maybe some tweaking is needed with returned values


best regards
Davor


---
#include "common.ch <http://common.ch>"
#include "fileio.ch <http://fileio.ch>"

FUNCTION hb_processRun( cCommand, cStdIn, cStdOut, cStdErr )

   LOCAL hProcess
   LOCAL hStdIn, hStdOut, hStdErr
   LOCAL nErrorLevel

   hProcess := hb_processOpen( cCommand, @hStdIn, @hStdOut, @hStdErr )
   IF hProcess == F_ERROR
  nErrorLevel := F_ERROR
   ELSE
  IF ISCHARACTER( cStdIn ) .AND. Len( cStdIn ) > 0
 FWrite( hStdIn, cStdIn )
  ENDIF
  IF PCount() >= 3
 cStdOut := ReadHnd( hStdOut )
  ENDIF
  IF PCount() >= 4
 cStdErr := ReadHnd( hStdErr )
  ENDIF
  nErrorLevel := hb_processValue( hProcess )
  hb_processClose( hProcess, .T. )
  FClose( hStdIn )
  FClose( hStdOut )
  FClose( hStdErr )
   ENDIF

   RETURN nErrorLevel

STATIC FUNCTION ReadHnd( hHandle )

   LOCAL cBuffer := Space( 4096 )
   LOCAL cOutput := ""
   LOCAL nLen

   DO WHILE ( nLen := FRead( hHandle, @cBuffer, Len( cBuffer ) ) ) > 0
  cOutPut += SubStr( cBuffer, 1, nLen )
   ENDDO

   RETURN cOutput
---

Any opinions on including it in core RTL? Przemek?

Brgds,
Viktor

2009/6/16 Davor Siklic mailto:s...@msoft.cz>>

Hi all

I need to have run command with standard input,  std. output and
error output which I  use in past. After discover found
hb_process* functions and find that are little difficult to use.
Attached is syscmd.prg and is good example of using hb_process*
functions. I get inspired with uhttpd. Be free to use or include
this in harbour if find useful

best regards
Davor




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


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


Re: [Harbour] syscmd

2009-06-17 Thread Davor Siklic

Przemyslaw Czerpak napsal(a):

Nice but it will not work as expected in all cases.
If stderr output is longer then PIPE buffer size this code will create
deadlock. If if passed stdin is longer then PIPE buffer size then is
truncated in hidden.
This deadlock in this code can be used to exploit in the following way:

   PROC MAIN( x )
  LOCAL nResult, cCommand, cStdIn, cStdOut, cStdErr

  IF PCount() == 0
 cCommand := hb_progName() + " test"
 nResult := hb_processRun( cCommand, cStdIn, @cStdOut, @cStdErr )
 ? cCommand, "=>", nResult
 ? "stdout size:", len( cStdOut )
 ? "stderr size:", len( cStdErr )
  ELSE
 OutStd( repl( ".stdout.", 1 ) )
 OutErr( repl( ".stderr.", 10 ) ) // huge stderr outout,
  // longer then PIPE buffer size
  ENDIF
   RETURN

It means that in such version this function cannot be used in SVN.
In general we do not have .prg wrappers to implement such functionality
only in .prg level. In *nixes it has to be implement using select()
or similar poll function. In Windows it's necessary to use
WaitForMultipleObjects(). I do not know OS2 API so I cannot answer how
(and if) it can be implemented in this OS. Probably yes. DOS does not
support simultaneous process execution so it does not have any hb_process*()
functions though function like above hb_processRun() can be implemented
using temporary files.
If you think that such function will be usable then I can implement it
in some spare time but it will have to be done in C due to low level
platform differences. As alternative we can create hb_processCanRead()
function for *nixes and MS-Windows as wrapper to select() and
WaitForMultipleObjects() and use this function in above hb_processRun()
code to eliminate deadlock.

  
Functionality like this make simple using various  command line tools  
etc. and I use it daily. 
Would be great if You find a spare time to take a look

than You for explanation

best regards
Davor





best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


[Harbour] strpeek.c

2009-06-24 Thread Davor Siklic

Hi all

Today I see this error (ubuntu 9.04)

svn update
At revision 11520.



make[4]: Entering directory 
`/opt/clipp/harbour/source/rtl/linux/gcc'   
gcc -I. -I../../../../include  -Wall -W -O3-c ../../strpeek.c 
-ostrpeek.o
../../strpeek.c: In function 
âHB_FUN_STRPOKEâ:  
../../strpeek.c:88: error: assignment of read-only location 
â*(hb_itemGetCPtr(pText) + ((unsigned int)ulPos + 
0xu))â
make[4]: *** [strpeek.o] Error 1   



best regards
Davor

  
___

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


Re: [Harbour] strpeek.c

2009-06-25 Thread Davor Siklic

Przemyslaw Czerpak napsal(a):

On Wed, 24 Jun 2009, Davor Siklic wrote:
  

Hi all
Today I see this error (ubuntu 9.04)
svn update
At revision 11520.

make[4]: Entering directory `/opt/clipp/harbour/source/rtl/linux/gcc'   
gcc -I. -I../../../../include  -Wall -W -O3-c ../../strpeek.c 
-ostrpeek.o
../../strpeek.c: In function âHB_FUN_STRPOKEâ:
  ../../strpeek.c:88: error: assignment of read-only location 
â*(hb_itemGetCPtr(pText) + ((unsigned int)ulPos + 
0xu))âmake[4]: *** [strpeek.o] 
Error 1   



And many other similar.
You will have to wait for some time (maybe even days) until the core
code have not been updated. See Viktor message.

  

Ok. Thanks for explanation

Best regards
Davor


BTW Viktor, I'm working on core code modifications so to not duplicate
the work please do not commit anything to core code yet. I'm also changing
some API calls so it's possible that it will be hard to merge our
modifications. I should finish in few hours.

best regards,
Przemek
___
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
  


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


Re: [Harbour] Error compilin demoqt in linux

2009-06-28 Thread Davor Siklic

Viktor Szakáts napsal(a):

No idea, sorry, -debug add -g C switch on linux/gcc, strange
that this can create such effect, so it may also be that it's
something else.

As a next step you'd need gdb to get a C trace call, I hope
someone can help with more info here.

  

Hi Viktor
there are the same (ubuntu 9.04)
I try with gdb, there are output

regards
Davor

s...@siki:~/clipp/harbour/contrib/hbqt/tests$ hbmk2 -debug demoqt.prg
hbmk: Processing local make script: hbmk.hbm
hbmk: Processing configuration: /usr/bin/hbmk.cfg
hbmk: Processing: hbqt.hbc
Harbour 2.0.0beta2 (Rev. 11561)
Copyright (c) 1999-2009, http://www.harbour-project.org/
Compiling 'demoqt.prg'...
Lines 723, Functions/Procedures 18
Generating C source output to 'demoqt.c'... Done.
s...@siki:~/clipp/harbour/contrib/hbqt/tests$ gdb ./demoqt
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /opt/clipp/harbour/contrib/hbqt/tests/demoqt
[Thread debugging using libthread_db enabled]
[New Thread 0xb56f8af0 (LWP 16848)]

Program exited normally.
(gdb)



Brgds,
Viktor

On Mon, Jun 29, 2009 at 12:54 AM, Bruno Luciani wrote:
  

ok

I try to compile using -debug , but aplicattion not start at all

and no errors appears , why ?

Bruno

2009/6/28 Viktor Szakáts 


Bruno,

-lhbdebug isn't needed as its automatically added by hbmk2.

You could use -debug though to add C level debug info as this
error isn't happening on .prg level so -b cannot help much in this case.

Brgds,
Viktor

On Mon, Jun 29, 2009 at 12:30 AM, Bruno Luciani
wrote:
  

This is the log compiling using -b option in hbmk2  and linking hbdebug
lib

Bruno

br...@notebook:~/harbour_svn/harbour/contrib/hbqt/tests$ hbmk2 -b
hbmk.hbm
demoqt.prg -lhbdebug
hbmk: Processing local make script: hbmk.hbm
hbmk: Processing configuration: /usr/bin/hbmk.cfg
Harbour 2.0.0beta2 (Rev. 11558)
Copyright (c) 1999-2009, http://www.harbour-project.org/
Compiling 'demoqt.prg'...
Lines 724, Functions/Procedures 18
Generating C source output to 'demoqt.c'... Done.
br...@notebook:~/harbour_svn/harbour/contrib/hbqt/tests$ ./demoqt

Unrecoverable error 6005: Exception SIGSEGV at address 0x20
Called from QT_QWIDGET_SETWINDOWTITLE(0)
Called from (b)QWIDGET(0) in ../../TQWidget.prg
Called from QMAINWINDOW:SETWINDOWTITLE(0) in ../../TQWidget.prg
Called from MAIN(106) in demoqt.prg
br...@notebook:~/harbour_svn/harbour/contrib/hbqt/tests$

2009/6/28 Pritpal Bedi 


an HBQT error ? may be ?


Yes, EXACTLY.
This is what we need to locate.

Regards
Pritpal Bedi

--
View this message in context:

http://www.nabble.com/Error-compilin-demoqt-in-linux-tp24243747p24246028.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

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

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




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

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




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


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