vAlloc.c
Go to the documentation of this file.
00001 /*******************************************************
00002  *
00003  * Author: Shinsaku Hiura, Hirokazu Kato
00004  *
00005  *         shinsaku@sys.es.osaka-u.ac.jp
00006  *         kato@sys.im.hiroshima-cu.ac.jp
00007  *
00008  * Revision: 2.1
00009  * Date: 99/07/16
00010  *
00011 *******************************************************/
00012 
00013 #include <stdio.h>
00014 #ifndef __APPLE__
00015 #include <malloc.h>
00016 #else
00017 #include <stdlib.h>
00018 #endif
00019 #include <math.h>
00020 #include <AR/matrix.h>
00021 
00022 ARVec *arVecAlloc( int clm )
00023 {
00024     ARVec     *v;
00025 
00026     v = (ARVec *)malloc(sizeof(ARVec));
00027     if( v == NULL ) return NULL;
00028 
00029     v->v = (double *)malloc(sizeof(double) * clm);
00030     if( v->v == NULL ) {
00031         free(v);
00032         return NULL;
00033     }
00034 
00035     v->clm = clm;
00036 
00037     return v;
00038 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


ar_recog
Author(s): Graylin Trevor Jay and Christopher Crick
autogenerated on Fri Jan 25 2013 12:15:00