summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c46
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sinc/int_sinc.h18
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sinc/sinc.h27
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c35
-rw-r--r--src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c60
-rw-r--r--src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c68
-rw-r--r--src/c/elementaryFunctions/includes/gcd.h41
-rw-r--r--src/c/elementaryFunctions/includes/int32.h62
-rw-r--r--src/c/elementaryFunctions/includes/lcm.h27
-rw-r--r--src/c/elementaryFunctions/includes/sinc.h29
-rw-r--r--src/c/elementaryFunctions/includes/uint32.h62
-rw-r--r--src/c/elementaryFunctions/int32/dint32a.c18
-rw-r--r--src/c/elementaryFunctions/int32/dint32s.c18
-rw-r--r--src/c/elementaryFunctions/int32/i16int32a.c17
-rw-r--r--src/c/elementaryFunctions/int32/i16int32s.c17
-rw-r--r--src/c/elementaryFunctions/int32/i8int32a.c17
-rw-r--r--src/c/elementaryFunctions/int32/i8int32s.c17
-rw-r--r--src/c/elementaryFunctions/int32/sint32a.c18
-rw-r--r--src/c/elementaryFunctions/int32/sint32s.c17
-rw-r--r--src/c/elementaryFunctions/int32/u16int32a.c18
-rw-r--r--src/c/elementaryFunctions/int32/u16int32s.c17
-rw-r--r--src/c/elementaryFunctions/int32/u32int32a.c18
-rw-r--r--src/c/elementaryFunctions/int32/u32int32s.c17
-rw-r--r--src/c/elementaryFunctions/int32/u8int32a.c18
-rw-r--r--src/c/elementaryFunctions/int32/u8int32s.c17
-rw-r--r--src/c/elementaryFunctions/interfaces/int_gcd.h22
-rw-r--r--src/c/elementaryFunctions/interfaces/int_int32.h46
-rw-r--r--src/c/elementaryFunctions/interfaces/int_lcm.h27
-rw-r--r--src/c/elementaryFunctions/interfaces/int_sinc.h19
-rw-r--r--src/c/elementaryFunctions/interfaces/int_uint32.h44
-rw-r--r--src/c/elementaryFunctions/uint32/duint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/duint32s.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i16uint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i16uint32s.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i32uint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i32uint32s.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i8uint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/i8uint32s.c17
-rw-r--r--src/c/elementaryFunctions/uint32/suint32a.c19
-rw-r--r--src/c/elementaryFunctions/uint32/suint32s.c18
-rw-r--r--src/c/elementaryFunctions/uint32/u16uint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/u16uint32s.c18
-rw-r--r--src/c/elementaryFunctions/uint32/u8uint32a.c18
-rw-r--r--src/c/elementaryFunctions/uint32/u8uint32s.c18
-rw-r--r--src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c21
-rw-r--r--src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c21
-rw-r--r--src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c19
-rw-r--r--src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c22
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c19
-rw-r--r--src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c19
-rw-r--r--src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c19
-rw-r--r--src/c/hardware/rasberrypi/Misc/RPI_boardRev.c19
-rw-r--r--src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c17
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup316
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c (renamed from src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c (renamed from src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c (renamed from src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c (renamed from src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c)3
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c (renamed from src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c (renamed from src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c (renamed from src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c (renamed from src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c)2
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/gRPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialDataAvails.c (renamed from src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialGetChars.c (renamed from src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c (renamed from src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c (renamed from src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c (renamed from src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c (renamed from src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c (renamed from src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c (renamed from src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c (renamed from src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c)0
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c (renamed from src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c)4
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c (renamed from src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c)4
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c (renamed from src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c)6
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c (renamed from src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c)6
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c13
-rw-r--r--src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c13
-rw-r--r--src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c19
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c19
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c17
-rw-r--r--src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c17
-rw-r--r--src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c28
-rw-r--r--src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c19
-rw-r--r--src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c17
-rw-r--r--src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c31
-rw-r--r--src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c25
-rw-r--r--src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c20
-rw-r--r--src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c19
-rw-r--r--src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c17
-rw-r--r--src/c/hardware/rasberrypi/Timing/RPI_micros.c21
-rw-r--r--src/c/hardware/rasberrypi/Timing/RPI_millis.c21
-rw-r--r--src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c19
-rw-r--r--src/c/hardware/rasberrypi/Timing/u32RPI_delays.c19
-rw-r--r--src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c19
-rw-r--r--src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c19
-rw-r--r--src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c19
-rw-r--r--src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c17
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h11
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h32
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h37
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h (renamed from src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h)15
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h39
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h36
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h31
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h16
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h30
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h31
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h (renamed from src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h)14
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h36
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h35
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h31
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h37
-rw-r--r--src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h10
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h13
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h32
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h35
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h29
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h40
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h33
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h31
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h19
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h30
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h32
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h30
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h39
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h32
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h31
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h34
-rw-r--r--src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h14
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c18
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c19
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c17
-rw-r--r--src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c17
-rw-r--r--src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c19
-rw-r--r--src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c17
-rw-r--r--src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c17
-rw-r--r--src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c17
-rw-r--r--src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c17
-rw-r--r--src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c19
-rw-r--r--src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c19
-rw-r--r--src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c25
-rw-r--r--src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c23
-rw-r--r--src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c22
-rw-r--r--src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c17
-rw-r--r--src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c19
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c19
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c17
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c17
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c19
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c17
-rw-r--r--src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c17
-rw-r--r--src/c/linearAlgebra/bdiag/dbdiaga.c23
-rw-r--r--src/c/linearAlgebra/hess/dhessa.c81
-rw-r--r--src/c/linearAlgebra/includes/hess.h (renamed from src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h)15
-rw-r--r--src/c/linearAlgebra/includes/spec.h59
-rw-r--r--src/c/linearAlgebra/interfaces/int_hess.h (renamed from src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h)15
-rw-r--r--src/c/linearAlgebra/interfaces/int_spec.h79
-rw-r--r--src/c/linearAlgebra/pbig/pbig.c35
-rw-r--r--src/c/linearAlgebra/schur/zgschura.c164
-rw-r--r--src/c/linearAlgebra/spec/Makefile.am70
-rw-r--r--src/c/linearAlgebra/spec/Makefile.in755
-rw-r--r--src/c/linearAlgebra/spec/cspeca.c34
-rw-r--r--src/c/linearAlgebra/spec/dspec1a.c176
-rw-r--r--src/c/linearAlgebra/spec/dspeca.c71
-rw-r--r--src/c/linearAlgebra/spec/sspeca.c34
-rw-r--r--src/c/linearAlgebra/spec/testDoubleSpec.c116
-rw-r--r--src/c/linearAlgebra/spec/testFloatSpec.c110
-rw-r--r--src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj178
-rw-r--r--src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters22
-rw-r--r--src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj178
-rw-r--r--src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj.filters22
-rw-r--r--src/c/linearAlgebra/spec/zspeca.c80
-rw-r--r--src/c/linearAlgebra/spec2/Makefile.am70
-rw-r--r--src/c/linearAlgebra/spec2/Makefile.in757
-rw-r--r--src/c/linearAlgebra/spec2/cspec2a.c36
-rw-r--r--src/c/linearAlgebra/spec2/dspec2a.c113
-rw-r--r--src/c/linearAlgebra/spec2/sspec2a.c36
-rw-r--r--src/c/linearAlgebra/spec2/testDoubleSpec2.c261
-rw-r--r--src/c/linearAlgebra/spec2/testFloatSpec2.c134
-rw-r--r--src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj178
-rw-r--r--src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters22
-rw-r--r--src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj178
-rw-r--r--src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters22
-rw-r--r--src/c/linearAlgebra/spec2/zspec2a.c96
-rw-r--r--src/c/linearAlgebra/svd/zsvda.c173
-rw-r--r--src/c/signalProcessing/%k/dmodka.c97
-rw-r--r--src/c/signalProcessing/%k/int_modk.h18
-rw-r--r--src/c/signalProcessing/%k/modk.h29
-rw-r--r--src/c/signalProcessing/%sn/dmodsna.c24
-rw-r--r--src/c/signalProcessing/%sn/dmodsns.c93
-rw-r--r--src/c/signalProcessing/%sn/int_modsn.h18
-rw-r--r--src/c/signalProcessing/%sn/modsn.h27
-rw-r--r--src/c/signalProcessing/%sn/zmodsna.c165
-rw-r--r--src/c/signalProcessing/%sn/zmodsns.c161
-rw-r--r--src/c/signalProcessing/amell/amell.h27
-rw-r--r--src/c/signalProcessing/amell/damella.c23
-rw-r--r--src/c/signalProcessing/amell/damells.c57
-rw-r--r--src/c/signalProcessing/amell/int_amell.h18
-rw-r--r--src/c/signalProcessing/buttmag/buttmag.h28
-rw-r--r--src/c/signalProcessing/buttmag/dbuttmags.c33
-rw-r--r--src/c/signalProcessing/buttmag/int_buttmag.h18
-rw-r--r--src/c/signalProcessing/buttmag/u8buttmags.c33
-rw-r--r--src/c/signalProcessing/cheb1mag/cheb1mag.h27
-rw-r--r--src/c/signalProcessing/cheb1mag/dcheb1mags.c35
-rw-r--r--src/c/signalProcessing/cheb1mag/int_cheb1mag.h18
-rw-r--r--src/c/signalProcessing/cheb2mag/cheb2mag.h27
-rw-r--r--src/c/signalProcessing/cheb2mag/dcheb2mags.c49
-rw-r--r--src/c/signalProcessing/cheb2mag/int_cheb2mag.h18
-rw-r--r--src/c/signalProcessing/ell1mag/dell1maga.c40
-rw-r--r--src/c/signalProcessing/ell1mag/ell1mag.h28
-rw-r--r--src/c/signalProcessing/ell1mag/int_ell1mag.h18
-rw-r--r--src/c/signalProcessing/ell1mag/zell1maga.c40
-rw-r--r--src/c/signalProcessing/ffilt/ffilt.h27
-rw-r--r--src/c/signalProcessing/ffilt/gffilts.c90
-rw-r--r--src/c/signalProcessing/ffilt/int_ffilt.h18
-rw-r--r--src/c/signalProcessing/filt_sinc/dfilt_sincs.c49
-rw-r--r--src/c/signalProcessing/filt_sinc/filt_sinc.h28
-rw-r--r--src/c/signalProcessing/filt_sinc/int_filt_sinc.h18
-rw-r--r--src/c/signalProcessing/fsfirlin/dfsfirlina.c144
-rw-r--r--src/c/signalProcessing/fsfirlin/fsfirlin.h26
-rw-r--r--src/c/signalProcessing/fsfirlin/int_fsfirlin.h18
-rw-r--r--src/c/signalProcessing/includes/amell.h28
-rw-r--r--src/c/signalProcessing/includes/buttmag.h29
-rw-r--r--src/c/signalProcessing/includes/cheb1mag.h27
-rw-r--r--src/c/signalProcessing/includes/cheb2mag.h27
-rw-r--r--src/c/signalProcessing/includes/ell1mag.h29
-rw-r--r--src/c/signalProcessing/includes/ffilt.h27
-rw-r--r--src/c/signalProcessing/includes/filt_sinc.h28
-rw-r--r--src/c/signalProcessing/includes/fsfirlin.h28
-rw-r--r--src/c/signalProcessing/includes/modsn.h31
-rw-r--r--src/c/signalProcessing/includes/sincd.h29
-rw-r--r--src/c/signalProcessing/includes/zpbutt.h29
-rw-r--r--src/c/signalProcessing/includes/zpch1.h28
-rw-r--r--src/c/signalProcessing/includes/zpch2.h28
-rw-r--r--src/c/signalProcessing/interfaces/int_amell.h19
-rw-r--r--src/c/signalProcessing/interfaces/int_buttmag.h19
-rw-r--r--src/c/signalProcessing/interfaces/int_cheb1mag.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_cheb2mag.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_ell1mag.h19
-rw-r--r--src/c/signalProcessing/interfaces/int_ffilt.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_filt_sinc.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_fsfirlin.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_modsn.h21
-rw-r--r--src/c/signalProcessing/interfaces/int_sincd.h19
-rw-r--r--src/c/signalProcessing/interfaces/int_zpbutt.h19
-rw-r--r--src/c/signalProcessing/interfaces/int_zpch1.h18
-rw-r--r--src/c/signalProcessing/interfaces/int_zpch2.h18
-rw-r--r--src/c/signalProcessing/sincd/dsincds.c99
-rw-r--r--src/c/signalProcessing/sincd/int_sincd.h18
-rw-r--r--src/c/signalProcessing/sincd/sincd.h28
-rw-r--r--src/c/signalProcessing/sincd/u8sincds.c98
-rw-r--r--src/c/signalProcessing/zpbutt/dzpbutts.c33
-rw-r--r--src/c/signalProcessing/zpbutt/int_zpbutt.h19
-rw-r--r--src/c/signalProcessing/zpbutt/zpbutt.h27
-rw-r--r--src/c/signalProcessing/zpch1/dzpch1s.c53
-rw-r--r--src/c/signalProcessing/zpch1/int_zpch1.h18
-rw-r--r--src/c/signalProcessing/zpch1/zpch1.h28
-rw-r--r--src/c/signalProcessing/zpch2/dzpch2s.c63
-rw-r--r--src/c/signalProcessing/zpch2/int_zpch2.h18
-rw-r--r--src/c/signalProcessing/zpch2/zpch2.h28
-rw-r--r--src/c/string/ascii/dasciia.c21
-rw-r--r--src/c/string/ascii/gasciia.c26
-rw-r--r--src/c/string/disp/zdispa.c2
-rw-r--r--src/c/string/includes/ascii.h27
-rw-r--r--src/c/string/includes/strchr.h25
-rw-r--r--src/c/string/includes/strcspn.h26
-rw-r--r--src/c/string/includes/strncpy.h25
-rw-r--r--src/c/string/includes/strspn.h26
-rw-r--r--src/c/string/interfaces/int_ascii.h26
-rw-r--r--src/c/string/interfaces/int_strchr.h25
-rw-r--r--src/c/string/interfaces/int_strcspn.h25
-rw-r--r--src/c/string/interfaces/int_strncpy.h26
-rw-r--r--src/c/string/interfaces/int_strspn.h25
-rw-r--r--src/c/string/strchr/gstrchra.c33
-rw-r--r--src/c/string/strcspn/gstrcspna.c49
-rw-r--r--src/c/string/strncpy/gstrncpya.c25
-rw-r--r--src/c/string/strspn/gstrspna.c44
335 files changed, 11543 insertions, 171 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c b/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c
new file mode 100644
index 00000000..0cd24e96
--- /dev/null
+++ b/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "sinc.h"
+#define PI 3.14159265358979
+void dsinca(double* sample,int size,double* oup)
+{
+ int j;
+ for(j=0;j<size;j++)
+ {
+ if(sample[j]==0)
+ {
+ oup[j]=1;
+ }
+ else
+ {
+ oup[j]=(sin(sample[j]))/(sample[j]);
+ }
+ }
+}
+/*
+int main()
+{
+ int n;
+ printf("Enter the length of the array");
+ scanf("%d",&n);
+ double arr[100000];
+ int i;
+ printf("Now enter the element of the array");
+ for(i=0;i<n;i++)
+ {
+ scanf("%ld",&arr[i]);
+ }
+ sinc(arr[],n);
+}
+*/
diff --git a/src/c/elementaryFunctions/Trigonometry/sinc/int_sinc.h b/src/c/elementaryFunctions/Trigonometry/sinc/int_sinc.h
new file mode 100644
index 00000000..0dc969de
--- /dev/null
+++ b/src/c/elementaryFunctions/Trigonometry/sinc/int_sinc.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_SINC_H__
+#define __INT_SINC_H__
+
+#define d2sincd2(sample,size,oup) dsinca(sample,size,oup)
+
+#endif /* !__INT_SINC_H__! */
diff --git a/src/c/elementaryFunctions/Trigonometry/sinc/sinc.h b/src/c/elementaryFunctions/Trigonometry/sinc/sinc.h
new file mode 100644
index 00000000..6a5c315b
--- /dev/null
+++ b/src/c/elementaryFunctions/Trigonometry/sinc/sinc.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __SINC_H__
+#define __SINC_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dsinca(double* sample,int size,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SINC_H__ */
diff --git a/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c b/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
new file mode 100644
index 00000000..1f6cf9ba
--- /dev/null
+++ b/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "sinc.h"
+#include "sin.h"
+#include "doubleComplex.h"
+#include "division.h"
+void zsinca(doubleComplex* sample,int size,doubleComplex* oup)
+{
+ int j;
+ double r,i;
+ for(j=0;j<size;j++)
+ {
+ r=zreals(sample[j]);
+ i=zimags(sample[j]);
+ if(r==0 && i==0)
+ {
+ oup[j]=DoubleComplex(1,0);
+ }
+ else
+ {
+ oup[j]=zrdivs(zsins(sample[j]),sample[j]);
+ }
+ }
+}
diff --git a/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c b/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c
new file mode 100644
index 00000000..3d586232
--- /dev/null
+++ b/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c
@@ -0,0 +1,60 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+/* This is the "gcd" function , which takes two input. first
+ one is the array and the second one is the length of the array.
+ Now to calculate the gcd of two elements we fin the maximum of
+ the two elements, and then iterate from maximum value down to 1,
+ and check whether the particular value divides the two elements.
+ And in this way we can calculate the gcd of the whole array.
+*/
+#include "gcd.h"
+uint8 u8gcdua(uint8* in,int size)
+{
+
+ int temp;
+ if(size==1)
+ {
+ temp=*in;
+ }
+ else
+ {
+ int x=*in;
+ int y=*(in+1);
+ int max=(x>y)?x:y;
+ for(int i=max;i>=1;i--)
+ {
+ if(x%i==0 && y%i==0)
+ {
+ temp=i;
+ break;
+ }
+ }
+ for(int j=2;j<size;j++)
+ {
+ x=temp;
+ y=*(in+j);
+ max=(x>y)?x:y;
+ for(int i=max;i>=1;i--)
+ {
+ if(x%i==0 && y%i==0)
+ {
+ temp=i;
+ break;
+ }
+ }
+ }
+}
+
+ return temp;
+}
+
diff --git a/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c b/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c
new file mode 100644
index 00000000..56856e43
--- /dev/null
+++ b/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c
@@ -0,0 +1,68 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+/* This is the "lcm" function, accepting two inputs which are the array of integers
+ and second the size of the array. The algorithm works like this:
+ We take a temproary variable and store the lcm of the first two elements of the
+ array in it. Now using this temproary variable we recursively fin the lcm of
+ the whole array.
+ Now to fin the lcm of two elements we fin the maximum of the two elements and
+ check whether it is divisible by both the elements, if the condition is true we
+ get the lcm, else increase the maximum value by itself unless we get the lcm.
+*/
+#include "lcm.h"
+uint8 u8lcma(uint8* in,int size)
+{
+ long long int lcm_temp;
+ if(size==1)
+ {
+ lcm_temp=*in;
+ }
+ else
+ {
+
+ int x1=*in;
+ int x2=*(in+1);
+ long long int max=(x1>x2)?x1:x2;
+ long long int i=max;
+ while(1)
+ {
+ if(i%x1==0 && i%x2==0)
+ {
+ lcm_temp=i;
+ break;
+ }
+ else
+ i+=max;
+ }
+ for(int j=2;j<size;j++)
+ {
+ x1=lcm_temp;
+ x2=*(in+j);
+ max=(x1>x2)?x1:x2;
+ i=max;
+ while(1)
+ {
+ if(i%x1==0 && i%x2==0)
+ {
+ lcm_temp=i;
+ break;
+ }
+ else
+ i+=max;
+ }
+ }
+
+ }
+ return lcm_temp;
+}
+
diff --git a/src/c/elementaryFunctions/includes/gcd.h b/src/c/elementaryFunctions/includes/gcd.h
index eb75c973..179eea0e 100644
--- a/src/c/elementaryFunctions/includes/gcd.h
+++ b/src/c/elementaryFunctions/includes/gcd.h
@@ -1,31 +1,26 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET
- *
- * 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
- * Author: Ukasha Noor
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- */
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
#ifndef __GCD_H__
#define __GCD_H__
-
#include "types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int8 u8gcds(int8 *in,int size);
+ #ifdef __cplusplus
+ extern "C"{
+ #endif
-void dgcda(double *in,int size,double *out);
+uint8 u8gcda(uint8* in,int size);
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
+ #ifdef __cplusplus
+ } /* extern "C" */
+ #endif
-#endif
+#endif /*__GCD_H__*/
diff --git a/src/c/elementaryFunctions/includes/int32.h b/src/c/elementaryFunctions/includes/int32.h
new file mode 100644
index 00000000..26b7bcbf
--- /dev/null
+++ b/src/c/elementaryFunctions/includes/int32.h
@@ -0,0 +1,62 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT32_H__
+#define __INT32_H__
+
+#include "dynlib_elementaryfunctions.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ int32(X) returns the signed int part of the double value
+*/
+
+EXTERN_ELEMFUNCT int32 sint32s(float in);
+
+EXTERN_ELEMFUNCT int32 dint32s(double in);
+
+EXTERN_ELEMFUNCT int32 u8int32s(uint8 in);
+
+EXTERN_ELEMFUNCT int32 i8int32s(int8 in);
+
+EXTERN_ELEMFUNCT int32 u16int32s(uint16 in);
+
+EXTERN_ELEMFUNCT int32 i16int32s(int16 in);
+
+EXTERN_ELEMFUNCT int32 u32int32s(uint32 in);
+
+EXTERN_ELEMFUNCT void sint32a(float* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void dint32a(double* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void u8int32a(uint8* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void i8int32a(int8* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void u16int32a(uint16* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void i16int32a(int16* in, int size, int32* out);
+
+EXTERN_ELEMFUNCT void u32int32a(uint32* in, int size, int32* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* !__INT32_H__ */
+
diff --git a/src/c/elementaryFunctions/includes/lcm.h b/src/c/elementaryFunctions/includes/lcm.h
new file mode 100644
index 00000000..3a3e66fb
--- /dev/null
+++ b/src/c/elementaryFunctions/includes/lcm.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __LCM_H__
+#define __LCM_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u8lcma(uint8* in,int size);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__LCM_H__*/
+
diff --git a/src/c/elementaryFunctions/includes/sinc.h b/src/c/elementaryFunctions/includes/sinc.h
new file mode 100644
index 00000000..8bc98d28
--- /dev/null
+++ b/src/c/elementaryFunctions/includes/sinc.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __SINC_H__
+#define __SINC_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dsinca(double* sample,int size,double* oup);
+void zsinca(doubleComplex* sample,int size,doubleComplex* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SINC_H__ */
diff --git a/src/c/elementaryFunctions/includes/uint32.h b/src/c/elementaryFunctions/includes/uint32.h
new file mode 100644
index 00000000..b90247bc
--- /dev/null
+++ b/src/c/elementaryFunctions/includes/uint32.h
@@ -0,0 +1,62 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __UINT32_H__
+#define __UINT32_H__
+
+#include "dynlib_elementaryfunctions.h"
+#include "floatComplex.h"
+#include "doubleComplex.h"
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ uint32(X) returns the unsigned int part of the double value
+*/
+
+EXTERN_ELEMFUNCT uint32 suint32s(float in);
+
+EXTERN_ELEMFUNCT uint32 duint32s(double in);
+
+EXTERN_ELEMFUNCT uint32 u8uint32s(uint8 in);
+
+EXTERN_ELEMFUNCT uint32 i8uint32s(int8 in);
+
+EXTERN_ELEMFUNCT uint32 u16uint32s(uint16 in);
+
+EXTERN_ELEMFUNCT uint32 i16uint32s(int16 in);
+
+EXTERN_ELEMFUNCT uint32 i32uint32s(int32 in);
+
+EXTERN_ELEMFUNCT void suint32a(float* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void duint32a(double* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void u8uint32a(uint8* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void i8uint32a(int8* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void u16uint32a(uint16* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void i16uint32a(int16* in, int size, uint32* out);
+
+EXTERN_ELEMFUNCT void i32uint32a(int32* in, int size, uint32* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* !__UINT32_H__ */
+
diff --git a/src/c/elementaryFunctions/int32/dint32a.c b/src/c/elementaryFunctions/int32/dint32a.c
new file mode 100644
index 00000000..f8b4b662
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/dint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+void dint32a(double* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = dint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/dint32s.c b/src/c/elementaryFunctions/int32/dint32s.c
new file mode 100644
index 00000000..19366ef0
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/dint32s.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "int32.h"
+
+int32 dint32s(double x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/i16int32a.c b/src/c/elementaryFunctions/int32/i16int32a.c
new file mode 100644
index 00000000..e970deb2
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/i16int32a.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include "int32.h"
+
+void i16int32a(int16* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16int32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/i16int32s.c b/src/c/elementaryFunctions/int32/i16int32s.c
new file mode 100644
index 00000000..ad079930
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/i16int32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 i16int32s(int16 x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/i8int32a.c b/src/c/elementaryFunctions/int32/i8int32a.c
new file mode 100644
index 00000000..d046ba19
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/i8int32a.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include "int32.h"
+
+void i8int32a(int8* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8int32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/i8int32s.c b/src/c/elementaryFunctions/int32/i8int32s.c
new file mode 100644
index 00000000..c126662c
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/i8int32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 i8int32s(int8 x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/sint32a.c b/src/c/elementaryFunctions/int32/sint32a.c
new file mode 100644
index 00000000..14dbefec
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/sint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+void sint32a(float* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = sint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/sint32s.c b/src/c/elementaryFunctions/int32/sint32s.c
new file mode 100644
index 00000000..8a4f8e7e
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/sint32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 sint32s(float x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/u16int32a.c b/src/c/elementaryFunctions/int32/u16int32a.c
new file mode 100644
index 00000000..eaf90fda
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u16int32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+void u16int32a(uint16* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16int32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/u16int32s.c b/src/c/elementaryFunctions/int32/u16int32s.c
new file mode 100644
index 00000000..be3909a2
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u16int32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 u16int32s(uint16 x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/u32int32a.c b/src/c/elementaryFunctions/int32/u32int32a.c
new file mode 100644
index 00000000..a135d12a
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u32int32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+void u32int32a(uint32* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u32int32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/u32int32s.c b/src/c/elementaryFunctions/int32/u32int32s.c
new file mode 100644
index 00000000..ee5a16aa
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u32int32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 u32int32s(uint32 x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/int32/u8int32a.c b/src/c/elementaryFunctions/int32/u8int32a.c
new file mode 100644
index 00000000..1361feab
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u8int32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+void u8int32a(uint8* x, int size, int32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8int32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/int32/u8int32s.c b/src/c/elementaryFunctions/int32/u8int32s.c
new file mode 100644
index 00000000..c3b06903
--- /dev/null
+++ b/src/c/elementaryFunctions/int32/u8int32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "int32.h"
+
+int32 u8int32s(uint8 x) {
+ return (int32) x;
+}
diff --git a/src/c/elementaryFunctions/interfaces/int_gcd.h b/src/c/elementaryFunctions/interfaces/int_gcd.h
index c2135b70..f3e117c5 100644
--- a/src/c/elementaryFunctions/interfaces/int_gcd.h
+++ b/src/c/elementaryFunctions/interfaces/int_gcd.h
@@ -1,25 +1,25 @@
-/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* Copyright (C) 2016 - 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
- Author: Ukasha Noor
+ Author: Ankit Raj
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
-*/
-
-/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */
-
+ */
#ifndef __INT_GCD_H__
#define __INT_GCD_H__
-#include "gcd.h"
-
-#define u82gcdu80(in,size) u8gcds(in,size)
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
-#define d2gcdd2(in,size,out) dgcda(in,size[0]*size[1],out)
+#define u82gcdu80(in,size) u8gcda(in,size[1])
-#endif
+ #ifdef __cplusplus
+ } /* extern "C" */
+ #endif
+#endif /*__INT_GCD_H__*/
diff --git a/src/c/elementaryFunctions/interfaces/int_int32.h b/src/c/elementaryFunctions/interfaces/int_int32.h
new file mode 100644
index 00000000..5da9bd25
--- /dev/null
+++ b/src/c/elementaryFunctions/interfaces/int_int32.h
@@ -0,0 +1,46 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */
+
+#ifndef __INT_INT32_H__
+#define __INT_INT32_H__
+
+#define s0int32i320(in) sint32s(in)
+
+#define d0int32i320(in) dint32s(in)
+
+#define u80int32i320(in) u8int32s(in)
+
+#define i80int32i320(in) i8int32s(in)
+
+#define u160int32i320(in) u16int32s(in)
+
+#define i160int32i320(in) i16int32s(in)
+
+#define u320int32i320(in) u32int32s(in)
+
+#define s2int32i322(in,size,out) sint32a(in, size[0]*size[1], out)
+
+#define d2int32i322(in,size,out) dint32a(in, size[0]*size[1], out)
+
+#define u82int32i322(in,size,out) u8int32a(in, size[0]*size[1], out)
+
+#define i82int32i322(in,size,out) i8int32a(in, size[0]*size[1], out)
+
+#define u162int32i322(in,size,out) u16int32a(in, size[0]*size[1], out)
+
+#define i162int32i322(in,size,out) i16int32a(in, size[0]*size[1], out)
+
+#define u322int32i322(in,size,out) u32int32a(in, size[0]*size[1], out)
+
+#endif /* !__INT_INT32_H__ */
diff --git a/src/c/elementaryFunctions/interfaces/int_lcm.h b/src/c/elementaryFunctions/interfaces/int_lcm.h
new file mode 100644
index 00000000..2ef1a081
--- /dev/null
+++ b/src/c/elementaryFunctions/interfaces/int_lcm.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+
+
+#ifndef __INT_LCM_H__
+#define __INT_LCM_H__
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+#define u82lcmu80(in,size) u8lcma(in,size[1])
+
+ #ifdef __cplusplus
+ } /* extern "C" */
+ #endif
+
+#endif /* !__INT_LCM_H__ */
diff --git a/src/c/elementaryFunctions/interfaces/int_sinc.h b/src/c/elementaryFunctions/interfaces/int_sinc.h
new file mode 100644
index 00000000..35a519db
--- /dev/null
+++ b/src/c/elementaryFunctions/interfaces/int_sinc.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_SINC_H__
+#define __INT_SINC_H__
+
+#define d2sincd2(sample,size,oup) dsinca(sample,size[1],oup)
+#define z2sincz2(sample,size,oup) zsinca(sample,size[1],oup)
+
+#endif /* !__INT_SINC_H__! */
diff --git a/src/c/elementaryFunctions/interfaces/int_uint32.h b/src/c/elementaryFunctions/interfaces/int_uint32.h
new file mode 100644
index 00000000..7c9353b3
--- /dev/null
+++ b/src/c/elementaryFunctions/interfaces/int_uint32.h
@@ -0,0 +1,44 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_UINT32_H__
+#define __INT_UINT32_H__
+
+#define s0uint32u320(in) suint32s(in)
+
+#define d0uint32u320(in) duint32s(in)
+
+#define u80uint32u320(in) u8uint32s(in)
+
+#define i80uint32u320(in) i8uint32s(in)
+
+#define u160uint32u320(in) u16uint32s(in)
+
+#define i160uint32u320(in) i16uint32s(in)
+
+#define i320uint32u320(in) i32uint32s(in)
+
+#define s2uint32u322(in,size,out) suint32a(in, size[0]*size[1], out)
+
+#define d2uint32u322(in,size,out) duint32a(in, size[0]*size[1], out)
+
+#define u82uint32u322(in,size,out) u8uint32a(in, size[0]*size[1], out)
+
+#define i82uint32u322(in,size,out) i8int32a(in, size[0]*size[1], out)
+
+#define u162uint32u322(in,size,out) u16uint32a(in, size[0]*size[1], out)
+
+#define i162uint32u322(in,size,out) i16uint32a(in, size[0]*size[1], out)
+
+#define i322uint32u322(in,size,out) i32uint32a(in, size[0]*size[1], out)
+
+#endif /* !__INT_UINT32_H__ */
diff --git a/src/c/elementaryFunctions/uint32/duint32a.c b/src/c/elementaryFunctions/uint32/duint32a.c
new file mode 100644
index 00000000..7cd0ea3e
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/duint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void duint32a(double* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = duint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/duint32s.c b/src/c/elementaryFunctions/uint32/duint32s.c
new file mode 100644
index 00000000..f507305a
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/duint32s.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 duint32s(double x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/i16uint32a.c b/src/c/elementaryFunctions/uint32/i16uint32a.c
new file mode 100644
index 00000000..84d0fa02
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i16uint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void i16uint32a(int16* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16uint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/i16uint32s.c b/src/c/elementaryFunctions/uint32/i16uint32s.c
new file mode 100644
index 00000000..7d9ccef7
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i16uint32s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 i16uint32s(int16 x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/i32uint32a.c b/src/c/elementaryFunctions/uint32/i32uint32a.c
new file mode 100644
index 00000000..415711ed
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i32uint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void i32uint32a(int32* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i32uint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/i32uint32s.c b/src/c/elementaryFunctions/uint32/i32uint32s.c
new file mode 100644
index 00000000..63442f24
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i32uint32s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 i32uint32s(int32 x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/i8uint32a.c b/src/c/elementaryFunctions/uint32/i8uint32a.c
new file mode 100644
index 00000000..0dca1b5b
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i8uint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void i8uint32a(int8* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8uint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/i8uint32s.c b/src/c/elementaryFunctions/uint32/i8uint32s.c
new file mode 100644
index 00000000..46c0ecb5
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/i8uint32s.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+uint32 i8uint32s(int8 x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/suint32a.c b/src/c/elementaryFunctions/uint32/suint32a.c
new file mode 100644
index 00000000..2478c021
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/suint32a.c
@@ -0,0 +1,19 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+void suint32a(float* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = suint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/suint32s.c b/src/c/elementaryFunctions/uint32/suint32s.c
new file mode 100644
index 00000000..3578b428
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/suint32s.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 suint32s(float x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/u16uint32a.c b/src/c/elementaryFunctions/uint32/u16uint32a.c
new file mode 100644
index 00000000..177bae24
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/u16uint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void u16uint32a(uint16* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16uint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/u16uint32s.c b/src/c/elementaryFunctions/uint32/u16uint32s.c
new file mode 100644
index 00000000..df258b26
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/u16uint32s.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 u16uint32s(uint16 x) {
+ return (uint32) x;
+}
diff --git a/src/c/elementaryFunctions/uint32/u8uint32a.c b/src/c/elementaryFunctions/uint32/u8uint32a.c
new file mode 100644
index 00000000..a89541b1
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/u8uint32a.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint32.h"
+
+void u8uint32a(uint8* x, int size, uint32* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8uint32s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint32/u8uint32s.c b/src/c/elementaryFunctions/uint32/u8uint32s.c
new file mode 100644
index 00000000..ac48fe27
--- /dev/null
+++ b/src/c/elementaryFunctions/uint32/u8uint32s.c
@@ -0,0 +1,18 @@
+/* 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint32.h"
+
+uint32 u8uint32s(uint8 x) {
+ return (uint32) x;
+}
diff --git a/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c b/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c
new file mode 100644
index 00000000..70fb6858
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Digital/RPI_digitalReadByte.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralDigital.h"
+
+/* Function to read the state of the first eight gpio pins */
+
+uint8 RPI_digitalReadByte(){
+ uint8 state=0;
+ state=digitalReadByte();
+ return (state);
+}
diff --git a/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c
new file mode 100644
index 00000000..05594066
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalReads.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralDigital.h"
+
+/* Function to read the state of a gpio pin */
+
+uint8 u8RPI_digitalReads(uint8 pin){
+ uint8 state=0;
+ state=digitalRead(pin);
+ return (state);
+}
diff --git a/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c
new file mode 100644
index 00000000..6d0e4cdd
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWriteBytes.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralDigital.h"
+
+/* Function to change the output state of the first eight gpio pins */
+
+void u8RPI_digitalWriteBytes(uint8 value){
+ digitalWriteByte(value);
+}
diff --git a/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c
new file mode 100644
index 00000000..02dce554
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Digital/u8RPI_digitalWrites.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralDigital.h"
+
+/* Function to change the output state of the gpio pin */
+
+void u8RPI_digitalWrites(uint8 pin, uint8 state){
+ if (state == 0) /*low output*/
+ digitalWrite(pin,0);
+ else if (state == 1) /*high output*/
+ digitalWrite(pin,1);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c
new file mode 100644
index 00000000..5d04f4b0
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg16s.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReadReg16s(uint16 fd,uint16 reg){
+ int8 out;
+ out=wiringPiI2CReadReg16(fd,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c
new file mode 100644
index 00000000..2f4f1f74
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReadReg8s.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReadReg8s(uint16 fd,uint16 reg){
+ int8 out;
+ out=wiringPiI2CReadReg8(fd,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c
new file mode 100644
index 00000000..49c36737
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CReads.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CReads(uint16 fd){
+ int8 out;
+ out=wiringPiI2CRead(fd);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c
new file mode 100644
index 00000000..f533a1f2
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CSetups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CSetups(uint8 arrd){
+ int8 out;
+ out=wiringPiI2CSetup(arrd);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c
new file mode 100644
index 00000000..b30c106f
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg16s.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWriteReg16s(uint16 fd,uint16 data,uint16 reg){
+ int8 out;
+ out=wiringPiI2CWriteReg16(fd,data,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c
new file mode 100644
index 00000000..d2ebf3d9
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWriteReg8s.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWriteReg8s(uint16 fd,uint16 data,uint16 reg){
+ int8 out;
+ out=wiringPiI2CWriteReg8(fd,data,reg);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c
new file mode 100644
index 00000000..133ed659
--- /dev/null
+++ b/src/c/hardware/rasberrypi/I2C/u16RPI_I2CWrites.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralI2C.h"
+
+int8 u16RPI_I2CWrites(uint16 fd,uint16 data){
+ int8 out;
+ wiringPiI2CWrite(fd,data);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c b/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c
new file mode 100644
index 00000000..32a4a1f7
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Interrupt/u8RPI_waitForInterrupts.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralInterrupt.h"
+
+int8 u8RPI_waitForInterrupts(uint8 pin,int16 time){
+ int8 out;
+ out=waitForInterrupt(pin,time);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c b/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c
new file mode 100644
index 00000000..c8ecf705
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Misc/RPI_boardRev.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMisc.h"
+
+uint8 RPI_boardRev(){
+ uint8 out;
+ out=piBoardRev();
+ return out;
+}
diff --git a/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c b/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c
new file mode 100644
index 00000000..ab229907
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Misc/u16RPI_sn3218Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMisc.h"
+
+int8 u16RPI_sn3218Setups(uint16 pinBase){
+ int8 out;
+ out=sn3218Setup(pinBase);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c b/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c
new file mode 100644
index 00000000..ce13e08a
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Misc/u8RPI_padDrives.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMisc.h"
+
+void u8RPI_padDrives(uint8 group,uint8 strength){
+ setPadDrive(group,strength);
+}
diff --git a/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup b/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup
new file mode 100644
index 00000000..c1db6097
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/INIT_FillSCI2LivCDirs.backup
@@ -0,0 +1,316 @@
+
+//------------------------------------
+//---- Class RPI_DigitalSetup --------
+//------------------------------------
+ClassName = 'RPI_DigitalSetup';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_DigitalOut';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMWrite';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DigitalIn -----------
+//------------------------------------
+ClassName = 'RPI_DigitalIn';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalIn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_delay ----------
+//------------------------------------
+ClassName = 'RPI_delay';
+
+//--- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+//--- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_delay';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_delayMicro';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_SerialClose';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_SerialFlush';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetRange';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetClock';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetMode';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_milli ----------
+//------------------------------------
+ClassName = 'RPI_milli';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u32''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_millis';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_micros';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SetupSerial ----------
+//------------------------------------
+ClassName = 'RPI_SetupSerial';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SetupClose ----------
+//------------------------------------
+//ClassName = 'RPI_SetupClose';
+
+// --- Class Annotation. ---
+//PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+//ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+//PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+//PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+//FunctionName = 'RPI_SerialClose';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//FunctionName = 'RPI_SerialFlush';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SerialSendData ----------
+//------------------------------------
+ClassName = 'RPI_SerialSendData';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80s0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+PrintStringInfo('u80u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80s2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialSendData';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SerialDataAvail ----------
+//------------------------------------
+ClassName = 'RPI_SerialDataAvail';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''i16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialDataAvail';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'RPI_SerialGetChar';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class RPI_ThreadCreate ----------
+//------------------------------------
+ClassName = 'RPI_ThreadCreate';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_ThreadCreate';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_PinISR --------------
+//------------------------------------
+ClassName = 'RPI_PinISR';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''i16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_PinISR';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_adress.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogRead.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_analogWrite.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_commande.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_i2cdetect.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/RPI_send.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c
index 6e398a17..6e398a17 100644
--- a/src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/ISR/i16RPIPinISRs.c
diff --git a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c
index 7b84350f..4ab496ea 100644
--- a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalRead.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c
index f828f77e..259bb3b6 100644
--- a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_DigitalWrite.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c
index f5fefe08..8646e8f1 100644
--- a/src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/gpio/RPI_pinMode.c
@@ -5,12 +5,13 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
/* Function to setup digital pins
+ direction = 2 -> PWM_output (BCM pin 18 only)
direction = 1 -> output
direction = 0 -> input
*/
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c
index d06b135c..0ad575b7 100644
--- a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmClock.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c
index 0cca7a70..7679a1ab 100644
--- a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmMode.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c
index b2489f59..07936b38 100644
--- a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmRange.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c
index ae02bf0d..a16a1d86 100644
--- a/src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/pwm/RPI_pwmWrite.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
diff --git a/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c
index f9902550..f9902550 100644
--- a/src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c
index 39112fc2..39112fc2 100644
--- a/src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/dRPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/gRPISerialSendDatas.c
index f4ec8a85..f4ec8a85 100644
--- a/src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/gRPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialDataAvails.c
index b56a8196..b56a8196 100644
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialDataAvails.c
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialGetChars.c
index 18ca2a7a..18ca2a7a 100644
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialGetChars.c
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDataa.c
index 24180f41..24180f41 100644
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDatas.c
index fe6fe6f4..fe6fe6f4 100644
--- a/src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i16RPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c
index c4dd199c..c4dd199c 100644
--- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c
index e637871f..e637871f 100644
--- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/i8RPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c
index 14c0bc70..14c0bc70 100644
--- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c
index ff78dd1f..ff78dd1f 100644
--- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/sRPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDataa.c
index b444047b..b444047b 100644
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDatas.c
index b4a90c29..b4a90c29 100644
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c
index cde4cba2..cde4cba2 100644
--- a/src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u16RPISerialSetups.c
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c
index 5162d15e..5162d15e 100644
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialCloses.c
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c
index c80a92c5..c80a92c5 100644
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialFlushs.c
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c
index e3813514..e3813514 100644
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendChars.c
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c
index 9d097141..9d097141 100644
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDataa.c
diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c
index 9edb439f..9edb439f 100644
--- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/serial/u8RPISerialSendDatas.c
diff --git a/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c
index c05c959c..c05c959c 100644
--- a/src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/threading/u16RPIThreadCreates.c
diff --git a/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c
index 26790861..8374c2b2 100644
--- a/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delay.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -17,7 +17,7 @@
#include "types.h"
#include "RPIPeripheralTiming.h"
-void u16RPIDelayMillis(uint16 time)
+void u16RPI_delay(uint16 time)
{
delay(time);
diff --git a/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c
index 9aeeab7d..df2a7a79 100644
--- a/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_delayMicro.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -15,7 +15,7 @@
#include "types.h"
#include "RPIPeripheralTiming.h"
-void u16RPIDelayMicros(uint16 time)
+void u16RPI_delayMicro(uint16 time)
{
delayMicroseconds(time);
}
diff --git a/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c
index eb086a9f..8d06742d 100644
--- a/src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_micros.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -15,7 +15,7 @@
#include "types.h"
#include "RPIPeripheralTiming.h"
-uint32 u32RPIGetMicros()
+uint32 u32RPI_micros()
{
return(micros());
-} \ No newline at end of file
+}
diff --git a/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c
index c1189753..92b6e1b8 100644
--- a/src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/backup/timing/RPI_millis.c
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -15,7 +15,7 @@
#include "types.h"
#include "RPIPeripheralTiming.h"
-uint32 u32RPIGetMillis()
+uint32 u32RPI_millis()
{
return(millis());
-} \ No newline at end of file
+}
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/NotToDo/raspi_close.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c b/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPIDataRW.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c b/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/SPI/RPI_SPISetup.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64Orientation.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64circle.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64clear.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64ellipse.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64line.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64lineTo.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64point.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64putchar.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64puts.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64rectangle.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setOrigin.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/lcd128x64/RPI_lcd128x64setup.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_locks.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_prioritys.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c
new file mode 100644
index 00000000..3e94b925
--- /dev/null
+++ b/src/c/hardware/rasberrypi/NotYetDone/multiThreading/u8RPI_unlocks.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "types.h" \ No newline at end of file
diff --git a/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c b/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c
new file mode 100644
index 00000000..31543afe
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/gRPI_serialOpena.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+int8 gRPI_serialOpena(char* device,int size,uint32 baud){
+ int8 fd;
+ fd = serialOpen(device,baud);
+ return fd;
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c
new file mode 100644
index 00000000..d20aa541
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialCloses.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialCloses(uint8 fd){
+ serialClose(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c
new file mode 100644
index 00000000..cf256070
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialDataAvails.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+uint8 u8RPI_serialDataAvails(uint8 fd){
+ uint8 out;
+ out=serialDataAvail(fd);
+ return(out);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c
new file mode 100644
index 00000000..4d150637
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialFlushs.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialFlushs(uint8 fd){
+ serialFlush(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c
new file mode 100644
index 00000000..c1dabfd1
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialGetchars.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialGetchars(uint8 fd,char* out){
+ out=serialGetchar(fd);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c
new file mode 100644
index 00000000..d1672003
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPrintfs.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialPrintfs(uint8 fd,char* msg,int size){
+ serialPrintf(fd,msg);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c
new file mode 100644
index 00000000..3309317e
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutchars.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialPutchars(uint8 fd,uint8 character){
+ serialPutchar(fd,character);
+}
diff --git a/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c
new file mode 100644
index 00000000..581e15ac
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Serial/u8RPI_serialPutss.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSerial.h"
+
+void u8RPI_serialPutss(uint8 fd,char* character,int size){
+ serialPuts(fd,character);
+}
diff --git a/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c b/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c
new file mode 100644
index 00000000..4170f4c1
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Setup/gRPI_pinNumberinga.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSetup.h"
+#include "stdio.h"
+
+int8 gRPI_pinNumberinga(char* seq,int size){
+ uint8 out;
+ if (seq[0]=='w'){
+ out=wiringPiSetup();
+ }
+ else if (seq[0]=='G'){
+ out=wiringPiSetupGpio();
+ }
+ else if (seq[0]=='P'){
+ out=wiringPiSetupPhys();
+ }
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c b/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c
new file mode 100644
index 00000000..0a5c4764
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Setup/u8RPI_getAlts.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSetup.h"
+
+uint8 u8RPI_getAlts(uint8 pin){
+ uint8 out;
+ out=getAlt(pin);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c b/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c
new file mode 100644
index 00000000..153b88ee
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Setup/u8RPI_pinModeAlts.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSetup.h"
+
+void u8RPI_pinModeAlts(uint8 pin,uint8 mode){
+ pinModeAlt(pin,mode);
+}
diff --git a/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c b/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c
new file mode 100644
index 00000000..76601f8d
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Setup/u8RPI_pinModes.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <stdio.h>
+#include "types.h"
+#include "RPIPeripheralSetup.h"
+
+void u8RPI_pinModes(uint8 pin,char* mode,int size){
+ if (mode[0]=='i'){
+ pinMode(pin,INPUT);
+ }
+ else if (mode[0]=='o'){
+ pinMode(pin,OUTPUT);
+ }
+ else if (mode[0]=='p'){
+ pinMode(pin,PWM_OUTPUT);
+ }
+ else if (mode[0]=='c'){
+ pinMode(pin,GPIO_CLOCK);
+ }
+
+}
diff --git a/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c b/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c
new file mode 100644
index 00000000..4e95aac5
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Setup/u8RPI_pullControls.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSetup.h"
+
+void u8RPI_pullControls(uint8 pin,char* mode,int size){
+ if (mode[0]=='d'){
+ pullUpDnControl(pin,1);
+ }
+ else if (mode[0]=='u'){
+ pullUpDnControl(pin,2);
+ }
+ else if (mode[0]=='o'){
+ pullUpDnControl(pin,0);
+ }
+}
diff --git a/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c b/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c
new file mode 100644
index 00000000..3f0a6493
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Shift/u16RPI_sr595Setups.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralShift.h"
+
+int8 u16RPI_sr595Setups(uint16 pinBase,uint8 nPins,uint8 dP,uint8 cP,uint8 lP)
+{
+ int8 out;
+ out=sr595Setup(pinBase,nPins,dP,cP,lP);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c b/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c
new file mode 100644
index 00000000..6a264b6a
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Shift/u8RPI_shiftIns.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralShift.h"
+
+uint8 u8RPI_shiftIns(uint8 dpin,uint8 cpin,uint8 order){
+ uint8 out;
+ out=shiftIn(dpin,cpin,order);
+ return out;
+}
diff --git a/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c b/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c
new file mode 100644
index 00000000..5d24c2b9
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Shift/u8RPI_shiftOuts.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralShift.h"
+
+void u8RPI_shiftOuts(uint8 dpin,uint8 cpin,uint8 order,uint8 val){
+ shiftOut(dpin,cpin,order,val);
+}
diff --git a/src/c/hardware/rasberrypi/Timing/RPI_micros.c b/src/c/hardware/rasberrypi/Timing/RPI_micros.c
new file mode 100644
index 00000000..a7a84503
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Timing/RPI_micros.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralTiming.h"
+
+/* Function to get time in microsecond since first setup function called */
+
+uint32 RPI_micros(){
+ uint32 out;
+ out=micros();
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Timing/RPI_millis.c b/src/c/hardware/rasberrypi/Timing/RPI_millis.c
new file mode 100644
index 00000000..b383f2a9
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Timing/RPI_millis.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralTiming.h"
+
+/* Function to get time in millisecond since first setup function called */
+
+uint32 RPI_millis(){
+ uint32 out;
+ out=millis();
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c b/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c
new file mode 100644
index 00000000..1ffdda7e
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Timing/u32RPI_delayMicros.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralTiming.h"
+
+/* Function to insert some delay in code execution. */
+
+void u32RPI_delayMicros(uint32 time){
+ delayMicroseconds(time);
+}
diff --git a/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c b/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c
new file mode 100644
index 00000000..7802d6bf
--- /dev/null
+++ b/src/c/hardware/rasberrypi/Timing/u32RPI_delays.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralTiming.h"
+
+/* Function to insert some delay in code execution. */
+
+void u32RPI_delays(uint32 time){
+ delay(time);
+}
diff --git a/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c b/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c
new file mode 100644
index 00000000..5724ebb4
--- /dev/null
+++ b/src/c/hardware/rasberrypi/gertBoard/RPI_gertboardSPISetup.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralGertboard.h"
+
+int8 RPI_gertboardSPISetup(){
+ int8 out;
+ out=gertboardSPISetup();
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c
new file mode 100644
index 00000000..433bed29
--- /dev/null
+++ b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogReads.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralGertboard.h"
+
+uint16 u16RPI_gertboardAnalogReads(uint16 pin){
+ uint16 out;
+ out=gertboardAnalogRead(pin);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c
new file mode 100644
index 00000000..a19aa6d0
--- /dev/null
+++ b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogSetups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralGertboard.h"
+
+int8 u16RPI_gertboardAnalogSetups(uint16 pinBase){
+ int8 out;
+ out=gertboardAnalogSetup(pinBase);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c
new file mode 100644
index 00000000..2c8aa338
--- /dev/null
+++ b/src/c/hardware/rasberrypi/gertBoard/u16RPI_gertboardAnalogWrites.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralGertboard.h"
+
+void u16RPI_gertboardAnalogWrites(uint16 pin,uint16 value){
+ gertboardAnalogWrite(pin,value);
+}
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
index 2f40ffb2..842fd73b 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h
@@ -19,15 +19,14 @@
extern "C" {
#endif
-
#include "types.h"
-#include "wiringPi.h"
-extern int phy_pin[];
+extern int phy_pin[]; //Not needed???
-void u8RPIDigitalSetups(uint8 pin, uint8 direction);
-void u8RPIDigitalOuts(uint8 pin, uint8 state);
-uint8 u8RPIDigitalIns(uint8 pin);
+uint8 u8RPI_digitalReads(uint8 pin);
+uint8 RPI_digitalReadByte();
+void u8RPI_digitalWrites(uint8 pin, uint8 state);
+void u8RPI_digitalWriteBytes(uint8 value);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h
new file mode 100644
index 00000000..3594d0a1
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralGertboard.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __RPIPERIPHERALGERTBOARD_H__
+#define __RPIPERIPHERALGERTBOARD_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "gertboard.h"
+
+int8 RPI_gertboardSPISetup();
+uint16 u16RPI_gertboardAnalogReads(uint16 pin);
+int8 u16RPI_gertboardAnalogSetups(uint16 pinBase);
+void u16RPI_gertboardAnalogWrites(uint16 pin,uint16 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALGERTBOARD_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h
new file mode 100644
index 00000000..6c8dfe14
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralI2C.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+/* This file declares functions and constants related to rasberrypi*/
+
+#ifndef __RPIPERIPHERALI2C_H__
+#define __RPIPERIPHERALI2C_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "wiringPiI2C.h"
+
+int8 u16RPI_I2CSetups(uint8 arrd);
+int8 u16RPI_I2CReads(uint16 fd);
+int8 u16RPI_I2CReadReg8s(uint16 fd,uint16 reg);
+int8 u16RPI_I2CReadReg16s(uint16 fd,uint16 reg);
+int8 u16RPI_I2CWrites(uint16 fd,uint16 data);
+int8 u16RPI_I2CWriteReg8s(uint16 fd,uint16 reg,uint16 data);
+int8 u16RPI_I2CWriteReg16s(uint16 fd,uint16 reg,uint16 data);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALI2C_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h
index a7b2adb4..d9fc30f3 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralInterrupt.h
@@ -5,24 +5,23 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __RPIPERIPHERALTHREADING_H__
-#define __RPIPERIPHERALTHREADING_H__
-
-#include "types.h"
-#include "wiringPi.h"
+#ifndef __RPIPERIPHERALINTERRUPT_H__
+#define __RPIPERIPHERALINTERRUPT_H__
#ifdef __cplusplus
extern "C" {
#endif
-uint16 RPIThreadCreate(void *(*threadFunction)(void*));
+#include "types.h"
+
+int8 u8RPI_waitForInterrupts(uint8 pin,int16 time);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALTHREADING_H__*/
+#endif /*__RPIPERIPHERALINTERRUPT_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h
new file mode 100644
index 00000000..654a31a3
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralLCD.h
@@ -0,0 +1,39 @@
+ /* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALLCD_H__
+#define __RPIPERIPHERALLCD_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "lcd.h"
+
+void u8RPI_lcdCharDefs(uint8 fd,uint8 index,uint8 d0,uint8 d1,uint8 d2,uint8 d3, uint8 d4,uint8 d5,uint8 d6,uint8 d7);
+void u8RPI_lcdClears(uint8 fd);
+void u8RPI_lcdCursorBlinks(uint8 fd,uint8 state);
+void u8RPI_lcdCursors(uint8 fd,uint8 state);
+void u8RPI_lcdDisplays(uint8 fd,uint8 state);
+void u8RPI_lcdHomes(uint8 fd);
+int8 u8RPI_lcdInits(uint8 rows,uint8 cols,uint8 bits,uint8 rs,uint8 strb,uint8 d0,uint8 d1,uint8 d2,uint8 d3,uint8 d4,uint8 d5,uint8 d6,uint8 d7);
+void u8RPI_lcdPositions(uint8 fd,uint8 row,uint8 col);
+void u8RPI_lcdPutchars(uint8 fd,uint8 character);
+void u8RPI_lcdSendCommands(uint8 fd,uint8 cmd);
+void u8RPI_lcdPutss(uint8 fd,char* msg,int size);
+void u8RPI_lcdPrintfs(uint8 fd,char* data,int size);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALLCD_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h
new file mode 100644
index 00000000..5304f14b
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralMcp.h
@@ -0,0 +1,36 @@
+ /* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALMCP_H__
+#define __RPIPERIPHERALMCP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "mcp23016.h"
+#include "mcp23017.h"
+#include "mcp23008.h"
+#include "mcp23s17.h"
+#include "mcp23s08.h"
+
+uint8 u16RPI_mcp23008Setups(uint16 pinBase,uint8 addr);
+uint8 u16RPI_mcp23016Setups(uint16 pinBase,uint8 addr);
+uint8 u16RPI_mcp23017Setups(uint16 pinBase,uint8 addr);
+uint8 u16RPI_mcp23s08Setups(uint16 pinBase,uint8 spiport,uint8 devId);
+uint8 u16RPI_mcp23s17Setups(uint16 pinBase,uint8 spiport,uint8 devId);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALMCP_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h
new file mode 100644
index 00000000..0ef5acc1
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralMisc.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __RPIPERIPHERALMISC_H__
+#define __RPIPERIPHERALMISC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "sn3218.h"
+
+uint8 RPI_boardRev();
+void u8RPI_padDrives(uint8 group,uint8 strength);
+int8 u16RPI_sn3218Setups(uint16 pinBase);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALMISC_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
index d463d9c9..f1d3024e 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h
@@ -5,24 +5,24 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
#ifndef __RPIPERIPHERALPWM_H__
#define __RPIPERIPHERALPWM_H__
-#include "types.h"
-#include "wiringPi.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-void u8RPIHardPWMWrites(uint8 pin, uint16 value);
-void u8RPIHardPWMSetRanges(uint16 value);
-void u8RPIHardPWMSetModes(uint8 mode);
-void u8RPIHardPWMSetClocks(uint16 clk_divisor);
+#include "types.h"
+
+void u8RPI_pwmWrites(uint8 pin,uint16 value);
+void u32RPI_pwmRanges(uint32 value);
+void gRPI_pwmModea(char* mode,int size);
+void u16RPI_pwmClocks(uint16 divisor);
+void u8RPI_pwmToneWrites(uint8 pin,uint16 value);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h
new file mode 100644
index 00000000..55459332
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralPcf.h
@@ -0,0 +1,30 @@
+ /* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALPCF_H__
+#define __RPIPERIPHERALPCF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "pcf8574.h"
+#include "pcf8591.h"
+
+uint8 u16RPI_pcf8574Setups(uint16 pinBase,uint8 addr);
+uint8 u16RPI_pcf8591Setups(uint16 pinBase,uint8 addr);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALPCF_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h
new file mode 100644
index 00000000..d2dcd13c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralPiGlow.h
@@ -0,0 +1,31 @@
+ /* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALPIGLOW_H__
+#define __RPIPERIPHERALPIGLOW_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "piGlow.h"
+
+void u8RPI_piGlowSetups(uint8 clear);
+void u8RPI_piGlow1s(uint8 leg,uint8 ring,uint8 intensity);
+void u8RPI_piGlowLegs(uint8 leg,uint8 intensity);
+void u8RPI_piGlowRings(uint8 ring,uint8 intensity);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALPIGLOW_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h
index fc5a8d04..39c2379d 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralPinMap.h
@@ -5,22 +5,24 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __RPIPERIPHERALPINISR_H__
-#define __RPIPERIPHERALPINISR_H__
-
+#ifndef __RPIPERIPHERALPINMAP_H__
+#define __RPIPERIPHERALPINMAP_H__
#ifdef __cplusplus
extern "C" {
#endif
-int16 i16RPIPinISRs(uint8 pin, uint8 edgetype, void (*ISRFunction)(void));
+#include "types.h"
+
+int8 u8RPI_physToGpios(uint8 pin);
+int8 u8RPI_wpiToGpios(uint8 pin);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__RPIPERIPHERALPINISR_H__*/
+#endif /*__RPIPERIPHERALPINMAP_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
index 14df95b4..67284bd0 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h
@@ -5,42 +5,28 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
#ifndef __RPIPERIPHERALSERIAL_H__
#define __RPIPERIPHERALSERIAL_H__
-#include "types.h"
-#include "wiringSerial.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-int u8RPISerialSetups(char* port, int baudrate);
-void u8RPISerialCloses(int fd);
-
-void u8RPISerialSendChars(int fd, uint8 data);
-void u8RPISerialSendDatas(int fd, uint8 data);
-void i8RPISerialSendDatas(int fd, int8 data);
-void u16RPISerialSendDatas(int fd, uint16 data);
-void i16RPISerialSendDatas(int fd, int16 data);
-void sRPISerialSendDatas(int fd, float data);
-void dRPISerialSendDatas(int fd, double data);
-void u8RPISerialSendDataa(int fd, uint8* data, int size);
-void i8RPISerialSendDataa(int fd, int8* data, int size);
-void u16RPISerialSendDataa(int fd, uint16* data, int size);
-void i16RPISerialSendDataa(int fd, int16* data, int size);
-void sRPISerialSendDataa(int fd, float* data, int size);
-void dRPISerialSendDataa(int fd, double* data, int size);
-void gRPISerialSendDatas(int fd, uint8* data, int size);
-
-int16 i16RPISerialDataAvails(int fd);
-int16 i16RPISerialGetChars(int fd);
+#include "types.h"
+#include "wiringSerial.h"
-void u8RPISerialFlushs(int fd);
+int8 gRPI_serialOpena(char* device,int size,uint32 baud);
+void u8RPI_serialCloses(uint8 fd);
+uint8 u8RPI_serialDataAvails(uint8 fd);
+void u8RPI_serialFlushs(uint8 fd);
+void u8RPI_serialGetchars(uint8 fd,char* out);
+void u8RPI_serialPrintfs(uint8 fd,char* msg,int size);
+void u8RPI_serialPutchars(uint8 fd,uint8 character);
+void u8RPI_serialPutss(uint8 fd,char* character,int size);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h
new file mode 100644
index 00000000..373f0648
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralSetup.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+/* This file declares functions and constants related to Setup*/
+
+#ifndef __RPIPERIPHERALSETUP_H__
+#define __RPIPERIPHERALSETUP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "wiringPi.h"
+
+int8 gRPI_pinNumberinga(char* seq,int size);
+uint8 u8RPI_getAlts(uint8 pin);
+void u8RPI_pinModeAlts(uint8 pin,uint8 mode);
+void u8RPI_pinModes(uint8 pin,char* mode,int size);
+void u8RPI_pullControls(uint8 pin,char* mode,int size);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALSETUP_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h
new file mode 100644
index 00000000..4c58bb77
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralShift.h
@@ -0,0 +1,31 @@
+ /* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __RPIPERIPHERALSHIFT_H__
+#define __RPIPERIPHERALSHIFT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "wiringShift.h"
+#include "sr595.h"
+
+uint8 u8RPI_shiftIns(uint8 dpin,uint8 cpin,uint8 order);
+void u8RPI_shiftOuts(uint8 dpin,uint8 cpin,uint8 order,uint8 val);
+int8 u16RPI_sr595Setups(uint16 pinBase,uint8 nPins,uint8 dP,uint8 cP,uint8 lP);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALSHIFT_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h
new file mode 100644
index 00000000..9494506e
--- /dev/null
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralSoft.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+/* This file declares functions and constants related to Setup*/
+
+#ifndef __RPIPERIPHERALSOFT_H__
+#define __RPIPERIPHERALSOFT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "types.h"
+#include "softPwm.h"
+#include "softTone.h"
+
+uint8 u8RPI_softPwmCreates(uint8 pin,uint16 ival,uint16 range);
+void u8RPI_softPwmStops(uint8 pin);
+void u8RPI_softPwmWrites(uint8 pin,uint16 value);
+uint8 u8RPI_softToneCreates(uint8 pin);
+void u8RPI_softToneStops(uint8 pin);
+void u8RPI_softToneWrites(uint8 pin,uint32 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__RPIPERIPHERALSOFT_H__*/
diff --git a/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h b/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
index 854073f3..e75a5394 100644
--- a/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
+++ b/src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -22,10 +22,10 @@ extern "C" {
#include "types.h"
#include "wiringPi.h"
-void u16RPIDelayMillis(uint16 time);
-void u16RPIDelayMicros(uint16 time);
-uint32 u32RPIGetMillis();
-uint32 u32RPIGetMicros();
+void u32RPI_delays(uint32 time);
+void u32RPI_delayMicros(uint32 time);
+uint32 RPI_millis();
+uint32 RPI_micros();
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
index 40a8e1a4..7de051fc 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h
@@ -5,7 +5,7 @@
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
- Author: Siddhesh Wani
+ Author: Siddhesh Wani, Jorawar Singh
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
@@ -20,14 +20,13 @@
extern "C" {
#endif
-#define RPI_DigitalSetup(in1,in2) u8RPIDigitalSetups((uint8) in1, (uint8) in2);
-
-#define RPI_DigitalIn(in1) u8RPIDigitalIns((uint8) in1);
-
-#define RPI_DigitalOut(in1,in2) u8RPIDigitalOuts((uint8) in1, (uint8) in2);
+#define u80RPI_digitalReadu80(pin) u8RPI_digitalReads(pin);
+#define RPI_digitalReadByteu80() RPI_digitalReadByte();
+#define u80u80RPI_digitalWrite(pin,state) u8RPI_digitalWrites(pin,state);
+#define u80RPI_digitalWriteByte(value) u8RPI_digitalWriteBytes(value);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__RPIPERIPHERALGPIO_H__ */
+#endif /* !__INT_RPIPERIPHERALGPIO_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h
new file mode 100644
index 00000000..cea8bb6e
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralGertboard.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALGERTBOARD_H__
+#define __INT_RPIPERIPHERALGERTBOARD_H__
+
+#include "types.h"
+#include "RPIPeripheralGertboard.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define RPI_gertboardSPISetupi80() RPI_gertboardSPISetup();
+#define u160RPI_gertboardAnalogSetupi80(pinBase) u16RPI_gertboardAnalogSetups(pinBase);
+#define u160RPI_gertboardAnalogReadu160(pin) u160RPI_gertboardAnalogReads(pin);
+#define u160u160RPI_gertboardAnalogWrite(pin,value) u160RPI_gertboardAnalogWrites(pin,value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALGERTBOARD_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h
new file mode 100644
index 00000000..f18fd57c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralI2C.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALI2C_H__
+#define __INT_RPIPERIPHERALI2C_H__
+
+#include "types.h"
+#include "RPIPeripheralI2C.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u160RPI_I2CSetupi80(arrd) u16RPI_I2CSetups(arrd);
+#define u160RPI_I2CReadi80(fd) u16RPI_I2CReads(fd);
+#define u160u160RPI_I2CReadReg8i80(fd,reg) u16RPI_I2CReadReg8s(fd,reg);
+#define u160u160RPI_I2CReadReg16i80(fd,reg) u16RPI_I2CReadReg16s(fd,reg);
+#define u160u160RPI_I2CWritei80(fd,data) u16RPI_I2CWrites(fd,data);
+#define u160u160u160RPI_I2CWriteReg8i80(fd,reg,data) u16RPI_I2CWriteReg8s(fd,reg,data);
+#define u160u160u160RPI_I2CWriteReg16i80(fd,reg,data) u16RPI_I2CWriteReg16s(fd,reg,data);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALI2C_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h
new file mode 100644
index 00000000..cb55572a
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralInterrupt.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALINTERRUPT_H__
+#define __INT_RPIPERIPHERALINTERRUPT_H__
+
+#include "types.h"
+#include "RPIPeripheralInterrupt.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80i160RPI_waitForInterrupti80(pin,time) u8RPI_waitForInterrupts(pin,time);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALINTERRUPT_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h
new file mode 100644
index 00000000..da23beec
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralLCD.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALLCD_H__
+#define __INT_RPIPERIPHERALLCD_H__
+
+#include "types.h"
+#include "RPIPeripheralLCD.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80u80u80u80u80u80u80u80u80u80RPI_lcdCharDef(fd,index,d0,d1,d2,d3,d4,d5,d6,d7) u8RPI_lcdCharDefs(fd,index,d0,d1,d2,d3,d4,d5,d6,d7);
+#define u80RPI_lcdClear(fd) u8RPI_lcdClears(fd);
+#define u80u80RPI_lcdCursorBlink(fd,state) u8RPI_lcdCursorBlinks(fd,state);
+#define u80u80RPI_lcdCursor(fd,state) u8RPI_lcdCursors(fd,state);
+#define u80u80RPI_lcdDisplay(fd,state) u8RPI_lcdDisplays(fd,state);
+#define u80RPI_lcdHome(fd) u8RPI_lcdHomes(fd);
+#define u80u80u80u80u80u80u80u80u80u80u80u80u80RPI_lcdIniti80(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7) u8RPI_lcdInits(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7);
+#define u80u80u80RPI_lcdPosition(fd,row,col) u8RPI_lcdPositions(fd,row,col);
+#define u80u80RPI_lcdPutchar(fd,char) u8RPI_lcdPutchars(fd,char);
+#define u80u80RPI_lcdSendCommand(fd,cmd) u8RPI_lcdSendCommands(fd,cmd);
+#define u80g2RPI_lcdPutss(fd,msg,size) u8RPI_lcdPutss(fd,msg,size[1]);;
+#define u80g2RPI_lcdPrintfs(fd,data,size) u8RPI_lcdPrintfs(fd,data,size[1]);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALLCD_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h
new file mode 100644
index 00000000..c044cf7f
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMcp.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALMCP_H__
+#define __INT_RPIPERIPHERALMCP_H__
+
+#include "types.h"
+#include "RPIPeripheralMcp.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u160u80RPI_mcp23008Setupu80(pinBase,addr) u16RPI_mcp23008Setups(pinBase,addr);
+#define u160u80RPI_mcp23016Setupu80(pinBase,addr) u16RPI_mcp23016Setups(pinBase,addr);
+#define u160u80RPI_mcp23017Setupu80(pinBase,addr) u16RPI_mcp23017Setups(pinBase,addr);
+#define u160u80u80RPI_mcp23s08Setupu80(pinBase,spiport,devId) u16RPI_mcp23s08Setups(pinBase,spiport,devId);
+#define u160u80u80RPI_mcp23s17Setupu80(pinBase,spiport,devId) u16RPI_mcp23s17Setups(pinBase,spiport,devId);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALMCP_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h
new file mode 100644
index 00000000..b836d683
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralMisc.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALMISC_H__
+#define __INT_RPIPERIPHERALMISC_H__
+
+#include "types.h"
+#include "RPIPeripheralMisc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define RPI_boardRevu80() RPI_boardRev();
+#define u80u80RPI_padDrive(group,strength) u8RPI_padDrives(group,strength);
+#define u160RPI_sn3218Setupi80(pinBase) u16RPI_sn3218Setups(pinBase);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALMISC_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
index 8c8f4c62..49c58c04 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h
@@ -1,30 +1,33 @@
- /* Copyright (C) 2016 - IIT Bombay - FOSSEE
+/* Copyright (C) 2016 - 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
- Author: Siddhesh Wani
+ Author: Jorawar Singh, Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
- */
+*/
+
#ifndef __INT_RPIPERIPHERALPWM_H__
#define __INT_RPIPERIPHERALPWM_H__
#include "types.h"
+#include "RPIPeripheralPWM.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define RPI_HardPWMWrite(pin,value) u8RPIHardPWMWrites((uint8)pin,(uint16)value)
-#define RPI_HardPWMSetRange(value) u8RPIHardPWMSetRanges((uint16)value)
-#define RPI_HardPWMSetMode(mode) u8RPIHardPWMSetModes((uint8)mode)
-#define RPI_HardPWMSetClock(clk_divisor) u8RPIHardPWMSetClocks((uint16)clk_divisor)
+#define u80u160RPI_pwmWrite(pin,value) u8RPI_pwmWrites(pin,value);
+#define u320RPI_pwmRange(value) u32RPI_pwmRanges(value);
+#define g2RPI_pwmMode(mode) gRPI_pwmModea(mode);
+#define u160RPI_pwmClock(divisor) u16RPI_pwmClocks(divisor);
+#define u80u160RPI_pwmToneWrite(pin,value) u8RPI_pwmToneWrites(pin,value);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__INT_RPIPERIPHERALPWM_H__*/
+#endif /* !__INT_RPIPERIPHERALPWM_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h
new file mode 100644
index 00000000..e3d2009d
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPcf.h
@@ -0,0 +1,30 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALPCF_H__
+#define __INT_RPIPERIPHERALPCF_H__
+
+#include "types.h"
+#include "RPIPeripheralPcf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u160u80RPI_pcf8574Setupu80(pinBase,addr) u16RPI_pcf8574Setups(pinBase,addr);
+#define u160u80RPI_pcf8591Setupu80(pinBase,addr) u16RPI_pcf8591Setups(pinBase,addr);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALPCF_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h
new file mode 100644
index 00000000..08056f94
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPiGlow.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALPIGLOW_H__
+#define __INT_RPIPERIPHERALPIGLOW_H__
+
+#include "types.h"
+#include "RPIPeripheralPiGlow.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80RPI_piGlowSetup(clear) u8RPI_piGlowSetups(clear);
+#define u80u80u80RPI_piGlow1(leg,ring,intensity) u8RPI_piGlow1s(leg,ring,intensity);
+#define u80u80RPI_piGlowLeg(leg,intensity) u8RPI_piGlowLegs(leg,intensity);
+#define u80u80RPI_piGlowRing(ring,intensity) u8RPI_piGlowRings(ring,intensity);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALPIGLOW_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h
new file mode 100644
index 00000000..39c5c011
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinMap.h
@@ -0,0 +1,30 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALPINMAP_H__
+#define __INT_RPIPERIPHERALPINMAP_H__
+
+#include "types.h"
+#include "RPIPeripheralPinMap.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80RPI_physToGpioi80(pin) u8RPI_physToGpios(pin);
+#define u80RPI_wpiToGpioi80(pin) u8RPI_wpiToGpios(pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALPINMAP_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
index 5d53b98b..e0832f97 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h
@@ -1,47 +1,36 @@
- /* Copyright (C) 2016 - IIT Bombay - FOSSEE
+/* Copyright (C) 2016 - 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
- Author: Siddhesh Wani
+ Author: Jorawar Singh, Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
- */
+*/
+
#ifndef __INT_RPIPERIPHERALSERIAL_H__
#define __INT_RPIPERIPHERALSERIAL_H__
#include "types.h"
+#include "RPIPeripheralSerial.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define RPI_SerialSetup(port,size,baudrate) u16RPISerialSetups(port,baudrate)
-#define RPI_SerialClose(fd) u8RPISerialCloses(fd)
-
-#define u80u80RPI_SerialSendData(fd,data) u8RPISerialSendDatas(fd,data)
-#define u80i80RPI_SerialSendData(fd,data) i8RPISerialSendDatas(fd,data)
-#define u80u160RPI_SerialSendData(fd,data) u16RPISerialSendDatas(fd,data)
-#define u80i160RPI_SerialSendData(fd,data) i16RPISerialSendDatas(fd,data)
-#define u80s0RPI_SerialSendData(fd,data) sRPISerialSendDatas(fd,data)
-#define u80d0RPI_SerialSendData(fd,data) dRPISerialSendDatas(fd,data)
-
-#define u80u82RPI_SerialSendData(fd,data,size) u8RPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80i82RPI_SerialSendData(fd,data,size) i8RPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80u162RPI_SerialSendData(fd,data,size) u16RPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80i162RPI_SerialSendData(fd,data,size) i16RPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80s2RPI_SerialSendData(fd,data,size) sRPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80d2RPI_SerialSendData(fd,data,size) dRPISerialSendDataa(fd,data,size[0]*size[1]);
-#define u80g2RPI_SerialSendData(fd,data,size) gRPISerialSendDatas(fd,data,size[0]*size[1]);
-
-#define RPI_SerialDataAvail(fd) i16RPISerialDataAvails(fd)
-#define RPI_SerialGetChar(fd) i16RPISerialGetChars(fd)
-#define RPI_SerialFlush(fd) u8RPISerialFlushs(fd)
+#define g2u320RPI_serialOpeni80(device,size,baud) gRPI_serialOpena(device,size[1],baud);
+#define u80RPI_serialClose(fd) u8RPI_serialCloses(fd);
+#define u80RPI_serialDataAvailu80(fd) u8RPI_serialDataAvails(fd);
+#define u80RPI_serialFlush(fd) u8RPI_serialFlushs(fd);
+#define u80RPI_serialGetcharg2(fd,out) u8RPI_serialGetchars(fd,out);
+#define u80g2RPI_serialPrintf(fd,msg,size) u8RPI_serialPrintfs(fd,msg,size[1]);
+#define u80u80RPI_serialPutchar(fd,character) u8RPI_serialPutchars(fd,character);
+#define u80g2RPI_serialPutsg2(fd,character,size) u8RPI_serialPutss(fd,character,size[1]);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__INT_RPIPERIPHERALSERIAL_H__*/
+#endif /* !__INT_RPIPERIPHERALSERIAL_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h
new file mode 100644
index 00000000..0e1f7b42
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSetup.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALSETUP_H__
+#define __INT_RPIPERIPHERALSETUP_H__
+
+#include "RPIPeripheralSetup.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2RPI_pinNumberingi80(seq,size) gRPI_pinNumberinga(seq,size[1]);
+#define u80RPI_getAltu80(pin) u8RPI_getAlts(pin);
+#define u80u80RPI_pinModeAlt(pin,mode) u8RPI_pinModeAlts(pin,mode);
+#define u80g2RPI_pinMode(pin,mode,size) u8RPI_pinModes(pin,mode,size[1]);
+#define u80g2RPI_pullControl(pin,mode,size) u8RPI_pullControls(pin,mode,size[1]);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALSETUP_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h
new file mode 100644
index 00000000..6b142bd5
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralShift.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALSHIFT_H__
+#define __INT_RPIPERIPHERALSHIFT_H__
+
+#include "types.h"
+#include "RPIPeripheralShift.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80u80u80RPI_shiftInu80(dpin,cpin,order) u8RPI_shiftIns(dpin,cpin,order);
+#define u80u80u80u80RPI_shiftOut(dpin,cpin,order,val) u8RPI_shiftOuts(dpin,cpin,order,val);
+#define u160u80u80u80u80RPI_sr595Setupi80(pinBase,nPins,dP,cP,lP) u16RPI_sr595Setups(pinBase,nPins,dP,cP,lP);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALSHIFT_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h
new file mode 100644
index 00000000..80372b26
--- /dev/null
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSoft.h
@@ -0,0 +1,34 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#ifndef __INT_RPIPERIPHERALSOFT_H__
+#define __INT_RPIPERIPHERALSOFT_H__
+
+#include "types.h"
+#include "RPIPeripheralSoft.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define u80u160u160RPI_softPwmCreateu80(pin,ival,range) u8RPI_softPwmCreates(pin,ival,range);
+#define u80RPI_softPwmStop(pin) u8RPI_softPwmStops(pin);
+#define u80u160RPI_softPwmWrite(pin,value) u8RPI_softPwmWrites(pin,value);
+#define u80RPI_softToneCreateu80(pin) u8RPI_softToneCreates(pin);
+#define u80RPI_softToneStop(pin) u8RPI_softToneStops(pin);
+#define u80u320RPI_softToneWrite(pin,value) u8RPI_softToneWrites(pin,value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* !__INT_RPIPERIPHERALSOFT_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
index 1a704655..5c4e6184 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
+++ b/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h
@@ -5,12 +5,11 @@
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
- Author: Siddhesh Wani
+ Author: Jorawar Singh, Siddhesh Wani
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-
#ifndef __INT_RPIPERIPHERALTIMING_H__
#define __INT_RPIPERIPHERALTIMING_H__
@@ -21,14 +20,13 @@
extern "C" {
#endif
-#define RPI_DelayMicro(in1) u16RPIDelayMicros((uint16) in1)
-#define RPI_DelayMilli(in1) u16RPIDelayMillis((uint16) in1)
-#define RPI_GetMicro() u32RPIGetMicros()
-#define RPI_GetMillis() u32RPIGetMillis()
-
+#define u320RPI_delay(time) u32RPI_delays(time);
+#define u320RPI_delayMicro(time) u32RPI_delayMicros(time);
+#define RPI_millisu320() RPI_millis();
+#define RPI_microsu320() RPI_micros();
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* !__RPIPERIPHERALTIMING_H__ */
+#endif /* !__INT_RPIPERIPHERALTIMING_H__ */
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c
new file mode 100644
index 00000000..b85d82fd
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCharDefs.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdCharDefs(uint8 fd,uint8 index,uint8 d0,uint8 d1,uint8 d2,uint8 d3, uint8 d4,uint8 d5,uint8 d6,uint8 d7){
+ uint8 data[8]={d0,d1,d2,d3,d4,d5,d6,d7};
+ lcdCharDef(fd,index,data);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c
new file mode 100644
index 00000000..659cdf07
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdClears.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdClears(uint8 fd){
+ lcdClear(fd);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c
new file mode 100644
index 00000000..bf0c48e3
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursorBlinks.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdCursorBlinks(uint8 fd,uint8 state){
+ lcdCursorBlink(fd,state);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c
new file mode 100644
index 00000000..8bb02715
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdCursors.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdCursors(uint8 fd,uint8 state){
+ lcdCursor(fd,state);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c
new file mode 100644
index 00000000..7425ebe9
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdDisplays.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdDisplays(uint8 fd,uint8 state){
+ lcdDisplay(fd,state);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c
new file mode 100644
index 00000000..98762de4
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdHomes.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdHomes(uint8 fd){
+ lcdHome(fd);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c
new file mode 100644
index 00000000..b69f311c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdInits.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+int8 u8RPI_lcdInits(uint8 rows,uint8 cols,uint8 bits,uint8 rs,uint8 strb,uint8 d0,uint8 d1,uint8 d2,uint8 d3,uint8 d4,uint8 d5,uint8 d6,uint8 d7){
+ uint8 fd;
+ fd=lcdInit(rows,cols,bits,rs,strb,d0,d1,d2,d3,d4,d5,d6,d7);
+ return (fd);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c
new file mode 100644
index 00000000..3188a972
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPositions.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdPositions(uint8 fd,uint8 row,uint8 col){
+ lcdPosition(fd,row,col);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c
new file mode 100644
index 00000000..58d01fa8
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPrintfs.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdPrintfs(uint8 fd,char* data,int size){
+ lcdPrintf(fd,data);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c
new file mode 100644
index 00000000..c50a177b
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutchars.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdPutchars(uint8 fd,uint8 character){
+ lcdPutchar(fd,character);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c
new file mode 100644
index 00000000..a7f492ba
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdPutss.c
@@ -0,0 +1,17 @@
+/* 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdPutss(uint8 fd,char* msg,int size){
+ lcdPuts(fd,msg);
+}
diff --git a/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c
new file mode 100644
index 00000000..7097d696
--- /dev/null
+++ b/src/c/hardware/rasberrypi/lcd/u8RPI_lcdSendCommands.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralLCD.h"
+
+void u8RPI_lcdSendCommands(uint8 fd,uint8 cmd){
+ lcdSendCommand(fd,cmd);
+}
diff --git a/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c
new file mode 100644
index 00000000..c7d73268
--- /dev/null
+++ b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23008Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMcp.h"
+
+uint8 u16RPI_mcp23008Setups(uint16 pinBase,uint8 addr){
+ uint8 out;
+ out=mcp23008Setup(pinBase,addr);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c
new file mode 100644
index 00000000..2e35e5c2
--- /dev/null
+++ b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23016Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMcp.h"
+
+uint8 u16RPI_mcp23016Setups(uint16 pinBase,uint8 addr){
+ uint8 out;
+ out=mcp23016Setup(pinBase,addr);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c
new file mode 100644
index 00000000..35ed5477
--- /dev/null
+++ b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23017Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMcp.h"
+
+uint8 u16RPI_mcp23017Setups(uint16 pinBase,uint8 addr){
+ uint8 out;
+ out=mcp23017Setup(pinBase,addr);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c
new file mode 100644
index 00000000..e1bdab60
--- /dev/null
+++ b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s08Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMcp.h"
+
+uint8 u16RPI_mcp23s08Setups(uint16 pinBase,uint8 spiport,uint8 devId){
+ uint8 out;
+ out=mcp23s08Setup(pinBase,spiport,devId);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c
new file mode 100644
index 00000000..5ba30d23
--- /dev/null
+++ b/src/c/hardware/rasberrypi/mcp/u16RPI_mcp23s17Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralMcp.h"
+
+uint8 u16RPI_mcp23s17Setups(uint16 pinBase,uint8 spiport,uint8 devId){
+ uint8 out;
+ out=mcp23s17Setup(pinBase,spiport,devId);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c b/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c
new file mode 100644
index 00000000..f7e38df0
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8574Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPcf.h"
+
+uint8 u16RPI_pcf8574Setups(uint16 pinBase,uint8 addr){
+ uint8 out;
+ out=pcf8574Setup(pinBase,addr);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c b/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c
new file mode 100644
index 00000000..de26a926
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pcf/u16RPI_pcf8591Setups.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPcf.h"
+
+uint8 u16RPI_pcf8591Setups(uint16 pinBase,uint8 addr){
+ uint8 out;
+ out=pcf8591Setup(pinBase,addr);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c
new file mode 100644
index 00000000..792cda1c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlow1s.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPiGlow.h"
+
+void u8RPI_piGlow1s(uint8 leg,uint8 ring,uint8 intensity){
+ piGlow1(leg,ring,intensity);
+}
diff --git a/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c
new file mode 100644
index 00000000..f4ef5b50
--- /dev/null
+++ b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowLegs.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPiGlow.h"
+
+void u8RPI_piGlowLegs(uint8 leg,uint8 intensity){
+ piGlowLeg(leg,intensity);
+}
diff --git a/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c
new file mode 100644
index 00000000..985696df
--- /dev/null
+++ b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowRings.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPiGlow.h"
+
+void u8RPI_piGlowRings(uint8 ring,uint8 intensity){
+ piGlowRing(ring,intensity);
+}
diff --git a/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c
new file mode 100644
index 00000000..2037a9b5
--- /dev/null
+++ b/src/c/hardware/rasberrypi/piGlow/u8RPI_piGlowSetups.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPiGlow.h"
+
+void u8RPI_piGlowSetups(uint8 clear){
+ piGlowSetup(clear);
+}
diff --git a/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c b/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c
new file mode 100644
index 00000000..09a57132
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pinMap/u8RPI_physToGpios.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPinMap.h"
+
+int8 u8RPI_physToGpios(uint8 pin){
+ int8 out;
+ out=physPinToGpio(pin);
+ return (pin);
+}
diff --git a/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c b/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c
new file mode 100644
index 00000000..5f65f34c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pinMap/u8RPI_wpiToGpios.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPinMap.h"
+
+int8 u8RPI_wpiToGpios(uint8 pin){
+ int8 out;
+ out=wpiPinToGpio(pin);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c b/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c
new file mode 100644
index 00000000..da67a15c
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pwm/gRPI_pwmModea.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPWM.h"
+
+/*Function to set mode for PWM channel. Two modes are available
+ "bal" --> balanced mode
+ "ms" --> mark/space mode
+ */
+
+void gRPI_pwmModea(char* mode,int size){
+ if (mode[0] == 'm') /*mark/space mode*/
+ pwmSetMode(0);
+ else if (mode[0] == 'b')
+ pwmSetMode(1);
+}
diff --git a/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c b/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c
new file mode 100644
index 00000000..85e1fb2b
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pwm/u16RPI_pwmClocks.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPWM.h"
+
+/*Function to set clock for pwm channel. Default clock is 19.2 MHz. 'clk_divisor'
+ along with range decides frequency for PWM
+ PWM frequency = 19.2 MHz / clk_divisor/ range
+ Range for clk_divisor = 1-2048
+*/
+
+void u16RPI_pwmClocks(uint16 divisor){
+ pwmSetClock(divisor);
+}
diff --git a/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c b/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c
new file mode 100644
index 00000000..1fb22963
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pwm/u32RPI_pwmRanges.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPWM.h"
+
+/*Function to assign pwm duty to specified pin. PWM duty is decided by 'value'
+ and 'range' specified using corresponding function.
+ PWM duty = value/range
+ */
+
+void u32RPI_pwmRanges(uint32 value){
+ pwmSetRange(value);
+}
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c
new file mode 100644
index 00000000..fe1b8cd2
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmToneWrites.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPWM.h"
+
+void u8RPI_pwmToneWrites(uint8 pin, uint16 value){
+ pwmToneWrite(pin, value);
+}
diff --git a/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c
new file mode 100644
index 00000000..be94e73e
--- /dev/null
+++ b/src/c/hardware/rasberrypi/pwm/u8RPI_pwmWrites.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Siddhesh Wani, Jorawar Singh
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralPWM.h"
+
+/*Function to write the given value to the pwm pin*/
+
+void u8RPI_pwmWrites(uint8 pin, uint16 value){
+ pwmWrite(pin, value);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c
new file mode 100644
index 00000000..d6977798
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmCreates.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+uint8 u8RPI_softPwmCreates(uint8 pin,uint16 ival,uint16 range){
+ uint8 out;
+ out=softPwmCreate(pin,ival,range);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c
new file mode 100644
index 00000000..761fdc23
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmStops.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+void u8RPI_softPwmStops(uint8 pin){
+ softPwmStop(pin);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c
new file mode 100644
index 00000000..2b76d148
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softPwmWrites.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+void u8RPI_softPwmWrites(uint8 pin,uint16 value){
+ softPwmWrite(pin,value);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c b/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c
new file mode 100644
index 00000000..dfcbb1fb
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softToneCreates.c
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+uint8 u8RPI_softToneCreates(uint8 pin){
+ uint8 out;
+ out=softToneCreate(pin);
+ return (out);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c b/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c
new file mode 100644
index 00000000..664fbda4
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softToneStops.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+void u8RPI_softToneStops(uint8 pin){
+ softToneStop(pin);
+}
diff --git a/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c b/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c
new file mode 100644
index 00000000..be04b476
--- /dev/null
+++ b/src/c/hardware/rasberrypi/soft/u8RPI_softToneWrites.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2016 - 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
+ Author: Jorawar Singh, Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "RPIPeripheralSoft.h"
+
+void u8RPI_softToneWrites(uint8 pin,uint32 value){
+ softToneWrite(pin,value);
+}
diff --git a/src/c/linearAlgebra/bdiag/dbdiaga.c b/src/c/linearAlgebra/bdiag/dbdiaga.c
new file mode 100644
index 00000000..fd455ba7
--- /dev/null
+++ b/src/c/linearAlgebra/bdiag/dbdiaga.c
@@ -0,0 +1,23 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+/*This function performs the block-diagonalization of matrix A.*/
+
+/*--------------------------------------------------------------------------*/
+/* [Ab [,X [,bs]]]=bdiag(A [,rMax]) */
+/*--------------------------------------------------------------------------*/
+
+#include <stdio.h>
+#include "string.h"
+#include "stdlib.h"
+#include "lapack.h"
+
diff --git a/src/c/linearAlgebra/hess/dhessa.c b/src/c/linearAlgebra/hess/dhessa.c
new file mode 100644
index 00000000..57f81b35
--- /dev/null
+++ b/src/c/linearAlgebra/hess/dhessa.c
@@ -0,0 +1,81 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+/*This function finds the hessenberg form of a matrix A.*/
+
+#include "hess.h"
+#include <stdio.h>
+#include "string.h"
+#include "stdlib.h"
+#include "lapack.h"
+#include "matrixTranspose.h"
+#include "matrixMultiplication.h"
+
+extern int dgehrd_(int *, int *,int *,double *,int *,double *,double *,int *,int *);
+extern int dorghr_(int *, int *,int *,double *,int *,double *,double *,int *,int *);
+
+
+void dhessa(double *in1,int size,int nout,double *out1, double *out2){
+ int i,j,k;
+ int N = size;
+ int ILO=1;
+ int IHI=N;
+ double *A;
+ int LDA=N;
+ double *TAU;
+ double *WORK;
+ int LWORK = N;
+ int INFO;
+ A = (double *)malloc((double)size*size*sizeof(double));
+ memcpy(A,in1,size*size*sizeof(double));
+ TAU = (double *)malloc((double)size*sizeof(double));
+ WORK = (double *)malloc((double)LWORK*sizeof(double));
+ dgehrd_(&N,&ILO,&IHI,A,&LDA,TAU,WORK,&N,&INFO);
+
+ for(i=0;i<N;i++)
+ for(j=0;j<N;j++)
+ out2[i+j*N] = A[i+j*N];
+
+ for(j=1;j<=N-2;j++){
+ for(i=j+2;i<=N;i++){
+ out2[(i-1)+(j-1)*N] = 0;
+ }
+ }
+
+ if(nout > 1){
+ dorghr_(&N,&ILO,&IHI,A,&LDA,TAU,WORK,&LWORK,&INFO);
+ for(i=0;i<N;i++)
+ for(j=0;j<N;j++)
+ out1[i+j*N] = A[i+j*N];
+ }
+
+ /*for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ if(i == j) out1[i+j*N]=1;
+ else out1[i+j*N]=0;
+ }
+ }
+ double result[size*size];
+ for(i=IHI-2;i>=ILO-1;i--){
+ tau = TAU[i];
+ double V[size],v[size],v1[size*size];
+ for(j=0;j<i;j++) V[j]=0;
+ V[j]=1*tau;
+ for(j=i+1;j<IHI;j++) V[j] = tau*A[j+i*N];
+ dtransposea (V,N,1,v);
+ dmulma(V,N,1,v,1,N,v1);
+ for(j=0;j<N;j++) for(k=0;k<N;k++) if(j == k) v1[j+k*N]--;
+ for(j=0;j<N;j++) for(k=0;k<N;k++) result[j+k*N] = out1[j+k*N];
+ dmulma(v1,N,N,result,N,N,out1);
+ }*/
+ //out2 = NULL;
+}
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h b/src/c/linearAlgebra/includes/hess.h
index 68ed6e0e..b9c53ded 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h
+++ b/src/c/linearAlgebra/includes/hess.h
@@ -1,25 +1,26 @@
- /* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* 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
- Author: Siddhesh Wani
+ Author: Sandeep Gupta
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __INT_RPIPERIPHERALTHREADING_H__
-#define __INT_RPIPERIPHERALTHREADING_H__
+#ifndef __HESS_H__
+#define __HESS_H__
+#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define RPI_ThreadCreate(fn) RPIThreadCreate(fn);
+void dhessa(double *in1,int size,int nout,double *out1,double *out2);
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__INT_RPIPERIPHERALTHREADING_H__*/
+#endif /*__HESS_H__*/
diff --git a/src/c/linearAlgebra/includes/spec.h b/src/c/linearAlgebra/includes/spec.h
new file mode 100644
index 00000000..3cd0b186
--- /dev/null
+++ b/src/c/linearAlgebra/includes/spec.h
@@ -0,0 +1,59 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __SPEC_H__
+#define __SPEC_H__
+
+#include "dynlib_matrixoperations.h"
+#include "doubleComplex.h"
+#include "floatComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* spec gives only the eigenvalues
+ If you want the eigenvalues and the eigenvectors, use spec2 */
+
+/* spec */
+#define sspecs(in) in
+#define dspecs(in) in
+#define cspecs(in) in
+#define zspecs(in) in
+
+EXTERN_MATOPS void sspeca(float* in, int rows, float* out);
+EXTERN_MATOPS void dspeca(double* in, int rows, double* out);
+EXTERN_MATOPS void cspeca(floatComplex* in, int rows, floatComplex* out);
+EXTERN_MATOPS void zspeca(doubleComplex* in, int rows,doubleComplex* out);
+
+
+
+/* spec2 */
+#define sspec2s(in,out) sspecs(1);*out=in;
+#define dspec2s(in,out) dspecs(1);*out=in;
+#define cspec2s(in,out) cspecs(FloatComplex(1,0));*out=FloatComplex(creals(in),cimags(in));
+#define zspec2s(in,out) zspecs(DoubleComplex(1,0));*out=DoubleComplex(zreals(in),zimags(in));
+
+EXTERN_MATOPS void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors);
+EXTERN_MATOPS void dspec2a(double* in, int rows, double* eigenvalues,double* eigenvectors);
+EXTERN_MATOPS void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors);
+EXTERN_MATOPS void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues,doubleComplex* eigenvectors);
+
+/*Edited by - Sandeep Gupta, IITB FOSSEE*/
+void dspec1a(double *in1,double *in2,int size,int nout,doubleComplex *out1,double *out2,doubleComplex *out3,doubleComplex *out4);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SPEC_H__ */
diff --git a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h b/src/c/linearAlgebra/interfaces/int_hess.h
index b2c1ed16..fb2ca720 100644
--- a/src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h
+++ b/src/c/linearAlgebra/interfaces/int_hess.h
@@ -1,25 +1,28 @@
- /* Copyright (C) 2016 - IIT Bombay - FOSSEE
+ /* 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
- Author: Siddhesh Wani
+ Author: Sandeep Gupta
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-#ifndef __INT_RPIPERIPHERALPINISR_H__
-#define __INT_RPIPERIPHERALPINISR_H__
+
+#ifndef __INT_HESS_H__
+#define __INT_HESS_H__
#ifdef __cplusplus
extern "C" {
#endif
-#define RPI_PinISR(pin,edge,funname) i16RPIPinISRs((uint8)pin,(uint8)edge,funname)
+#define d2hessd2(in1,size,out2) dhessa(in1,size[0],1,NULL,out2);
+#define d2hessd2d2(in1,size,out1,out2) dhessa(in1,size[0],2,out1,out2);
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /*__INT_RPIPERIPHERALPINISR_H__*/
+#endif /*__INT_HESS_H__*/
+
diff --git a/src/c/linearAlgebra/interfaces/int_spec.h b/src/c/linearAlgebra/interfaces/int_spec.h
new file mode 100644
index 00000000..8772a6a6
--- /dev/null
+++ b/src/c/linearAlgebra/interfaces/int_spec.h
@@ -0,0 +1,79 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ *
+ * 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
+ *
+ * Edited - Sandeep Gupta (FOSSEE) - IIT Bombay
+ */
+
+/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */
+
+#ifndef __INT_SPEC_H__
+#define __INT_SPEC_H__
+
+/* Only eigenvalues */
+
+#define s0specc0(in) FloatComplex (sspecs(in) , 0)
+
+#define d0specz0(in) DoubleComplex ( dspecs(in) , 0)
+
+#define c0specc0(in) cspecs(in)
+
+#define z0specz0(in) zspecs(in)
+
+#define s2specc2(in,size,out) {float* ZEROS;\
+ ZEROS=(float *)malloc((uint)(size[0]*size[0]*sizeof(float)));\
+ szerosa(ZEROS,size[0],size[0]);\
+ cspeca(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0], out);\
+ }
+
+#define d2specz2(in,size,out) {double* ZEROS;\
+ ZEROS=(double *)malloc((uint)(size[0]*size[0]*sizeof(double)));\
+ dzerosa(ZEROS,size[0],size[0]);\
+ zspeca(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out);\
+ }
+
+#define c2specc2(in,size,out) cspeca(in, size[0], out)
+
+#define z2specz2(in,size,out) zspeca(in, size[0], out)
+
+/* Eigenvalues and eigenvectors */
+
+#define s0specc0c0(in,out) cspec2s(FloatComplex( in,0) ,out)
+
+#define d0specz0z0(in,out) zspec2s(DoubleComplex(in,0) ,out)
+
+#define c0specc0c0(in,out) cspec2s(in,out)
+
+#define z0specz0z0(in,out) zspec2s(in,out)
+
+#define s2specc2c2(in,size,out1,out2) {float* ZEROS;\
+ ZEROS=(float *)malloc((uint)(size[0]*size[0]*sizeof(float)));\
+ szerosa(ZEROS,size[0],size[0]);\
+ cspec2a(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\
+ }
+
+#define d2specz2z2(in,size,out1,out2) {double* ZEROS;\
+ ZEROS=(double *)malloc((uint)(size[0]*size[0]*sizeof(double)));\
+ dzerosa(ZEROS,size[0],size[0]);\
+ zspec2a(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\
+ }
+
+
+#define c2specc2c2(in,size,out1,out2) cspec2a(in, size[0], out2, out1)
+
+#define z2specz2z2(in,size,out1,out2) zspec2a(in, size[0], out2, out1)
+
+/*Edited by Sandeep Gupta, IITB, FOSSEE Project.spec(A,B) */
+
+#define d2d2specz2(in1,size,in2,size2,out1) dspec1a(in1,in2,size[0],1,out1,NULL,NULL,NULL)
+#define d2d2specz2d2(in1,size,in2,size2,out1,out2) dspec1a(in1,in2,size[0],2,out1,out2,NULL,NULL)
+#define d2d2specz2d2z2(in1,size,in2,size2,out1,out2,out3) dspec1a(in1,in2,size[0],3,out1,out2,out3,NULL)
+#define d2d2specz2d2z2z2(in1,size,in2,size2,out1,out2,out3,out4) dspec1a(in1,in2,size[0],4,out1,out2,out3,out4)
+
+#endif /* !__INT_SPEC_H__ */
diff --git a/src/c/linearAlgebra/pbig/pbig.c b/src/c/linearAlgebra/pbig/pbig.c
new file mode 100644
index 00000000..c13a942d
--- /dev/null
+++ b/src/c/linearAlgebra/pbig/pbig.c
@@ -0,0 +1,35 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+/*This function finds the hessenberg form of a matrix A.*/
+
+#include "schur.h"
+#include <stdio.h>
+#include "string.h"
+#include "stdlib.h"
+#include "lapack.h"
+
+//Projection on eigensubspace associated with eigenvalues
+//with real part >= thres (flag='c') or with modulus >= thres (flag='d')
+//Projection is defined by Q*M. Eigenvalues of M*A*Q = eigenvalues
+//of A with real part >= thres (case 'c',...).
+//If [Q1,M1]== full rank factorization (fullrf) of eye-Q*M then evals of
+// M1*A*Q1 = evals of A with real part < thres (case 'c',...).
+// See also psmall.
+//!
+
+void dpbiga(double *in1,int N,double *in2,double *in3,double *out1,double *out2){
+
+
+
+
+}
diff --git a/src/c/linearAlgebra/schur/zgschura.c b/src/c/linearAlgebra/schur/zgschura.c
new file mode 100644
index 00000000..a49cbe51
--- /dev/null
+++ b/src/c/linearAlgebra/schur/zgschura.c
@@ -0,0 +1,164 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+/*Fucntion to find generalised schur decomposition of given square complex matrices */
+
+#include "schur.h"
+#include "lapack.h"
+#include "stdlib.h"
+#include "string.h"
+#include <math.h>
+#include "doubleComplex.h"
+#include "matrixTranspose.h"
+
+/*flag --> 0: nothing
+ --> 1: continuous
+ --> 2: discrete
+*/
+
+lapack_logical selctg21( doubleComplex* in1, doubleComplex* in2, doubleComplex* in3);
+lapack_logical selctg22( doubleComplex* in1, doubleComplex* in2, doubleComplex* in3);
+
+doubleComplex dgschura(doubleComplex* in1, int size, doubleComplex* in2, int flag, int nout, \
+ doubleComplex* out1, doubleComplex* out2, doubleComplex* out3, doubleComplex* out4)
+{
+ char JOBVSL = 'N';
+ char JOBVSR = 'N';
+ char SORT = 'N';
+ int SDIM = 0;
+ int LDVSL = size, LDVSR = size;
+ int LWORK = 2*size, INFO;
+ doubleComplex *ALPHA, *BETA, *VSL, *VSR, *WORK;
+ double *RWORK;
+ int *BWORK;
+ doubleComplex ret = 0;
+ doubleComplex *buf1, *buf2; /*input is copied to buf, since lapack function directly
+ modifies the input variable*/
+
+ /*Used incase of flag > 0*/
+ LAPACK_D_SELECT3 selctg = &selctg21;
+
+ if(nout >= 2){
+ JOBVSL = 'V';
+ JOBVSR = 'V';
+ }
+ if(flag > 0) SORT = 'S';
+
+ buf1 = (doubleComplex*) malloc((doubleComplex) size*size*sizeof(doubleComplex));
+ buf2 = (doubleComplex*) malloc((doubleComplex) size*size*sizeof(doubleComplex));
+ ALPHA = (doubleComplex*) malloc((doubleComplex) size*sizeof(doubleComplex));
+ RWORK = (double *)malloc((double)8*size*sizeof(double));
+ BETA = (doubleComplex*) malloc((doubleComplex) size*sizeof(doubleComplex));
+ VSL = (doubleComplex*) malloc((doubleComplex) LDVSL*size*sizeof(doubleComplex));
+ VSR = (doubleComplex*) malloc((doubleComplex) LDVSR*size*sizeof(doubleComplex));
+ WORK = (doubleComplex*) malloc((doubleComplex) LWORK*sizeof(doubleComplex));
+ BWORK = (int*) malloc((doubleComplex) size*sizeof(doubleComplex));
+
+
+ memcpy(buf1,in1,size*size*sizeof(doubleComplex));
+ memcpy(buf2,in2,size*size*sizeof(doubleComplex));
+
+ zgges_(&JOBVSL,&JOBVSR,&SORT,selctg,&size,buf1,&size,buf2,&size,&SDIM, \
+ ALPHA,BETA,VSL,&LDVSL,VSR,&LDVSR,WORK,&LWORK,RWORK,BWORK,&INFO);
+
+ /*if (INFO != 0)
+ {
+ out1 = NULL;
+ return 0;
+ }*/
+
+ if(nout == 1)
+ {
+ return(SDIM);
+ }
+ else if(nout == 2)
+ {
+ if(flag == 0)
+ {
+ /*copy in1 to out1 and in2 to out2*/
+ memcpy(out1,buf1,size*size*sizeof(doubleComplex));
+ memcpy(out2,buf2,size*size*sizeof(doubleComplex));
+ }
+ else
+ {
+ /*copy VSR to out1 and return SDIM */
+ memcpy(out1,VSR,size*size*sizeof(doubleComplex));
+ ret = SDIM;
+ }
+ }
+ else if(nout == 3)
+ {
+ /*copy VSL to out1, VSR to out2, return SDIM*/
+ memcpy(out1,VSL,size*size*sizeof(doubleComplex));
+ memcpy(out2,VSR,size*size*sizeof(doubleComplex));
+ ret = SDIM;
+ }
+ else if(nout == 4)
+ {
+ if(flag == 0)
+ {
+ /*copy in1 to out1 and in2 to out2*/
+ memcpy(out1,buf1,size*size*sizeof(doubleComplex));
+ memcpy(out2,buf2,size*size*sizeof(doubleComplex));
+ /*copy VSL to out3 and VSR to out4*/
+ memcpy(out3,VSL,size*size*sizeof(doubleComplex));
+ memcpy(out4,VSR,size*size*sizeof(doubleComplex));
+ }
+ else
+ {
+ /*copy in1 to out1 and in2 to out2*/
+ memcpy(out1,buf1,size*size*sizeof(doubleComplex));
+ memcpy(out2,buf2,size*size*sizeof(doubleComplex));
+ /*copy VSR to out3 and return SDIM*/
+ memcpy(out3,VSR,size*size*sizeof(doubleComplex));
+ ret = SDIM;
+ }
+ }
+ else /*nout = 5*/
+ {
+ /*copy in1 to out1 and in2 to out2*/
+ memcpy(out1,buf1,size*size*sizeof(doubleComplex));
+ memcpy(out2,buf2,size*size*sizeof(doubleComplex));
+ /*copy VSL to out3 and VSR to out4*/
+ memcpy(out3,VSL,size*size*sizeof(doubleComplex));
+ memcpy(out4,VSR,size*size*sizeof(doubleComplex));
+ /*return SDIM*/
+ ret = SDIM;
+ }
+
+ free(buf1);
+ free(buf2);
+ free(VSL);
+ free(VSR);
+ free(ALPHA);
+ free(BETA);
+ free(WORK);
+ free(BWORK);
+
+ return ret;
+}
+
+lapack_logical selctg21(doubleComplex* in1, doubleComplex* in2, doubleComplex* in3)
+{
+ if((sqrt(*in1**in1+*in2**in2)/ *in3) < 1)
+ return 1;
+ else
+ return 0;
+}
+
+lapack_logical selctg22(doubleComplex* in1, doubleComplex* in2, doubleComplex* in3)
+{
+ if((sqrt(*in1**in1+*in2**in2)/ *in3) < 1)
+ return 1;
+ else
+ return 0;
+}
diff --git a/src/c/linearAlgebra/spec/Makefile.am b/src/c/linearAlgebra/spec/Makefile.am
new file mode 100644
index 00000000..90dbd0aa
--- /dev/null
+++ b/src/c/linearAlgebra/spec/Makefile.am
@@ -0,0 +1,70 @@
+##
+## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+##
+## 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
+##
+##
+
+libSpec_la_CFLAGS = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+
+instdir = $(top_builddir)/lib
+
+pkglib_LTLIBRARIES = libSpec.la
+
+HEAD = ../includes/spec.h
+
+libSpec_la_SOURCES = $(HEAD) \
+ sspeca.c \
+ dspeca.c \
+ cspeca.c \
+ zspeca.c
+
+
+############
+## CHECK
+############
+
+
+check_PROGRAMS = testDoubleSpec testFloatSpec
+
+check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \
+ $(top_builddir)/src/c/type/libFloatComplex.la \
+ $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \
+ $(top_builddir)/src/fortran/lapack/libscilapack.la \
+ $(top_builddir)/src/fortran/blas/libsciblas.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \
+ $(top_builddir)/src/c/operations/addition/libAddition.la \
+ $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \
+ $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la\
+ $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\
+ libSpec.la
+
+check_INCLUDES = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+testDoubleSpec_SOURCES = testDoubleSpec.c
+testDoubleSpec_LDADD = $(check_LDADD)
+testDoubleSpec_CFLAGS = $(check_INCLUDES)
+
+testFloatSpec_SOURCES = testFloatSpec.c
+testFloatSpec_LDADD = $(check_LDADD)
+testFloatSpec_CFLAGS = $(check_INCLUDES)
+
+TESTS = testDoubleSpec testFloatSpec
+
diff --git a/src/c/linearAlgebra/spec/Makefile.in b/src/c/linearAlgebra/spec/Makefile.in
new file mode 100644
index 00000000..9c34c9e6
--- /dev/null
+++ b/src/c/linearAlgebra/spec/Makefile.in
@@ -0,0 +1,755 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = testDoubleSpec$(EXEEXT) testFloatSpec$(EXEEXT)
+TESTS = testDoubleSpec$(EXEEXT) testFloatSpec$(EXEEXT)
+subdir = src/c/matrixOperations/spec
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+libSpec_la_LIBADD =
+am__objects_1 =
+am_libSpec_la_OBJECTS = $(am__objects_1) libSpec_la-sspeca.lo \
+ libSpec_la-dspeca.lo libSpec_la-cspeca.lo libSpec_la-zspeca.lo
+libSpec_la_OBJECTS = $(am_libSpec_la_OBJECTS)
+libSpec_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSpec_la_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testDoubleSpec_OBJECTS = testDoubleSpec-testDoubleSpec.$(OBJEXT)
+testDoubleSpec_OBJECTS = $(am_testDoubleSpec_OBJECTS)
+testDoubleSpec_DEPENDENCIES = $(check_LDADD)
+testDoubleSpec_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSpec_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatSpec_OBJECTS = testFloatSpec-testFloatSpec.$(OBJEXT)
+testFloatSpec_OBJECTS = $(am_testFloatSpec_OBJECTS)
+testFloatSpec_DEPENDENCIES = $(check_LDADD)
+testFloatSpec_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSpec_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libSpec_la_SOURCES) $(testDoubleSpec_SOURCES) \
+ $(testFloatSpec_SOURCES)
+DIST_SOURCES = $(libSpec_la_SOURCES) $(testDoubleSpec_SOURCES) \
+ $(testFloatSpec_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBMATH = @LIBMATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libSpec_la_CFLAGS = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+instdir = $(top_builddir)/lib
+pkglib_LTLIBRARIES = libSpec.la
+HEAD = ../includes/spec.h
+libSpec_la_SOURCES = $(HEAD) \
+ sspeca.c \
+ dspeca.c \
+ cspeca.c \
+ zspeca.c
+
+check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \
+ $(top_builddir)/src/c/type/libFloatComplex.la \
+ $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \
+ $(top_builddir)/src/fortran/lapack/libscilapack.la \
+ $(top_builddir)/src/fortran/blas/libsciblas.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \
+ $(top_builddir)/src/c/operations/addition/libAddition.la \
+ $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \
+ $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la\
+ $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\
+ libSpec.la
+
+check_INCLUDES = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+testDoubleSpec_SOURCES = testDoubleSpec.c
+testDoubleSpec_LDADD = $(check_LDADD)
+testDoubleSpec_CFLAGS = $(check_INCLUDES)
+testFloatSpec_SOURCES = testFloatSpec.c
+testFloatSpec_LDADD = $(check_LDADD)
+testFloatSpec_CFLAGS = $(check_INCLUDES)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/spec/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/c/matrixOperations/spec/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libSpec.la: $(libSpec_la_OBJECTS) $(libSpec_la_DEPENDENCIES)
+ $(libSpec_la_LINK) -rpath $(pkglibdir) $(libSpec_la_OBJECTS) $(libSpec_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+testDoubleSpec$(EXEEXT): $(testDoubleSpec_OBJECTS) $(testDoubleSpec_DEPENDENCIES)
+ @rm -f testDoubleSpec$(EXEEXT)
+ $(testDoubleSpec_LINK) $(testDoubleSpec_OBJECTS) $(testDoubleSpec_LDADD) $(LIBS)
+testFloatSpec$(EXEEXT): $(testFloatSpec_OBJECTS) $(testFloatSpec_DEPENDENCIES)
+ @rm -f testFloatSpec$(EXEEXT)
+ $(testFloatSpec_LINK) $(testFloatSpec_OBJECTS) $(testFloatSpec_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec_la-cspeca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec_la-dspeca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec_la-sspeca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec_la-zspeca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSpec-testDoubleSpec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSpec-testFloatSpec.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libSpec_la-sspeca.lo: sspeca.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -MT libSpec_la-sspeca.lo -MD -MP -MF $(DEPDIR)/libSpec_la-sspeca.Tpo -c -o libSpec_la-sspeca.lo `test -f 'sspeca.c' || echo '$(srcdir)/'`sspeca.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec_la-sspeca.Tpo $(DEPDIR)/libSpec_la-sspeca.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sspeca.c' object='libSpec_la-sspeca.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -c -o libSpec_la-sspeca.lo `test -f 'sspeca.c' || echo '$(srcdir)/'`sspeca.c
+
+libSpec_la-dspeca.lo: dspeca.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -MT libSpec_la-dspeca.lo -MD -MP -MF $(DEPDIR)/libSpec_la-dspeca.Tpo -c -o libSpec_la-dspeca.lo `test -f 'dspeca.c' || echo '$(srcdir)/'`dspeca.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec_la-dspeca.Tpo $(DEPDIR)/libSpec_la-dspeca.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dspeca.c' object='libSpec_la-dspeca.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -c -o libSpec_la-dspeca.lo `test -f 'dspeca.c' || echo '$(srcdir)/'`dspeca.c
+
+libSpec_la-cspeca.lo: cspeca.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -MT libSpec_la-cspeca.lo -MD -MP -MF $(DEPDIR)/libSpec_la-cspeca.Tpo -c -o libSpec_la-cspeca.lo `test -f 'cspeca.c' || echo '$(srcdir)/'`cspeca.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec_la-cspeca.Tpo $(DEPDIR)/libSpec_la-cspeca.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cspeca.c' object='libSpec_la-cspeca.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -c -o libSpec_la-cspeca.lo `test -f 'cspeca.c' || echo '$(srcdir)/'`cspeca.c
+
+libSpec_la-zspeca.lo: zspeca.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -MT libSpec_la-zspeca.lo -MD -MP -MF $(DEPDIR)/libSpec_la-zspeca.Tpo -c -o libSpec_la-zspeca.lo `test -f 'zspeca.c' || echo '$(srcdir)/'`zspeca.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec_la-zspeca.Tpo $(DEPDIR)/libSpec_la-zspeca.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zspeca.c' object='libSpec_la-zspeca.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec_la_CFLAGS) $(CFLAGS) -c -o libSpec_la-zspeca.lo `test -f 'zspeca.c' || echo '$(srcdir)/'`zspeca.c
+
+testDoubleSpec-testDoubleSpec.o: testDoubleSpec.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec_CFLAGS) $(CFLAGS) -MT testDoubleSpec-testDoubleSpec.o -MD -MP -MF $(DEPDIR)/testDoubleSpec-testDoubleSpec.Tpo -c -o testDoubleSpec-testDoubleSpec.o `test -f 'testDoubleSpec.c' || echo '$(srcdir)/'`testDoubleSpec.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSpec-testDoubleSpec.Tpo $(DEPDIR)/testDoubleSpec-testDoubleSpec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSpec.c' object='testDoubleSpec-testDoubleSpec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec_CFLAGS) $(CFLAGS) -c -o testDoubleSpec-testDoubleSpec.o `test -f 'testDoubleSpec.c' || echo '$(srcdir)/'`testDoubleSpec.c
+
+testDoubleSpec-testDoubleSpec.obj: testDoubleSpec.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec_CFLAGS) $(CFLAGS) -MT testDoubleSpec-testDoubleSpec.obj -MD -MP -MF $(DEPDIR)/testDoubleSpec-testDoubleSpec.Tpo -c -o testDoubleSpec-testDoubleSpec.obj `if test -f 'testDoubleSpec.c'; then $(CYGPATH_W) 'testDoubleSpec.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSpec.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSpec-testDoubleSpec.Tpo $(DEPDIR)/testDoubleSpec-testDoubleSpec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSpec.c' object='testDoubleSpec-testDoubleSpec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec_CFLAGS) $(CFLAGS) -c -o testDoubleSpec-testDoubleSpec.obj `if test -f 'testDoubleSpec.c'; then $(CYGPATH_W) 'testDoubleSpec.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSpec.c'; fi`
+
+testFloatSpec-testFloatSpec.o: testFloatSpec.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec_CFLAGS) $(CFLAGS) -MT testFloatSpec-testFloatSpec.o -MD -MP -MF $(DEPDIR)/testFloatSpec-testFloatSpec.Tpo -c -o testFloatSpec-testFloatSpec.o `test -f 'testFloatSpec.c' || echo '$(srcdir)/'`testFloatSpec.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSpec-testFloatSpec.Tpo $(DEPDIR)/testFloatSpec-testFloatSpec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSpec.c' object='testFloatSpec-testFloatSpec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec_CFLAGS) $(CFLAGS) -c -o testFloatSpec-testFloatSpec.o `test -f 'testFloatSpec.c' || echo '$(srcdir)/'`testFloatSpec.c
+
+testFloatSpec-testFloatSpec.obj: testFloatSpec.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec_CFLAGS) $(CFLAGS) -MT testFloatSpec-testFloatSpec.obj -MD -MP -MF $(DEPDIR)/testFloatSpec-testFloatSpec.Tpo -c -o testFloatSpec-testFloatSpec.obj `if test -f 'testFloatSpec.c'; then $(CYGPATH_W) 'testFloatSpec.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSpec.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSpec-testFloatSpec.Tpo $(DEPDIR)/testFloatSpec-testFloatSpec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSpec.c' object='testFloatSpec-testFloatSpec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec_CFLAGS) $(CFLAGS) -c -o testFloatSpec-testFloatSpec.obj `if test -f 'testFloatSpec.c'; then $(CYGPATH_W) 'testFloatSpec.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSpec.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkglibLTLIBRARIES install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-pkglibLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/c/linearAlgebra/spec/cspeca.c b/src/c/linearAlgebra/spec/cspeca.c
new file mode 100644
index 00000000..a2b6548b
--- /dev/null
+++ b/src/c/linearAlgebra/spec/cspeca.c
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+
+
+
+void cspeca(floatComplex* in, int rows, floatComplex* out){
+ /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex
+ and the doubleComplex output of dspeca into floatComplex*/
+
+ int i;
+ doubleComplex* dblin;
+ doubleComplex* dblout;
+
+ dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex));
+ dblout=(doubleComplex*)malloc((unsigned int)rows*sizeof(doubleComplex));
+
+ for (i=0;i<rows*rows;i++) dblin[i]=DoubleComplex((double)creals(in[i]),(double)cimags(in[i]));
+
+ zspeca(dblin,rows,dblout);
+
+ for (i=0;i<rows;i++) out[i]=FloatComplex((float)zreals(dblout[i]),(float)zimags(dblout[i]));
+}
diff --git a/src/c/linearAlgebra/spec/dspec1a.c b/src/c/linearAlgebra/spec/dspec1a.c
new file mode 100644
index 00000000..28440be6
--- /dev/null
+++ b/src/c/linearAlgebra/spec/dspec1a.c
@@ -0,0 +1,176 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+/*This function finds the hessenberg form of a matrix A.*/
+
+#include "spec.h"
+#include <stdio.h>
+#include "string.h"
+#include "stdlib.h"
+#include "lapack.h"
+#include "matrixTranspose.h"
+#include "matrixMultiplication.h"
+#include "doubleComplex.h"
+
+extern int dggev_(char *,char *,int *,double *,int *,double *,int *,double *,double *,double *,double *,int *,double *,int *,double *,int *,int *);
+
+void assembleEigenvectorsInPlace(int N,double *ALPHAI,double *EVreal,double *EVimg){
+ int j,i;
+ j=0;
+ while(j<N){
+ if(ALPHAI[j] == 0){
+ //printf(" * ");
+ j+=1;
+ }
+ else{
+ int ij;
+ int ij1;
+ for(i=0;i<N;i++){
+ ij = i+j*N;
+ ij1 = i+(j+1)*N;
+ EVimg[ij] = EVreal[ij1];
+ EVimg[ij1] = -EVreal[ij1];
+ EVreal[ij1] = EVreal[ij];
+ }
+ j+=2;
+ }
+ }
+}
+
+void dspec1a(double *in1,double *in2,int size,int nout,doubleComplex *out1,double *out2,doubleComplex *out3,doubleComplex *out4){
+
+ int i,j;
+ char JOBVL;
+ char JOBVR;
+ int N=size;
+
+ double *A;
+ int LDA=N;
+ A = (double *)malloc(N*N*sizeof(double));
+ memcpy(A,in1,N*N*sizeof(double));
+
+ double *B;
+ int LDB=N;
+ B = (double *)malloc(N*N*sizeof(double));
+ memcpy(B,in2,N*N*sizeof(double));
+
+ double *ALPHAR;
+ ALPHAR = (double *)malloc(N*sizeof(double));
+
+ double *ALPHAI;
+ ALPHAI = (double *)malloc(N*sizeof(double));
+
+ double *BETA;
+ BETA = (double *)malloc(N*sizeof(double));
+
+ double *VL;
+ VL = (double *)malloc(N*N*sizeof(double));
+
+ int LDVL=N;
+
+ double *VR;
+ VR = (double *)malloc(N*N*sizeof(double));
+ int LDVR=N;
+
+ int LWORK=8*N;
+
+ double *WORK;
+ WORK = (double *)malloc(LWORK*sizeof(double));
+
+ int INFO;
+ if(nout == 1){ /*out1 = spec(A,B)*/
+ JOBVL = 'N';
+ JOBVR = 'N';
+ dggev_(&JOBVL,&JOBVR,&N,A,&LDA,B,&LDB,ALPHAR,ALPHAI,BETA,VL,&LDVL,VR,&LDVR,WORK,&LWORK,&INFO);
+ for(i=0;i<N;i++){
+ out1[i] = DoubleComplex(ALPHAR[i]/BETA[i],ALPHAI[i]/BETA[i]);
+ }
+ }
+ else if(nout == 2){ /*[out1,out2] = spec(A,B)*/
+ JOBVL = 'N';
+ JOBVR = 'N';
+ dggev_(&JOBVL,&JOBVR,&N,A,&LDA,B,&LDB,ALPHAR,ALPHAI,BETA,VL,&LDVL,VR,&LDVR,WORK,&LWORK,&INFO);
+ for(i=0;i<N;i++){
+ out1[i] = DoubleComplex(ALPHAR[i],ALPHAI[i]);
+ }
+ memcpy(out2,BETA,N*sizeof(double));
+ }
+ else if(nout == 3){ /* [out1,out2,out3] = spec(A,B) */
+ JOBVL = 'N';
+ JOBVR = 'V';
+ dggev_(&JOBVL,&JOBVR,&N,A,&LDA,B,&LDB,ALPHAR,ALPHAI,BETA,VL,&LDVL,VR,&LDVR,WORK,&LWORK,&INFO);
+ for(i=0;i<N;i++){
+ out1[i] = DoubleComplex(ALPHAR[i],ALPHAI[i]);
+ }
+ memcpy(out2,BETA,N*sizeof(double));
+
+ /*Because lapack routine doesn't give result in actual format, \
+ so we have to change the VR little-bit and then return the function */
+
+ /*See the Scilab code || see the lapack subroutine libary - DGGEV where \
+ it is very explantory and explains all this.
+ */
+ double *EVimg;
+ EVimg = (double *)malloc(N*N*sizeof(double));
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ EVimg[i+j*N] = 0;
+ }
+ }
+ assembleEigenvectorsInPlace(N,ALPHAI,VR,EVimg);
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ out3[i+j*N] = DoubleComplex(VR[i+j*N],EVimg[i+j*N]);
+ }
+ }
+ }
+ else if(nout == 4){
+ JOBVL = 'V';
+ JOBVR = 'V';
+
+ dggev_(&JOBVL,&JOBVR,&N,A,&LDA,B,&LDB,ALPHAR,ALPHAI,BETA,VL,&LDVL,VR,&LDVR,WORK,&LWORK,&INFO);
+
+ for(i=0;i<N;i++){
+ out1[i] = DoubleComplex(ALPHAR[i],ALPHAI[i]);
+ }
+
+ memcpy(out2,BETA,N*sizeof(double));
+
+ double *EVimg;
+ EVimg = (double *)malloc(N*N*sizeof(double));
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ EVimg[i+j*N] = 0;
+ }
+ }
+ assembleEigenvectorsInPlace(N,ALPHAI,VR,EVimg);
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ out4[i+j*N] = DoubleComplex(VR[i+j*N],EVimg[i+j*N]);
+ }
+ }
+
+ double *EVimg1;
+ EVimg1 = (double *)malloc(N*N*sizeof(double));
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ EVimg1[i+j*N] = 0;
+ }
+ }
+ assembleEigenvectorsInPlace(N,ALPHAI,VL,EVimg1);
+ for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ out3[i+j*N] = DoubleComplex(VL[i+j*N],EVimg1[i+j*N]);
+ }
+ }
+ }
+}
diff --git a/src/c/linearAlgebra/spec/dspeca.c b/src/c/linearAlgebra/spec/dspeca.c
new file mode 100644
index 00000000..1131ecf2
--- /dev/null
+++ b/src/c/linearAlgebra/spec/dspeca.c
@@ -0,0 +1,71 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "lapack.h"
+#include "zeros.h"
+#include "max.h"
+
+void dspeca(double* in, int rows,double* out){
+ int i=0, j=0;
+ int symmetric=0;
+ int INFO=0;
+ int iWorkSize = 0;
+ double* pdblWork;
+ double* outReal;
+ double* outImag;
+ double* pdblLeftvectors;
+ double* pdblRightvectors;
+ double* inCopy;
+
+ inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double));
+ outReal = (double*)malloc((unsigned int)rows * sizeof(double));
+ outImag = (double*)malloc((unsigned int)rows * sizeof(double));
+ pdblLeftvectors=NULL;
+ pdblRightvectors=NULL;
+
+
+ iWorkSize = 3*rows;
+ pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double));
+
+ for(i=0;i<rows*rows;i++) inCopy[i]=in[i];
+ /* look if the matrix is symmetric */
+ for (i=0;i<rows;i++)
+ for (j=0;j<rows;j++)
+ if (in[i*rows+j]!=in[i+j*rows]) break;
+
+ /* the matrix is symmetric if the 2 loops goes to end i.e
+ i==rows and j==rows */
+ if ((i==rows)&&(j==rows)) symmetric=1;
+
+
+ /* apply lapack function according to symmetry */
+ if(symmetric){
+ C2F(dsyev)( "N", "U", &rows, in, &rows, outReal, pdblWork, &iWorkSize, &INFO );
+ }
+ else {
+ C2F(dgeev)( "N", "N", &rows, inCopy, &rows, outReal, outImag,
+ pdblLeftvectors, &rows, pdblRightvectors, &rows, pdblWork, &iWorkSize, &INFO );
+ }
+
+ for (i=0;i<rows;i++) out[i]=outReal[i];
+
+
+ free(inCopy);
+ free(outReal);
+ free(outImag);
+ free(pdblWork);
+ free(pdblLeftvectors);
+ free(pdblRightvectors);
+}
+
diff --git a/src/c/linearAlgebra/spec/sspeca.c b/src/c/linearAlgebra/spec/sspeca.c
new file mode 100644
index 00000000..50751a29
--- /dev/null
+++ b/src/c/linearAlgebra/spec/sspeca.c
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+
+
+
+void sspeca(float* in, int rows, float* out){
+ /* As we use Lapack to find the eigenvalues, we must cast the float input into double
+ and the doubleComplex output of dspeca into floatComplex*/
+
+ int i;
+ double* dblin;
+ double* dblout;
+
+ dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double));
+ dblout=(double*)malloc((unsigned int)rows*sizeof(double));
+
+ for (i=0;i<rows*rows;i++) dblin[i]=(double)in[i];
+
+ dspeca(dblin,rows,dblout);
+
+ for (i=0;i<rows;i++) out[i]=(float)dblout[i];
+}
diff --git a/src/c/linearAlgebra/spec/testDoubleSpec.c b/src/c/linearAlgebra/spec/testDoubleSpec.c
new file mode 100644
index 00000000..25c88065
--- /dev/null
+++ b/src/c/linearAlgebra/spec/testDoubleSpec.c
@@ -0,0 +1,116 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "stdio.h"
+#include "assert.h"
+#include "math.h"
+
+static void dspecaTest(void){
+ double in[4]={1,1,1,3};
+ double resultR[2]={0.5857864376269050765700,3.4142135623730949234300};
+
+
+ double *out;
+
+ int i;
+
+ out=(double*)malloc((unsigned int)2*sizeof(double));
+
+ dspeca(in,2,out);
+ for(i=0;i<2;i++){
+ if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <3e-16);
+ else assert(1);
+ }
+
+}
+
+
+
+
+static void zspecaTest(void){
+ double inR[4]={1,1,1,3};
+ double inI[4]={0,0,0,0};
+ double resultR[2]={0.5857864376269050765700,3.4142135623730949234300};
+ double resultI[2]={0,0};
+
+ double in2R[4]={1,1,-2,3};
+ double in2I[4]={0,0,0,0};
+ double result2R[2]={1.9999999999999997779554,1.9999999999999997779554};
+ double result2I[2]={0.9999999999999997779554,-0.9999999999999997779554};
+
+ double in3R[16]={0.0603054538369178771973,0.631347181741148233414 ,0.0241030259057879447937,0.1527438252232968807221,
+ 0.9481177683919668197632,0.2744265575893223285675,0.4794727200642228126526,0.485576837789267301559,
+ 0.676400367170572280884,0.8321249918080866336823,0.0125875836238265037537,0.5453779897652566432953,
+ 0.8426716942340135574341,0.9029165101237595081329,0.4409482078626751899719,0.8332359003834426403046 };
+ double in3I[16]={0.7233976423740386962891,0.4377150186337530612946,0.3080607382580637931824,0.8749813153408467769623,
+ 0.5355882328003644943237 ,0.3085998897440731525421,0.3354632416740059852600,0.2342486302368342876434,
+ 0.2589411698281764984131,0.8521509231068193912506,0.4821739485487341880798,0.6095217890106141567230,
+ 0.9872822705656290054321,0.9811426815576851367950,0.3303113700821995735169,0.3589145573787391185761};
+ double result3R[4]={1.9486046375762748894545,0.2315060459861970343365,- 0.7694743345806510648188,- 0.2300808535483104266817};
+ double result3I[4]={2.1242015857341254303492,- 0.4115101262891645017561,- 0.1980716835789462781925,0.3584662621795701720195};
+
+ doubleComplex *in,*in2,*in3,out[2],out2[4];
+
+ int i;
+
+ in=DoubleComplexMatrix(inR,inI,4);
+ in2=DoubleComplexMatrix(in2R,in2I,4);
+ in3=DoubleComplexMatrix(in3R,in3I,16);
+
+ zspeca(in,2,out);
+ for(i=0;i<2;i++){
+ if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-resultR[i]) / fabs(zreals(out[i])) <3e-16);
+ else assert(1);
+ if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-resultI[i]) / fabs(zimags(out[i])) <1e-16);
+ else assert(1);
+ }
+
+
+ zspeca(in2,2,out);
+ for(i=0;i<2;i++){
+ if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-result2R[i]) / fabs(zreals(out[i])) <3e-16);
+ else assert(1);
+ if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-result2I[i]) / fabs(zimags(out[i])) <3e-15);
+ else assert(1);
+ }
+
+
+ zspeca(in3,4,out2);
+ for(i=0;i<4;i++){
+ if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-result3R[i]) / fabs(zreals(out2[i])) <3e-15);
+ else assert(1);
+ if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-result3I[i]) / fabs(zimags(out2[i])) <3e-15);
+ else assert(1);
+ }
+
+
+}
+
+
+static int testSpec(void){
+ printf(">>> Double Spec Tests <<<\n");
+ printf(">>> Double <<<\n");
+ dspecaTest();
+ printf(">>> DoubleComplex <<<\n");
+ zspecaTest();
+ return 0;
+}
+
+
+int main(void){
+ assert (testSpec()==0);
+
+
+ return 0;
+}
diff --git a/src/c/linearAlgebra/spec/testFloatSpec.c b/src/c/linearAlgebra/spec/testFloatSpec.c
new file mode 100644
index 00000000..9bd46adc
--- /dev/null
+++ b/src/c/linearAlgebra/spec/testFloatSpec.c
@@ -0,0 +1,110 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "stdio.h"
+#include "assert.h"
+#include "math.h"
+
+static void sspecaTest(void){
+ float in[4]={1.0f,1.0f,1.0f,3.0f};
+ float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f};
+
+ float in1[4]={0.0f,4.0f,1.0f,0.0f};
+ float result[2]={2.0f,-2.0f};
+
+ float in2[4]={1.0f,1.0f,-2.0f,3.0f};
+
+ float *out;
+
+ int i;
+
+ out=(float *)malloc((unsigned int)2*sizeof(float));
+
+ sspeca(in,2,out);
+ for (i=0;i<2;i++) printf("%f\n",out[i]);
+ for(i=0;i<2;i++){
+ if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <1e-16);
+ else assert(1);
+ }
+
+
+ sspeca(in1,2,out);
+ for (i=0;i<2;i++) printf("%f\n",out[i]);
+ for(i=0;i<2;i++){
+ if (out[i]>1e-16) assert( fabs(out[i]-result[i]) / fabs(out[i]) <1e-16);
+ else assert(1);
+ }
+
+ sspeca(in2,2,out);
+ for (i=0;i<2;i++) printf("%f\n",out[i]);
+
+}
+
+
+static void cspecaTest(void){
+ float inR[4]={1.0f,1.0f,1.0f,3.0f};
+ float inI[4]={0.0f,0.0f,0.0f,0.0f};
+ float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f};
+ float resultI[2]={0,0};
+
+ float in2R[4]={1.0f,1.0f,-2.0f,3.0f};
+ float in2I[4]={0.0f,0.0f,0.0f,0.0f};
+ float result2R[2]={1.9999999999999997779554f,1.9999999999999997779554f};
+ float result2I[2]={0.9999999999999997779554f,-0.9999999999999997779554f};
+
+ floatComplex *in,*in2,out[4];
+
+ int i;
+
+ in=FloatComplexMatrix(inR,inI,4);
+ in2=FloatComplexMatrix(in2R,in2I,4);
+
+ cspeca(in,2,out);
+ for(i=0;i<2;i++){
+ if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-resultR[i]) / fabs(creals(out[i])) <1e-15);
+ else assert(1);
+ if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-resultI[i]) / fabs(cimags(out[i])) <1e-16);
+ else assert(1);
+ }
+
+
+ cspeca(in2,2,out);
+ for(i=0;i<2;i++){
+ if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-result2R[i]) / fabs(creals(out[i])) <1e-15);
+ else assert(1);
+ if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-result2I[i]) / fabs(cimags(out[i])) <1e-15);
+ else assert(1);
+ }
+
+}
+
+
+
+
+static int testSpec(void){
+ printf(">>> Float Spec Tests <<<\n");
+ printf(">>> Float <<<\n");
+ sspecaTest();
+ printf(">>> FloatComplex <<<\n");
+ cspecaTest();
+ return 0;
+}
+
+
+int main(void){
+ assert (testSpec()==0);
+
+
+ return 0;
+}
diff --git a/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj b/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj
new file mode 100644
index 00000000..f696bff4
--- /dev/null
+++ b/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{651B0E61-1047-4575-BE31-D9CB28062CBA}</ProjectGuid>
+ <RootNamespace>testDoubleSpec</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSpec.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters b/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters
new file mode 100644
index 00000000..dcdaea5c
--- /dev/null
+++ b/src/c/linearAlgebra/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSpec.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj b/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj
new file mode 100644
index 00000000..0631bb40
--- /dev/null
+++ b/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B7BEF8A2-3E42-4FA3-94A7-22618594057D}</ProjectGuid>
+ <RootNamespace>testFloatSpec</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSpec.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj.filters b/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj.filters
new file mode 100644
index 00000000..2ba2e59f
--- /dev/null
+++ b/src/c/linearAlgebra/spec/test_FloatSpec/testFloatSpec.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSpec.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec/zspeca.c b/src/c/linearAlgebra/spec/zspeca.c
new file mode 100644
index 00000000..a2b1c25a
--- /dev/null
+++ b/src/c/linearAlgebra/spec/zspeca.c
@@ -0,0 +1,80 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "lapack.h"
+#include "zeros.h"
+#include "conj.h"
+
+void zspeca(doubleComplex* in, int rows,doubleComplex* out){
+ int i = 0, j = 0;
+ int hermitian = 0;
+ int INFO = 0;
+ int iWorkSize = 0;
+ doubleComplex* pdblWork;
+ doubleComplex* pdblLeftvectors;
+ doubleComplex* pdblRightvectors;
+ doubleComplex* pdblRWork;
+ double* outReal;
+ double* outImag;
+ doubleComplex* inCopy;
+
+ inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex));
+ outReal = (double*)malloc((unsigned int)rows * sizeof(double));
+ outImag = (double*)malloc((unsigned int)rows * sizeof(double));
+ pdblLeftvectors=NULL;
+ pdblRightvectors=NULL;
+
+ iWorkSize = 2*rows;
+ pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex));
+ pdblRWork = (doubleComplex*)malloc((unsigned int)(3*rows) * sizeof(doubleComplex));
+
+ for(i=0;i<rows*rows;i++) inCopy[i]=DoubleComplex(zreals(in[i]),zimags(in[i]));
+
+ /* look if the matrix is symmetric */
+ for (i=0;i<rows;i++){
+ for (j=0;j<rows;j++)
+ if ( (zreals(in[i*rows+j])!=zreals(zconjs(in[i+j*rows]))) ||
+ (zimags(in[i*rows+j])!=zimags(zconjs(in[i+j*rows]))) )
+ break;
+ if (j!=rows) break;
+ }
+
+
+ /* the matrix is symmetric if the 2 loops goes to end i.e
+ i==rows and j==rows */
+ if ((i==rows)&&(j==rows)) hermitian=1;
+
+
+ /* apply lapack function according to symmetry */
+ if(hermitian){
+ C2F(zheev)( "N", "U", &rows, inCopy, &rows, outReal, pdblWork, &iWorkSize, outImag, &INFO );
+ dzerosa(outImag,1,rows);
+ for (i=0;i<rows;i++) out[i]=DoubleComplex(outReal[i],outImag[i]);
+ }
+ else {
+ C2F(zgeev)( "N", "N", &rows, inCopy, &rows, out,
+ pdblLeftvectors, &rows, pdblRightvectors, &rows, pdblWork, &iWorkSize,
+ pdblRWork, &INFO );
+ }
+
+
+
+ free(inCopy);
+ free(outReal);
+ free(outImag);
+ free(pdblWork);
+ free(pdblRWork);
+ free(pdblLeftvectors);
+ free(pdblRightvectors);
+}
diff --git a/src/c/linearAlgebra/spec2/Makefile.am b/src/c/linearAlgebra/spec2/Makefile.am
new file mode 100644
index 00000000..5a357fa5
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/Makefile.am
@@ -0,0 +1,70 @@
+##
+## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+##
+## 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
+##
+##
+
+libSpec2_la_CFLAGS = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+
+instdir = $(top_builddir)/lib
+
+pkglib_LTLIBRARIES = libSpec2.la
+
+HEAD = ../includes/spec.h
+
+libSpec2_la_SOURCES = $(HEAD) \
+ sspec2a.c \
+ dspec2a.c \
+ cspec2a.c \
+ zspec2a.c
+
+
+############
+## CHECK
+############
+
+
+check_PROGRAMS = testDoubleSpec2 testFloatSpec2
+
+check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \
+ $(top_builddir)/src/c/type/libFloatComplex.la \
+ $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \
+ $(top_builddir)/src/fortran/lapack/libscilapack.la \
+ $(top_builddir)/src/fortran/blas/libsciblas.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \
+ $(top_builddir)/src/c/operations/addition/libAddition.la \
+ $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \
+ $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la\
+ $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\
+ libSpec2.la
+
+check_INCLUDES = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+testDoubleSpec2_SOURCES = testDoubleSpec2.c
+testDoubleSpec2_LDADD = $(check_LDADD)
+testDoubleSpec2_CFLAGS = $(check_INCLUDES)
+
+testFloatSpec2_SOURCES = testFloatSpec2.c
+testFloatSpec2_LDADD = $(check_LDADD)
+testFloatSpec2_CFLAGS = $(check_INCLUDES)
+
+TESTS = testDoubleSpec2 testFloatSpec2
+
diff --git a/src/c/linearAlgebra/spec2/Makefile.in b/src/c/linearAlgebra/spec2/Makefile.in
new file mode 100644
index 00000000..6e46c059
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/Makefile.in
@@ -0,0 +1,757 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = testDoubleSpec2$(EXEEXT) testFloatSpec2$(EXEEXT)
+TESTS = testDoubleSpec2$(EXEEXT) testFloatSpec2$(EXEEXT)
+subdir = src/c/matrixOperations/spec2
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+libSpec2_la_LIBADD =
+am__objects_1 =
+am_libSpec2_la_OBJECTS = $(am__objects_1) libSpec2_la-sspec2a.lo \
+ libSpec2_la-dspec2a.lo libSpec2_la-cspec2a.lo \
+ libSpec2_la-zspec2a.lo
+libSpec2_la_OBJECTS = $(am_libSpec2_la_OBJECTS)
+libSpec2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSpec2_la_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testDoubleSpec2_OBJECTS = \
+ testDoubleSpec2-testDoubleSpec2.$(OBJEXT)
+testDoubleSpec2_OBJECTS = $(am_testDoubleSpec2_OBJECTS)
+testDoubleSpec2_DEPENDENCIES = $(check_LDADD)
+testDoubleSpec2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSpec2_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatSpec2_OBJECTS = testFloatSpec2-testFloatSpec2.$(OBJEXT)
+testFloatSpec2_OBJECTS = $(am_testFloatSpec2_OBJECTS)
+testFloatSpec2_DEPENDENCIES = $(check_LDADD)
+testFloatSpec2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSpec2_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libSpec2_la_SOURCES) $(testDoubleSpec2_SOURCES) \
+ $(testFloatSpec2_SOURCES)
+DIST_SOURCES = $(libSpec2_la_SOURCES) $(testDoubleSpec2_SOURCES) \
+ $(testFloatSpec2_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBMATH = @LIBMATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libSpec2_la_CFLAGS = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+instdir = $(top_builddir)/lib
+pkglib_LTLIBRARIES = libSpec2.la
+HEAD = ../includes/spec.h
+libSpec2_la_SOURCES = $(HEAD) \
+ sspec2a.c \
+ dspec2a.c \
+ cspec2a.c \
+ zspec2a.c
+
+check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \
+ $(top_builddir)/src/c/type/libFloatComplex.la \
+ $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \
+ $(top_builddir)/src/fortran/lapack/libscilapack.la \
+ $(top_builddir)/src/fortran/blas/libsciblas.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \
+ $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \
+ $(top_builddir)/src/c/operations/addition/libAddition.la \
+ $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \
+ $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la\
+ $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\
+ libSpec2.la
+
+check_INCLUDES = -I $(top_builddir)/src/c/type \
+ -I $(top_builddir)/src/c/matrixOperations/includes \
+ -I $(top_builddir)/src/c/operations/includes \
+ -I $(top_builddir)/src/c/elementaryFunctions/includes\
+ -I $(top_builddir)/src/c/auxiliaryFunctions/includes
+
+testDoubleSpec2_SOURCES = testDoubleSpec2.c
+testDoubleSpec2_LDADD = $(check_LDADD)
+testDoubleSpec2_CFLAGS = $(check_INCLUDES)
+testFloatSpec2_SOURCES = testFloatSpec2.c
+testFloatSpec2_LDADD = $(check_LDADD)
+testFloatSpec2_CFLAGS = $(check_INCLUDES)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/spec2/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/c/matrixOperations/spec2/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libSpec2.la: $(libSpec2_la_OBJECTS) $(libSpec2_la_DEPENDENCIES)
+ $(libSpec2_la_LINK) -rpath $(pkglibdir) $(libSpec2_la_OBJECTS) $(libSpec2_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+testDoubleSpec2$(EXEEXT): $(testDoubleSpec2_OBJECTS) $(testDoubleSpec2_DEPENDENCIES)
+ @rm -f testDoubleSpec2$(EXEEXT)
+ $(testDoubleSpec2_LINK) $(testDoubleSpec2_OBJECTS) $(testDoubleSpec2_LDADD) $(LIBS)
+testFloatSpec2$(EXEEXT): $(testFloatSpec2_OBJECTS) $(testFloatSpec2_DEPENDENCIES)
+ @rm -f testFloatSpec2$(EXEEXT)
+ $(testFloatSpec2_LINK) $(testFloatSpec2_OBJECTS) $(testFloatSpec2_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec2_la-cspec2a.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec2_la-dspec2a.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec2_la-sspec2a.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSpec2_la-zspec2a.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSpec2-testFloatSpec2.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libSpec2_la-sspec2a.lo: sspec2a.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -MT libSpec2_la-sspec2a.lo -MD -MP -MF $(DEPDIR)/libSpec2_la-sspec2a.Tpo -c -o libSpec2_la-sspec2a.lo `test -f 'sspec2a.c' || echo '$(srcdir)/'`sspec2a.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec2_la-sspec2a.Tpo $(DEPDIR)/libSpec2_la-sspec2a.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sspec2a.c' object='libSpec2_la-sspec2a.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -c -o libSpec2_la-sspec2a.lo `test -f 'sspec2a.c' || echo '$(srcdir)/'`sspec2a.c
+
+libSpec2_la-dspec2a.lo: dspec2a.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -MT libSpec2_la-dspec2a.lo -MD -MP -MF $(DEPDIR)/libSpec2_la-dspec2a.Tpo -c -o libSpec2_la-dspec2a.lo `test -f 'dspec2a.c' || echo '$(srcdir)/'`dspec2a.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec2_la-dspec2a.Tpo $(DEPDIR)/libSpec2_la-dspec2a.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dspec2a.c' object='libSpec2_la-dspec2a.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -c -o libSpec2_la-dspec2a.lo `test -f 'dspec2a.c' || echo '$(srcdir)/'`dspec2a.c
+
+libSpec2_la-cspec2a.lo: cspec2a.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -MT libSpec2_la-cspec2a.lo -MD -MP -MF $(DEPDIR)/libSpec2_la-cspec2a.Tpo -c -o libSpec2_la-cspec2a.lo `test -f 'cspec2a.c' || echo '$(srcdir)/'`cspec2a.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec2_la-cspec2a.Tpo $(DEPDIR)/libSpec2_la-cspec2a.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cspec2a.c' object='libSpec2_la-cspec2a.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -c -o libSpec2_la-cspec2a.lo `test -f 'cspec2a.c' || echo '$(srcdir)/'`cspec2a.c
+
+libSpec2_la-zspec2a.lo: zspec2a.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -MT libSpec2_la-zspec2a.lo -MD -MP -MF $(DEPDIR)/libSpec2_la-zspec2a.Tpo -c -o libSpec2_la-zspec2a.lo `test -f 'zspec2a.c' || echo '$(srcdir)/'`zspec2a.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSpec2_la-zspec2a.Tpo $(DEPDIR)/libSpec2_la-zspec2a.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zspec2a.c' object='libSpec2_la-zspec2a.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSpec2_la_CFLAGS) $(CFLAGS) -c -o libSpec2_la-zspec2a.lo `test -f 'zspec2a.c' || echo '$(srcdir)/'`zspec2a.c
+
+testDoubleSpec2-testDoubleSpec2.o: testDoubleSpec2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec2_CFLAGS) $(CFLAGS) -MT testDoubleSpec2-testDoubleSpec2.o -MD -MP -MF $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Tpo -c -o testDoubleSpec2-testDoubleSpec2.o `test -f 'testDoubleSpec2.c' || echo '$(srcdir)/'`testDoubleSpec2.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Tpo $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSpec2.c' object='testDoubleSpec2-testDoubleSpec2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec2_CFLAGS) $(CFLAGS) -c -o testDoubleSpec2-testDoubleSpec2.o `test -f 'testDoubleSpec2.c' || echo '$(srcdir)/'`testDoubleSpec2.c
+
+testDoubleSpec2-testDoubleSpec2.obj: testDoubleSpec2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec2_CFLAGS) $(CFLAGS) -MT testDoubleSpec2-testDoubleSpec2.obj -MD -MP -MF $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Tpo -c -o testDoubleSpec2-testDoubleSpec2.obj `if test -f 'testDoubleSpec2.c'; then $(CYGPATH_W) 'testDoubleSpec2.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSpec2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Tpo $(DEPDIR)/testDoubleSpec2-testDoubleSpec2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSpec2.c' object='testDoubleSpec2-testDoubleSpec2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSpec2_CFLAGS) $(CFLAGS) -c -o testDoubleSpec2-testDoubleSpec2.obj `if test -f 'testDoubleSpec2.c'; then $(CYGPATH_W) 'testDoubleSpec2.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSpec2.c'; fi`
+
+testFloatSpec2-testFloatSpec2.o: testFloatSpec2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec2_CFLAGS) $(CFLAGS) -MT testFloatSpec2-testFloatSpec2.o -MD -MP -MF $(DEPDIR)/testFloatSpec2-testFloatSpec2.Tpo -c -o testFloatSpec2-testFloatSpec2.o `test -f 'testFloatSpec2.c' || echo '$(srcdir)/'`testFloatSpec2.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSpec2-testFloatSpec2.Tpo $(DEPDIR)/testFloatSpec2-testFloatSpec2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSpec2.c' object='testFloatSpec2-testFloatSpec2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec2_CFLAGS) $(CFLAGS) -c -o testFloatSpec2-testFloatSpec2.o `test -f 'testFloatSpec2.c' || echo '$(srcdir)/'`testFloatSpec2.c
+
+testFloatSpec2-testFloatSpec2.obj: testFloatSpec2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec2_CFLAGS) $(CFLAGS) -MT testFloatSpec2-testFloatSpec2.obj -MD -MP -MF $(DEPDIR)/testFloatSpec2-testFloatSpec2.Tpo -c -o testFloatSpec2-testFloatSpec2.obj `if test -f 'testFloatSpec2.c'; then $(CYGPATH_W) 'testFloatSpec2.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSpec2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSpec2-testFloatSpec2.Tpo $(DEPDIR)/testFloatSpec2-testFloatSpec2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSpec2.c' object='testFloatSpec2-testFloatSpec2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSpec2_CFLAGS) $(CFLAGS) -c -o testFloatSpec2-testFloatSpec2.obj `if test -f 'testFloatSpec2.c'; then $(CYGPATH_W) 'testFloatSpec2.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSpec2.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkglibLTLIBRARIES install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-pkglibLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/c/linearAlgebra/spec2/cspec2a.c b/src/c/linearAlgebra/spec2/cspec2a.c
new file mode 100644
index 00000000..d3a4312f
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/cspec2a.c
@@ -0,0 +1,36 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+
+
+
+void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors){
+ /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex
+ and the doubleComplex outputs of dspeca into floatComplex*/
+
+ int i;
+ doubleComplex* dblin;
+ doubleComplex* dbleigenvalues,*dbleigenvectors;
+
+ dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex));
+ dbleigenvalues=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex));
+ dbleigenvectors=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex));
+
+ for (i=0;i<rows*rows;i++) dblin[i]=DoubleComplex((double)creals(in[i]),(double)cimags(in[i]));
+
+ zspec2a(dblin,rows,dbleigenvalues,dbleigenvectors);
+
+ for (i=0;i<rows*rows;i++) eigenvalues[i]=FloatComplex((float)zreals(dbleigenvalues[i]),(float)zimags(dbleigenvalues[i]));
+ for (i=0;i<rows*rows;i++) eigenvectors[i]=FloatComplex((float)zreals(dbleigenvectors[i]),(float)zimags(dbleigenvectors[i]));
+}
diff --git a/src/c/linearAlgebra/spec2/dspec2a.c b/src/c/linearAlgebra/spec2/dspec2a.c
new file mode 100644
index 00000000..98b2c5ad
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/dspec2a.c
@@ -0,0 +1,113 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "lapack.h"
+#include "zeros.h"
+#include "max.h"
+
+void dspec2a(double* in, int rows,double* eigenvalues,double* eigenvectors){
+ int i=0, j=0, ij=0, ij1=0;
+ int symmetric=0;
+ int INFO=0;
+ int iWorkSize = 0;
+ double* pdblWork;
+ double* outReal;
+ double* outImag;
+ double* pdblLeftvectors;
+ double* pdblRightvectors;
+ double* inCopy;
+
+ /* FIXME : malloc here */
+ inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double));
+ outReal = (double*)malloc((unsigned int)rows * sizeof(double));
+ outImag = NULL;
+ pdblLeftvectors=NULL;
+ pdblRightvectors=NULL;
+
+
+ iWorkSize = 4*rows;
+ pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double));
+
+ for(i=0;i<rows*rows;i++) inCopy[i]=in[i];
+
+
+
+ /* look if the matrix is symmetric */
+ for (i=0;i<rows;i++){
+ for (j=0;j<rows;j++)
+ if (in[i*rows+j]!=in[i+j*rows]) break;
+ if (j!=rows) break;
+
+ }
+
+ /* the matrix is symmetric if the 2 loops goes to end i.e
+ i==rows and j==rows */
+ if ((i==rows)&&(j==rows)) symmetric=1;
+
+ /* apply lapack function according to symmetry */
+ if(symmetric){
+ C2F(dsyev)( "V", "U", &rows, inCopy, &rows, outReal, pdblWork, &iWorkSize, &INFO );
+
+ /* Computation of eigenvectors */
+ for (i=0;i<rows*rows;i++) eigenvectors[i] = inCopy[i];
+ }
+ else {
+ pdblRightvectors=(double*)malloc((unsigned int)(rows*rows) * sizeof(double));
+ outImag = (double*)malloc((unsigned int)rows * sizeof(double));
+ C2F(dgeev)( "N", "V", &rows, inCopy, &rows, outReal, outImag,
+ pdblLeftvectors, &rows, pdblRightvectors, &rows, pdblWork, &iWorkSize, &INFO );
+
+ /* Computation of eigenvectors */
+ j=0;
+ while (j<rows)
+ {
+ if (outImag[j]==0)
+ {
+ for(i = 0 ; i < rows ; i++)
+ {
+ ij = i + j * rows;
+ eigenvectors[ij] = pdblRightvectors[ij];
+ }
+ j = j + 1;
+ }
+ else
+ {
+ for(i = 0 ; i < rows ; i++)
+ {
+ ij = i + j * rows;
+ ij1 = i + (j + 1) * rows;
+ eigenvectors[ij] = pdblRightvectors[ij];
+ eigenvectors[ij1] = pdblRightvectors[ij];
+ }
+ j = j + 2;
+ }
+ }
+ }
+
+ /* Computation of eigenvalues */
+ dzerosa(eigenvalues,1,rows*rows);
+ for (i=0;i<rows;i++) eigenvalues[i+i*rows]=outReal[i];
+
+
+
+
+ free(inCopy);
+ free(outReal);
+ free(outImag);
+ free(pdblLeftvectors);
+ free(pdblRightvectors);
+ free(pdblWork);
+
+}
+
diff --git a/src/c/linearAlgebra/spec2/sspec2a.c b/src/c/linearAlgebra/spec2/sspec2a.c
new file mode 100644
index 00000000..d3ab00d5
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/sspec2a.c
@@ -0,0 +1,36 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+
+
+
+void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors){
+ /* As we use Lapack to find the eigenvalues, we must cast the float input into double
+ and the doubleComplex outputs of dspec2a into floatComplex*/
+
+ int i;
+ double* dblin;
+ double *dbleigenvalues,*dbleigenvectors;
+
+ dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double));
+ dbleigenvalues = (double*)malloc((unsigned int)(rows*rows)*sizeof(double));
+ dbleigenvectors = (double*)malloc((unsigned int)(rows*rows)*sizeof(double));
+
+ for (i=0;i<rows*rows;i++) dblin[i]=(double)in[i];
+
+ dspec2a(dblin,rows,dbleigenvalues,dbleigenvectors);
+
+ for (i=0;i<rows*rows;i++) eigenvalues[i]=(float)dbleigenvalues[i];
+ for (i=0;i<rows*rows;i++) eigenvectors[i]=(float)dbleigenvectors[i];
+}
diff --git a/src/c/linearAlgebra/spec2/testDoubleSpec2.c b/src/c/linearAlgebra/spec2/testDoubleSpec2.c
new file mode 100644
index 00000000..a090f028
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/testDoubleSpec2.c
@@ -0,0 +1,261 @@
+/*
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#include "spec.h"
+#include "stdio.h"
+#include "assert.h"
+#include "math.h"
+
+static void dspec2aTest(void){
+ double in[4]={1,1,1,3};
+ double resultValuesR[4]={0.5857864376269050765700,0,0,3.4142135623730949234300};
+ double resultVectorsR[4]={- 0.9238795325112867384831,0.3826834323650897817792,
+ 0.3826834323650897817792,0.9238795325112867384831};
+
+
+ double in2[4]={1,1,-2,3};
+ double resultValues2R[4]={1.9999999999999997779554,0,0,1.9999999999999997779554};
+ double resultVectors2R[4]={0.8164965809277261454824,- 0.4082482904638631282523,
+ 0.8164965809277261454824,- 0.4082482904638631282523};
+
+ double in3[9]={0,-1,0,1,0,0,0,0,0};
+ double resultValues3R[9]={0};
+ double resultVectors3R[9]={0.7071067811865474617150,0,0,0.7071067811865474617150,0,0,0,0,1};
+
+
+ double out1[4],out2[4],out3[9],out4[9];
+
+ int i;
+ dspec2a(in3,3,out3,out4);
+ for(i=0;i<9;i++){
+ if (out3[i]>1e-16) assert( fabs(out3[i]-resultValues3R[i]) / fabs(out3[i]) <3e-16);
+ else assert(1);
+ }
+ for(i=0;i<9;i++){
+ if (out4[i]>1e-16) assert( fabs(out4[i]-resultVectors3R[i]) / fabs(out4[i]) <3e-16);
+ else assert(1);
+ }
+
+
+ dspec2a(in,2,out1,out2);
+ for(i=0;i<4;i++) printf("%f\n",out1[i]);
+ for(i=0;i<4;i++){
+ if (out1[i]>1e-16) assert( fabs(out1[i]-resultValuesR[i]) / fabs(out1[i]) <3e-16);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectorsR[i]) / fabs(out2[i]) <3e-16);
+ else assert(1);
+ }
+
+
+ dspec2a(in2,2,out1,out2);
+
+ for(i=0;i<4;i++){
+ if (out1[i]>1e-16) assert( fabs(out1[i]-resultValues2R[i]) / fabs(out1[i]) <1e-16);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectors2R[i]) / fabs(out2[i]) <3e-16);
+ else assert(1);
+ }
+
+}
+
+
+
+
+static void zspec2aTest(void){
+ double inR[4]={1,1,1,3};
+ double inI[4]={0,0,0,0};
+ double resultValuesR[4]={0.5857864376269050765700,0,0,3.4142135623730949234300};
+ double resultValuesI[4]={0,0,0,0};
+ double resultVectorsR[4]={- 0.9238795325112867384831,0.3826834323650897817792,
+ 0.3826834323650897817792,0.9238795325112867384831};
+ double resultVectorsI[4]={0,0,0,0};
+
+ double in2R[4]={1,1,-2,3};
+ double in2I[4]={0,0,0,0};
+ double resultValues2R[4]={1.9999999999999997779554,0,0,1.9999999999999997779554};
+ double resultValues2I[4]={0.9999999999999997779554,0,0,-0.9999999999999997779554};
+ double resultVectors2R[4]={0.8164965809277261454824,- 0.4082482904638631282523,
+ 0.8164965809277261454824,- 0.4082482904638631282523};
+ double resultVectors2I[4]={0,- 0.4082482904638629062077,0,0.4082482904638629062077};
+
+
+ double in3R[16]={ 0.4685934986919164657593, 0.4262020816095173358917, 0.4217656338587403297424, 0.1034853602759540081024 ,
+ 0.4279759414494037628174, 0.7860729382373392581940, 0.8568082069978117942810, 0.1993437460623681545258 ,
+ 0.7131301630288362503052, 0.5208952468819916248322, 0.9311723159626126289368, 0.4143836158327758312225,
+ 0.5980196148157119750977, 0.5549105503596365451813, 0.8552952585741877555847, 0.3097750707529485225678};
+ double in3I[16]={0.9446128141134977340698, 0.2442680452950298786163, 0.8760446915403008460999, 0.4874215493910014629364,
+ 0.3844018988311290740967, 0.0922345430590212345123, 0.0705418726429343223572, 0.7338807261548936367035,
+ 0.7792180571705102920532, 0.7827638057060539722443, 0.2161567779257893562317, 0.3420197847299277782440,
+ 0.430093832314014434814 , 0.6261752569116652011871, 0.9554250938817858695984, 0.45415506651625037193 };
+ double resultValues3R[16]={2.0556597713281337114211 , 0. , 0. , 0. ,
+ 0. , - 0.3025728286579054682193 , 0. , 0. ,
+ 0. , 0. , 0.1432776981289703988054 , 0. ,
+ 0. , 0. , 0. , 0.59924918284561956571821};
+ double resultValues3I[16]={2.0772175543447914947137 , 0. , 0. , 0. ,
+ 0. , - 0.5223086999196728807959 , 0. , 0. ,
+ 0. , 0. , 0.3871735516160564882782 , 0. ,
+ 0. , 0. , 0. , - 0.2349232044266161556489 };
+ double resultVectors3R[16]={ 0.5762578366606958546470 , 0.4529873647084416976583 , 0.5438116534400605495137 , 0.3599855200589946457868 ,
+ - 0.3285074902800487195442, - 0.0923654569732548225147, 0.6473744750124794666846, - 0.1812302216765642182139 ,
+ 0.7395301236826927748780, - 0.4588526195219964631811, 0.0997916953568371567496, - 0.3603263850824164338249 ,
+ 0.0717862182160008133192, 0.6967198304315765922112, - 0.1153149977500917411355 , - 0.3232658081022470875077 };
+ double resultVectors3I[16]={ 0. , - 0.1082260232744242933745, - 0.1403164362264210929254 , 0.0775054168635924967123 ,
+ 0.0347047096401541868560, - 0.4780157518240965019984, 0. , 0.4493438228998393735303,
+ 0. , - 0.0484367977162360741072 , 0.0664282497469102783949 , - 0.3098340648435350952461 ,
+ 0.1768623397230159322024, 0. , - 0.4621680558325051979551 , 0.3830799998945915163517};
+
+
+ double in4R[49]={0.0292230211198329925537, 0.1069206790998578071594, 9.7463708464056253433228, 7.7042609406635165214539 , 6.3966313377022743225098, 9.5358861843124032020569, 4.1484833415597677230835,
+ 4.6615396952256560325623, 2.2384551353752613067627, 3.4569733263924717903137, 2.3406236339360475540161, 6.6193414805456995964050,2.6911795139312744140625,9.8302489006891846656799 ,
+ 7.3933512251824140548706, 2.9021358629688620567322 , 3.9959496073424816131592 , 9.792278115637600421906 , 0.0755135808140039443970, 7.0210226578637957572937 , 8.9075061306357383728027 ,
+ 6.5269742021337151527405 , 4.136228552088141441345 , 8.5816909139975905418396 , 2.3960896767675876617432 , 4.8200417729094624519348, 9.848585547879338264465 , 4.4697216479107737541199,
+ 2.3298137634992599487305, 2.2345139319077134132385, 8.0025654565542936325073, 7.7507343282923102378845, 4.8250066302716732025146, 7.8448831336572766304016 , 1.5346793178468942642212 ,
+ 7.7228771103546023368835 , 8.9520217850804328918457, 9.4673257926478981971741, 6.9818257447332143783569, 9.5591608202084898948669, 0.4840173013508319854736, 5.3235206427052617073059,
+ 2.9468670953065156936646, 6.9771366892382502555847 , 9.3762038648128509521484 , 1.0755608463659882545471 , 7.7634243946522474288940, 6.3734178384765982627869 , 0.6630615703761577606201 };
+ double in4I[49]={8.1694598542526364326477, 3.5473910067230463027954, 5.860544512979686260223, 3.4610254690051078796387, 4.4247510144487023353577, 8.8226650562137365341187, 7.6436930662021040916443 ,
+ 7.764139864593744277954, 2.8076809318736195564270, 6.9086006004363298416138, 7.1747286943718791007996, 3.7201813608407974243164 , 9.3254965776577591896057, 2.2566775511950254440308,
+ 7.5211019208654761314392 , 3.0747506581246852874756 , 5.9793261485174298286438, 1.9238903466612100601196, 2.3870888305827975273132 , 7.4708331003785133361816, 9.7131536761298775672913,
+ 4.3703553732484579086304, 6.2248750543221831321716, 3.2913279719650745391846, 3.2963873865082859992981, 2.7686371374875307083130 , 4.8729835031554102897644, 7.7320465445518493652344 ,
+ 9.0775218093767762184143, 5.0122931879013776779175, 5.1595458528026938438416, 5.79267887398600578308 , 1.5463936375454068183899 , 7.6111377868801355361938, 6.9079177780076861381531 ,
+ 2.8732293471693992614746, 9.64253133628517389297 , 5.6607243325561285018921, 5.7821379369124770164490, 2.6634209789335727691650 , 4.7470985027030110359192, 6.0735465306788682937622,
+ 0.4097307054325938224793, 5.0125684589147567749023 , 5.2959309751167893409729, 6.2594583164900541305542, 2.2193526616320013999939 , 3.467419948428869247437, 3.9511676924303174018860 };
+ double resultValues4R[49]={39.018457752476393807228 ,0,0,0,0,0,0,
+ 0,2.2455352415739073812517,0,0,0,0,0,
+ 0,0,- 8.4848591657394489828903,0,0,0,0,
+ 0,0,0,- 9.617033196016185669919,0,0,0,
+ 0,0,0,0,- 3.7815852014367528077798,0,0,
+ 0,0,0,0,0,- 4.44858427601393291440,0,
+ 0,0,0,0,0,0,- 0.3001282122401837670900};
+ double resultValues4I[49]={36.525725390582877594170,0,0,0,0,0,0,
+ 0,- 5.9058762755733944516123,0,0,0,0,0,
+ 0,0,- 3.5959527108686115681735,0,0,0,0,
+ 0,0,0,1.8928051444081777088257,0,0,0,
+ 0,0,0,0,- 3.1889864758923365251064,0,0,
+ 0,0,0,0,0,3.2418188738592150777151,0,
+ 0,0,0,0,0,0,1.5279802073147508156836};
+
+ double resultVectors4R[49]={ 0.3499995148567048852684, 0.3131141942665225941234, 0.4518966551544936205431, 0.3429358568207974133912, 0.3073919828504245721490, 0.4236868694783915145763, 0.3928739146959387973368 ,
+ 0.2654822689469810148566 , - 0.3607918093136298631762, 0.0473515544359270068586 , 0.5097969509656486986060 , -0.3771134435310480315096 , 0.2011534205484152293408, - 0.4415200724898113993078,
+ 0.5454886553461798515130, - 0.2173248800239625522224, - 0.2171708216301463378883 , - 0.2460117034233289534662 , -0.3694743444265859433351 , 0.3601018742104445391483, 0.1530612374027510713681,
+ 0.6385835932752577104310, - 0.0013906755423099548263, - 0.3368505708673739662551 , 0.1394203608831885433 , -0.2292783363046769218308 , -0.2740379414191142504187, 0.1926279946047058377889 ,
+ - 0.6106238336849327819067, 0.0128604884735820379493, 0.2248434453925002574071, - 0.0955950290268089419854 , 0.6322383898844411431739 , - 0.1362122761803175874373, - 0.0030545591332723984190,
+ 0.5431360047322275619308, 0.1304324282476526930541, - 0.3713242513274904177401, - 0.2693820083406764376299 , - 0.1431429883314006001882 , 0.0533021313694299267438, 0.0071247423818797811501 ,
+ - 0.156705245229635081738, 0.0034676864415526253982 , - 0.3351413975178426096768 , 0.2927797449896782921996 , 0.5714932440406852443005 , 0.0738366305178744797288, - 0.4509415569247051669422 };
+ double resultVectors4I[49]={ 0.0720991445669864616796 , 0.0844739028302603361942 , 0. , 0.0173431366502564965337, -0.0428710162141596462515, 0.0695226101295536302871, 0.0999385617869267273150,
+ 0.2510960793336660668018 , - 0.1123901435582568414384, 0.0091069807153507792430, 0. , - 0.2545493692188907641771, 0.1149714203529902251111, 0.0762796210842419941667,
+ 0. , 0.0611827470444509316505, 0.2295643426501567385678, - 0.2950878328821502361024, 0.198556748820033573955, 0.0646801132828138114483, - 0.2660572521172601678785,
+ 0. , 0.2688905463703794573860, 0.2230635356255223633593 , - 0.2013432448241845862391, - 0.0386922946770884290668, 0.0358963301038670995480, - 0.3593711366897305303780 ,
+ - 0.1386717901043315326337, 0.0600994116374372472356, - 0.1167558596038882207102 , 0.317965599565130263571, 0. , -0.0642522754144960878131, - 0.0853665514099945371695,
+ 0. , 0.2715431731544318272320, - 0.1184277560110737481658 , 0.3655618467608299226868, - 0.4598766797780974302512 , 0.0188698345957667955319, - 0.1446429340244405892246,
+ 0.346095581161616094867 , 0.0750882555805542639682, - 0.2494867985551498246188, - 0.2328934592128872882455, 0. , -0.0047307828167728396829, - 0.0078254955461786041004};
+
+
+
+
+ doubleComplex *in,*in2,*in3,*in4,out1[4],out2[4],out3[16],out4[16],out5[49],out6[49];
+
+ int i;
+
+ in=DoubleComplexMatrix(inR,inI,4);
+ in2=DoubleComplexMatrix(in2R,in2I,4);
+ in3=DoubleComplexMatrix(in3R,in3I,16);
+ in4=DoubleComplexMatrix(in4R,in4I,49);
+ zspec2a(in,2,out1,out2);
+
+
+ for(i=0;i<4;i++){
+ if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValuesR[i]) / fabs(zreals(out1[i])) <3e-16);
+ else assert(1);
+ if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValuesI[i]) / fabs(zimags(out1[i])) <1e-16);
+ else assert(1);
+ }
+
+ for(i=0;i<4;i++){
+ if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectorsR[i]) / fabs(zreals(out2[i])) <3e-16);
+ else assert(1);
+ if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectorsI[i]) / fabs(zimags(out2[i])) <1e-16);
+ else assert(1);
+ }
+
+
+ zspec2a(in2,2,out1,out2);
+ for(i=0;i<4;i++){
+ if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValues2R[i]) / fabs(zreals(out1[i])) <3e-16);
+ else assert(1);
+ if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValues2I[i]) / fabs(zimags(out1[i])) <3e-15);
+ else assert(1);
+ }
+
+ for(i=0;i<4;i++){
+ if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectors2R[i]) / fabs(zreals(out2[i])) <3e-16);
+ else assert(1);
+ if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectors2I[i]) / fabs(zimags(out2[i])) <3e-15);
+ else assert(1);
+ }
+
+
+
+ zspec2a(in3,4,out3,out4);
+ for(i=0;i<16;i++){
+ if (zreals(out3[i])>1e-16) assert( fabs(zreals(out3[i])-resultValues3R[i]) / fabs(zreals(out3[i])) <3e-15);
+ else assert(1);
+ if (zimags(out3[i])>1e-16) assert( fabs(zimags(out3[i])-resultValues3I[i]) / fabs(zimags(out3[i])) <3e-15);
+ else assert(1);
+ }
+ for(i=0;i<16;i++){
+ if (zreals(out4[i])>1e-16) assert( fabs(zreals(out4[i])-resultVectors3R[i]) / fabs(zreals(out4[i])) <3e-15);
+ else assert(1);
+ if (zimags(out4[i])>1e-16) assert( fabs(zimags(out4[i])-resultVectors3I[i]) / fabs(zimags(out4[i])) <3e-14);
+ else assert(1);
+ }
+
+ /* FIXME : assert : 3e-16 maybe du to little values like 0.001... */
+ zspec2a(in4,7,out5,out6);
+
+ for(i=0;i<49;i++){
+ if (zreals(out5[i])>1e-16) assert( fabs(zreals(out5[i])-resultValues4R[i]) / fabs(zreals(out5[i])) <3e-15);
+ else assert(1);
+ if (zimags(out5[i])>1e-16) assert( fabs(zimags(out5[i])-resultValues4I[i]) / fabs(zimags(out5[i])) <3e-14);
+ else assert(1);
+ }
+ for(i=0;i<49;i++){
+ if (zreals(out6[i])>1e-16) assert( fabs(zreals(out6[i])-resultVectors4R[i]) / fabs(zreals(out6[i])) <3e-14);
+ else assert(1);
+ if (zimags(out6[i])>1e-16) assert( fabs(zimags(out6[i])-resultVectors4I[i]) / fabs(zimags(out6[i])) <3e-13);
+ else assert(1);
+ }
+
+
+
+}
+
+
+static int testSpec2(void){
+ printf(">>> Double Spec2 Tests <<<\n");
+ printf(">>> Double <<<\n");
+ dspec2aTest();
+ printf(">>> DoubleComplex <<<\n");
+ zspec2aTest();
+ return 0;
+}
+
+
+int main(void){
+ assert (testSpec2()==0);
+
+
+ return 0;
+}
diff --git a/src/c/linearAlgebra/spec2/testFloatSpec2.c b/src/c/linearAlgebra/spec2/testFloatSpec2.c
new file mode 100644
index 00000000..fb2bc255
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/testFloatSpec2.c
@@ -0,0 +1,134 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#include "spec.h"
+#include "stdio.h"
+#include "assert.h"
+#include "math.h"
+
+static void sspec2aTest(void){
+ float in[4]={1.0f,1.0f,1.0f,3.0f};
+ float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f};
+ float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f,
+ 0.3826834323650897817792f,0.9238795325112867384831f};
+
+ float in2[4]={1.0f,1.0f,-2.0f,3.0f};
+ float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f};
+ float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f,
+ 0.8164965809277261454824f,- 0.4082482904638631282523f};
+ float eigenvalues[4],eigenvectors[4];
+
+ int i;
+
+ sspec2a(in,2,eigenvalues,eigenvectors);
+
+ for(i=0;i<4;i++){
+ if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValuesR[i]) / fabs(eigenvalues[i]) <1e-16);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectorsR[i]) / fabs(eigenvectors[i]) <1e-16);
+ else assert(1);
+ }
+
+
+ sspec2a(in2,2,eigenvalues,eigenvectors);
+
+
+
+ for(i=0;i<4;i++){
+ if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValues2R[i]) / fabs(eigenvalues[i]) <1e-16);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectors2R[i]) / fabs(eigenvectors[i]) <1e-16);
+ else assert(1);
+ }
+}
+
+
+
+
+static void cspec2aTest(void){
+ float inR[4]={1.0f,1.0f,1.0f,3.0f};
+ float inI[4]={0.0f,0.0f,0.0f,0.0f};
+ float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f};
+ float resultValuesI[4]={0,0,0,0};
+ float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f,
+ 0.3826834323650897817792f,0.9238795325112867384831f};
+ float resultVectorsI[4]={0,0,0,0};
+
+ float in2R[4]={1.0f,1.0f,-2.0f,3.0f};
+ float in2I[4]={0.0f,0.0f,0.0f,0.0f};
+ float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f};
+ float resultValues2I[4]={0.9999999999999997779554f,0,0,-0.9999999999999997779554f};
+ float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f,
+ 0.8164965809277261454824f,- 0.4082482904638631282523f};
+ float resultVectors2I[4]={0,- 0.4082482904638629062077f,0,0.4082482904638629062077f};
+
+ floatComplex *in,*in2,out1[4],out2[4];
+
+ int i;
+
+ in=FloatComplexMatrix(inR,inI,4);
+ in2=FloatComplexMatrix(in2R,in2I,4);
+
+ cspec2a(in,2,out1,out2);
+ for(i=0;i<4;i++){
+ if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValuesR[i]) / fabs(creals(out1[i])) <1e-15);
+ else assert(1);
+ if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValuesI[i]) / fabs(cimags(out1[i])) <1e-16);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectorsR[i]) / fabs(creals(out2[i])) <1e-15);
+ else assert(1);
+ if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectorsI[i]) / fabs(cimags(out2[i])) <1e-16);
+ else assert(1);
+ }
+
+
+ cspec2a(in2,2,out1,out2);
+ for(i=0;i<4;i++){
+ if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValues2R[i]) / fabs(creals(out1[i])) <1e-15);
+ else assert(1);
+ if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValues2I[i]) / fabs(cimags(out1[i])) <1e-15);
+ else assert(1);
+ }
+ for(i=0;i<4;i++){
+ if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectors2R[i]) / fabs(creals(out2[i])) <1e-15);
+ else assert(1);
+ if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectors2I[i]) / fabs(cimags(out2[i])) <1e-16);
+ else assert(1);
+ }
+}
+
+
+
+
+static int testSpec2(void){
+ printf(">>> Float Spec2 Tests <<<\n");
+ printf(">>> Float <<<\n");
+ sspec2aTest();
+ printf(">>> FloatComplex <<<\n");
+ cspec2aTest();
+ return 0;
+}
+
+
+int main(void){
+ assert (testSpec2()==0);
+
+
+ return 0;
+}
diff --git a/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj b/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj
new file mode 100644
index 00000000..7c36943b
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FD0A4495-C372-41EF-B8EF-0A0939DA6C1E}</ProjectGuid>
+ <RootNamespace>testDoubleSpec2</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSpec2.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters b/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters
new file mode 100644
index 00000000..04f409dc
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSpec2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj b/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj
new file mode 100644
index 00000000..f4154eb1
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E20D0BC2-B28A-412C-9715-5B93B319A4A3}</ProjectGuid>
+ <RootNamespace>testFloatSpec2</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSpec2.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters b/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters
new file mode 100644
index 00000000..0c38d2f2
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSpec2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/c/linearAlgebra/spec2/zspec2a.c b/src/c/linearAlgebra/spec2/zspec2a.c
new file mode 100644
index 00000000..e33ed897
--- /dev/null
+++ b/src/c/linearAlgebra/spec2/zspec2a.c
@@ -0,0 +1,96 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include "spec.h"
+#include "lapack.h"
+#include "zeros.h"
+#include "stdio.h"
+#include "conj.h"
+
+void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues, doubleComplex* eigenvectors){
+ int i = 0, j = 0;
+ int hermitian = 0;
+ int INFO = 0;
+ int iWorkSize = 0;
+ doubleComplex* pdblWork;
+ doubleComplex* pdblLeftvectors;
+ doubleComplex* pdblRightvectors;
+ doubleComplex* pdblRWork;
+ double* pdblRWork2;
+ double* outReal;
+ double* outImag;
+ doubleComplex* inCopy;
+
+ inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex));
+ outReal = (double*)malloc((unsigned int)rows * sizeof(double));
+ outImag = (double*)malloc((unsigned int)rows * sizeof(double));
+ pdblLeftvectors=NULL;
+ pdblRightvectors=NULL;
+
+ iWorkSize = 2*rows;
+ pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex));
+ pdblRWork = NULL;
+ pdblRWork2 = NULL;
+
+ for(i=0;i<rows*rows;i++) {
+ inCopy[i]=DoubleComplex(zreals(in[i]),zimags(in[i]));
+ eigenvectors[i]=DoubleComplex(zreals(in[i]),zimags(in[i]));
+ }
+ zzerosa(eigenvalues,1,rows*rows);
+
+
+ /* look if the matrix is symmetric */
+ for (i=0;i<rows;i++){
+ for (j=0;j<rows;j++)
+ if ( (zreals(in[i*rows+j])!=zreals(zconjs(in[i+j*rows]))) ||
+ (zimags(in[i*rows+j])!=zimags(zconjs(in[i+j*rows]))) )
+ break;
+ if (j!=rows) break;
+ }
+
+
+ /* the matrix is symmetric if the 2 loops goes to end i.e
+ i==rows and j==rows */
+ if ((i==rows)&&(j==rows)) hermitian=1;
+
+
+ /* apply lapack function according to symmetry */
+ if(hermitian){
+ pdblRWork2 = (double*)malloc((unsigned int)(3*rows) * sizeof(double));
+ C2F(zheev)( "V", "U", &rows, eigenvectors, &rows, outReal, pdblWork, &iWorkSize, pdblRWork2, &INFO );
+ dzerosa(outImag,1,rows);
+ for (i=0;i<rows;i++) eigenvalues[i+i*rows]=DoubleComplex(outReal[i],outImag[i]);
+ }
+ else {
+ pdblRWork = (doubleComplex*)malloc((unsigned int)(3*rows) * sizeof(doubleComplex));
+ C2F(zgeev)( "N", "V", &rows, inCopy, &rows, eigenvalues,
+ pdblLeftvectors, &rows, eigenvectors, &rows, pdblWork, &iWorkSize,
+ pdblRWork, &INFO );
+ for (i=1;i<rows;i++) {
+ eigenvalues[i+i*rows]=DoubleComplex(zreals(eigenvalues[i]),zimags(eigenvalues[i]));
+ eigenvalues[i]=DoubleComplex(0,0);
+ }
+ }
+
+
+
+
+ free(inCopy);
+ free(outReal);
+ free(outImag);
+ free(pdblWork);
+ free(pdblRWork);
+ free(pdblRWork2);
+ free(pdblLeftvectors);
+ free(pdblRightvectors);
+}
diff --git a/src/c/linearAlgebra/svd/zsvda.c b/src/c/linearAlgebra/svd/zsvda.c
new file mode 100644
index 00000000..0d360222
--- /dev/null
+++ b/src/c/linearAlgebra/svd/zsvda.c
@@ -0,0 +1,173 @@
+/* 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
+ Author: Sandeep Gupta
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+
+ */
+#include "svd.h"
+#include "lapack.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "string.h"
+#include "doubleComplex.h"
+#include "matrixTranspose.h"
+#include "conj.h"
+
+extern doubleComplex zgesvd_( char* , char* , int* , int* ,doubleComplex *,\
+ int* , double* ,doubleComplex* , int* ,doubleComplex* , int* ,\
+ doubleComplex* , int* , double* , int* );
+
+
+int Min(int a,int b){
+ if(a > b)
+ return b;
+ return a;
+}
+
+int Max(int a,int b){
+ if(a > b)
+ return a;
+ else
+ return b;
+}
+
+void zsvda(doubleComplex *in1,int row,int col,int in2,int nout, doubleComplex *out1,\
+ doubleComplex *out2,doubleComplex *out3){
+
+ /* Allocating memory and copying the input in buf*/
+ doubleComplex *buf;
+ buf = (doubleComplex *)malloc(row*col*sizeof(doubleComplex));
+ memcpy(buf,in1,row*col*sizeof(doubleComplex));
+
+ /* Type of variable used */
+ int i,j,k;
+ char JOBU,JOBVT;
+ int M = row;
+ int N = col;
+ int LDA,LDU,LDVT,LWORK,INFO;
+
+ /*double precision array to store Sigma*/
+ double *S;
+ S = (double *)malloc(Min(M,N)*sizeof(double));
+
+ /* amount of memory needed for work */
+ LWORK = Max(1,2*Min(M,N)+Max(M,N));
+ doubleComplex *WORK = malloc(Max(1,2*LWORK)*sizeof(doubleComplex));
+
+ double *RWORK;
+ RWORK = (double *)malloc(5*Min(M,N)*sizeof(double));
+
+ INFO = 0;
+
+ if(nout == 1){
+ JOBU = 'N';
+ JOBVT = 'N';
+ LDA = M;
+ LDU = M;
+ LDVT = N;
+ //doubleComplex *U,*VT;
+ //U = malloc(sizeof(doubleComplex));
+ //VT = malloc(sizeof(doubleComplex));
+ zgesvd_(&JOBU,&JOBVT,&M,&N,buf,&LDA,S,NULL,&LDU,NULL,&LDVT,WORK,&LWORK,RWORK,&INFO);
+
+ //memcpy(out2,S,Min(M,N)*sizeof(double));
+ for(i=0;i<Min(M,N);i++){
+ out2[i] = DoubleComplex(S[i],0);
+ //out2[i] = S[i];
+ //out2[i] = 0;
+ }
+ out1 = NULL;
+ out3 = NULL;
+ //for(i=0;i<Min(M,N);i++) printf("%lf ",S[i]);
+ //free(S);
+ }
+ else if(nout == 3){
+ if(in2 == 0 || M == N){
+ JOBU = 'A';
+ JOBVT = 'A';
+ LDA = M;
+ LDU = M;
+ LDVT = N;
+ doubleComplex *U = malloc(LDU*M*sizeof(doubleComplex));
+ doubleComplex *VT = malloc(LDVT*N*sizeof(doubleComplex));
+
+ /*doubleComplex wopt;
+ LWORK = -1;
+ zgesvd_(&JOBU,&JOBVT,&M,&N,buf,&LDA,S,U,&LDU,VT,&LDVT,&wopt,&LWORK,RWORK,&INFO);*/
+
+ //LWORK = (int)zreals(wopt);
+
+ WORK = (doubleComplex *)malloc(LWORK*sizeof(doubleComplex));
+ zgesvd_(&JOBU,&JOBVT,&M,&N,buf,&LDA,S,U,&LDU,VT,&LDVT,WORK,&LWORK,RWORK,&INFO);
+
+ memcpy(out1,U,LDU*Min(M,N)*sizeof(doubleComplex));
+ //memcpy(out3,VT,N*N*sizeof(doubleComplex));
+ for(i=0;i<N;i++){
+ for(j=i;j<N;j++){
+ out3[i+j*N] = zconjs(VT[j+i*N]);
+ out3[j+i*N] = zconjs(VT[i+j*N]);
+ }
+ }
+ //ztransposea(VT,LDVT,Min(M,N),out3);
+ /*for(i=0;i<N;i++){
+ for(j=0;j<N;j++){
+ printf("[ %lf %lf]",zreals(VT[i*N+j]),zimags(VT[i*N+j]));
+ }
+ printf("\n");
+ }*/
+ //free(U);
+ //free(VT);
+ }
+ else{
+ LDA = M;
+ LDU = M;
+ if(M > N){
+ JOBU = 'S';
+ JOBVT = 'A';
+ LDVT = N;
+ }
+ else{
+ JOBU = 'A';
+ JOBVT = 'S';
+ LDVT = Min(M,N);
+ }
+ doubleComplex *U;
+ U = malloc(LDU*Min(M,N)*sizeof(doubleComplex));
+ doubleComplex *VT;
+ VT = malloc(LDVT*N*sizeof(doubleComplex));
+ zgesvd_(&JOBU,&JOBVT,&M,&N,buf,&LDA,S,U,&LDU,VT,&LDVT,WORK,&LWORK,RWORK,&INFO);
+ memcpy(out1,U,M*Min(M,N)*sizeof(doubleComplex));
+ //ztransposea(VT,LDVT,Min(row,col),out3);
+
+ /* These lines are added to patch an error of ZGESVD */
+ /*
+ ij = i+(j-1)*N
+ ji = j+(i-1)*N
+ zstk(lV+ij-1) = conjg(zstk(lVT+ji-1))
+ zstk(lV+ji-1) = conjg(zstk(lVT+ij-1))
+ */
+ for(i=0;i<Min(M,N);i++){
+ for(j=0;j<N;j++){
+ out3[j+i*N] = zconjs(VT[i+j*Min(M,N)]);
+ }
+ }
+ //free(U);
+ //free(VT);
+ }
+ /* output from zgesvd is copied to out2 variables in required format*/
+ for(j=0;j<Min(M,N);j++){
+ for(k=0;k<Min(M,N);k++){
+ if(j == k)
+ out2[j*(Min(M,N))+k] = DoubleComplex(S[j],0);
+ else
+ out2[j*(Min(M,N))+k] = DoubleComplex(0,0);
+ }
+ }
+ }
+}
diff --git a/src/c/signalProcessing/%k/dmodka.c b/src/c/signalProcessing/%k/dmodka.c
new file mode 100644
index 00000000..c0630ec0
--- /dev/null
+++ b/src/c/signalProcessing/%k/dmodka.c
@@ -0,0 +1,97 @@
+#include<stdio.h>
+#include<math.h>
+#include "modk.h"
+double max_calc(double* ptr,int sz)
+{
+ int i=0;
+ double mx;
+ if(ptr[0]<0)
+ {
+ ptr[0]=-1*ptr[0];
+ }
+ mx=(ptr[0]);
+ //printf("%lf\n",mx);
+ for(i=1;i<sz;i++)
+ {
+ if(ptr[i]<0)
+ {
+ ptr[i]=-1*ptr[i];
+ }
+ if(mx<(ptr[i]))
+ mx=(ptr[i]);
+ }
+ return mx;
+}
+void dmodka(double* inp,int size,double* oup)
+{
+ double ones[size],PI=M_PI;
+ double eps=pow(2,-52);
+ int i;
+ for(i=0;i<size;i++)
+ {
+ ones[i]=1;
+ }
+ double a[size],b[size],c[size],an[size],bn[size],cn[size],kans[size];
+
+ int j,kk,l,m;
+ for(j=0;j<size;j++)
+ {
+ a[j]=1;
+ }
+ for(kk=0;kk<size;kk++)
+ {
+ b[kk]=sqrt(ones[kk]-inp[kk]);
+ }
+ for(l=0;l<size;l++)
+ {
+ c[l]=sqrt(inp[l]);
+
+ }
+ int x=0;
+ //double maxi;
+ //maxi=max_calc(c,size);
+ //printf("%lf",maxi);
+
+ while(max_calc(c,size)>eps)
+ {
+ int q,w,r;
+ for(q=0;q<size;q++)
+ {
+ an[q]=0.5*(a[q]+b[q]);
+ }
+ for(w=0;w<size;w++)
+ {
+ bn[w]=sqrt(a[w]*b[w]);
+ }
+ for(r=0;r<size;r++)
+ {
+ cn[r]=0.5*(a[r]-b[r]);
+ }
+ int x,y,z;
+ for(x=0;x<size;x++)
+ {
+ a[x]=an[x];
+ }
+ for(y=0;y<size;y++)
+ {
+ b[y]=bn[y];
+ }
+ for(z=0;z<size;z++)
+ {
+ c[z]=cn[z];
+ }
+ }
+ int q,w;
+ for(q=0;q<size;q++)
+ {
+ oup[q]=PI*(ones[q]/(2*a[q]));
+ }
+
+}
+/*
+int main()
+{
+ double m[3]={0.1,0.2,0.3};
+ dka(m,3);
+}
+*/
diff --git a/src/c/signalProcessing/%k/int_modk.h b/src/c/signalProcessing/%k/int_modk.h
new file mode 100644
index 00000000..ae09c50a
--- /dev/null
+++ b/src/c/signalProcessing/%k/int_modk.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_%K_H__
+#define __INT_%K_H__
+
+#define d2modkz2(inp,size,oup) dmodka(inp,size,oup)
+
+#endif /* !INT_%K_H__! */
diff --git a/src/c/signalProcessing/%k/modk.h b/src/c/signalProcessing/%k/modk.h
new file mode 100644
index 00000000..6b4a7e08
--- /dev/null
+++ b/src/c/signalProcessing/%k/modk.h
@@ -0,0 +1,29 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __%K_H__
+#define __%K_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dmodka(double* inp,int size,doubleComplex* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __%K_H__ */
+
diff --git a/src/c/signalProcessing/%sn/dmodsna.c b/src/c/signalProcessing/%sn/dmodsna.c
new file mode 100644
index 00000000..7e1e81c3
--- /dev/null
+++ b/src/c/signalProcessing/%sn/dmodsna.c
@@ -0,0 +1,24 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "modsn.h"
+
+void dmodsna(double* uu,int size,double emmc,double* sn)
+{
+ int i;
+ for(i=0;i<size;i++)
+ {
+ sn[i]=dmodsns(uu[i],emmc);
+ }
+}
+
diff --git a/src/c/signalProcessing/%sn/dmodsns.c b/src/c/signalProcessing/%sn/dmodsns.c
new file mode 100644
index 00000000..06d0a6f0
--- /dev/null
+++ b/src/c/signalProcessing/%sn/dmodsns.c
@@ -0,0 +1,93 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ Reference:- Abramowitz, Milton and Stegun, Irene A
+ Handbook of Mathematical Functions, Dover, 1965
+ Chapter 16 (Sections 16.4, 16.13 and 16.15)
+ Link for FORTRAN code:-http://www.aip.de/groups/soe/local/numres/bookfpdf/f6-11.pdf
+*/
+
+#include<stdio.h>
+#include<math.h>
+#define CA 0.0003
+#include "modsn.h"
+double dmodsns(double uu, double emmc)
+{
+ double a,b,c,d,emc,u;
+ double em[14],en[14];
+ int i,ii,l,bo;
+ double sn,cn,dn;
+ emc=1-emmc;
+ u=uu;
+ if(emc)
+ {
+ bo=(emc<0.0);
+ if(bo)
+ {
+ d=1.0-emc;
+ emc/=-1.0/d;
+ u*=(d=sqrt(d));
+ }
+ a=1.0;
+ dn=1.0;
+ for(i=1;i<=13;i++)
+ {
+ l=i;
+ em[i]=a;
+ en[i]=(emc=sqrt(emc));
+ c=0.5*(a+emc);
+ if(fabs(a-emc)<=CA*a)break;
+ emc*=a;
+ a=c;
+ }
+ u*=c;
+ sn=sin(u);
+ cn=cos(u);
+ if(sn)
+ {
+ a=cn/sn;
+ c*=a;
+ for(ii=l;ii>=1;ii--)
+ {
+ b=em[ii];
+ a*=c;
+ c*=dn;
+ dn=(en[ii]+a)/(b+a);
+ a=c/b;
+ }
+ a=1.0/sqrt(c*c+1.0);
+ sn=(sn>=0.0?a:-a);
+ cn=c*(sn);
+ }
+ if(bo)
+ {
+ a=dn;
+ dn=cn;
+ cn=a;
+ sn/=d;
+ }
+ }
+ else
+ {
+ cn=1.0/cosh(u);
+ dn=cn;
+ sn=tanh(u);
+ }
+ return sn;
+}
+/*
+int main()
+{
+ double u,k;
+ u=4;
+ k=0.7;
+ sn(u,k);
+}
+*/
diff --git a/src/c/signalProcessing/%sn/int_modsn.h b/src/c/signalProcessing/%sn/int_modsn.h
new file mode 100644
index 00000000..179fb61f
--- /dev/null
+++ b/src/c/signalProcessing/%sn/int_modsn.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_MODSN_H__
+#define __INT_MODSN_H__
+
+#define d0d0modsnd0(uu,emmc) dmodsns(uu,emmc)
+
+#endif /* !INT_MODSN_H__! */
diff --git a/src/c/signalProcessing/%sn/modsn.h b/src/c/signalProcessing/%sn/modsn.h
new file mode 100644
index 00000000..c5896562
--- /dev/null
+++ b/src/c/signalProcessing/%sn/modsn.h
@@ -0,0 +1,27 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __MODSN_H__
+#define __MODSN_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "c" {
+#endif
+
+double dmodsns(double uu, double emmc);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __MODSN_H__ */
diff --git a/src/c/signalProcessing/%sn/zmodsna.c b/src/c/signalProcessing/%sn/zmodsna.c
new file mode 100644
index 00000000..85bc0c16
--- /dev/null
+++ b/src/c/signalProcessing/%sn/zmodsna.c
@@ -0,0 +1,165 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "modsn.h"
+#include "doubleComplex.h"
+#define CA 0.0003
+
+
+doubleComplex zmodsnsproto(doubleComplex uu,double emmc,doubleComplex* sni)
+{
+ doubleComplex ans;
+ double uur,uui;
+ uur=zreals(uu);
+ uui=zimags(uu);
+ double sr,cr,dr;
+ //Performing Elliptic Function operation for the real values
+ double a1,b1,c1,d1,emc1,u1;
+ double em1[14],en1[14];
+ int i1,ii1,l1,bo1;
+ emc1=1-emmc;
+ u1=uur;
+ if(emc1)
+ {
+ bo1=(emc1<0.0);
+ if(bo1)
+ {
+ d1=1.0-emc1;
+ emc1/=-1.0/d1;
+ u1*=(d1=sqrt(d1));
+ }
+ a1=1.0;
+ dr=1.0;
+ for(i1=1;i1<=13;i1++)
+ {
+ l1=i1;
+ em1[i1]=a1;
+ en1[i1]=(emc1=sqrt(emc1));
+ c1=0.5*(a1+emc1);
+ if(fabs(a1-emc1)<=CA*a1)break;
+ emc1*=a1;
+ a1=c1;
+ }
+ u1*=c1;
+ sr=sin(u1);
+ cr=cos(u1);
+ if(sr)
+ {
+ a1=cr/sr;
+ c1*=a1;
+ for(ii1=l1;ii1>=1;ii1--)
+ {
+ b1=em1[ii1];
+ a1*=c1;
+ c1*=dr;
+ dr=(en1[ii1]+a1)/(b1+a1);
+ a1=c1/b1;
+ }
+ a1=1.0/sqrt(c1*c1+1.0);
+ sr=(sr>=0.0?a1:-a1);
+ cr=c1*(sr);
+ }
+ if(bo1)
+ {
+ a1=dr;
+ dr=cr;
+ cr=a1;
+ sr/=d1;
+ }
+ }
+ else
+ {
+ cr=1.0/cosh(u1);
+ dr=cr;
+ sr=tanh(u1);
+ }
+ ////////////////////////////////////////////////////////////////
+ double si,ci,di;
+ //Performing Elleptic Function operation for the imaginary values
+ double a,b,c,d,emc,u;
+ double em[14],en[14];
+ int i,ii,l,bo;
+ //double s1,c1,d1;
+ emc=emmc;
+ u=uui;
+ if(emc)
+ {
+ bo=(emc<0.0);
+ if(bo)
+ {
+ d=1.0-emc;
+ emc/=-1.0/d;
+ u*=(d=sqrt(d));
+ }
+ a=1.0;
+ di=1.0;
+ for(i=1;i<=13;i++)
+ {
+ l=i;
+ em[i]=a;
+ en[i]=(emc=sqrt(emc));
+ c=0.5*(a+emc);
+ if(fabs(a-emc)<=CA*a)break;
+ emc*=a;
+ a=c;
+ }
+ u*=c;
+ si=sin(u);
+ ci=cos(u);
+ if(si)
+ {
+ a=ci/si;
+ c*=a;
+ for(ii=l;ii>=1;ii--)
+ {
+ b=em[ii];
+ a*=c;
+ c*=di;
+ di=(en[ii]+a)/(b+a);
+ a=c/b;
+ }
+ a=1.0/sqrt(c*c+1.0);
+ si=(si>=0.0?a:-a);
+ ci=c*(si);
+ }
+ if(bo)
+ {
+ a=di;
+ di=ci;
+ ci=a;
+ si/=d;
+ }
+ }
+ else
+ {
+ ci=1.0/cosh(u);
+ di=ci;
+ si=tanh(u);
+ }
+ /////////////////////////////////////////////////////////
+ double delta;
+ delta=ci*ci + emmc*sr*sr*si*si;
+ double snir,snii;
+ snir=(sr*di)/delta;
+ snii=(cr*dr*si*ci)/delta;
+ *sni=DoubleComplex(snir,snii);
+}
+
+void zmodsna(doubleComplex* uu,int size,double emmc,doubleComplex* sn)
+{
+ int i;
+ for(i=0;i<size;i++)
+ {
+ zmodsnsproto(uu[i],emmc,&sn[i]);
+ }
+}
diff --git a/src/c/signalProcessing/%sn/zmodsns.c b/src/c/signalProcessing/%sn/zmodsns.c
new file mode 100644
index 00000000..5f35059f
--- /dev/null
+++ b/src/c/signalProcessing/%sn/zmodsns.c
@@ -0,0 +1,161 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ Reference:- Abramowitz, Milton and Stegun, Irene A
+ Handbook of Mathematical Functions, Dover, 1965
+ Chapter 16 (Sections 16.4, 16.13 and 16.15)
+ Link for FORTRAN code:-http://www.aip.de/groups/soe/local/numres/bookfpdf/f6-11.pdf
+*/
+
+#include<stdio.h>
+#include<math.h>
+#include "modsn.h"
+#include "doubleComplex.h"
+#define CA 0.0003
+
+doubleComplex zmodsns(doubleComplex uu,double emmc)
+{
+ doubleComplex ans;
+ double uur,uui;
+ uur=zreals(uu);
+ uui=zimags(uu);
+ double sr,cr,dr;
+ //Performing Elliptic Function operation for the real values
+ double a1,b1,c1,d1,emc1,u1;
+ double em1[14],en1[14];
+ int i1,ii1,l1,bo1;
+ emc1=1-emmc;
+ u1=uur;
+ if(emc1)
+ {
+ bo1=(emc1<0.0);
+ if(bo1)
+ {
+ d1=1.0-emc1;
+ emc1/=-1.0/d1;
+ u1*=(d1=sqrt(d1));
+ }
+ a1=1.0;
+ dr=1.0;
+ for(i1=1;i1<=13;i1++)
+ {
+ l1=i1;
+ em1[i1]=a1;
+ en1[i1]=(emc1=sqrt(emc1));
+ c1=0.5*(a1+emc1);
+ if(fabs(a1-emc1)<=CA*a1)break;
+ emc1*=a1;
+ a1=c1;
+ }
+ u1*=c1;
+ sr=sin(u1);
+ cr=cos(u1);
+ if(sr)
+ {
+ a1=cr/sr;
+ c1*=a1;
+ for(ii1=l1;ii1>=1;ii1--)
+ {
+ b1=em1[ii1];
+ a1*=c1;
+ c1*=dr;
+ dr=(en1[ii1]+a1)/(b1+a1);
+ a1=c1/b1;
+ }
+ a1=1.0/sqrt(c1*c1+1.0);
+ sr=(sr>=0.0?a1:-a1);
+ cr=c1*(sr);
+ }
+ if(bo1)
+ {
+ a1=dr;
+ dr=cr;
+ cr=a1;
+ sr/=d1;
+ }
+ }
+ else
+ {
+ cr=1.0/cosh(u1);
+ dr=cr;
+ sr=tanh(u1);
+ }
+ ////////////////////////////////////////////////////////////////
+ double si,ci,di;
+ //Performing Elleptic Function operation for the imaginary values
+ double a,b,c,d,emc,u;
+ double em[14],en[14];
+ int i,ii,l,bo;
+ //double s1,c1,d1;
+ emc=emmc;
+ u=uui;
+ if(emc)
+ {
+ bo=(emc<0.0);
+ if(bo)
+ {
+ d=1.0-emc;
+ emc/=-1.0/d;
+ u*=(d=sqrt(d));
+ }
+ a=1.0;
+ di=1.0;
+ for(i=1;i<=13;i++)
+ {
+ l=i;
+ em[i]=a;
+ en[i]=(emc=sqrt(emc));
+ c=0.5*(a+emc);
+ if(fabs(a-emc)<=CA*a)break;
+ emc*=a;
+ a=c;
+ }
+ u*=c;
+ si=sin(u);
+ ci=cos(u);
+ if(si)
+ {
+ a=ci/si;
+ c*=a;
+ for(ii=l;ii>=1;ii--)
+ {
+ b=em[ii];
+ a*=c;
+ c*=di;
+ di=(en[ii]+a)/(b+a);
+ a=c/b;
+ }
+ a=1.0/sqrt(c*c+1.0);
+ si=(si>=0.0?a:-a);
+ ci=c*(si);
+ }
+ if(bo)
+ {
+ a=di;
+ di=ci;
+ ci=a;
+ si/=d;
+ }
+ }
+ else
+ {
+ ci=1.0/cosh(u);
+ di=ci;
+ si=tanh(u);
+ }
+ /////////////////////////////////////////////////////////
+ double delta;
+ delta=ci*ci + emmc*sr*sr*si*si;
+ double snir,snii;
+ snir=(sr*di)/delta;
+ snii=(cr*dr*si*ci)/delta;
+ ans=DoubleComplex(snir,snii);
+ return ans;
+}
diff --git a/src/c/signalProcessing/amell/amell.h b/src/c/signalProcessing/amell/amell.h
new file mode 100644
index 00000000..30bd6c82
--- /dev/null
+++ b/src/c/signalProcessing/amell/amell.h
@@ -0,0 +1,27 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __AMELL_H__
+#define __AMELL_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double damells(double u,double x);
+
+#ifdef __cplusplus
+} /* extern "c" */
+#endif
+
+#endif /*__AMELL_H__*/
diff --git a/src/c/signalProcessing/amell/damella.c b/src/c/signalProcessing/amell/damella.c
new file mode 100644
index 00000000..5c37e2a5
--- /dev/null
+++ b/src/c/signalProcessing/amell/damella.c
@@ -0,0 +1,23 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "amell.h"
+
+void damella(double* u,int size,double x,double* oup)
+{
+ int i;
+ for(i=0;i<size;i++)
+ {
+ oup[i]=damells(u[i],x);
+ }
+}
diff --git a/src/c/signalProcessing/amell/damells.c b/src/c/signalProcessing/amell/damells.c
new file mode 100644
index 00000000..90c20530
--- /dev/null
+++ b/src/c/signalProcessing/amell/damells.c
@@ -0,0 +1,57 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+#include<math.h>
+#include "amell.h"
+#define N 30
+#define DBL_EPSILON 2.2204460492503131E-16
+
+
+double damells(double u,double x)
+{
+ double a[N+1];
+ double g[N+1];
+ double c[N+1];
+ double two_n;
+ double phi;
+ double k;
+ int n;
+ k=(long double)fabs(x);
+ if(k==1.0)
+ return 0;
+ if(k>1.0)
+ printf("Wrong type of input argument type #2");
+
+ a[0]=1.0;
+ g[0]=sqrt(1.0-k*k);
+ c[0]=k;
+ two_n=1.0;
+ for(n=0;n<N;n++)
+ {
+ if(fabs(a[n]-g[n])<(a[n]*DBL_EPSILON))
+ {
+ break;
+ }
+ two_n+=two_n;
+ a[n+1]=0.5*(a[n]+g[n]);
+ g[n+1]=sqrt(a[n]*g[n]);
+ c[n+1]=0.5*(a[n]-g[n]);
+ }
+ phi=two_n*a[n]*u;
+ for(;n>0;n--)
+ {
+ phi=0.5*(phi+asin(c[n]*sin(phi)/a[n]));
+ }
+ return (double)phi;
+}
+
diff --git a/src/c/signalProcessing/amell/int_amell.h b/src/c/signalProcessing/amell/int_amell.h
new file mode 100644
index 00000000..5d0c86f6
--- /dev/null
+++ b/src/c/signalProcessing/amell/int_amell.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_AMELL_H__
+#define __INT_AMELL_H__
+
+#define d0d0amelld0(u,x) damells(u,x)
+
+#endif /* !__INT_AMELL_H__! */
diff --git a/src/c/signalProcessing/buttmag/buttmag.h b/src/c/signalProcessing/buttmag/buttmag.h
new file mode 100644
index 00000000..47e64af8
--- /dev/null
+++ b/src/c/signalProcessing/buttmag/buttmag.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __BUTTMAG_H__
+#define __BUTTMAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dbuttmags(double order, double omegac, int size, double* sample,double* out);
+
+#ifdef __cplusplus
+} /* extern "C"*/
+#endif
+
+#endif /* __BUTTMAG_H__ */
+
diff --git a/src/c/signalProcessing/buttmag/dbuttmags.c b/src/c/signalProcessing/buttmag/dbuttmags.c
new file mode 100644
index 00000000..dc40e814
--- /dev/null
+++ b/src/c/signalProcessing/buttmag/dbuttmags.c
@@ -0,0 +1,33 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include<stdio.h>
+#include<math.h>
+#include "buttmag.h"
+void dbuttmags(double order, double omegac,double* sample,int size,double* out)
+{
+ double ones[size];
+ int j,k;
+ for(j=0;j<size;j++)
+ {
+ ones[j]=1.0;
+ }
+ //double h[size];
+ for(k=0;k<size;k++)
+ {
+ double x=ones[k]/(ones[k]+pow((sample[k]/omegac),(2*order)));
+ out[k]=x;
+ //printf("%lf\n",h[k]);
+ }
+
+}
+
diff --git a/src/c/signalProcessing/buttmag/int_buttmag.h b/src/c/signalProcessing/buttmag/int_buttmag.h
new file mode 100644
index 00000000..9867438e
--- /dev/null
+++ b/src/c/signalProcessing/buttmag/int_buttmag.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_BUTTMAG_H__
+#define __INT_BUTTMAG_H__
+
+#define d0d0d2buttmagd2(order,omegac,size,sample,out) dbuttmags(order,omegac,size,sample,out)
+
+#endif /* !INT_BUTTMAG_H__! */
diff --git a/src/c/signalProcessing/buttmag/u8buttmags.c b/src/c/signalProcessing/buttmag/u8buttmags.c
new file mode 100644
index 00000000..e7b52c22
--- /dev/null
+++ b/src/c/signalProcessing/buttmag/u8buttmags.c
@@ -0,0 +1,33 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include<stdio.h>
+#include<math.h>
+#include "buttmag.h"
+void dbuttmags(int order, int omegac,double* sample,int size,double* out)
+{
+ double ones[size];
+ int j,k;
+ for(j=0;j<size;j++)
+ {
+ ones[j]=1.0;
+ }
+ //double h[size];
+ for(k=0;k<size;k++)
+ {
+ double x=ones[k]/(ones[k]+pow((sample[k]/omegac),(2*order)));
+ out[k]=x;
+ //printf("%lf\n",h[k]);
+ }
+
+}
+
diff --git a/src/c/signalProcessing/cheb1mag/cheb1mag.h b/src/c/signalProcessing/cheb1mag/cheb1mag.h
new file mode 100644
index 00000000..369ee4ce
--- /dev/null
+++ b/src/c/signalProcessing/cheb1mag/cheb1mag.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __CHEB1MAG_H__
+#define __CHEB1MAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CHEB1MAG_H__ */
diff --git a/src/c/signalProcessing/cheb1mag/dcheb1mags.c b/src/c/signalProcessing/cheb1mag/dcheb1mags.c
new file mode 100644
index 00000000..a4a459d4
--- /dev/null
+++ b/src/c/signalProcessing/cheb1mag/dcheb1mags.c
@@ -0,0 +1,35 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "cheb1mag.h"
+void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out)
+{
+ double x;
+ int j;
+ double tn;
+ for(j=0;j<size;j++)
+ {
+ x=sample[j]/omegac;
+ if(x<=1)
+ {
+ tn=cos(n*acos(x));
+ out[j]=1/(1+(epsilon*epsilon)*(tn*tn));
+ }
+ else
+ {
+ tn=cosh(n*acosh(x));
+ out[j]=1/(1+(epsilon*epsilon)*(tn*tn));
+ }
+ }
+}
+
diff --git a/src/c/signalProcessing/cheb1mag/int_cheb1mag.h b/src/c/signalProcessing/cheb1mag/int_cheb1mag.h
new file mode 100644
index 00000000..fa0ff83e
--- /dev/null
+++ b/src/c/signalProcessing/cheb1mag/int_cheb1mag.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_CHEB1MAG_H__
+#define __INT_CHEB1MAG_H__
+
+#define d0d0d2cheb1magd2(n,omegac,epsilon,sample,size,out) dcheb1mags(n,omegac,epsilon,sample,size,out)
+
+#endif /* !__INT_CHEB1MAG_H__! */
diff --git a/src/c/signalProcessing/cheb2mag/cheb2mag.h b/src/c/signalProcessing/cheb2mag/cheb2mag.h
new file mode 100644
index 00000000..0516ca51
--- /dev/null
+++ b/src/c/signalProcessing/cheb2mag/cheb2mag.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __CHEB2MAG_H__
+#define __CHEB2MAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CHEB2MAG_H__ */
diff --git a/src/c/signalProcessing/cheb2mag/dcheb2mags.c b/src/c/signalProcessing/cheb2mag/dcheb2mags.c
new file mode 100644
index 00000000..006c5917
--- /dev/null
+++ b/src/c/signalProcessing/cheb2mag/dcheb2mags.c
@@ -0,0 +1,49 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "cheb2mag.h"
+void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup)
+{
+ double e;
+ //e=sqrt(A*A-1);
+ e=1/(pow(10,A/10)-1);
+ double x,k,cn,h,tp;
+ int i;
+ for(i=0;i<size;i++)
+ {
+ x=omegar/sample[i];
+ if(x<=1)
+ {
+ tp=acos(x);
+ cn=cos(n*tp);
+ if(x==1)
+ {
+ h=1/(1+A*A-1);
+ }
+ else
+ {
+ h=1/(1+((A*A-1)/(cn*cn)));
+ }
+
+ }
+ else
+ {
+ tp=acosh(x);
+ cn=cosh(n*tp);
+ h=e*(cn*cn)/(1+e*(cn*cn));
+
+ }
+ oup[i]=h;
+ }
+}
+
diff --git a/src/c/signalProcessing/cheb2mag/int_cheb2mag.h b/src/c/signalProcessing/cheb2mag/int_cheb2mag.h
new file mode 100644
index 00000000..05b77c2d
--- /dev/null
+++ b/src/c/signalProcessing/cheb2mag/int_cheb2mag.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_CHEB2MAG_H__
+#define __INT_CHEB2MAG_H__
+
+#define d0d0d0d2cheb2magd2(n,omegar,A,sample,size,oup) dcheb2mag(n,omegar,A,sample,size,oup)
+
+#endif /* !__INT_CHEB2MAG_H__! */
diff --git a/src/c/signalProcessing/ell1mag/dell1maga.c b/src/c/signalProcessing/ell1mag/dell1maga.c
new file mode 100644
index 00000000..9af0c8e8
--- /dev/null
+++ b/src/c/signalProcessing/ell1mag/dell1maga.c
@@ -0,0 +1,40 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+#include "modsn.h"
+#include "ell1mag.h"
+#include "doubleComplex.h"
+
+void dell1maga(double eps,double m1,double* z,int size,double* oup )
+{
+ double s[size];
+ int i;
+ for(i=0;i<size;i++)
+ {
+ s[i]=zmodsns(z[i],m1);
+ }
+ double un[size];
+ int j;
+ for(j=0;j<size;j++)
+ {
+ un[j]=1;
+ }
+ double v;
+ int k;
+ for(k=0;k<size;k++)
+ {
+ v=un[k]/(un[k]+(eps*eps*s[k]*s[k]));
+ oup[k]=v;
+ }
+}
+
diff --git a/src/c/signalProcessing/ell1mag/ell1mag.h b/src/c/signalProcessing/ell1mag/ell1mag.h
new file mode 100644
index 00000000..8fffc0c6
--- /dev/null
+++ b/src/c/signalProcessing/ell1mag/ell1mag.h
@@ -0,0 +1,28 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ELL1MAG_H__
+#define __ELL1MAG_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dell1mags(double eps,double m1,doubleComplex* z,int size,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__ELL1MAG_H__*/
diff --git a/src/c/signalProcessing/ell1mag/int_ell1mag.h b/src/c/signalProcessing/ell1mag/int_ell1mag.h
new file mode 100644
index 00000000..590a0abd
--- /dev/null
+++ b/src/c/signalProcessing/ell1mag/int_ell1mag.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ELL1MAG_H__
+#define __INT_ELL1MAG_H__
+
+#define d0d0z2ell1magd2(eps,m1,z,size,oup) dell1mags(eps,m1,z,size,oup)
+
+#endif /* !__INT_ELL1MAG_H__! */
diff --git a/src/c/signalProcessing/ell1mag/zell1maga.c b/src/c/signalProcessing/ell1mag/zell1maga.c
new file mode 100644
index 00000000..6e7a6f93
--- /dev/null
+++ b/src/c/signalProcessing/ell1mag/zell1maga.c
@@ -0,0 +1,40 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+#include "modsn.h"
+#include "ell1mag.h"
+#include "doubleComplex.h"
+
+void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup )
+{
+ doubleComplex s[size];
+ int i;
+ for(i=0;i<size;i++)
+ {
+ s[i]=zmodsns(z[i],m1);
+ }
+ double un[size];
+ int j;
+ for(j=0;j<size;j++)
+ {
+ un[j]=1;
+ }
+ doubleComplex v;
+ int k;
+ for(k=0;k<size;k++)
+ {
+ v=un[k]/(un[k]+(eps*eps*s[k]*s[k]));
+ oup[k]=zreals(v);
+ }
+}
+
diff --git a/src/c/signalProcessing/ffilt/ffilt.h b/src/c/signalProcessing/ffilt/ffilt.h
new file mode 100644
index 00000000..9b98f34c
--- /dev/null
+++ b/src/c/signalProcessing/ffilt/ffilt.h
@@ -0,0 +1,27 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FFILT_H__
+#define __FFILT_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gffilts(char* ft,double N,double fc,double fh,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __FFILT_H__ */
diff --git a/src/c/signalProcessing/ffilt/gffilts.c b/src/c/signalProcessing/ffilt/gffilts.c
new file mode 100644
index 00000000..538daf3e
--- /dev/null
+++ b/src/c/signalProcessing/ffilt/gffilts.c
@@ -0,0 +1,90 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "filt_sinc.h"
+#include "ffilt.h"
+void gffilts(char* ft,int size,double N,double fc,double fh,double* oup)
+{
+ int sz=N;
+ double X[sz];
+ double no22=(N-1)/2;
+ int ino22=(int)no22;
+ if(ft[0]=='l')
+ {
+ dfilt_sincs(N,fc,X);
+ int k=0;
+ for(k=0;k<sz;k++)
+ {
+ oup[k]=X[k];
+ }
+ }
+ else if(ft[0]=='h')
+ {
+ int k=0;
+ dfilt_sincs(N,fc,X);
+ for(k=0;k<sz;k++)
+ {
+ oup[k]=-1*X[k];
+ }
+ int id=no22;
+ oup[id]=1+oup[id];
+ }
+ else if(ft[0]=='b')
+ {
+ double wc=M_PI*(fh+fc);
+ fc=(fh-fc)/2;
+ dfilt_sincs(N,fc,X);
+ double Y[sz];
+ double k=0;
+ for(k=-no22;k<=no22;k++)
+ {
+ int ind;
+ ind=k+no22;
+ Y[ind]=2*cos(wc*k);
+ }
+ int j=0;
+ for(j=0;j<sz;j++)
+ {
+ oup[j]=X[j]*Y[j];
+ }
+ }
+ else if(ft[0]=='s')
+ {
+ double wc=M_PI*(fh+fc);
+ fc=(fh-fc)/2;
+ dfilt_sincs(N,fc,X);
+ double Y[sz];
+ double k=0;
+ for(k=-no22;k<=no22;k++)
+ {
+ int ind;
+ ind=k+no22;
+ Y[ind]=2*cos(wc*k);
+ }
+ int j=0;
+ for(j=0;j<sz;j++)
+ {
+ oup[j]=-1*X[j]*Y[j];
+ }
+ int id=no22;
+ oup[id]=1+oup[id];
+ }
+}
+/*
+int main()
+{
+ string s;
+ int n;
+ double fl,fh;
+}
+*/
diff --git a/src/c/signalProcessing/ffilt/int_ffilt.h b/src/c/signalProcessing/ffilt/int_ffilt.h
new file mode 100644
index 00000000..83f44827
--- /dev/null
+++ b/src/c/signalProcessing/ffilt/int_ffilt.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FFILT_H__
+#define __INT_FFILT_H__
+
+#define g0d0d0d0ffiltd2(ft,N,fc,fh,oup) gffilts(ft,N,fc,fh,oup)
+
+#endif /* !__INT_FFILT_H__! */
diff --git a/src/c/signalProcessing/filt_sinc/dfilt_sincs.c b/src/c/signalProcessing/filt_sinc/dfilt_sincs.c
new file mode 100644
index 00000000..1b7d1b18
--- /dev/null
+++ b/src/c/signalProcessing/filt_sinc/dfilt_sincs.c
@@ -0,0 +1,49 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "filt_sinc.h"
+void dfilt_sincs(double N,double fc,double* oup)
+{
+ double no2=(N-1)/2;
+ int ino2=(int)no2;
+ double wl=fc*2*M_PI;
+ int sz=N;
+ double xn[sz];
+ double i;
+ int l,m;
+ for(i=-no2;i<=no2;i++)
+ {
+ l=i+no2;
+ xn[l]=sin(wl*i);
+ }
+ double xd[sz];
+ double j;
+ printf("\n");
+ for(j=-no2;j<=no2;j++)
+ {
+ m=j+no2;
+ xd[m]=M_PI*j;
+ }
+ if(ino2==no2)
+ {
+ xn[(int)no2]=2*fc;
+ xd[(int)no2]=1;
+ }
+ double x[sz];
+ int k;
+ for(k=0;k<N;k++)
+ {
+ oup[k]=xn[k]/xd[k];
+ }
+}
+
diff --git a/src/c/signalProcessing/filt_sinc/filt_sinc.h b/src/c/signalProcessing/filt_sinc/filt_sinc.h
new file mode 100644
index 00000000..43b24151
--- /dev/null
+++ b/src/c/signalProcessing/filt_sinc/filt_sinc.h
@@ -0,0 +1,28 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FILT_SINC_H__
+#define __FILT_SINC_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u8filt_sincs(int N,double fc,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __FILT_SINC_H */
+
diff --git a/src/c/signalProcessing/filt_sinc/int_filt_sinc.h b/src/c/signalProcessing/filt_sinc/int_filt_sinc.h
new file mode 100644
index 00000000..5b7b07ae
--- /dev/null
+++ b/src/c/signalProcessing/filt_sinc/int_filt_sinc.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FILT_SINC_H__
+#define __INT_FILT_SINC_H__
+
+#define u80d0filt_sincd2(N,fc,oup) u8filt_sincs(N,fc,oup)
+
+#endif /* !__INT_FILT_SINC_H__! */
diff --git a/src/c/signalProcessing/fsfirlin/dfsfirlina.c b/src/c/signalProcessing/fsfirlin/dfsfirlina.c
new file mode 100644
index 00000000..d2079f4d
--- /dev/null
+++ b/src/c/signalProcessing/fsfirlin/dfsfirlina.c
@@ -0,0 +1,144 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+
+#include<math.h>
+#include "sincd.h"
+#include "fsfirlin.h"
+//#define PI 3.14159265358979
+
+void dfsfirlina(double* hd,int size,double flag,double* hst)
+{
+ int n1=size,n;
+ if( n1%2==0)
+ {
+ n=2*n1;
+ }
+ else
+ {
+ n=2*n1+1;
+ }
+ double scd[8*n+1];
+ //STRAT SINCD
+ double npt=4*n;
+ int sz=4*n;
+ double PI=M_PI;
+ double pas=PI/npt;
+ double om[sz+1];
+ int i;
+ for(i=0;i<=sz;i++)
+ {
+ om[i]=i*pas;
+ }
+ double eps=pow(-1,(n-1));
+ double s1[sz+1],s2[sz+1];
+ double s[2*(sz)+1];
+ double sr[2*(sz)+1];
+ if(flag==1)
+ {
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[0]=n;
+ s2[0]=1;
+ s1[sz]=n*eps;
+ s2[sz]=1;
+
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+
+ int x;
+ for(x=0;x<=4*n;x++)
+ {
+ scd[sz-x]=s[x];
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ scd[l]=s[l-(sz)];
+ }
+ int m;
+ for(m=0;m<=8*n;m++)
+ {
+ scd[m]=scd[m]/n;
+ }
+ }
+ else
+ {
+ int a;
+ for(a=0;a<=4*n;a++)
+ {
+ om[a]=om[a]-(PI/(2*n));
+ }
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[2]=n;
+ s2[2]=1;
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+ int m;
+ for(m=0;m<=4*n;m++)
+ {
+ scd[m]=(eps*s[m])/n;
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ scd[l]=s[l-(sz)]/n;
+ }
+ }
+ //END SINCD
+ int ii;
+ for(ii=4*n;ii<=6*n;ii++)
+ {
+ hst[ii-(4*n)]=hd[0]*scd[ii];
+ }
+
+ int epsi;
+ epsi=pow(-1,n-1);
+ int jj;
+ for(jj=1;jj<=(n1-1);jj++)
+ {
+ double tp1[2*n+1];
+ double tp2[2*n+1];
+ int k,l;
+ for(k=(-4*jj+4*n);k<=(-4*jj+6*n);k++)
+ {
+ tp1[k-(-4*jj+4*n)]=hd[jj]*scd[k];
+ }
+
+ for(l=(4*jj);l<=(4*jj+2*n);l++)
+ {
+ tp2[l-(4*jj)]=hd[jj]*(epsi*scd[l]);
+ }
+ int m;
+ for(m=0;m<=2*n;m++)
+ {
+ hst[m]=hst[m]+(tp1[m]+tp2[m]);
+ }
+
+ }
+
+
+}
diff --git a/src/c/signalProcessing/fsfirlin/fsfirlin.h b/src/c/signalProcessing/fsfirlin/fsfirlin.h
new file mode 100644
index 00000000..7337cbfe
--- /dev/null
+++ b/src/c/signalProcessing/fsfirlin/fsfirlin.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FSFIRLIN_H__
+#define __FSFIRLIN_H__
+#include "types.h"
+#include "sincd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dfsfirlina(double* hd,int size,int flag,double* hst);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
diff --git a/src/c/signalProcessing/fsfirlin/int_fsfirlin.h b/src/c/signalProcessing/fsfirlin/int_fsfirlin.h
new file mode 100644
index 00000000..857dae8c
--- /dev/null
+++ b/src/c/signalProcessing/fsfirlin/int_fsfirlin.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FSFIRLIN_H__
+#define __INT_FSFIRLIN_H__
+
+#define d2u80fsfirlind2(hd,size,flag,hst) dfsfirlina(hd,size[1],flag,hst)
+
+#endif /* !__INT_FSFIRLIN_H__! */
diff --git a/src/c/signalProcessing/includes/amell.h b/src/c/signalProcessing/includes/amell.h
new file mode 100644
index 00000000..2336d3cb
--- /dev/null
+++ b/src/c/signalProcessing/includes/amell.h
@@ -0,0 +1,28 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __AMELL_H__
+#define __AMELL_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double damells(double u,double x);
+void damella(double* u,int size,double x,double* oup);
+
+#ifdef __cplusplus
+} /* extern "c" */
+#endif
+
+#endif /*__AMELL_H__*/
diff --git a/src/c/signalProcessing/includes/buttmag.h b/src/c/signalProcessing/includes/buttmag.h
new file mode 100644
index 00000000..ef17b7ea
--- /dev/null
+++ b/src/c/signalProcessing/includes/buttmag.h
@@ -0,0 +1,29 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __BUTTMAG_H__
+#define __BUTTMAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dbuttmags(double order, double omegac, double* sample, int size,double* out);
+void u8buttmags(int order, int omegac, double* sample, int size,double* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __BUTTMAG_H__ */
+
diff --git a/src/c/signalProcessing/includes/cheb1mag.h b/src/c/signalProcessing/includes/cheb1mag.h
new file mode 100644
index 00000000..369ee4ce
--- /dev/null
+++ b/src/c/signalProcessing/includes/cheb1mag.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __CHEB1MAG_H__
+#define __CHEB1MAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CHEB1MAG_H__ */
diff --git a/src/c/signalProcessing/includes/cheb2mag.h b/src/c/signalProcessing/includes/cheb2mag.h
new file mode 100644
index 00000000..0516ca51
--- /dev/null
+++ b/src/c/signalProcessing/includes/cheb2mag.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __CHEB2MAG_H__
+#define __CHEB2MAG_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CHEB2MAG_H__ */
diff --git a/src/c/signalProcessing/includes/ell1mag.h b/src/c/signalProcessing/includes/ell1mag.h
new file mode 100644
index 00000000..e881cca9
--- /dev/null
+++ b/src/c/signalProcessing/includes/ell1mag.h
@@ -0,0 +1,29 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ELL1MAG_H__
+#define __ELL1MAG_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup);
+void dell1maga(double eps,double m1,double* z,int size,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__ELL1MAG_H__*/
diff --git a/src/c/signalProcessing/includes/ffilt.h b/src/c/signalProcessing/includes/ffilt.h
new file mode 100644
index 00000000..f38df6e6
--- /dev/null
+++ b/src/c/signalProcessing/includes/ffilt.h
@@ -0,0 +1,27 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FFILT_H__
+#define __FFILT_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gffilts(char* ft,int size,double N,double fc,double fh,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __FFILT_H__ */
diff --git a/src/c/signalProcessing/includes/filt_sinc.h b/src/c/signalProcessing/includes/filt_sinc.h
new file mode 100644
index 00000000..095ca91f
--- /dev/null
+++ b/src/c/signalProcessing/includes/filt_sinc.h
@@ -0,0 +1,28 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FILT_SINC_H__
+#define __FILT_SINC_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dfilt_sincs(double N,double fc,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __FILT_SINC_H */
+
diff --git a/src/c/signalProcessing/includes/fsfirlin.h b/src/c/signalProcessing/includes/fsfirlin.h
new file mode 100644
index 00000000..cf5fbbd0
--- /dev/null
+++ b/src/c/signalProcessing/includes/fsfirlin.h
@@ -0,0 +1,28 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __FSFIRLIN_H__
+#define __FSFIRLIN_H__
+#include "types.h"
+#include "sincd.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dfsfirlina(double* hd,int size,double flag,double* hst);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__FSFIRLIN_H__*/
diff --git a/src/c/signalProcessing/includes/modsn.h b/src/c/signalProcessing/includes/modsn.h
new file mode 100644
index 00000000..d91dd9d3
--- /dev/null
+++ b/src/c/signalProcessing/includes/modsn.h
@@ -0,0 +1,31 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __MODSN_H__
+#define __MODSN_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dmodsns(double uu, double emmc);
+doubleComplex zmodsns(doubleComplex uu,double emmc);
+void dmodsna(double* uu,int size,double emmc,double* sn);
+void zmodsna(doubleComplex* uu,int size,double emmc,doubleComplex* sn);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __MODSN_H__ */
diff --git a/src/c/signalProcessing/includes/sincd.h b/src/c/signalProcessing/includes/sincd.h
new file mode 100644
index 00000000..9b7a3607
--- /dev/null
+++ b/src/c/signalProcessing/includes/sincd.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __SINCD_H__
+#define __SINCD_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dsincds(double n,double flg,double* oup);
+void u8sincds(int n,int flg,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SINCD_H__ */
+
diff --git a/src/c/signalProcessing/includes/zpbutt.h b/src/c/signalProcessing/includes/zpbutt.h
new file mode 100644
index 00000000..9eb88ad4
--- /dev/null
+++ b/src/c/signalProcessing/includes/zpbutt.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPBUTT_H__
+#define __ZPBUTT_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dzpbutts(double n,double fl,doubleComplex* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __ZPBUTT_H__ */
+
diff --git a/src/c/signalProcessing/includes/zpch1.h b/src/c/signalProcessing/includes/zpch1.h
new file mode 100644
index 00000000..fbe850cc
--- /dev/null
+++ b/src/c/signalProcessing/includes/zpch1.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPCH1_H__
+#define __ZPCH1_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dzpch1s(double N,double e,double wc,doubleComplex* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __ZPCH1_H__ */
diff --git a/src/c/signalProcessing/includes/zpch2.h b/src/c/signalProcessing/includes/zpch2.h
new file mode 100644
index 00000000..d7c1c647
--- /dev/null
+++ b/src/c/signalProcessing/includes/zpch2.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPCH2_H__
+#define __ZPCH2_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __ZPCH2_H__ */
diff --git a/src/c/signalProcessing/interfaces/int_amell.h b/src/c/signalProcessing/interfaces/int_amell.h
new file mode 100644
index 00000000..10719ac5
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_amell.h
@@ -0,0 +1,19 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_AMELL_H__
+#define __INT_AMELL_H__
+
+#define d0d0amelld0(u,x) damells(u,x)
+#define d2d0amelld2(u,size,x,oup) damella(u,size[1],x,oup)
+
+#endif /* !__INT_AMELL_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_buttmag.h b/src/c/signalProcessing/interfaces/int_buttmag.h
new file mode 100644
index 00000000..4a33fafe
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_buttmag.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_BUTTMAG_H__
+#define __INT_BUTTMAG_H__
+
+#define d0d0d2buttmagd2(order,omegac,sample,size,out) dbuttmags(order,omegac,sample,size[1],out)
+#define u80u80d2buttmagd2(order,omegac,sample,size,out) u8buttmags(order,omegac,sample,size[1],out)
+
+#endif /* !INT_BUTTMAG_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_cheb1mag.h b/src/c/signalProcessing/interfaces/int_cheb1mag.h
new file mode 100644
index 00000000..764e8c79
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_cheb1mag.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_CHEB1MAG_H__
+#define __INT_CHEB1MAG_H__
+
+#define d0d0d0d2cheb1magd2(n,omegac,epsilon,sample,size,out) dcheb1mags(n,omegac,epsilon,sample,size[1],out)
+
+#endif /* !__INT_CHEB1MAG_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_cheb2mag.h b/src/c/signalProcessing/interfaces/int_cheb2mag.h
new file mode 100644
index 00000000..b63db04d
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_cheb2mag.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_CHEB2MAG_H__
+#define __INT_CHEB2MAG_H__
+
+#define d0d0d0d2cheb2magd2(n,omegar,A,sample,size,oup) dcheb2mags(n,omegar,A,sample,size[1],oup)
+
+#endif /* !__INT_CHEB2MAG_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_ell1mag.h b/src/c/signalProcessing/interfaces/int_ell1mag.h
new file mode 100644
index 00000000..c30ffef6
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_ell1mag.h
@@ -0,0 +1,19 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ELL1MAG_H__
+#define __INT_ELL1MAG_H__
+
+#define d0d0z2ell1magd2(eps,m1,z,size,oup) zell1maga(eps,m1,z,size[1],oup)
+#define d0d0d2ell1magd2(eps,m1,z,size,oup) dell1maga(eps,m1,z,size[1],oup)
+
+#endif /* !__INT_ELL1MAG_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_ffilt.h b/src/c/signalProcessing/interfaces/int_ffilt.h
new file mode 100644
index 00000000..273b98f7
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_ffilt.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FFILT_H__
+#define __INT_FFILT_H__
+
+#define g2d0d0d0ffiltd2(ft,size,N,fc,fh,oup) gffilts(ft,size[1],N,fc,fh,oup)
+
+#endif /* !__INT_FFILT_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_filt_sinc.h b/src/c/signalProcessing/interfaces/int_filt_sinc.h
new file mode 100644
index 00000000..f90d0a62
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_filt_sinc.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FILT_SINC_H__
+#define __INT_FILT_SINC_H__
+
+#define d0d0filt_sincd2(N,fc,oup) dfilt_sincs(N,fc,oup)
+
+#endif /* !__INT_FILT_SINC_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_fsfirlin.h b/src/c/signalProcessing/interfaces/int_fsfirlin.h
new file mode 100644
index 00000000..3f6fb6e0
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_fsfirlin.h
@@ -0,0 +1,18 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_FSFIRLIN_H__
+#define __INT_FSFIRLIN_H__
+
+#define d2d0fsfirlind2(hd,size,flag,hst) dfsfirlina(hd,size[1],flag,hst)
+
+#endif /* !__INT_FSFIRLIN_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_modsn.h b/src/c/signalProcessing/interfaces/int_modsn.h
new file mode 100644
index 00000000..56c8f8cb
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_modsn.h
@@ -0,0 +1,21 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_MODSN_H__
+#define __INT_MODSN_H__
+
+#define d0d0modsnd0(uu,emmc) dmodsns(uu,emmc)
+#define z0d0modsnz0(uu,emmc) zmodsns(uu,emmc)
+#define d2d0modsnd2(uu,size,emmc,sn) dmodsna(uu,size[1],emmc,sn)
+#define z2d0modsnz2(uu,size,emmc,sn) zmodsna(uu,size[1],emmc,sn)
+
+#endif /* !__INT_MODSN_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_sincd.h b/src/c/signalProcessing/interfaces/int_sincd.h
new file mode 100644
index 00000000..73136730
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_sincd.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_SINCD_H__
+#define __INT_SINCD_H__
+
+#define d0d0sincdd2(n,flg,oup) dsincds(n,flg,oup)
+#define u80u80sincdd2(n,flg,oup) u8sincds(n,flg,oup)
+
+#endif /* !__INT_SINCD_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_zpbutt.h b/src/c/signalProcessing/interfaces/int_zpbutt.h
new file mode 100644
index 00000000..775c1026
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_zpbutt.h
@@ -0,0 +1,19 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPBUTT_H__
+#define __INT_ZPBUTT_H__
+
+#define d0d0zpbuttz2d0(n,fl,out) dzpbutts(n,fl,out)
+
+#endif /* !INT_ZPBUTT_H__! */
+
diff --git a/src/c/signalProcessing/interfaces/int_zpch1.h b/src/c/signalProcessing/interfaces/int_zpch1.h
new file mode 100644
index 00000000..429e7c36
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_zpch1.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPCH1_H__
+#define __INT_ZPCH1_H__
+
+#define d0d0d0zpch1z2d0(N,e,wc,out) dzpch1s(N,e,wc,out)
+
+#endif /* !INT_ZPCH1_H__! */
diff --git a/src/c/signalProcessing/interfaces/int_zpch2.h b/src/c/signalProcessing/interfaces/int_zpch2.h
new file mode 100644
index 00000000..fcb12a7c
--- /dev/null
+++ b/src/c/signalProcessing/interfaces/int_zpch2.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPCH2_H__
+#define __INT_ZPCH2_H__
+
+#define d0d0d0zpch2z2z2d0(N,A,omegar,zeros,poles) dzpch2s(N,A,omegar,zeros,poles)
+
+#endif /* !INT_ZPCH2_H__! */
diff --git a/src/c/signalProcessing/sincd/dsincds.c b/src/c/signalProcessing/sincd/dsincds.c
new file mode 100644
index 00000000..1475d8de
--- /dev/null
+++ b/src/c/signalProcessing/sincd/dsincds.c
@@ -0,0 +1,99 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+#include<math.h>
+#include "sincd.h"
+//#define PI 3.14159265358979
+void dsincds(double n,double flg,double* oup)
+{
+ double npt=4*n;
+ int sz=4*n;
+ double PI=M_PI;
+ double pas=PI/npt;
+ double om[sz+1];
+ int i;
+ for(i=0;i<=sz;i++)
+ {
+ om[i]=i*pas;
+ }
+ double eps=pow(-1,(n-1));
+ double s1[sz+1],s2[sz+1];
+ double s[2*(sz)+1];
+ double sr[2*(sz)+1];
+ if(flg==1)
+ {
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[0]=n;
+ s2[0]=1;
+ s1[sz]=n*eps;
+ s2[sz]=1;
+
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+
+ int x;
+ for(x=0;x<=4*n;x++)
+ {
+ oup[sz-x]=s[x];
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ oup[l]=s[l-(sz)];
+ }
+ int m;
+ for(m=0;m<=8*n;m++)
+ {
+ oup[m]=oup[m]/n;
+ }
+ }
+ else
+ {
+ int a;
+ for(a=0;a<=4*n;a++)
+ {
+ om[a]=om[a]-(PI/(2*n));
+ }
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[2]=n;
+ s2[2]=1;
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+ int m;
+ for(m=0;m<=4*n;m++)
+ {
+ oup[m]=(eps*s[m])/n;
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ oup[l]=s[l-(sz)]/n;
+ }
+
+ }
+}
+
diff --git a/src/c/signalProcessing/sincd/int_sincd.h b/src/c/signalProcessing/sincd/int_sincd.h
new file mode 100644
index 00000000..a404978b
--- /dev/null
+++ b/src/c/signalProcessing/sincd/int_sincd.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_SINCD_H__
+#define __INT_SINCD_H__
+
+#define u80sincdd2(n,flg,oup) u8sincds(n,flg,oup)
+
+#endif /* !__INT_SINCD_H__! */
diff --git a/src/c/signalProcessing/sincd/sincd.h b/src/c/signalProcessing/sincd/sincd.h
new file mode 100644
index 00000000..2df85a87
--- /dev/null
+++ b/src/c/signalProcessing/sincd/sincd.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __SINCD_H__
+#define __SINCD_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u8sincds(int n,int flg,double* oup);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __SINCD_H__ */
+
diff --git a/src/c/signalProcessing/sincd/u8sincds.c b/src/c/signalProcessing/sincd/u8sincds.c
new file mode 100644
index 00000000..d03f48ae
--- /dev/null
+++ b/src/c/signalProcessing/sincd/u8sincds.c
@@ -0,0 +1,98 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#include<stdio.h>
+#include<math.h>
+#include "sincd.h"
+#define PI 3.14159265358979
+void u8sincds(int n,int flg,double* oup)
+{
+ double npt=4*n;
+ int sz=4*n;
+ double pas=PI/npt;
+ double om[sz+1];
+ int i;
+ //om[0]=0;
+ for(i=0;i<=sz;i++)
+ {
+ om[i]=i*pas;
+ }
+ double eps=pow(-1,(n-1));
+ double s1[sz+1],s2[sz+1];
+ double s[2*(sz)+1];
+ double sr[2*(sz)+1];
+ if(flg==1)
+ {
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[0]=n;
+ s2[0]=1;
+ s1[sz]=n*eps;
+ s2[sz]=1;
+
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+
+ int x;
+ for(x=0;x<=4*n;x++)
+ {
+ oup[sz-x]=s[x];
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ oup[l]=s[l-(sz)];
+ }
+ int m;
+ for(m=0;m<=8*n;m++)
+ {
+ oup[m]=oup[m]/n;
+ }
+ }
+ else
+ {
+ int a;
+ for(a=0;a<=4*n;a++)
+ {
+ om[a]=om[a]-(PI/(2*n));
+ }
+ int j,k;
+ for(j=0;j<=4*n;j++)
+ {
+ s1[j]=sin(n*om[j]);
+ s2[j]=sin(om[j]);
+ }
+ s1[2]=n;
+ s2[2]=1;
+ for(k=0;k<=4*n;k++)
+ {
+ s[k]=s1[k]/s2[k];
+ }
+ int m;
+ for(m=0;m<=4*n;m++)
+ {
+ oup[m]=(eps*s[m])/n;
+ }
+ int l;
+ for(l=4*n+1;l<=8*n;l++)
+ {
+ oup[l]=s[l-(sz)]/n;
+ }
+
+ }
+}
diff --git a/src/c/signalProcessing/zpbutt/dzpbutts.c b/src/c/signalProcessing/zpbutt/dzpbutts.c
new file mode 100644
index 00000000..33f22af9
--- /dev/null
+++ b/src/c/signalProcessing/zpbutt/dzpbutts.c
@@ -0,0 +1,33 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+#include<math.h>
+#include "zpbutt.h"
+#define PI 3.14159265
+double dzpbutts(double n,double fl,doubleComplex* out)
+{
+ double e= PI/(2.0*(n));
+ int k;
+ double rl,cpx,gain;
+ for(k=1;k<=n;k++)
+ {
+ double v=2.0*(double)k+(n)-1.0;
+ rl=(fl)*cos(e*v);
+ cpx=(fl)*sin(e*v);
+ out[k-1]=DoubleComplex(rl,cpx);
+ }
+ gain=pow(fl,n);
+
+return gain;
+
+}
+
diff --git a/src/c/signalProcessing/zpbutt/int_zpbutt.h b/src/c/signalProcessing/zpbutt/int_zpbutt.h
new file mode 100644
index 00000000..72eae8a2
--- /dev/null
+++ b/src/c/signalProcessing/zpbutt/int_zpbutt.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPBUTT_H__
+#define __INT_ZPBUTT_H__
+
+#define d0d0zpbuttzada(n,fl,out,gain) dzpbutts(n,fl,out,gain)
+
+#endif /* !INT_ZPBUTT_H__ */
+
diff --git a/src/c/signalProcessing/zpbutt/zpbutt.h b/src/c/signalProcessing/zpbutt/zpbutt.h
new file mode 100644
index 00000000..6883942c
--- /dev/null
+++ b/src/c/signalProcessing/zpbutt/zpbutt.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPBUTT_H__
+#define __ZPBUTT_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dzpbutts(double* n,double* fl,doublecomplex* out,double* gain);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
diff --git a/src/c/signalProcessing/zpch1/dzpch1s.c b/src/c/signalProcessing/zpch1/dzpch1s.c
new file mode 100644
index 00000000..ab7b6332
--- /dev/null
+++ b/src/c/signalProcessing/zpch1/dzpch1s.c
@@ -0,0 +1,53 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "zpch1.h"
+#include "multiplication.h"
+#include "conj.h"
+#include "abs.h"
+#define PI 3.14159265
+double dzpch1s(double N,double e,double wc,doubleComplex* out)
+{
+ doubleComplex accumulate,tp;
+ double B,r,R,gain,realVal;
+ double temp=sqrt(1+e*e);
+
+ B=pow((temp+1)/e,1/N);
+
+ r=wc*((B*B-1)/(2*B));
+ R=wc*((B*B+1)/(2*B));
+
+ int k;
+ double t1=1;
+ double t2=0;
+ accumulate=DoubleComplex(t1,t2);
+ for(k=0;k<N;k++)
+ {
+ double theta;
+ theta=(PI/2)+((2*k+1)*PI)/(2*N);
+ double xk,yk;
+ xk=r*cos(theta);
+ yk=R*sin(theta);
+ out[k]=DoubleComplex(xk,yk);
+ tp=DoubleComplex(xk,yk);
+ accumulate=zmuls(accumulate,tp);
+ }
+
+ realVal=zreals(accumulate);
+ gain=dabss(realVal);
+ if (N==2*(int)(N/2))
+ gain=gain/sqrt(1+e*e);
+return gain;
+
+}
+
diff --git a/src/c/signalProcessing/zpch1/int_zpch1.h b/src/c/signalProcessing/zpch1/int_zpch1.h
new file mode 100644
index 00000000..8933d1a2
--- /dev/null
+++ b/src/c/signalProcessing/zpch1/int_zpch1.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPCH1_H__
+#define __INT_ZPCH1_H__
+
+#define d0d0d0zpch1z2d0(N,e,wc) dzpch1s(N,e,wc)
+
+#endif /* !INT_ZPCH1_H__! */
diff --git a/src/c/signalProcessing/zpch1/zpch1.h b/src/c/signalProcessing/zpch1/zpch1.h
new file mode 100644
index 00000000..fbe850cc
--- /dev/null
+++ b/src/c/signalProcessing/zpch1/zpch1.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPCH1_H__
+#define __ZPCH1_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double dzpch1s(double N,double e,double wc,doubleComplex* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __ZPCH1_H__ */
diff --git a/src/c/signalProcessing/zpch2/dzpch2s.c b/src/c/signalProcessing/zpch2/dzpch2s.c
new file mode 100644
index 00000000..22a46a64
--- /dev/null
+++ b/src/c/signalProcessing/zpch2/dzpch2s.c
@@ -0,0 +1,63 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#include<stdio.h>
+#include<math.h>
+#include "zpch2.h"
+#include "multiplication.h"
+#include "abs.h"
+#include "division.h"
+#define PI 3.14159265
+double dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles)
+{
+ int k,j;
+ double e,xk,realVal,gain;
+ doubleComplex accumulate1,accumulate2,tp1,tp2;
+ accumulate1=DoubleComplex(1,0);
+ accumulate2=DoubleComplex(1,0);
+ int ct=0;
+ for(k=1;k<=N;k++)
+ {
+ if(k!=((N+1)/2))
+ {
+ ct++;
+ double num=PI*(2*k-1);
+ double den=2*N;
+ xk=cos(num/den);
+ double sk=omegar/xk;
+ zeros[k-1]=DoubleComplex(0,sk);
+ tp1=DoubleComplex(0,sk);
+ accumulate1=zmuls(accumulate1,tp1);
+ }
+ }
+ for(j=1;j<=N;j++)
+ {
+ double num=PI*(2*j-1);
+ double den=2*N;
+ double xk1=num/den;
+ double Gamma=pow((A+sqrt(A*A-1)),(1/N));
+ double alpha=-((Gamma-1/Gamma)/2)*sin(xk1);
+ double Beta=((Gamma+1/Gamma)/2)*cos(xk1);
+ double normal=alpha*alpha+Beta*Beta;
+ poles[j-1]=DoubleComplex((omegar*alpha)/normal,(omegar*Beta)/normal);
+ tp2=DoubleComplex((omegar*alpha)/normal,(omegar*Beta)/normal);
+ accumulate2=zmuls(accumulate2,tp2);
+ }
+ double qt;
+ double ra2=zreals(accumulate2);
+ double ra1=zreals(accumulate1);
+ qt=dldivs(ra1,ra2);
+ gain=dabss(qt);
+
+ return gain;
+
+}
+
diff --git a/src/c/signalProcessing/zpch2/int_zpch2.h b/src/c/signalProcessing/zpch2/int_zpch2.h
new file mode 100644
index 00000000..683a7614
--- /dev/null
+++ b/src/c/signalProcessing/zpch2/int_zpch2.h
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __INT_ZPCH2_H__
+#define __INT_ZPCH2_H__
+
+#define d0d0d0zpch2z2z2(N,A,omegar,zeros,poles) dzpch2s(N,A,omegar,zeros,poles)
+
+#endif /* !INT_ZPCH2_H__! */
diff --git a/src/c/signalProcessing/zpch2/zpch2.h b/src/c/signalProcessing/zpch2/zpch2.h
new file mode 100644
index 00000000..0d191d5c
--- /dev/null
+++ b/src/c/signalProcessing/zpch2/zpch2.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+
+#ifndef __ZPCH2_H__
+#define __ZPCH2_H__
+#include "types.h"
+#include "doubleComplex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __ZPCH2_H__ */
diff --git a/src/c/string/ascii/dasciia.c b/src/c/string/ascii/dasciia.c
new file mode 100644
index 00000000..d2452880
--- /dev/null
+++ b/src/c/string/ascii/dasciia.c
@@ -0,0 +1,21 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+#include "ascii.h"
+void dasciia(double* inp,int size,char* oup)
+{
+ int i;
+ for(i=0;i<size;i++)
+ {
+ oup[i]=(char)inp[i];
+ }
+}
diff --git a/src/c/string/ascii/gasciia.c b/src/c/string/ascii/gasciia.c
new file mode 100644
index 00000000..ec11d6e2
--- /dev/null
+++ b/src/c/string/ascii/gasciia.c
@@ -0,0 +1,26 @@
+/* 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+/* This is the "asciiconv" function which converts the given string
+ into its ascii equivalent.
+*/
+#include "ascii.h"
+void gasciia(char *str,int size,int* oup)
+{
+ int i;
+ for(i=0;i<size;i++)
+ {
+ *(oup+i)=(int)str[i];
+ }
+
+}
+
diff --git a/src/c/string/disp/zdispa.c b/src/c/string/disp/zdispa.c
index 5d085d32..bc71de4b 100644
--- a/src/c/string/disp/zdispa.c
+++ b/src/c/string/disp/zdispa.c
@@ -16,7 +16,7 @@ double zdispa (doubleComplex* in, int rows, int columns){
int i = 0,j = 0;
for (i = 0; i < rows; ++i) {
- for (j=0;j<columns;j++) printf(" %1.20f + %1.20fi " ,zreals(in[i+j*rows]) ,zimags(in[i+j*rows]));
+ for (j=0;j<columns;j++) printf(" %1.20lf + %1.20lfi " ,zreals(in[i+j*rows]) ,zimags(in[i+j*rows]));
printf("\n");
}
return 0;
diff --git a/src/c/string/includes/ascii.h b/src/c/string/includes/ascii.h
new file mode 100644
index 00000000..fcf969da
--- /dev/null
+++ b/src/c/string/includes/ascii.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __ASCII_H__
+#define __ASCII_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gasciia(char* str,int size,int* oup);
+void dasciia(double* inp,int size,char* oup);
+
+#ifdef __cplusplus
+}/* extern "C" */
+#endif
+
+#endif /*___ASCII_H__*/
diff --git a/src/c/string/includes/strchr.h b/src/c/string/includes/strchr.h
new file mode 100644
index 00000000..7e306413
--- /dev/null
+++ b/src/c/string/includes/strchr.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __STRCHR_H__
+#define __STRCHR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gstrchra(char* str,int size, char* key,int size2, char* out);
+
+#ifdef __cplusplus
+}/* extern "C" */
+#endif
+
+#endif /*__STRCHR_H__*/
diff --git a/src/c/string/includes/strcspn.h b/src/c/string/includes/strcspn.h
new file mode 100644
index 00000000..aa91fb47
--- /dev/null
+++ b/src/c/string/includes/strcspn.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __STRCSPN_H__
+#define __STRCSPN_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 gstrcspna(char* str1,int size1,char* str2,int size2);
+
+#ifdef __cplusplus
+}/* extern "C" */
+#endif
+
+#endif /* __STRCSPN_H */
diff --git a/src/c/string/includes/strncpy.h b/src/c/string/includes/strncpy.h
new file mode 100644
index 00000000..f2aa705b
--- /dev/null
+++ b/src/c/string/includes/strncpy.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __STRNCPY_H__
+#define __STRNCPY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gstrncpya(char* str,int size,double key,char* oup);
+
+#ifdef __cplusplus
+}/* extern "C" */
+#endif
+
+#endif /*__STRNCPY_H__*/
diff --git a/src/c/string/includes/strspn.h b/src/c/string/includes/strspn.h
new file mode 100644
index 00000000..427caa4c
--- /dev/null
+++ b/src/c/string/includes/strspn.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __STRSPN_H__
+#define __STRSPN_H__
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 gstrspna(char* str1,int size1,char* str2,int size2);
+
+#ifdef __cplusplus
+}/* extern "C" */
+#endif
+
+#endif /* __STRSPN_H */
diff --git a/src/c/string/interfaces/int_ascii.h b/src/c/string/interfaces/int_ascii.h
new file mode 100644
index 00000000..87b1b125
--- /dev/null
+++ b/src/c/string/interfaces/int_ascii.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __INT_ASCII_H__
+#define __INT_ASCII_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2asciiu82(str,size,oup) gasciia(str,size[1],oup)
+#define d2asciig2(inp,size,oup) dasciia(inp,size[1],oup)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__INT_ASCII_H__*/
diff --git a/src/c/string/interfaces/int_strchr.h b/src/c/string/interfaces/int_strchr.h
new file mode 100644
index 00000000..8747545b
--- /dev/null
+++ b/src/c/string/interfaces/int_strchr.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __INT_STRCHR_H__
+#define __INT_STRCHR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2g2strchrg2(str,size,key,size2,out) gstrchra(str,size[1],key,size2[1],out)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__INT_STRCHR_H__*/
diff --git a/src/c/string/interfaces/int_strcspn.h b/src/c/string/interfaces/int_strcspn.h
new file mode 100644
index 00000000..74c6379f
--- /dev/null
+++ b/src/c/string/interfaces/int_strcspn.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __INT_STRCSPN_H__
+#define __INT_STRCSPN_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2g2strcspnu80(str1,size1,str2,size2) gstrcspna(str1,size1[1],str2,size2[1])
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_STRCSPN_H__*/
diff --git a/src/c/string/interfaces/int_strncpy.h b/src/c/string/interfaces/int_strncpy.h
new file mode 100644
index 00000000..e7ffdb42
--- /dev/null
+++ b/src/c/string/interfaces/int_strncpy.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __INT_STRNCPY_H__
+#define __INT_STRNCPY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2d0strncpyg2(str,size,key,oup) gstrncpya(str,size[1],key,oup)
+
+#ifdef __cplusplus
+} /* extern "C"*/
+#endif
+
+#endif /*__INT_STRNCPY_H__*/
+
diff --git a/src/c/string/interfaces/int_strspn.h b/src/c/string/interfaces/int_strspn.h
new file mode 100644
index 00000000..e4b06f72
--- /dev/null
+++ b/src/c/string/interfaces/int_strspn.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Ankit Raj
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __INT_STRSPN_H__
+#define __INT_STRSPN_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define g2g2strspnu80(str1,size1,str2,size2) gstrspna(str1,size1[1],str2,size2[1])
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_STRSPN_H__*/
diff --git a/src/c/string/strchr/gstrchra.c b/src/c/string/strchr/gstrchra.c
new file mode 100644
index 00000000..f2f54359
--- /dev/null
+++ b/src/c/string/strchr/gstrchra.c
@@ -0,0 +1,33 @@
+/* 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: Ankit Raj
+ Email: toolbox@scilab.in
+*/
+#include <stdio.h>
+#include <string.h>
+#include "strchr.h"
+
+void gstrchra(char* str,int size,char* key,int size2,char* out)
+{
+ int ind,i=0,j,k;
+ for(j=0;j<size;j++)
+ {
+ if(str[j]==key[0])
+ {
+ ind=j;
+ break;
+ }
+ }
+ for(k=ind;k<size;k++)
+ {
+ out[i]=str[k];
+ i++;
+ }
+}
+
diff --git a/src/c/string/strcspn/gstrcspna.c b/src/c/string/strcspn/gstrcspna.c
new file mode 100644
index 00000000..5617e17e
--- /dev/null
+++ b/src/c/string/strcspn/gstrcspna.c
@@ -0,0 +1,49 @@
+/* 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: Ankit Raj
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+#include<string.h>
+#include "strcspn.h"
+uint8 gstrcspna(char *str1,int size1,char *str2,int size2)
+{
+ int ind,i,j;;
+ for(i=0;i<=size1;i++)
+ {
+ for(j=0;j<=size2;j++)
+ {
+ if(str2[j]==str1[i])
+ {
+ ind=j;
+ break;
+ }
+ }
+ }
+ return (ind+1);
+}
+/*int main()
+{
+ int n1,n2;
+ char inp1[100000],inp2[100000];
+ printf("Enter the length of the first string");
+ scanf("%d",&n1);
+ for(int i=0;i<=(n1+1);i++)
+ {
+ scanf("%c",&inp1[i]);
+ }
+ printf("Enter the length of the second string");
+ scanf("%d",&n2 );
+ for(int j=0;j<=(n2+1);j++)
+ {
+ scanf("%c",&inp2[j]);
+ }
+ strcspnfn(inp1,n1+1,inp2,n2+1);
+}
+*/
diff --git a/src/c/string/strncpy/gstrncpya.c b/src/c/string/strncpy/gstrncpya.c
new file mode 100644
index 00000000..92801985
--- /dev/null
+++ b/src/c/string/strncpy/gstrncpya.c
@@ -0,0 +1,25 @@
+/* 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: Ankit Raj
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+#include "strncpy.h"
+void gstrncpya(char *str,int size,double key,char *oup)
+{
+ int j;
+ char c;
+ for(j=0;j<key;j++)
+ {
+ c=str[j];
+ oup[j]=c;
+ }
+}
+
+
diff --git a/src/c/string/strspn/gstrspna.c b/src/c/string/strspn/gstrspna.c
new file mode 100644
index 00000000..af1acbb8
--- /dev/null
+++ b/src/c/string/strspn/gstrspna.c
@@ -0,0 +1,44 @@
+/* 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: Ankit Raj
+ Email: toolbox@scilab.in
+*/
+#include<stdio.h>
+#include "strspn.h"
+
+int maxg(int a,int b){
+ if(a>b) return a;
+ return b;
+}
+uint8 gstrspna(char *str1,int size1,char *str2,int size2)
+{
+ int i,j,ct=0,k=0,m=0;
+ for(i=0;i<size2;i++)
+ {
+ if(str1[0]==str2[i])
+ {
+ k=i;
+ ct=0;
+ j=0;
+ while(str1[j]==str2[k])
+ {
+ ct++;
+ j++;
+ k++;
+ if(j >= size1) break;
+ }
+ if(j==size1)
+ {
+ ct=ct-1;
+ }
+ m = maxg(m,ct);
+ }
+ }
+return m;
+}