]> mj.ucw.cz Git - libucw.git/blobdiff - images/math.h
UCW::CGI: Let url_param_escape() encode non-ASCII characters
[libucw.git] / images / math.h
index a4d561670274f7a282eebd350b1acce85d604ba1..ecbecbf5ffb74705b288bfa7b133ae7ae384914f 100644 (file)
@@ -1,23 +1,25 @@
 #ifndef _IMAGES_MATH_H
 #define _IMAGES_MATH_H
 
 #ifndef _IMAGES_MATH_H
 #define _IMAGES_MATH_H
 
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define fast_div_tab ucw_fast_div_tab
+#define fast_sqrt_tab ucw_fast_sqrt_tab
+#endif
+
 extern const u32 fast_div_tab[];
 extern const byte fast_sqrt_tab[];
 
 extern const u32 fast_div_tab[];
 extern const byte fast_sqrt_tab[];
 
-static inline uns
-isqr(int x)
+static inline uns isqr(int x)
 {
   return x * x;
 }
 
 {
   return x * x;
 }
 
-static inline uns
-fast_div_u32_u8(uns x, uns y)
+static inline uns fast_div_u32_u8(uns x, uns y)
 {
   return ((u64)(x) * fast_div_tab[y]) >> 32;
 }
 
 {
   return ((u64)(x) * fast_div_tab[y]) >> 32;
 }
 
-static inline uns
-fast_sqrt_u16(uns x)
+static inline uns fast_sqrt_u16(uns x)
 {
   uns y;
   if (x < (1 << 10) - 3)
 {
   uns y;
   if (x < (1 << 10) - 3)
@@ -29,8 +31,7 @@ fast_sqrt_u16(uns x)
   return (x < y * y) ? y - 1 : y;
 }
 
   return (x < y * y) ? y - 1 : y;
 }
 
-static inline uns
-fast_sqrt_u32(uns x)
+static inline uns fast_sqrt_u32(uns x)
 {
   uns y;
   if (x < (1 << 16))
 {
   uns y;
   if (x < (1 << 16))