home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
FOXPRO
/
VEDIT060
/
SOURCE
/
VEDIT4.PRG
< prev
next >
Wrap
Text File
|
1992-03-23
|
1KB
|
73 lines
#INCLUDE KEYS.HDR
#INCLUDE vlist.hdr
#INCLUDE vmouse.hdr
#INCLUDE vedit.hdr
#INCLUDE STRING.HDR
FUNCTION UINT VEdit_Forward_Space
PARAMETERS CHAR temp_str,;
UINT current_col
VARDEF
BYTE full_byte[ 250 ] based temp_str
UINT place, ret_val
INT eol
LOGICAL going, first
ENDDEF
eol = LEN( temp_str ) - 1
ret_val = 0
IF eol = 0
current_col = current_col + 1
RETURN 0
ENDIF
place = current_col - 1
IF full_byte[ place ] = 32 .OR. full_byte[ place ] = 9
first = .T.
ELSE
first = .F.
ENDIF
DO WHILE going
place = place + 1
IF first
IF ( full_byte[ place ] <> 32 .AND. full_byte[ place ] <> 9 )
* we are at the start of a word, end this sucker
ret_val = 1
going = .F.
current_col = place + 1
LOOP
ELSE
IF place >= eol
ret_val = 0
current_col = place + 1
going = .F.
LOOP
ENDIF
ENDIF
ELSE
* go until the end of a word, then switch to going until the start
* of a word...
IF ( full_byte[ place ] = 32 .OR. full_byte[ place ] = 9 )
first = .T.
LOOP
ELSE
IF place >= eol
current_col = place + 1
ret_val = 0
going = .F.
LOOP
ENDIF
ENDIF
ENDIF
ENDDO
RETURN ret_val
ENDPRO