From 7a30e55c528a795def6cffe984e6b87eb76116ab Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 25 Aug 2008 15:06:44 +0000 Subject: [PATCH] 2008-08-25 17:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbdoc/bld_vc.bat * utils/hbdoc/bld_b32.bat * utils/hbmake/bld_b32.bat * utils/hbmake/bld_vc.bat + Harbour option: /w2 - Harbour option: /gc0 (now default) * common.mak * utils/hbmake/Makefile * utils/hbmake/bld_b32.bat * utils/hbmake/bld_vc.bat * utils/hbmake/hbmake.prg - utils/hbmake/pickarry.prg % Eliminated all STATIC vars in pickarry.prg. * pickarry.prg merged into hbmake.prg. --- harbour/ChangeLog | 17 ++ harbour/common.mak | 1 - harbour/utils/hbdoc/bld_b32.bat | 2 +- harbour/utils/hbdoc/bld_vc.bat | 2 +- harbour/utils/hbmake/Makefile | 1 - harbour/utils/hbmake/bld_b32.bat | 5 +- harbour/utils/hbmake/bld_vc.bat | 2 +- harbour/utils/hbmake/hbmake.prg | 194 +++++++++++++++++++++- harbour/utils/hbmake/pickarry.prg | 261 ------------------------------ 9 files changed, 215 insertions(+), 270 deletions(-) delete mode 100644 harbour/utils/hbmake/pickarry.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8018d4ecc5..0df38fada1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,23 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-08-25 17:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * utils/hbdoc/bld_vc.bat + * utils/hbdoc/bld_b32.bat + * utils/hbmake/bld_b32.bat + * utils/hbmake/bld_vc.bat + + Harbour option: /w2 + - Harbour option: /gc0 (now default) + + * common.mak + * utils/hbmake/Makefile + * utils/hbmake/bld_b32.bat + * utils/hbmake/bld_vc.bat + * utils/hbmake/hbmake.prg + - utils/hbmake/pickarry.prg + % Eliminated all STATIC vars in pickarry.prg. + * pickarry.prg merged into hbmake.prg. + 2008-08-25 16:37 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * common.mak * utils/hbmake/Makefile diff --git a/harbour/common.mak b/harbour/common.mak index 2b3743ce7f..f7a0d38582 100644 --- a/harbour/common.mak +++ b/harbour/common.mak @@ -1099,7 +1099,6 @@ HBDOC_EXE_OBJS = \ HBMAKE_EXE_OBJS = \ $(OBJ_DIR)\hbmake$(OBJEXT) \ $(OBJ_DIR)\hbmutils$(OBJEXT) \ - $(OBJ_DIR)\pickarry$(OBJEXT) \ $(OBJ_DIR)\hbmgauge$(OBJEXT) \ $(OBJ_DIR)\hbmfrdln$(OBJEXT) \ $(OBJ_DIR)\hbmlang$(OBJEXT) \ diff --git a/harbour/utils/hbdoc/bld_b32.bat b/harbour/utils/hbdoc/bld_b32.bat index 2b5cba51d9..69870e4f34 100644 --- a/harbour/utils/hbdoc/bld_b32.bat +++ b/harbour/utils/hbdoc/bld_b32.bat @@ -3,7 +3,7 @@ rem rem $Id$ rem -..\..\bin\harbour /q /n /gc0 /km /i..\..\include hbdoc ft_funcs genasc genchm genhpc genhtm genng genos2 genpdf1 genrtf gentrf html ng os2 rtf teeasc troff +..\..\bin\harbour /w3 /q /n /km /i..\..\include hbdoc ft_funcs genasc genchm genhpc genhtm genng genos2 genpdf1 genrtf gentrf html ng os2 rtf teeasc troff echo -O2 -I..\..\include -L..\..\lib > build.tmp diff --git a/harbour/utils/hbdoc/bld_vc.bat b/harbour/utils/hbdoc/bld_vc.bat index ed7416d5eb..9f72c8d385 100644 --- a/harbour/utils/hbdoc/bld_vc.bat +++ b/harbour/utils/hbdoc/bld_vc.bat @@ -3,7 +3,7 @@ rem rem $Id$ rem -..\..\bin\harbour /q /n /gc0 /km /i..\..\include hbdoc ft_funcs genasc genchm genhpc genhtm genng genos2 genpdf1 genrtf gentrf html ng os2 rtf teeasc troff +..\..\bin\harbour /w3 /q /n /km /i..\..\include hbdoc ft_funcs genasc genchm genhpc genhtm genng genos2 genpdf1 genrtf gentrf html ng os2 rtf teeasc troff cl -D_CRT_SECURE_NO_DEPRECATE -nologo -O2 -TP -W3 -I..\..\include hbdoc.c ft_funcs.c genasc.c genchm.c genhpc.c genhtm.c genng.c genos2.c genpdf1.c genrtf.c gentrf.c html.c ng.c os2.c rtf.c teeasc.c troff.c hbdfrdln.c /link /subsystem:CONSOLE /LIBPATH:..\..\lib hbvm.lib hbrtl.lib gtwin.lib hbnulrdd.lib hbmacro.lib hbcommon.lib user32.lib winspool.lib diff --git a/harbour/utils/hbmake/Makefile b/harbour/utils/hbmake/Makefile index de721fec6f..1695e1e95d 100644 --- a/harbour/utils/hbmake/Makefile +++ b/harbour/utils/hbmake/Makefile @@ -11,7 +11,6 @@ ROOT = ../../ PRG_SOURCES=\ hbmake.prg \ hbmutils.prg \ - pickarry.prg \ C_SOURCES=\ hbmfrdln.c \ diff --git a/harbour/utils/hbmake/bld_b32.bat b/harbour/utils/hbmake/bld_b32.bat index ba50bbf48b..d344d8c09d 100644 --- a/harbour/utils/hbmake/bld_b32.bat +++ b/harbour/utils/hbmake/bld_b32.bat @@ -3,13 +3,12 @@ rem rem $Id$ rem -..\..\bin\harbour /q /n /gc0 /km /i..\..\include hbmake hbmutils pickarry +..\..\bin\harbour /w3 /q /n /km /i..\..\include hbmake hbmutils echo -O2 -I..\..\include -L..\..\lib > build.tmp echo hbmake.c >> build.tmp echo hbmutils.c >> build.tmp -echo pickarry.c >> build.tmp echo hbmfrdln.c >> build.tmp echo hbmgauge.c >> build.tmp @@ -26,4 +25,4 @@ bcc32 @build.tmp del build.tmp del *.obj -del hbmake.c hbmutils.c pickarry.c +del hbmake.c hbmutils.c diff --git a/harbour/utils/hbmake/bld_vc.bat b/harbour/utils/hbmake/bld_vc.bat index f9e20907f6..2303665532 100644 --- a/harbour/utils/hbmake/bld_vc.bat +++ b/harbour/utils/hbmake/bld_vc.bat @@ -3,7 +3,7 @@ rem rem $Id$ rem -..\..\bin\harbour /q /n /gc0 /km /i..\..\include hbmake hbmutils pickarry +..\..\bin\harbour /w3 /q /n /km /i..\..\include hbmake hbmutils pickarry cl -D_CRT_SECURE_NO_DEPRECATE -nologo -O2 -TP -W3 -I..\..\include hbmake.c hbmutils.c pickarry.c hbmfrdln.c hbmgauge.c hbmlang.c /link /subsystem:CONSOLE /LIBPATH:..\..\lib hbvm.lib hbrtl.lib gtwin.lib hbnulrdd.lib hbmacro.lib hbcommon.lib user32.lib winspool.lib diff --git a/harbour/utils/hbmake/hbmake.prg b/harbour/utils/hbmake/hbmake.prg index a0c191b547..7d005bd38d 100644 --- a/harbour/utils/hbmake/hbmake.prg +++ b/harbour/utils/hbmake/hbmake.prg @@ -57,6 +57,7 @@ #include "hbclass.ch" +#include "achoice.ch" #include "fileio.ch" #include "common.ch" #include "inkey.ch" @@ -6053,7 +6054,7 @@ METHOD New() CLASS THbMake METHOD ReadMakefile(cFile) CLASS THbMake - LOCAL cBuffer := {} + LOCAL cBuffer := "" LOCAL cMacro := ::cMacro LOCAL cDep := "#DEPENDS" LOCAL cOpt := "#OPTS" @@ -6425,3 +6426,194 @@ METHOD FindMacro( cMacro, cRead ) CLASS THBMAKE ENDIF RETURN cRead + +*------------------------------------------------------------------- + +FUNCTION PICKARRY( T, L, b, r, IN_ARRAY, OUT_ARRAY, aDefault, lAllowAll, cTitle, lLib ) + + LOCAL cMarkChar := "*" // "û" // character showed when is pressed to select prgs/libs. + + LOCAL nChoice := 1 + LOCAL x + LOCAL NEW_ARRAY := {} + LOCAL NUM_ELEMS := Len( IN_ARRAY ) + LOCAL PAD_LEN := ( r - 1 ) - ( L + 1 ) + LOCAL lIsChecked := .f. + LOCAL aItems := IN_ARRAY + LOCAL aTemp + LOCAL cItem + LOCAL cOldColor := Setcolor() + + LOCAL cOldScreen + + LOCAL someitems + LOCAL lAdd := .F. + + DEFAULT lAllowAll TO .F. + DEFAULT cTitle to "" + DEFAULT lLib to .F. + + SOMEITEMS := 0 + + cOldScreen := SaveScreen() + + Setcolor( "gr+/rb,b+/w,w+/b,w/b+,w/b,w+/b" ) + + @ T - 2, L - 1 CLEAR TO b + 1, r + 1 + @ T - 2, L say cTitle + @ T - 1, L - 1 TO b + 1, r + 1 double + + FOR x := 1 TO NUM_ELEMS + IN_ARRAY[ X ] := Padr( " " + IN_ARRAY[ X ], PAD_LEN ) + OUT_ARRAY[ X ] := " " + OUT_ARRAY[ X ] + NEXT + + IF Len( aDefault ) > 0 + + FOR EACH cItem IN aDefault + + if !lLib + x := AScan( IN_ARRAY, { | a | SubStr( a, 4, At(" ", alltrim(a) ) - 1 ) == cItem } ) + else + x := AScan( IN_ARRAY, { | a | alltrim(cItem) $ a } ) + endif + + IF x != 0 + + IN_ARRAY[ x ] := Stuff( IN_ARRAY[ x ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) + OUT_ARRAY[ x ] := Stuff( OUT_ARRAY[ x ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) + SOMEITEMS ++ + + ELSE + + cItem := SubStr( cItem, Rat( "\", cItem ) - 1 ) + + if !lLib + x := AScan( aTemp, { | a | SubStr( a, 4, At( " ", a ) - 1 ) == cItem } ) + else + x := AScan( IN_ARRAY, { | a | alltrim(cItem) $ a } ) + endif + + IF x != 0 + IN_ARRAY[ x ] := Stuff( IN_ARRAY[ x ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) + OUT_ARRAY[ x ] := Stuff( OUT_ARRAY[ x ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) + SOMEITEMS ++ + ENDIF + + ENDIF + NEXT + ENDIF + + + Clear TypeAhead + + + WHILE nChoice != 0 + + @T,L CLEAR TO b, r + + nChoice := AChoice( T, L, b, r, IN_ARRAY,, {|mode| PICKARRY_keys( mode, @someitems, @lAdd ) }, nChoice, 1 ) + + IF nChoice > 0 + + if lAllowAll + + if lAdd // only if F5 was pressed + + For nChoice := 1 to NUM_ELEMS + + lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar + + IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) + OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) + + IF lIsChecked + SOMEITEMS -- + ELSE + SOMEITEMS ++ + ENDIF + lAdd := .F. + Next + + else + + lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar + + IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) + OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) + + IF lIsChecked + SOMEITEMS -- + ELSE + SOMEITEMS ++ + ENDIF + + nChoice ++ + + endif + + else + + lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar + + IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) + OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) + + IF lIsChecked + SOMEITEMS -- + ELSE + SOMEITEMS ++ + ENDIF + + endif + + ENDIF + + ENDDO + + FOR x := 1 TO NUM_ELEMS + IF Left( OUT_ARRAY[ X ], 1 ) == cMarkChar + AAdd( NEW_ARRAY, Substr( OUT_ARRAY[ X ], 2 ) ) + ENDIF + IN_ARRAY[ X ] := Substr( IN_ARRAY[ X ], 4 ) + NEXT + + ASize( OUT_ARRAY, Len( NEW_ARRAY ) ) + ACopy( NEW_ARRAY, OUT_ARRAY ) + + RestScreen(,,,,cOldScreen) + SetColor( coldColor ) + + RETURN Len( NEW_ARRAY ) + +STATIC FUNCTION PICKARRY_Keys( MODE, someitems, lAdd ) + + LOCAL RETVAL := AC_CONT + LOCAL THEKEY := Lastkey() + + IF MODE == AC_HITTOP + KEYBOARD Chr( K_CTRL_PGDN ) + + ELSEIF MODE == AC_HITBOTTOM + KEYBOARD Chr( K_CTRL_PGUP ) + + ELSEIF MODE == AC_EXCEPT + + IF THEKEY == K_SPACE // space bar to select/unselect + RETVAL := AC_SELECT + ELSEIF THEKEY == K_F5 // (select all itens) + lAdd := !lAdd + RETVAL := AC_SELECT + ELSEIF THEKEY == K_ESC + RETVAL := AC_ABORT + ELSEIF THEKEY = K_ENTER .AND. SOMEITEMS < 1 + RETVAL := AC_ABORT + KEYBOARD CHR( K_ENTER ) + ELSEIF THEKEY = K_ENTER + KEYBOARD CHR( K_DOWN ) + RETVAL := AC_ABORT + ENDIF + + ENDIF + + RETURN RETVAL diff --git a/harbour/utils/hbmake/pickarry.prg b/harbour/utils/hbmake/pickarry.prg deleted file mode 100644 index b29e2b1492..0000000000 --- a/harbour/utils/hbmake/pickarry.prg +++ /dev/null @@ -1,261 +0,0 @@ -/* - * $Id$ - */ - -/* - * xHarbour Project source code: - * xHarbour make utility main file - * - * Copyright 2000,2001,2002,2003,2004 Luiz Rafael Culik - * www - http://www.xharbour.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - - -STATIC someitems -STATIC lAdd := .F. -STATIC cMarkChar := "*" // "û" // character showed when is pressed to select prgs/libs. - -#include "achoice.ch" -#include "common.ch" -#include "inkey.ch" - - -FUNCTION PICKARRY( T, L, b, r, IN_ARRAY, OUT_ARRAY, aDefault, lAllowAll, cTitle, lLib ) - - LOCAL nChoice := 1 - LOCAL x - LOCAL NEW_ARRAY := {} - LOCAL NUM_ELEMS := Len( IN_ARRAY ) - LOCAL PAD_LEN := ( r - 1 ) - ( L + 1 ) - LOCAL lIsChecked := .f. - LOCAL aItems := IN_ARRAY - LOCAL aTemp - LOCAL cItem - LOCAL cOldColor := Setcolor() - - LOCAL cOldScreen - - DEFAULT lAllowAll TO .F. - DEFAULT cTitle to "" - DEFAULT lLib to .F. - - SOMEITEMS := 0 - - cOldScreen := SaveScreen() - - Setcolor( "gr+/rb,b+/w,w+/b,w/b+,w/b,w+/b" ) - - @ T - 2, L - 1 CLEAR TO b + 1, r + 1 - @ T - 2, L say cTitle - @ T - 1, L - 1 TO b + 1, r + 1 double - - FOR x := 1 TO NUM_ELEMS - IN_ARRAY[ X ] := Padr( " " + IN_ARRAY[ X ], PAD_LEN ) - OUT_ARRAY[ X ] := " " + OUT_ARRAY[ X ] - NEXT - - //aTemp :=GetFiles(aitems) - - IF Len( aDefault ) > 0 - - FOR EACH cItem IN aDefault - - if !lLib - x := AScan( IN_ARRAY, { | a | SubStr( a, 4, At(" ", alltrim(a) ) - 1 ) == cItem } ) - else - x := AScan( IN_ARRAY, { | a | alltrim(cItem) $ a } ) - endif - - IF x != 0 - - IN_ARRAY[ x ] := Stuff( IN_ARRAY[ x ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) - OUT_ARRAY[ x ] := Stuff( OUT_ARRAY[ x ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) - SOMEITEMS ++ - - ELSE - - cItem := SubStr( cItem, Rat( "\", cItem ) - 1 ) - - if !lLib - x := AScan( aTemp, { | a | SubStr( a, 4, At( " ", a ) - 1 ) == cItem } ) - else - x := AScan( IN_ARRAY, { | a | alltrim(cItem) $ a } ) - endif - - IF x != 0 - IN_ARRAY[ x ] := Stuff( IN_ARRAY[ x ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) - OUT_ARRAY[ x ] := Stuff( OUT_ARRAY[ x ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) - SOMEITEMS ++ - ENDIF - - ENDIF - NEXT - ENDIF - - - Clear TypeAhead - - - WHILE nChoice != 0 - - @T,L CLEAR TO b, r - - nChoice := AChoice( T, L, b, r, IN_ARRAY,, "keys", nChoice, 1 ) - - IF nChoice > 0 - - if lAllowAll - - if lAdd // only if F5 was pressed - - For nChoice := 1 to NUM_ELEMS - - lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar - - IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) - OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) - - IF lIsChecked - SOMEITEMS -- - ELSE - SOMEITEMS ++ - ENDIF - lAdd := .F. - Next - - else - - lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar - - IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) - OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) - - IF lIsChecked - SOMEITEMS -- - ELSE - SOMEITEMS ++ - ENDIF - - nChoice ++ - - endif - - else - - lIsChecked := Substr( IN_ARRAY[ nChoice ], 2, 1 ) == cMarkChar - - IN_ARRAY[ nChoice ] := Stuff( IN_ARRAY[ nChoice ], 2, 1, iif( lIsChecked, " ", cMarkChar ) ) - OUT_ARRAY[ nChoice ] := Stuff( OUT_ARRAY[ nChoice ], 1, 1, iif( lIsChecked, " ", cMarkChar ) ) - - IF lIsChecked - SOMEITEMS -- - ELSE - SOMEITEMS ++ - ENDIF - - endif - - ENDIF - - ENDDO - - FOR x := 1 TO NUM_ELEMS - IF Left( OUT_ARRAY[ X ], 1 ) == cMarkChar - AAdd( NEW_ARRAY, Substr( OUT_ARRAY[ X ], 2 ) ) - ENDIF - IN_ARRAY[ X ] := Substr( IN_ARRAY[ X ], 4 ) - NEXT - - ASize( OUT_ARRAY, Len( NEW_ARRAY ) ) - ACopy( NEW_ARRAY, OUT_ARRAY ) - - RestScreen(,,,,cOldScreen) - SetColor( coldColor ) - - RETURN Len( NEW_ARRAY ) - -FUNCTION Keys( MODE ) - - LOCAL RETVAL := AC_CONT - LOCAL THEKEY := Lastkey() - - IF MODE == AC_HITTOP - KEYBOARD Chr( K_CTRL_PGDN ) - - ELSEIF MODE == AC_HITBOTTOM - KEYBOARD Chr( K_CTRL_PGUP ) - - ELSEIF MODE == AC_EXCEPT - - IF THEKEY == K_SPACE // space bar to select/unselect - RETVAL := AC_SELECT - ELSEIF THEKEY == K_F5 // (select all itens) - lAdd := !lAdd - RETVAL := AC_SELECT - ELSEIF THEKEY == K_ESC - RETVAL := AC_ABORT - ELSEIF THEKEY = K_ENTER .AND. SOMEITEMS < 1 - RETVAL := AC_ABORT - KEYBOARD CHR( K_ENTER ) - ELSEIF THEKEY = K_ENTER - KEYBOARD CHR( K_DOWN ) - RETVAL := AC_ABORT - ENDIF - - ENDIF - - RETURN RETVAL - -STATIC FUNCTION GetFiles( aIn ) - - LOCAL aRet := {} - LOCAL cItem := "" - - FOR EACH cItem IN aIn - - cItem := Substr( cItem, 1, At( " ", cItem ) - 1 ) - - AAdd( aRet, Substr( cItem, 1, At( " ", cItem ) ) ) - NEXT - - RETURN aRet