summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/includes
diff options
context:
space:
mode:
authorimushir2016-01-22 16:01:46 +0530
committerimushir2016-01-22 16:01:46 +0530
commit0296cf3166e7250191f0e08907b65dad9e665e46 (patch)
treeadaf5a67239b9db13a469b3a5921c0efb234257e /2.3-1/src/c/elementaryFunctions/includes
parent2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9 (diff)
downloadScilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.tar.gz
Scilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.tar.bz2
Scilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.zip
added support of uint8,uint16 for bitwise operators
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/includes')
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitand.h39
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitcmp.h38
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitget.h25
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitor.h38
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitset.h25
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/bitxor.h38
6 files changed, 203 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitand.h b/2.3-1/src/c/elementaryFunctions/includes/bitand.h
new file mode 100644
index 00000000..8d98d9be
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitand.h
@@ -0,0 +1,39 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITAND_H__
+#define __BITAND_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitand returns the logical AND operation
+ 12 = 00001100 (In Binary)
+ 25 = 00011001 (In Binary)
+
+Bit Operation of 12 and 25
+ 00001100
+& 00011001
+ ________
+ 00001000 = 8 (In decimal)
+*/
+
+EXTERN_ELEMFUNCT uint8 u8bitands(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitanda(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitands(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitanda(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITAND_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h
new file mode 100644
index 00000000..8176681e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITCMP_H__
+#define __BITCMP_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitcmp returns the complement
+35=00100011 (In Binary)
+
+Bitwise complement Operation of 35
+~ 00100011
+ ________
+ 11011100 = 220 (In decimal)
+*/
+
+EXTERN_ELEMFUNCT uint8 u8bitcmps(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitcmpa(uint8* in1,uint8 in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitcmps(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitcmpa(uint16* in1,uint16 in2,int size,uint16* out);
+
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITCMP_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitget.h b/2.3-1/src/c/elementaryFunctions/includes/bitget.h
new file mode 100644
index 00000000..0eaf57eb
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitget.h
@@ -0,0 +1,25 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITGET_H__
+#define __BITGET_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+
+
+EXTERN_ELEMFUNCT uint8 u8bitgets(uint8 value,int position);
+
+EXTERN_ELEMFUNCT uint16 u16bitgets(uint16 value,int position);
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITGET_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitor.h b/2.3-1/src/c/elementaryFunctions/includes/bitor.h
new file mode 100644
index 00000000..16a6a3d1
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitor.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITOR_H__
+#define __BITOR_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitor returns the logical OR operation
+ 12 = 00001100 (In Binary)
+25 = 00011001 (In Binary)
+
+Bitwise OR Operation of 12 and 25
+ 00001100
+| 00011001
+ ________
+ 00011101 = 29 (In decimal) */
+
+EXTERN_ELEMFUNCT uint8 u8bitors(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitora(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitors(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitora(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITOR_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitset.h b/2.3-1/src/c/elementaryFunctions/includes/bitset.h
new file mode 100644
index 00000000..862a4c80
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitset.h
@@ -0,0 +1,25 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITSET_H__
+#define __BITSET_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+
+
+EXTERN_ELEMFUNCT uint8 u8bitsets(uint8 value,int position,int bit_value);
+
+EXTERN_ELEMFUNCT uint16 u16bitsets(uint16 value,int position,int bit_value);
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITSET_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitxor.h b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h
new file mode 100644
index 00000000..4e276353
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h
@@ -0,0 +1,38 @@
+/* Scilab2C FOSSEE IITB */
+
+#ifndef __BITXOR_H__
+#define __BITXOR_H__
+
+
+
+#include "dynlib_elementaryfunctions.h"
+#include "types.h"
+
+#ifdef __cpluscplus
+extern "C" {
+#endif
+/* bitxor returns the logical OR operation
+ 12 = 00001100 (In Binary)
+25 = 00011001 (In Binary)
+
+Bitwise XOR Operation of 12 and 25
+ 00001100
+^ 00011001
+ ________
+ 00010101 = 21 (In decimal) */
+
+EXTERN_ELEMFUNCT uint8 u8bitxors(uint8 in1,uint8 in2);
+
+EXTERN_ELEMFUNCT void u8bitxora(uint8* in1,uint8* in2,int size,uint8* out);
+
+EXTERN_ELEMFUNCT uint16 u16bitxors(uint16 in1,uint16 in2);
+
+EXTERN_ELEMFUNCT void u16bitxora(uint16* in1,uint16* in2,int size,uint16* out);
+
+
+#ifdef __cplusplus
+
+} /*extern "C" */
+#endif
+
+#endif /* !__BITXOR_H__ */