From bb78314109e746e588a25d0a30a64adb040dcd84 Mon Sep 17 00:00:00 2001 From: Walter Negro Date: Mon, 15 Apr 2002 04:41:39 +0000 Subject: [PATCH] * contrib/libnf/kspeed.c * Fix values in switch-case. * Add some values for default to eliminate warnings when compiling with gcc -O2. --- harbour/contrib/libnf/kspeed.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/harbour/contrib/libnf/kspeed.c b/harbour/contrib/libnf/kspeed.c index fd0d1a58a5..5431cf4712 100644 --- a/harbour/contrib/libnf/kspeed.c +++ b/harbour/contrib/libnf/kspeed.c @@ -154,18 +154,21 @@ HB_FUNC( FT_SETRATE) { union REGS registers; - int tempo,nrepete; - switch(PCOUNT) { - case 0: tempo = 0 ; + int tempo = 0,nrepete = 0; + switch( hb_pcount() ) { + case 0: + tempo = 0 ; nrepete = 0; break; - case 1: tempo = hb_parni(1) ; + case 1: + tempo = hb_parni(1) ; nrepete = 0; break; - case 0: tempo = hb_parni(1); + case 2: + tempo = hb_parni(1); nrepete = hb_parni(2); break; - } + } registers.h.ah = 0x03; registers.h.al = 0x05; registers.h.bh = tempo; @@ -174,3 +177,6 @@ HB_FUNC( FT_SETRATE) } #endif } + + +