2013-04-18 14:58 UTC+0200 Przemysław Czerpak (druzus/at/poczta.onet.pl)

* .gitignore
    ! removed executable file permission

  * package/mpkg_src.sh
    ! added executable file permission

  * contrib/hbct/screen2.c
    % use STR API for parameters instead of using local conversions

  * contrib/hbct/token1.c
    % small simplification

  * contrib/hbnetio/netiosrv.c
    + respect timeout parameter also in send operation

  * contrib/make.hb
    ! moved project name normalization and directory verification to
      AddProject() function. It fixes HB_BUILD_ADDONS envvar functionality.

  * doc/xhb-diff.txt
    + added new paragraph: DECLARATION AND INITIALIZATION OF VARIABLES

  * src/rtl/hbcom.c
    * added 3-rd parameter to TIOCEXCL and TIOCNXCL ioctl() codes
      to pacify valgrind warnings

  * include/hbexpra.c
    ! fixed compilation with HB_USE_ENUM_FUNCTIONS macro

  * include/hbapicls.h
  * include/hbcompdf.h
  * include/hbexpra.c
  * src/compiler/harbour.y
  * src/vm/classes.c
    + added support for :__enumIsFirst() iterator message. It's opposite
      to recently added :__enumIsLast()
    + added support for overloading :__enumIsFirst() and :__enumIsLast()
      functionality in custom FOR EACH implementations

  * include/hbcompdf.h
  * include/hbexpra.c
  * src/compiler/harbour.y
    + added support for reverting :__enumIsFirst() and :__enumIsLast()
      messages in descendant FOR EACH loops. It's disabled now by 2 #if 0
      but I think it should be discussed. Should we keep it enable it?
      The answer is not trivial when FOR EACH is used to iterate some
      objects. In general such names are confusing.

  * src/compiler/harbour.yyc
  * src/compiler/harbour.yyh
    * regenerated using bison 2.5

  * tests/foreach.prg
    + added :__enumIsFirst() to test code

  * tests/foreach2.prg
    ! typo in comment
This commit is contained in:
Przemysław Czerpak
2013-04-18 14:58:40 +02:00
parent 6ad5bb4355
commit 877ddb4a06
18 changed files with 890 additions and 664 deletions

View File

@@ -28,6 +28,7 @@ PROCEDURE Main()
"| index:", enum:__enumIndex(), ;
"| value:", enum:__enumValue(), ;
"| base:", ValType( enum:__enumBase() ), ;
"| isfirst:", enum:__enumIsFirst(), ;
"| islast:", enum:__enumIsLast()
NEXT
? "after loop ENUM=", enum
@@ -47,12 +48,14 @@ PROCEDURE Main()
"| index:", enum:__enumIndex(), ;
"| value:", enum:__enumValue(), ;
"| base:", ValType( enum:__enumBase() ), ;
"| isfirst:", enum:__enumIsFirst(), ;
"| islast:", enum:__enumIsLast()
testBYREF( @enum )
? " after passing by @ | ENUM=", enum, ;
"| index:", enum:__enumIndex(), ;
"| value:", enum:__enumValue(), ;
"| base:", ValType( enum:__enumBase() ), ;
"| isfirst:", enum:__enumIsFirst(), ;
"| islast:", enum:__enumIsLast()
ENDIF
NEXT
@@ -70,6 +73,7 @@ PROCEDURE Main()
"| index:", enum:__enumIndex(), ;
"| value:", enum:__enumValue(), ;
"| base:", ValType( enum:__enumBase() ), ;
"| isfirst:", enum:__enumIsFirst(), ;
"| islast:", enum:__enumIsLast()
TESTbreak( enum )
NEXT
@@ -95,6 +99,7 @@ PROCEDURE Main()
"| index:", enum:__enumIndex(), ;
"| value:", enum:__enumValue(), ;
"| base:", ValType( enum:__enumBase() ), ;
"| isfirst:", enum:__enumIsFirst(), ;
"| islast:", enum:__enumIsLast()
NEXT
RECOVER USING i

View File

@@ -97,7 +97,7 @@ METHOD __enumSkip( enum, lDescend ) CLASS myclass2
/* set enumerator value */
(@enum):__enumValue( ::value / 10.0 )
/* the index is updated automatically but if we want some noncontinuous
* indexes then here we van set it using (@enum):__enumIndex( nNeIndex )
* indexes then here we can set it using (@enum):__enumIndex( nNeIndex )
* message
*/
return .T. /* continue iteration */