changeset 216:c7e32ff65636

BUGFIX typo when last stop is just below 3m.
author JeanDo
date Thu, 24 Feb 2011 23:22:14 +0100
parents df63e01ac992
children ce6f16711567
files code_part1/OSTC_code_c_part2/p2_deco.c code_part1/OSTC_code_c_part2/shared_definitions.h
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_c_part2/p2_deco.c	Wed Feb 23 19:11:29 2011 +0100
+++ b/code_part1/OSTC_code_c_part2/p2_deco.c	Thu Feb 24 23:22:14 2011 +0100
@@ -635,10 +635,10 @@
 
                 if( first_stop <= char_I_depth_last_deco )  // new in v104
                     next_stop = 0;
+                else if( first_stop == 6 )
+                    next_stop = char_I_depth_last_deco;
                 else
                     next_stop = first_stop - 3;             // Index of next (upper) stop.
-                if( first_stop == 3 )
-                    first_stop = char_I_depth_last_deco;
 
         	    pres_stop =  next_stop * 0.09995            // Meters to bar
         	              + pres_surface;
--- a/code_part1/OSTC_code_c_part2/shared_definitions.h	Wed Feb 23 19:11:29 2011 +0100
+++ b/code_part1/OSTC_code_c_part2/shared_definitions.h	Thu Feb 24 23:22:14 2011 +0100
@@ -47,15 +47,15 @@
     //------------------------------------------------------------------------
     // C-style declarations:
 #   ifdef TEST_MAIN
-#       define VAR_UCHAR(n)      extern unsigned char n
-#       define TAB_UCHAR(n,size) extern unsigned char n[size]
-#       define VAR_UINT(n)       extern unsigned  int n
-#       define TAB_UINT(n,size)  extern unsigned  int n[size]
+#       define VAR_UCHAR(n)      extern unsigned  char n
+#       define TAB_UCHAR(n,size) extern unsigned  char n[size]
+#       define VAR_UINT(n)       extern unsigned short n
+#       define TAB_UINT(n,size)  extern unsigned short n[size]
 #   else
-#       define VAR_UCHAR(n)      unsigned char n
-#       define TAB_UCHAR(n,size) unsigned char n[size]
-#       define VAR_UINT(n)       unsigned  int n
-#       define TAB_UINT(n,size)  unsigned  int n[size]
+#       define VAR_UCHAR(n)      unsigned  char n
+#       define TAB_UCHAR(n,size) unsigned  char n[size]
+#       define VAR_UINT(n)       unsigned short n
+#       define TAB_UINT(n,size)  unsigned short n[size]
 #   endif
 #else
     ;-------------------------------------------------------------------------