From 1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 14:57:49 +0530 Subject: Merged Shamik's work --- .../radix_conversions/base2dec/dbase2decs.c | 21 +++ .../radix_conversions/base2dec/gbase2decs.c | 160 +++++++++++++++++++++ .../radix_conversions/bin2dec/dbin2deca.c | 10 ++ .../radix_conversions/bin2dec/dbin2decs.c | 21 +++ .../radix_conversions/bin2dec/i16bin2deca.c | 10 ++ .../radix_conversions/bin2dec/i16bin2decs.c | 21 +++ .../radix_conversions/bin2dec/i8bin2deca.c | 10 ++ .../radix_conversions/bin2dec/i8bin2decs.c | 21 +++ .../radix_conversions/bin2dec/u16bin2deca.c | 10 ++ .../radix_conversions/bin2dec/u16bin2decs.c | 21 +++ .../radix_conversions/bin2dec/u8bin2deca.c | 10 ++ .../radix_conversions/bin2dec/u8bin2decs.c | 21 +++ .../radix_conversions/dec2base/ddec2basea.c | 10 ++ .../radix_conversions/dec2base/ddec2bases.c | 60 ++++++++ .../radix_conversions/dec2base/sdec2basea.c | 10 ++ .../radix_conversions/dec2base/sdec2bases.c | 34 +++++ .../radix_conversions/dec2bin/ddec2bina.c | 10 ++ .../radix_conversions/dec2bin/ddec2bins.c | 39 +++++ .../radix_conversions/dec2bin/i16dec2bina.c | 10 ++ .../radix_conversions/dec2bin/i16dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/i8dec2bina.c | 10 ++ .../radix_conversions/dec2bin/i8dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/u16dec2bina.c | 10 ++ .../radix_conversions/dec2bin/u16dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/u8dec2bina.c | 10 ++ .../radix_conversions/dec2bin/u8dec2bins.c | 32 +++++ .../radix_conversions/dec2hex/ddec2hexa.c | 10 ++ .../radix_conversions/dec2hex/ddec2hexs.c | 39 +++++ .../radix_conversions/dec2hex/i16dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/i16dec2hexs.c | 38 +++++ .../radix_conversions/dec2hex/i8dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/i8dec2hexs.c | 39 +++++ .../radix_conversions/dec2hex/u16dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/u16dec2hexs.c | 38 +++++ .../radix_conversions/dec2hex/u8dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/u8dec2hexs.c | 38 +++++ .../radix_conversions/dec2oct/ddec2octa.c | 9 ++ .../radix_conversions/dec2oct/ddec2octs.c | 27 ++++ .../radix_conversions/dec2oct/i16dec2octa.c | 10 ++ .../radix_conversions/dec2oct/i16dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/i8dec2octa.c | 9 ++ .../radix_conversions/dec2oct/i8dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/u16dec2octa.c | 9 ++ .../radix_conversions/dec2oct/u16dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/u8dec2octa.c | 9 ++ .../radix_conversions/dec2oct/u8dec2octs.c | 27 ++++ .../radix_conversions/hex2dec/dhex2decs.c | 21 +++ .../radix_conversions/hex2dec/ghex2decs.c | 81 +++++++++++ .../radix_conversions/oct2dec/doct2deca.c | 10 ++ .../radix_conversions/oct2dec/doct2decs.c | 21 +++ .../radix_conversions/oct2dec/i16oct2deca.c | 10 ++ .../radix_conversions/oct2dec/i16oct2decs.c | 21 +++ .../radix_conversions/oct2dec/i8oct2deca.c | 10 ++ .../radix_conversions/oct2dec/i8oct2decs.c | 21 +++ .../radix_conversions/oct2dec/u16oct2deca.c | 10 ++ .../radix_conversions/oct2dec/u16oct2decs.c | 21 +++ .../radix_conversions/oct2dec/u8oct2deca.c | 10 ++ .../radix_conversions/oct2dec/u8oct2decs.c | 21 +++ 58 files changed, 1347 insertions(+) create mode 100644 src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c create mode 100644 src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c (limited to 'src/c/elementaryFunctions/radix_conversions') diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c new file mode 100644 index 00000000..51c42e02 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c @@ -0,0 +1,21 @@ +#include +#include "base2dec.h" +#include +#include + +double dbase2decs(double in,int base) +{ + int n=0,rem=0, base1=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base1); + n = n / 10 ; + base1 = base1 * base; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c new file mode 100644 index 00000000..9acf2666 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c @@ -0,0 +1,160 @@ +#include +#include +#include "base2dec.h" +#include + +double gbase2decs(char* in,int size,int base) +{ + size-=2; + int i=0,val=0,j=0; + double o=0.0; + for(i=0; in[i]!='\0'; i++) + { + //printf("%c \n",in[i]); + switch(in[i]) + { + case '0': + val = 0; + break; + case '1': + val = 1; + break; + case '2': + val = 2; + break; + case '3': + val = 3; + break; + case '4': + val = 4; + break; + case '5': + val = 5; + break; + case '6': + val = 6; + break; + case '7': + val = 7; + break; + case '8': + val = 8; + break; + case '9': + val = 9; + break; + case 'a': + case 'A': + val = 10; + break; + case 'b': + case 'B': + val = 11; + break; + case 'c': + case 'C': + val = 12; + break; + case 'd': + case 'D': + val = 13; + break; + case 'e': + case 'E': + val = 14; + break; + case 'f': + case 'F': + val = 15; + break; + case 'g': + case 'G': + val = 16; + break; + case 'h': + case 'H': + val = 17; + break; + case 'i': + case 'I': + val = 18; + break; + case 'j': + case 'J': + val = 19; + break; + case 'k': + case 'K': + val = 20; + break; + case 'l': + case 'L': + val = 21; + break; + case 'm': + case 'M': + val = 22; + break; + case 'n': + case 'N': + val = 23; + break; + case 'o': + case 'O': + val = 24; + break; + case 'p': + case 'P': + val = 25; + break; + case 'q': + case 'Q': + val = 26; + break; + case 'r': + case 'R': + val = 27; + break; + case 's': + case 'S': + val = 28; + break; + case 't': + case 'T': + val = 29; + break; + case 'u': + case 'U': + val = 30; + break; + case 'v': + case 'V': + val = 31; + break; + case 'w': + case 'W': + val = 32; + break; + case 'x': + case 'X': + val = 33; + break; + case 'y': + case 'Y': + val = 34; + break; + case 'z': + case 'Z': + val = 35; + break; + } + o = o + (val * pow(base, size)); + //printf("%f\n",out[0]); + //o=(int)out[0]; + //o=o/16; + //printf("%d %d %d\n",o,val,(val * pow(16, size))); + //j++; + size--; + } + return o; + } diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c new file mode 100644 index 00000000..9baf4bda --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void dbin2deca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +long double dbin2decs(long double in) +{ + int base=1, rem=0; + long double out=0.0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c new file mode 100644 index 00000000..1ebc973c --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void i16bin2deca(int16* in,int size,int16* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +int16 i16bin2decs(int16 in) +{ + int base=1, rem=0; + int16 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c new file mode 100644 index 00000000..ad76143e --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void i8bin2deca(int8* in,int size,int8* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +int8 i8bin2decs(int8 in) +{ + int base=1, rem=0; + int8 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c new file mode 100644 index 00000000..2a4ac15d --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void u16bin2deca(uint16* in,int size,uint16* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +uint16 u16bin2decs(uint16 in) +{ + int base=1, rem=0; + uint16 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c new file mode 100644 index 00000000..f775664c --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void u8bin2deca(uint8* in,int size,uint8* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +uint8 u8bin2decs(uint8 in) +{ + int base=1, rem=0; + uint8 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c new file mode 100644 index 00000000..eeadcb76 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c @@ -0,0 +1,10 @@ +#include "dec2base.h" + +void ddec2basea(double* in,int size,int base,int n,char* out) +{ + int i=0; + for(i=0;i +#include +#include "dec2base.h" +#include + +void ddec2bases(double in,int base,int n,char* out) +{ + int quot; + //printf("%d\n",n); + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + //printf("%d",quot); + while(quot!=0) + { + temp=quot%base; + //printf("%d\n",temp); + if(temp < 10) + { temp = temp + 48; + //printf("%d\n",temp); + } + else + { + temp = temp + 55; + //printf("%d\n",temp); + } + out[i++]=temp; + //printf("%c\n",out[i-1]); + quot = quot/base; + } +//printf("%d\n",i); + if(n>i-1) + { + for(j=i;j<=n;j++) + { out[j]='0'; + //printf(" %c %c \n",out[j],out[i]); + } + } + if(n==0) + { + j=i-1; + n=i; + } + else + j=n-1; + + out[n]='\0'; + //for(k=0;k<=n;k++) + //printf("%c\n",out[k]); + i=0; + while(i +#include +#include "dec2base.h" +#include + +void sdec2bases(float in,int base,int n,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%base; + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + out[i++]=temp; + quot = quot/base; + } + out[i]='\0'; + j=i-1; + i=0; + while(i +#include "dec2bin.h" +#include +void ddec2bins(double in,int n,double* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + for(i=0;ii-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + + i=0; + + while(i +#include "dec2bin.h" +#include +void i16dec2bins(int16 in,int n,int16* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void i8dec2bins(int8 in,int n,int8* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void u16dec2bins(uint16 in,int n,uint16* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void u8dec2bins(uint8 in,int n,uint8* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void ddec2hexs(double in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void i16dec2hexs(int16 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void i8dec2hexs(int8 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void u16dec2hexs(uint16 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void u8dec2hexs(uint8 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void ddec2octs(double in,double* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void i16dec2octs(int16 in,int16* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void i8dec2octs(int8 in,int8* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void u16dec2octs(uint16 in,uint16* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void u8dec2octs(uint8 in,uint8* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include "hex2dec.h" +#include +#include + +double dhex2decs(double in) +{ + int n=0,rem=0, base=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 16; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c new file mode 100644 index 00000000..c5b68dbc --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c @@ -0,0 +1,81 @@ +#include +#include "hex2dec.h" +#include +#include + +double ghex2decs(char* in,int size) +{ + size-=2; + int i=0,val=0,j=0; + double o=0.0; + for(i=0; in[i]!='\0'; i++) + { +/* Finds the decimal equivalent of each hexadecimal digit +*/ + switch(in[i]) + { + case '0': + val = 0; + break; + case '1': + val = 1; + break; + case '2': + val = 2; + break; + case '3': + val = 3; + break; + case '4': + val = 4; + break; + case '5': + val = 5; + break; + case '6': + val = 6; + break; + case '7': + val = 7; + break; + case '8': + val = 8; + break; + case '9': + val = 9; + break; + case 'a': + case 'A': + val = 10; + break; + case 'b': + case 'B': + val = 11; + break; + case 'c': + case 'C': + val = 12; + break; + case 'd': + case 'D': + val = 13; + break; + case 'e': + case 'E': + val = 14; + break; + case 'f': + case 'F': + val = 15; + break; + } + o = o + (val * pow(16, size)); + //printf("%f\n",out[0]); + //o=(int)out[0]; + //o=o/16; + //printf("%d %d %d\n",o,val,(val * pow(16, size))); + //j++; + size--; + } + return o; + } diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c new file mode 100644 index 00000000..6bb5d00f --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void doct2deca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +double doct2decs(double in) +{ + int n=0,rem=0, base=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c new file mode 100644 index 00000000..1ab843f8 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void i16oct2deca(int16* in,int size,int16* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +int16 i16oct2decs(int16 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + int16 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c new file mode 100644 index 00000000..133806ce --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void i8oct2deca(int8* in,int size,int8* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +int8 i8oct2decs(int8 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + int8 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c new file mode 100644 index 00000000..cec3a219 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void u16oct2deca(uint16* in,int size,uint16* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +uint16 u16oct2decs(uint16 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + uint16 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c new file mode 100644 index 00000000..3b356587 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void u8oct2deca(uint8* in,int size,uint8* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +uint8 u8oct2decs(uint8 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + uint8 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + -- cgit From c7e9597db39140c1d982f796a8e1f03bb54e7905 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 24 Apr 2017 14:08:37 +0530 Subject: Fixed float.h issue. OpenCV with built libraries working for linux x64 --- .../radix_conversions/base2dec/dbase2decs.c | 11 +++++++++++ .../radix_conversions/base2dec/gbase2decs.c | 15 +++++++++++++-- .../radix_conversions/bin2dec/dbin2deca.c | 11 +++++++++++ .../radix_conversions/bin2dec/dbin2decs.c | 11 +++++++++++ .../radix_conversions/bin2dec/i16bin2deca.c | 11 +++++++++++ .../radix_conversions/bin2dec/i16bin2decs.c | 11 +++++++++++ .../radix_conversions/bin2dec/i8bin2deca.c | 11 +++++++++++ .../radix_conversions/bin2dec/i8bin2decs.c | 11 +++++++++++ .../radix_conversions/bin2dec/u16bin2deca.c | 11 +++++++++++ .../radix_conversions/bin2dec/u16bin2decs.c | 11 +++++++++++ .../radix_conversions/bin2dec/u8bin2deca.c | 11 +++++++++++ .../radix_conversions/bin2dec/u8bin2decs.c | 11 +++++++++++ .../radix_conversions/dec2base/ddec2basea.c | 11 +++++++++++ .../radix_conversions/dec2base/ddec2bases.c | 11 +++++++++++ .../radix_conversions/dec2base/sdec2basea.c | 11 +++++++++++ .../radix_conversions/dec2base/sdec2bases.c | 11 +++++++++++ .../radix_conversions/dec2bin/ddec2bina.c | 11 +++++++++++ .../radix_conversions/dec2bin/ddec2bins.c | 11 +++++++++++ .../radix_conversions/dec2bin/i16dec2bina.c | 11 +++++++++++ .../radix_conversions/dec2bin/i16dec2bins.c | 11 +++++++++++ .../radix_conversions/dec2bin/i8dec2bina.c | 11 +++++++++++ .../radix_conversions/dec2bin/i8dec2bins.c | 11 +++++++++++ .../radix_conversions/dec2bin/u16dec2bina.c | 11 +++++++++++ .../radix_conversions/dec2bin/u16dec2bins.c | 11 +++++++++++ .../radix_conversions/dec2bin/u8dec2bina.c | 11 +++++++++++ .../radix_conversions/dec2bin/u8dec2bins.c | 11 +++++++++++ .../radix_conversions/dec2hex/ddec2hexa.c | 11 +++++++++++ .../radix_conversions/dec2hex/ddec2hexs.c | 11 +++++++++++ .../radix_conversions/dec2hex/i16dec2hexa.c | 11 +++++++++++ .../radix_conversions/dec2hex/i16dec2hexs.c | 11 +++++++++++ .../radix_conversions/dec2hex/i8dec2hexa.c | 11 +++++++++++ .../radix_conversions/dec2hex/i8dec2hexs.c | 11 +++++++++++ .../radix_conversions/dec2hex/u16dec2hexa.c | 11 +++++++++++ .../radix_conversions/dec2hex/u16dec2hexs.c | 11 +++++++++++ .../radix_conversions/dec2hex/u8dec2hexa.c | 11 +++++++++++ .../radix_conversions/dec2hex/u8dec2hexs.c | 11 +++++++++++ .../radix_conversions/dec2oct/ddec2octa.c | 11 +++++++++++ .../radix_conversions/dec2oct/ddec2octs.c | 11 +++++++++++ .../radix_conversions/dec2oct/i16dec2octa.c | 11 +++++++++++ .../radix_conversions/dec2oct/i16dec2octs.c | 11 +++++++++++ .../radix_conversions/dec2oct/i8dec2octa.c | 11 +++++++++++ .../radix_conversions/dec2oct/i8dec2octs.c | 11 +++++++++++ .../radix_conversions/dec2oct/u16dec2octa.c | 11 +++++++++++ .../radix_conversions/dec2oct/u16dec2octs.c | 11 +++++++++++ .../radix_conversions/dec2oct/u8dec2octa.c | 11 +++++++++++ .../radix_conversions/dec2oct/u8dec2octs.c | 11 +++++++++++ .../radix_conversions/hex2dec/dhex2decs.c | 11 +++++++++++ .../radix_conversions/hex2dec/ghex2decs.c | 11 +++++++++++ .../radix_conversions/oct2dec/doct2deca.c | 11 +++++++++++ .../radix_conversions/oct2dec/doct2decs.c | 11 +++++++++++ .../radix_conversions/oct2dec/i16oct2deca.c | 11 +++++++++++ .../radix_conversions/oct2dec/i16oct2decs.c | 11 +++++++++++ .../radix_conversions/oct2dec/i8oct2deca.c | 11 +++++++++++ .../radix_conversions/oct2dec/i8oct2decs.c | 11 +++++++++++ .../radix_conversions/oct2dec/u16oct2deca.c | 11 +++++++++++ .../radix_conversions/oct2dec/u16oct2decs.c | 11 +++++++++++ .../radix_conversions/oct2dec/u8oct2deca.c | 11 +++++++++++ .../radix_conversions/oct2dec/u8oct2decs.c | 11 +++++++++++ 58 files changed, 640 insertions(+), 2 deletions(-) (limited to 'src/c/elementaryFunctions/radix_conversions') diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c index 51c42e02..a92fc76f 100644 --- a/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "base2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c index 9acf2666..43e3686a 100644 --- a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c @@ -1,5 +1,16 @@ -#include -#include +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ +#include +#include #include "base2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c index 9baf4bda..96fccc5f 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "bin2dec.h" void dbin2deca(double* in,int size,double* out) diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c index 1d3cf3aa..ff363c37 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "bin2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c index 1ebc973c..8511df92 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "bin2dec.h" void i16bin2deca(int16* in,int size,int16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c index 0f395416..9aa3be9b 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "bin2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c index ad76143e..c923ffb0 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "bin2dec.h" void i8bin2deca(int8* in,int size,int8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c index 1863e51a..abd3b894 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "bin2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c index 2a4ac15d..b6b75d71 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "bin2dec.h" void u16bin2deca(uint16* in,int size,uint16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c index 0e58b94f..cb45a201 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "bin2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c index f775664c..10461cad 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "bin2dec.h" void u8bin2deca(uint8* in,int size,uint8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c index 41986007..0a0f5c40 100644 --- a/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "bin2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c index eeadcb76..4de34f00 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2base.h" void ddec2basea(double* in,int size,int base,int n,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c index 9dc7c82e..dae7bdcc 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2base.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c b/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c index 51e12388..dc4d8590 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2base.h" void sdec2basea(float* in,int size,int base,int n,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c b/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c index 9abe2168..a627c052 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2base.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c index e0648758..c69b7823 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2bin.h" void ddec2bina(double* in,int size,int n,double* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c index c97fc428..f5db16c8 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "dec2bin.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c index 1fa251c7..93d1fdda 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2bin.h" void i16dec2bina(int16* in,int size,int n,int16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c index 0b06aef1..5df0fe8d 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "dec2bin.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c index 2297ae9d..90062f9c 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2bin.h" void i8dec2bina(int8* in,int size,int n,int8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c index 4f4024c9..ea689857 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "dec2bin.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c index 153ce863..165485e0 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2bin.h" void u16dec2bina(uint16* in,int size,int n,uint16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c index 1ade60f4..ea998897 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "dec2bin.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c index 87fc9187..4ebdc634 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2bin.h" void u8dec2bina(uint8* in,int size,int n,uint8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c b/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c index 971f6c22..af56d92f 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "dec2bin.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c index c3187d24..f2fda27a 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2hex.h" void ddec2hexa(double* in,int size,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c index 0adafef7..bcbb2667 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2hex.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c index f66df8b3..e00eec42 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2hex.h" void i16dec2hexa(int16* in,int size,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c index f556141d..f4a15ee2 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2hex.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c index a6c9d94d..be659d47 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2hex.h" void i8dec2hexa(int8* in,int size,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c index a5a67722..290335f9 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2hex.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c index 52e1ae80..abfe5aa1 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2hex.h" void u16dec2hexa(uint16* in,int size,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c index 1e942e63..b7c3c98a 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2hex.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c index 0ac48a07..8fe0526a 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2hex.h" void u8dec2hexa(uint8* in,int size,char* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c b/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c index 154c23f8..acf236e6 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2hex.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c index 03fc2dc3..f6cbcfef 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2oct.h" void ddec2octa(double* in,int size,double* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c index d06da303..702f1862 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2oct.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c index 882b00ba..fec152c8 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2oct.h" void i16dec2octa(int16* in,int size,int16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c index cb08845a..340958fa 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2oct.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c index 221f486b..0c96f01b 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2oct.h" void i8dec2octa(int8* in,int size,int8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c index 30ae5b02..0a35f94f 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2oct.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c index cc0d5434..7a3e60e4 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2oct.h" void u16dec2octa(uint16* in,int size,uint16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c index 4b0bd592..99936b4b 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2oct.h" diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c index c187077c..1a4e0267 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "dec2oct.h" void u8dec2octa(uint8* in,int size,uint8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c index 9348630f..fbfc1048 100644 --- a/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include #include "dec2oct.h" diff --git a/src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c b/src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c index cfe05945..42975737 100644 --- a/src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "hex2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c index c5b68dbc..8722df1e 100644 --- a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "hex2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c index 6bb5d00f..e3619eb3 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "oct2dec.h" void doct2deca(double* in,int size,double* out) diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c index 8f9f0b65..b126c619 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "oct2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c index 1ab843f8..9db3e2e1 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "oct2dec.h" void i16oct2deca(int16* in,int size,int16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c index ea092852..928c3a2a 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "oct2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c index 133806ce..de57a0ea 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "oct2dec.h" void i8oct2deca(int8* in,int size,int8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c index 1886739a..b95a0426 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "oct2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c index cec3a219..7778ee96 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "oct2dec.h" void u16oct2deca(uint16* in,int size,uint16* out) diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c index 43dd0ac0..4b30443e 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "oct2dec.h" #include diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c index 3b356587..d1880203 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include "oct2dec.h" void u8oct2deca(uint8* in,int size,uint8* out) diff --git a/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c index c854bc25..f804f7fd 100644 --- a/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c @@ -1,3 +1,14 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Organization: FOSSEE, IIT Bombay + Author: Shamik Guha + Email: toolbox@scilab.in +*/ #include #include "oct2dec.h" #include -- cgit From e36eac94dd517bb69d3e5782516ee58942451991 Mon Sep 17 00:00:00 2001 From: Siddhesh Wani Date: Thu, 4 May 2017 16:15:18 +0530 Subject: Basic functions and image processing working with MSVC on windows x64 --- src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c | 7 +------ src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/c/elementaryFunctions/radix_conversions') diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c index 43e3686a..811a4116 100644 --- a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c @@ -159,12 +159,7 @@ double gbase2decs(char* in,int size,int base) val = 35; break; } - o = o + (val * pow(base, size)); - //printf("%f\n",out[0]); - //o=(int)out[0]; - //o=o/16; - //printf("%d %d %d\n",o,val,(val * pow(16, size))); - //j++; + o = o + (val * (int)pow((double)base, size)); size--; } return o; diff --git a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c index 8722df1e..eb42a7a7 100644 --- a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c +++ b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c @@ -80,12 +80,7 @@ double ghex2decs(char* in,int size) val = 15; break; } - o = o + (val * pow(16, size)); - //printf("%f\n",out[0]); - //o=(int)out[0]; - //o=o/16; - //printf("%d %d %d\n",o,val,(val * pow(16, size))); - //j++; + o = o + (val * (int)pow((double)16, size)); size--; } return o; -- cgit