Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 204 | chris | 1 | /******************************************************* |
| 2 | * |
||
| 3 | * Author: Shinsaku Hiura, Hirokazu Kato |
||
| 4 | * |
||
| 5 | * shinsaku@sys.es.osaka-u.ac.jp |
||
| 6 | * kato@sys.im.hiroshima-cu.ac.jp |
||
| 7 | * |
||
| 8 | * Revision: 2.1 |
||
| 9 | * Date: 99/07/16 |
||
| 10 | * |
||
| 11 | *******************************************************/ |
||
| 12 | |||
| 13 | #include <stdio.h> |
||
| 14 | #include <math.h> |
||
| 15 | #ifndef __APPLE__ |
||
| 16 | #include <malloc.h> |
||
| 17 | #else |
||
| 18 | #include <stdlib.h> |
||
| 19 | #endif |
||
| 20 | #include <AR/matrix.h> |
||
| 21 | |||
| 22 | ARMat *arMatrixAllocDup(ARMat *source) |
||
| 23 | { |
||
| 24 | ARMat *dest; |
||
| 25 | |||
| 26 | dest = arMatrixAlloc(source->row, source->clm); |
||
| 27 | if( dest == NULL ) return NULL; |
||
| 28 | |||
| 29 | if( arMatrixDup(dest, source) < 0 ) { |
||
| 30 | arMatrixFree(dest); |
||
| 31 | return NULL; |
||
| 32 | } |
||
| 33 | |||
| 34 | return dest; |
||
| 35 | } |